@arcgis/core 5.2.0-next.22 → 5.2.0-next.24

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 (152) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/04070767356c12026369.js +1 -0
  3. package/assets/esri/core/workers/chunks/10112bf4b385f1955a3d.js +1 -0
  4. package/assets/esri/core/workers/chunks/{b0b3c67b7d37bd854d95.js → 1040bce57ea63a6dbca4.js} +2 -2
  5. package/assets/esri/core/workers/chunks/{3b74749db78bcba2bc16.js → 126a8c26618425790804.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{d4e0346209fabc58f929.js → 15fd30908d5db7f7136e.js} +3 -3
  7. package/assets/esri/core/workers/chunks/{1a4bec464daa9662ab2a.js → 1a7c0a1dc6ecc93ea03a.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{73b0edabddbb72fe1104.js → 1b5001bdfeecf78c33ce.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{57e04b7ec238f7b24274.js → 1f03e34520746e432719.js} +1 -1
  10. package/assets/esri/core/workers/chunks/218e2d8d6cd147c769ce.js +1 -0
  11. package/assets/esri/core/workers/chunks/{2c4f10eaf02ef090ee8f.js → 23f81f4a3d7a983eef23.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{a856ae928273f9d6792f.js → 268ee59800e64baa9682.js} +1 -1
  13. package/assets/esri/core/workers/chunks/26a2d4b95cda0a41d980.js +1 -0
  14. package/assets/esri/core/workers/chunks/{f02a9408ba3893484c6c.js → 2d6d01913096f7cb5ff8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2e7b83c8ba78cb06d611.js +1 -0
  16. package/assets/esri/core/workers/chunks/{7fc8516111bd869256fc.js → 30298f84bd414f9dea64.js} +1 -1
  17. package/assets/esri/core/workers/chunks/316a3d5c7842b445e29e.js +1 -0
  18. package/assets/esri/core/workers/chunks/{84a0bb53fcbd99b5aa0c.js → 33e86dd1a54e447fa0e3.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{5fab14c5f1febebb75f1.js → 34eb22ee13df24271532.js} +1 -1
  20. package/assets/esri/core/workers/chunks/353c67da4b25c29360db.js +2 -0
  21. package/assets/esri/core/workers/chunks/{3d83ac791212b81c9d11.js → 36b904912cea1744d1c6.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{f8cfd0045d06aa24beec.js → 3b7060d264888bf298b1.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{f9b44ff9bb4f7a88ab56.js → 3d1021f7ea9617a76ccf.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{60d4a3f770bb1e01cd10.js → 3e4b379a6a197b9c4e6b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4f51963815b0d53ffbd9.js → 3e94ed4d57ee7d870cba.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{7d220f574ebf2740c208.js → 41aca863324387576cf8.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{a54773c9bbc751619b3f.js → 47948c72bc01bd173c20.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{cbe8adc100582e746a8c.js → 4adfe7f8a8efe2cd8e80.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{e29c8c10331edfa83277.js → 502464c4eab7667f6566.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{e9acc05b0cf9e05f31a8.js → 50b34e246f8eef2f6e07.js} +1 -1
  31. package/assets/esri/core/workers/chunks/52993a9dc0c56e9bda19.js +1 -0
  32. package/assets/esri/core/workers/chunks/5b654e0dc901a7f06a9f.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dd795c95cdc3812b5b49.js → 6adc17e6e287a365ad8d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{40df6ffeb61fea80aae3.js → 7849cf0352c0a604e164.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{6c0c77de1934f35dc45f.js → 7c34eb94e2c74602aeab.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{8579eba21f40630d073d.js → 7dbaa089c7472825b80c.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{66c2cfe11161d5dc989a.js → 7dec8c453fdee1968d12.js} +1 -1
  38. package/assets/esri/core/workers/chunks/7e4093f42795ba2f8cfd.js +1 -0
  39. package/assets/esri/core/workers/chunks/856cf872d29eeaf11a71.js +1 -0
  40. package/assets/esri/core/workers/chunks/88b08b386926ec889573.js +1 -0
  41. package/assets/esri/core/workers/chunks/{1b0765403b06294b3e1d.js → 89dd1b1acb0d69264c93.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5d710b3e50f2211a765d.js → 8b526ca2dd6fc6a7e921.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{50345dfc00380b158c96.js → 8ba3e0462a9bdaae5f40.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{c86d388d216adbb15a05.js → 8bd4c43c34aacf3b07da.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{69e98de578f467a35054.js → a0b78cbeb0e53107d819.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{fee50ab6c92ef0327255.js → a454df829a72ab02c860.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{5481af25fd46914498df.js → a6dc01847f39413f78b8.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{44e32ed3a570593a7245.js → a8310f55de4749f973d0.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{5dd441db1e74dc9b56e9.js → acc733b4881c3e4e503e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{0b45d34938fa7862f746.js → affc972757798b6db002.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{9f93c29af2a18f7cb160.js → b45e91249a8ea1559a2b.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{f955b35337a08f9f747d.js → c610ccbfdb1c5b06c217.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{fb9f8b6cc2b4ae5b60df.js → c9ce408675dae6a0edd1.js} +1 -1
  54. package/assets/esri/core/workers/chunks/cd88e6f02bc2e5b67abf.js +1 -0
  55. package/assets/esri/core/workers/chunks/d374cb2d17a2d11c500f.js +1 -0
  56. package/assets/esri/core/workers/chunks/{5b42f8aa0247adc2d065.js → d41eed41916ed0422059.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{8eda85fc01a71aedd9e4.js → dadf85890961bcc205eb.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{2255a21c7b959f04d941.js → db90fb8ac96579259566.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{ef94d25d1cceb25ea9fe.js → dd0acd0f8b96839b4f24.js} +2 -2
  60. package/assets/esri/core/workers/chunks/e3623e557ab463580fd2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{d523af1db620b5381c99.js → e8e7cd26c43f231cdea2.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{162dada6a199d1efdf86.js → f859c53432f258af77e3.js} +2 -2
  63. package/chunks/OITBlendEmission.glsl.js +5 -2
  64. package/config.d.ts +9 -2
  65. package/config.js +1 -1
  66. package/form/elements/AttachmentElement.d.ts +4 -4
  67. package/kernel.js +1 -1
  68. package/layers/OrientedImageryLayer.d.ts +20 -2
  69. package/layers/orientedImagery/types.d.ts +4 -1
  70. package/layers/save/featureLayerUtils.js +1 -1
  71. package/layers/save/utils.js +1 -1
  72. package/layers/support/fetchService.js +1 -1
  73. package/package.json +3 -3
  74. package/portal/support/portalItemUtils.js +1 -1
  75. package/support/revision.js +1 -1
  76. package/symbols/CIMSymbol.d.ts +2 -3
  77. package/symbols/cim/types.d.ts +58 -2
  78. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  79. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  80. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
  81. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  82. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  83. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  84. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  85. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  86. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  87. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  88. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  89. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  90. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  91. package/views/3d/state/utils/navigationUtils.js +1 -1
  92. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  93. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  94. package/views/3d/webgl/RenderCamera.js +1 -1
  95. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  96. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  97. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +4 -4
  98. package/views/PopupView.d.ts +3 -0
  99. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  100. package/widgets/BatchAttributeForm/types.d.ts +0 -7
  101. package/widgets/BatchAttributeForm.d.ts +7 -9
  102. package/widgets/BatchAttributeForm.js +1 -1
  103. package/widgets/Editor/EditorViewModel.d.ts +12 -2
  104. package/widgets/Editor/EditorViewModel.js +1 -1
  105. package/widgets/Editor/compatibilityAdapters.js +2 -0
  106. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  107. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  108. package/widgets/Editor/legacy/AddAssociationWorkflow.js +2 -0
  109. package/widgets/Editor/legacy/AddAssociationWorkflowData.js +2 -0
  110. package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +2 -0
  111. package/widgets/Editor/legacy/CreateFeaturesWorkflowData.js +2 -0
  112. package/widgets/Editor/legacy/MergeFeaturesWorkflow.js +2 -0
  113. package/widgets/Editor/legacy/MergeFeaturesWorkflowData.js +2 -0
  114. package/widgets/Editor/legacy/SplitFeatureWorkflow.js +2 -0
  115. package/widgets/Editor/legacy/SplitFeatureWorkflowData.js +2 -0
  116. package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +2 -0
  117. package/widgets/Editor/legacy/UpdateFeatureWorkflowData.js +2 -0
  118. package/widgets/Editor/legacy/UpdateFeaturesWorkflow.js +2 -0
  119. package/widgets/Editor/legacy/UpdateFeaturesWorkflowData.js +2 -0
  120. package/widgets/Editor/legacy/UpdateRecordWorkflow.js +2 -0
  121. package/widgets/Editor/legacy/UpdateRecordWorkflowData.js +2 -0
  122. package/widgets/Editor/legacy/UpdateWorkflow.js +2 -0
  123. package/widgets/Editor/legacy/UpdateWorkflowData.js +2 -0
  124. package/widgets/Editor/legacy/Workflow.js +2 -0
  125. package/widgets/Editor/legacy/workflowUtils.js +2 -0
  126. package/widgets/Editor/workflowUtils.js +1 -1
  127. package/widgets/Editor.js +1 -1
  128. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  129. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +2 -1
  130. package/widgets/FeatureTable/Grid/GridViewModel.d.ts +3 -0
  131. package/widgets/Sketch/SketchViewModel.d.ts +8 -1
  132. package/widgets/Sketch/types.d.ts +12 -0
  133. package/assets/esri/core/workers/chunks/0eb0ce43b4813cae968f.js +0 -2
  134. package/assets/esri/core/workers/chunks/0fb685f385e91d0f0601.js +0 -1
  135. package/assets/esri/core/workers/chunks/277718031c903da2b3b9.js +0 -1
  136. package/assets/esri/core/workers/chunks/47d630561f3fce5c63c4.js +0 -1
  137. package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +0 -1
  138. package/assets/esri/core/workers/chunks/5b238f9c345f10c5c2fa.js +0 -1
  139. package/assets/esri/core/workers/chunks/9ad36947bb42ed7f97d3.js +0 -1
  140. package/assets/esri/core/workers/chunks/9e0ea6c34940b1acf3c6.js +0 -1
  141. package/assets/esri/core/workers/chunks/aec46ec486912dca549d.js +0 -1
  142. package/assets/esri/core/workers/chunks/be4275a4b8977ec3eb61.js +0 -1
  143. package/assets/esri/core/workers/chunks/d6bb8db22ba85ad05fd7.js +0 -1
  144. package/assets/esri/core/workers/chunks/d8329c2000c0cc597adc.js +0 -1
  145. package/assets/esri/core/workers/chunks/dee339774131d7274137.js +0 -1
  146. package/assets/esri/core/workers/chunks/f3fe865506fd7428eb6d.js +0 -1
  147. package/assets/esri/core/workers/chunks/fccc34b86454c56f27ab.js +0 -1
  148. /package/assets/esri/core/workers/chunks/{b0b3c67b7d37bd854d95.js.LICENSE.txt → 1040bce57ea63a6dbca4.js.LICENSE.txt} +0 -0
  149. /package/assets/esri/core/workers/chunks/{0eb0ce43b4813cae968f.js.LICENSE.txt → 353c67da4b25c29360db.js.LICENSE.txt} +0 -0
  150. /package/assets/esri/core/workers/chunks/{a54773c9bbc751619b3f.js.LICENSE.txt → 47948c72bc01bd173c20.js.LICENSE.txt} +0 -0
  151. /package/assets/esri/core/workers/chunks/{ef94d25d1cceb25ea9fe.js.LICENSE.txt → dd0acd0f8b96839b4f24.js.LICENSE.txt} +0 -0
  152. /package/assets/esri/core/workers/chunks/{162dada6a199d1efdf86.js.LICENSE.txt → f859c53432f258af77e3.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3897],{60999(e,t,r){r.d(t,{DZ:()=>f,Ke:()=>d,Tj:()=>c,UT:()=>y,aD:()=>g,jJ:()=>u});var i=r(5482),n=r(69622),l=r(97768),s=r(17676),o=r(10107),a=r(64108);function u(e,t,r){return(0,s.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function c(e,t,r){return(await(0,s.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return h(e)}}async function f(e){try{return p(await e)}catch(e){return(0,s.QP)(e),h(e)}}function y(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=h(e),this._cleanup()}),this._abortHandle=(0,s.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],m);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},90629(e,t,r){r.d(t,{Lz:()=>n,PN:()=>l,cr:()=>s,gs:()=>a,r_:()=>u,tc:()=>o}),r(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function n(e){return e?e/72*96:0}function l(e){return e?72*e/96:0}function s(e){if("string"==typeof e){const t=e.match(i);if(t){const r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n=e.startsWith("-"),s="px"===i?l(r):r;return n?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function o(e=0,t=0){return{x:e,y:t}}function a(e=0,t=0){return[e,t]}function u(e=0,t=0,r=0){return[e,t,r]}},159(e,t,r){r.d(t,{A:()=>u});var i,n=r(5482),l=r(69540),s=r(25482),o=r(91429),a=r(99157);let u=i=class extends((0,l.OU)(s.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,o.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=i=(0,n.Cg)([(0,o.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>a});var i,n=r(5482),l=r(69540),s=r(25482),o=r(91429);let a=i=class extends((0,l.OU)(s.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,o.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],a.prototype,"isInverse",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=i=(0,n.Cg)([(0,o.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(49208);function n(e,t,r,n,l,s,o=Math.floor(e.length/3)){const a=(0,i.jd)(t,l);if(null==a)return!1;if(a===i.pO){if(e===n&&r===s)return!0;const t=r+3*o;for(let i=r,l=s;i<t;i++,l++)n[l]=e[i]??0;return!0}const u=r+3*o;for(let t=r,i=s;t<u;t+=3,i+=3)a(e,t,n,i);return!0}},49208(e,t,r){r.d(t,{Tp:()=>p,jd:()=>c,pO:()=>d,w5:()=>u});var i=r(34727),n=r(86211),l=r(73941),s=r(79258),o=r(34403),a=r(21325);const u={2:{5:d,7:null,9:null,10:d,1:S,6:null,8:null,0:null,3:y,11:m,2:d,4:R},5:{5:d,7:null,9:null,10:d,1:S,6:null,8:null,0:null,3:y,11:m,2:d,4:R},7:{5:null,7:d,9:null,10:d,1:null,6:v,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:d,10:d,1:null,6:null,8:A,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,r,i){const n=e[t]/E,l=U-2*Math.atan(Math.exp(-e[t+1]/E)),s=E+(e[t+2]??0),o=Math.cos(l)*s;r[i]=Math.cos(n)*o,r[i+1]=Math.sin(n)*o,r[i+2]=Math.sin(l)*s},6:null,8:null,0:null,3:d,11:function(e,t,r,i){f(e,t,r,i),m(r,i,r,i)},2:f,4:function(e,t,r,i){f(e,t,r,i),R(r,i,r,i)}},4:{5:b,7:null,9:null,10:b,1:function(e,t,r,i){b(e,t,r,i),S(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){b(e,t,r,i),y(r,i,r,i)},11:function(e,t,r,i){b(e,t,r,i),m(r,i,r,i)},2:b,4:d},1:{5:M,7:null,9:null,10:M,1:d,6:null,8:null,0:null,3:function(e,t,r,i){M(e,t,r,i),y(r,i,r,i)},11:function(e,t,r,i){M(e,t,r,i),m(r,i,r,i)},2:M,4:function(e,t,r,i){M(e,t,r,i),R(r,i,r,i)}},6:{5:null,7:x,9:null,10:x,1:null,6:d,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:_,10:_,1:null,6:null,8:d,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:d,3:null,11:null,2:null,4:null},10:{5:d,7:d,9:d,10:d,1:S,6:v,8:A,0:null,3:y,11:m,2:d,4:R},11:{5:g,7:null,9:null,10:g,1:function(e,t,r,i){g(e,t,r,i),S(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){g(e,t,r,i),y(r,i,r,i)},11:d,2:g,4:function(e,t,r,i){g(e,t,r,i),R(r,i,r,i)}}};function c(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const r=h(e,C.source),i=h(t,C.dest);return 0===r&&0===i?(0,a.aI)(e,t)?C.projector=d:C.projector=null:C.projector=u[r][i],C}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,l.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===l.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===l.FY.wkt?t.spatialReferenceId=6:e.wkt===l.LJ.wkt?t.spatialReferenceId=8:(0,l.q8)(e)?t.spatialReferenceId=7:(0,l.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function d(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t]??0)}function f(e,t,r,i){r[i]=T*(e[t]/E),r[i+1]=T*(U-2*Math.atan(Math.exp(-e[t+1]/E))),r[i+2]=e[t+2]??0}function y(e,t,r,n){!function(e,t,r,n,l){const s=.4999999*Math.PI,o=(0,i.qE)(P*e[t+1],-s,s),a=Math.sin(o);r[n++]=P*e[t]*l.radius,r[n++]=l.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[n]=e[t+2]??0}(e,t,r,n,s.$O)}function m(e,t,r,i){r[i]=e[t]*O,r[i+1]=e[t+1]*O,r[i+2]=e[t+2]??0}function g(e,t,r,i){r[i]=e[t]*L,r[i+1]=e[t+1]*L,r[i+2]=e[t+2]??0}function w(e,t,r,i,n){const l=n+(e[t+2]??0),s=P*e[t],o=P*e[t+1],a=Math.cos(o)*l;r[i]=Math.cos(s)*a,r[i+1]=Math.sin(s)*a,r[i+2]=Math.sin(o)*l}function A(e,t,r,i){w(e,t,r,i,s.Sw.radius)}function v(e,t,r,i){w(e,t,r,i,s.sH.radius)}function S(e,t,r,i){w(e,t,r,i,s.$O.radius)}function I(e,t,r,n,l){const s=e[t],o=e[t+1],a=e[t+2]??0,u=Math.sqrt(s*s+o*o+a*a),c=(0,i.YN)(a/(0===u?1:u)),p=Math.atan2(o,s);r[n++]=T*p,r[n++]=T*c,r[n]=u-l}function _(e,t,r,i){I(e,t,r,i,s.Sw.radius)}function x(e,t,r,i){I(e,t,r,i,s.sH.radius)}function M(e,t,r,i){I(e,t,r,i,s.$O.radius)}function R(e,t,r,i){!function(e,t,r,i,n){const l=P*e[t],s=P*e[t+1],o=e[t+2]??0,a=Math.sin(s),u=Math.cos(s),c=n.radius/Math.sqrt(1-n.eccentricitySquared*a*a);r[i++]=(c+o)*u*Math.cos(l),r[i++]=(c+o)*u*Math.sin(l),r[i++]=(c*(1-n.eccentricitySquared)+o)*a}(e,t,r,i,s.$O)}function b(e,t,r,i){const n=o.TP,l=e[t],a=e[t+1],u=e[t+2]??0;let c,p,h,d,f,y,m,g,w,A,v,S,I,_,x,M,R,b,C,P,U;c=Math.abs(u),p=l*l+a*a,h=Math.sqrt(p),d=p+u*u,f=Math.sqrt(d),P=Math.atan2(a,l),y=u*u/d,m=p/d,_=n.a2/f,x=n.a3-n.a4/f,m>.3?(g=c/f*(1+m*(n.a1+_+y*x)/f),C=Math.asin(g),A=g*g,w=Math.sqrt(1-A)):(w=h/f*(1-y*(n.a5-_-m*x)/f),C=Math.acos(w),A=1-w*w,g=Math.sqrt(A)),v=1-s.$O.eccentricitySquared*A,S=s.$O.radius/Math.sqrt(v),I=n.a6*S,_=h-S*w,x=c-I*g,R=w*_+g*x,M=w*x-g*_,b=M/(I/v+R),C+=b,U=R+M*b/2,u<0&&(C=-C),r[i++]=T*P,r[i++]=T*C,r[i]=U}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:d},P=(0,i.kU)(1),T=(0,i.KJ)(1),U=.5*Math.PI,E=s.$O.radius,O=E*Math.PI/180,L=180/(E*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>z,initializeProjection:()=>Q,isEqualBaseGCS:()=>H,isLoaded:()=>E,isLoadedOrLoad:()=>O,isLoadedOrLoadFor:()=>L,load:()=>k,project:()=>D,projectAsync:()=>N,projectExtent:()=>ne,projectMany:()=>Z,projectMultipoint:()=>Y,projectOrLoad:()=>B,projectOrLoadMany:()=>K,projectPoint:()=>V,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>W,requiresLoad:()=>j,test:()=>q,tryProject:()=>$,unload:()=>G});var i=r(49186),n=r(17676),l=r(62788),s=r(95488),o=r(51850),a=r(21276),u=r(73941),c=r(5443),p=r(91075),h=r(48526),d=r(86738),f=r(39829),y=r(82799),m=r(16930),g=r(98764),w=r(159),A=r(9762),v=r(49208);function S(e,t,r,i,n,l){return I[0]=e,I[1]=t,I[2]=r,(0,A.projectBuffer)(I,i,0,n,l,0)}const I=(0,o.vt)();var _=r(60408),x=r(21325),M=r(52006);let R=null,b=null,C=null,P=null,T={};const U=new s.I;function E(){return!!(b?.isLoaded()&&C?.isLoaded()&&P?.isLoaded())}function O(){return!!E()||((0,l.gc)(U),k(),!1)}function L(e,t){return!e||!t||z(e,t)||O()}function j(e,t){return!z(e,t)&&!E()}async function k(e){null==R&&(R=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(b=e,b.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(C=e,C.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(P=e,P.load()))])),await R,(0,n.Te)(e),U.notify()}function D(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),Z(e,e[0].spatialReference,t,r)):((0,a.f)(e),Z([e],e.spatialReference,t,r)[0])}function Z(e,t,r,i){if(null==t||null==r)return e;if(z(t,r,i))return e.map(e=>W(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>W(e,t,m.A.WGS84)),m.A.WGS84,r,{zConversionDisabled:i?.zConversionDisabled});if(null==i?.geographicTransformation&&(0,u.jA)(r))return Z(e,t,m.A.WGS84).map(e=>W(e,m.A.WGS84,r));if(!E())throw new F;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:P.getTransformation(t,r,i.areaOfInterestExtent)||new w.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=T[e];n||(n=P.getTransformation(t,r)||new w.A,T[e]=n),i={geographicTransformation:n,zConversionDisabled:i?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?b.executeMany(e,r,i):C.executeMany(e,r,i)}function $(e,t,r){try{return D(e,t,r)}catch(e){return null}}function B(e,t){const r=K([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function K(e,t,r){if(!E())for(const r of e)if(null!=r&&!(0,x.aI)(r.spatialReference,t)&&(0,x.fn)(r.spatialReference)&&(0,x.fn)(t)&&!z(r.spatialReference,t))return(0,l.gc)(U),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,x.aI)(e.spatialReference,t)?e:(0,x.fn)(e.spatialReference)&&(0,x.fn)(t)?D(e,t,r):null)}}class F extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function G(){R=null,b=null,C=null,P=null,T={}}const q={get loadPromise(){return R}};async function N(e,t,r){if((0,n.Te)(r),!e)return e;const i=K(Array.isArray(e)?e:[e],t,r);if(i.pending)return await i.pending,(0,n.Te)(r),N(e,t,r);const l=i.geometries??[];return Array.isArray(e)?l:l[0]}function z(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,x.aI)(e,t)||(0,x.fn)(e)&&(0,x.fn)(t)&&!!(0,v.jd)(e,t))}function H(e,t){if((0,x.aI)(e,t))return!0;if(!(0,x.fn)(e)||!(0,x.fn)(t))return!1;const r=(0,x.oT)(e)||(0,x.K8)(e)||(0,x.x1)(e),i=(0,x.oT)(t)||(0,x.K8)(t)||(0,x.x1)(t);return r&&i}async function Q(e,t,r,i){if(E())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!z(t,r,n))return k(i)}else if(e&&t&&!z(e,t,r))return k(i);return(0,n.NO)(i)}function W(e,t,r){return e?(0,_.fT)(e)?J(e,t,new d.A,r,0):(0,_.ZC)(e)?le(e,t,new c.A,r,0):(0,_.Bi)(e)?ie(e,t,new f.A,r,0):(0,_.Rg)(e)?te(e,t,new y.A,r,0):(0,_.U9)(e)?X(e,t,new h.A,r,0):null:null}function V(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,r,i)}function J(e,t,r,i,n){ue[0]=e.x,ue[1]=e.y;const l=e.z;return ue[2]=void 0!==l?l:n,(0,A.projectBuffer)(ue,t,0,ue,i,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=i,void 0!==l||(0,u.xP)(i)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Y(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,i)}function X(e,t,r,i,n){const{points:l,hasZ:s,hasM:o}=e,a=[],u=l.length,c=[];for(const e of l)c.push(e[0],e[1],s?e[2]:n);if(!(0,A.projectBuffer)(c,t,0,c,i,0,u))return null;const p=ae(s,i);for(let e=0;e<u;++e){const t=3*e,r=c[t],i=c[t+1];p&&o?a.push([r,i,c[t+2],l[e][3]]):p?a.push([r,i,c[t+2]]):o?a.push([r,i,l[e][2]]):a.push([r,i])}return r.points=a,r.spatialReference=i,r.hasZ=s,r.hasM=o,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{curvePaths:l,paths:s,hasZ:o,hasM:a}=e;if(!(l?oe(l,o??!1,a??!1,t,r.curvePaths=[],i,n):se(s,o??!1,a??!1,t,r.paths,i,n)))return null;const u=ae(o,i);return r.spatialReference=i,r.hasZ=u,r.hasM=a,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{curveRings:l,rings:s,hasZ:o,hasM:a}=e;return(l?oe(l,o??!1,a??!1,t,r.curveRings=[],i,n):se(s,o??!1,a??!1,t,r.rings,i,n))?(r.spatialReference=i,r.hasZ=ae(o,i),r.hasM=a,r):null}function ne(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=le(e,e.spatialReference,t,r,i)}function le(e,t,r,i,n){const{xmin:l,ymin:s,xmax:o,ymax:a,hasZ:u,hasM:c}=e;if(!S(l,s,u?e.zmin:n,t,ue,i))return null;const p=ae(u,i);return r.xmin=ue[0],r.ymin=ue[1],p&&(r.zmin=ue[2]),S(o,a,u?e.zmax:n,t,ue,i)?(r.xmax=ue[0],r.ymax=ue[1],p&&(r.zmax=ue[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function se(e,t,r,i,n,l,s=0){const o=new Array;for(const r of e)for(const e of r)o.push(e[0],e[1],t?e[2]:s);if(!(0,A.projectBuffer)(o,i,0,o,l,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,l);for(const t of e){const e=new Array;for(const i of t){const t=o.slice(a,a+=3);c||t.pop(),r&&t.push(i[u]),e.push(t)}n.push(e)}return!0}function oe(e,t,r,i,n,l,s=0){const o=new Array;for(const r of e)for(const e of r){if((0,M.FG)(e))return!1;if((0,M.aO)(e)){const[r,i]=e.c;o.push(r[0],r[1],t?r[2]:s,i[0],i[1],s);continue}if((0,M.n1)(e)){const[r,i,n]=e.b;o.push(r[0],r[1],t?r[2]:s,i[0],i[1],s,n[0],n[1],s);continue}const r=e;o.push(r[0],r[1],t?r[2]:s)}if(!(0,A.projectBuffer)(o,i,0,o,l,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,l);for(const t of e){const e=new Array;for(const i of t){const t=o.slice(a,a+=3);if(c||t.pop(),r&&t.push((0,M.yP)(i)[u]),(0,M.FG)(i))return!1;if((0,M.aO)(i)){const r=o[a++],i=o[a++];++a,e.push({c:[t,[r,i]]});continue}if((0,M.n1)(i)){const r=o[a++],i=o[a++];++a;const n=o[a++],l=o[a++];++a,e.push({b:[t,[r,i],[n,l]]});continue}e.push(t)}n.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,x.aI)(t,g.Y0)}const ue=(0,o.vt)()},98764(e,t,r){r.d(t,{GD:()=>s,Y0:()=>u,lO:()=>c});var i=r(73941),n=r(16930),l=r(21325);const s=new n.A(i.fv),o=new n.A(i.FY),a=new n.A(i.LJ),u=new n.A(i.Ro);function c(e){const t=p.get(e);if(t)return t;let r=s;if(e)if(e===o)r=o;else if(e===a)r=a;else{const t=e.wkid,i=e.latestWkid;if(null!=t||null!=i)(0,l.tl)(t)||(0,l.tl)(i)?r=o:((0,l.ZL)(t)||(0,l.ZL)(i))&&(r=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===h?r=o:e===d&&(r=a)}}}return p.set(e,r),r}const p=new Map,h=o.wkt.toUpperCase(),d=a.wkt.toUpperCase()},34403(e,t,r){r.d(t,{TP:()=>s});var i=r(79258);Math.PI;const n=i.$O.radius,l=i.$O.eccentricitySquared,s={a1:n*l,a2:n*l*n*l,a3:n*l*l/2,a4:n*l*n*l*2.5,a5:n*l+n*l*l/2,a6:1-l};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius},48757(e,t,r){r.r(t),r.d(t,{default:()=>fe});var i=r(5482),n=r(11254),l=r(60999),s=r(4718),o=r(25728),a=r(17676),u=r(84952),c=r(91429),p=r(5443),h=r(16930),d=r(4146),f=r(52136),y=r(89186),m=r(18768),g=r(63074),w=r(69208),A=r(34287),v=r(8303),S=r(54310),I=r(25036),_=r(10873);let x=null;var M=r(49186),R=r(53966),b=r(34275);class C{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:r,data:i,json:n}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(n);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=n,this.width=t,this.height=r;const s=Math.max(this._maxTextureSize,4096);if(t>s||r>s){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${s} pixels}`;throw R.A.getLogger("esri.layers.support.SpriteSource").error(e),new M.A("SpriteSource",e)}let o;for(let e=0;e<i.length;e+=4)o=i[e+3]/255,i[e]=i[e]*o,i[e+1]=i[e+1]*o,i[e+2]=i[e+2]*o;this.image=i}async _getSpriteData(e,t){if("image"===e.type){let t,r;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new M.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,r=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new M.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,r=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,b.mw)(t.data)||(0,b.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:r}:{...P(t),json:r}}const r=(0,u.An)(this.baseURL),i=r.query?"?"+(0,u.x0)(r.query):"",l=this._isRetina?"@2x":"",s=`${r.path}${l}.${this._spriteImageFormat}${i}`,o=`${r.path}${l}.json${i}`,[a,c]=await Promise.all([(0,n.A)(o,t),(0,n.A)(s,{responseType:"image",...t})]);return{...P(c.data),json:a.data}}}function P(e){const t=document.createElement("canvas"),r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(i.data)}}var T=r(87045),U=r(25943),E=r(21325),O=r(28735),L=r(44159);class j{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,n.A)(this.url).then(e=>e.data.index)),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,a.Te)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let i=t;for(;0!==i.level;)i=new L.A(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let n,l,s=e,o=r.pop();if(1===s)return o;for(;r.length;)if(n=r.pop(),l=(1&n.col)+((1&n.row)<<1),s){if(0===s[l]){o=null;break}if(1===s[l]){o=n;break}o=n,s=s[l]}return o}}var k=r(97768);class D{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,n.A)(this._tileIndexUrl,{query:{...e?.query}}).then(e=>e.data.index)),this._tileIndexPromise}dataKey(e,t){const{level:r,row:i,col:n}=e,l=new L.A(e);return this._tilemap.fetchAvailabilityUpsample(r,i,n,l,t).then(()=>(l.world=e.world,l)).catch(e=>{if((0,a.zf)(e))throw e;return null})}}var Z=r(91869);class ${constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,a.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,a.u7)(e,()=>{t.every(e=>(0,a.G4)(e))&&this._abortController.abort()}),this._promise.then(e=>(0,s.o8)(e))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,n.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const B=new Map;function K(e,t){return(0,Z.tE)(B,e,()=>new $(e)).getData(t).finally(()=>B.delete(e))}class F{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const i=(0,u.An)(this.sourceUrl),n=(0,s.o8)(r),l=n.tiles;if(i)for(let e=0;e<l.length;e++){const t=(0,u.An)(l[e]);t&&((0,u.oP)(t.path)||(t.path=(0,u.fj)(i.path,t.path)),l[e]=(0,u.a6)(t.path,{...i.query,...t.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map(e=>e.toLowerCase().trim()),a=!0===r?.exportTilesAllowed,c=!0===o?.includes("tilemap"),h=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:c},exportTiles:a?{maxExportTilesCount:+h}:null},this.tileInfo=T.A.fromJSON(n.tileInfo);const d=r.tileMap?(0,u.a6)((0,u.fj)(i.path,r.tileMap),i.query??{}):null;c?(this.type="vector-tile",this.tilemap=new D(new U.d({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:n.minLOD??this.tileInfo.lods[0].level,maxLOD:n.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),d)):d&&(this.tilemap=new j(d)),this.fullExtent=p.A.fromJSON(r.fullExtent),this.initialExtent=p.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,r,i){return function(e,t,r,i,n){const l=(0,u.An)(e),s=l.query;if(s)for(const[e,n]of Object.entries(s))switch(n){case"{x}":s[e]=i.toString();break;case"{y}":s[e]=r.toString();break;case"{z}":s[e]=t.toString()}const o=l.path;return K((0,u.a6)(o.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),n)}(this.tileServers[t%this.tileServers.length],e,t,r,i)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const i=t.lods,n=r.lods,l=Math.min(i.length,n.length);for(let e=0;e<l;e++){const t=i[e],r=n[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}function G(...e){let t;for(const r of e)if(null!=r)if((0,u.BQ)(r)){if(t){const e=t.split("://")[0];t=e+":"+r.trim()}}else t=(0,u.oP)(r)?r:(0,u.fj)(t,r);return t?(0,u.UC)(t):void 0}async function q(e,t,r,i,l){let s,o,c;if((0,a.Te)(l),"string"==typeof r){const e=(0,u.S8)(r);c=await(0,n.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),c.ssl&&(s&&(s=s.replace(/^http:/i,"https:")),o&&(o=o.replace(/^http:/i,"https:"))),s=e,o=e}else null!=r&&(c={data:r},s=r.jsonUrl||null,o=i);const p=c?.data;if(z(p))return e.styleUrl=s||null,async function(e,t,r,i){const n=r?(0,u.nM)(r):(0,u.gd)();e.styleBase=n,e.style=t,"webp"===t["sprite-format"]?.toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await q(e,"esri",G(n,r.url),void 0,i):l.push(q(e,"esri",r,n,i))}for(const r of Object.keys(t.sources))"esri"!==r&&"tilejson"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?l.push(q(e,r,G(n,t.sources[r].url),void 0,i)):t.sources[r].tiles&&l.push(q(e,r,t.sources[r],n,i)));await Promise.all(l)}(e,p,o,l);if(function(e){return!z(e)}(p))return e.sourceUrl?H(e,p,o,!1,t,l):(e.sourceUrl=s||null,N(p)&&null==e.style&&(t="tilejson"),H(e,p,o,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function N(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function z(e){return!!e&&"sources"in e&&!!e.sources}async function H(e,t,r,i,n,l){const o=r?(0,u.UC)(r)+"/":(0,u.gd)(),a=function(e,t){const r=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=r),null==t.cols&&(t.cols=r)),e}const i={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let n,l=null;if(N(e)){const{bounds:r,vector_layers:i}=e;if(r){const e=(0,O.Gh)({x:r[0],y:r[1],spatialReference:(0,s.o8)(E.KK)}),t=(0,O.Gh)({x:r[2],y:r[3],spatialReference:(0,s.o8)(E.KK)});l={xmin:e.x,ymin:e.y,xmax:t.x,ymax:t.y,spatialReference:(0,s.o8)(E.ch)}}if(i&&i.length>0)n={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:Q(i)};else if(null==t.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===l&&(l=i);let o=78271.51696400007,a=295828763.7957775;const u=[],c=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22;for(let e=0;e<=c;e++)u.push({level:e,scale:a,resolution:o}),o/=2,a/=2;return{capabilities:"TilesOnly",initialExtent:l,fullExtent:i,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:r,cols:r,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:(0,s.o8)(E.ch)},defaultStyles:n}}(t,e),c=new F(n,(0,u.a6)(o,l?.query??{}),a);if(!i&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(c))return;null!=c.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(c.fullExtent):t.fullExtent=c.fullExtent.clone()),t.tileInfo&&c.tileInfo&&t.tileInfo.lods.length<c.tileInfo.lods.length&&(t.tileInfo=c.tileInfo)}if(i&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=n),e.sourceNameToSource[n]=c,!N(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?q(e,"",G(o,t.defaultStyles,"root.json"),void 0,l):q(e,"",t.defaultStyles,G(o,"root.json"),l)}if(N(t)&&null==e.style&&a.defaultStyles)return q(e,"",a.defaultStyles,G(o,"root.json"),l)}function Q(e){const t=[];for(const r of e)r.geometry_type?t.push(W(r.geometry_type.toLowerCase(),r,!1)):(t.push(W("polygon",r,!0)),t.push(W("line",r,!0)),t.push(W("circle",r,!0)));return t}function W(e,t,r){const{id:i,minzoom:n,maxzoom:l}=t,s={type:"polygon"===e||"polygons"===e?"fill":"line"===e||"lines"===e?"line":"circle",id:i,source:"tilejson","source-layer":i,minzoom:n,maxzoom:l};switch(e){case"fill":r&&(s.id+="_polygon",s.filter='(["==", "$type", "Polygon"])'),s.paint={"fill-color":"#808080"};break;case"line":r&&(s.id+="_line",s.filter='(["==", "$type", "LineString"])');break;case"circle":r&&(s.id+="_point",s.filter='(["==", "$type", "Point"])')}return s}var V=r(88788),J=r(39131),Y=r(97159),X=r(86738),ee=r(91806);const te=1e-6;function re(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,i=t.origin;if(Math.abs(r.x-i.x)>=te||Math.abs(r.y-i.y)>=te)return!1;let n,l;e.lods[0].scale>t.lods[0].scale?(n=e,l=t):(l=e,n=t);for(let e=n.lods[0].scale;e>=l.lods[l.lods.length-1].scale-te;e/=2)if(Math.abs(e-l.lods[0].scale)<te)return!0;return!1}function ie(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const r=e.size[0],i=e.format,n=e.dpi,l=new X.A({x:e.origin.x,y:e.origin.y}),s=e.spatialReference,o=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=o.scale,c=o.resolution,p=a.scale,h=[];let d=u,f=c,y=0;for(;d>=p;)h.push(new ee.A({level:y,resolution:f,scale:d})),y++,d/=2,f/=2;return new T.A({size:[r,r],dpi:n,format:i||"pbf",origin:l,lods:h,spatialReference:s})}var ne=r(45013);class le{constructor(e){this.getUnmaskedRenderer=e}}function se(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new le(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):null}let oe;function ae(){return oe??=function(){const e=new ue,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let r=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=t.getContext("webgl2"),null!=r&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=se(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;e.available=!0,e.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return i&&(e.supportsHighPrecisionFragment=i.precision>0),r}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),oe}class ue{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}var ce=r(59923),pe=r(43937),he=r(36005);let de=class extends((0,g.dM)((0,I.j)((0,S.J)((0,y.f)((0,m.b)((0,A.q)((0,v.A)((0,w.d)((0,f.p)((0,o.M)(d.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(a.QP).then(async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,n.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,V.v)(this.portalItem,"portal-item"))}).catch(a.QP).then(()=>this._loadStyle(e));return this.addResolvingPromise(t),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,u.An)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,u.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,u.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,u.BQ)(e)&&(e=`https:${e}`);const r=(0,J.py)(e);t.styleUrl=(0,Y.e)(e,r)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new T.A;if(e.length>1)for(let r=0;r<e.length;r++)re(t,e[r].tileInfo)&&(t=ie(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new U.d({layer:this}):null}set url(e){if(!e)return void this._set("url",e);const t=(0,u.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=ae().maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,u.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,n=new C({type:"url",spriteUrl:i,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await n.load(t),this._spriteSourceMap.set(e,n)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=ae().maxTextureSize,i=e.spriteUrl,n=i?(0,u.a6)(i,{...this.customParameters,token:this.apiKey}):null;if(!n&&"url"===e.type)return null;const l=new C(e,r);try{await l.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),n&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=n),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,a.QP)(e)}return null}async loadStyle(e,t){const r=e||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,s.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const i=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||i})}getStyleLayer(e){return(0,s.o8)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,s.o8)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)?"visible":"none"}write(e,t){return t?.origin&&!this.styleUrl?((0,ce.U4)(t,this,"style defined by JSON only are not supported"),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,n]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await q(r,"esri",e,n,t),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style&&r.style.sprite&&G(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style&&r.style.glyphs&&G(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(x)return x;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return x=new Promise(t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy}),x}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new ne.A(r.style,!1)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const i=t[2]&&t[2].toLowerCase();if(!i)return;const n=t[1]||"";for(const e of r)if(e.toLowerCase().includes(i))return(0,u.S8)(`//static.arcgis.com/attribution/Vector${n}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"attributionDataUrl",null),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],de.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],de.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"capabilities",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"currentStyleInfo",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:p.A})],de.prototype,"fullExtent",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:p.A})],de.prototype,"initialExtent",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],de.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({type:["VectorTileLayer"]})],de.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],de.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],de.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,c.MZ)()],de.prototype,"style",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"serviceUrl",null),(0,i.Cg)([(0,c.MZ)({type:h.A,readOnly:!0})],de.prototype,"spatialReference",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"styleRepository",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"sourceNameToSource",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"primarySource",void 0),(0,i.Cg)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],de.prototype,"styleUrl",null),(0,i.Cg)([(0,pe.K)(["portal-item","web-document"],"styleUrl")],de.prototype,"writeStyleUrl",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:T.A})],de.prototype,"tileInfo",null),(0,i.Cg)([(0,c.MZ)()],de.prototype,"tilemapCache",void 0),(0,i.Cg)([(0,he.w)("service","tilemapCache",["capabilities","tileInfo"])],de.prototype,"readTilemapCache",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],de.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}}),(0,c.MZ)(_.OZ)],de.prototype,"url",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"version",void 0),(0,i.Cg)([(0,he.w)("version",["version","currentVersion"])],de.prototype,"readVersion",null),de=(0,i.Cg)([(0,c.$K)("esri.layers.VectorTileLayer")],de);const fe=de},52136(e,t,r){r.d(t,{p:()=>l});var i=r(5482),n=r(91429);const l=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},89186(e,t,r){r.d(t,{f:()=>c});var i=r(5482),n=r(91429),l=r(16930),s=r(87045),o=r(65509),a=r(25943),u=r(36005);const c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,r){const i=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:n,maxLOD:l,minScale:u,maxScale:c}=t;if(null==n&&null==l&&(0!==u||0!==c)){const e=e=>Math.round(1e4*e)/1e4;u=e(u||t.tileInfo.lods[0].scale),c=e(c||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const r of t.tileInfo.lods){const t=e(r.scale);n=t>=u?r.level:n,l=t>=c?r.level:l}}if(i)return new a.d({layer:this,minLOD:n,maxLOD:l});if(t.tileInfo){const e=new s.A;return e.read(t.tileInfo,r),new o.A(e,n,l)}return null}};return(0,i.Cg)([(0,n.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,n.MZ)()],r.prototype,"minScale",void 0),(0,i.Cg)([(0,u.w)("service","minScale")],r.prototype,"readMinScale",null),(0,i.Cg)([(0,n.MZ)()],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,i.Cg)([(0,n.MZ)({type:l.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"supportsBlankTile",null),(0,i.Cg)([(0,n.MZ)({type:s.A})],r.prototype,"tileInfo",void 0),(0,i.Cg)([(0,n.MZ)()],r.prototype,"tilemapCache",void 0),(0,i.Cg)([(0,u.w)("service","tilemapCache",["capabilities","tileInfo"])],r.prototype,"readTilemapCache",null),(0,i.Cg)([(0,n.MZ)()],r.prototype,"version",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISCachedService")],r),r}},18768(e,t,r){r.d(t,{b:()=>o});var i=r(5482),n=r(53966),l=r(91429),s=r(60694);const o=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,s.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,s.Jf)(e,n.A.getLogger(this)))}};return(0,i.Cg)([(0,l.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],r),r}},69208(e,t,r){r.d(t,{d:()=>l});var i=r(5482),n=r(91429);const l=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},8303(e,t,r){r.d(t,{A:()=>I});var i=r(5482),n=r(92602),l=r(70333),s=r(11254),o=r(60999),a=r(49186),u=r(36563),c=r(53966),p=r(97768),h=r(17676),d=r(84952),f=r(91429),y=r(77548),m=r(20655),g=r(80812),w=r(41318),A=r(10407),v=r(36005),S=r(43937);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.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 r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),i=new AbortController,n=(0,u.rE)(i);return this.addHandles(n,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:i.signal})}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.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,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!l.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let s,o;if(n)s=r.portal.url;else try{s=await(0,y.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(l.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,u=!1,c=!1;if(!o)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(n?await r.reload():(r=new g.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,A.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.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=l.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=m.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.A.fromJSON(c.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||m.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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.Cg)([(0,f.MZ)({type:g.default})],I.prototype,"portalItem",null),(0,i.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,i.Cg)([(0,S.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,i.Cg)([(0,f.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,i.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],I),I},_={credential:null,user:null}},65509(e,t,r){r.d(t,{A:()=>l});var i=r(49186),n=r(17676);class l{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){const i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,l){await(0,n.NO)(l);const s=this.getAvailability(e,t,r);if("unavailable"===s)throw new i.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return s}async fetchAvailabilityUpsample(e,t,r,i,l){await(0,n.NO)(l),i.level=e,i.row=t,i.col=r;const s=this.tileInfo;return s.updateTileInfo(i),this.fetchAvailability(e,t,r,l).catch(e=>{if((0,n.zf)(e))throw e;if(s.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,l);throw e})}}},88788(e,t,r){r.d(t,{m:()=>s,v:()=>l});var i=r(84952),n=r(20655);function l(e,t){return{...o(e,t),readResourcePaths:[]}}function s(e,t,r){const n=(0,i.An)(e.itemUrl);return{...o(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},10407(e,t,r){r.d(t,{It:()=>d,LG:()=>s,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>a,mm:()=>h,sQ:()=>p});var i=r(91218),n=r(16930),l=r(28735);function s(e,t){if(!o(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return o(e,h.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?s(e,t):u(e,t)}async function p(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const h={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let l=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit");const o="update"===i||"admin"===i;return o?s=l=!0:s&&(l=!0),{features:{edit:l,fullEdit:s},content:{updateItem:o}}}},44159(e,t,r){r.d(t,{A:()=>n});var i=r(93687);class n{static{this.pool=new i.A(()=>new n(""),null,null,25,50)}static getId(e,t,r,i){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${i}`}constructor(e,t,r,i){this.set(e,t,r,i)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,i){this.set(e,t,r,i)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new n(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,i){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,r,i,n]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(n)}else this.level=+e,this.row=+t,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new n(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,r){const i=this.clone();return i.col+=e,i.row+=t,r.normalizeKey(i),i}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,i=this.world;return[new n(e,t,r,i),new n(e,t,r+1,i),new n(e,t+1,r,i),new n(e,t+1,r+1,i)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},78553(e,t,r){r.d(t,{D:()=>l,p:()=>n});var i=r(56507);function n(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3897],{60999(e,t,r){r.d(t,{DZ:()=>f,Ke:()=>d,Tj:()=>c,UT:()=>y,aD:()=>g,jJ:()=>u});var i=r(5482),n=r(69622),l=r(97768),s=r(17676),o=r(10107),a=r(64108);function u(e,t,r){return(0,s.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function c(e,t,r){return(await(0,s.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return h(e)}}async function f(e){try{return p(await e)}catch(e){return(0,s.QP)(e),h(e)}}function y(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=h(e),this._cleanup()}),this._abortHandle=(0,s.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],m);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},90629(e,t,r){r.d(t,{Lz:()=>n,PN:()=>l,cr:()=>s,gs:()=>a,r_:()=>u,tc:()=>o}),r(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function n(e){return e?e/72*96:0}function l(e){return e?72*e/96:0}function s(e){if("string"==typeof e){const t=e.match(i);if(t){const r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n=e.startsWith("-"),s="px"===i?l(r):r;return n?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function o(e=0,t=0){return{x:e,y:t}}function a(e=0,t=0){return[e,t]}function u(e=0,t=0,r=0){return[e,t,r]}},159(e,t,r){r.d(t,{A:()=>u});var i,n=r(5482),l=r(69540),s=r(25482),o=r(91429),a=r(99157);let u=i=class extends((0,l.OU)(s.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,o.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=i=(0,n.Cg)([(0,o.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>a});var i,n=r(5482),l=r(69540),s=r(25482),o=r(91429);let a=i=class extends((0,l.OU)(s.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,o.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],a.prototype,"isInverse",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=i=(0,n.Cg)([(0,o.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(49208);function n(e,t,r,n,l,s,o=Math.floor(e.length/3)){const a=(0,i.jd)(t,l);if(null==a)return!1;if(a===i.pO){if(e===n&&r===s)return!0;const t=r+3*o;for(let i=r,l=s;i<t;i++,l++)n[l]=e[i]??0;return!0}const u=r+3*o;for(let t=r,i=s;t<u;t+=3,i+=3)a(e,t,n,i);return!0}},49208(e,t,r){r.d(t,{Tp:()=>p,jd:()=>c,pO:()=>d,w5:()=>u});var i=r(34727),n=r(86211),l=r(73941),s=r(79258),o=r(34403),a=r(21325);const u={2:{5:d,7:null,9:null,10:d,1:S,6:null,8:null,0:null,3:y,11:m,2:d,4:R},5:{5:d,7:null,9:null,10:d,1:S,6:null,8:null,0:null,3:y,11:m,2:d,4:R},7:{5:null,7:d,9:null,10:d,1:null,6:v,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:d,10:d,1:null,6:null,8:A,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,r,i){const n=e[t]/E,l=U-2*Math.atan(Math.exp(-e[t+1]/E)),s=E+(e[t+2]??0),o=Math.cos(l)*s;r[i]=Math.cos(n)*o,r[i+1]=Math.sin(n)*o,r[i+2]=Math.sin(l)*s},6:null,8:null,0:null,3:d,11:function(e,t,r,i){f(e,t,r,i),m(r,i,r,i)},2:f,4:function(e,t,r,i){f(e,t,r,i),R(r,i,r,i)}},4:{5:b,7:null,9:null,10:b,1:function(e,t,r,i){b(e,t,r,i),S(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){b(e,t,r,i),y(r,i,r,i)},11:function(e,t,r,i){b(e,t,r,i),m(r,i,r,i)},2:b,4:d},1:{5:M,7:null,9:null,10:M,1:d,6:null,8:null,0:null,3:function(e,t,r,i){M(e,t,r,i),y(r,i,r,i)},11:function(e,t,r,i){M(e,t,r,i),m(r,i,r,i)},2:M,4:function(e,t,r,i){M(e,t,r,i),R(r,i,r,i)}},6:{5:null,7:x,9:null,10:x,1:null,6:d,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:_,10:_,1:null,6:null,8:d,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:d,3:null,11:null,2:null,4:null},10:{5:d,7:d,9:d,10:d,1:S,6:v,8:A,0:null,3:y,11:m,2:d,4:R},11:{5:g,7:null,9:null,10:g,1:function(e,t,r,i){g(e,t,r,i),S(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){g(e,t,r,i),y(r,i,r,i)},11:d,2:g,4:function(e,t,r,i){g(e,t,r,i),R(r,i,r,i)}}};function c(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const r=h(e,C.source),i=h(t,C.dest);return 0===r&&0===i?(0,a.aI)(e,t)?C.projector=d:C.projector=null:C.projector=u[r][i],C}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,l.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===l.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===l.FY.wkt?t.spatialReferenceId=6:e.wkt===l.LJ.wkt?t.spatialReferenceId=8:(0,l.q8)(e)?t.spatialReferenceId=7:(0,l.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function d(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t]??0)}function f(e,t,r,i){r[i]=T*(e[t]/E),r[i+1]=T*(U-2*Math.atan(Math.exp(-e[t+1]/E))),r[i+2]=e[t+2]??0}function y(e,t,r,n){!function(e,t,r,n,l){const s=.4999999*Math.PI,o=(0,i.qE)(P*e[t+1],-s,s),a=Math.sin(o);r[n++]=P*e[t]*l.radius,r[n++]=l.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[n]=e[t+2]??0}(e,t,r,n,s.$O)}function m(e,t,r,i){r[i]=e[t]*O,r[i+1]=e[t+1]*O,r[i+2]=e[t+2]??0}function g(e,t,r,i){r[i]=e[t]*L,r[i+1]=e[t+1]*L,r[i+2]=e[t+2]??0}function w(e,t,r,i,n){const l=n+(e[t+2]??0),s=P*e[t],o=P*e[t+1],a=Math.cos(o)*l;r[i]=Math.cos(s)*a,r[i+1]=Math.sin(s)*a,r[i+2]=Math.sin(o)*l}function A(e,t,r,i){w(e,t,r,i,s.Sw.radius)}function v(e,t,r,i){w(e,t,r,i,s.sH.radius)}function S(e,t,r,i){w(e,t,r,i,s.$O.radius)}function I(e,t,r,n,l){const s=e[t],o=e[t+1],a=e[t+2]??0,u=Math.sqrt(s*s+o*o+a*a),c=(0,i.YN)(a/(0===u?1:u)),p=Math.atan2(o,s);r[n++]=T*p,r[n++]=T*c,r[n]=u-l}function _(e,t,r,i){I(e,t,r,i,s.Sw.radius)}function x(e,t,r,i){I(e,t,r,i,s.sH.radius)}function M(e,t,r,i){I(e,t,r,i,s.$O.radius)}function R(e,t,r,i){!function(e,t,r,i,n){const l=P*e[t],s=P*e[t+1],o=e[t+2]??0,a=Math.sin(s),u=Math.cos(s),c=n.radius/Math.sqrt(1-n.eccentricitySquared*a*a);r[i++]=(c+o)*u*Math.cos(l),r[i++]=(c+o)*u*Math.sin(l),r[i++]=(c*(1-n.eccentricitySquared)+o)*a}(e,t,r,i,s.$O)}function b(e,t,r,i){const n=o.TP,l=e[t],a=e[t+1],u=e[t+2]??0;let c,p,h,d,f,y,m,g,w,A,v,S,I,_,x,M,R,b,C,P,U;c=Math.abs(u),p=l*l+a*a,h=Math.sqrt(p),d=p+u*u,f=Math.sqrt(d),P=Math.atan2(a,l),y=u*u/d,m=p/d,_=n.a2/f,x=n.a3-n.a4/f,m>.3?(g=c/f*(1+m*(n.a1+_+y*x)/f),C=Math.asin(g),A=g*g,w=Math.sqrt(1-A)):(w=h/f*(1-y*(n.a5-_-m*x)/f),C=Math.acos(w),A=1-w*w,g=Math.sqrt(A)),v=1-s.$O.eccentricitySquared*A,S=s.$O.radius/Math.sqrt(v),I=n.a6*S,_=h-S*w,x=c-I*g,R=w*_+g*x,M=w*x-g*_,b=M/(I/v+R),C+=b,U=R+M*b/2,u<0&&(C=-C),r[i++]=T*P,r[i++]=T*C,r[i]=U}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:d},P=(0,i.kU)(1),T=(0,i.KJ)(1),U=.5*Math.PI,E=s.$O.radius,O=E*Math.PI/180,L=180/(E*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>z,initializeProjection:()=>Q,isEqualBaseGCS:()=>H,isLoaded:()=>E,isLoadedOrLoad:()=>O,isLoadedOrLoadFor:()=>L,load:()=>k,project:()=>D,projectAsync:()=>q,projectExtent:()=>ne,projectMany:()=>Z,projectMultipoint:()=>Y,projectOrLoad:()=>B,projectOrLoadMany:()=>K,projectPoint:()=>V,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>W,requiresLoad:()=>j,test:()=>N,tryProject:()=>$,unload:()=>G});var i=r(49186),n=r(17676),l=r(62788),s=r(95488),o=r(51850),a=r(21276),u=r(73941),c=r(5443),p=r(91075),h=r(48526),d=r(86738),f=r(39829),y=r(82799),m=r(16930),g=r(98764),w=r(159),A=r(9762),v=r(49208);function S(e,t,r,i,n,l){return I[0]=e,I[1]=t,I[2]=r,(0,A.projectBuffer)(I,i,0,n,l,0)}const I=(0,o.vt)();var _=r(60408),x=r(21325),M=r(52006);let R=null,b=null,C=null,P=null,T={};const U=new s.I;function E(){return!!(b?.isLoaded()&&C?.isLoaded()&&P?.isLoaded())}function O(){return!!E()||((0,l.gc)(U),k(),!1)}function L(e,t){return!e||!t||z(e,t)||O()}function j(e,t){return!z(e,t)&&!E()}async function k(e){null==R&&(R=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(b=e,b.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(C=e,C.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(P=e,P.load()))])),await R,(0,n.Te)(e),U.notify()}function D(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),Z(e,e[0].spatialReference,t,r)):((0,a.f)(e),Z([e],e.spatialReference,t,r)[0])}function Z(e,t,r,i){if(null==t||null==r)return e;if(z(t,r,i))return e.map(e=>W(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>W(e,t,m.A.WGS84)),m.A.WGS84,r,{zConversionDisabled:i?.zConversionDisabled});if(null==i?.geographicTransformation&&(0,u.jA)(r))return Z(e,t,m.A.WGS84).map(e=>W(e,m.A.WGS84,r));if(!E())throw new F;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:P.getTransformation(t,r,i.areaOfInterestExtent)||new w.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=T[e];n||(n=P.getTransformation(t,r)||new w.A,T[e]=n),i={geographicTransformation:n,zConversionDisabled:i?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?b.executeMany(e,r,i):C.executeMany(e,r,i)}function $(e,t,r){try{return D(e,t,r)}catch(e){return null}}function B(e,t){const r=K([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function K(e,t,r){if(!E())for(const r of e)if(null!=r&&!(0,x.aI)(r.spatialReference,t)&&(0,x.fn)(r.spatialReference)&&(0,x.fn)(t)&&!z(r.spatialReference,t))return(0,l.gc)(U),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,x.aI)(e.spatialReference,t)?e:(0,x.fn)(e.spatialReference)&&(0,x.fn)(t)?D(e,t,r):null)}}class F extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function G(){R=null,b=null,C=null,P=null,T={}}const N={get loadPromise(){return R}};async function q(e,t,r){if((0,n.Te)(r),!e)return e;const i=K(Array.isArray(e)?e:[e],t,r);if(i.pending)return await i.pending,(0,n.Te)(r),q(e,t,r);const l=i.geometries??[];return Array.isArray(e)?l:l[0]}function z(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,x.aI)(e,t)||(0,x.fn)(e)&&(0,x.fn)(t)&&!!(0,v.jd)(e,t))}function H(e,t){if((0,x.aI)(e,t))return!0;if(!(0,x.fn)(e)||!(0,x.fn)(t))return!1;const r=(0,x.oT)(e)||(0,x.K8)(e)||(0,x.x1)(e),i=(0,x.oT)(t)||(0,x.K8)(t)||(0,x.x1)(t);return r&&i}async function Q(e,t,r,i){if(E())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!z(t,r,n))return k(i)}else if(e&&t&&!z(e,t,r))return k(i);return(0,n.NO)(i)}function W(e,t,r){return e?(0,_.fT)(e)?J(e,t,new d.A,r,0):(0,_.ZC)(e)?le(e,t,new c.A,r,0):(0,_.Bi)(e)?ie(e,t,new f.A,r,0):(0,_.Rg)(e)?te(e,t,new y.A,r,0):(0,_.U9)(e)?X(e,t,new h.A,r,0):null:null}function V(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,r,i)}function J(e,t,r,i,n){ue[0]=e.x,ue[1]=e.y;const l=e.z;return ue[2]=void 0!==l?l:n,(0,A.projectBuffer)(ue,t,0,ue,i,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=i,void 0!==l||(0,u.xP)(i)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Y(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,i)}function X(e,t,r,i,n){const{points:l,hasZ:s,hasM:o}=e,a=[],u=l.length,c=[];for(const e of l)c.push(e[0],e[1],s?e[2]:n);if(!(0,A.projectBuffer)(c,t,0,c,i,0,u))return null;const p=ae(s,i);for(let e=0;e<u;++e){const t=3*e,r=c[t],i=c[t+1];p&&o?a.push([r,i,c[t+2],l[e][3]]):p?a.push([r,i,c[t+2]]):o?a.push([r,i,l[e][2]]):a.push([r,i])}return r.points=a,r.spatialReference=i,r.hasZ=s,r.hasM=o,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{curvePaths:l,paths:s,hasZ:o,hasM:a}=e;if(!(l?oe(l,o??!1,a??!1,t,r.curvePaths=[],i,n):se(s,o??!1,a??!1,t,r.paths,i,n)))return null;const u=ae(o,i);return r.spatialReference=i,r.hasZ=u,r.hasM=a,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{curveRings:l,rings:s,hasZ:o,hasM:a}=e;return(l?oe(l,o??!1,a??!1,t,r.curveRings=[],i,n):se(s,o??!1,a??!1,t,r.rings,i,n))?(r.spatialReference=i,r.hasZ=ae(o,i),r.hasM=a,r):null}function ne(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=le(e,e.spatialReference,t,r,i)}function le(e,t,r,i,n){const{xmin:l,ymin:s,xmax:o,ymax:a,hasZ:u,hasM:c}=e;if(!S(l,s,u?e.zmin:n,t,ue,i))return null;const p=ae(u,i);return r.xmin=ue[0],r.ymin=ue[1],p&&(r.zmin=ue[2]),S(o,a,u?e.zmax:n,t,ue,i)?(r.xmax=ue[0],r.ymax=ue[1],p&&(r.zmax=ue[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function se(e,t,r,i,n,l,s=0){const o=new Array;for(const r of e)for(const e of r)o.push(e[0],e[1],t?e[2]:s);if(!(0,A.projectBuffer)(o,i,0,o,l,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,l);for(const t of e){const e=new Array;for(const i of t){const t=o.slice(a,a+=3);c||t.pop(),r&&t.push(i[u]),e.push(t)}n.push(e)}return!0}function oe(e,t,r,i,n,l,s=0){const o=new Array;for(const r of e)for(const e of r){if((0,M.FG)(e))return!1;if((0,M.aO)(e)){const[r,i]=e.c;o.push(r[0],r[1],t?r[2]:s,i[0],i[1],s);continue}if((0,M.n1)(e)){const[r,i,n]=e.b;o.push(r[0],r[1],t?r[2]:s,i[0],i[1],s,n[0],n[1],s);continue}const r=e;o.push(r[0],r[1],t?r[2]:s)}if(!(0,A.projectBuffer)(o,i,0,o,l,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,l);for(const t of e){const e=new Array;for(const i of t){const t=o.slice(a,a+=3);if(c||t.pop(),r&&t.push((0,M.yP)(i)[u]),(0,M.FG)(i))return!1;if((0,M.aO)(i)){const r=o[a++],i=o[a++];++a,e.push({c:[t,[r,i]]});continue}if((0,M.n1)(i)){const r=o[a++],i=o[a++];++a;const n=o[a++],l=o[a++];++a,e.push({b:[t,[r,i],[n,l]]});continue}e.push(t)}n.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,x.aI)(t,g.Y0)}const ue=(0,o.vt)()},98764(e,t,r){r.d(t,{GD:()=>s,Y0:()=>u,lO:()=>c});var i=r(73941),n=r(16930),l=r(21325);const s=new n.A(i.fv),o=new n.A(i.FY),a=new n.A(i.LJ),u=new n.A(i.Ro);function c(e){const t=p.get(e);if(t)return t;let r=s;if(e)if(e===o)r=o;else if(e===a)r=a;else{const t=e.wkid,i=e.latestWkid;if(null!=t||null!=i)(0,l.tl)(t)||(0,l.tl)(i)?r=o:((0,l.ZL)(t)||(0,l.ZL)(i))&&(r=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===h?r=o:e===d&&(r=a)}}}return p.set(e,r),r}const p=new Map,h=o.wkt.toUpperCase(),d=a.wkt.toUpperCase()},34403(e,t,r){r.d(t,{TP:()=>s});var i=r(79258);Math.PI;const n=i.$O.radius,l=i.$O.eccentricitySquared,s={a1:n*l,a2:n*l*n*l,a3:n*l*l/2,a4:n*l*n*l*2.5,a5:n*l+n*l*l/2,a6:1-l};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius},48757(e,t,r){r.r(t),r.d(t,{default:()=>fe});var i=r(5482),n=r(11254),l=r(60999),s=r(4718),o=r(25728),a=r(17676),u=r(84952),c=r(91429),p=r(5443),h=r(16930),d=r(4146),f=r(52136),y=r(89186),m=r(18768),g=r(63074),w=r(69208),A=r(34287),v=r(8303),S=r(54310),I=r(25036),_=r(10873);let x=null;var M=r(49186),R=r(53966),b=r(34275);class C{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:r,data:i,json:n}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(n);if(!l||0===l.length||!i)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=n,this.width=t,this.height=r;const s=Math.max(this._maxTextureSize,4096);if(t>s||r>s){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${s} pixels}`;throw R.A.getLogger("esri.layers.support.SpriteSource").error(e),new M.A("SpriteSource",e)}let o;for(let e=0;e<i.length;e+=4)o=i[e+3]/255,i[e]=i[e]*o,i[e+1]=i[e+1]*o,i[e+2]=i[e+2]*o;this.image=i}async _getSpriteData(e,t){if("image"===e.type){let t,r;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new M.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,r=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new M.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,r=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,b.mw)(t.data)||(0,b.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:r}:{...P(t),json:r}}const r=(0,u.An)(this.baseURL),i=r.query?"?"+(0,u.x0)(r.query):"",l=this._isRetina?"@2x":"",s=`${r.path}${l}.${this._spriteImageFormat}${i}`,o=`${r.path}${l}.json${i}`,[a,c]=await Promise.all([(0,n.A)(o,t),(0,n.A)(s,{responseType:"image",...t})]);return{...P(c.data),json:a.data}}}function P(e){const t=document.createElement("canvas"),r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(i.data)}}var T=r(87045),U=r(25943),E=r(21325),O=r(28735),L=r(44159);class j{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,n.A)(this.url).then(e=>e.data.index)),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,a.Te)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let i=t;for(;0!==i.level;)i=new L.A(i.level-1,i.row>>1,i.col>>1,i.world),r.push(i);let n,l,s=e,o=r.pop();if(1===s)return o;for(;r.length;)if(n=r.pop(),l=(1&n.col)+((1&n.row)<<1),s){if(0===s[l]){o=null;break}if(1===s[l]){o=n;break}o=n,s=s[l]}return o}}var k=r(97768);class D{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,n.A)(this._tileIndexUrl,{query:{...e?.query}}).then(e=>e.data.index)),this._tileIndexPromise}dataKey(e,t){const{level:r,row:i,col:n}=e,l=new L.A(e);return this._tilemap.fetchAvailabilityUpsample(r,i,n,l,t).then(()=>(l.world=e.world,l)).catch(e=>{if((0,a.zf)(e))throw e;return null})}}var Z=r(91869);class ${constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,a.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,a.u7)(e,()=>{t.every(e=>(0,a.G4)(e))&&this._abortController.abort()}),this._promise.then(e=>(0,s.o8)(e))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,n.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const B=new Map;function K(e,t){return(0,Z.tE)(B,e,()=>new $(e)).getData(t).finally(()=>B.delete(e))}class F{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const i=(0,u.An)(this.sourceUrl),n=(0,s.o8)(r),l=n.tiles;if(i)for(let e=0;e<l.length;e++){const t=(0,u.An)(l[e]);t&&((0,u.oP)(t.path)||(t.path=(0,u.fj)(i.path,t.path)),l[e]=(0,u.a6)(t.path,{...i.query,...t.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map(e=>e.toLowerCase().trim()),a=!0===r?.exportTilesAllowed,c=!0===o?.includes("tilemap"),h=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:c},exportTiles:a?{maxExportTilesCount:+h}:null},this.tileInfo=T.A.fromJSON(n.tileInfo);const d=r.tileMap?(0,u.a6)((0,u.fj)(i.path,r.tileMap),i.query??{}):null;c?(this.type="vector-tile",this.tilemap=new D(new U.d({layer:{parsedUrl:i,tileInfo:this.tileInfo},minLOD:n.minLOD??this.tileInfo.lods[0].level,maxLOD:n.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),d)):d&&(this.tilemap=new j(d)),this.fullExtent=p.A.fromJSON(r.fullExtent),this.initialExtent=p.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,r,i){return function(e,t,r,i,n){const l=(0,u.An)(e),s=l.query;if(s)for(const[e,n]of Object.entries(s))switch(n){case"{x}":s[e]=i.toString();break;case"{y}":s[e]=r.toString();break;case"{z}":s[e]=t.toString()}const o=l.path;return K((0,u.a6)(o.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,i.toString()),{...l.query}),n)}(this.tileServers[t%this.tileServers.length],e,t,r,i)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const i=t.lods,n=r.lods,l=Math.min(i.length,n.length);for(let e=0;e<l;e++){const t=i[e],r=n[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}function G(...e){let t;for(const r of e)if(null!=r)if((0,u.BQ)(r)){if(t){const e=t.split("://")[0];t=e+":"+r.trim()}}else t=(0,u.oP)(r)?r:(0,u.fj)(t,r);return t?(0,u.UC)(t):void 0}async function N(e,t,r,i,l){let s,o,c;if((0,a.Te)(l),"string"==typeof r){const e=(0,u.S8)(r);c=await(0,n.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),c.ssl&&(s&&(s=s.replace(/^http:/i,"https:")),o&&(o=o.replace(/^http:/i,"https:"))),s=e,o=e}else null!=r&&(c={data:r},s=r.jsonUrl||null,o=i);const p=c?.data;if(z(p))return e.styleUrl=s||null,async function(e,t,r,i){const n=r?(0,u.nM)(r):(0,u.gd)();e.styleBase=n,e.style=t,"webp"===t["sprite-format"]?.toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await N(e,"esri",G(n,r.url),void 0,i):l.push(N(e,"esri",r,n,i))}for(const r of Object.keys(t.sources))"esri"!==r&&"tilejson"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?l.push(N(e,r,G(n,t.sources[r].url),void 0,i)):t.sources[r].tiles&&l.push(N(e,r,t.sources[r],n,i)));await Promise.all(l)}(e,p,o,l);if(function(e){return!z(e)}(p))return e.sourceUrl?H(e,p,o,!1,t,l):(e.sourceUrl=s||null,q(p)&&null==e.style&&(t="tilejson"),H(e,p,o,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function q(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function z(e){return!!e&&"sources"in e&&!!e.sources}async function H(e,t,r,i,n,l){const o=r?(0,u.UC)(r)+"/":(0,u.gd)(),a=function(e,t){const r=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=r),null==t.cols&&(t.cols=r)),e}const i={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let n,l=null;if(q(e)){const{bounds:r,vector_layers:i}=e;if(r){const e=(0,O.Gh)({x:r[0],y:r[1],spatialReference:(0,s.o8)(E.KK)}),t=(0,O.Gh)({x:r[2],y:r[3],spatialReference:(0,s.o8)(E.KK)});l={xmin:e.x,ymin:e.y,xmax:t.x,ymax:t.y,spatialReference:(0,s.o8)(E.ch)}}if(i&&i.length>0)n={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:Q(i)};else if(null==t.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===l&&(l=i);let o=78271.51696400007,a=295828763.7957775;const u=[],c=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22;for(let e=0;e<=c;e++)u.push({level:e,scale:a,resolution:o}),o/=2,a/=2;return{capabilities:"TilesOnly",initialExtent:l,fullExtent:i,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:r,cols:r,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:(0,s.o8)(E.ch)},defaultStyles:n}}(t,e),c=new F(n,(0,u.a6)(o,l?.query??{}),a);if(!i&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(c))return;null!=c.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(c.fullExtent):t.fullExtent=c.fullExtent.clone()),t.tileInfo&&c.tileInfo&&t.tileInfo.lods.length<c.tileInfo.lods.length&&(t.tileInfo=c.tileInfo)}if(i&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=n),e.sourceNameToSource[n]=c,!q(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?N(e,"",G(o,t.defaultStyles,"root.json"),void 0,l):N(e,"",t.defaultStyles,G(o,"root.json"),l)}if(q(t)&&null==e.style&&a.defaultStyles)return N(e,"",a.defaultStyles,G(o,"root.json"),l)}function Q(e){const t=[];for(const r of e)r.geometry_type?t.push(W(r.geometry_type.toLowerCase(),r,!1)):(t.push(W("polygon",r,!0)),t.push(W("line",r,!0)),t.push(W("circle",r,!0)));return t}function W(e,t,r){const{id:i,minzoom:n,maxzoom:l}=t,s={type:"polygon"===e||"polygons"===e?"fill":"line"===e||"lines"===e?"line":"circle",id:i,source:"tilejson","source-layer":i,minzoom:n,maxzoom:l};switch(e){case"fill":r&&(s.id+="_polygon",s.filter='(["==", "$type", "Polygon"])'),s.paint={"fill-color":"#808080"};break;case"line":r&&(s.id+="_line",s.filter='(["==", "$type", "LineString"])');break;case"circle":r&&(s.id+="_point",s.filter='(["==", "$type", "Point"])')}return s}var V=r(88788),J=r(39131),Y=r(97159),X=r(86738),ee=r(91806);const te=1e-6;function re(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,i=t.origin;if(Math.abs(r.x-i.x)>=te||Math.abs(r.y-i.y)>=te)return!1;let n,l;e.lods[0].scale>t.lods[0].scale?(n=e,l=t):(l=e,n=t);for(let e=n.lods[0].scale;e>=l.lods[l.lods.length-1].scale-te;e/=2)if(Math.abs(e-l.lods[0].scale)<te)return!0;return!1}function ie(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const r=e.size[0],i=e.format,n=e.dpi,l=new X.A({x:e.origin.x,y:e.origin.y}),s=e.spatialReference,o=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=o.scale,c=o.resolution,p=a.scale,h=[];let d=u,f=c,y=0;for(;d>=p;)h.push(new ee.A({level:y,resolution:f,scale:d})),y++,d/=2,f/=2;return new T.A({size:[r,r],dpi:n,format:i||"pbf",origin:l,lods:h,spatialReference:s})}var ne=r(45013);class le{constructor(e){this.getUnmaskedRenderer=e}}function se(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new le(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):null}let oe;function ae(){return oe??=function(){const e=new ue,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let r=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=t.getContext("webgl2"),null!=r&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=se(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;e.available=!0,e.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return i&&(e.supportsHighPrecisionFragment=i.precision>0),r}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),oe}class ue{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}var ce=r(59923),pe=r(43937),he=r(36005);let de=class extends((0,g.dM)((0,I.j)((0,S.J)((0,y.f)((0,m.b)((0,A.q)((0,v.A)((0,w.d)((0,f.p)((0,o.M)(d.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(a.QP).then(async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,n.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,V.v)(this.portalItem,"portal-item"))}).catch(a.QP).then(()=>this._loadStyle(e));return this.addResolvingPromise(t),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,u.An)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,u.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,u.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,u.BQ)(e)&&(e=`https:${e}`);const r=(0,J.py)(e);t.styleUrl=(0,Y.e)(e,r)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new T.A;if(e.length>1)for(let r=0;r<e.length;r++)re(t,e[r].tileInfo)&&(t=ie(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new U.d({layer:this}):null}set url(e){if(!e)return void this._set("url",e);const t=(0,u.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=ae().maxTextureSize,i=this.currentStyleInfo?.spriteUrl?(0,u.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,n=new C({type:"url",spriteUrl:i,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await n.load(t),this._spriteSourceMap.set(e,n)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=ae().maxTextureSize,i=e.spriteUrl,n=i?(0,u.a6)(i,{...this.customParameters,token:this.apiKey}):null;if(!n&&"url"===e.type)return null;const l=new C(e,r);try{await l.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),n&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=n),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,a.QP)(e)}return null}async loadStyle(e,t){const r=e||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,s.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const i=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||i})}getStyleLayer(e){return(0,s.o8)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,s.o8)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)?"visible":"none"}write(e,t){return t?.origin&&!this.styleUrl?((0,ce.U4)(t,this,"style defined by JSON only are not supported"),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[i,n]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await N(r,"esri",e,n,t),{layerDefinition:r.validatedSource,url:i,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style&&r.style.sprite&&G(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style&&r.style.glyphs&&G(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(x)return x;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return x=new Promise(t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy}),x}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new ne.A(r.style,!1)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const i=t[2]&&t[2].toLowerCase();if(!i)return;const n=t[1]||"";for(const e of r)if(e.toLowerCase().includes(i))return(0,u.S8)(`//static.arcgis.com/attribution/Vector${n}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"attributionDataUrl",null),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],de.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],de.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],de.prototype,"capabilities",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"currentStyleInfo",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:p.A})],de.prototype,"fullExtent",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:p.A})],de.prototype,"initialExtent",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],de.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({type:["VectorTileLayer"]})],de.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],de.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],de.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,c.MZ)()],de.prototype,"style",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"serviceUrl",null),(0,i.Cg)([(0,c.MZ)({type:h.A,readOnly:!0})],de.prototype,"spatialReference",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"styleRepository",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"sourceNameToSource",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"primarySource",void 0),(0,i.Cg)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],de.prototype,"styleUrl",null),(0,i.Cg)([(0,pe.K)(["portal-item","web-document"],"styleUrl")],de.prototype,"writeStyleUrl",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:T.A})],de.prototype,"tileInfo",null),(0,i.Cg)([(0,c.MZ)()],de.prototype,"tilemapCache",void 0),(0,i.Cg)([(0,he.w)("service","tilemapCache",["capabilities","tileInfo"])],de.prototype,"readTilemapCache",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],de.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}}),(0,c.MZ)(_.OZ)],de.prototype,"url",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],de.prototype,"version",void 0),(0,i.Cg)([(0,he.w)("version",["version","currentVersion"])],de.prototype,"readVersion",null),de=(0,i.Cg)([(0,c.$K)("esri.layers.VectorTileLayer")],de);const fe=de},52136(e,t,r){r.d(t,{p:()=>l});var i=r(5482),n=r(91429);const l=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},89186(e,t,r){r.d(t,{f:()=>c});var i=r(5482),n=r(91429),l=r(16930),s=r(87045),o=r(65509),a=r(25943),u=r(36005);const c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,r){const i=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:n,maxLOD:l,minScale:u,maxScale:c}=t;if(null==n&&null==l&&(0!==u||0!==c)){const e=e=>Math.round(1e4*e)/1e4;u=e(u||t.tileInfo.lods[0].scale),c=e(c||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const r of t.tileInfo.lods){const t=e(r.scale);n=t>=u?r.level:n,l=t>=c?r.level:l}}if(i)return new a.d({layer:this,minLOD:n,maxLOD:l});if(t.tileInfo){const e=new s.A;return e.read(t.tileInfo,r),new o.A(e,n,l)}return null}};return(0,i.Cg)([(0,n.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,n.MZ)()],r.prototype,"minScale",void 0),(0,i.Cg)([(0,u.w)("service","minScale")],r.prototype,"readMinScale",null),(0,i.Cg)([(0,n.MZ)()],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,i.Cg)([(0,n.MZ)({type:l.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"supportsBlankTile",null),(0,i.Cg)([(0,n.MZ)({type:s.A})],r.prototype,"tileInfo",void 0),(0,i.Cg)([(0,n.MZ)()],r.prototype,"tilemapCache",void 0),(0,i.Cg)([(0,u.w)("service","tilemapCache",["capabilities","tileInfo"])],r.prototype,"readTilemapCache",null),(0,i.Cg)([(0,n.MZ)()],r.prototype,"version",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISCachedService")],r),r}},18768(e,t,r){r.d(t,{b:()=>o});var i=r(5482),n=r(53966),l=r(91429),s=r(60694);const o=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,s.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,s.Jf)(e,n.A.getLogger(this)))}};return(0,i.Cg)([(0,l.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],r),r}},69208(e,t,r){r.d(t,{d:()=>l});var i=r(5482),n=r(91429);const l=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},8303(e,t,r){r.d(t,{A:()=>I});var i=r(5482),n=r(92602),l=r(70333),s=r(11254),o=r(60999),a=r(49186),u=r(36563),c=r(53966),p=r(97768),h=r(17676),d=r(84952),f=r(91429),y=r(77548),m=r(20655),g=r(80812),w=r(41318),A=r(10407),v=r(36005),S=r(43937);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.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 r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),i=new AbortController,n=(0,u.rE)(i);return this.addHandles(n,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:i.signal})}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,h.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,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!l.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let s,o;if(n)s=r.portal.url;else try{s=await(0,y.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(l.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,u=!1,c=!1;if(!o)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(n?await r.reload():(r=new g.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,A.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.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=l.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=m.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.A.fromJSON(c.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||m.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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.Cg)([(0,f.MZ)({type:g.default})],I.prototype,"portalItem",null),(0,i.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,i.Cg)([(0,S.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,i.Cg)([(0,f.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,i.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],I),I},_={credential:null,user:null}},65509(e,t,r){r.d(t,{A:()=>l});var i=r(49186),n=r(17676);class l{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){const i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,l){await(0,n.NO)(l);const s=this.getAvailability(e,t,r);if("unavailable"===s)throw new i.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return s}async fetchAvailabilityUpsample(e,t,r,i,l){await(0,n.NO)(l),i.level=e,i.row=t,i.col=r;const s=this.tileInfo;return s.updateTileInfo(i),this.fetchAvailability(e,t,r,l).catch(e=>{if((0,n.zf)(e))throw e;if(s.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,l);throw e})}}},88788(e,t,r){r.d(t,{m:()=>s,v:()=>l});var i=r(84952),n=r(20655);function l(e,t){return{...o(e,t),readResourcePaths:[]}}function s(e,t,r){const n=(0,i.An)(e.itemUrl);return{...o(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},10407(e,t,r){r.d(t,{It:()=>d,LG:()=>s,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>a,mm:()=>h,sQ:()=>p});var i=r(91218),n=r(16930),l=r(28735);function s(e,t){if(!o(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return o(e,h.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?s(e,t):u(e,t)}async function p(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const h={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function d(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let l=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit");const o="update"===i||"admin"===i;return o?s=l=!0:s&&(l=!0),{features:{edit:l,fullEdit:s},content:{updateItem:o}}}},44159(e,t,r){r.d(t,{A:()=>n});var i=r(93687);class n{static{this.pool=new i.A(()=>new n(""),null,null,25,50)}static getId(e,t,r,i){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${i}`}constructor(e,t,r,i){this.set(e,t,r,i)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,i){this.set(e,t,r,i)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new n(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,i){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,r,i,n]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(n)}else this.level=+e,this.row=+t,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new n(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,r){const i=this.clone();return i.col+=e,i.row+=t,r.normalizeKey(i),i}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,i=this.world;return[new n(e,t,r,i),new n(e,t,r+1,i),new n(e,t+1,r,i),new n(e,t+1,r+1,i)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},78553(e,t,r){r.d(t,{D:()=>l,p:()=>n});var i=r(56507);function n(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);