@arcgis/core 4.30.0-next.20240521 → 4.30.0-next.20240523

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 (130) hide show
  1. package/WebMap.js +1 -1
  2. package/assets/components/assets/icon/developerCredentials16.json +1 -0
  3. package/assets/components/assets/icon/developerCredentials24.json +1 -0
  4. package/assets/components/assets/icon/developerCredentials32.json +1 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{d7722531be4892293cb1.js → 00c49f6c84444e69f3a1.js} +1 -1
  7. package/assets/esri/core/workers/chunks/01927419855947110cc1.js.LICENSE.txt +1 -1
  8. package/assets/esri/core/workers/chunks/{df26d7d07fed1f124fc2.js → 0903b492782dca69eb48.js} +1 -1
  9. package/assets/esri/core/workers/chunks/158c05b16372d8ed33ea.js.LICENSE.txt +1 -1
  10. package/assets/esri/core/workers/chunks/190913c221964292333b.js.LICENSE.txt +1 -1
  11. package/assets/esri/core/workers/chunks/{2529a4b1e135223833f0.js → 2635ab64e75d4ec700a8.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{f965644347007e3d68e2.js → 27dc94db9ed42b237ecb.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{e727392db3b7998e5c28.js → 357707efc0cb8a1842c1.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0ae3ea7a73f3b5083968.js → 3a01cf7e3355f3c78378.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4268373bf374b2a6252a.js.LICENSE.txt +1 -1
  16. package/assets/esri/core/workers/chunks/43e1c935452b489e422e.js +1 -0
  17. package/assets/esri/core/workers/chunks/{938b158a7edbbb8e08a1.js → 44f8b57b0d8cfeabda1f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{15212a82e283d6df2873.js → 4ae885f257660545ceeb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{4ea2ced4b5ea1c8a1cee.js → 4ba866a10711b6a8158f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/50ee28a1944bde74a7c1.js +1 -0
  21. package/assets/esri/core/workers/chunks/{d745c2df59e5d6c7a1dd.js → 53aa9124c11c03f70521.js} +1 -1
  22. package/assets/esri/core/workers/chunks/59b193d42e8abf9d4088.js.LICENSE.txt +1 -1
  23. package/assets/esri/core/workers/chunks/{eafbe663f7a61d3222c5.js → 5efe1300a39ab9c7bbab.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js → 606f8b907166190a8b65.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js.LICENSE.txt → 606f8b907166190a8b65.js.LICENSE.txt} +1 -1
  26. package/assets/esri/core/workers/chunks/653da6469fe62e061efc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{5349b0de83ae4be8afe2.js → 6c1ded9acf5c8be493ea.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{46225ebc10a4398170b5.js → 712ba8ad69b1aab6f508.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{7d210c2a5a135da2c37d.js → 7c68dc664c0b4cf2a46b.js} +1 -1
  30. package/assets/esri/core/workers/chunks/88c7d84a1fde246ca71f.js +1 -0
  31. package/assets/esri/core/workers/chunks/9b04a666726b5d2ff3c5.js.LICENSE.txt +1 -1
  32. package/assets/esri/core/workers/chunks/9c75837b7e75f0f38dc0.js.LICENSE.txt +1 -1
  33. package/assets/esri/core/workers/chunks/a6b138f330625d98f856.js +1 -0
  34. package/assets/esri/core/workers/chunks/{e4a0fd9e0f8887009b92.js → a8a19e5a7ae4ec16480a.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{fcf0016d56df8a69f6c1.js → aa198e898b46c6e89d0b.js} +1 -1
  36. package/assets/esri/core/workers/chunks/b2562f5d0d5a44dc004e.js +1 -0
  37. package/assets/esri/core/workers/chunks/{04faa3bf4ef5a6f0ccb4.js → b3de9bc3e75476b0a7e9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{bd0545bb100b3393fd85.js → bbec62f8792520993909.js} +1 -1
  39. package/assets/esri/core/workers/chunks/bcd230d67bac27a1b36d.js +1 -0
  40. package/assets/esri/core/workers/chunks/bf6e75cc75d3bdfb70cb.js +1 -0
  41. package/assets/esri/core/workers/chunks/{5acac4616c53a95cc48f.js → c0c8e1a709648e1305c6.js} +1 -1
  42. package/assets/esri/core/workers/chunks/c80568ff68be908b3c30.js +1 -0
  43. package/assets/esri/core/workers/chunks/{85f24b441369e50e6ee1.js → c96ab8d56830b8ce07ed.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{4f3a87586e334c52d0bf.js → caffbaa8b0a67d117f34.js} +1 -1
  45. package/assets/esri/core/workers/chunks/ccad364912ff1d85a9dc.js +1 -0
  46. package/assets/esri/core/workers/chunks/{7b4ed96554722be59ae2.js → d8140b5316e80d734155.js} +1 -1
  47. package/assets/esri/core/workers/chunks/dde183c6bb1710ff16df.js.LICENSE.txt +1 -1
  48. package/assets/esri/core/workers/chunks/e3711bc5b100b64cac3a.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2d5d66cee7c3ec992bcd.js → e93e59f6907fa4c1081c.js} +1 -1
  50. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  51. package/assets/esri/themes/base/widgets/_FeatureTable.scss +15 -1
  52. package/assets/esri/themes/base/widgets/_Grid.scss +4 -1
  53. package/assets/esri/themes/dark/main.css +1 -1
  54. package/assets/esri/themes/light/main.css +1 -1
  55. package/assets/esri/themes/light/view.css +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  58. package/chunks/LineSeries.js +1 -1
  59. package/chunks/Theme.js +1 -1
  60. package/chunks/Tooltip.js +1 -1
  61. package/chunks/chartUtilsAm5.js +1 -1
  62. package/core/sql/WhereClause.js +1 -1
  63. package/core/workers/InvokeHandler.js +1 -1
  64. package/core/workers/RemoteClient.js +1 -1
  65. package/interfaces.d.ts +543 -77
  66. package/layers/BuildingSceneLayer.js +1 -1
  67. package/layers/ImageryTileLayer.js +1 -1
  68. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  69. package/layers/mixins/OperationalLayer.js +1 -1
  70. package/layers/support/editableLayers.js +1 -1
  71. package/package.json +2 -2
  72. package/portal/PortalItem.js +1 -1
  73. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  74. package/portal/schemas/definitions.js +1 -1
  75. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  76. package/rest/print.js +1 -1
  77. package/rest/support/printTaskUtils.js +1 -1
  78. package/smartMapping/renderers/support/referenceSizeUtils.js +1 -1
  79. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  80. package/support/revision.js +1 -1
  81. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  82. package/views/2d/GoToManager.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  84. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
  85. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  86. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  87. package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
  88. package/views/2d/layers/features/Processor.js +1 -1
  89. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  90. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  91. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  92. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  93. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  94. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  95. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils.js +1 -1
  96. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  97. package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
  98. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  99. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  100. package/views/3d/interactive/editingTools/undoRecords.js +5 -0
  101. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  102. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  103. package/views/layers/ImageryTileLayerView.js +1 -1
  104. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +4 -0
  105. package/widgets/CatalogLayerList.d.ts +4 -0
  106. package/widgets/CatalogLayerList.js +1 -1
  107. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  108. package/widgets/Expand.js +1 -1
  109. package/widgets/FeatureForm/support/textManipulationUtils.js +1 -1
  110. package/widgets/FeatureTable/VisibleElements.js +1 -1
  111. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  112. package/widgets/FeatureTable.js +1 -1
  113. package/widgets/Features/FeaturesViewModel.js +1 -1
  114. package/widgets/LayerList/ListItemPanel.js +1 -1
  115. package/widgets/LayerList/support/layerListUtils.js +1 -1
  116. package/widgets/Sketch/SketchViewModel.js +1 -1
  117. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  118. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  119. package/assets/esri/core/workers/chunks/0753c636c2801f067235.js +0 -1
  120. package/assets/esri/core/workers/chunks/3716015ccf0888c0a21d.js +0 -1
  121. package/assets/esri/core/workers/chunks/3f86042d9c0cc2d9acba.js +0 -1
  122. package/assets/esri/core/workers/chunks/50936725c9bd23b780ef.js +0 -1
  123. package/assets/esri/core/workers/chunks/5c8c5290b9fcb5a4468f.js +0 -1
  124. package/assets/esri/core/workers/chunks/95fb6643bd54d354f266.js +0 -1
  125. package/assets/esri/core/workers/chunks/aa020d495f464eff0134.js +0 -1
  126. package/assets/esri/core/workers/chunks/b52295fa9cf2f3244b65.js +0 -1
  127. package/assets/esri/core/workers/chunks/cbb3a56e4072cdf25a9d.js +0 -1
  128. package/assets/esri/core/workers/chunks/f4f1e1c1758542434384.js +0 -1
  129. package/assets/esri/core/workers/chunks/fb48e8e42379fdf8a094.js +0 -1
  130. package/views/3d/interactive/editingTools/transform/undoRecords.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6184],{4902:(e,t,r)=>{r.d(t,{PH:()=>o,sA:()=>n});var i=r(90237),a=r(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,a.$)("esri.core.Identifiable")],t),t},o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,a.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,i._)([(0,a.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>S,L:()=>b});var i=r(90237),a=r(69622),s=r(76953),n=r(4718),o=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[o.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),o.Gr.DEFAULTS)}));for(let r=o.Gr.SERVICE;r<o.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,a)=>{e&&e.has(a)||t.set(a,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=o.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=o.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),a=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),a!==i}originOf(e){return this._propertyOriginMap.get(e)||o.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(45917),u=r(88620),y=r(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,p.L)(this,e,t)}getAtOrigin(e,t){const r=d(this),i=(0,o.aB)(t);if("string"==typeof e)return r.get(e,i);const a={};return e.forEach((e=>{a[e]=r.get(e,i)})),a}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const r=d(this),i=(0,o.aB)(t),a=(0,u.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{a.invalidate(e),r.revert(e,i),a.commit(e)}))}};return t=(0,i._)([(0,y.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,u.oY)(e).store}let h=class extends(c(a.A)){};h=(0,i._)([(0,y.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var g=r(16649),m=r(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,o.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,o.aB)(r))}removeOrigin(e){const t=v(this),r=(0,o.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),o.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,o.aB)(t),a=(0,g.Jt)(this,e);for(let t=i+1;t<o.AU;++t)r.delete(e,t);r.set(e,a,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,y.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.oY)(e).store}const S=e=>{let t=class extends(f(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,y.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(S(a.A)){};b=(0,i._)([(0,y.$)("esri.core.MultiOriginJSONSupport")],b)},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>u,Hq:()=>p,Ie:()=>h,Jt:()=>g,Ne:()=>y,RF:()=>o,aI:()=>v,fA:()=>s,hZ:()=>d,iT:()=>l,is:()=>f,qv:()=>S,vI:()=>c,v_:()=>b,vt:()=>a,w1:()=>n});var i=r(5443);function a(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,n,o=a()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=s,o[5]=n,o}function n(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t,r=0,i=t.length/3){let a=e[0],s=e[1],n=e[2],o=e[3],l=e[4],p=e[5];for(let e=0;e<i;e++)a=Math.min(a,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),n=Math.min(n,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),p=Math.max(p,t[r+3*e+2]);e[0]=a,e[1]=s,e[2]=n,e[3]=o,e[4]=l,e[5]=p}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?d(e,S):a(S)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,a){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=a,e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!f(e)||!f(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const S=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];a()},63201:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var i=r(90237),a=r(92602),s=r(78888),n=(r(61147),r(92071)),o=r(74887),l=r(84952),p=r(10107),u=(r(44208),r(53966),r(87811),r(36005)),y=r(40608),c=r(5443),d=r(21325),h=r(4146),g=r(63074),m=r(16131),f=r(8303),v=r(54310),S=r(25036),b=r(10873),I=r(20378),_=r(31593),M=r(58592),w=r(53930),L=r(94985);const A=["atom","xml"],T={base:I.A,key:"type",typeMap:{"simple-line":_.A},errorContext:"symbol"},E={base:I.A,key:"type",typeMap:{"picture-marker":M.A,"simple-marker":w.A},errorContext:"symbol"},O={base:I.A,key:"type",typeMap:{"simple-fill":L.A},errorContext:"symbol"};let G=class extends((0,g.dM)((0,v.J)((0,m.q)((0,f.A)((0,S.j)((0,n.P)(h.A))))))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.legendEnabled=!0,this.lineSymbol=null,this.pointSymbol=null,this.polygonSymbol=null,this.operationalLayerType="GeoRSS",this.url=null,this.type="geo-rss"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readFeatureCollections(e,t){return t.featureCollection.layers.forEach((e=>{const t=e.layerDefinition.drawingInfo.renderer.symbol;t&&"esriSFS"===t.type&&t.outline?.style.includes("esriSFS")&&(t.outline.style="esriSLSSolid")})),t.featureCollection.layers}get hasPoints(){return this._hasGeometry("esriGeometryPoint")}get hasPolylines(){return this._hasGeometry("esriGeometryPolyline")}get hasPolygons(){return this._hasGeometry("esriGeometryPolygon")}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,l.e7)(this.url,A)||"GeoRSS":e}set title(e){this._set("title",e)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service","Feature Service","Feature Collection","Scene Service"]},e).catch(o.QP).then((()=>this._fetchService(t))).then((e=>{this.read(e,{origin:"service"})}))),Promise.resolve(this)}async hasDataChanged(){const e=await this._fetchService();return this.read(e,{origin:"service",ignoreDefaults:!0}),!0}async _fetchService(e){const t=this.spatialReference,{data:r}=await(0,s.A)(a.A.geoRSSServiceUrl,{query:{url:this.url,refresh:!!this.loaded||void 0,outSR:(0,d.oT)(t)?void 0:t.wkid??JSON.stringify(t)},signal:e});return r}_hasGeometry(e){return this.featureCollections?.some((t=>t.featureSet?.geometryType===e&&t.featureSet.features?.length>0))??!1}};(0,i._)([(0,p.MZ)()],G.prototype,"description",void 0),(0,i._)([(0,p.MZ)()],G.prototype,"featureCollections",void 0),(0,i._)([(0,u.w)("service","featureCollections",["featureCollection.layers"])],G.prototype,"readFeatureCollections",null),(0,i._)([(0,p.MZ)({type:c.A,json:{name:"lookAtExtent"}})],G.prototype,"fullExtent",void 0),(0,i._)([(0,p.MZ)(b.id)],G.prototype,"id",void 0),(0,i._)([(0,p.MZ)(b.fV)],G.prototype,"legendEnabled",void 0),(0,i._)([(0,p.MZ)({types:T,json:{write:!0}})],G.prototype,"lineSymbol",void 0),(0,i._)([(0,p.MZ)({type:["show","hide"]})],G.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)({types:E,json:{write:!0}})],G.prototype,"pointSymbol",void 0),(0,i._)([(0,p.MZ)({types:O,json:{write:!0}})],G.prototype,"polygonSymbol",void 0),(0,i._)([(0,p.MZ)({type:["GeoRSS"]})],G.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)(b.OZ)],G.prototype,"url",void 0),(0,i._)([(0,p.MZ)({json:{origins:{service:{read:{source:"name",reader:e=>e||void 0}}}}})],G.prototype,"title",null),(0,i._)([(0,p.MZ)({readOnly:!0,json:{read:!1},value:"geo-rss"})],G.prototype,"type",void 0),G=(0,i._)([(0,y.$)("esri.layers.GeoRSSLayer")],G);const x=G},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),a=(r(59456),r(78888)),s=r(60945),n=r(49186),o=r(65529),l=r(4902),p=r(92474),u=r(53966),y=r(74887),c=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),g=r(92602),m=r(5443),f=r(16930);let v=0,S=class extends(o.A.EventedMixin((0,l.sA)(p.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",a=r?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+a+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,y.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,a.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],S.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({type:m.A})],S.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],S.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],S.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],S.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],S.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],S.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],S.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],S.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],S.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],S.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:f.A})],S.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],S.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],S.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],S.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:s.A})],S.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],S.prototype,"visible",void 0),S=(0,i._)([(0,h.$)("esri.layers.Layer")],S);const b=S},16131:(e,t,r)=>{r.d(t,{q:()=>b});var i=r(90237),a=r(60945),s=r(49186),n=r(84952),o=r(10107),l=r(56507),p=(r(87811),r(44208),r(36005)),u=r(40608),y=r(43937),c=r(89317),d=r(45917),h=r(49422);const g={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},v={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":g,"web-map/basemap":m,"web-map/tables":f,"link-chart/operational-layers":{...g,LinkChartLayer:!0},"link-chart/basemap":m,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var S=r(10873);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,h.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?a.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new s.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=v[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new s.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.A&&"web-document-write:property-required"===e.name)).length;return(0,n.w8)(r?.url)?(t?.messages?.push(new s.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,p.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,o.MZ)(S.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,y.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,o.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,y.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,o.MZ)(S.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,o.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,y.K)("title"),(0,y.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,o.MZ)({type:a.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,p.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,y.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),a=r(92602),s=r(70333),n=r(78888),o=r(60999),l=r(49186),p=r(53966),u=r(97768),y=r(74887),c=r(84952),d=r(10107),h=(r(44208),r(87811),r(36005)),g=r(40608),m=r(43937),f=r(83531),v=r(20655),S=r(80812),b=r(41318),I=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new S.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,y.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,y.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.QP)(e),!0))))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,y.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,I.It)(r);let a,n;if(i)a=r.portal.url;else try{a=await(0,f.wI)(this.url,t)}catch(e){(0,y.QP)(e)}if(!a||!(0,c.b8)(a,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.QP)(e)}const o=!0,l=!1,p=!1;if(!n)return{features:{edit:o,fullEdit:l},content:{updateItem:p}};try{if(i?await r.reload():(r=new S.default({id:e,portal:{url:a}}),await r.load(t)),r.portal.user)return(0,I.It)(r)}catch(e){(0,y.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,a=v.A.getDefault();if(a&&a.loaded&&(0,c.S8)(a.restUrl)===(0,c.S8)(i))return a.user;const l=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?b.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.MZ)({type:S.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>S});var i=r(90237),a=(r(44208),r(53966)),s=r(74887),n=r(10107),o=r(79901),l=(r(87811),r(40608)),p=r(89317),u=r(5503),y=(r(60999),r(49186),r(14012),r(80559));const c=new u.A,d=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function g(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:g(t,e%t):0}let m=0,f=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(d.get(i)??0)+5>=6e4*i.refreshInterval&&(d.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,y.fm)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=g(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?d.get(i)||d.set(i,e):d.delete(i))}if(t!==f){if(f=t,clearInterval(m),0===f)return void(m=0);m=setInterval(v,f)}}));const S=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{a.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,n.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,o.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,n.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6184],{4902:(e,t,r)=>{r.d(t,{PH:()=>o,sA:()=>n});var i=r(90237),a=r(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,a.$)("esri.core.Identifiable")],t),t},o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,a.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,i._)([(0,a.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>S,L:()=>b});var i=r(90237),a=r(69622),s=r(76953),n=r(4718),o=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[o.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),o.Gr.DEFAULTS)}));for(let r=o.Gr.SERVICE;r<o.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,a)=>{e&&e.has(a)||t.set(a,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=o.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=o.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),a=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),a!==i}originOf(e){return this._propertyOriginMap.get(e)||o.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(45917),u=r(88620),y=r(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,p.L)(this,e,t)}getAtOrigin(e,t){const r=d(this),i=(0,o.aB)(t);if("string"==typeof e)return r.get(e,i);const a={};return e.forEach((e=>{a[e]=r.get(e,i)})),a}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const r=d(this),i=(0,o.aB)(t),a=(0,u.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{a.invalidate(e),r.revert(e,i),a.commit(e)}))}};return t=(0,i._)([(0,y.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,u.oY)(e).store}let h=class extends(c(a.A)){};h=(0,i._)([(0,y.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var g=r(16649),m=r(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,o.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,o.aB)(r))}removeOrigin(e){const t=v(this),r=(0,o.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),o.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,o.aB)(t),a=(0,g.Jt)(this,e);for(let t=i+1;t<o.AU;++t)r.delete(e,t);r.set(e,a,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,y.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.oY)(e).store}const S=e=>{let t=class extends(f(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,y.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(S(a.A)){};b=(0,i._)([(0,y.$)("esri.core.MultiOriginJSONSupport")],b)},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>u,Hq:()=>p,Ie:()=>h,Jt:()=>g,Ne:()=>y,RF:()=>o,aI:()=>v,fA:()=>s,hZ:()=>d,iT:()=>l,is:()=>f,qv:()=>S,vI:()=>c,v_:()=>b,vt:()=>a,w1:()=>n});var i=r(5443);function a(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,n,o=a()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=s,o[5]=n,o}function n(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t,r=0,i=t.length/3){let a=e[0],s=e[1],n=e[2],o=e[3],l=e[4],p=e[5];for(let e=0;e<i;e++)a=Math.min(a,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),n=Math.min(n,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),p=Math.max(p,t[r+3*e+2]);e[0]=a,e[1]=s,e[2]=n,e[3]=o,e[4]=l,e[5]=p}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?d(e,S):a(S)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,a){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=a,e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!f(e)||!f(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const S=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];a()},63201:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var i=r(90237),a=r(92602),s=r(78888),n=(r(61147),r(92071)),o=r(74887),l=r(84952),p=r(10107),u=(r(44208),r(53966),r(87811),r(36005)),y=r(40608),c=r(5443),d=r(21325),h=r(4146),g=r(63074),m=r(16131),f=r(8303),v=r(54310),S=r(25036),b=r(10873),I=r(20378),_=r(31593),M=r(58592),w=r(53930),L=r(94985);const A=["atom","xml"],T={base:I.A,key:"type",typeMap:{"simple-line":_.A},errorContext:"symbol"},E={base:I.A,key:"type",typeMap:{"picture-marker":M.A,"simple-marker":w.A},errorContext:"symbol"},O={base:I.A,key:"type",typeMap:{"simple-fill":L.A},errorContext:"symbol"};let G=class extends((0,g.dM)((0,v.J)((0,m.q)((0,f.A)((0,S.j)((0,n.P)(h.A))))))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.legendEnabled=!0,this.lineSymbol=null,this.pointSymbol=null,this.polygonSymbol=null,this.operationalLayerType="GeoRSS",this.url=null,this.type="geo-rss"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readFeatureCollections(e,t){return t.featureCollection.layers.forEach((e=>{const t=e.layerDefinition.drawingInfo.renderer.symbol;t&&"esriSFS"===t.type&&t.outline?.style.includes("esriSFS")&&(t.outline.style="esriSLSSolid")})),t.featureCollection.layers}get hasPoints(){return this._hasGeometry("esriGeometryPoint")}get hasPolylines(){return this._hasGeometry("esriGeometryPolyline")}get hasPolygons(){return this._hasGeometry("esriGeometryPolygon")}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,l.e7)(this.url,A)||"GeoRSS":e}set title(e){this._set("title",e)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service","Feature Service","Feature Collection","Scene Service"]},e).catch(o.QP).then((()=>this._fetchService(t))).then((e=>{this.read(e,{origin:"service"})}))),Promise.resolve(this)}async hasDataChanged(){const e=await this._fetchService();return this.read(e,{origin:"service",ignoreDefaults:!0}),!0}async _fetchService(e){const t=this.spatialReference,{data:r}=await(0,s.A)(a.A.geoRSSServiceUrl,{query:{url:this.url,refresh:!!this.loaded||void 0,outSR:(0,d.oT)(t)?void 0:t.wkid??JSON.stringify(t)},signal:e});return r}_hasGeometry(e){return this.featureCollections?.some((t=>t.featureSet?.geometryType===e&&t.featureSet.features?.length>0))??!1}};(0,i._)([(0,p.MZ)()],G.prototype,"description",void 0),(0,i._)([(0,p.MZ)()],G.prototype,"featureCollections",void 0),(0,i._)([(0,u.w)("service","featureCollections",["featureCollection.layers"])],G.prototype,"readFeatureCollections",null),(0,i._)([(0,p.MZ)({type:c.A,json:{name:"lookAtExtent"}})],G.prototype,"fullExtent",void 0),(0,i._)([(0,p.MZ)(b.id)],G.prototype,"id",void 0),(0,i._)([(0,p.MZ)(b.fV)],G.prototype,"legendEnabled",void 0),(0,i._)([(0,p.MZ)({types:T,json:{write:!0}})],G.prototype,"lineSymbol",void 0),(0,i._)([(0,p.MZ)({type:["show","hide"]})],G.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)({types:E,json:{write:!0}})],G.prototype,"pointSymbol",void 0),(0,i._)([(0,p.MZ)({types:O,json:{write:!0}})],G.prototype,"polygonSymbol",void 0),(0,i._)([(0,p.MZ)({type:["GeoRSS"]})],G.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)(b.OZ)],G.prototype,"url",void 0),(0,i._)([(0,p.MZ)({json:{origins:{service:{read:{source:"name",reader:e=>e||void 0}}}}})],G.prototype,"title",null),(0,i._)([(0,p.MZ)({readOnly:!0,json:{read:!1},value:"geo-rss"})],G.prototype,"type",void 0),G=(0,i._)([(0,y.$)("esri.layers.GeoRSSLayer")],G);const P=G},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),a=(r(59456),r(78888)),s=r(60945),n=r(49186),o=r(65529),l=r(4902),p=r(92474),u=r(53966),y=r(74887),c=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),g=r(92602),m=r(5443),f=r(16930);let v=0,S=class extends(o.A.EventedMixin((0,l.sA)(p.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",a=r?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+a+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,y.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,a.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],S.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({type:m.A})],S.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],S.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],S.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],S.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],S.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],S.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],S.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],S.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],S.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],S.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:f.A})],S.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],S.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],S.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],S.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:s.A})],S.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],S.prototype,"visible",void 0),S=(0,i._)([(0,h.$)("esri.layers.Layer")],S);const b=S},16131:(e,t,r)=>{r.d(t,{q:()=>b});var i=r(90237),a=r(60945),s=r(49186),n=r(84952),o=r(10107),l=r(56507),p=(r(87811),r(44208),r(36005)),u=r(40608),y=r(43937),c=r(89317),d=r(45917),h=r(49422);const g={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},v={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":g,"web-map/basemap":m,"web-map/tables":f,"link-chart/operational-layers":{...g,LinkChartLayer:!0},"link-chart/basemap":m,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var S=r(10873);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,h.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?a.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new s.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=v[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new s.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.A&&"web-document-write:property-required"===e.name)).length;return(0,n.w8)(r?.url)?(t?.messages?.push(new s.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,p.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,o.MZ)(S.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,y.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,o.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,y.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,o.MZ)(S.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,o.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,y.K)("title"),(0,y.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,o.MZ)({type:a.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,p.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,y.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),a=r(92602),s=r(70333),n=r(78888),o=r(60999),l=r(49186),p=r(53966),u=r(97768),y=r(74887),c=r(84952),d=r(10107),h=(r(44208),r(87811),r(36005)),g=r(40608),m=r(43937),f=r(83531),v=r(20655),S=r(80812),b=r(41318),I=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new S.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,y.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,y.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.QP)(e),!0))))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,y.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,I.It)(r);let a,n;if(i)a=r.portal.url;else try{a=await(0,f.wI)(this.url,t)}catch(e){(0,y.QP)(e)}if(!a||!(0,c.b8)(a,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.QP)(e)}const o=!0,l=!1,p=!1;if(!n)return{features:{edit:o,fullEdit:l},content:{updateItem:p}};try{if(i?await r.reload():(r=new S.default({id:e,portal:{url:a}}),await r.load(t)),r.portal.user)return(0,I.It)(r)}catch(e){(0,y.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,a=v.A.getDefault();if(a&&a.loaded&&(0,c.S8)(a.restUrl)===(0,c.S8)(i))return a.user;const l=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?b.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.MZ)({type:S.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>S});var i=r(90237),a=(r(44208),r(53966)),s=r(74887),n=r(10107),o=r(79901),l=(r(87811),r(40608)),p=r(89317),u=r(5503),y=(r(60999),r(49186),r(14012),r(80559));const c=new u.A,d=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function g(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:g(t,e%t):0}let m=0,f=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(d.get(i)??0)+5>=6e4*i.refreshInterval&&(d.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,y.fm)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=g(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?d.get(i)||d.set(i,e):d.delete(i))}if(t!==f){if(f=t,clearInterval(m),0===f)return void(m=0);m=setInterval(v,f)}}));const S=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{a.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,n.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,o.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,n.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4591],{3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>p,Hq:()=>u,Ie:()=>h,Jt:()=>f,Ne:()=>c,RF:()=>a,aI:()=>w,fA:()=>s,hZ:()=>y,iT:()=>l,is:()=>g,qv:()=>v,vI:()=>d,v_:()=>I,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?y(e,v):n(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];n()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var i=r(90237),n=(r(59456),r(13874)),s=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),o=r(92071),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),c=r(49186),d=r(92474),y=r(799),h=r(75321),f=r(22671),m=r(16930);let g=class extends d.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:s,effectiveMaxRecordCount:o}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:o,queryParameters:{apiKey:n,customParameters:s},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,h.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,y.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??h.QE,r=(0,h.J0)(t);return null==r?m.A.WGS84:new m.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[h.QE],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,s=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!s.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:s,fields:o,geometryType:a,hasZ:l,objectIdField:p,timeInfo:d,url:f}=e,m={fields:o?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(a),hasZ:l??!1,objectIdField:p,timeInfo:d?.toJSON()},g={apiKey:i,customParameters:s,signal:r},w=await(0,h.Ki)(f,g),[v,I]=await Promise.all([(0,h.Px)(w,g),(0,h.bV)(w,g)]);if(!this._conformsToType(v,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const S=I.collections.find((({id:e})=>e===n));if(!S)throw new c.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const T=this._conformsToType(v,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,h.GA)(w,g):null,M=await(0,h.GL)(S,m,g),F=this._getMaxRecordCount(T),b=this._getCapabilities(M.hasZ,F),_=this._getStorageSpatialReference(S).toJSON(),A=this._getSupportedSpatialReferences(S,I),x=new RegExp(`^${(0,y.Cj)(h.vJ)}`,"i"),L={};for(const e of A){const t=(0,h.J0)(e);null!=t&&(L[t]||(L[t]=e.replace(x,"")))}this.featureDefinition={capabilities:b,collection:S,layerDefinition:M,spatialReference:_,supportedCrs:L}}};(0,i._)([(0,a.MZ)()],g.prototype,"featureDefinition",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],g.prototype,"layer",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"type",void 0),g=(0,i._)([(0,l.$)("esri.layers.graphics.sources.OGCFeatureSource")],g);var w=r(52136),v=r(63074),I=r(69208),S=r(87718),T=r(76294),M=r(16131),F=r(32756),b=r(8303),_=r(54310),A=r(25036),x=r(82935),L=r(10873),Z=r(33143),G=r(20437),O=r(17036),R=r(30524),P=r(81457),E=r(39383),N=r(61956),C=r(30291),j=r(5443);const D=(0,O.p)();let q=class extends((0,w.p)((0,I.d)((0,T.J)((0,S.F)((0,v.dM)((0,F.f)((0,x.e)((0,A.j)((0,M.q)((0,b.A)((0,_.J)((0,o.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new g({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,R.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,C.tn)(this,e)}createQuery(){return new N.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,s=this.typeIdField&&n?.[this.typeIdField];return null!=s&&this.types&&(i=this.types.some((t=>t.id==s&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(N.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,R.yp)(this.renderer,this.fieldsIndex),(0,R.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,a.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],q.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],q.prototype,"collectionId",void 0),(0,i._)([(0,a.MZ)({type:String})],q.prototype,"copyright",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,i._)([(0,a.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],q.prototype,"description",void 0),(0,i._)([(0,a.MZ)({type:String})],q.prototype,"displayField",void 0),(0,i._)([(0,a.MZ)({type:Number})],q.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,a.MZ)(L.Yj)],q.prototype,"elevationInfo",void 0),(0,i._)([(0,a.MZ)({type:[G.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],q.prototype,"fields",void 0),(0,i._)([(0,a.MZ)(D.fieldsIndex)],q.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:j.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],q.prototype,"fullExtent",void 0),(0,i._)([(0,a.MZ)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],q.prototype,"geometryType",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],q.prototype,"hasZ",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!0})],q.prototype,"isTable",null),(0,i._)([(0,a.MZ)({type:[P.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:E.w},write:!0}}}})],q.prototype,"labelingInfo",void 0),(0,i._)([(0,a.MZ)(L.kF)],q.prototype,"labelsVisible",void 0),(0,i._)([(0,a.MZ)(L.fV)],q.prototype,"legendEnabled",void 0),(0,i._)([(0,a.MZ)({type:Number})],q.prototype,"maxRecordCount",void 0),(0,i._)([(0,a.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],q.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({type:["OGCFeatureLayer"]})],q.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.MZ)(L.M6)],q.prototype,"popupEnabled",void 0),(0,i._)([(0,a.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],q.prototype,"popupTemplate",void 0),(0,i._)([(0,a.MZ)({types:s.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:s.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],q.prototype,"renderer",null),(0,i._)([(0,a.MZ)(L.PY)],q.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],q.prototype,"source",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:m.A,json:{origins:{service:{read:!0}}}})],q.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],q.prototype,"title",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,i._)([(0,a.MZ)({type:String,readOnly:!0})],q.prototype,"typeIdField",void 0),(0,i._)([(0,a.MZ)({type:[Z.A]})],q.prototype,"types",void 0),(0,i._)([(0,a.MZ)(L.OZ)],q.prototype,"url",void 0),q=(0,i._)([(0,l.$)("esri.layers.OGCFeatureLayer")],q);const B=q},43334:(e,t,r)=>{r.d(t,{N3:()=>s,Om:()=>n});var i=r(92722);class n{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?i.A.fromJSON(e.geometry):null,s=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(r,e.attributes,s,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromJSON(e){return new i(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,r,n,s]=e,o=n-t,a=s-r;return new i([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let i=0;for(const e of r){for(let r=1;r<e;r++)t[2*(i+r)]+=t[2*(i+r)-2],t[2*(i+r)+1]+=t[2*(i+r)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new i(this.lengths,e,this.hasIndeterminateRingOrder)):new i(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},90708:(e,t,r)=>{r.d(t,{B2:()=>S,BW:()=>N,Ch:()=>ie,DF:()=>M,Di:()=>$,E2:()=>z,IE:()=>I,Nl:()=>W,Q4:()=>ne,Rk:()=>oe,Ux:()=>U,Ye:()=>D,ZF:()=>H,eY:()=>V,jH:()=>Y,jQ:()=>re,kz:()=>X,oN:()=>J,q3:()=>K,qK:()=>P,qN:()=>R,z5:()=>j,zv:()=>k});var i=r(49186),n=r(53966),s=r(97768),o=r(70328),a=r(19419),l=r(65864),u=r(43334),p=r(58512),c=r(92722);function d(e,t){return e?t?4:3:t?3:2}const y=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},f=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s},m=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2]},g=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+3]},w=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2],e[r+3]=t[i+3]};function v(e,t,r,i){if(e){if(r)return t&&i?w:m;if(t&&i)return g}else if(t&&i)return m;return f}function I({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function S({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function T({scale:e,translate:t},r,i){return r*e[i]+t[i]}function M(e,t,r){return e?t?r?Z(e):_(e):r?x(e):F(e):null}function F(e){const t=e.coords;return{x:t[0],y:t[1]}}function b(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function _(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function x(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function L(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function Z(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function G(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function O(e,t){return e&&t?G:e?A:t?L:b}function R(e,t,r=O(null!=t.z,null!=t.m)){return r(e,t)}function P(e,t,r){if(null==e)return null;const i=d(t,r),n=[];for(let t=0;t<e.coords.length;t+=i){const r=[];for(let n=0;n<i;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function E(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)i[n++]=e[t];return e}function N(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{paths:o,hasZ:t,hasM:r}:{paths:o,hasZ:t}:r?{paths:o,hasM:r}:{paths:o}}function C(e,t,r=d(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[s++]=t[e];i.push(e.length)}return e}function j(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{rings:o,hasZ:t,hasM:r}:{rings:o,hasZ:t}:r?{rings:o,hasM:r}:{rings:o}}function D(e,t,r=t.hasZ,i=t.hasM){return function(e,t,r,i){const n=d(r,i),{lengths:s,coords:o}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)o[a++]=t[e];s.push(e.length)}return e}(e,t.rings,r,i)}const q=[],B=[];function z(e,t,r,i,n){q[0]=e;const[s]=$(B,q,t,r,i,n);return le(q),le(B),s}function $(e,t,r,n,s,o){if(le(e),!r){for(const r of t){const t=o?r.attributes[o]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){const s=O(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?s(new c.A,r):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryMultipoint":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?E(new c.A,r,s):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolyline":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i,centroid:o}of t){const t=null!=r?C(new c.A,r,s):null,a=null!=o?R(new c.A,o):null;e.push(new u.Om(t,i,a,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolygon":return function(e,t,r,i,n){for(const{geometry:s,centroid:o,attributes:a}of t){const t=null!=s?D(new c.A,s,r,i):null,l=n?a[n]:void 0;null!=o?e.push(new u.Om(t,a,b(new c.A,o),l)):e.push(new u.Om(t,a,null,l))}return e}(e,t,n,s,o);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function J(e,t,r,i){B[0]=e,Q(q,B,t,r,i);const n=q[0];return le(q),le(B),n}function U(e,t,r){if(null==e)return null;const n=new c.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.fT)(e)?O(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,l.Bi)(e)?D(n,e,t,r):(0,l.Rg)(e)?C(n,e,d(t,r)):(0,l.U9)(e)?E(n,e,d(t,r)):void y().error("convertFromGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${e}'`))}function k(e,t,r,n){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=F;return r&&n?e=Z:r?e=_:n&&(e=x),e(s)}case"esriGeometryMultipoint":return P(s,r,n);case"esriGeometryPolyline":return N(s,r,n);case"esriGeometryPolygon":return j(s,r,n);default:return y().error("convertToGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${t}'`)),null}}function Q(e,t,r,n,s){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){let n=F;r&&i?n=Z:r?n=_:i&&(n=x);for(const r of t){const{geometry:t,attributes:i}=r,s=null!=t?n(t):null;e.push({attributes:i,geometry:s})}return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?P(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?N(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,r,i){for(const{geometry:n,attributes:s,centroid:o}of t){const t=null!=n?j(n,r,i):null;if(null!=o){const r=F(o);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,n,s);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:s,hasZ:o,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,y={features:Q([],a,l,o,s),fields:n,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:k(c,d,!1,!1)};return i&&(y.transform=i),u&&(y.exceededTransferLimit=u),s&&(y.hasM=s),o&&(y.hasZ=o),y}function K(e,t){const r=new p.A,{hasM:n,hasZ:s,features:o,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:c,transform:d,fields:h}=e;return h&&(r.fields=h),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(o&&$(r.features,o,u,s,n,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),n&&(r.hasM=n),s&&(r.hasZ=s),d&&(r.transform=d),r):(y().error(new i.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function V(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ie(e.geometry,e.geometry,i,n,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,n,t);return e.transform=null,e}function Y(e,t){const{geometryType:r,features:i,hasM:n,hasZ:s}=t;if(!e)return t;for(let t=0;t<i.length;t++){const o=i[t],a=o.weakClone();a.geometry=new c.A,W(a.geometry,o.geometry,n,s,r,e),o.centroid&&(a.centroid=new c.A,W(a.centroid,o.centroid,n,s,"esriGeometryPoint",e)),i[t]=a}return t.transform=e,t}function W(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),y=d(r&&o,i&&a),f=v(r,i,o,a);if(!p.length)return f(e.coords,u,0,0,I(s,u[0]),S(s,u[1])),ae(e,c,0),e;let m,g,w,T,M=0,F=0,b=F;for(const t of p){if(t<l)continue;let r=0;F=b,w=m=I(s,u[M]),T=g=S(s,u[M+1]),f(e.coords,u,F,M,w,T),r++,M+=c,F+=y;for(let i=1;i<t;i++,M+=c)w=I(s,u[M]),T=S(s,u[M+1]),w===m&&T===g||(f(e.coords,u,F,M,w-m,T-g),F+=y,r++,m=w,g=T);r>=l&&(e.lengths.push(r),b=F)}return le(e.coords,b),e.coords.length?e:null}function X(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),y=d(r&&o,i&&a),f=v(r,i,o,a);if(!p.length)return f(e.coords,u,0,0,u[0],u[1]),ae(e,c,0),e;let m=0;const g=s*s;for(const t of p){if(t<l){m+=t*c;continue}const r=e.coords.length/y,i=m,n=m+(t-1)*c;f(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,c,g,f,i,n),f(e.coords,u,e.coords.length,n,u[n],u[n+1]);const s=e.coords.length/y-r;s>=l?e.lengths.push(s):le(e.coords,r*y),m+=t*c}return e.coords.length?e:null}function ee(e,t,r,i){const n=e[t],s=e[t+1],o=e[r],a=e[r+1],l=e[i],u=e[i+1];let p=o,c=a,d=l-p,y=u-c;if(0!==d||0!==y){const e=((n-p)*d+(s-c)*y)/(d*d+y*y);e>1?(p=l,c=u):e>0&&(p+=d*e,c+=y*e)}return d=n-p,y=s-c,d*d+y*y}function te(e,t,r,i,n,s,o){let a,l=i,u=0;for(let e=s+r;e<o;e+=r)a=ee(t,e,s,o),a>l&&(u=e,l=a);l>i&&(u-s>r&&te(e,t,r,i,n,s,u),n(e,t,e.length,u,t[u],t[u+1]),o-u>r&&te(e,t,r,i,n,u,o))}function re(e,t,r,i){if(!t?.coords?.length)return null;const n=d(r,i);let s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];s=Math.min(s,r),u=Math.max(u,r),l=Math.min(l,i),p=Math.max(p,i)}}return(0,o.is)(e)?(0,o.BI)(e,s,l,u,p):(0,a.fA)(s,l,u,p,e),e}function ie(e,t,r,i,n){const{coords:o,lengths:a}=t,l=d(r,i);if(!o.length)return e!==t&&ae(e),e;(0,s.Lw)(n);const{originPosition:u,scale:p,translate:c}=n,y=ue;y.originPosition=u;const h=y.scale;h[0]=p[0]??1,h[1]=-(p[1]??1),h[2]=p[2]??1,h[3]=p[3]??1;const f=y.translate;if(f[0]=c[0]??0,f[1]=c[1]??0,f[2]=c[2]??0,f[3]=c[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=T(y,o[t],t);return e!==t&&ae(e,l,0),e}let m=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[m+t]=T(y,o[m+t],t);let i=e.coords[m],n=e.coords[m+1];m+=l;for(let t=1;t<r;t++,m+=l){i+=o[m]*h[0],n+=o[m+1]*h[1],e.coords[m]=i,e.coords[m+1]=n;for(let t=2;t<l;++t)e.coords[m+t]=T(y,o[m+t],t)}}return e!==t&&ae(e,o.length,a.length),e}function ne(e,t,r,i,n,s){if(ae(e),e.lengths.push(...t.lengths),r===n&&i===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const o=d(r,i),a=v(r,i,n,s),l=t.coords;for(let t=0;t<l.length;t+=o)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function se(e,t,r,i){let n=0,s=e[i*t],o=e[i*(t+1)];for(let a=1;a<r;a++){const r=s+e[i*(t+a)],l=o+e[i*(t+a)+1],u=(r-s)*(l+o);s=r,o=l,n+=u}return.5*n}function oe(e,t){const{coords:r,lengths:i}=e;let n=0,s=0;for(let e=0;e<i.length;e++){const o=i[e];s+=se(r,n,o,t),n+=o}return Math.abs(s)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>I});var i=r(90237),n=r(60945),s=r(49186),o=r(84952),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(36005)),p=r(40608),c=r(43937),d=r(89317),y=r(45917),h=r(49422);const f={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},w={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":f,"web-map/basemap":m,"web-map/tables":g,"link-chart/operational-layers":{...f,LinkChartLayer:!0},"link-chart/basemap":m,"link-chart/tables":g,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var v=r(10873);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,h.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?n.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new s.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,y.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=w[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new s.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.A&&"web-document-write:property-required"===e.name)).length;return(0,o.w8)(r?.url)?(t?.messages?.push(new s.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,u.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,a.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,c.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:d.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,c.K)("title"),(0,c.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,a.MZ)({type:n.A,json:{origins:{"web-scene":{write:{layerContainerTypes:d.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,u.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,c.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:d.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>l});var i=r(90237),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}},write:{writer:function(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(90237),n=r(92602),s=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),w=r(20655),v=r(80812),I=r(41318),S=r(10407);const T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.It)(r);let n,o;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,l=!1,u=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=w.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?I.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>v});var i=r(90237),n=(r(44208),r(53966)),s=r(74887),o=r(10107),a=r(79901),l=(r(87811),r(40608)),u=r(89317),p=r(5503),c=(r(60999),r(49186),r(14012),r(80559));const d=new p.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function w(){const e=Date.now();let t=!1;for(const r of d){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,c.fm)((()=>{const e=Date.now();let t=0;for(const r of d){const i=r.deref();i&&(t=f(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(w,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=d.find((t=>t.deref()===e));t&&d.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.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,n.O)(o.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,l.$)("esri.layers.support.FeatureTemplate")],p);const c=p},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(72088),c=r(29005);let d=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],d);const y=d},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,c=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(s),p],[y(o),p]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=c.get(y(i??""))??a;t.set(i,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=i=class extends o.oY{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,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const c=p},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),s=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),y=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.oY{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){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.A.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const 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,u.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){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s: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=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const 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,n){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=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(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)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.w)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4591],{3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>p,Hq:()=>u,Ie:()=>h,Jt:()=>f,Ne:()=>c,RF:()=>a,aI:()=>w,fA:()=>s,hZ:()=>y,iT:()=>l,is:()=>g,qv:()=>v,vI:()=>d,v_:()=>I,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?y(e,v):n(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];n()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var i=r(90237),n=(r(59456),r(13874)),s=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),o=r(92071),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),c=r(49186),d=r(92474),y=r(799),h=r(75321),f=r(22671),m=r(16930);let g=class extends d.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:s,effectiveMaxRecordCount:o}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:o,queryParameters:{apiKey:n,customParameters:s},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,h.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,y.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??h.QE,r=(0,h.J0)(t);return null==r?m.A.WGS84:new m.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[h.QE],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,s=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!s.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:s,fields:o,geometryType:a,hasZ:l,objectIdField:p,timeInfo:d,url:f}=e,m={fields:o?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(a),hasZ:l??!1,objectIdField:p,timeInfo:d?.toJSON()},g={apiKey:i,customParameters:s,signal:r},w=await(0,h.Ki)(f,g),[v,I]=await Promise.all([(0,h.Px)(w,g),(0,h.bV)(w,g)]);if(!this._conformsToType(v,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const S=I.collections.find((({id:e})=>e===n));if(!S)throw new c.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const T=this._conformsToType(v,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,h.GA)(w,g):null,M=await(0,h.GL)(S,m,g),F=this._getMaxRecordCount(T),b=this._getCapabilities(M.hasZ,F),_=this._getStorageSpatialReference(S).toJSON(),A=this._getSupportedSpatialReferences(S,I),x=new RegExp(`^${(0,y.Cj)(h.vJ)}`,"i"),L={};for(const e of A){const t=(0,h.J0)(e);null!=t&&(L[t]||(L[t]=e.replace(x,"")))}this.featureDefinition={capabilities:b,collection:S,layerDefinition:M,spatialReference:_,supportedCrs:L}}};(0,i._)([(0,a.MZ)()],g.prototype,"featureDefinition",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],g.prototype,"layer",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"type",void 0),g=(0,i._)([(0,l.$)("esri.layers.graphics.sources.OGCFeatureSource")],g);var w=r(52136),v=r(63074),I=r(69208),S=r(87718),T=r(76294),M=r(16131),F=r(32756),b=r(8303),_=r(54310),A=r(25036),x=r(82935),L=r(10873),Z=r(33143),G=r(20437),O=r(17036),R=r(30524),P=r(81457),E=r(39383),N=r(61956),C=r(30291),j=r(5443);const D=(0,O.p)();let q=class extends((0,w.p)((0,I.d)((0,T.J)((0,S.F)((0,v.dM)((0,F.f)((0,x.e)((0,A.j)((0,M.q)((0,b.A)((0,_.J)((0,o.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new g({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,R.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,C.tn)(this,e)}createQuery(){return new N.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,s=this.typeIdField&&n?.[this.typeIdField];return null!=s&&this.types&&(i=this.types.some((t=>t.id==s&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(N.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,R.yp)(this.renderer,this.fieldsIndex),(0,R.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,a.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],q.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],q.prototype,"collectionId",void 0),(0,i._)([(0,a.MZ)({type:String})],q.prototype,"copyright",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,i._)([(0,a.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],q.prototype,"description",void 0),(0,i._)([(0,a.MZ)({type:String})],q.prototype,"displayField",void 0),(0,i._)([(0,a.MZ)({type:Number})],q.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,a.MZ)(L.Yj)],q.prototype,"elevationInfo",void 0),(0,i._)([(0,a.MZ)({type:[G.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],q.prototype,"fields",void 0),(0,i._)([(0,a.MZ)(D.fieldsIndex)],q.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:j.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],q.prototype,"fullExtent",void 0),(0,i._)([(0,a.MZ)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],q.prototype,"geometryType",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],q.prototype,"hasZ",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!0})],q.prototype,"isTable",null),(0,i._)([(0,a.MZ)({type:[P.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:E.w},write:!0}}}})],q.prototype,"labelingInfo",void 0),(0,i._)([(0,a.MZ)(L.kF)],q.prototype,"labelsVisible",void 0),(0,i._)([(0,a.MZ)(L.fV)],q.prototype,"legendEnabled",void 0),(0,i._)([(0,a.MZ)({type:Number})],q.prototype,"maxRecordCount",void 0),(0,i._)([(0,a.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],q.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({type:["OGCFeatureLayer"]})],q.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.MZ)(L.M6)],q.prototype,"popupEnabled",void 0),(0,i._)([(0,a.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],q.prototype,"popupTemplate",void 0),(0,i._)([(0,a.MZ)({types:s.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:s.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],q.prototype,"renderer",null),(0,i._)([(0,a.MZ)(L.PY)],q.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],q.prototype,"source",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:m.A,json:{origins:{service:{read:!0}}}})],q.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],q.prototype,"title",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,i._)([(0,a.MZ)({type:String,readOnly:!0})],q.prototype,"typeIdField",void 0),(0,i._)([(0,a.MZ)({type:[Z.A]})],q.prototype,"types",void 0),(0,i._)([(0,a.MZ)(L.OZ)],q.prototype,"url",void 0),q=(0,i._)([(0,l.$)("esri.layers.OGCFeatureLayer")],q);const B=q},43334:(e,t,r)=>{r.d(t,{N3:()=>s,Om:()=>n});var i=r(92722);class n{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?i.A.fromJSON(e.geometry):null,s=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(r,e.attributes,s,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromJSON(e){return new i(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,r,n,s]=e,o=n-t,a=s-r;return new i([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let i=0;for(const e of r){for(let r=1;r<e;r++)t[2*(i+r)]+=t[2*(i+r)-2],t[2*(i+r)+1]+=t[2*(i+r)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new i(this.lengths,e,this.hasIndeterminateRingOrder)):new i(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},90708:(e,t,r)=>{r.d(t,{B2:()=>S,BW:()=>N,Ch:()=>ie,DF:()=>M,Di:()=>$,E2:()=>z,IE:()=>I,Nl:()=>W,Q4:()=>ne,Rk:()=>oe,Ux:()=>U,Ye:()=>D,ZF:()=>H,eY:()=>V,jH:()=>Y,jQ:()=>re,kz:()=>X,oN:()=>J,q3:()=>K,qK:()=>P,qN:()=>R,z5:()=>j,zv:()=>k});var i=r(49186),n=r(53966),s=r(97768),o=r(70328),a=r(19419),l=r(65864),u=r(43334),p=r(58512),c=r(92722);function d(e,t){return e?t?4:3:t?3:2}const y=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},f=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s},m=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2]},g=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+3]},w=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2],e[r+3]=t[i+3]};function v(e,t,r,i){if(e){if(r)return t&&i?w:m;if(t&&i)return g}else if(t&&i)return m;return f}function I({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function S({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function T({scale:e,translate:t},r,i){return r*e[i]+t[i]}function M(e,t,r){return e?t?r?Z(e):_(e):r?x(e):F(e):null}function F(e){const t=e.coords;return{x:t[0],y:t[1]}}function b(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function _(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function x(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function L(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function Z(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function G(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function O(e,t){return e&&t?G:e?A:t?L:b}function R(e,t,r=O(null!=t.z,null!=t.m)){return r(e,t)}function P(e,t,r){if(null==e)return null;const i=d(t,r),n=[];for(let t=0;t<e.coords.length;t+=i){const r=[];for(let n=0;n<i;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function E(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)i[n++]=e[t];return e}function N(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{paths:o,hasZ:t,hasM:r}:{paths:o,hasZ:t}:r?{paths:o,hasM:r}:{paths:o}}function C(e,t,r=d(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[s++]=t[e];i.push(e.length)}return e}function j(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{rings:o,hasZ:t,hasM:r}:{rings:o,hasZ:t}:r?{rings:o,hasM:r}:{rings:o}}function D(e,t,r=t.hasZ,i=t.hasM){return function(e,t,r,i){const n=d(r,i),{lengths:s,coords:o}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)o[a++]=t[e];s.push(e.length)}return e}(e,t.rings,r,i)}const q=[],B=[];function z(e,t,r,i,n){q[0]=e;const[s]=$(B,q,t,r,i,n);return le(q),le(B),s}function $(e,t,r,n,s,o){if(le(e),!r){for(const r of t){const t=o?r.attributes[o]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){const s=O(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?s(new c.A,r):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryMultipoint":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?E(new c.A,r,s):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolyline":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i,centroid:o}of t){const t=null!=r?C(new c.A,r,s):null,a=null!=o?R(new c.A,o):null;e.push(new u.Om(t,i,a,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolygon":return function(e,t,r,i,n){for(const{geometry:s,centroid:o,attributes:a}of t){const t=null!=s?D(new c.A,s,r,i):null,l=n?a[n]:void 0;null!=o?e.push(new u.Om(t,a,b(new c.A,o),l)):e.push(new u.Om(t,a,null,l))}return e}(e,t,n,s,o);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function J(e,t,r,i){B[0]=e,Q(q,B,t,r,i);const n=q[0];return le(q),le(B),n}function U(e,t,r){if(null==e)return null;const n=new c.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.fT)(e)?O(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,l.Bi)(e)?D(n,e,t,r):(0,l.Rg)(e)?C(n,e,d(t,r)):(0,l.U9)(e)?E(n,e,d(t,r)):void y().error("convertFromGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${e}'`))}function k(e,t,r,n){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=F;return r&&n?e=Z:r?e=_:n&&(e=x),e(s)}case"esriGeometryMultipoint":return P(s,r,n);case"esriGeometryPolyline":return N(s,r,n);case"esriGeometryPolygon":return j(s,r,n);default:return y().error("convertToGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${t}'`)),null}}function Q(e,t,r,n,s){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){let n=F;r&&i?n=Z:r?n=_:i&&(n=x);for(const r of t){const{geometry:t,attributes:i}=r,s=null!=t?n(t):null;e.push({attributes:i,geometry:s})}return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?P(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?N(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,r,i){for(const{geometry:n,attributes:s,centroid:o}of t){const t=null!=n?j(n,r,i):null;if(null!=o){const r=F(o);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,n,s);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:s,hasZ:o,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,y={features:Q([],a,l,o,s),fields:n,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:k(c,d,!1,!1)};return i&&(y.transform=i),u&&(y.exceededTransferLimit=u),s&&(y.hasM=s),o&&(y.hasZ=o),y}function K(e,t){const r=new p.A,{hasM:n,hasZ:s,features:o,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:c,transform:d,fields:h}=e;return h&&(r.fields=h),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(o&&$(r.features,o,u,s,n,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),n&&(r.hasM=n),s&&(r.hasZ=s),d&&(r.transform=d),r):(y().error(new i.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function V(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ie(e.geometry,e.geometry,i,n,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,n,t);return e.transform=null,e}function Y(e,t){const{geometryType:r,features:i,hasM:n,hasZ:s}=t;if(!e)return t;for(let t=0;t<i.length;t++){const o=i[t],a=o.weakClone();a.geometry=new c.A,W(a.geometry,o.geometry,n,s,r,e),o.centroid&&(a.centroid=new c.A,W(a.centroid,o.centroid,n,s,"esriGeometryPoint",e)),i[t]=a}return t.transform=e,t}function W(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),y=d(r&&o,i&&a),f=v(r,i,o,a);if(!p.length)return f(e.coords,u,0,0,I(s,u[0]),S(s,u[1])),ae(e,c,0),e;let m,g,w,T,M=0,F=0,b=F;for(const t of p){if(t<l)continue;let r=0;F=b,w=m=I(s,u[M]),T=g=S(s,u[M+1]),f(e.coords,u,F,M,w,T),r++,M+=c,F+=y;for(let i=1;i<t;i++,M+=c)w=I(s,u[M]),T=S(s,u[M+1]),w===m&&T===g||(f(e.coords,u,F,M,w-m,T-g),F+=y,r++,m=w,g=T);r>=l&&(e.lengths.push(r),b=F)}return le(e.coords,b),e.coords.length?e:null}function X(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),y=d(r&&o,i&&a),f=v(r,i,o,a);if(!p.length)return f(e.coords,u,0,0,u[0],u[1]),ae(e,c,0),e;let m=0;const g=s*s;for(const t of p){if(t<l){m+=t*c;continue}const r=e.coords.length/y,i=m,n=m+(t-1)*c;f(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,c,g,f,i,n),f(e.coords,u,e.coords.length,n,u[n],u[n+1]);const s=e.coords.length/y-r;s>=l?e.lengths.push(s):le(e.coords,r*y),m+=t*c}return e.coords.length?e:null}function ee(e,t,r,i){const n=e[t],s=e[t+1],o=e[r],a=e[r+1],l=e[i],u=e[i+1];let p=o,c=a,d=l-p,y=u-c;if(0!==d||0!==y){const e=((n-p)*d+(s-c)*y)/(d*d+y*y);e>1?(p=l,c=u):e>0&&(p+=d*e,c+=y*e)}return d=n-p,y=s-c,d*d+y*y}function te(e,t,r,i,n,s,o){let a,l=i,u=0;for(let e=s+r;e<o;e+=r)a=ee(t,e,s,o),a>l&&(u=e,l=a);l>i&&(u-s>r&&te(e,t,r,i,n,s,u),n(e,t,e.length,u,t[u],t[u+1]),o-u>r&&te(e,t,r,i,n,u,o))}function re(e,t,r,i){if(!t?.coords?.length)return null;const n=d(r,i);let s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];s=Math.min(s,r),u=Math.max(u,r),l=Math.min(l,i),p=Math.max(p,i)}}return(0,o.is)(e)?(0,o.BI)(e,s,l,u,p):(0,a.fA)(s,l,u,p,e),e}function ie(e,t,r,i,n){const{coords:o,lengths:a}=t,l=d(r,i);if(!o.length)return e!==t&&ae(e),e;(0,s.Lw)(n);const{originPosition:u,scale:p,translate:c}=n,y=ue;y.originPosition=u;const h=y.scale;h[0]=p[0]??1,h[1]=-(p[1]??1),h[2]=p[2]??1,h[3]=p[3]??1;const f=y.translate;if(f[0]=c[0]??0,f[1]=c[1]??0,f[2]=c[2]??0,f[3]=c[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=T(y,o[t],t);return e!==t&&ae(e,l,0),e}let m=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[m+t]=T(y,o[m+t],t);let i=e.coords[m],n=e.coords[m+1];m+=l;for(let t=1;t<r;t++,m+=l){i+=o[m]*h[0],n+=o[m+1]*h[1],e.coords[m]=i,e.coords[m+1]=n;for(let t=2;t<l;++t)e.coords[m+t]=T(y,o[m+t],t)}}return e!==t&&ae(e,o.length,a.length),e}function ne(e,t,r,i,n,s){if(ae(e),e.lengths.push(...t.lengths),r===n&&i===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const o=d(r,i),a=v(r,i,n,s),l=t.coords;for(let t=0;t<l.length;t+=o)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function se(e,t,r,i){let n=0,s=e[i*t],o=e[i*(t+1)];for(let a=1;a<r;a++){const r=s+e[i*(t+a)],l=o+e[i*(t+a)+1],u=(r-s)*(l+o);s=r,o=l,n+=u}return.5*n}function oe(e,t){const{coords:r,lengths:i}=e;let n=0,s=0;for(let e=0;e<i.length;e++){const o=i[e];s+=se(r,n,o,t),n+=o}return Math.abs(s)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>I});var i=r(90237),n=r(60945),s=r(49186),o=r(84952),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(36005)),p=r(40608),c=r(43937),d=r(89317),y=r(45917),h=r(49422);const f={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},w={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":f,"web-map/basemap":m,"web-map/tables":g,"link-chart/operational-layers":{...f,LinkChartLayer:!0},"link-chart/basemap":m,"link-chart/tables":g,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var v=r(10873);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,h.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?n.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new s.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,y.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=w[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new s.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.A&&"web-document-write:property-required"===e.name)).length;return(0,o.w8)(r?.url)?(t?.messages?.push(new s.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,u.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,a.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,c.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:d.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,c.K)("title"),(0,c.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,a.MZ)({type:n.A,json:{origins:{"web-scene":{write:{layerContainerTypes:d.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,u.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,c.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:d.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>l});var i=r(90237),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}},write:{writer:function(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(90237),n=r(92602),s=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),w=r(20655),v=r(80812),I=r(41318),S=r(10407);const T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.It)(r);let n,o;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,l=!1,u=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=w.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?I.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>v});var i=r(90237),n=(r(44208),r(53966)),s=r(74887),o=r(10107),a=r(79901),l=(r(87811),r(40608)),u=r(89317),p=r(5503),c=(r(60999),r(49186),r(14012),r(80559));const d=new p.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function w(){const e=Date.now();let t=!1;for(const r of d){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,c.fm)((()=>{const e=Date.now();let t=0;for(const r of d){const i=r.deref();i&&(t=f(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(w,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=d.find((t=>t.deref()===e));t&&d.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.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,n.O)(o.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,l.$)("esri.layers.support.FeatureTemplate")],p);const c=p},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(72088),c=r(29005);let d=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],d);const y=d},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,c=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(s),p],[y(o),p]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=c.get(y(i??""))??a;t.set(i,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=i=class extends o.oY{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,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const c=p},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),s=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),y=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.oY{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){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.A.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const 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,u.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){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s: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=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const 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,n){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=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(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)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.w)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1932],{35448:(e,t,r)=>{var n,o,i,a,s,l,d;r.d(t,{Eq:()=>n,bV:()=>i,nP:()=>s,r5:()=>o,ti:()=>l,vy:()=>d,wr:()=>a}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(n||(n={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(o||(o={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(i||(i={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(a||(a={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(s||(s={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(d||(d={}))},45724:(e,t,r)=>{r.d(t,{I:()=>l});var n=r(2741),o=r(44208);const i="esri/rest/knowledgeGraph/wasmInterface/";let a,s=null;async function l(){const e=s??a;if(e)return e;const t=(0,o.A)("wasm-simd");return a=d(t),a}async function d(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,n.s)(i+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,n.s)(i+e)})}},71932:(e,t,r)=>{r.r(t),r.d(t,{_fetchWrapper:()=>Fe,executeApplyEdits:()=>Ae,executeQuery:()=>be,executeQueryStreaming:()=>Se,executeSearch:()=>xe,executeSearchStreaming:()=>ke,fetchKnowledgeGraph:()=>Pe,kgRestServices:()=>Ge,refreshDataModel:()=>Oe,refreshServiceDefinition:()=>je}),r(59456);var n=r(70333),o=r(78888),i=r(49186),a=r(53966),s=r(90237),l=r(69622),d=r(10107),p=(r(44208),r(87811),r(40608));let u=class extends l.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,s._)([(0,d.MZ)()],u.prototype,"headerKeys",void 0),(0,s._)([(0,d.MZ)()],u.prototype,"outSpatialReference",void 0),(0,s._)([(0,d.MZ)()],u.prototype,"exceededTransferLimit",void 0),u=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],u);const c=u;let y=class extends l.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new c}};(0,s._)([(0,d.MZ)()],y.prototype,"resultRows",void 0),(0,s._)([(0,d.MZ)()],y.prototype,"resultHeader",void 0),y=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.GraphQueryResult")],y);const h=y;let f=class extends l.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new c}};(0,s._)([(0,d.MZ)()],f.prototype,"resultRowsStream",void 0),(0,s._)([(0,d.MZ)()],f.prototype,"resultHeader",void 0),f=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],f);const _=f;var g=r(25482),w=r(16930);let m=class extends g.oY{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"unique",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"ascending",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],m.prototype,"description",void 0),(0,s._)([(0,d.MZ)({type:[String],json:{write:!0}})],m.prototype,"fieldNames",void 0),m=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.FieldIndex")],m);const v=m;let E=class extends g.oY{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"name",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"alias",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"fieldType",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"geometryType",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"hasM",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"hasZ",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"nullable",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"editable",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"required",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"defaultVisibility",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"systemMaintained",void 0),(0,s._)([(0,d.MZ)()],E.prototype,"role",void 0),(0,s._)([(0,d.MZ)({json:{write:!0}})],E.prototype,"defaultValue",void 0),E=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.GraphProperty")],E);const T=E;let M=class extends g.oY{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null,this.type=null}};(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],M.prototype,"name",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],M.prototype,"alias",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],M.prototype,"role",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"strict",void 0),(0,s._)([(0,d.MZ)({type:[T],json:{write:!0}})],M.prototype,"properties",void 0),(0,s._)([(0,d.MZ)({type:[v],json:{write:!0}})],M.prototype,"fieldIndexes",void 0),M=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.GraphObjectType")],M);const I=M;let R=class extends I{constructor(e){super(e),this.type="entity"}};R=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.EntityType")],R);const G=R;let A=class extends I{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,s._)([(0,d.MZ)()],A.prototype,"endPoints",void 0),A=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.RelationshipType")],A);const b=A;let S=class extends g.oY{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null,this.metaEntityTypes=null}};(0,s._)([(0,d.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],S.prototype,"timestamp",void 0),(0,s._)([(0,d.MZ)({type:w.A,json:{write:!0}})],S.prototype,"spatialReference",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"strict",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],S.prototype,"objectIdField",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],S.prototype,"globalIdField",void 0),(0,s._)([(0,d.MZ)()],S.prototype,"arcgisManaged",void 0),(0,s._)([(0,d.MZ)()],S.prototype,"identifierInfo",void 0),(0,s._)([(0,d.MZ)()],S.prototype,"searchIndexes",void 0),(0,s._)([(0,d.MZ)({type:[G],json:{write:!0}})],S.prototype,"entityTypes",void 0),(0,s._)([(0,d.MZ)({type:[b],json:{write:!0}})],S.prototype,"relationshipTypes",void 0),(0,s._)([(0,d.MZ)({type:[G],json:{write:!0}})],S.prototype,"metaEntityTypes",void 0),S=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.DataModel")],S);const x=S;let k=class extends g.oY{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,s._)([(0,d.MZ)({type:[String],json:{write:!0}})],k.prototype,"capabilities",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"supportsSearch",void 0),(0,s._)([(0,d.MZ)({type:[String],json:{write:!0}})],k.prototype,"supportedQueryFormats",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"allowGeometryUpdates",void 0),(0,s._)([(0,d.MZ)({type:Number,json:{write:!0}})],k.prototype,"searchMaxRecordCount",void 0),(0,s._)([(0,d.MZ)({type:Object,json:{write:!0}})],k.prototype,"serviceCapabilities",void 0),(0,s._)([(0,d.MZ)({type:Number,json:{write:!0}})],k.prototype,"maxRecordCount",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],k.prototype,"description",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],k.prototype,"copyrightText",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],k.prototype,"units",void 0),(0,s._)([(0,d.MZ)({type:w.A,json:{write:!0}})],k.prototype,"spatialReference",void 0),(0,s._)([(0,d.MZ)({type:Number,json:{write:!0}})],k.prototype,"currentVersion",void 0),(0,s._)([(0,d.MZ)({type:Object,json:{write:!0}})],k.prototype,"dateFieldsTimeReference",void 0),(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],k.prototype,"serviceItemId",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"supportsDocuments",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"dataEditingNotSupported",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"schemaEditingNotSupported",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"supportsProvenance",void 0),k=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.ServiceDefinition")],k);const P=k;let O=class extends g.oY{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,s._)([(0,d.MZ)({type:String,json:{write:!0}})],O.prototype,"url",void 0),(0,s._)([(0,d.MZ)({type:x,json:{write:!0}})],O.prototype,"dataModel",void 0),(0,s._)([(0,d.MZ)({type:P,json:{write:!0}})],O.prototype,"serviceDefinition",void 0),O=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],O);const j=O;var F,Z,D,N=r(45724),L=r(48526),z=r(86738),C=r(39829),Y=r(82799);!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(F||(F={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Z||(Z={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(D||(D={}));var q=r(91075);function U(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(B(e,t))})),r}function H(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,B(o,t));return r}function Q(e,t){if(e instanceof L.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=e.points.length;let i=0;return e.points.forEach((e=>{e.forEach((e=>{n[i]=e,i++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof z.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let i=2;return e.hasZ&&(n[i]=e.z,i++),e.hasM&&(n[i]=e.m,i++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof Y.A||e instanceof C.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let i=[];e instanceof Y.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,i=e.paths):e instanceof C.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,i=e.rings);let a=0,s=0;return i.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[s]=e,s++}))})),o[a]=t,a++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function B(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof q.A)return Q(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(B(e,t))})),r}return H(e,t)}var V=r(25927),W=r(23150);function $(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof V.A){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,K(o,t));return e.id&&r.set_id(e.id),r}if(e instanceof W.A){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,K(o,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function K(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof q.A?Q(e,t):null}let J=class extends l.A{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,s._)([(0,d.MZ)()],J.prototype,"name",void 0),(0,s._)([(0,d.MZ)()],J.prototype,"supportedCategory",void 0),(0,s._)([(0,d.MZ)()],J.prototype,"analyzers",void 0),(0,s._)([(0,d.MZ)()],J.prototype,"searchProperties",void 0),J=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.SearchIndex")],J);const X=J;var ee=r(35448);function te(e){return e.deleteLater(),new G(ne(e))}function re(e){return e.deleteLater(),new v({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:se(e.fields)})}function ne(e){return{name:e.name,alias:e.alias,role:ee.Eq[e.role.value]?ee.Eq[e.role.value]:null,strict:e.strict,properties:le(e.properties),fieldIndexes:de(e.field_indexes)}}function oe(e){return e.deleteLater(),new T({alias:e.alias,name:e.name,fieldType:ee.r5[e.field_type.value]?ee.r5[e.field_type.value]:null,geometryType:ee.bV[e.geometry_type.value]?ee.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:ee.ti[e.role.value],defaultValue:e.default_value})}function ie(e){e.deleteLater();const t=ne(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new b(Object.assign({endPoints:r},t))}function ae(e){const t=[];for(let r=0;r<e.size();r++)t.push(te(e.get(r)));return e.delete(),t}function se(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function le(e){const t=[];for(let r=0;r<e.size();r++)t.push(oe(e.get(r)));return e.delete(),t}function de(e){const t=[];for(let r=0;r<e.size();r++)t.push(re(e.get(r)));return e.delete(),t}function pe(e){const t=[];for(let r=0;r<e.size();r++)t.push(ie(e.get(r)));return e.delete(),t}function ue(e){const t=[];for(let r=0;r<e.size();r++){const r=new X,n=e.get(0);r.name=n.name,r.supportedCategory=ee.nP[n.supported_category.value];const o=n.analyzers.size();for(let e=0;e<o;e++)r.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),o=n.search_properties.get(t),i=[];for(let e=0;e<o.property_names.size();e++)i.push(o.property_names.get(e));r.searchProperties.set(t,{propertyNames:i})}t.push(r)}return e.delete(),t}r(77901);var ce,ye=r(40662),he=r(42095);function fe(e,t){const r={spatialReference:t},n=_e(e,r),o=e.lengths,a=e.coords;let s="";if(e.geometry_type.value===ce.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==ce.ESRI_GEOMETRY_POLYLINE)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}r[s]=[];let l=0;return o.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=a[l],l++;t.push(e)}r[s].push(t)})),r}function _e(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(ce||(ce={}));const ge=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),we={decodedWasmObjToQueryResponseObj:(e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case ce.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let n=2;_e(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new z.A(r)}(e,r);case ce.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},n=_e(e,r),o=e.lengths,i=e.coords,a=o[0];r.points=[];let s=0;for(let e=0;e<a;e++){const e=[];for(let t=0;t<n;t++)e[t]=i[s],s++;r.points.push(e)}return new L.A(r)}(e,r);case ce.ESRI_GEOMETRY_POLYLINE:return function(e,t){return new Y.A(fe(e,t))}(e,r);case ce.ESRI_GEOMETRY_POLYGON:return function(e,t){return new C.A(fe(e,t))}(e,r);case ce.ESRI_GEOMETRY_ENVELOPE:case ce.ESRI_GEOMETRY_MULTI_PATCH:return ge().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case ce.ESRI_GEOMETRY_NULL:case ce.ESRI_GEOMETRY_ANY:default:return ge().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return ge().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case F.OBJECT:return function(e,t,r){return new ye.A(Ee(e,t,r))}(e,t,r);case F.ENTITY:return ve(e,t,r);case F.RELATIONSHIP:return Te(e,t,r);case F.PATH:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),i=[];for(let a=0;a<n;a++)i.push(ve(e.get_entity_at(a),t,r)),a<o&&i.push(Te(e.get_relationship_at(a),t,r));return new he.A({path:i})}(e,t,r);case F.ARRAY:return function(e,t,r){const n=[],o=e.count();for(let i=0;i<o;i++){const o=e.get_value_at(i);n.push(me(o,t,r))}return n}(e,t,r);default:return ge().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}}};function me(e,t,r){return we.decodedWasmObjToQueryResponseObj(e,t,r)}function ve(e,t,r){const n=e.type_name,o=Ee(e,t,r),i=e.get_id();return new V.A(Object.assign({typeName:n,id:i},o))}function Ee(e,t,r){const n={},o=e.key_count();for(let i=0;i<o;i++)n[e.get_key_at(i)]=me(e.get_value_at(i),t,r);return{properties:n}}function Te(e,t,r){const n=e.type_name,o=Ee(e,t,r);return new W.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function Me(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new w.A(e.get_out_sr());return new c({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let Ie=class extends l.A{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,s._)([(0,d.MZ)()],Ie.prototype,"hasError",void 0),(0,s._)([(0,d.MZ)()],Ie.prototype,"error",void 0),(0,s._)([(0,d.MZ)()],Ie.prototype,"editResults",void 0),Ie=(0,s._)([(0,p.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],Ie);const Re=Ie,Ge={fetchKnowledgeGraph:async e=>{const t=new j({url:e}),r=[];return r.push(Oe(t)),r.push(je(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await Ye(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new P(t),e.serviceDefinition},executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await Ze(e);const o=await Le(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");o.data.body=await async function(e,t){const r=await(0,N.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,o]of Object.entries(e.bindParameters))Ne(t,o,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Oe(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:D[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t,e);const a=await Fe(o.data.url,o.data);if(e.dataModel){const t=await Ce(a,e.dataModel);return new _({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await Ze(e);const o=await Le(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Oe(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,N.I)(),n=!!e.options?.cascadeDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=o.add_entity($(e,r)),De(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=o.add_relationship($(e,r)),De(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity($(e,r)),De(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship($(e,r)),De(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),o.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const a=o.get_encoding_result();return De(a.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(a.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,N.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new Re({hasError:t,error:t?{errorCode:e.error.error_code,errorMessage:e.error.error_message}:null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),o=e.get_edit_results_type_name_at(t),i=[],a=[],s=[],l=n.get_add_results_count(),d=n.get_update_results_count(),p=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);i.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=n.get_update_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=n.get_delete_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}r.editResults.push({typeName:o,adds:i,updates:a,deletes:s})}return r}(r)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await Fe(o.data.url,o.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,N.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ze(t,l,e.dataModel);return new h({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:a.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,a=`${e.url}/graph/search`,s=await(0,o.A)(a,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=s.getHeader?.("content-type"),d=s.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,N.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ze(t,d,e.dataModel);return new h({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await Ze(e);const o=await Le(n,r);o.data.body=await async function(e){const t=await(0,N.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(U(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t);const a=await Fe(o.data.url,o.data);if(e.dataModel){const t=await Ce(a,e.dataModel);return new _({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function Ae(e,t,r){return Ge.executeApplyEdits(e,t,r)}async function be(e,t,r){return Ge.executeQuery(e,t,r)}async function Se(e,t,r){return Ge.executeQueryStreaming(e,t,r)}async function xe(e,t,r){return Ge.executeSearch(e,t,r)}async function ke(e,t,r){return Ge.executeSearchStreaming(e,t,r)}async function Pe(e){return Ge.fetchKnowledgeGraph(e)}async function Oe(e){return Ge.refreshDataModel(e)}async function je(e){return Ge.refreshServiceDefinition(e)}async function Fe(e,t){return Ge._fetchWrapper(e,t)}async function Ze(e){const t=n.id?.findCredential(e.url);t||(e.dataModel?await Ye(e):await Oe(e))}function De(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function Ne(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof q.A?r.set_param_key_value(e,Q(t,n)):Array.isArray(t)?r.set_param_key_value(e,U(t,n)):r.set_param_key_value(e,H(t,n))}async function Le(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function ze(e,t,r,n){e.push_buffer(new Uint8Array(t));const o=[];let a,s,l=0;for(;e.next_row();){a&&s||(a=n??Me(e),s=a.outSpatialReference??new w.A({wkid:4326})),l||(l=e.get_header_keys().size());const t=new Array(l);for(let n=0;n<l;n++){const o=e.get_value(n);t[n]=me(o,r,s)}o.push(t)}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:a,resultRows:o}}async function Ce(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,N.I)()).GraphQueryDecoder);let o,s,l;n.deleteLater();const d=new Promise(((e,t)=>{s=e,l=t}));let p=!1;return{readableStream:new ReadableStream({async start(e){try{return function d(){return r?.read().then((({done:u,value:y})=>{try{if(u){let t;if(n.has_error()?t=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):p||s(new c),r.releaseLock(),t)throw e.error(t),l(t),t;return void e.close()}const a=ze(n,y,t,o),h=a.resultRows;return h.length>0&&e.enqueue(h),!o&&a.resultHeader&&(o=a.resultHeader,s(a.resultHeader),p=!0),d()}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),l(e),new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}))}()}catch(t){r?.releaseLock(),e.error(new i.A("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}}),resultHeader:await d}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function Ye(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),a=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,N.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(a));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new x({timestamp:e.timestamp,spatialReference:new w.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:ee.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:ee.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:ue(e.search_indexes),entityTypes:ae(e.entity_types),relationshipTypes:pe(e.relationship_types),metaEntityTypes:ae(e.meta_entity_types)})}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
4
- * v2.8.1
4
+ * v2.8.3
5
5
  */
6
6
 
7
7
  /*!
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
4
- * v2.8.1
4
+ * v2.8.3
5
5
  */