@arcgis/core 5.2.1 → 5.2.2

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 (145) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{67e533748435253aaba6.js → 0284f608d25c654fcc11.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2d9a1f23ec6ce90723ac.js → 0d99bfb75dcb9fa29080.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0fa29352f2ecf0c515e8.js +1 -0
  5. package/assets/esri/core/workers/chunks/10ad7b35b6800d40444e.js +1 -0
  6. package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +1 -0
  7. package/assets/esri/core/workers/chunks/{10878932826ddb60fac4.js → 1fcc998421c7c16de2ca.js} +1 -1
  8. package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +1 -0
  9. package/assets/esri/core/workers/chunks/251f706d226b1d47ba99.js +1 -0
  10. package/assets/esri/core/workers/chunks/{ba38231193919e093917.js → 2529f12fc16e98c014ca.js} +1 -1
  11. package/assets/esri/core/workers/chunks/2b4dd42920d37b1ff0a9.js +2 -0
  12. package/assets/esri/core/workers/chunks/2b804b5d7ce10f0f0cf0.js +1 -0
  13. package/assets/esri/core/workers/chunks/3537fe95b83a13b156cc.js +1 -0
  14. package/assets/esri/core/workers/chunks/36f31416132de434ec00.js +1 -0
  15. package/assets/esri/core/workers/chunks/3e29ab5ec136e669b633.js +1 -0
  16. package/assets/esri/core/workers/chunks/{36c780a9527c75b36725.js → 40d7e54529d13fdd2bf1.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{2cb209bc51a19487692d.js → 43aef67452fa6ff8d8f9.js} +2 -2
  18. package/assets/esri/core/workers/chunks/449a2dee17b54946f245.js +1 -0
  19. package/assets/esri/core/workers/chunks/{5d42f0898bf30ae940ea.js → 46071e59290bf06bb614.js} +1 -1
  20. package/assets/esri/core/workers/chunks/46d91cd99558304da0c7.js +1 -0
  21. package/assets/esri/core/workers/chunks/4cf72dcccf2be353a701.js +1 -0
  22. package/assets/esri/core/workers/chunks/{e3a742dc0c291b47ba56.js → 510c2eb78f5e12f77bbc.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{98d1efb6f2439c6344cf.js → 5b2d1c8763a1716677c0.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5bf7de2e2faa55e53629.js +1 -0
  25. package/assets/esri/core/workers/chunks/{042614bf65b7d63025cb.js → 5f49233d5b67a9ad71d7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/604433b02a165d187953.js +1 -0
  27. package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +1 -0
  28. package/assets/esri/core/workers/chunks/{094eb9677cdebfaa9e1b.js → 648d5cdfc3e92be3db55.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{bc6fdd9faf8ed54be0cb.js → 6694e2b27fd6ddf44e21.js} +1 -1
  30. package/assets/esri/core/workers/chunks/70268d790c2f1cb83d43.js +1 -0
  31. package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +1 -0
  32. package/assets/esri/core/workers/chunks/8102f0bf5707c3be3310.js +1 -0
  33. package/assets/esri/core/workers/chunks/{d56fdf5ce5ff53dc0e69.js → 84495695313b01832369.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{31640b41e0ecdff892fa.js → 85b63811ae7bcb6f74b6.js} +2 -2
  35. package/assets/esri/core/workers/chunks/{c4bbe4707e90b7cd0379.js → 8ac4a043a4f185db271f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/8d01dd92f5c897193ab5.js +1 -0
  37. package/assets/esri/core/workers/chunks/900c8569596609183f19.js +2 -0
  38. package/assets/esri/core/workers/chunks/{d1d6154b4af1c9cc497b.js → 934e1f2153e6fad6ed23.js} +1 -1
  39. package/assets/esri/core/workers/chunks/95c9c5677bbe7fd0420a.js +1 -0
  40. package/assets/esri/core/workers/chunks/{b70885deebc6106597ad.js → 983b85727e09c54bede0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{d20dcd4ce4b0111d924f.js → 9bbc8e5d42921a8050bb.js} +1 -1
  42. package/assets/esri/core/workers/chunks/a07070de96e143a329a4.js +1 -0
  43. package/assets/esri/core/workers/chunks/a17fb26d6ac4895e51a3.js +2 -0
  44. package/assets/esri/core/workers/chunks/{0d52e1b6d38f2670658c.js → a6f74bd1a9c87b9836ca.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{a85cdafbaf1848bb924b.js → a846c94d49df8d4cd5be.js} +1 -1
  46. package/assets/esri/core/workers/chunks/aa4f12fcb9f4ed3dba18.js +1 -0
  47. package/assets/esri/core/workers/chunks/ac10c7d2c4829a150037.js +1 -0
  48. package/assets/esri/core/workers/chunks/{509a74e9334f31b931d4.js → b54ba2bd6b1b90dcc0cc.js} +1 -1
  49. package/assets/esri/core/workers/chunks/bde8f3b3ce5b1d3ee774.js +1 -0
  50. package/assets/esri/core/workers/chunks/c25ae83fd790f181bb42.js +1 -0
  51. package/assets/esri/core/workers/chunks/{dc51dcaa4e2f9a90f5bd.js → c2cbe0f5e8958cf18e58.js} +2 -2
  52. package/assets/esri/core/workers/chunks/c4c55d8a98ba3f51f63c.js +1 -0
  53. package/assets/esri/core/workers/chunks/c5bf19da62a3d31009fe.js +2 -0
  54. package/assets/esri/core/workers/chunks/{2226c20c38e20713bcb5.js.LICENSE.txt → c5bf19da62a3d31009fe.js.LICENSE.txt} +1 -1
  55. package/assets/esri/core/workers/chunks/{2a2a4650dd9b953d317c.js → c93343a91161c4e40c28.js} +1 -1
  56. package/assets/esri/core/workers/chunks/cb4c5544382eb8c4a87f.js +1 -0
  57. package/assets/esri/core/workers/chunks/{2d83ba260dd6bbe38206.js → d05665ddc8d31403aed3.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d24dea0bdb17db07e2b3.js +1 -0
  59. package/assets/esri/core/workers/chunks/d3412518a7b518860fbb.js +1 -0
  60. package/assets/esri/core/workers/chunks/d4bc6d65dff5d0cc93ba.js +1 -0
  61. package/assets/esri/core/workers/chunks/{3048e74e6246324ce6fc.js → d5916500514a41a4758f.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{aea44253c80493ef5755.js → e7b168ba31142c00f765.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{a504a5e06cb89a620799.js → ec8b7476eac4718eb0ac.js} +1 -1
  64. package/assets/esri/core/workers/chunks/f497968055af459c5da4.js +1 -0
  65. package/assets/esri/core/workers/chunks/{d53cc574a21031436c45.js → f79494829a5b65b5b4c9.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{26261b21d1edf476ea49.js → f7ec3b7f2eccd9c4c2e5.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{20ee2f36f0fd0ae01e15.js → f88cbf9b1d1d7400c060.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{bf4d913e523eae2fda28.js → fa7b189e9b2cc8d4a77f.js} +1 -1
  69. package/assets/esri/core/workers/chunks/fcb4707c2e95099b9f30.js +1 -0
  70. package/assets/esri/core/workers/chunks/{735c1dffc3439bdba3cc.js → fd172c96d2b36032a1d9.js} +1 -1
  71. package/config.js +1 -1
  72. package/core/workers.d.ts +1 -0
  73. package/kernel.js +1 -1
  74. package/layers/CSVLayer.js +1 -1
  75. package/layers/SceneLayer.js +1 -1
  76. package/layers/graphics/sources/CSVSource.js +1 -1
  77. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  78. package/layers/graphics/sources/MemorySource.js +2 -2
  79. package/layers/graphics/sources/support/QueryTask.js +1 -1
  80. package/layers/graphics/sources/support/timeQueryUtils.js +2 -0
  81. package/layers/mixins/ArcGISImageService.js +1 -1
  82. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  83. package/layers/support/TimeInformation.js +1 -1
  84. package/layers/support/timeInfoUtils.js +2 -0
  85. package/package.json +4 -4
  86. package/rest/query/executeAttributeBinsQuery.js +1 -1
  87. package/rest/query/executeForExtent.js +1 -1
  88. package/rest/query/executeForTopCount.js +1 -1
  89. package/rest/query/executeForTopExtents.js +1 -1
  90. package/rest/query/executeForTopIds.js +1 -1
  91. package/rest/query/executeTopFeaturesQuery.js +1 -1
  92. package/rest/query/operations/query.js +1 -1
  93. package/rest/query/operations/queryAttributeBins.js +1 -1
  94. package/rest/query/operations/queryTopFeatures.js +1 -1
  95. package/rest/support/timeUtils.js +1 -1
  96. package/symbols/TextSymbol.d.ts +0 -1
  97. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  98. package/views/3d/environment/SunLighting.d.ts +10 -8
  99. package/views/3d/environment/VirtualLighting.d.ts +10 -8
  100. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  101. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  102. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  103. package/widgets/OrientedImageryViewer.js +2 -2
  104. package/assets/esri/core/workers/chunks/20a698709c3c11ff2c16.js +0 -1
  105. package/assets/esri/core/workers/chunks/2226c20c38e20713bcb5.js +0 -2
  106. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  107. package/assets/esri/core/workers/chunks/2b6684d057d9ad17ac13.js +0 -1
  108. package/assets/esri/core/workers/chunks/2e66c969bf4209c957b5.js +0 -2
  109. package/assets/esri/core/workers/chunks/377595b23379b0c8fe95.js +0 -1
  110. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +0 -1
  111. package/assets/esri/core/workers/chunks/38d852676677e5697864.js +0 -1
  112. package/assets/esri/core/workers/chunks/3c881b1adc8a5dea9a90.js +0 -1
  113. package/assets/esri/core/workers/chunks/4e6656a5f29e31902fca.js +0 -2
  114. package/assets/esri/core/workers/chunks/50e8943d2c0b96fab2c1.js +0 -1
  115. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +0 -1
  116. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +0 -1
  117. package/assets/esri/core/workers/chunks/60c79934799927114074.js +0 -1
  118. package/assets/esri/core/workers/chunks/63b5418a1c3fe0a97a86.js +0 -1
  119. package/assets/esri/core/workers/chunks/6ddc29a144640acb1192.js +0 -1
  120. package/assets/esri/core/workers/chunks/6f73e41e14817acfaead.js +0 -1
  121. package/assets/esri/core/workers/chunks/7dfbc31f3b56728485a4.js +0 -1
  122. package/assets/esri/core/workers/chunks/822f83d7c09ef0a9bbdf.js +0 -1
  123. package/assets/esri/core/workers/chunks/844eedda8f749972f707.js +0 -2
  124. package/assets/esri/core/workers/chunks/8b8118ab56cc808b5a71.js +0 -1
  125. package/assets/esri/core/workers/chunks/8d86b0cb0e004ad72040.js +0 -1
  126. package/assets/esri/core/workers/chunks/98760040f0c9d47c718d.js +0 -1
  127. package/assets/esri/core/workers/chunks/a2f0894218e665780a21.js +0 -1
  128. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +0 -1
  129. package/assets/esri/core/workers/chunks/ab6506a3c16f8717fc00.js +0 -1
  130. package/assets/esri/core/workers/chunks/c45edd0a7d57263bb7d6.js +0 -1
  131. package/assets/esri/core/workers/chunks/c52466eb1f3c33ae1f5a.js +0 -1
  132. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +0 -1
  133. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +0 -1
  134. package/assets/esri/core/workers/chunks/c80a3b039e510c118399.js +0 -1
  135. package/assets/esri/core/workers/chunks/c88a70f68c8ce8c30e9b.js +0 -1
  136. package/assets/esri/core/workers/chunks/cf1ec61eb2ad147bb931.js +0 -1
  137. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +0 -1
  138. package/assets/esri/core/workers/chunks/e9cdb0b0f074583edebd.js +0 -1
  139. package/assets/esri/core/workers/chunks/f5cc78291b53931b91e8.js +0 -1
  140. /package/assets/esri/core/workers/chunks/{844eedda8f749972f707.js.LICENSE.txt → 2b4dd42920d37b1ff0a9.js.LICENSE.txt} +0 -0
  141. /package/assets/esri/core/workers/chunks/{2cb209bc51a19487692d.js.LICENSE.txt → 43aef67452fa6ff8d8f9.js.LICENSE.txt} +0 -0
  142. /package/assets/esri/core/workers/chunks/{31640b41e0ecdff892fa.js.LICENSE.txt → 85b63811ae7bcb6f74b6.js.LICENSE.txt} +0 -0
  143. /package/assets/esri/core/workers/chunks/{4e6656a5f29e31902fca.js.LICENSE.txt → 900c8569596609183f19.js.LICENSE.txt} +0 -0
  144. /package/assets/esri/core/workers/chunks/{2e66c969bf4209c957b5.js.LICENSE.txt → a17fb26d6ac4895e51a3.js.LICENSE.txt} +0 -0
  145. /package/assets/esri/core/workers/chunks/{dc51dcaa4e2f9a90f5bd.js.LICENSE.txt → c2cbe0f5e8958cf18e58.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,4549,7340],{46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,n]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!n?.match||!s.test(n)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(n,10),t)}}},9352(e,t,r){r.r(t),r.d(t,{default:()=>H});var i=r(32198),o=r(49186),n=r(93637),s=r(91429),l=r(16930),a=r(41910),p=r(55156),u=r(60950),d=r(89808),c=r(99959);const y=Symbol("isOrientedImageryGraphicOrigin");var g;class f extends c.A{get[(g=y,u.ym)](){return this.layer}get[p.e](){return this.layer}get[d.Q](){return this.layer}get[a.e7](){return this.layer}constructor(e){super(),this[g]=!0,this.type="oriented-imagery",this.layer=e}get id(){return this.layer.id}}var m=r(18589),h=r(66552),v=(r(86211),r(28735),r(69540)),w=r(25482),C=r(69622),b=r(21325);let M=class extends C.A{set horizontalWKID(e){e?(0,b.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,b.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){let{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1&&!Number.isNaN(t)&&r?.length>1&&i?.length>1&&o?.length>1}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"horizontalWKID",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"verticalWKID",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"z",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"type",void 0),M=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientation")],M);const x=M;let S=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=1}toString(){let{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:l,roll:a,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,g=[e,t,r,i,o,n,s,l,a];return this.isAdvanced&&(p?.forEach(e=>g.push(e)),g.push(u),d?.forEach(e=>g.push(e)),c?.forEach(e=>g.push(e)),y?.forEach(e=>g.push(e))),g.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],S.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"heading",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"pitch",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"roll",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"z",void 0),S=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],S);const j=S;let Z=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=4}toString(){let{type:e,latitude:t,longitude:r,ellipsoidRadius:i,squaredEccentricity:o,properties:n}=this,s=`${n}`.split("|");return s.splice(1,1),`${e}|${t}|${r}|${i}|${o}|${s.join("|")}`}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],Z.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"latitude",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"longitude",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"ellipsoidRadius",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"squaredEccentricity",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],Z.prototype,"properties",void 0),Z=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],Z);const P=Z;let O=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=2}toString(){let{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:l,kappa:a,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,g=[e,t,r,i,o,n,s,l,a];return this.isAdvanced&&(p?.forEach(e=>g.push(e)),g.push(u),d?.forEach(e=>g.push(e)),c?.forEach(e=>g.push(e)),y?.forEach(e=>g.push(e))),g.map(e=>isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],O.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"omega",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"phi",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"kappa",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"z",void 0),O=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],O);const I=O;let N=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=3}get isAdvanced(){let{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){let{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:l,roll:a,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,g=[e,t,r,i,o,n,s,l,a];return this.isAdvanced&&(p?.forEach(e=>g.push(e)),g.push(u),d?.forEach(e=>g.push(e)),d?.forEach(e=>g.push(e)),c?.forEach(e=>g.push(e)),y?.forEach(e=>g.push(e))),g.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],N.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"yaw",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"pitch",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"roll",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"z",void 0),N=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],N);const E=N,L=new Map;L.set("2",{desc:"Using Omega Phi Kappa",constructor:I}),L.set("1",{desc:"Using Heading, Pitch and Roll",constructor:j}),L.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:E}),L.set("4",{desc:"Using Local Tangent Plane",constructor:P});let D=class extends((0,v.OU)(w.o)){constructor(){super(...arguments),this.url=null}};(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],D.prototype,"lod",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],D.prototype,"rasterFunction",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],D.prototype,"url",void 0),D=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],D);let A=class extends((0,v.OU)(w.o)){constructor(e){super(e),this.constantElevation=null}};(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],A.prototype,"constantElevation",void 0),A=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],A);const F=new h.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),T=new h.J({Feet:"feet",Meter:"meter"}),R=new h.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),z=new Map;z.set("1",function(e){let[t,r,i,o,n,s,l,a,p,u,d,c,y,g,f,m,h,v,w,C,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:l,roll:a,..._([p,u,d,c,y,g],[m,h],[v,w,C],[b,M],f)}}),z.set("3",function(e){let[t,r,i,o,n,s,l,a,p,u,d,c,y,g,f,m,h,v,w,C,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:l,roll:a,..._([p,u,d,c,y,g],[m,h],[v,w,C],[b,M],f)}}),z.set("2",function(e){let[t,r,i,o,n,s,l,a,p,u,d,c,y,g,f,m,h,v,w,C,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:l,kappa:a,..._([p,u,d,c,y,g],[m,h],[v,w,C],[b,M],f)}}),z.set("4",function(e){let[t,r,i,o,n,...s]=e.slice(1),l=z.get(n),a=L.get(n)?.constructor;return l&&a?{latitude:t,longitude:r,ellipsoidRadius:i,squaredEccentricity:o,properties:new a(l([n,"",...s]))}:null});const K=e=>{let t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function _(e,t,r,i,o){let n=K(e),s=K(t),l=K(r),a=K(i);return{affineTransformations:6===n?.length?n:void 0,focalLength:6===n?.length?parseFloat(o):void 0,principalOffsetPoint:2===s?.length?s:[0,0],radialDistortionCoefficients:3===l?.length?l:[0,0,0],tangentialDistortionCoefficients:2===a?.length?a:[0,0]}}var $=r(20437),q=r(43440),G=r(79677);const U=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","sequenceOrderFields","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),B=new Set(["elevationSource"]),W=(e,t)=>!U.has(t)&&e;function V(e,t,r,i){let{name:o,write:n,read:s}=((e,t,r)=>{let i=`orientedImageryProperties.${e}`,o={allowNull:B.has(e),ignoreOrigin:!0};return{name:i,write:t?{...o,target:i,writer:t}:o,read:r?{ignoreOrigin:!0,source:i,reader:r}:{ignoreOrigin:!0}}})(e,t,r),l={name:o,write:n,read:s,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:r},"web-scene":{name:o,write:W(n,e),read:W(s,e)},"web-map":{name:o,write:n,read:s}}};return i&&l.origins?(l.type=i,l.origins["web-map"].type=i,l.origins["web-scene"].type=i,l):l}let J=class extends m.default{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new f(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.sequenceOrderFields=[],this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.imageAccessPaths=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){let{elevationSource:e,demPathPrefix:t,demPathSuffix:r}=this;return function(e,t,r){return e&&((e=>null!=e&&"number"==typeof e.constantElevation)(e)?new A(e):function(e,t,r){let{url:i}=e;return i?(i=function(e,t,r){return t&&(e=`${t}${e}`),r&&(e+=`${r}`),e}(i,t,r),new D({...e,url:i})):null}(e,t,r))}(e,t,r)}get effectiveSequenceOrderField(){let{sequenceOrderField:e,fields:t,sequenceOrderFields:r}=this;return function(e,t,r){let i=function(e,t){return e?.length?e.map(({field:e,order:r})=>{let i=t.find(t=>t.name.toLowerCase()===e.toLowerCase());return i?{fieldName:i.name,sortOrder:"desc"===r?.toLowerCase()?"desc":"asc"}:null}).filter(e=>null!=e):null}(r,t);if(i?.length)return i;if(!e){let e=t.find(e=>e.name.toLocaleLowerCase()==="sequenceorder".toLocaleLowerCase());return e?[{fieldName:e.name,sortOrder:"asc"}]:null}let o=t.find(t=>t.name.toLowerCase()===e.trim().toLowerCase());return o?[{fieldName:o.name,sortOrder:"asc"}]:null}(e,t,r)}get fieldConfigurations(){return super.fieldConfigurations}set fieldConfigurations(e){super.fieldConfigurations=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.A("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};(0,i.Cg)([(0,s.MZ)({type:q.A,json:{write:!1,read:!1}})],J.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraHeading")})],J.prototype,"cameraHeading",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraHeight")})],J.prototype,"cameraHeight",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraPitch")})],J.prototype,"cameraPitch",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraRoll")})],J.prototype,"cameraRoll",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("coveragePercent")})],J.prototype,"coveragePercent",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("demPathPrefix")})],J.prototype,"demPathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("demPathSuffix")})],J.prototype,"demPathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("depthImagePathPrefix")})],J.prototype,"depthImagePathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("depthImagePathSuffix")})],J.prototype,"depthImagePathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:Object,json:V("elevationSource")})],J.prototype,"elevationSource",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"effectiveElevationSource",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"effectiveSequenceOrderField",null),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("farDistance")})],J.prototype,"farDistance",void 0),(0,i.Cg)([(0,s.MZ)({type:[$.A]})],J.prototype,"fields",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"geometryType",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,clonable:!1})],J.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("horizontalFieldOfView")})],J.prototype,"horizontalFieldOfView",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("horizontalMeasurementUnit")})],J.prototype,"horizontalMeasurementUnit",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("imageGeometryField"),default:"ImageGeometry"}})],J.prototype,"imageGeometryField",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("imagePathPrefix")})],J.prototype,"imagePathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("imagePathSuffix")})],J.prototype,"imagePathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("imageReferenceField"),default:"OIObjectID"}})],J.prototype,"imageReferenceField",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("imageRotation")})],J.prototype,"imageRotation",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("maximumDistance")})],J.prototype,"maximumDistance",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("nearDistance")})],J.prototype,"nearDistance",void 0),(0,i.Cg)([(0,s.MZ)({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],J.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,s.MZ)({json:{...V("orientationAccuracy",(e,t,r)=>{(0,n.sM)(r,e.join(";"),t)},e=>function(e){if("string"!=typeof e)return null;let t=e.split(";");return t.some(e=>!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(e.trim()))?null:function(e){return function(e){if(!Array.isArray(e)||e.length<=5)return!1;for(let t of e)if("number"!=typeof t||!Number.isFinite(t)||t<0)return!1;return!0}(e)?function(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}(e):null}(t.map(e=>Number(e.trim())))}(e)??[0,0,0,0,0,0,0,0],String)}})],J.prototype,"orientationAccuracy",void 0),(0,i.Cg)([(0,s.MZ)({json:{...V("orientedImageryType",R.write,R.read,R.jsonValues.slice(1))}})],J.prototype,"orientedImageryType",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("referenceIDField"),default:"OBJECTID"}})],J.prototype,"referenceIDField",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("sequenceOrderField"),default:"SequenceOrder"}})],J.prototype,"sequenceOrderField",void 0),(0,i.Cg)([(0,s.MZ)({json:{...V("sequenceOrderFields",function(e,t,r){e?.length&&(0,n.sM)(r,e,t)}),default:[]}})],J.prototype,"sequenceOrderFields",void 0),(0,i.Cg)([(0,s.MZ)({type:l.A})],J.prototype,"spatialReference",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"subtypeField",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"subtypes",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],J.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:F.apiValues,json:{...V("timeIntervalUnit",F.write,F.read,F.jsonValues)}})],J.prototype,"timeIntervalUnit",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("verticalFieldOfView")})],J.prototype,"verticalFieldOfView",void 0),(0,i.Cg)([(0,s.MZ)({type:T.apiValues,json:{...V("verticalMeasurementUnit",T.write,T.read,T.jsonValues)}})],J.prototype,"verticalMeasurementUnit",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("verticalSearchRange")})],J.prototype,"verticalSearchRange",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("videoPathPrefix")})],J.prototype,"videoPathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("videoPathSuffix")})],J.prototype,"videoPathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],J.prototype,"virtualCacheDirectory",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],J.prototype,"dataStoreID",void 0),(0,i.Cg)([(0,s.MZ)({type:Object,readOnly:!0,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.imageAccessPaths",read:!0}}}})],J.prototype,"imageAccessPaths",void 0),(0,i.Cg)([(0,s.MZ)({type:G.A,json:{origins:{"web-scene":{write:!1,read:!1}}}})],J.prototype,"visibilityTimeExtent",void 0),J=(0,i.Cg)([(0,s.$K)("esri.layers.OrientedImageryLayer")],J);const H=J},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),o=r(93637),n=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new s.A;return o.read(i,r),[o]}const a={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},29005(e,t,r){r.d(t,{A:()=>p});var i=r(32198),o=r(69540),n=r(66552),s=r(25482),l=r(91429);const a=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],p)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),o=r(69540),n=r(25482),s=r(91429),l=r(8631),a=r(29005),p=r(36005),u=r(43937);let d=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,p.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},46499(e,t,r){r.d(t,{A:()=>S});var i,o,n=r(32198),s=(r(44208),r(66552)),l=r(25482),a=r(4718),p=r(90629),u=r(91429),d=r(90360),c=r(73913),y=r(32730),g=r(77548),f=r(59868),m=r(73838),h=r(33910),v=r(36005),w=r(43937);const C=new s.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function b(e,t,r){return{enabled:!(0,g.TU)(r?.layer)}}function M(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let S=class extends l.o{static{i=y.vK}static{o=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),o=i[3],n=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&n;case"OR":return e||n}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=f.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&M(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"name",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:b}}}}})],S.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:b}}}}})],S.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],S.prototype,"labelExpression",void 0),(0,n.Cg)([(0,v.w)("labelExpression")],S.prototype,"readLabelExpression",null),(0,n.Cg)([(0,w.K)("labelExpression")],S.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,u.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return M(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],S.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,w.K)("labelExpressionInfo")],S.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:C.apiValues,json:{type:C.jsonValues,read:C.read,write:C.write}})],S.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],S.prototype,"offsetDistance",void 0),(0,n.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],S.prototype,"labelPosition",void 0),(0,n.Cg)([(0,u.MZ)({type:Number})],S.prototype,"maxScale",void 0),(0,n.Cg)([(0,w.K)("maxScale")],S.prototype,"writeMaxScale",null),(0,n.Cg)([(0,u.MZ)({type:Number})],S.prototype,"minScale",void 0),(0,n.Cg)([(0,w.K)("minScale")],S.prototype,"writeMinScale",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:b}}}}})],S.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:b}}}}})],S.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,u.MZ)({types:h.em,json:{types:h.em,origins:{"portal-item":{types:h.em,read:{reader:(0,d.C)({types:h.em})},default:null},"web-scene":{types:h.Rv,read:{reader:(0,d.C)({types:h.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],S.prototype,"symbol",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=o=(0,n.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],S)},73913(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),n=r(25482),s=r(91429),l=r(32730),a=r(36005),p=r(43937);let u=class extends n.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,a.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,o.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,o.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,o.Cg)([(0,s.$K)("esri.layers.support.LabelExpressionInfo")],u)},91880(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),n=r(66552),s=r(25482),l=r(91429);const a=new n.J({asc:"ascending",desc:"descending"});let p=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],p.prototype,"order",void 0),p=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],p)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>n});var i=r(34727),o=r(39516);function n(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){let n=function(e){if("manual"===p(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],u(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(n&&((0,i.gg)(t,n[0])||(0,i.ZH)(r,n[1])))return"";let s=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let o=u(e.at(0)?.minScale),n=d(e.at(-1)?.maxScale);if((0,i.ZH)(o,t)||(0,i.gg)(n,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],o=e[t+1];if((0,i.ZH)(u(o.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,o.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===p(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,o){return e=u(e),r=u(r),t=d(t),!(!(0,i.Sp)(r,e)&&(o??r)>e||(0,i.Hx)(t,r)||void 0!==o&&(0,i.Sp)(o,e))}function p(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||1/0}function d(e){return e||0}},39383(e,t,r){r.d(t,{w:()=>a,z:()=>d});var i=r(49186),o=r(53966),n=r(46499);const s=()=>o.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{let i=new n.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let o of e){let e=o.labelPlacement,n=u[t];if(!o.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!n)return s().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(o);else{let i=n[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=o.clone();l.labelPlacement=i,r.push(l)}}return r}},73681(e,t,r){r.d(t,{n:()=>a});var i=r(49186),o=r(53966),n=r(46140),s=r(95466),l=r(55674);class a{static async from(e,t,r){let s=e.dictionary_version?n.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let c=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))c.delete(e);c.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});let y=await(0,l.xR)(e.expression,null,d);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let g=!s||!s.greaterEqual(4,0);g&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});let f=new p(r,g);return new a(g,u,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class p extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>v});var i,o=r(32198),n=r(52106),s=r(66552),l=r(25482),a=r(4718),p=r(91429),u=r(16930),d=r(60408),c=r(65864),y=r(50498),g=r(20437),f=r(36005),m=r(43937);const h=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void h.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void h.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[n,s]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let p=this._getHydrationFunction(e,e=>e*n+i,e=>o-e*s,l,a);for(let{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let n=e[t],s=r.fromJSON(n),l=n.geometry?.spatialReference;null!=s.geometry&&!l&&(s.geometry.spatialReference=i);let a=n.aggregateGeometries,p=s.aggregateGeometries;if(a&&null!=p)for(let e in p){let t=p[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(s)}return o}_quantizePoints(e,t,r){let i,o,n=[];for(let s=0,l=e.length;s<l;s++){let l=e[s];if(s>0){let e=t(l[0]),s=r(l[1]);(e!==i||s!==o)&&(n.push([e-i,s-o]),i=e,o=s)}else i=t(l[0]),o=r(l[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){let n=i[e],s=this._quantizePoints(n,t,r);s&&o.push(s)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,s,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(n+=o[0],s+=o[1]):(n=o[0],s=o[1]),o[0]=t(n),o[1]=r(s)}}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let n,s,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(n+=i[0],s+=i[1]):(n=i[0],s=i[1]),i[0]=t(n),i[1]=r(s)}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o.Cg)([(0,f.w)("features")],v.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:h.read}}})],v.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,f.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,4506,8747],{46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,n]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!n?.match||!s.test(n)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(n,10),t)}}},9352(e,t,r){r.r(t),r.d(t,{default:()=>H});var i=r(32198),o=r(49186),n=r(93637),s=r(91429),l=r(16930),a=r(41910),p=r(55156),u=r(60950),d=r(89808),c=r(99959);const y=Symbol("isOrientedImageryGraphicOrigin");var g;class f extends c.A{get[(g=y,u.ym)](){return this.layer}get[p.e](){return this.layer}get[d.Q](){return this.layer}get[a.e7](){return this.layer}constructor(e){super(),this[g]=!0,this.type="oriented-imagery",this.layer=e}get id(){return this.layer.id}}var m=r(18589),h=r(66552),v=(r(86211),r(28735),r(69540)),w=r(25482),C=r(69622),b=r(21325);let M=class extends C.A{set horizontalWKID(e){e?(0,b.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,b.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){let{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1&&!Number.isNaN(t)&&r?.length>1&&i?.length>1&&o?.length>1}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"horizontalWKID",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"verticalWKID",null),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"z",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],M.prototype,"type",void 0),M=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientation")],M);const x=M;let S=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=1}toString(){let{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:l,roll:a,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,g=[e,t,r,i,o,n,s,l,a];return this.isAdvanced&&(p?.forEach(e=>g.push(e)),g.push(u),d?.forEach(e=>g.push(e)),c?.forEach(e=>g.push(e)),y?.forEach(e=>g.push(e))),g.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],S.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],S.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"heading",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"pitch",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"roll",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],S.prototype,"z",void 0),S=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],S);const j=S;let Z=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=4}toString(){let{type:e,latitude:t,longitude:r,ellipsoidRadius:i,squaredEccentricity:o,properties:n}=this,s=`${n}`.split("|");return s.splice(1,1),`${e}|${t}|${r}|${i}|${o}|${s.join("|")}`}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],Z.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"latitude",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"longitude",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"ellipsoidRadius",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0},type:Number})],Z.prototype,"squaredEccentricity",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],Z.prototype,"properties",void 0),Z=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],Z);const P=Z;let O=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=2}toString(){let{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:l,kappa:a,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,g=[e,t,r,i,o,n,s,l,a];return this.isAdvanced&&(p?.forEach(e=>g.push(e)),g.push(u),d?.forEach(e=>g.push(e)),c?.forEach(e=>g.push(e)),y?.forEach(e=>g.push(e))),g.map(e=>isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],O.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],O.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"omega",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"phi",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"kappa",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],O.prototype,"z",void 0),O=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],O);const I=O;let N=class extends((0,v.OU)((0,w.T)(x))){constructor(){super(...arguments),this.type=3}get isAdvanced(){let{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){let{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:l,roll:a,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,g=[e,t,r,i,o,n,s,l,a];return this.isAdvanced&&(p?.forEach(e=>g.push(e)),g.push(u),d?.forEach(e=>g.push(e)),d?.forEach(e=>g.push(e)),c?.forEach(e=>g.push(e)),y?.forEach(e=>g.push(e))),g.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],N.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"focalLength",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],N.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"yaw",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"pitch",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"roll",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"x",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"y",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],N.prototype,"z",void 0),N=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],N);const E=N,L=new Map;L.set("2",{desc:"Using Omega Phi Kappa",constructor:I}),L.set("1",{desc:"Using Heading, Pitch and Roll",constructor:j}),L.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:E}),L.set("4",{desc:"Using Local Tangent Plane",constructor:P});let A=class extends((0,v.OU)(w.o)){constructor(){super(...arguments),this.url=null}};(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],A.prototype,"lod",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"rasterFunction",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"url",void 0),A=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],A);let D=class extends((0,v.OU)(w.o)){constructor(e){super(e),this.constantElevation=null}};(0,i.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],D.prototype,"constantElevation",void 0),D=(0,i.Cg)([(0,s.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],D);const T=new h.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),F=new h.J({Feet:"feet",Meter:"meter"}),R=new h.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),z=new Map;z.set("1",function(e){let[t,r,i,o,n,s,l,a,p,u,d,c,y,g,f,m,h,v,w,C,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:l,roll:a,...K([p,u,d,c,y,g],[m,h],[v,w,C],[b,M],f)}}),z.set("3",function(e){let[t,r,i,o,n,s,l,a,p,u,d,c,y,g,f,m,h,v,w,C,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:l,roll:a,...K([p,u,d,c,y,g],[m,h],[v,w,C],[b,M],f)}}),z.set("2",function(e){let[t,r,i,o,n,s,l,a,p,u,d,c,y,g,f,m,h,v,w,C,b,M]=e.slice(1);return{horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:l,kappa:a,...K([p,u,d,c,y,g],[m,h],[v,w,C],[b,M],f)}}),z.set("4",function(e){let[t,r,i,o,n,...s]=e.slice(1),l=z.get(n),a=L.get(n)?.constructor;return l&&a?{latitude:t,longitude:r,ellipsoidRadius:i,squaredEccentricity:o,properties:new a(l([n,"",...s]))}:null});const $=e=>{let t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function K(e,t,r,i,o){let n=$(e),s=$(t),l=$(r),a=$(i);return{affineTransformations:6===n?.length?n:void 0,focalLength:6===n?.length?parseFloat(o):void 0,principalOffsetPoint:2===s?.length?s:[0,0],radialDistortionCoefficients:3===l?.length?l:[0,0,0],tangentialDistortionCoefficients:2===a?.length?a:[0,0]}}var _=r(20437),q=r(43440),G=r(79677);const U=new Set(["demPathPrefix","demPathSuffix","depthImagePathPrefix","depthImagePathSuffix","elevationSource","horizontalMeasurementUnit","imageGeometryField","imageReferenceField","referenceIDField","sequenceOrderField","sequenceOrderFields","verticalMeasurementUnit","videoPathPrefix","videoPathSuffix","timeAnimation","visibilityTimeExtent"]),B=new Set(["elevationSource"]),W=(e,t)=>!U.has(t)&&e;function V(e,t,r,i){let{name:o,write:n,read:s}=((e,t,r)=>{let i=`orientedImageryProperties.${e}`,o={allowNull:B.has(e),ignoreOrigin:!0};return{name:i,write:t?{...o,target:i,writer:t}:o,read:r?{ignoreOrigin:!0,source:i,reader:r}:{ignoreOrigin:!0}}})(e,t,r),l={name:o,write:n,read:s,origins:{service:{name:`orientedImageryInfo.${o}`,write:t,read:r},"web-scene":{name:o,write:W(n,e),read:W(s,e)},"web-map":{name:o,write:n,read:s}}};return i&&l.origins?(l.type=i,l.origins["web-map"].type=i,l.origins["web-scene"].type=i,l):l}let J=class extends m.default{constructor(e){super(e),this.attributeTableTemplate=null,this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.graphicOrigin=new f(this),this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imageGeometryField="ImageGeometry",this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageReferenceField="OIObjectID",this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.referenceIDField="OBJECTID",this.sequenceOrderField="SequenceOrder",this.sequenceOrderFields=[],this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Oriented Imagery Layer"]),this.type="oriented-imagery",this.timeIntervalUnit="days",this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.verticalSearchRange=null,this.videoPathPrefix=null,this.videoPathSuffix=null,this.virtualCacheDirectory=null,this.dataStoreID=null,this.imageAccessPaths=null,this.visibilityTimeExtent=null}get effectiveElevationSource(){let{elevationSource:e,demPathPrefix:t,demPathSuffix:r}=this;return function(e,t,r){return e&&((e=>null!=e&&"number"==typeof e.constantElevation)(e)?new D(e):function(e,t,r){let{url:i}=e;return i?(i=function(e,t,r){return t&&(e=`${t}${e}`),r&&(e+=`${r}`),e}(i,t,r),new A({...e,url:i})):null}(e,t,r))}(e,t,r)}get effectiveSequenceOrderField(){let{sequenceOrderField:e,fields:t,sequenceOrderFields:r}=this;return function(e,t,r){let i=function(e,t){return e?.length?e.map(({field:e,order:r})=>{let i=t.find(t=>t.name.toLowerCase()===e.toLowerCase());return i?{fieldName:i.name,sortOrder:"desc"===r?.toLowerCase()?"desc":"asc"}:null}).filter(e=>null!=e):null}(r,t);if(i?.length)return i;if(!e){let e=t.find(e=>e.name.toLocaleLowerCase()==="sequenceorder".toLocaleLowerCase());return e?[{fieldName:e.name,sortOrder:"asc"}]:null}let o=t.find(t=>t.name.toLowerCase()===e.trim().toLowerCase());return o?[{fieldName:o.name,sortOrder:"asc"}]:null}(e,t,r)}get fieldConfigurations(){return super.fieldConfigurations}set fieldConfigurations(e){super.fieldConfigurations=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}findFirstValidLayerId(e){return e.layers?.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.A("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};(0,i.Cg)([(0,s.MZ)({type:q.A,json:{write:!1,read:!1}})],J.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraHeading")})],J.prototype,"cameraHeading",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraHeight")})],J.prototype,"cameraHeight",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraPitch")})],J.prototype,"cameraPitch",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("cameraRoll")})],J.prototype,"cameraRoll",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("coveragePercent")})],J.prototype,"coveragePercent",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("demPathPrefix")})],J.prototype,"demPathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("demPathSuffix")})],J.prototype,"demPathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("depthImagePathPrefix")})],J.prototype,"depthImagePathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("depthImagePathSuffix")})],J.prototype,"depthImagePathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:Object,json:V("elevationSource")})],J.prototype,"elevationSource",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"effectiveElevationSource",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"effectiveSequenceOrderField",null),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("farDistance")})],J.prototype,"farDistance",void 0),(0,i.Cg)([(0,s.MZ)({type:[_.A]})],J.prototype,"fields",void 0),(0,i.Cg)([(0,s.MZ)()],J.prototype,"geometryType",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0,clonable:!1})],J.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("horizontalFieldOfView")})],J.prototype,"horizontalFieldOfView",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("horizontalMeasurementUnit")})],J.prototype,"horizontalMeasurementUnit",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("imageGeometryField"),default:"ImageGeometry"}})],J.prototype,"imageGeometryField",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("imagePathPrefix")})],J.prototype,"imagePathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("imagePathSuffix")})],J.prototype,"imagePathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("imageReferenceField"),default:"OIObjectID"}})],J.prototype,"imageReferenceField",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("imageRotation")})],J.prototype,"imageRotation",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("maximumDistance")})],J.prototype,"maximumDistance",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("nearDistance")})],J.prototype,"nearDistance",void 0),(0,i.Cg)([(0,s.MZ)({type:["OrientedImageryLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],J.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,s.MZ)({json:{...V("orientationAccuracy",(e,t,r)=>{(0,n.sM)(r,e.join(";"),t)},e=>function(e){if("string"!=typeof e)return null;let t=e.split(";");return t.some(e=>!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(e.trim()))?null:function(e){return function(e){if(!Array.isArray(e)||e.length<=5)return!1;for(let t of e)if("number"!=typeof t||!Number.isFinite(t)||t<0)return!1;return!0}(e)?function(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}(e):null}(t.map(e=>Number(e.trim())))}(e)??[0,0,0,0,0,0,0,0],String)}})],J.prototype,"orientationAccuracy",void 0),(0,i.Cg)([(0,s.MZ)({json:{...V("orientedImageryType",R.write,R.read,R.jsonValues.slice(1))}})],J.prototype,"orientedImageryType",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("referenceIDField"),default:"OBJECTID"}})],J.prototype,"referenceIDField",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{...V("sequenceOrderField"),default:"SequenceOrder"}})],J.prototype,"sequenceOrderField",void 0),(0,i.Cg)([(0,s.MZ)({json:{...V("sequenceOrderFields",function(e,t,r){e?.length&&(0,n.sM)(r,e,t)}),default:[]}})],J.prototype,"sequenceOrderFields",void 0),(0,i.Cg)([(0,s.MZ)({type:l.A})],J.prototype,"spatialReference",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"subtypeField",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],J.prototype,"subtypes",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],J.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:T.apiValues,json:{...V("timeIntervalUnit",T.write,T.read,T.jsonValues)}})],J.prototype,"timeIntervalUnit",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("verticalFieldOfView")})],J.prototype,"verticalFieldOfView",void 0),(0,i.Cg)([(0,s.MZ)({type:F.apiValues,json:{...V("verticalMeasurementUnit",F.write,F.read,F.jsonValues)}})],J.prototype,"verticalMeasurementUnit",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:V("verticalSearchRange")})],J.prototype,"verticalSearchRange",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("videoPathPrefix")})],J.prototype,"videoPathPrefix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:V("videoPathSuffix")})],J.prototype,"videoPathSuffix",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.orientedImageryProperties.virtualCacheDirectory",read:!0}}}})],J.prototype,"virtualCacheDirectory",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.dsid",read:!0}}}})],J.prototype,"dataStoreID",void 0),(0,i.Cg)([(0,s.MZ)({type:Object,readOnly:!0,json:{read:!1,write:!1,origins:{service:{name:"orientedImageryInfo.imageAccessPaths",read:!0}}}})],J.prototype,"imageAccessPaths",void 0),(0,i.Cg)([(0,s.MZ)({type:G.A,json:{origins:{"web-scene":{write:!1,read:!1}}}})],J.prototype,"visibilityTimeExtent",void 0),J=(0,i.Cg)([(0,s.$K)("esri.layers.OrientedImageryLayer")],J);const H=J},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),o=r(93637),n=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new s.A;return o.read(i,r),[o]}const a={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},29005(e,t,r){r.d(t,{A:()=>p});var i=r(32198),o=r(69540),n=r(66552),s=r(25482),l=r(91429);const a=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],p)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),o=r(69540),n=r(25482),s=r(91429),l=r(8631),a=r(29005),p=r(36005),u=r(43937);let d=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,p.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},46499(e,t,r){r.d(t,{A:()=>S});var i,o,n=r(32198),s=(r(44208),r(66552)),l=r(25482),a=r(4718),p=r(90629),u=r(91429),d=r(90360),c=r(73913),y=r(32730),g=r(77548),f=r(59868),m=r(73838),h=r(33910),v=r(36005),w=r(43937);const C=new s.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function b(e,t,r){return{enabled:!(0,g.TU)(r?.layer)}}function M(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let S=class extends l.o{static{i=y.vK}static{o=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),o=i[3],n=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&n;case"OR":return e||n}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=f.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&M(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"name",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:b}}}}})],S.prototype,"allowOverrun",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:b}}}}})],S.prototype,"deconflictionStrategy",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],S.prototype,"labelExpression",void 0),(0,n.Cg)([(0,v.w)("labelExpression")],S.prototype,"readLabelExpression",null),(0,n.Cg)([(0,w.K)("labelExpression")],S.prototype,"writeLabelExpression",null),(0,n.Cg)([(0,u.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return M(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],S.prototype,"labelExpressionInfo",void 0),(0,n.Cg)([(0,w.K)("labelExpressionInfo")],S.prototype,"writeLabelExpressionInfo",null),(0,n.Cg)([(0,u.MZ)({type:C.apiValues,json:{type:C.jsonValues,read:C.read,write:C.write}})],S.prototype,"labelPlacement",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],S.prototype,"offsetDistance",void 0),(0,n.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],S.prototype,"labelPosition",void 0),(0,n.Cg)([(0,u.MZ)({type:Number})],S.prototype,"maxScale",void 0),(0,n.Cg)([(0,w.K)("maxScale")],S.prototype,"writeMaxScale",null),(0,n.Cg)([(0,u.MZ)({type:Number})],S.prototype,"minScale",void 0),(0,n.Cg)([(0,w.K)("minScale")],S.prototype,"writeMinScale",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:b}}}}})],S.prototype,"repeatLabel",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:b}}}}})],S.prototype,"repeatLabelDistance",null),(0,n.Cg)([(0,u.MZ)({types:h.em,json:{types:h.em,origins:{"portal-item":{types:h.em,read:{reader:(0,d.C)({types:h.em})},default:null},"web-scene":{types:h.Rv,read:{reader:(0,d.C)({types:h.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],S.prototype,"symbol",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"useCodedValues",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=o=(0,n.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],S)},73913(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),n=r(25482),s=r(91429),l=r(32730),a=r(36005),p=r(43937);let u=class extends n.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,a.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,o.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,o.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,o.Cg)([(0,s.$K)("esri.layers.support.LabelExpressionInfo")],u)},91880(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),n=r(66552),s=r(25482),l=r(91429);const a=new n.J({asc:"ascending",desc:"descending"});let p=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],p.prototype,"order",void 0),p=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],p)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>n});var i=r(34727),o=r(39516);function n(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){let n=function(e){if("manual"===p(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],u(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(n&&((0,i.gg)(t,n[0])||(0,i.ZH)(r,n[1])))return"";let s=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let o=u(e.at(0)?.minScale),n=d(e.at(-1)?.maxScale);if((0,i.ZH)(o,t)||(0,i.gg)(n,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],o=e[t+1];if((0,i.ZH)(u(o.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,o.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===p(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,o){return e=u(e),r=u(r),t=d(t),!(!(0,i.Sp)(r,e)&&(o??r)>e||(0,i.Hx)(t,r)||void 0!==o&&(0,i.Sp)(o,e))}function p(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||1/0}function d(e){return e||0}},39383(e,t,r){r.d(t,{w:()=>a,z:()=>d});var i=r(49186),o=r(53966),n=r(46499);const s=()=>o.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{let i=new n.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let o of e){let e=o.labelPlacement,n=u[t];if(!o.symbol)return s().warn("No ILabelClass symbol specified."),[];if(!n)return s().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(n.includes(e))r.push(o);else{let i=n[0];e&&s().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=o.clone();l.labelPlacement=i,r.push(l)}}return r}},73681(e,t,r){r.d(t,{n:()=>a});var i=r(49186),o=r(53966),n=r(46140),s=r(95466),l=r(55674);class a{static async from(e,t,r){let s=e.dictionary_version?n.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let c=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))c.delete(e);c.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});let y=await(0,l.xR)(e.expression,null,d);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let g=!s||!s.greaterEqual(4,0);g&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});let f=new p(r,g);return new a(g,u,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class p extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>v});var i,o=r(32198),n=r(52106),s=r(66552),l=r(25482),a=r(4718),p=r(91429),u=r(16930),d=r(60408),c=r(65864),y=r(50498),g=r(20437),f=r(36005),m=r(43937);const h=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void h.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void h.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[n,s]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let p=this._getHydrationFunction(e,e=>e*n+i,e=>o-e*s,l,a);for(let{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let n=e[t],s=r.fromJSON(n),l=n.geometry?.spatialReference;null!=s.geometry&&!l&&(s.geometry.spatialReference=i);let a=n.aggregateGeometries,p=s.aggregateGeometries;if(a&&null!=p)for(let e in p){let t=p[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(s)}return o}_quantizePoints(e,t,r){let i,o,n=[];for(let s=0,l=e.length;s<l;s++){let l=e[s];if(s>0){let e=t(l[0]),s=r(l[1]);(e!==i||s!==o)&&(n.push([e-i,s-o]),i=e,o=s)}else i=t(l[0]),o=r(l[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){let n=i[e],s=this._quantizePoints(n,t,r);s&&o.push(s)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,s,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(n+=o[0],s+=o[1]):(n=o[0],s=o[1]),o[0]=t(n),o[1]=r(s)}}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let n,s,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(n+=i[0],s+=i[1]):(n=i[0],s=i[1]),i[0]=t(n),i[1]=r(s)}if(i&&o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(o)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o.Cg)([(0,f.w)("features")],v.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:h.read}}})],v.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,f.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},2991(e,t,r){r.d(t,{G9:()=>p,RZ:()=>a});var i=r(39516);const o="=",n=">=",s="<=";function l(e,t,r,o){let n=o.get(e)?.type,s=o.getTimeZone(e);return`${(0,i.iA)(e)} ${t} ${(0,i.YG)(r,{type:"date"},{type:n,timeZone:s})}`}function a(e,t,r,a){if(!t||!r)return;let{startField:p,endField:u}=t,{start:d,end:c}=e;if(!d&&!c||!p&&!u)return;let y=p??u,g=u??p;if(y&&g){if(d&&c){if(d.getTime()===c.getTime())return(0,i.mA)(a,l(y,o,d,r));if(!p||!u){let e=l(y,n,d,r),t=l(y,s,c,r);return(0,i.mA)(a,(0,i.mA)(e,t))}let e=l(p,n,d,r),t=l(u,s,c,r);return(0,i.mA)(a,(0,i.mA)(e,t))}if(d)return(0,i.mA)(a,l(y,n,d,r));if(c)return(0,i.mA)(a,l(g,s,c,r))}}function p(e){let{start:t,end:r}=e;if(t||r){if(!t&&r)return`null,${r.getTime()}`;if(!r&&t)return`${t.getTime()},null`;if(r&&t)return t.getTime()===r.getTime()?`${t.getTime()}`:`${t.getTime()},${r.getTime()}`}}}}]);
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://js.arcgis.com/5.2.1/@arcgis/core/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://js.arcgis.com/5.2.2/@arcgis/core/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
package/core/workers.d.ts CHANGED
@@ -50,6 +50,7 @@ export interface OpenOptions extends AbortOptions {
50
50
  * Set to `true` when loading a custom ES module worker.
51
51
  * The default is `false` for backward compatibility with legacy AMD custom workers. Loading custom workers this way is deprecated.
52
52
  *
53
+ * @deprecated since version 5.2. This option is temporary and will be removed at version 6.0 when custom worker modules default to ESM. Until then, migrate custom workers to ES modules and set this option to `true`.
53
54
  * @default false
54
55
  * @since 5.2
55
56
  */
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.1`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
2
+ import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.2`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import n from"../core/Error.js";import{MultiOriginJSONSupportMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as i}from"../core/promiseUtils.js";import{urlToObject as a}from"../core/urlUtils.js";import{property as o,subclass as s}from"../core/accessorSupport/decorators.js";import{excludeTables as c}from"../core/accessorSupport/layerContainerType.js";import l from"../geometry/SpatialReference.js";import u from"../graphic/CSVGraphicOrigin.js";import d from"./Layer.js";import{CSVSource as f}from"./graphics/sources/CSVSource.js";import{createCapabilities as p}from"./graphics/sources/support/clientSideDefaults.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{CustomParametersMixin as h}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as g}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as _}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as v}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as y}from"./mixins/OperationalLayer.js";import{OrderedLayer as b}from"./mixins/OrderedLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as S}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{TrackableLayer as T}from"./mixins/TrackableLayer.js";import{attributeTableTemplate as E,elevationInfo as D,labelsVisible as O,legendEnabled as k,maxScale as A,minScale as j,opacityDrawingInfo as M,popupEnabled as N,screenSizePerspectiveEnabled as P,timeInfo as F,url as I}from"./support/commonProperties.js";import{validateBinsQuery as L}from"./support/featureLayerUtils.js";import R from"./support/Field.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{fixRendererFields as B,fixTimeInfoFields as V}from"./support/fieldUtils.js";import H from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{webSceneRendererTypes as G,rendererTypes as K}from"../renderers/support/typeUtils.js";import q from"../rest/support/Query.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import{fromTimeReference as Y}from"../time/timeZoneUtils.js";import{reader as X}from"../core/accessorSupport/decorators/reader.js";const Z=z();let Q=class extends b(g(h(v(_(m(w(T(C(S(y(x(r(d))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=p(!1,!1),this.copyright=null,this.definitionExpression=null,this.delimiter=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.geometryType=`point`,this.graphicOrigin=new u(this),this.labelingInfo=null,this.labelsVisible=!0,this.latitudeField=null,this.legendEnabled=!0,this.locationType=`coordinates`,this.longitudeField=null,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.opacity=1,this.operationalLayerType=`CSV`,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new f,this.spatialReference=l.WGS84,this.timeInfo=null,this.type=`csv`}load(e){let t=this.loadFromPortal({supportedTypes:[`CSV`],supportsData:!1},e).catch(i).then(()=>(this.source.loadOptions={delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},this.source.customParameters=this.customParameters??void 0,this.source.load(e))).then(()=>{this.read({layerDefinition:this.source.sourceJSON,locationInfo:this.source.locationInfo,columnDelimiter:this.source.delimiter},{origin:`service`,portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),B(this.renderer,this.fieldsIndex),V(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}destroy(){this.source?.destroy()}get createQueryVersion(){return this.commitProperty(`definitionExpression`),this.commitProperty(`timeExtent`),this.commitProperty(`timeOffset`),this.commitProperty(`geometryType`),this.commitProperty(`capabilities`),(this._get(`createQueryVersion`)||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&this.geometryType==null}readWebMapLabelsVisible(e,t){return t.showLabels??!!t.layerDefinition?.drawingInfo?.labelingInfo}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}set renderer(e){B(e,this.fieldsIndex),this._set(`renderer`,e)}set url(e){if(!e){this._set(`url`,e);return}let t=a(e);this._set(`url`,t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}createPopupTemplate(e){return J(this,e)}createQuery(){let e=new q,t=this.capabilities?.data;e.returnGeometry=!0,t?.supportsZ&&(e.returnZ=!0),e.outFields=[`*`],e.where=this.definitionExpression||`1=1`;let{timeOffset:n,timeExtent:r}=this;return e.timeExtent=n&&r?r.offset(-n.value,n.unit):r??null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}async queryAttributeBins(e,t){let{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins)throw new n(`CSVLayer`,`Layer source does not support queryAttributeBins capability`);L(e,i,`CSVLayer`);let{default:a}=await import(`../rest/support/AttributeBinsQuery.js`),o=await r.queryAttributeBins(a.from(e),t),s=this.graphicOrigin;if(o.features)for(let e of o.features)e.layer=e.sourceLayer=this,e.origin=s;return o}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(q.from(e)||this.createQuery())).then(e=>{let t=this.graphicOrigin;if(e.features)for(let n of e.features)n.layer=n.sourceLayer=this,n.origin=t;return e})}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(q.from(e)||this.createQuery())}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(q.from(e)||this.createQuery()))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(q.from(e)||this.createQuery()))}read(e,t){super.read(e,t),t?.origin===`service`&&([`objectIdField`,`fields`,`timeInfo`,`dateFieldsTimeZone`,`latitudeField`,`longitudeField`].forEach(e=>this.revertToOrigin(e,`service`)),this.spatialReference||this.revertToOrigin(`spatialReference`,`service`))}async hasDataChanged(){try{let{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return t!=null&&this.read(t,{origin:`service`,url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([o(E)],Q.prototype,`attributeTableTemplate`,void 0),e([o({readOnly:!0,json:{read:!1,write:!1}})],Q.prototype,`capabilities`,void 0),e([o({type:String,json:{origins:{service:{read:{source:`copyrightText`}}}}})],Q.prototype,`copyright`,void 0),e([o({readOnly:!0})],Q.prototype,`createQueryVersion`,null),e([o({json:{name:`layerDefinition.dateFieldsTimeReference`,read:{reader:Y}}})],Q.prototype,`dateFieldsTimeZone`,void 0),e([o({readOnly:!0})],Q.prototype,`defaultPopupTemplate`,null),e([o({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([o({type:[`,`,` `,`;`,`|`,` `],json:{name:`columnDelimiter`,write:{ignoreOrigin:!0}}})],Q.prototype,`delimiter`,void 0),e([o({type:String})],Q.prototype,`displayField`,void 0),e([o(D)],Q.prototype,`elevationInfo`,void 0),e([o({type:[R],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0}}})],Q.prototype,`fields`,void 0),e([o(Z.fieldsIndex)],Q.prototype,`fieldsIndex`,void 0),e([o({type:W,json:{name:`layerDefinition.floorInfo`,write:{layerContainerTypes:c}}})],Q.prototype,`floorInfo`,void 0),e([o({json:{origins:{service:{name:`layerDefinition.extent`}}}})],Q.prototype,`fullExtent`,void 0),e([o({readOnly:!0,json:{read:!1}})],Q.prototype,`geometryType`,void 0),e([o({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([o({readOnly:!0})],Q.prototype,`isTable`,null),e([o({type:[H],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:U},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([o(O)],Q.prototype,`labelsVisible`,void 0),e([X(`web-map`,`labelsVisible`,[`layerDefinition.drawingInfo.labelingInfo`,`showLabels`])],Q.prototype,`readWebMapLabelsVisible`,null),e([o({type:String,json:{name:`locationInfo.latitudeFieldName`,write:{ignoreOrigin:!0}}})],Q.prototype,`latitudeField`,void 0),e([o(k)],Q.prototype,`legendEnabled`,void 0),e([o({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([o({type:[`coordinates`],json:{name:`locationInfo.locationType`,write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,`locationType`,void 0),e([o({type:String,json:{name:`locationInfo.longitudeFieldName`,write:{ignoreOrigin:!0}}})],Q.prototype,`longitudeField`,void 0),e([o(A)],Q.prototype,`maxScale`,void 0),e([o(j)],Q.prototype,`minScale`,void 0),e([o({type:String,json:{name:`layerDefinition.objectIdField`,origins:{"web-map":{write:{target:`layerDefinition.objectIdField`,ignoreOrigin:!0}}}}})],Q.prototype,`objectIdField`,void 0),e([o(M)],Q.prototype,`opacity`,void 0),e([o({type:[`CSV`]})],Q.prototype,`operationalLayerType`,void 0),e([o()],Q.prototype,`outFields`,void 0),e([o(N)],Q.prototype,`popupEnabled`,void 0),e([o({type:t,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([o({types:K,json:{name:`layerDefinition.drawingInfo.renderer`,origins:{"web-scene":{types:G,name:`layerDefinition.drawingInfo.renderer`,write:!0}},write:{ignoreOrigin:!0,layerContainerTypes:c}}})],Q.prototype,`renderer`,null),e([o(P)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([o({readOnly:!0})],Q.prototype,`source`,void 0),e([o({type:l,json:{origins:{service:{name:`layerDefinition.extent.spatialReference`}}}})],Q.prototype,`spatialReference`,void 0),e([o(F({name:`layerDefinition.timeInfo`,alwaysWriteNonItemOrigin:!0}))],Q.prototype,`timeInfo`,void 0),e([o({type:String,json:{origins:{service:{name:`layerDefinition.name`},"web-document":{name:`title`,write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Q.prototype,`title`,void 0),e([o({json:{read:!1},value:`csv`,readOnly:!0})],Q.prototype,`type`,void 0),e([o(I)],Q.prototype,`url`,null),Q=e([s(`esri.layers.CSVLayer`)],Q);const $=Q;export{$ as default};
2
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import n from"../core/Error.js";import{MultiOriginJSONSupportMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as i}from"../core/promiseUtils.js";import{urlToObject as a}from"../core/urlUtils.js";import{property as o,subclass as s}from"../core/accessorSupport/decorators.js";import{excludeTables as c}from"../core/accessorSupport/layerContainerType.js";import l from"../geometry/SpatialReference.js";import u from"../graphic/CSVGraphicOrigin.js";import d from"./Layer.js";import{CSVSource as f}from"./graphics/sources/CSVSource.js";import{createCapabilities as p}from"./graphics/sources/support/clientSideDefaults.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{CustomParametersMixin as h}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as g}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as _}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as v}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as y}from"./mixins/OperationalLayer.js";import{OrderedLayer as b}from"./mixins/OrderedLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as S}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{TrackableLayer as T}from"./mixins/TrackableLayer.js";import{attributeTableTemplate as E,elevationInfo as D,labelsVisible as O,legendEnabled as k,maxScale as A,minScale as j,opacityDrawingInfo as M,popupEnabled as N,screenSizePerspectiveEnabled as P,timeInfo as F,url as I}from"./support/commonProperties.js";import{validateBinsQuery as L}from"./support/featureLayerUtils.js";import R from"./support/Field.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{fixRendererFields as B,fixTimeInfoFields as V}from"./support/fieldUtils.js";import H from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{webSceneRendererTypes as G,rendererTypes as K}from"../renderers/support/typeUtils.js";import q from"../rest/support/Query.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import{fromTimeReference as Y}from"../time/timeZoneUtils.js";import{reader as X}from"../core/accessorSupport/decorators/reader.js";const Z=z();let Q=class extends b(g(h(v(_(m(w(T(C(S(y(x(r(d))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=p(!1,!1),this.copyright=null,this.definitionExpression=null,this.delimiter=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.geometryType=`point`,this.graphicOrigin=new u(this),this.labelingInfo=null,this.labelsVisible=!0,this.latitudeField=null,this.legendEnabled=!0,this.locationType=`coordinates`,this.longitudeField=null,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.opacity=1,this.operationalLayerType=`CSV`,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new f({layer:this}),this.spatialReference=l.WGS84,this.timeInfo=null,this.type=`csv`}load(e){let t=this.loadFromPortal({supportedTypes:[`CSV`],supportsData:!1},e).catch(i).then(()=>(this.source.loadOptions={delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},this.source.customParameters=this.customParameters??void 0,this.source.load(e))).then(()=>{this.read({layerDefinition:this.source.sourceJSON,locationInfo:this.source.locationInfo,columnDelimiter:this.source.delimiter},{origin:`service`,portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),B(this.renderer,this.fieldsIndex),V(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}destroy(){this.source?.destroy()}get createQueryVersion(){return this.commitProperty(`definitionExpression`),this.commitProperty(`timeExtent`),this.commitProperty(`timeOffset`),this.commitProperty(`geometryType`),this.commitProperty(`capabilities`),(this._get(`createQueryVersion`)||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&this.geometryType==null}readWebMapLabelsVisible(e,t){return t.showLabels??!!t.layerDefinition?.drawingInfo?.labelingInfo}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}set renderer(e){B(e,this.fieldsIndex),this._set(`renderer`,e)}set url(e){if(!e){this._set(`url`,e);return}let t=a(e);this._set(`url`,t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}createPopupTemplate(e){return J(this,e)}createQuery(){let e=new q,t=this.capabilities?.data;e.returnGeometry=!0,t?.supportsZ&&(e.returnZ=!0),e.outFields=[`*`],e.where=this.definitionExpression||`1=1`;let{timeOffset:n,timeExtent:r}=this;return e.timeExtent=n&&r?r.offset(-n.value,n.unit):r??null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}async queryAttributeBins(e,t){let{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins)throw new n(`CSVLayer`,`Layer source does not support queryAttributeBins capability`);L(e,i,`CSVLayer`);let{default:a}=await import(`../rest/support/AttributeBinsQuery.js`),o=await r.queryAttributeBins(a.from(e),t),s=this.graphicOrigin;if(o.features)for(let e of o.features)e.layer=e.sourceLayer=this,e.origin=s;return o}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(q.from(e)||this.createQuery())).then(e=>{let t=this.graphicOrigin;if(e.features)for(let n of e.features)n.layer=n.sourceLayer=this,n.origin=t;return e})}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(q.from(e)||this.createQuery())}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(q.from(e)||this.createQuery()))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(q.from(e)||this.createQuery()))}read(e,t){super.read(e,t),t?.origin===`service`&&([`objectIdField`,`fields`,`timeInfo`,`dateFieldsTimeZone`,`latitudeField`,`longitudeField`].forEach(e=>this.revertToOrigin(e,`service`)),this.spatialReference||this.revertToOrigin(`spatialReference`,`service`))}async hasDataChanged(){try{let{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return t!=null&&this.read(t,{origin:`service`,url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([o(E)],Q.prototype,`attributeTableTemplate`,void 0),e([o({readOnly:!0,json:{read:!1,write:!1}})],Q.prototype,`capabilities`,void 0),e([o({type:String,json:{origins:{service:{read:{source:`copyrightText`}}}}})],Q.prototype,`copyright`,void 0),e([o({readOnly:!0})],Q.prototype,`createQueryVersion`,null),e([o({json:{name:`layerDefinition.dateFieldsTimeReference`,read:{reader:Y}}})],Q.prototype,`dateFieldsTimeZone`,void 0),e([o({readOnly:!0})],Q.prototype,`defaultPopupTemplate`,null),e([o({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([o({type:[`,`,` `,`;`,`|`,` `],json:{name:`columnDelimiter`,write:{ignoreOrigin:!0}}})],Q.prototype,`delimiter`,void 0),e([o({type:String})],Q.prototype,`displayField`,void 0),e([o(D)],Q.prototype,`elevationInfo`,void 0),e([o({type:[R],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0}}})],Q.prototype,`fields`,void 0),e([o(Z.fieldsIndex)],Q.prototype,`fieldsIndex`,void 0),e([o({type:W,json:{name:`layerDefinition.floorInfo`,write:{layerContainerTypes:c}}})],Q.prototype,`floorInfo`,void 0),e([o({json:{origins:{service:{name:`layerDefinition.extent`}}}})],Q.prototype,`fullExtent`,void 0),e([o({readOnly:!0,json:{read:!1}})],Q.prototype,`geometryType`,void 0),e([o({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([o({readOnly:!0})],Q.prototype,`isTable`,null),e([o({type:[H],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:U},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([o(O)],Q.prototype,`labelsVisible`,void 0),e([X(`web-map`,`labelsVisible`,[`layerDefinition.drawingInfo.labelingInfo`,`showLabels`])],Q.prototype,`readWebMapLabelsVisible`,null),e([o({type:String,json:{name:`locationInfo.latitudeFieldName`,write:{ignoreOrigin:!0}}})],Q.prototype,`latitudeField`,void 0),e([o(k)],Q.prototype,`legendEnabled`,void 0),e([o({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([o({type:[`coordinates`],json:{name:`locationInfo.locationType`,write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,`locationType`,void 0),e([o({type:String,json:{name:`locationInfo.longitudeFieldName`,write:{ignoreOrigin:!0}}})],Q.prototype,`longitudeField`,void 0),e([o(A)],Q.prototype,`maxScale`,void 0),e([o(j)],Q.prototype,`minScale`,void 0),e([o({type:String,json:{name:`layerDefinition.objectIdField`,origins:{"web-map":{write:{target:`layerDefinition.objectIdField`,ignoreOrigin:!0}}}}})],Q.prototype,`objectIdField`,void 0),e([o(M)],Q.prototype,`opacity`,void 0),e([o({type:[`CSV`]})],Q.prototype,`operationalLayerType`,void 0),e([o()],Q.prototype,`outFields`,void 0),e([o(N)],Q.prototype,`popupEnabled`,void 0),e([o({type:t,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([o({types:K,json:{name:`layerDefinition.drawingInfo.renderer`,origins:{"web-scene":{types:G,name:`layerDefinition.drawingInfo.renderer`,write:!0}},write:{ignoreOrigin:!0,layerContainerTypes:c}}})],Q.prototype,`renderer`,null),e([o(P)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([o({readOnly:!0})],Q.prototype,`source`,void 0),e([o({type:l,json:{origins:{service:{name:`layerDefinition.extent.spatialReference`}}}})],Q.prototype,`spatialReference`,void 0),e([o(F({name:`layerDefinition.timeInfo`,alwaysWriteNonItemOrigin:!0}))],Q.prototype,`timeInfo`,void 0),e([o({type:String,json:{origins:{service:{name:`layerDefinition.name`},"web-document":{name:`title`,write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Q.prototype,`title`,void 0),e([o({json:{read:!1},value:`csv`,readOnly:!0})],Q.prototype,`type`,void 0),e([o(I)],Q.prototype,`url`,null),Q=e([s(`esri.layers.CSVLayer`)],Q);const $=Q;export{$ as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return(typeof e!=`object`||!e)&&(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load()}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return(typeof e!=`object`||!e)&&(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e),this.associatedLayer&&(this.associatedLayer.timeInfo=e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load(),this._isOverridden(`timeInfo`)&&(this.associatedLayer.timeInfo=this.timeInfo)}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{Loadable as t}from"../../../core/Loadable.js";import{debounce as n}from"../../../core/promiseUtils.js";import{open as r}from"../../../core/workers.js";import{property as i,subclass as a}from"../../../core/accessorSupport/decorators.js";import o from"../../../geometry/Extent.js";import s from"../../../rest/support/FeatureSet.js";let c=class extends t{constructor(e){super(e),this.type=`csv`,this.refresh=n(async e=>{await this.load();let{extent:t,timeExtent:n}=await this._connection.invoke(`refresh`,e);return t&&(this.sourceJSON.extent=t),n&&(this.sourceJSON.timeInfo.timeExtent=[n.start,n.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);let n=await this._connection.invoke(`queryFeatures`,e?e.toJSON():null,t);return s.fromJSON(n)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke(`queryFeatures`,e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke(`queryFeatureCount`,e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke(`queryObjectIds`,e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);let n=await this._connection.invoke(`queryExtent`,e?e.toJSON():null,t);return{count:n.count,extent:o.fromJSON(n.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke(`querySnapping`,e,t)}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke(`queryAttributeBins`,e?e.toJSON():null,t)}async _startWorker(e){this._connection=await r(`CSVSourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{url:t,delimiter:n,fields:i,latitudeField:a,longitudeField:o,spatialReference:s,timeInfo:c}=this.loadOptions,l=await this._connection.invoke(`load`,{url:t,customParameters:this.customParameters,parsingOptions:{delimiter:n,fields:i?.map(e=>e.toJSON()),latitudeField:a,longitudeField:o,spatialReference:s?.toJSON(),timeInfo:c?.toJSON()}},{signal:e});this.locationInfo=l.locationInfo,this.sourceJSON=l.layerDefinition,this.delimiter=l.delimiter}};e([i()],c.prototype,`type`,void 0),e([i()],c.prototype,`loadOptions`,void 0),e([i()],c.prototype,`customParameters`,void 0),e([i()],c.prototype,`locationInfo`,void 0),e([i()],c.prototype,`sourceJSON`,void 0),e([i()],c.prototype,`delimiter`,void 0),c=e([a(`esri.layers.graphics.sources.CSVSource`)],c);export{c as CSVSource};
2
+ import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{Loadable as t}from"../../../core/Loadable.js";import{debounce as n}from"../../../core/promiseUtils.js";import{open as r}from"../../../core/workers.js";import{property as i,subclass as a}from"../../../core/accessorSupport/decorators.js";import o from"../../../geometry/Extent.js";import{applyTimeExtentToQuery as s}from"./support/timeQueryUtils.js";import c from"../../../rest/support/FeatureSet.js";let l=class extends t{constructor(e){super(e),this.type=`csv`,this.refresh=n(async e=>{await this.load();let{extent:t,timeExtent:n}=await this._connection.invoke(`refresh`,e);return t&&(this.sourceJSON.extent=t),n&&(this.sourceJSON.timeInfo.timeExtent=[n.start,n.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);let n=s(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryFeatures`,n.toJSON(),t);return c.fromJSON(r)}async queryFeaturesJSON(e,t={}){await this.load(t);let n=s(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatures`,n.toJSON(),t)}async queryFeatureCount(e,t={}){await this.load(t);let n=s(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatureCount`,n.toJSON(),t)}async queryObjectIds(e,t={}){await this.load(t);let n=s(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryObjectIds`,n.toJSON(),t)}async queryExtent(e,t={}){await this.load(t);let n=s(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryExtent`,n.toJSON(),t);return{count:r.count,extent:o.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke(`querySnapping`,e,t)}async queryAttributeBins(e,t={}){await this.load();let n=s(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryAttributeBins`,n.toJSON(),t)}async _startWorker(e){this._connection=await r(`CSVSourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{url:t,delimiter:n,fields:i,latitudeField:a,longitudeField:o,spatialReference:s,timeInfo:c}=this.loadOptions,l=await this._connection.invoke(`load`,{url:t,customParameters:this.customParameters,parsingOptions:{delimiter:n,fields:i?.map(e=>e.toJSON()),latitudeField:a,longitudeField:o,spatialReference:s?.toJSON(),timeInfo:c?.toJSON()}},{signal:e});this.locationInfo=l.locationInfo,this.sourceJSON=l.layerDefinition,this.delimiter=l.delimiter}};e([i()],l.prototype,`type`,void 0),e([i()],l.prototype,`loadOptions`,void 0),e([i()],l.prototype,`customParameters`,void 0),e([i({constructOnly:!0})],l.prototype,`layer`,void 0),e([i()],l.prototype,`locationInfo`,void 0),e([i()],l.prototype,`sourceJSON`,void 0),e([i()],l.prototype,`delimiter`,void 0),l=e([a(`esri.layers.graphics.sources.CSVSource`)],l);export{l as CSVSource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import has from"../../../core/has.js";import{Loadable as n}from"../../../core/Loadable.js";import r from"../../../core/Logger.js";import{debounce as i}from"../../../core/promiseUtils.js";import{open as a}from"../../../core/workers.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import c from"../../../geometry/Extent.js";import l from"../../../geometry/Polygon.js";import{featureGeometryTypeKebabDictionary as u}from"../../../geometry/support/typeUtils.js";import{createCapabilities as d}from"./support/clientSideDefaults.js";import f from"../../../rest/support/FeatureSet.js";let p=class extends n{constructor(){super(...arguments),this.type=`geojson`,this.refresh=i(async e=>{await this.load();let{extent:t,timeExtent:n}=await this._connection.invoke(`refresh`,e);return this.sourceJSON.extent=t,n&&(this.sourceJSON.timeInfo.timeExtent=[n.start,n.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke(`queryFeatures`,e?e.toJSON():null,t)).then(e=>f.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke(`queryFeatures`,e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke(`queryFeatureCount`,e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke(`queryObjectIds`,e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke(`queryExtent`,e?e.toJSON():null,t)).then(e=>({count:e.count,extent:c.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke(`querySnapping`,e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke(`queryAttributeBins`,e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new t(`geojson-layer-source:edit-failure`,`Memory source not loaded`);let n=this.layer.objectIdField,r=[],i=[],a=[];if(e.addFeatures)for(let t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(let t of e.deleteFeatures)`objectId`in t&&t.objectId!=null?i.push(t.objectId):`attributes`in t&&t.attributes[n]!=null&&i.push(t.attributes[n]);if(e.updateFeatures)for(let t of e.updateFeatures)a.push(this._serializeFeature(t));return this._connection.invoke(`applyEdits`,{adds:r,updates:a,deletes:i}).then(({extent:e,timeExtent:t,featureEditResults:n})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(n)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){let n=e.success===!0?null:e.error||{code:void 0,description:``};return{objectId:e.objectId,globalId:e.globalId,error:n?new t(`geojson-layer-source:edit-failure`,n.description,{code:n.code}):null}}_serializeFeature(e){let{attributes:t}=e,n=this._geometryForSerialization(e);return n?{geometry:n.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){let{geometry:t}=e;return t==null?null:t.type===`mesh`||t.type===`extent`?l.fromExtent(t.extent):t}async _startWorker(e){this._connection=await a(`GeoJSONSourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{fields:t,spatialReference:n,hasZ:i,geometryType:o,objectIdField:s,url:c,timeInfo:l,customParameters:f}=this.layer,p=this.layer.originOf(`spatialReference`)===`defaults`,m={url:c,customParameters:f,fields:t&&t.map(e=>e.toJSON()),geometryType:u.toJSON(o),hasZ:i,objectIdField:s,timeInfo:l?l.toJSON():null,spatialReference:p?null:n&&n.toJSON()},h=await this._connection.invoke(`load`,m,{signal:e});for(let e of h.warnings)r.getLogger(this.layer).warn(`#load()`,`${e.message} (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{warning:e});h.featureErrors.length&&r.getLogger(this.layer).warn(`#load()`,`Encountered ${h.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{errors:h.featureErrors}),this.sourceJSON=h.layerDefinition,this.capabilities=d(this.sourceJSON.hasZ,!0,!this.sourceJSON.geometryType)}};e([o()],p.prototype,`capabilities`,void 0),e([o()],p.prototype,`type`,void 0),e([o({constructOnly:!0})],p.prototype,`layer`,void 0),e([o()],p.prototype,`sourceJSON`,void 0),p=e([s(`esri.layers.graphics.sources.GeoJSONSource`)],p);export{p as GeoJSONSource};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import has from"../../../core/has.js";import{Loadable as n}from"../../../core/Loadable.js";import r from"../../../core/Logger.js";import{debounce as i}from"../../../core/promiseUtils.js";import{open as a}from"../../../core/workers.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import c from"../../../geometry/Extent.js";import l from"../../../geometry/Polygon.js";import{featureGeometryTypeKebabDictionary as u}from"../../../geometry/support/typeUtils.js";import{createCapabilities as d}from"./support/clientSideDefaults.js";import{applyTimeExtentToQuery as f}from"./support/timeQueryUtils.js";import p from"../../../rest/support/FeatureSet.js";let m=class extends n{constructor(){super(...arguments),this.type=`geojson`,this.refresh=i(async e=>{await this.load();let{extent:t,timeExtent:n}=await this._connection.invoke(`refresh`,e);return this.sourceJSON.extent=t,n&&(this.sourceJSON.timeInfo.timeExtent=[n.start,n.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>{let n=f(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatures`,n.toJSON(),t)}).then(e=>p.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>{let n=f(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatures`,n.toJSON(),t)})}queryFeatureCount(e,t={}){return this.load(t).then(()=>{let n=f(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatureCount`,n.toJSON(),t)})}queryObjectIds(e,t={}){return this.load(t).then(()=>{let n=f(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryObjectIds`,n.toJSON(),t)})}queryExtent(e,t={}){return this.load(t).then(()=>{let n=f(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryExtent`,n.toJSON(),t)}).then(e=>({count:e.count,extent:c.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke(`querySnapping`,e,t))}async queryAttributeBins(e,t={}){await this.load();let n=f(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryAttributeBins`,n.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new t(`geojson-layer-source:edit-failure`,`Memory source not loaded`);let n=this.layer.objectIdField,r=[],i=[],a=[];if(e.addFeatures)for(let t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(let t of e.deleteFeatures)`objectId`in t&&t.objectId!=null?i.push(t.objectId):`attributes`in t&&t.attributes[n]!=null&&i.push(t.attributes[n]);if(e.updateFeatures)for(let t of e.updateFeatures)a.push(this._serializeFeature(t));return this._connection.invoke(`applyEdits`,{adds:r,updates:a,deletes:i}).then(({extent:e,timeExtent:t,featureEditResults:n})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(n)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){let n=e.success===!0?null:e.error||{code:void 0,description:``};return{objectId:e.objectId,globalId:e.globalId,error:n?new t(`geojson-layer-source:edit-failure`,n.description,{code:n.code}):null}}_serializeFeature(e){let{attributes:t}=e,n=this._geometryForSerialization(e);return n?{geometry:n.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){let{geometry:t}=e;return t==null?null:t.type===`mesh`||t.type===`extent`?l.fromExtent(t.extent):t}async _startWorker(e){this._connection=await a(`GeoJSONSourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{fields:t,spatialReference:n,hasZ:i,geometryType:o,objectIdField:s,url:c,timeInfo:l,customParameters:f}=this.layer,p=this.layer.originOf(`spatialReference`)===`defaults`,m={url:c,customParameters:f,fields:t&&t.map(e=>e.toJSON()),geometryType:u.toJSON(o),hasZ:i,objectIdField:s,timeInfo:l?l.toJSON():null,spatialReference:p?null:n&&n.toJSON()},h=await this._connection.invoke(`load`,m,{signal:e});for(let e of h.warnings)r.getLogger(this.layer).warn(`#load()`,`${e.message} (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{warning:e});h.featureErrors.length&&r.getLogger(this.layer).warn(`#load()`,`Encountered ${h.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{errors:h.featureErrors}),this.sourceJSON=h.layerDefinition,this.capabilities=d(this.sourceJSON.hasZ,!0,!this.sourceJSON.geometryType)}};e([o()],m.prototype,`capabilities`,void 0),e([o()],m.prototype,`type`,void 0),e([o({constructOnly:!0})],m.prototype,`layer`,void 0),e([o()],m.prototype,`sourceJSON`,void 0),m=e([s(`esri.layers.graphics.sources.GeoJSONSource`)],m);export{m as GeoJSONSource};
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import n from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as i}from"../../../core/Loadable.js";import a from"../../../core/Logger.js";import{EsriPromiseMixin as o}from"../../../core/Promise.js";import{isAborted as s,createAbortError as c}from"../../../core/promiseUtils.js";import{open as l}from"../../../core/workers.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import{ensureType as f}from"../../../core/accessorSupport/ensureType.js";import p from"../../../geometry/Extent.js";import m from"../../../geometry/Polygon.js";import{typeKebabDictionary as h}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as g}from"../data/createFeatureId.js";import{unapplyEditsZUnitScaling as _}from"../../../rest/query/operations/editsZScale.js";import v from"../../../rest/support/FeatureSet.js";import{shared as y}from"../../../core/accessorSupport/decorators/shared.js";let b=0,x=class extends i(o(n)){constructor(e){super(e),this._idToClientGeometry=null,this.type=`memory`}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){let e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?`polygon`:e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=await this._connection.invoke(`queryFeatures`,e?e.toJSON():null,t),r=v.fromJSON(n);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return r;let i=this.layer.objectIdField;for(let e of r.features){let t=e.attributes[i],n=this._idToClientGeometry.get(t);n!==void 0&&(e.geometry=n)}return r.geometryType=this.layer.geometryType,r}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new r(`query-features-json:unsupported`,`Cannot query in JSON format for client only geometry types (mesh and extent)`);if(await this.load(t),s(t)||this._connection==null)throw c();return await this._connection.invoke(`queryFeatures`,e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();return this._connection.invoke(`queryFeatureCount`,e?e.toJSON():null,t)}async queryObjectIds(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();return this._connection.invoke(`queryObjectIds`,e?e.toJSON():null,t)}async queryExtent(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=await this._connection.invoke(`queryExtent`,e?e.toJSON():null,t);return{count:n.count,extent:p.fromJSON(n.extent)}}async querySnapping(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();return this._connection.invoke(`querySnapping`,e,t)}async queryAttributeBins(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=await this._connection.invoke(`queryAttributeBins`,e?.toJSON(),t);return(await import(`../../../rest/support/AttributeBinsFeatureSet.js`)).default.fromJSON(n)}async _applyEdits(e){if(!this._connection)throw new r(`feature-layer-source:edit-failure`,`Memory source not loaded`);let t=this.layer.objectIdField,n=this.layer.uniqueIdFields,i=null,a=[],o=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);let s=e=>n?.length&&`attributes`in e?g(e,this.layer):`objectId`in e&&e.objectId!=null?e.objectId:`attributes`in e&&e.attributes[t]!=null?e.attributes[t]:null;if(e.addFeatures&&(i=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(let t of e.deleteFeatures){let e=s(t);e!=null&&a.push(e)}let c=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures){for(let t of e.updateFeatures)if(o.push(this._serializeFeature(t)),c&&t.geometry!=null){let e=s(t);e!=null&&c.set(e,t)}}_(i?i.features:null,o,this.layer.spatialReference);let{fullExtent:l,featureEditResults:u}=await this._connection.invoke(`applyEdits`,{adds:i?i.features:[],updates:o,deletes:a});return this.fullExtent=l,i&&i.finish(u.uidToObjectId),this._updateIdToClientGeometries(c,u),this._createEditsResult(u)}async _prepareClientMapping(e,t){if(this._layerOrSourceGeometryType!==`mesh`||e==null)return;let n=[];for(let{geometry:r}of e)r!=null&&r.type===`mesh`&&!r.hasExtent&&!r.loaded&&n.push(r.load({signal:t}));n.length&&await Promise.all(n)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(let n of t.updateResults){if(!n.success)continue;let t=e.get(n.objectId);t!=null&&this._addIdToClientGeometry(t)}for(let e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){let t=e.success===!0?null:e.error||{code:void 0,description:``};return{objectId:e.objectId,globalId:e.globalId,error:t?new r(`feature-layer-source:edit-failure`,t.description,{code:t.code}):null}}_prepareAddFeatures(e){let t=new Map,n=Array(e.length),r=null;for(let i=0;i<e.length;i++){let a=e[i],o=this._serializeFeature(a);!r&&a.geometry!=null&&(r=a.geometry.type),n[i]=o,t.set(`${o.uid}`,a)}let i=this;return{features:n,inferredGeometryType:r,finish(e){let n=i.sourceJSON.objectIdField;for(let r in e){let a=e[r],o=t.get(r);o&&(o.attributes||={},a===-1?delete o.attributes[n]:o.attributes[n]=a,i._addIdToClientGeometry(o))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;let t=this.sourceJSON.objectIdField,n=e.attributes?.[t];n!=null&&this._idToClientGeometry.set(n,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return e===`mesh`||e===`multipatch`||e===`extent`}_serializeFeature(e){let{attributes:t}=e,n=this._geometryForSerialization(e),r=(b++).toString();return n?{uid:r,geometry:n.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){let{geometry:t}=e;return t==null?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?m.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await l(`MemorySourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{fields:t,spatialReference:n,objectIdField:r,hasM:i,hasZ:o,timeInfo:s,dateFieldsTimeZone:c}=this.layer,u=this.layer.originOf(`spatialReference`)===`defaults`;await this._prepareClientMapping(this.items,e);let d=this._prepareAddFeatures(this.items);this.addHandles(this.on(`before-changes`,e=>{a.getLogger(this).error(`Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead`),e.preventDefault()}));let{uniqueIdFields:f}=this.layer,p=f?.length?{type:f.length>1?`composite`:`simple`,fields:f.slice(),OIDFieldContainsHashValue:f?.length!==1||f.at(0)!==this.layer.objectIdField}:void 0,m={features:d.features,fields:t?.map(e=>e.toJSON()),geometryType:h.toJSON(this._workerGeometryType),hasM:this._layerOrSourceGeometryType!==`mesh`&&i,hasZ:this._layerOrSourceGeometryType===`mesh`||o,objectIdField:r,spatialReference:u?null:n&&n.toJSON(),timeInfo:s?.toJSON()??null,dateFieldsTimeZone:c,uniqueIdInfo:p},g=await this._connection.invoke(`load`,m,{signal:e});for(let e of g.warnings)a.getLogger(this.layer).warn(`#load()`,`${e.message} (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{warning:e});g.featureErrors.length&&a.getLogger(this.layer).error(`#load()`,`Failed to load ${g.featureErrors.length} features due to errors. (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}').`,g.featureErrors.map(e=>`
2
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import n from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as i}from"../../../core/Loadable.js";import a from"../../../core/Logger.js";import{EsriPromiseMixin as o}from"../../../core/Promise.js";import{isAborted as s,createAbortError as c}from"../../../core/promiseUtils.js";import{open as l}from"../../../core/workers.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import{ensureType as f}from"../../../core/accessorSupport/ensureType.js";import p from"../../../geometry/Extent.js";import m from"../../../geometry/Polygon.js";import{typeKebabDictionary as h}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as g}from"../data/createFeatureId.js";import{applyTimeExtentToQuery as _}from"./support/timeQueryUtils.js";import{unapplyEditsZUnitScaling as v}from"../../../rest/query/operations/editsZScale.js";import y from"../../../rest/support/FeatureSet.js";import{shared as b}from"../../../core/accessorSupport/decorators/shared.js";let x=0,S=class extends i(o(n)){constructor(e){super(e),this._idToClientGeometry=null,this.type=`memory`}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){let e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?`polygon`:e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryFeatures`,n.toJSON(),t),i=y.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;let a=this.layer.objectIdField;for(let e of i.features){let t=e.attributes[a],n=this._idToClientGeometry.get(t);n!==void 0&&(e.geometry=n)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new r(`query-features-json:unsupported`,`Cannot query in JSON format for client only geometry types (mesh and extent)`);if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return await this._connection.invoke(`queryFeatures`,n.toJSON(),t)}async queryFeatureCount(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryFeatureCount`,n.toJSON(),t)}async queryObjectIds(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex);return this._connection.invoke(`queryObjectIds`,n.toJSON(),t)}async queryExtent(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryExtent`,n.toJSON(),t);return{count:r.count,extent:p.fromJSON(r.extent)}}async querySnapping(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();return this._connection.invoke(`querySnapping`,e,t)}async queryAttributeBins(e,t={}){if(await this.load(t),s(t)||this._connection==null)throw c();let n=_(e,this.layer.timeInfo,this.sourceJSON.timeInfo,this.layer.fieldsIndex),r=await this._connection.invoke(`queryAttributeBins`,n.toJSON(),t);return(await import(`../../../rest/support/AttributeBinsFeatureSet.js`)).default.fromJSON(r)}async _applyEdits(e){if(!this._connection)throw new r(`feature-layer-source:edit-failure`,`Memory source not loaded`);let t=this.layer.objectIdField,n=this.layer.uniqueIdFields,i=null,a=[],o=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);let s=e=>n?.length&&`attributes`in e?g(e,this.layer):`objectId`in e&&e.objectId!=null?e.objectId:`attributes`in e&&e.attributes[t]!=null?e.attributes[t]:null;if(e.addFeatures&&(i=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(let t of e.deleteFeatures){let e=s(t);e!=null&&a.push(e)}let c=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures){for(let t of e.updateFeatures)if(o.push(this._serializeFeature(t)),c&&t.geometry!=null){let e=s(t);e!=null&&c.set(e,t)}}v(i?i.features:null,o,this.layer.spatialReference);let{fullExtent:l,featureEditResults:u}=await this._connection.invoke(`applyEdits`,{adds:i?i.features:[],updates:o,deletes:a});return this.fullExtent=l,i&&i.finish(u.uidToObjectId),this._updateIdToClientGeometries(c,u),this._createEditsResult(u)}async _prepareClientMapping(e,t){if(this._layerOrSourceGeometryType!==`mesh`||e==null)return;let n=[];for(let{geometry:r}of e)r!=null&&r.type===`mesh`&&!r.hasExtent&&!r.loaded&&n.push(r.load({signal:t}));n.length&&await Promise.all(n)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(let n of t.updateResults){if(!n.success)continue;let t=e.get(n.objectId);t!=null&&this._addIdToClientGeometry(t)}for(let e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){let t=e.success===!0?null:e.error||{code:void 0,description:``};return{objectId:e.objectId,globalId:e.globalId,error:t?new r(`feature-layer-source:edit-failure`,t.description,{code:t.code}):null}}_prepareAddFeatures(e){let t=new Map,n=Array(e.length),r=null;for(let i=0;i<e.length;i++){let a=e[i],o=this._serializeFeature(a);!r&&a.geometry!=null&&(r=a.geometry.type),n[i]=o,t.set(`${o.uid}`,a)}let i=this;return{features:n,inferredGeometryType:r,finish(e){let n=i.sourceJSON.objectIdField;for(let r in e){let a=e[r],o=t.get(r);o&&(o.attributes||={},a===-1?delete o.attributes[n]:o.attributes[n]=a,i._addIdToClientGeometry(o))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;let t=this.sourceJSON.objectIdField,n=e.attributes?.[t];n!=null&&this._idToClientGeometry.set(n,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return e===`mesh`||e===`multipatch`||e===`extent`}_serializeFeature(e){let{attributes:t}=e,n=this._geometryForSerialization(e),r=(x++).toString();return n?{uid:r,geometry:n.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){let{geometry:t}=e;return t==null?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?m.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await l(`MemorySourceWorker`,{strategy:has(`feature-layers-workers`)?`dedicated`:`local`,signal:e,registryTarget:this});let{fields:t,spatialReference:n,objectIdField:r,hasM:i,hasZ:o,timeInfo:s,dateFieldsTimeZone:c}=this.layer,u=this.layer.originOf(`spatialReference`)===`defaults`;await this._prepareClientMapping(this.items,e);let d=this._prepareAddFeatures(this.items);this.addHandles(this.on(`before-changes`,e=>{a.getLogger(this).error(`Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead`),e.preventDefault()}));let{uniqueIdFields:f}=this.layer,p=f?.length?{type:f.length>1?`composite`:`simple`,fields:f.slice(),OIDFieldContainsHashValue:f?.length!==1||f.at(0)!==this.layer.objectIdField}:void 0,m={features:d.features,fields:t?.map(e=>e.toJSON()),geometryType:h.toJSON(this._workerGeometryType),hasM:this._layerOrSourceGeometryType!==`mesh`&&i,hasZ:this._layerOrSourceGeometryType===`mesh`||o,objectIdField:r,spatialReference:u?null:n&&n.toJSON(),timeInfo:s?.toJSON()??null,dateFieldsTimeZone:c,uniqueIdInfo:p},g=await this._connection.invoke(`load`,m,{signal:e});for(let e of g.warnings)a.getLogger(this.layer).warn(`#load()`,`${e.message} (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}')`,{warning:e});g.featureErrors.length&&a.getLogger(this.layer).error(`#load()`,`Failed to load ${g.featureErrors.length} features due to errors. (title: '${this.layer.title||`no title`}', id: '${this.layer.id??`no id`}').`,g.featureErrors.map(e=>`
3
3
 
4
- - `+e.error.description).join(``));let _=g.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(_.geometryType=h.toJSON(d.inferredGeometryType)),this.sourceJSON=_,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(g.assignedObjectIds)}};e([y({Type:t,ensureType:f(t)})],x.prototype,`itemType`,void 0),e([u()],x.prototype,`type`,void 0),e([u({constructOnly:!0})],x.prototype,`layer`,void 0),e([u({readOnly:!0})],x.prototype,`_workerGeometryType`,null),e([u()],x.prototype,`sourceJSON`,void 0),x=e([d(`esri.layers.graphics.sources.MemorySource`)],x);export{x as MemorySource};
4
+ - `+e.error.description).join(``));let _=g.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(_.geometryType=h.toJSON(d.inferredGeometryType)),this.sourceJSON=_,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(g.assignedObjectIds)}};e([b({Type:t,ensureType:f(t)})],S.prototype,`itemType`,void 0),e([u()],S.prototype,`type`,void 0),e([u({constructOnly:!0})],S.prototype,`layer`,void 0),e([u({readOnly:!0})],S.prototype,`_workerGeometryType`,null),e([u()],S.prototype,`sourceJSON`,void 0),S=e([d(`esri.layers.graphics.sources.MemorySource`)],S);export{S as MemorySource};