@arcgis/core 4.27.0-rc.1 → 4.27.0-rc.3

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 (179) hide show
  1. package/README.md +2 -2
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{0610691a0c0d9fbbd6d2.js → 013de5c2955801b329b3.js} +1 -1
  5. package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +1 -0
  6. package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +1 -0
  7. package/assets/esri/core/workers/chunks/0e65e00173b66c7fec2e.js +1 -0
  8. package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
  9. package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +1 -0
  10. package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
  11. package/assets/esri/core/workers/chunks/2faa8f08f2fdaac3f4af.js +1 -0
  12. package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 3160af63b860b52db389.js} +1 -1
  13. package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
  14. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
  15. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
  16. package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
  17. package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
  18. package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → 50f910797c17c3028521.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{f339db2b599fa9585283.js → 5e6471dd2a08e66b47d0.js} +79 -81
  20. package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
  21. package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{d8bd3f498b3fa8153404.js → 6f510f28526c73ab453c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
  27. package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
  28. package/assets/esri/core/workers/chunks/89001ee8d3f69fa03cc1.js +1 -0
  29. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
  30. package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
  31. package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
  32. package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +1 -0
  33. package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
  34. package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
  36. package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +1 -0
  37. package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +1 -0
  38. package/assets/esri/core/workers/chunks/{92e7f224a80195e606d6.js → d4ba894a2583f3930a4f.js} +1 -1
  39. package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
  40. package/assets/esri/core/workers/chunks/dabd889e064c4e7807fa.js +1 -0
  41. package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
  43. package/assets/esri/core/workers/chunks/f35895e03c036d67b3ed.js +1 -0
  44. package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
  45. package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
  46. package/assets/esri/core/workers/chunks/{c6efe2e04ea6a55bb6e3.js → f6e68befe2812b90b40d.js} +1 -1
  47. package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
  48. package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
  49. package/assets/esri/core/workers/chunks/ff42585e1b1d0c5497af.js +1 -0
  50. package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
  51. package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
  52. package/assets/esri/themes/base/widgets/_Feature.scss +4 -0
  53. package/assets/esri/themes/base/widgets/_FeatureContent.scss +9 -2
  54. package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
  55. package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +1 -0
  56. package/assets/esri/themes/dark/main.css +1 -1
  57. package/assets/esri/themes/light/main.css +1 -1
  58. package/assets/esri/themes/light/view.css +1 -1
  59. package/chunks/DefaultMaterial.glsl.js +3 -2
  60. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  61. package/core/timeUtils.js +1 -1
  62. package/geometry/Mesh.js +1 -1
  63. package/geometry/support/DoubleArray.js +1 -1
  64. package/geometry/support/meshVertexSpaceUtils.js +5 -0
  65. package/interfaces.d.ts +263 -31
  66. package/kernel.js +1 -1
  67. package/layers/VideoLayer.js +1 -1
  68. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  69. package/layers/graphics/controllers/StreamController.js +1 -1
  70. package/layers/graphics/data/QueryEngine.js +1 -1
  71. package/layers/graphics/data/attributeSupport.js +1 -1
  72. package/layers/graphics/editingSupport.js +1 -1
  73. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  74. package/layers/support/editableLayers.js +1 -1
  75. package/layers/support/layerUtils.js +1 -1
  76. package/layers/video/VideoController.js +1 -1
  77. package/layers/video/videoUtils.js +5 -0
  78. package/package.json +1 -1
  79. package/portal/PortalItem.js +1 -1
  80. package/request.js +1 -1
  81. package/rest/support/meshFeatureSet.js +1 -1
  82. package/smartMapping/symbology/flow.js +1 -1
  83. package/statistics/utils.js +1 -1
  84. package/support/requestUtils.js +1 -1
  85. package/support/revision.js +1 -1
  86. package/symbols/cim/CIMSymbolHelper.js +1 -1
  87. package/views/2d/layers/StreamLayerView2D.js +1 -1
  88. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  89. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  90. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  91. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  92. package/views/3d/layers/I3SMeshView3D.js +1 -1
  93. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  94. package/views/3d/layers/II3SMeshView3D.js +1 -1
  95. package/views/3d/layers/SceneLayerView3D.js +1 -1
  96. package/views/3d/layers/SceneLayerWorker.js +1 -1
  97. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  98. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  99. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  100. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  101. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  102. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  103. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  104. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  105. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +3 -9
  106. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +12 -9
  107. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +10 -10
  108. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  109. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
  110. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -8
  111. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  112. package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
  113. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  114. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  115. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  116. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  117. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  118. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  119. package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
  120. package/views/draw/DrawGraphicTool.js +1 -1
  121. package/views/layers/GroupLayerView.js +1 -1
  122. package/webmap/initialViewPropertiesUtils.js +1 -1
  123. package/widgets/Daylight/DaylightViewModel.js +1 -1
  124. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  125. package/widgets/Editor/CreateWorkflow.js +1 -1
  126. package/widgets/Editor/EditorViewModel.js +1 -1
  127. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  128. package/widgets/Editor/UpdateWorkflow.js +1 -1
  129. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  130. package/widgets/Editor/Workflow.js +1 -1
  131. package/widgets/Editor/workflowUtils.js +1 -1
  132. package/widgets/Editor.js +1 -1
  133. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  134. package/widgets/Feature/FeatureRelationship.js +1 -1
  135. package/widgets/Feature/support/featureUtils.js +1 -1
  136. package/widgets/FeatureForm/EditableInput.d.ts +2 -2
  137. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  138. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  139. package/widgets/FeatureForm/css.js +1 -1
  140. package/widgets/FeatureForm.js +1 -1
  141. package/widgets/FeatureTable/FieldColumn.js +1 -1
  142. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  143. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  144. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  145. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  146. package/widgets/UtilityNetworkTrace.js +1 -1
  147. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
  148. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  149. package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
  150. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  151. package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
  152. package/widgets/ValuePicker.js +1 -1
  153. package/widgets/support/geolocationUtils.js +1 -1
  154. package/assets/esri/core/workers/chunks/07651ef8348f702d59ac.js +0 -1
  155. package/assets/esri/core/workers/chunks/0a02ac5628d1739372c6.js +0 -1
  156. package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
  157. package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
  158. package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
  159. package/assets/esri/core/workers/chunks/39714837f9d3708e3806.js +0 -1
  160. package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
  161. package/assets/esri/core/workers/chunks/474d9b334812533bab36.js +0 -1
  162. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
  163. package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
  164. package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
  165. package/assets/esri/core/workers/chunks/785a6c925f29bc962992.js +0 -1
  166. package/assets/esri/core/workers/chunks/90da1ed112b82712d0ef.js +0 -1
  167. package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
  168. package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
  169. package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
  170. package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
  171. package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
  172. package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
  173. package/assets/esri/core/workers/chunks/b5fc6f2044ed047c5afd.js +0 -1
  174. package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
  175. package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
  176. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
  177. package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
  178. package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
  179. package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6502],{41123:(e,t,r)=>{r.d(t,{D:()=>a,z:()=>n});const s="randomUUID"in crypto;function a(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${a()}}`}},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>y,LL:()=>u,NZ:()=>l,fV:()=>f,vj:()=>g,yT:()=>F,zE:()=>b});var s=r(3172),a=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,a.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,s.default)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){return Array.isArray(e)?e.every((e=>m(e,t))):m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(d(r)&&d(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.Ow)(e.name,t)??(0,i.S0)(e.type,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function F(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>g,applyEdits:()=>b,aw:()=>f,uploadAssets:()=>A});var s=r(38171),a=r(46791),n=r(20102),i=r(22974),o=r(95330),u=r(81271),l=r(16306),d=r(66361),p=r(2981),c=r(84230);function h(e){return e&&null!=e.applyEdits}function y(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function f(e){return e.every(y)}function m(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function g(e){return e.every(m)}async function b(e,t,r,s={}){let u;if((0,d.lQ)(e)&&e.url)u=(0,d.jF)(e.url,e.layerId,"original-and-current-features"===s.returnServiceEditsOption);else{u=(0,o.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:o,edits:l}=await async function(e,t,r,s){if(await e.load(),!h(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,c.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:o}=await async function(e,t,r){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),o=null!=e.infoFor3D;if(!t||!s&&!i)throw new n.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const u=(0,c.S1)(e);if(!u.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!u.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!u.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!u.editing.supportsGlobalId&&i)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new n.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const l={...r};if(null!=l.rollbackOnFailureEnabled||u.editing.supportsRollbackOnFailure||(l.rollbackOnFailureEnabled=!0),!1===l.rollbackOnFailureEnabled&&"original-and-current-features"===l.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!u.editing.supportsReturnServiceEditsInSourceSpatialReference&&l.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(l.returnServiceEditsInSourceSR&&"original-and-current-features"!==l.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const d={...t};if(d.addFeatures=t&&a.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():d.addFeatures||[],d.updateFeatures=t&&a.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():d.updateFeatures||[],d.deleteFeatures=t&&a.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():d.deleteFeatures||[],d.addFeatures.length&&!u.operations.supportsAdd)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(d.updateFeatures.length&&!u.operations.supportsUpdate)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(d.deleteFeatures.length&&!u.operations.supportsDelete)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");d.addAttachments=d.addAttachments||[],d.updateAttachments=d.updateAttachments||[],d.deleteAttachments=d.deleteAttachments||[],d.addFeatures=d.addFeatures.map(_),d.updateFeatures=d.updateFeatures.map(_),d.addAssetFeatures=[];const h=r?.globalIdUsed||o;return d.addFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),d.updateFeatures.forEach((t=>function(e,t,r){F(e,t,r);const s=(0,c.S1)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h))),d.deleteFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),d.addAttachments.forEach((t=>w(t,e))),d.updateAttachments.forEach((t=>w(t,e))),o&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=(0,p.S0)("model/gltf-binary",r.supportedFormats)??(0,p.Ow)("glb",r.supportedFormats);if(!s||!r.editFormats.includes(s))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])R(t)&&a.push(t);for(const t of e.updateFeatures??[])R(t)&&a.push(t)}(d,e),{edits:await S(d),options:l}}(e,r,s);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,o)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,s),d=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:l,addedFeatures:d(o.addFeatureResults),updatedFeatures:d(o.updateFeatureResults),deletedFeatures:d(o.deleteFeatureResults),addedAttachments:d(o.addAttachmentResults),updatedAttachments:d(o.updateAttachmentResults),deletedAttachments:d(o.deleteAttachmentResults),exceededTransferLimit:!1};return o.editedFeatureResults?.length&&(y.editedFeatures=o.editedFeatureResults),u.resolve(y),o}catch(e){throw u.reject(e),e}}function F(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function w(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,u.sJ)(s.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function S(e){const t=e.addFeatures??[],r=e.updateFeatures??[],s=t.concat(r).map((e=>e.geometry)),a=await(0,l.aX)(s),n=t.length,i=r.length;return a.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),a.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function _(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function R(e){return"mesh"===e?.geometry?.type}function A(e,t,r,s){if(!h(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}},6502:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var s=r(43697),a=(r(66577),r(38171)),n=r(40330),i=r(3172),o=r(92835),u=r(67676),l=r(20102),d=r(80442),p=r(35454),c=r(83379),h=r(92604),y=r(78286),f=r(95330),m=r(67900),g=r(81271),b=r(41123),F=r(5600),w=(r(75215),r(52011)),S=r(6570),_=r(44547),R=r(33955),A=r(84470),v=r(14720),I=r(25278),O=r(49735),E=r(66677),q=r(2981),C=r(4967),x=r(59431),Z=r(14165),T=r(82971);const D=new p.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),P=new Set(["Feature Layer","Table"]),N=new p.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let M=class extends c.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,f.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=null!=e?e.signal:null,r=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(r,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,d.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,u=e?.operations?.supportsQueryAttachments??!1;return new O.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),n=this._getFormDataForAttachment(t,a.query);try{const e=await(0,i.default)(s,{body:n});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async updateAttachment(e,t,r){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",n=this._getLayerRequestOptions({query:{attachmentId:t}}),o=this._getFormDataForAttachment(r,n.query);try{const e=await(0,i.default)(a,{body:o});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this,s=r.infoFor3D,a=null!=s,o=a||(t?.globalIdUsed??!1),l=e.addFeatures?.map((e=>this._getFeatureJSON(e,s)))??[],d=(await Promise.all(l)).filter(u.pC),p=e.updateFeatures?.map((e=>this._getFeatureJSON(e,s)))??[],c=(await Promise.all(p)).filter(u.pC),h=this._getFeatureIds(e.deleteFeatures,o);(0,x.P)(d,c,r.spatialReference);const y=await this._getAttachmentEditsJSON(e),f=a?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,m=r.capabilities.editing.supportsAsyncApplyEdits&&null!=f&&(0!==f.adds.length||0!==f.updates.length),g={gdbVersion:t?.gdbVersion||r.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:o,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId,async:m};t?.returnServiceEditsOption?(g.edits=JSON.stringify([{id:r.layerId,adds:d,updates:c,deletes:h,attachments:y,assetMaps:f}]),g.returnServiceEditsOption=D.toJSON(t?.returnServiceEditsOption),g.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(g.adds=d.length?JSON.stringify(d):null,g.updates=c.length?JSON.stringify(c):null,g.deletes=h.length?o?JSON.stringify(h):h.join(","):null,g.attachments=y&&JSON.stringify(y),g.assetMaps=null!=f?JSON.stringify(f):void 0);const b=this._getLayerRequestOptions({method:"post",query:g}),F=t?.returnServiceEditsOption?r.url:r.parsedUrl.path,w=m?await this._asyncApplyEdits(F+"/applyEdits",b):await(0,i.default)(F+"/applyEdits",b);if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=n.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(w)}async deleteAttachments(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.default)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,i.default)(`${s}/${r}`,t),{id:n,extent:u,fullExtent:l,timeExtent:d}=a,p=u||l;return{id:n,fullExtent:p&&S.Z.fromJSON(p),timeExtent:d&&o.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,E.M8)(this.layer.url))return"unavailable";const e=(0,g.v_)(this.layer.url,"status"),t=await(0,i.default)(e,{query:{f:"json"}});return N.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(6946).then(r.bind(r,36946));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,i.default)(e,t)).data.statusUrl;for(;;){const e=(await(0,i.default)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,i.default)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,f.e4)($)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:r}=await(0,i.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,d.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=r}this.sourceJSON=this._patchServiceJSON(e);const r=e.type;if(!P.has(r))throw new l.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,I.bU)(e.geometryType).renderer;(0,y.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}async _getFeatureJSON(e,t){const{geometry:r}=e,s={...e.attributes};if(null!=t&&"mesh"===r?.type){const{transformFieldRoles:e}=t,{origin:a,spatialReference:n,transform:i}=r,o=this.layer.spatialReference;await(0,_.iQ)(n,o);const u=(0,_.iV)(a,o);if(s[e.originX]=u.x,s[e.originY]=u.y,s[e.originZ]=u.z??0,null!=i){const{translation:t,scale:a,rotation:u}=i,{vertexSpace:l}=r,d=l.isGeoreferenced?1:(0,m.r6)(n)/(0,m.r6)(o);s[e.translationX]=t[0]*d,s[e.translationY]=-t[2]*d,s[e.translationZ]=t[1]*d,s[e.scaleX]=a[0],s[e.scaleY]=a[2],s[e.scaleZ]=a[1],s[e.rotationX]=u[0],s[e.rotationY]=u[2],s[e.rotationZ]=u[1],s[e.rotationDeg]=u[3]}return{geometry:null,attributes:s}}return null==r?{attributes:s}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:s}}async _getAttachmentEditsJSON(e){const t=await Promise.all((e.addAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),r=await Promise.all((e.updateAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),s=e.deleteAttachments??[];return t.length||r.length||s.length?{adds:t,updates:r,deletes:[...s]}:null}async _getAttachmentEditJSON(e){const{feature:t,attachment:r}=e,{globalId:s,name:a,contentType:n,data:i,uploadId:o}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),o)u.uploadId=o;else if(i){const e=await(0,g.IR)(i);e&&(u.contentType=e.mediaType,u.data=e.data),i instanceof File&&(u.name=i.name)}return a&&(u.name=a),n&&(u.contentType=n),u}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const s=r.map((e=>e.geometry));return await this.uploadAssets(s),{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===i.length){h.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(A.yT)??i[0],{vertexSpace:l}=e,d=l.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,b.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):h.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_getFeatureIds(e,t){if(!e||0===e.length)return[];if(t&&(0,v.Ey)(e))return e.map((e=>e.globalId));if((0,v.aw)(e))return e.map((e=>e.objectId));const{layer:r}=this,s=t?r.globalIdField:r.objectIdField;return s?e.map((e=>e.getAttribute(s))):[]}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=a?.assetMaps;if(n){for(const e of n.addResults)e.success||h.Z.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of n.updateResults)e.success||h.Z.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const i=a?.attachments,o={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:i&&i.addResults?i.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:i&&i.updateResults?i.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:i&&i.deleteResults?i.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(o.editMoment=a.editMoment),s.length>0){o.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new T.Z(t.spatialReference):null;o.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.adds?.map((e=>this._createEditedFeature(e,r)))||[],updates:t?.updates?.map((e=>({original:this._createEditedFeature(e[0],r),current:this._createEditedFeature(e[1],r)})))||[],deletes:t?.deletes?.map((e=>this._createEditedFeature(e,r)))||[],spatialReference:r}})}}return o}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,R.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const r=t.details.messages&&t.details.messages[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new l.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:s,parsedUrl:a}=t;if(null==s||null==r)return e;const n=(0,q.$6)(s);if(null==n)return e;const i=(0,g.v_)(a.path,`../${n.id}`),o=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(a).length>0?l.push(t):o.push(t);const d=l.map((e=>e.getAttribute(r))).filter(u.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=s,h=new Z.Z;h.where=`${p} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[c,p],h.returnGeometry=!1;const y=await(0,C.e)(i,h),{features:f}=y;return 0===f.length?e:[...o,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,n=f.filter((e=>e.getAttribute(p)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(c)));return s.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,s._)([(0,F.Cb)()],M.prototype,"type",void 0),(0,s._)([(0,F.Cb)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s._)([(0,F.Cb)({readOnly:!0})],M.prototype,"queryTask",null),M=(0,s._)([(0,w.j)("esri.layers.graphics.sources.FeatureLayerSource")],M);const $=1e3,k=M},49735:(e,t,r)=>{r.d(t,{Z:()=>R});var s=r(43697),a=r(92036),n=r(20102),i=r(80442),o=r(95330),u=r(81271),l=r(5600),d=(r(75215),r(67676),r(52011)),p=r(2981),c=r(10158),h=r(11282),y=r(41818),f=(r(66577),r(34599)),m=r(14165),g=r(6570),b=r(5396),F=r(4967),w=r(53261),S=r(74889);let _=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],a=(0,i.Z)("featurelayer-pbf-statistics"),n=!s||a;let o;if(this.pbfSupported&&n)try{o=await(0,w.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(o=await(0,F.F)(this.url,r,t)),this._normalizeFields(o.fields),o}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return S.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,o.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(1681)]).then(r.bind(r,91681)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const s=(0,h.en)(e);return(0,f.Vr)(s,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,b.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:s},{executeRelationshipQuery:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:s},{executeRelationshipQueryForCount:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:s,fetchAttachments:a,processAttachmentQueryResult:n}=await(0,o.Hl)(r.e(540).then(r.bind(r,30540)),t),i=(0,h.en)(this.url);return n(i,await(this.queryAttachmentsSupported?s(i,e,t):a(i,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:s}=await(0,o.Hl)(r.e(1158).then(r.bind(r,71158)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:s}=await(0,o.Hl)(r.e(3992).then(r.bind(r,33992)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:s}=await(0,o.Hl)(r.e(1790).then(r.bind(r,21790)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:s}=await(0,o.Hl)(r.e(4371).then(r.bind(r,14371)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?c.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:a}=r,i=(0,p.S0)("model/gltf-binary",s)??(0,p.Ow)("glb",s),o=(0,p.S0)("model/gltf+json",s)??(0,p.Ow)("gtlf",s);for(const e of a){if(e===i){t.formatOf3DObjects=e;break}e!==o||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new n.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:s,originY:a,originZ:n,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:d,scaleZ:p,rotationX:c,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,a,n,i,o,u,l,d,p,c,h,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,l.Cb)({type:c.n})],_.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"gdbVersion",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"infoFor3D",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s._)([(0,l.Cb)()],_.prototype,"pbfSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.Cb)({type:String})],_.prototype,"url",void 0),_=(0,s._)([(0,d.j)("esri.tasks.QueryTask")],_);const R=_},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var s=r(80442),a=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},2981:(e,t,r)=>{r.d(t,{$6:()=>d,Ow:()=>n,S0:()=>a,d1:()=>i});const s=[["binary","application/octet-stream","bin",""]];function a(e,t){return u(function(e,t){return o(t).find((t=>l(t)===e))}(e,t))}function n(e,t){return u(function(e,t){const r=e.toLowerCase();return o(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function i(e,t){return l(function(e,t){return o(t).find((t=>u(t)===e))}(e,t))}function o(e){return[...s,...e]}function u(e){return e?.[0]}function l(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},41818:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.hH)(i,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.Ev)(i,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>o});var s=r(11282),a=r(34599),n=r(74889),i=r(14165);async function o(e,t,r){const s=await u(e,t,r);return n.Z.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),o={...r},u=i.Z.from(t),{data:l}=await(0,a.JT)(n,u,u.sourceSpatialReference,o);return l}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var s=r(11282),a=r(70586),n=r(69285),i=r(98732);function o(e,t){return t}function u(e,t,r,s){switch(r){case 0:return c(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?c(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function l(e,t,r,s){return 2===r?c(e,t,2):u(e,t,r,s)}function d(e,t,r,s){return 2===r?c(e,t,3):u(e,t,r,s)}function p(e,t,r,s){return 3===r?c(e,t,3):l(e,t,r,s)}function c({translate:e,scale:t},r,s){return e[s]+r*t[s]}class h{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=o,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,a.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,i.$g)(r.clone(),r,!1,!1,this._transform),n=(0,i.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,a.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,a.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?p:t?l:r?d:u}}var y=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const a=(0,s.en)(e),n={...r},i=f.Z.from(t),o=!i.quantizationParameters,{data:u}=await(0,y.qp)(a,i,new h({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),n);return u}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1681],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,o,i,s=n(5732),a={exports:{}};r=a,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,m=t(e,0,g,o,!0),d=[];if(!m||m.next===m.prev)return d;if(f&&(m=l(e,n,m,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var x=o;x<g;x+=o)(u=e[x])<i&&(i=u),(p=e[x+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(m,d,o,i,s,h),d}function t(e,t,n,r,o){var i,s;if(o===M(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,m,d=e;e.prev!==e.next;)if(g=e.prev,m=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(m.i/l),_(e),e=m.next,d=m.next;else if((e=m)===d){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(d(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,m=e.nextZ;f&&f.z>=p&&m&&m.z<=h;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;m&&m.z<=h;){if(m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&T(i,s)&&T(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),_(o),_(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&x(l,c)){var u=C(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&d(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),T(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=C(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function d(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function x(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=A(y(e,t,n)),i=A(y(e,t,r)),s=A(y(n,r,e)),a=A(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function C(e,t){var n=new S(e.i,e.x,e.y),r=new S(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new S(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(M(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(M(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var r=n(1533);function o(e){return(0,r.kJ)(e)?e.length<r.DB?e:i(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const m="esri.geometry.support.MeshComponent",d=a.Z.getLogger(m);let x=r=class extends i.wq{static from(e){return(0,p.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)(m)],x);const y=x},65542:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(91024),u=n(80218);let p=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(91024),u=n(80218);let p=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=r=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},91024:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(43697);n(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,n){return n||(n=s()),n.getContext("2d").createImageData(e,t)}var l,c=n(96674),u=n(5600),p=n(75215),h=(n(67676),n(71715)),f=n(52011),g=n(30556),m=n(25929);const d=new WeakMap;let x=0,y=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,m.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,m.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(d.has(this.data)||d.set(this.data,++x),t(d.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,n)}catch(e){i=!1}const o=a(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,r._)([(0,u.Cb)({type:String,json:{write:m.w}})],y.prototype,"url",null),(0,r._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],y.prototype,"data",null),(0,r._)([(0,g.c)("data")],y.prototype,"writeData",null),(0,r._)([(0,h.r)("data")],y.prototype,"readData",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],y.prototype,"contentHash",null),y=l=(0,r._)([(0,f.j)("esri.geometry.support.MeshTexture")],y);const v=y},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(2368),i=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>m});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return m(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),m(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return m(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return m(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return m(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function m(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function d(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>m,vj:()=>x,yT:()=>v,zE:()=>y});var r=n(3172),o=n(67676),i=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.default)(this.partUrl,{responseType:"blob"});return(0,i.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(f):f(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){const{type:t,name:n}=e;return p.test(t)||h.test(n)}return p.test(e.assetMimeType)||h.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){return Array.isArray(e)?e.every((e=>d(e,t))):d(e,t)}(n,t)}function m(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),o=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function d(e,t){return e instanceof a&&e.isOnService(t)}function x(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function y(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(22021),o=n(24882);function i(e,t,n){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=n?.minReduction??0,f=n?.originalIndices||null,g=f?f.length:0,m=n?.componentOffsets||null;let d=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>d&&(d=t)}else d=u;const x=Math.floor(1.1*d)+1;(null==c||c.length<2*x)&&(c=new Uint32Array((0,r.Sf)(2*x)));for(let e=0;e<2*x;e++)c[e]=0;let y=0;const v=!!m&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),T=1.96;let C=0!==h?Math.ceil(4*T*T/(h*h)*h*(1-h)):w,Z=1,_=m?m[1]:w;for(let e=0;e<w;e++){if(e===C){const t=1-y/e;if(t+T*Math.sqrt(t*(1-t)/e)<h)return null;C*=2}if(e===_){for(let e=0;e<2*x;e++)c[e]=0;if(f)for(let e=m[Z-1];e<m[Z];e++)A[e]=b[f[e]];_=m[++Z]}const n=v?f[e]:e,r=n*t,o=l(p,r,t);let i=o%x,a=y;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,r,e*t,t)){a=b[e];break}}i++,i>=x&&(i-=x)}a===y&&(c[2*i]=o,c[2*i+1]=n+1,y++),b[n]=a}if(0!==h&&1-y/u<h)return null;if(v){for(let e=m[Z-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const S=i?new Array(y):new Uint32Array(y*t);y=0;for(let e=0;e<w;e++)b[e]===y&&(a(p,(v?f[e]:e)*t,S,y*t,t),y++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(S)?S:S.buffer,indices:b,uniqueCount:y}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},91681:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>qe,extractMesh:()=>Ve,meshFeatureSetFromJSON:()=>Be});var r,o,i=n(38171),s=n(92604),a=n(30175),l=n(65617),c=n(6570),u=n(43697),p=n(20102),h=n(3920),f=n(83379),g=n(609),m=n(95330),d=n(17445),x=n(5600),y=(n(75215),n(67676),n(80442),n(52011)),v=n(9361),w=n(94139),b=n(38913),A=n(3709),T=n(62540),C=n(85872),Z=n(50567),_=n(84555),S=n(2674),M=n(71630),R=n(95401),F=n(86662),L=n(83025),j=n(24882),E=n(47545);function D(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,L.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],m=n===r.CCW_IS_HOLE&&P(g);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=m?U(g,g.length-1,-1,h,f,g.length,t):U(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=U(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=U(n,0,1,h,f,n.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function U(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function P(e){return!(0,F.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var O=n(66459);let N=null;function I(e,t){let n=1/0,r=1/0,o=1/0,i=-1/0,s=-1/0,a=-1/0;const l=e.length;let u=0;for(;u<l;){const t=e[u++],l=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,l),o=Math.min(o,c),i=Math.max(i,t),s=Math.max(s,l),a=Math.max(a,c)}return new c.Z({xmin:n,ymin:r,zmin:o,xmax:i,ymax:s,zmax:a,spatialReference:t})}var k=n(17896),z=n(44547),W=n(13442);const H="esri.geometry.support.meshUtils.centerAt";const $=(0,l.c)(),B=(0,l.c)(),V=(0,l.c)();var q=n(81271);function G(e){const t=(0,q.Yd)(e.url);return n=>{const r=(0,q.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function J(e){return Q.fromBlob(e)}const K=/^(model\/gltf\+json)|(model\/gltf-binary)$/,Y=/\.(gltf|glb)/i;function X(e){const t=new Map;let n=null;for(const{name:r,mimeType:o,source:i}of e)(null==n||K.test(o)||Y.test(r))&&(n=i.url),t.set(r,i.url),i.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new p.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new Q(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class Q{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new Q(t,(()=>URL.revokeObjectURL(t)))}}var ee=n(2368),te=n(46791),ne=n(84470);let re=class extends ee.j{constructor(){super(),this.externalSources=new te.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ne.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,ne.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,ne.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(ne.NZ)}};(0,u._)([(0,x.Cb)()],re.prototype,"externalSources",void 0),(0,u._)([(0,x.Cb)()],re.prototype,"displaySource",null),(0,u._)([(0,x.Cb)()],re.prototype,"_implicitDisplaySource",null),(0,u._)([(0,x.Cb)()],re.prototype,"_explicitDisplaySource",void 0),re=(0,u._)([(0,y.j)("esri.geometry.support.meshUtils.Metadata")],re);var oe=n(21787),ie=n(46521),se=n(13598),ae=n(58995),le=n(56493);function ce(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const ue=(0,l.c)(),pe=(0,se.c)(),he=(0,ie.c)(),fe={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function ge(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];ye[0]=n[0],ye[4]=n[1],ye[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)xe[n]=e.position[t+n];(0,k.t)(xe,xe,ye);for(let n=0;n<3;n++)e.position[t+n]=xe[n]}if(n[0]!==n[1]||n[1]!==n[2]){ye[0]=1/n[0],ye[4]=1/n[1],ye[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)xe[n]=e.normal[t+n];(0,k.t)(xe,xe,ye),(0,k.n)(xe,xe);for(let n=0;n<3;n++)e.normal[t+n]=xe[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:o,transform:i}=(0,O.w1)(e,t,n);return{vertexAttributes:new M.Q({...r,uv:e.uv}),vertexSpace:o,transform:i,components:[new T.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const me={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},de={south:0,east:1,north:2,west:3,up:4,down:5},xe=(0,l.c)(),ye=(0,ie.c)();var ve=n(52138);const we="esri.geometry.support.meshUtils.rotate";function be(e,t,n,r=l.Z){if(null!=e){(0,ve.d)(Ze,(0,A.WH)(t),(0,A.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Ae[n]=e[t+n]-r[n];(0,k.m)(Ae,Ae,Ze);for(let n=0;n<3;n++)e[t+n]=Ae[n]+r[n]}}}const Ae=(0,l.c)(),Te=(0,l.c)(),Ce=(0,A.Ue)(),Ze=(0,se.c)(),_e=(0,ie.c)(),Se=(0,l.c)(),Me="esri.geometry.support.meshUtils.scale";function Re(e,t,n=l.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Fe[t]=e[r+t]-n[t];(0,k.g)(Fe,Fe,t);for(let t=0;t<3;t++)e[r+t]=Fe[t]+n[t]}}const Fe=(0,l.c)(),Le=(0,l.c)(),je=(0,l.c)();var Ee;const De="esri.geometry.Mesh",Ue={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:Z.Z,"georeferenced-relative":C.Z,local:_.Z}};let Pe=Ee=class extends((0,h.p)(f.Z.LoadableMixin((0,g.v)(v.Z)))){constructor(e){super(e),this.components=null,this.vertexSpace=new Z.Z,this.transform=null,this.metadata=new re,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,d.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,o=n.position;if(0===o.length||e&&0===e.length)return new c.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:o,zmax:i},s,a,l){o??=0,i??=0,N??=new Float64Array(24);const c=N;return c[0]=e,c[1]=n,c[2]=o,c[3]=e,c[4]=r,c[5]=o,c[6]=t,c[7]=r,c[8]=o,c[9]=t,c[10]=n,c[11]=o,c[12]=e,c[13]=n,c[14]=i,c[15]=e,c[16]=r,c[17]=i,c[18]=t,c[19]=r,c[20]=i,c[21]=t,c[22]=n,c[23]=i,(0,O.iV)(l,s,a,c,l,c),I(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return I((0,O.iV)(t,e,r,o,t),t)}return I(o,t)}get _untransformedExtent(){return I(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new w.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(T.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,A.qw)(e,t,n,Ne),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,we,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,k.s)(Ae,r.x,r.y,r.z??0),s=(0,k.b)(Ae,i,o);e.applyLocalInverse(s,Te),e.rotation=(0,A.qC)(e.rotation,n,(0,A.Ue)()),e.applyLocalInverse(s,s),(0,k.b)(s,s,Te),e.translation=(0,k.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,W.h)(r,n)?function(e,t,n){const r=e.spatialReference,o=(0,ae.rS)(r),i=Se;(0,z.KC)(n,i,o)||(0,z.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,z.Bm)(o,i,Ze,o),(0,oe.f)(_e,Ze);const h=Ce;(0,k.t)((0,A.ZZ)(Ce),(0,A.ZZ)(t),_e),h[3]=t[3],(0,le.XO)(s,r,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,r,p),be(c,h,3,i),(0,le.To)(c,s,r),null!=a&&null!=u&&(be(u,h,3),(0,le.Yk)(u,s,c,r,a)),null!=l&&null!=p&&(be(p,h,4),(0,le.M2)(p,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=Se;if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(we).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}be(e.vertexAttributes.position,t,3,r),be(e.vertexAttributes.normal,t,3),be(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Ne,r),this}offset(e,t,n,r){return this.loaded?(Oe[0]=e,Oe[1]=t,Oe[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,W.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,k.a)((0,l.c)(),n,t)}(r,t)):(0,W.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=ue;(0,z.Bm)(n,[c.x,c.y,c.z],pe,(0,ae.rS)(n)),(0,oe.f)(he,pe),(0,k.t)(u,t,he),(0,le.XO)(r,n,s),null!=o&&null!=a&&(0,le.Iz)(o,r,s,n,a),null!=i&&null!=l&&(0,le.wi)(i,r,s,n,l),ce(s,u),(0,le.To)(s,r,n),null!=o&&null!=a&&(0,le.Yk)(a,r,s,n,o),null!=i&&null!=l&&(0,le.M2)(l,r,s,n,i),e.vertexAttributesChanged()}(e,t):function(e,t){ce(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Oe,r),this):(s.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,Me,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,k.s)(Fe,r.x,r.y,r.z),s=(0,k.b)(Fe,i,o);e.applyLocalInverse(s,Le);const a=(0,k.g)((0,l.c)(),e.scale,n);e.scale=a,e.applyLocalInverse(s,s),(0,k.b)(s,s,Le),e.translation=(0,k.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=(0,W.h)(r,n),i=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,o=(0,ae.rS)(r),i=je;(0,z.KC)(n,i,o)||(0,z.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,le.XO)(s,r,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,r,p),Re(c,t,i),(0,le.To)(c,s,r),null!=a&&null!=u&&(0,le.Yk)(u,s,c,r,a),null!=l&&null!=p&&(0,le.M2)(p,s,c,r,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,n){const r=je;if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(Me).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Re(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}}(this,e,t),this):(s.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,W.A)(r,H,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=B,i=$;if(!(0,z.KC)(t,i,e.spatialReference))return void s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,z.KC)(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.b)(V,i,o),c=r.origin;r.origin=(0,k.a)((0,l.c)(),c,a)}(e,t,o)):(0,W.h)(e.spatialReference,n)?function(e,t,n){const r=(0,O.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=B,o=$;if((0,z.KC)(t,o,e.spatialReference)){if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(s.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:o}=t,{loadGLTFMesh:i}=await(0,m.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new p.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return X(e.map((e=>({name:e.name,mimeType:e.type,source:J(e)}))))}(e):async function(e,t){const n=await(0,m.WW)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new Q(n[0].partUrl);const r=await e.toBlob(t);return(0,m.k_)(t),Q.fromBlob(r)}(e);return(0,m.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,m.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,m.zE)();return X(n)}(e,t)}return J(e)}(o,r);(0,m.k_)(r);const a=i(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:G(s),useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:c}=await a;e.vertexAttributes=l,e.components=c}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:this.vertexSpace.clone(),transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(t)}cloneShallow(){return new Ee({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createBox()","expected location to be a Point instance"),null;const n=new Ee(ge(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=me,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=de[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new T.Z({faces:s,material:n.material}),new T.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);xe[2]=f;const g=0===e||e===t,m=g?n-1:n;for(let r=0;r<=m;r++){const f=r/m*2*Math.PI;xe[0]=-Math.sin(f)*h,xe[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let m=0;m<=g;m++){const d=m/g*2*Math.PI,x=n?0:.5;xe[0]=x*Math.sin(d),xe[1]=x*-Math.cos(d),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=xe[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:xe[t]/x;i[c++]=(m+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||m===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Ee(ge(function(e){const t=fe.facingAxisOrderSwap[e],n=fe.position,r=fe.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(fe.uv),faces:new Uint32Array(fe.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof b.Z))return s.Z.getLogger(De).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=D(e.rings,e.hasZ,r.CCW_IS_HOLE),n=new Array;let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=(0,L.Rq)(t.position,3*s,3*r),l=e.holeIndices.map((e=>e-s)),c=(0,j.mi)((0,R.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=(0,L.bg)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,j.mi)(o)}}(n,o,i),a=Array.isArray(s.position)?(0,E.d)(s.position,3,{originalIndices:s.faces}):(0,E.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,L.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Ee({vertexAttributes:new M.Q({position:n.position}),components:[new T.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new Z.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof w.Z))throw s.Z.getLogger(De).error(".createfromGLTF()","expected location to be a Point instance"),new p.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,m.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ee(await o(e,t,r))}static async createFromFiles(e,t,n){if(!(e instanceof w.Z)){const e="Expected location to be a Point instance";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const r=Ee.createWithExternalSource(e,t),o=n?.layer;if(!o){const e="A layer is needed to convert the files";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const[i]=await o.uploadAssets([r],n);return i}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:o,y:i,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new S.Z,c=n?.vertexSpace??new _.Z({origin:[o,i,s??0]}),u={source:t,extent:r},p=new re;return p.externalSources.push(u),new Ee({metadata:p,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:o,spatialReference:i}=e,s=t?.transform?.clone()??new S.Z,a=t?.vertexSpace??new _.Z({origin:[n,r,o??0]}),l=new Ee({transform:s,vertexSpace:a,spatialReference:i});return l.addResolvingPromise(Promise.reject(new p.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,u._)([(0,x.Cb)({type:[T.Z],json:{write:!0}})],Pe.prototype,"components",void 0),(0,u._)([(0,x.Cb)({nonNullable:!0,types:Ue,constructOnly:!0,json:{write:!0}})],Pe.prototype,"vertexSpace",void 0),(0,u._)([(0,x.Cb)({type:S.Z,json:{write:!0}})],Pe.prototype,"transform",void 0),(0,u._)([(0,x.Cb)({constructOnly:!0})],Pe.prototype,"metadata",void 0),(0,u._)([(0,x.Cb)()],Pe.prototype,"hasExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"_transformedExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"_untransformedExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"anchor",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"origin",null),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],Pe.prototype,"extent",null),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Pe.prototype,"hasZ",void 0),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Pe.prototype,"hasM",void 0),(0,u._)([(0,x.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Pe.prototype,"vertexAttributes",void 0),Pe=Ee=(0,u._)([(0,y.j)(De)],Pe);const Oe=(0,l.c)(),Ne=(0,A.Ue)(),Ie=Pe;var ke,ze,We=n(82971),He=n(2981),$e=n(74889);function Be(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=$e.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=qe(t,n.assetMaps),a=e.sourceSpatialReference??We.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of r){const n=Ve(e,l,a,t,s);null!=n&&o.features.push(new i.Z({geometry:n,attributes:u(e)}))}return o}function Ve(e,t,n,r,o){const i=e.attributes[t],s=o.get(i);if(null==s)return null;const{originPoint:a,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],o=e[n.originY],i=e[n.originZ];return{originPoint:new w.Z({x:r,y:o,z:i,spatialReference:t}),originVector:(0,l.f)(r,o,i)}}(e,n,r),p=c.Z.fromJSON(e.geometry);p.spatialReference=n;const h=function(e,{transformFieldRoles:t}){return new S.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]]})}(e.attributes,r),f=s.projectVertices?new C.Z({origin:u}):new _.Z({origin:u}),g=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==ke.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new ne.LL(n.url,n.hash))}n.push(new ne.CP(e.name,e.mimeType,t))}return n}(s);return g?Ie.createWithExternalSource(a,g,{extent:p,transform:h,vertexSpace:f}):Ie.createIncomplete(a,{extent:p,transform:h,vertexSpace:f})}function qe(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const o=r.assetName,i=r.assetType,l=r.assetHash,c=r.assetURL,u=r.conversionStatus,p=r.seqNo,h=(0,He.d1)(i,e.supportedFormats);if(!h){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const f=(0,a.s1)(n,t,(()=>({projectVertices:Je(r.flags).projectVertices,files:new Map})));(0,a.s1)(f.files,o,(()=>({name:o,type:i,mimeType:h,status:Ge(u),parts:[]}))).parts[p]={hash:l,url:c}}return n}function Ge(e){switch(e){case"COMPLETED":case"SUBMITTED":return ke.COMPLETED;case"INPROGRESS":return ke.PENDING;default:return ke.FAILED}}function Je(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(ze=ke||(ke={}))[ze.FAILED=0]="FAILED",ze[ze.PENDING=1]="PENDING",ze[ze.COMPLETED=2]="COMPLETED"}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4547],{52138:(t,e,n)=>{n.d(e,{A:()=>M,a:()=>a,d:()=>f,e:()=>P,f:()=>E,g:()=>h,h:()=>A,i:()=>i,j:()=>C,k:()=>c,m:()=>l,s:()=>s,t:()=>u,w:()=>_,y:()=>N,z:()=>O});var r=n(65617),o=n(46851);function s(t,e,n,r,o,s,i,u,a,l,_,c,P,E,f,M,S){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=i,t[6]=u,t[7]=a,t[8]=l,t[9]=_,t[10]=c,t[11]=P,t[12]=E,t[13]=f,t[14]=M,t[15]=S,t}function i(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){const n=e[1],r=e[2],o=e[3],s=e[6],i=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=s,t[11]=e[14],t[12]=o,t[13]=i,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function a(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],u=e[5],a=e[6],l=e[7],_=e[8],c=e[9],P=e[10],E=e[11],f=e[12],M=e[13],S=e[14],p=e[15],h=n*u-r*i,R=n*a-o*i,A=n*l-s*i,C=r*a-o*u,O=r*l-s*u,N=o*l-s*a,T=_*M-c*f,g=_*S-P*f,d=_*p-E*f,L=c*S-P*M,G=c*p-E*M,y=P*p-E*S;let m=h*y-R*G+A*L+C*d-O*g+N*T;return m?(m=1/m,t[0]=(u*y-a*G+l*L)*m,t[1]=(o*G-r*y-s*L)*m,t[2]=(M*N-S*O+p*C)*m,t[3]=(P*O-c*N-E*C)*m,t[4]=(a*d-i*y-l*g)*m,t[5]=(n*y-o*d+s*g)*m,t[6]=(S*A-f*N-p*R)*m,t[7]=(_*N-P*A+E*R)*m,t[8]=(i*G-u*d+l*T)*m,t[9]=(r*d-n*G-s*T)*m,t[10]=(f*O-M*A+p*h)*m,t[11]=(c*A-_*O-E*h)*m,t[12]=(u*g-i*L-a*T)*m,t[13]=(n*L-r*g+o*T)*m,t[14]=(M*R-f*C-S*h)*m,t[15]=(_*C-c*R+P*h)*m,t):null}function l(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],u=e[4],a=e[5],l=e[6],_=e[7],c=e[8],P=e[9],E=e[10],f=e[11],M=e[12],S=e[13],p=e[14],h=e[15];let R=n[0],A=n[1],C=n[2],O=n[3];return t[0]=R*r+A*u+C*c+O*M,t[1]=R*o+A*a+C*P+O*S,t[2]=R*s+A*l+C*E+O*p,t[3]=R*i+A*_+C*f+O*h,R=n[4],A=n[5],C=n[6],O=n[7],t[4]=R*r+A*u+C*c+O*M,t[5]=R*o+A*a+C*P+O*S,t[6]=R*s+A*l+C*E+O*p,t[7]=R*i+A*_+C*f+O*h,R=n[8],A=n[9],C=n[10],O=n[11],t[8]=R*r+A*u+C*c+O*M,t[9]=R*o+A*a+C*P+O*S,t[10]=R*s+A*l+C*E+O*p,t[11]=R*i+A*_+C*f+O*h,R=n[12],A=n[13],C=n[14],O=n[15],t[12]=R*r+A*u+C*c+O*M,t[13]=R*o+A*a+C*P+O*S,t[14]=R*s+A*l+C*E+O*p,t[15]=R*i+A*_+C*f+O*h,t}function _(t,e,n){const r=n[0],o=n[1],s=n[2];if(e===t)t[12]=e[0]*r+e[4]*o+e[8]*s+e[12],t[13]=e[1]*r+e[5]*o+e[9]*s+e[13],t[14]=e[2]*r+e[6]*o+e[10]*s+e[14],t[15]=e[3]*r+e[7]*o+e[11]*s+e[15];else{const n=e[0],i=e[1],u=e[2],a=e[3],l=e[4],_=e[5],c=e[6],P=e[7],E=e[8],f=e[9],M=e[10],S=e[11];t[0]=n,t[1]=i,t[2]=u,t[3]=a,t[4]=l,t[5]=_,t[6]=c,t[7]=P,t[8]=E,t[9]=f,t[10]=M,t[11]=S,t[12]=n*r+l*o+E*s+e[12],t[13]=i*r+_*o+f*s+e[13],t[14]=u*r+c*o+M*s+e[14],t[15]=a*r+P*o+S*s+e[15]}return t}function c(t,e,n){const r=n[0],o=n[1],s=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function P(t,e,n,r){let s,i,u,a,l,_,c,P,E,f,M,S,p,h,R,A,C,O,N,T,g,d,L,G,y=r[0],m=r[1],I=r[2],F=Math.sqrt(y*y+m*m+I*I);return F<(0,o.g)()?null:(F=1/F,y*=F,m*=F,I*=F,s=Math.sin(n),i=Math.cos(n),u=1-i,a=e[0],l=e[1],_=e[2],c=e[3],P=e[4],E=e[5],f=e[6],M=e[7],S=e[8],p=e[9],h=e[10],R=e[11],A=y*y*u+i,C=m*y*u+I*s,O=I*y*u-m*s,N=y*m*u-I*s,T=m*m*u+i,g=I*m*u+y*s,d=y*I*u+m*s,L=m*I*u-y*s,G=I*I*u+i,t[0]=a*A+P*C+S*O,t[1]=l*A+E*C+p*O,t[2]=_*A+f*C+h*O,t[3]=c*A+M*C+R*O,t[4]=a*N+P*T+S*g,t[5]=l*N+E*T+p*g,t[6]=_*N+f*T+h*g,t[7]=c*N+M*T+R*g,t[8]=a*d+P*L+S*G,t[9]=l*d+E*L+p*G,t[10]=_*d+f*L+h*G,t[11]=c*d+M*L+R*G,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function E(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function f(t,e,n){if(0===e)return i(t);let r,s,u,a=n[0],l=n[1],_=n[2],c=Math.sqrt(a*a+l*l+_*_);return c<(0,o.g)()?null:(c=1/c,a*=c,l*=c,_*=c,r=Math.sin(e),s=Math.cos(e),u=1-s,t[0]=a*a*u+s,t[1]=l*a*u+_*r,t[2]=_*a*u-l*r,t[3]=0,t[4]=a*l*u-_*r,t[5]=l*l*u+s,t[6]=_*l*u+a*r,t[7]=0,t[8]=a*_*u+l*r,t[9]=l*_*u-a*r,t[10]=_*_*u+s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function S(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],u=r+r,a=o+o,l=s+s,_=r*u,c=r*a,P=r*l,E=o*a,f=o*l,M=s*l,S=i*u,p=i*a,h=i*l;return t[0]=1-(E+M),t[1]=c+h,t[2]=P-p,t[3]=0,t[4]=c-h,t[5]=1-(_+M),t[6]=f+S,t[7]=0,t[8]=P+p,t[9]=f-S,t[10]=1-(_+E),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const p=(0,r.c)();function h(t,e,n,r){const o=e[0],s=e[1],i=e[2],u=e[3],a=o+o,l=s+s,_=i+i,c=o*a,P=o*l,E=o*_,f=s*l,M=s*_,S=i*_,p=u*a,h=u*l,R=u*_,A=r[0],C=r[1],O=r[2];return t[0]=(1-(f+S))*A,t[1]=(P+R)*A,t[2]=(E-h)*A,t[3]=0,t[4]=(P-R)*C,t[5]=(1-(c+S))*C,t[6]=(M+p)*C,t[7]=0,t[8]=(E+h)*O,t[9]=(M-p)*O,t[10]=(1-(c+f))*O,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function R(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function A(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function C(t,e){if(t===e)return!0;const n=t[0],r=t[1],s=t[2],i=t[3],u=t[4],a=t[5],l=t[6],_=t[7],c=t[8],P=t[9],E=t[10],f=t[11],M=t[12],S=t[13],p=t[14],h=t[15],R=e[0],A=e[1],C=e[2],O=e[3],N=e[4],T=e[5],g=e[6],d=e[7],L=e[8],G=e[9],y=e[10],m=e[11],I=e[12],F=e[13],W=e[14],w=e[15],b=(0,o.g)();return Math.abs(n-R)<=b*Math.max(1,Math.abs(n),Math.abs(R))&&Math.abs(r-A)<=b*Math.max(1,Math.abs(r),Math.abs(A))&&Math.abs(s-C)<=b*Math.max(1,Math.abs(s),Math.abs(C))&&Math.abs(i-O)<=b*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(u-N)<=b*Math.max(1,Math.abs(u),Math.abs(N))&&Math.abs(a-T)<=b*Math.max(1,Math.abs(a),Math.abs(T))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(_-d)<=b*Math.max(1,Math.abs(_),Math.abs(d))&&Math.abs(c-L)<=b*Math.max(1,Math.abs(c),Math.abs(L))&&Math.abs(P-G)<=b*Math.max(1,Math.abs(P),Math.abs(G))&&Math.abs(E-y)<=b*Math.max(1,Math.abs(E),Math.abs(y))&&Math.abs(f-m)<=b*Math.max(1,Math.abs(f),Math.abs(m))&&Math.abs(M-I)<=b*Math.max(1,Math.abs(M),Math.abs(I))&&Math.abs(S-F)<=b*Math.max(1,Math.abs(S),Math.abs(F))&&Math.abs(p-W)<=b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(h-w)<=b*Math.max(1,Math.abs(h),Math.abs(w))}function O(t){const e=(0,o.g)(),n=t[0],r=t[1],s=t[2],i=t[4],u=t[5],a=t[6],l=t[8],_=t[9],c=t[10];return Math.abs(1-(n*n+i*i+l*l))<=e&&Math.abs(1-(r*r+u*u+_*_))<=e&&Math.abs(1-(s*s+a*a+c*c))<=e}function N(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const T=l,g=R;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],u=e[5],a=e[6],l=e[7],_=e[8],c=e[9],P=e[10],E=e[11],f=e[12],M=e[13],S=e[14],p=e[15];return t[0]=u*(P*p-E*S)-c*(a*p-l*S)+M*(a*E-l*P),t[1]=-(r*(P*p-E*S)-c*(o*p-s*S)+M*(o*E-s*P)),t[2]=r*(a*p-l*S)-u*(o*p-s*S)+M*(o*l-s*a),t[3]=-(r*(a*E-l*P)-u*(o*E-s*P)+c*(o*l-s*a)),t[4]=-(i*(P*p-E*S)-_*(a*p-l*S)+f*(a*E-l*P)),t[5]=n*(P*p-E*S)-_*(o*p-s*S)+f*(o*E-s*P),t[6]=-(n*(a*p-l*S)-i*(o*p-s*S)+f*(o*l-s*a)),t[7]=n*(a*E-l*P)-i*(o*E-s*P)+_*(o*l-s*a),t[8]=i*(c*p-E*M)-_*(u*p-l*M)+f*(u*E-l*c),t[9]=-(n*(c*p-E*M)-_*(r*p-s*M)+f*(r*E-s*c)),t[10]=n*(u*p-l*M)-i*(r*p-s*M)+f*(r*l-s*u),t[11]=-(n*(u*E-l*c)-i*(r*E-s*c)+_*(r*l-s*u)),t[12]=-(i*(c*S-P*M)-_*(u*S-a*M)+f*(u*P-a*c)),t[13]=n*(c*S-P*M)-_*(r*S-o*M)+f*(r*P-o*c),t[14]=-(n*(u*S-a*M)-i*(r*S-o*M)+f*(r*a-o*u)),t[15]=n*(u*P-a*c)-i*(r*P-o*c)+_*(r*a-o*u),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],i=t[5],u=t[6],a=t[7],l=t[8],_=t[9],c=t[10],P=t[11],E=t[12],f=t[13],M=t[14],S=t[15];return(e*i-n*s)*(c*S-P*M)-(e*u-r*s)*(_*S-P*f)+(e*a-o*s)*(_*M-c*f)+(n*u-r*i)*(l*S-P*E)-(n*a-o*i)*(l*M-c*E)+(r*a-o*u)*(l*f-_*E)},equals:C,exactEquals:A,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=n+n,u=r+r,a=o+o,l=n*i,_=r*i,c=r*u,P=o*i,E=o*u,f=o*a,M=s*i,S=s*u,p=s*a;return t[0]=1-c-f,t[1]=_+p,t[2]=P-S,t[3]=0,t[4]=_-p,t[5]=1-l-f,t[6]=E+M,t[7]=0,t[8]=P+S,t[9]=E-M,t[10]=1-l-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=p,r=-e[0],o=-e[1],s=-e[2],i=e[3],u=e[4],a=e[5],l=e[6],_=e[7],c=r*r+o*o+s*s+i*i;return c>0?(n[0]=2*(u*i+_*r+a*s-l*o)/c,n[1]=2*(a*i+_*o+l*r-u*s)/c,n[2]=2*(l*i+_*s+u*o-a*r)/c):(n[0]=2*(u*i+_*r+a*s-l*o),n[1]=2*(a*i+_*o+l*r-u*s),n[2]=2*(l*i+_*s+u*o-a*r)),S(t,e,n),t},fromRotation:f,fromRotationTranslation:S,fromRotationTranslationScale:h,fromRotationTranslationScaleOrigin:function(t,e,n,r,o){const s=e[0],i=e[1],u=e[2],a=e[3],l=s+s,_=i+i,c=u+u,P=s*l,E=s*_,f=s*c,M=i*_,S=i*c,p=u*c,h=a*l,R=a*_,A=a*c,C=r[0],O=r[1],N=r[2],T=o[0],g=o[1],d=o[2],L=(1-(M+p))*C,G=(E+A)*C,y=(f-R)*C,m=(E-A)*O,I=(1-(P+p))*O,F=(S+h)*O,W=(f+R)*N,w=(S-h)*N,b=(1-(P+M))*N;return t[0]=L,t[1]=G,t[2]=y,t[3]=0,t[4]=m,t[5]=I,t[6]=F,t[7]=0,t[8]=W,t[9]=w,t[10]=b,t[11]=0,t[12]=n[0]+T-(L*T+m*g+W*d),t[13]=n[1]+g-(G*T+I*g+w*d),t[14]=n[2]+d-(y*T+F*g+b*d),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:E,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,r,o,s,i){const u=1/(n-e),a=1/(o-r),l=1/(s-i);return t[0]=2*s*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*a,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(o+r)*a,t[10]=(i+s)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s*2*l,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[4],i=e[5],u=e[6],a=e[8],l=e[9],_=e[10];return t[0]=Math.sqrt(n*n+r*r+o*o),t[1]=Math.sqrt(s*s+i*i+u*u),t[2]=Math.sqrt(a*a+l*l+_*_),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:N,identity:i,invert:a,invertOrIdentity:function(t,e){return a(t,e)||i(t),t},isOrthoNormal:O,lookAt:function(t,e,n,r){const s=e[0],u=e[1],a=e[2];let l=s-n[0],_=u-n[1],c=a-n[2];const P=(0,o.g)();if(Math.abs(l)<P&&Math.abs(_)<P&&Math.abs(c)<P)return void i(t);let E=1/Math.sqrt(l*l+_*_+c*c);l*=E,_*=E,c*=E;const f=r[0],M=r[1],S=r[2];let p=M*c-S*_,h=S*l-f*c,R=f*_-M*l;E=Math.sqrt(p*p+h*h+R*R),E?(E=1/E,p*=E,h*=E,R*=E):(p=0,h=0,R=0);let A=_*R-c*h,C=c*p-l*R,O=l*h-_*p;E=Math.sqrt(A*A+C*C+O*O),E?(E=1/E,A*=E,C*=E,O*=E):(A=0,C=0,O=0),t[0]=p,t[1]=A,t[2]=l,t[3]=0,t[4]=h,t[5]=C,t[6]=_,t[7]=0,t[8]=R,t[9]=O,t[10]=c,t[11]=0,t[12]=-(p*s+h*u+R*a),t[13]=-(A*s+C*u+O*a),t[14]=-(l*s+_*u+c*a),t[15]=1},mul:T,multiply:l,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,o,s,i){const u=1/(e-n),a=1/(r-o),l=1/(s-i);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*u,t[13]=(o+r)*a,t[14]=(i+s)*l,t[15]=1,t},perspective:function(t,e,n,r,o){const s=1/Math.tan(e/2);let i;return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=(o+r)*i,t[14]=2*o*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const o=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),i=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),a=2/(i+u),l=2/(o+s);return t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(i-u)*a*.5,t[9]=(o-s)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:P,rotateX:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[4],i=e[5],u=e[6],a=e[7],l=e[8],_=e[9],c=e[10],P=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*o+l*r,t[5]=i*o+_*r,t[6]=u*o+c*r,t[7]=a*o+P*r,t[8]=l*o-s*r,t[9]=_*o-i*r,t[10]=c*o-u*r,t[11]=P*o-a*r,t},rotateY:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[0],i=e[1],u=e[2],a=e[3],l=e[8],_=e[9],c=e[10],P=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o-l*r,t[1]=i*o-_*r,t[2]=u*o-c*r,t[3]=a*o-P*r,t[8]=s*r+l*o,t[9]=i*r+_*o,t[10]=u*r+c*o,t[11]=a*r+P*o,t},rotateZ:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[0],i=e[1],u=e[2],a=e[3],l=e[4],_=e[5],c=e[6],P=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o+l*r,t[1]=i*o+_*r,t[2]=u*o+c*r,t[3]=a*o+P*r,t[4]=l*o-s*r,t[5]=_*o-i*r,t[6]=c*o-u*r,t[7]=P*o-a*r,t},scale:c,set:s,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:g,subtract:R,targetTo:function(t,e,n,r){const o=e[0],s=e[1],i=e[2],u=r[0],a=r[1],l=r[2];let _=o-n[0],c=s-n[1],P=i-n[2],E=_*_+c*c+P*P;E>0&&(E=1/Math.sqrt(E),_*=E,c*=E,P*=E);let f=a*P-l*c,M=l*_-u*P,S=u*c-a*_;return E=f*f+M*M+S*S,E>0&&(E=1/Math.sqrt(E),f*=E,M*=E,S*=E),t[0]=f,t[1]=M,t[2]=S,t[3]=0,t[4]=c*S-P*M,t[5]=P*f-_*S,t[6]=_*M-c*f,t[7]=0,t[8]=_,t[9]=c,t[10]=P,t[11]=0,t[12]=o,t[13]=s,t[14]=i,t[15]=1,t},translate:_,transpose:u},Symbol.toStringTag,{value:"Module"}))},83305:(t,e,n)=>{n.d(e,{e:()=>c,f:()=>_,g:()=>l,h:()=>S,i:()=>u,j:()=>C,l:()=>a,p:()=>G});var r=n(99880),o=n(80442);let s,i=null;function u(){return!!i}function a(){return s||(s=n.e(6774).then(n.bind(n,66774)).then((t=>t.p)).then((({default:t})=>t({locateFile:t=>(0,r.V)(`esri/geometry/support/${t}`)}))).then((t=>{N(t)})),s)}var l,_,c,P;!function(t){function e(t,e,n){i.ensureCache.prepare();const r=d(n),o=n===r,s=i.ensureFloat64(r),u=i._pe_geog_to_proj(i.getPointer(t),e,s);return u&&L(n,e,s,o),u}function n(t,e,n){return r(t,e,n,0)}function r(t,e,n,r){i.ensureCache.prepare();const o=d(n),s=n===o,u=i.ensureFloat64(o),a=i._pe_proj_to_geog_center(i.getPointer(t),e,u,r);return a&&L(n,e,u,s),a}t.geogToProj=e,t.projGeog=function(t,r,o,s){switch(s){case _.PE_TRANSFORM_P_TO_G:return n(t,r,o);case _.PE_TRANSFORM_G_TO_P:return e(t,r,o)}return 0},t.projToGeog=n,t.projToGeogCenter=r}(l||(l={})),(P=_||(_={})).init=function(){P.PE_BUFFER_MAX=i.PeDefs.prototype.PE_BUFFER_MAX,P.PE_NAME_MAX=i.PeDefs.prototype.PE_NAME_MAX,P.PE_MGRS_MAX=i.PeDefs.prototype.PE_MGRS_MAX,P.PE_USNG_MAX=i.PeDefs.prototype.PE_USNG_MAX,P.PE_DD_MAX=i.PeDefs.prototype.PE_DD_MAX,P.PE_DDM_MAX=i.PeDefs.prototype.PE_DDM_MAX,P.PE_DMS_MAX=i.PeDefs.prototype.PE_DMS_MAX,P.PE_UTM_MAX=i.PeDefs.prototype.PE_UTM_MAX,P.PE_PARM_MAX=i.PeDefs.prototype.PE_PARM_MAX,P.PE_TYPE_NONE=i.PeDefs.prototype.PE_TYPE_NONE,P.PE_TYPE_GEOGCS=i.PeDefs.prototype.PE_TYPE_GEOGCS,P.PE_TYPE_PROJCS=i.PeDefs.prototype.PE_TYPE_PROJCS,P.PE_TYPE_GEOGTRAN=i.PeDefs.prototype.PE_TYPE_GEOGTRAN,P.PE_TYPE_COORDSYS=i.PeDefs.prototype.PE_TYPE_COORDSYS,P.PE_TYPE_UNIT=i.PeDefs.prototype.PE_TYPE_UNIT,P.PE_TYPE_LINUNIT=i.PeDefs.prototype.PE_TYPE_LINUNIT,P.PE_STR_OPTS_NONE=i.PeDefs.prototype.PE_STR_OPTS_NONE,P.PE_STR_AUTH_NONE=i.PeDefs.prototype.PE_STR_AUTH_NONE,P.PE_STR_AUTH_TOP=i.PeDefs.prototype.PE_STR_AUTH_TOP,P.PE_STR_NAME_CANON=i.PeDefs.prototype.PE_STR_NAME_CANON,P.PE_PARM_X0=i.PeDefs.prototype.PE_PARM_X0,P.PE_PARM_ND=i.PeDefs.prototype.PE_PARM_ND,P.PE_TRANSFORM_1_TO_2=i.PeDefs.prototype.PE_TRANSFORM_1_TO_2,P.PE_TRANSFORM_2_TO_1=i.PeDefs.prototype.PE_TRANSFORM_2_TO_1,P.PE_TRANSFORM_P_TO_G=i.PeDefs.prototype.PE_TRANSFORM_P_TO_G,P.PE_TRANSFORM_G_TO_P=i.PeDefs.prototype.PE_TRANSFORM_G_TO_P,P.PE_HORIZON_RECT=i.PeDefs.prototype.PE_HORIZON_RECT,P.PE_HORIZON_POLY=i.PeDefs.prototype.PE_HORIZON_POLY,P.PE_HORIZON_LINE=i.PeDefs.prototype.PE_HORIZON_LINE,P.PE_HORIZON_DELTA=i.PeDefs.prototype.PE_HORIZON_DELTA},function(t){const e={},n={},r=t=>{if(t){const e=t.getType();switch(e){case _.PE_TYPE_GEOGCS:t=i.castObject(t,i.PeGeogcs);break;case _.PE_TYPE_PROJCS:t=i.castObject(t,i.PeProjcs);break;case _.PE_TYPE_GEOGTRAN:t=i.castObject(t,i.PeGeogtran);break;default:e&_.PE_TYPE_UNIT&&(t=i.castObject(t,i.PeUnit))}}return t};function o(t,n){let o=null,s=e[t];if(s||(s={},e[t]=s),s.hasOwnProperty(String(n)))o=s[n];else{const e=i.PeFactory.prototype.factoryByType(t,n);i.compare(e,i.NULL)||(o=e,s[n]=o)}return o=r(o),o}t.initialize=function(){i.PeFactory.prototype.initialize(null)},t.coordsys=function(t){return o(_.PE_TYPE_COORDSYS,t)},t.factoryByType=o,t.fromString=function(t,e){let o=null,s=n[t];if(s||(s={},n[t]=s),s.hasOwnProperty(e))o=s[e];else{const n=i.PeFactory.prototype.fromString(t,e);i.compare(n,i.NULL)||(o=n,s[e]=o)}return o=r(o),o},t.geogcs=function(t){return o(_.PE_TYPE_GEOGCS,t)},t.geogtran=function(t){return o(_.PE_TYPE_GEOGTRAN,t)},t.getCode=function(t){return i.PeFactory.prototype.getCode(t)},t.projcs=function(t){return o(_.PE_TYPE_PROJCS,t)},t.unit=function(t){return o(_.PE_TYPE_UNIT,t)}}(c||(c={}));let E=null;var f,M,S,p,h,R,A,C,O;function N(t){function e(t,e,n){t[e]=n(t[e])}i=t,_.init(),f.init(),h.init(),A.init(),C.init(),E=class extends i.PeGCSExtent{destroy(){i.destroy(this)}};const n=[i.PeDatum,i.PeGeogcs,i.PeGeogtran,i.PeObject,i.PeParameter,i.PePrimem,i.PeProjcs,i.PeSpheroid,i.PeUnit];for(const t of n)e(t.prototype,"getName",(t=>function(){return t.call(this,new Array(_.PE_NAME_MAX))}));for(const t of[i.PeGeogtran,i.PeProjcs])e(t.prototype,"getParameters",(t=>function(){const e=new Array(_.PE_PARM_MAX);let n=t.call(this);for(let t=0;t<e.length;t++){const r=i.getValue(n,"*");e[t]=r?i.wrapPointer(r,i.PeParameter):null,n+=Int32Array.BYTES_PER_ELEMENT}return e}));e(i.PeHorizon.prototype,"getCoord",(t=>function(){const e=this.getSize();if(!e)return null;const n=[];return L(n,e,t.call(this)),n})),e(i.PeGTlistExtendedEntry.prototype,"getEntries",(t=>{const e=i._pe_getPeGTlistExtendedGTsSize();return function(){let n=null;const r=t.call(this);if(!i.compare(r,i.NULL)){n=[r];const t=this.getSteps();if(t>1){const o=i.getPointer(r);for(let r=1;r<t;r++)n.push(i.wrapPointer(o+e*r,i.PeGTlistExtendedGTs))}}return n}}));const r=i._pe_getPeHorizonSize(),o=t=>function(){let e=this._cache;if(e||(e=new Map,this._cache=e),e.has(t))return e.get(t);let n=null;const o=t.call(this);if(!i.compare(o,i.NULL)){n=[o];const t=o.getNump();if(t>1){const e=i.getPointer(o);for(let o=1;o<t;o++)n.push(i.wrapPointer(e+r*o,i.PeHorizon))}}return e.set(t,n),n};e(i.PeProjcs.prototype,"horizonGcsGenerate",o),e(i.PeProjcs.prototype,"horizonPcsGenerate",o),i.PeObject.prototype.toString=function(t=_.PE_STR_OPTS_NONE){i.ensureCache.prepare();const e=i.getPointer(this),n=i.ensureInt8(new Array(_.PE_BUFFER_MAX));return i.UTF8ToString(i._pe_object_to_string_ext(e,t,n))}}function T(t){if(!t)return;const e=i.getClass(t);if(!e)return;const n=i.getCache(e);if(!n)return;const r=i.getPointer(t);r&&delete n[r]}function g(t,e){const n=[],r=new Array(e);for(let e=0;e<t;e++)n.push(i.ensureInt8(r));return n}function d(t){let e;return Array.isArray(t[0])?(e=[],t.forEach((t=>{e.push(t[0],t[1])}))):e=t,e}function L(t,e,n,r=!1){if(r)for(let r=0;r<2*e;r++)t[r]=i.getValue(n+r*Float64Array.BYTES_PER_ELEMENT,"double");else{const r=0===t.length;for(let o=0;o<e;o++)r&&(t[o]=new Array(2)),t[o][0]=i.getValue(n,"double"),t[o][1]=i.getValue(n+Float64Array.BYTES_PER_ELEMENT,"double"),n+=2*Float64Array.BYTES_PER_ELEMENT}}!function(t){let e;t.init=function(){t.PE_GTLIST_OPTS_COMMON=i.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,e=i._pe_getPeGTlistExtendedEntrySize()},t.getGTlist=function(t,n,r,o,s,u){let a=null;const l=new i.PeInteger(u);try{const _=i.PeGTlistExtended.prototype.getGTlist(t,n,r,o,s,l);if((u=l.val)&&(a=[_],u>1)){const t=i.getPointer(_);for(let n=1;n<u;n++)a.push(i.wrapPointer(t+e*n,i.PeGTlistExtendedEntry))}}finally{i.destroy(l)}return a}}(f||(f={})),function(t){t.destroy=function(t){if(t&&t.length){for(const e of t)T(e),e.getEntries().forEach((t=>{T(t);const e=t.getGeogtran();T(e),e.getParameters().forEach(T),[e.getGeogcs1(),e.getGeogcs2()].forEach((t=>{T(t);const e=t.getDatum();T(e),T(e.getSpheroid()),T(t.getPrimem()),T(t.getUnit())}))}));i.PeGTlistExtendedEntry.prototype.Delete(t[0])}}}(M||(M={})),function(t){t.geogToGeog=function(t,e,n,r,o){i.ensureCache.prepare();const s=d(n),u=n===s,a=i.ensureFloat64(s);let l=0;r&&(l=i.ensureFloat64(r));const _=i._pe_geog_to_geog(i.getPointer(t),e,a,l,o);return _&&L(n,e,a,u),_}}(S||(S={})),function(t){const e=(t,e,n,r,o,s)=>{let u,a;switch(i.ensureCache.prepare(),t){case"dd":u=i._pe_geog_to_dd,a=_.PE_DD_MAX;break;case"ddm":u=i._pe_geog_to_ddm,a=_.PE_DDM_MAX;break;case"dms":u=i._pe_geog_to_dms,a=_.PE_DMS_MAX}let l=0;e&&(l=i.getPointer(e));const c=d(r),P=i.ensureFloat64(c),E=g(n,a),f=u(l,n,P,o,i.ensureInt32(E));if(f)for(let t=0;t<n;t++)s[t]=i.UTF8ToString(E[t]);return f},n=(t,e,n,r,o)=>{let s;switch(i.ensureCache.prepare(),t){case"dd":s=i._pe_dd_to_geog;break;case"ddm":s=i._pe_ddm_to_geog;break;case"dms":s=i._pe_dms_to_geog}let u=0;e&&(u=i.getPointer(e));const a=r.map((t=>i.ensureString(t))),l=i.ensureInt32(a),_=i.ensureFloat64(new Array(2*n)),c=s(u,n,l,_);return c&&L(o,n,_),c};t.geogToDms=function(t,n,r,o,s){return e("dms",t,n,r,o,s)},t.dmsToGeog=function(t,e,r,o){return n("dms",t,e,r,o)},t.geogToDdm=function(t,n,r,o,s){return e("ddm",t,n,r,o,s)},t.ddmToGeog=function(t,e,r,o){return n("ddm",t,e,r,o)},t.geogToDd=function(t,n,r,o,s){return e("dd",t,n,r,o,s)},t.ddToGeog=function(t,e,r,o){return n("dd",t,e,r,o)}}(p||(p={})),function(t){t.init=function(){t.PE_MGRS_STYLE_NEW=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,t.PE_MGRS_STYLE_OLD=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,t.PE_MGRS_STYLE_AUTO=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,t.PE_MGRS_180_ZONE_1_PLUS=i.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,t.PE_MGRS_ADD_SPACES=i.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES},t.geogToMgrsExtended=function(t,e,n,r,o,s,u){i.ensureCache.prepare();let a=0;t&&(a=i.getPointer(t));const l=d(n),c=i.ensureFloat64(l),P=g(e,_.PE_MGRS_MAX),E=i.ensureInt32(P),f=i._pe_geog_to_mgrs_extended(a,e,c,r,o,s,E);if(f)for(let t=0;t<e;t++)u[t]=i.UTF8ToString(P[t]);return f},t.mgrsToGeogExtended=function(t,e,n,r,o){i.ensureCache.prepare();let s=0;t&&(s=i.getPointer(t));const u=n.map((t=>i.ensureString(t))),a=i.ensureInt32(u),l=i.ensureFloat64(new Array(2*e)),_=i._pe_mgrs_to_geog_extended(s,e,a,r,l);return _&&L(o,e,l),_}}(h||(h={})),function(t){t.geogToUsng=function(t,e,n,r,o,s,u){i.ensureCache.prepare();let a=0;t&&(a=i.getPointer(t));const l=d(n),c=i.ensureFloat64(l),P=g(e,_.PE_MGRS_MAX),E=i.ensureInt32(P),f=i._pe_geog_to_usng(a,e,c,r,o,s,E);if(f)for(let t=0;t<e;t++)u[t]=i.UTF8ToString(P[t]);return f},t.usngToGeog=function(t,e,n,r){i.ensureCache.prepare();let o=0;t&&(o=i.getPointer(t));const s=n.map((t=>i.ensureString(t))),u=i.ensureInt32(s),a=i.ensureFloat64(new Array(2*e)),l=i._pe_usng_to_geog(o,e,u,a);return l&&L(r,e,a),l}}(R||(R={})),function(t){t.init=function(){t.PE_UTM_OPTS_NONE=i.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,t.PE_UTM_OPTS_ADD_SPACES=i.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,t.PE_UTM_OPTS_NS=i.PeNotationUtm.prototype.PE_UTM_OPTS_NS},t.geogToUtm=function(t,e,n,r,o){i.ensureCache.prepare();let s=0;t&&(s=i.getPointer(t));const u=d(n),a=i.ensureFloat64(u),l=g(e,_.PE_UTM_MAX),c=i.ensureInt32(l),P=i._pe_geog_to_utm(s,e,a,r,c);if(P)for(let t=0;t<e;t++)o[t]=i.UTF8ToString(l[t]);return P},t.utmToGeog=function(t,e,n,r,o){i.ensureCache.prepare();let s=0;t&&(s=i.getPointer(t));const u=n.map((t=>i.ensureString(t))),a=i.ensureInt32(u),l=i.ensureFloat64(new Array(2*e)),_=i._pe_utm_to_geog(s,e,a,r,l);return _&&L(o,e,l),_}}(A||(A={})),function(t){const e=new Map;t.init=function(){t.PE_PCSINFO_OPTION_NONE=i.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,t.PE_PCSINFO_OPTION_DOMAIN=i.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,t.PE_POLE_OUTSIDE_BOUNDARY=i.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,t.PE_POLE_POINT=i.PePCSInfo.prototype.PE_POLE_POINT},t.generate=function(n,r=t.PE_PCSINFO_OPTION_DOMAIN){let o=null,s=null;return e.has(n)&&(s=e.get(n),s[r]&&(o=s[r])),o||(o=i.PePCSInfo.prototype.generate(n,r),s||(s=[],e.set(n,s)),s[r]=o),o}}(C||(C={})),function(t){t.versionString=function(){return i.PeVersion.prototype.version_string()}}(O||(O={}));const G=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return l},get PeDefs(){return _},get PeFactory(){return c},get PeGCSExtent(){return E},get PeGTTransformations(){return S},get PeGTlistExtended(){return f},get PeGTlistExtendedEntry(){return M},get PeNotationDms(){return p},get PeNotationMgrs(){return h},get PeNotationUsng(){return R},get PeNotationUtm(){return A},get PePCSInfo(){return C},get PeVersion(){return O},_init:N,get _pe(){return i},isLoaded:u,isSupported:function(){return!!(0,o.Z)("esri-wasm")},load:a},Symbol.toStringTag,{value:"Module"}))},44547:(t,e,n)=>{n.d(e,{Up:()=>k,Bm:()=>K,iQ:()=>v,kR:()=>I,zD:()=>F,iV:()=>W,CM:()=>Z,oj:()=>w,dz:()=>b,JY:()=>D,KC:()=>B,Wt:()=>x});var r=n(20102),o=n(22021),s=n(95330),i=n(67900),u=n(58971),a=n(10661),l=n(52138),_=(n(17896),n(65617)),c=n(2109),P=n(6570),E=n(65091),f=n(83305),M=n(94139),S=n(38913),p=n(58901),h=(n(24470),n(68441));Math.PI;const R=h.sv.radius,A=h.sv.eccentricitySquared,C={a1:R*A,a2:R*A*R*A,a3:R*A*A/2,a4:R*A*R*A*2.5,a5:R*A+R*A*A/2,a6:1-A};h.sv.radius,h.sv.flattening,h.Z1.radius,h.Z1.flattening,h.yr.radius,h.yr.flattening,h.yr.radius;var O=n(18571),N=n(8744),T=n(56726),g=n(69285);let d=null,L=null,G=null,y={};const m=new a.s;function I(){return!!d&&(0,f.i)()}function F(t){return null==G&&(G=Promise.all([(0,f.l)(),Promise.all([n.e(5837),n.e(5732)]).then(n.bind(n,45837)).then((t=>t.g)),n.e(819).then(n.bind(n,80819))])),G.then((([,e,{hydratedAdapter:n}])=>{(0,s.k_)(t),L=n,d=e.default,d._enableProjection(f.p),m.notify()}))}function W(t,e,n=null,r=null){return Array.isArray(t)?0===t.length?[]:w(L,t,t[0].spatialReference,e,n,r):w(L,[t],t.spatialReference,e,n,r)[0]}function w(t,e,n,r,o=null,s=null){if(null==n||null==r)return e;if(k(n,r,o))return e.map((t=>function(t,e,n){return t?"x"in t?function(t,e,n,r,o){gt[0]=t.x,gt[1]=t.y;const s=t.z;return gt[2]=void 0!==s?s:o,Z(gt,e,0,gt,r,0,1)?(n.x=gt[0],n.y=gt[1],n.spatialReference=r,void 0===s?(n.z=void 0,n.hasZ=!1):(n.z=gt[2],n.hasZ=!0),void 0===t.m?(n.m=void 0,n.hasM=!1):(n.m=t.m,n.hasM=!0),n):null}(t,e,new M.Z,n,0):"xmin"in t?function(t,e,n,r,o){const{xmin:s,ymin:i,xmax:u,ymax:a,hasZ:l,hasM:_}=t;return j(s,i,l?t.zmin:o,e,gt,r)?(n.xmin=gt[0],n.ymin=gt[1],l&&(n.zmin=gt[2]),j(u,a,l?t.zmax:o,e,gt,r)?(n.xmax=gt[0],n.ymax=gt[1],l&&(n.zmax=gt[2]),_&&(n.mmin=t.mmin,n.mmax=t.mmax),n.spatialReference=r,n):null):null}(t,e,new P.Z,n,0):"rings"in t?Y(t,e,new S.Z,n,0):"paths"in t?function(t,e,n,r,o){const{paths:s,hasZ:i,hasM:u}=t,a=[];return z(s,i??!1,u??!1,e,a,r,o)?(n.paths=a,n.spatialReference=r,n.hasZ=i,n.hasM=u,n):null}(t,e,new p.Z,n,0):"points"in t?function(t,e,n,r,o){const{points:s,hasZ:i,hasM:u}=t,a=[],l=s.length,_=[];for(const t of s)_.push(t[0],t[1],i?t[2]:o);if(!Z(_,e,0,_,r,0,l))return null;for(let t=0;t<l;++t){const e=3*t,n=_[e],r=_[e+1];i&&u?a.push([n,r,_[e+2],s[t][3]]):i?a.push([n,r,_[e+2]]):u?a.push([n,r,s[t][2]]):a.push([n,r])}return n.points=a,n.spatialReference=r,n.hasZ=i,n.hasM=u,n}(t,e,new E.Z,n,0):null:null}(t,n,r)));if(null==o){const t=O.Z.cacheKey(n,r);void 0!==y[t]?o=y[t]:(null==(o=function(t,e,n=null){if(null==t||null==e)return null;if(null==d||null==L)throw new U;const r=d._getTransformation(L,t,e,n,n?.spatialReference);return null!==r?O.Z.fromGE(r):null}(n,r,void 0))&&(o=new O.Z),y[t]=o)}if(null==d||null==t)throw new U;return null!=s?d._project(t,e,n,r,o,s):d._project(t,e,n,r,o)}function b(t,e){const n=D([t],e);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function D(t,e){if(!I())for(const n of t)if(null!=n&&!(0,N.fS)(n.spatialReference,e)&&(0,N.JY)(n.spatialReference)&&(0,N.JY)(e)&&!k(n.spatialReference,e))return(0,u.it)(m),{pending:F(),geometries:null};return{pending:null,geometries:t.map((t=>null==t?null:(0,N.fS)(t.spatialReference,e)?t:(0,N.JY)(t.spatialReference)&&(0,N.JY)(e)?function(t,e){try{const n=W(t,e);if(null==n)return null;"xmin"in t&&"xmin"in n&&(n.zmin=t.zmin,n.zmax=t.zmax);const r=(0,g.k)(n.type,t.spatialReference,e);return null!=r&&r(n),n}catch(t){if(!(t instanceof U))throw t;return null}}(t,e):null))}}class U extends r.Z{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}var H;function k(t,e,n){return!n&&(!!(0,N.fS)(t,e)||(0,N.JY)(t)&&(0,N.JY)(e)&&!!Mt(t,e,Rt))}async function v(t,e,n,r){if(I())return(0,s.Yn)(r);if(Array.isArray(t)){for(const{source:e,dest:n,geographicTransformation:o}of t)if(!k(e,n,o))return F(r)}else if(!k(t,e,n))return F(r);return(0,s.Yn)(r)}function x(t,e,n=e.spatialReference,r=0){return null!=t.spatialReference&&null!=n&&null!=Y(t,t.spatialReference,e,n,r)}function Y(t,e,n,r,o){const{rings:s,hasZ:i,hasM:u}=t,a=[];return z(s,i??!1,u??!1,e,a,r,o)?(n.rings=a,n.spatialReference=r,n.hasZ=i,n.hasM=u,n):null}function B(t,e,n,r=0){gt[0]=t.x,gt[1]=t.y;const o=t.z;return gt[2]=void 0!==o?o:r,Z(gt,t.spatialReference,0,e,n,0,1)}function j(t,e,n,r,o,s){return Ot[0]=t,Ot[1]=e,Ot[2]=n,Z(Ot,r,0,o,s,0,1)}function Z(t,e,n,r,o,s,i=1){const u=Mt(e,o,Rt);if(null==u)return!1;if(u===V){if(t===r&&n===s)return!0;const e=n+3*i;for(let o=n,i=s;o<e;o++,i++)r[i]=t[o];return!0}const a=n+3*i;for(let e=n,o=s;e<a;e+=3,o+=3)u(t,e,r,o);return!0}function z(t,e,n,r,o,s,i=0){const u=new Array;for(const n of t)for(const t of n)u.push(t[0],t[1],e?t[2]:i);if(!Z(u,r,0,u,s,0,u.length/3))return!1;let a=0;o.length=0;for(const r of t){const t=new Array;for(const o of r)e&&n?t.push([u[a++],u[a++],u[a++],o[3]]):e?t.push([u[a++],u[a++],u[a++]]):n?(t.push([u[a++],u[a++],o[2]]),a++):(t.push([u[a++],u[a++]]),a++);o.push(t)}return!0}function K(t,e,n,r){if(null==t||null==r)return!1;const o=J(t,pt),s=J(r,ht);if(o===s&&!X(s)&&(o!==H.UNKNOWN||(0,N.fS)(t,r)))return(0,l.f)(n,e),!0;if(X(s)){const t=ft[o][H.LON_LAT],r=ft[H.LON_LAT][s];return null!=t&&null!=r&&(t(e,0,Nt,0),r(Nt,0,Tt,0),q(At*Nt[0],At*Nt[1],n),n[12]=Tt[0],n[13]=Tt[1],n[14]=Tt[2],!0)}if((s===H.WEB_MERCATOR||s===H.PLATE_CARREE)&&(o===H.WGS84||o===H.CGCS2000&&s===H.PLATE_CARREE||o===H.SPHERICAL_ECEF||o===H.WEB_MERCATOR)){const t=ft[o][H.LON_LAT],r=ft[H.LON_LAT][s];return null!=t&&null!=r&&(t(e,0,Nt,0),r(Nt,0,Tt,0),o===H.SPHERICAL_ECEF?function(t,e,n){q(t,e,n),(0,l.t)(n,n)}(At*Nt[0],At*Nt[1],n):(0,l.i)(n),n[12]=Tt[0],n[13]=Tt[1],n[14]=Tt[2],!0)}return!1}function X(t){return t===H.SPHERICAL_ECEF||t===H.SPHERICAL_MARS_PCPF||t===H.SPHERICAL_MOON_PCPF}function q(t,e,n){const r=Math.sin(t),o=Math.cos(t),s=Math.sin(e),i=Math.cos(e),u=n;return u[0]=-r,u[4]=-s*o,u[8]=i*o,u[12]=0,u[1]=o,u[5]=-s*r,u[9]=i*r,u[13]=0,u[2]=0,u[6]=i,u[10]=s,u[14]=0,u[3]=0,u[7]=0,u[11]=0,u[15]=1,u}function J(t,e){return t?e.spatialReference===t?e.spatialReferenceId:(e.spatialReference=t,"metersPerUnit"in e&&(e.metersPerUnit=(0,i.c9)(t,1)),t.wkt===c.kU.wkt?e.spatialReferenceId=H.SPHERICAL_ECEF:(0,N.oR)(t)?e.spatialReferenceId=H.WGS84:(0,N.sS)(t)?e.spatialReferenceId=H.WEB_MERCATOR:(0,N.QM)(t)?e.spatialReferenceId=H.PLATE_CARREE:t.wkt===c.pn.wkt?e.spatialReferenceId=H.WGS84_ECEF:t.wkid===T.W.CGCS2000?e.spatialReferenceId=H.CGCS2000:t.wkt===c.JL.wkt?e.spatialReferenceId=H.SPHERICAL_MARS_PCPF:t.wkt===c.mM.wkt?e.spatialReferenceId=H.SPHERICAL_MOON_PCPF:(0,N.BZ)(t)?e.spatialReferenceId=H.GCSMARS2000:(0,N.V2)(t)?e.spatialReferenceId=H.GCSMOON2000:e.spatialReferenceId=H.UNKNOWN):H.UNKNOWN}function V(t,e,n,r){t!==n&&(n[r++]=t[e++],n[r++]=t[e++],n[r]=t[e])}function Q(t,e,n,r){n[r++]=Ct*(t[e++]/h.sv.radius),n[r++]=Ct*(Math.PI/2-2*Math.atan(Math.exp(-t[e++]/h.sv.radius))),n[r]=t[e]}function $(t,e,n,r){!function(t,e,n,r,s){const i=.4999999*Math.PI,u=(0,o.uZ)(At*t[e+1],-i,i),a=Math.sin(u);n[r++]=At*t[e]*s.radius,n[r++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[r]=t[e+2]}(t,e,n,r,h.sv)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",t[t.WGS84=2]="WGS84",t[t.WEB_MERCATOR=3]="WEB_MERCATOR",t[t.WGS84_ECEF=4]="WGS84_ECEF",t[t.CGCS2000=5]="CGCS2000",t[t.WGS84_COMPARABLE_LON_LAT=6]="WGS84_COMPARABLE_LON_LAT",t[t.SPHERICAL_MARS_PCPF=7]="SPHERICAL_MARS_PCPF",t[t.GCSMARS2000=8]="GCSMARS2000",t[t.SPHERICAL_MOON_PCPF=9]="SPHERICAL_MOON_PCPF",t[t.GCSMOON2000=10]="GCSMOON2000",t[t.LON_LAT=11]="LON_LAT",t[t.PLATE_CARREE=12]="PLATE_CARREE"}(H||(H={}));const tt=h.sv.radius*Math.PI/180,et=180/(h.sv.radius*Math.PI);function nt(t,e,n,r){n[r]=t[e]*tt,n[r+1]=t[e+1]*tt,n[r+2]=t[e+2]}function rt(t,e,n,r){n[r]=t[e]*et,n[r+1]=t[e+1]*et,n[r+2]=t[e+2]}function ot(t,e,n,r,o){const s=o+t[e+2],i=At*t[e+1],u=At*t[e],a=Math.cos(i);n[r++]=Math.cos(u)*a*s,n[r++]=Math.sin(u)*a*s,n[r]=Math.sin(i)*s}function st(t,e,n,r){ot(t,e,n,r,h.Z1.radius)}function it(t,e,n,r){ot(t,e,n,r,h.yr.radius)}function ut(t,e,n,r){ot(t,e,n,r,h.sv.radius)}function at(t,e,n,r,s){const i=t[e],u=t[e+1],a=t[e+2],l=Math.sqrt(i*i+u*u+a*a),_=(0,o.Kt)(a/(0===l?1:l)),c=Math.atan2(u,i);n[r++]=Ct*c,n[r++]=Ct*_,n[r]=l-s}function lt(t,e,n,r){at(t,e,n,r,h.Z1.radius)}function _t(t,e,n,r){at(t,e,n,r,h.yr.radius)}function ct(t,e,n,r){at(t,e,n,r,h.sv.radius)}function Pt(t,e,n,r){!function(t,e,n,r,o){const s=At*t[e],i=At*t[e+1],u=t[e+2],a=Math.sin(i),l=Math.cos(i),_=o.radius/Math.sqrt(1-o.eccentricitySquared*a*a);n[r++]=(_+u)*l*Math.cos(s),n[r++]=(_+u)*l*Math.sin(s),n[r++]=(_*(1-o.eccentricitySquared)+u)*a}(t,e,n,r,h.sv)}function Et(t,e,n,r){const o=C,s=t[e],i=t[e+1],u=t[e+2];let a,l,_,c,P,E,f,M,S,p,R,A,O,N,T,g,d,L,G,y,m;a=Math.abs(u),l=s*s+i*i,_=Math.sqrt(l),c=l+u*u,P=Math.sqrt(c),y=Math.atan2(i,s),E=u*u/c,f=l/c,N=o.a2/P,T=o.a3-o.a4/P,f>.3?(M=a/P*(1+f*(o.a1+N+E*T)/P),G=Math.asin(M),p=M*M,S=Math.sqrt(1-p)):(S=_/P*(1-E*(o.a5-N-f*T)/P),G=Math.acos(S),p=1-S*S,M=Math.sqrt(p)),R=1-h.sv.eccentricitySquared*p,A=h.sv.radius/Math.sqrt(R),O=o.a6*A,N=_-A*S,T=a-O*M,d=S*N+M*T,g=S*T-M*N,L=g/(O/R+d),G+=L,m=d+g*L/2,u<0&&(G=-G),n[r++]=Ct*y,n[r++]=Ct*G,n[r]=m}const ft={[H.WGS84]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:$,[H.PLATE_CARREE]:nt,[H.WGS84]:V,[H.WGS84_ECEF]:Pt},[H.CGCS2000]:{[H.CGCS2000]:V,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:nt,[H.WGS84]:null,[H.WGS84_ECEF]:Pt},[H.GCSMARS2000]:{[H.CGCS2000]:null,[H.GCSMARS2000]:V,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:it,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.GCSMOON2000]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:V,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:st,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.WEB_MERCATOR]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:Q,[H.WGS84_COMPARABLE_LON_LAT]:Q,[H.SPHERICAL_ECEF]:function(t,e,n,r){Q(t,e,n,r),ut(n,r,n,r)},[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:V,[H.PLATE_CARREE]:function(t,e,n,r){Q(t,e,n,r),nt(n,r,n,r)},[H.WGS84]:Q,[H.WGS84_ECEF]:function(t,e,n,r){Q(t,e,n,r),Pt(n,r,n,r)}},[H.WGS84_ECEF]:{[H.CGCS2000]:Et,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:Et,[H.WGS84_COMPARABLE_LON_LAT]:Et,[H.SPHERICAL_ECEF]:function(t,e,n,r){Et(t,e,n,r),ut(n,r,n,r)},[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:function(t,e,n,r){Et(t,e,n,r),$(n,r,n,r)},[H.PLATE_CARREE]:function(t,e,n,r){Et(t,e,n,r),nt(n,r,n,r)},[H.WGS84]:Et,[H.WGS84_ECEF]:V},[H.SPHERICAL_ECEF]:{[H.CGCS2000]:ct,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:ct,[H.WGS84_COMPARABLE_LON_LAT]:ct,[H.SPHERICAL_ECEF]:V,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:function(t,e,n,r){ct(t,e,n,r),$(n,r,n,r)},[H.PLATE_CARREE]:function(t,e,n,r){ct(t,e,n,r),nt(n,r,n,r)},[H.WGS84]:ct,[H.WGS84_ECEF]:function(t,e,n,r){ct(t,e,n,r),Pt(n,r,n,r)}},[H.SPHERICAL_MARS_PCPF]:{[H.CGCS2000]:null,[H.GCSMARS2000]:_t,[H.GCSMOON2000]:null,[H.LON_LAT]:_t,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:V,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.SPHERICAL_MOON_PCPF]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:lt,[H.LON_LAT]:lt,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:V,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.UNKNOWN]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:null,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:V,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.LON_LAT]:{[H.CGCS2000]:V,[H.GCSMARS2000]:V,[H.GCSMOON2000]:V,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:it,[H.SPHERICAL_MOON_PCPF]:st,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:$,[H.PLATE_CARREE]:nt,[H.WGS84]:V,[H.WGS84_ECEF]:Pt},[H.WGS84_COMPARABLE_LON_LAT]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:nt,[H.WGS84]:V,[H.WGS84_ECEF]:Pt},[H.PLATE_CARREE]:{[H.CGCS2000]:rt,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:rt,[H.WGS84_COMPARABLE_LON_LAT]:rt,[H.SPHERICAL_ECEF]:function(t,e,n,r){rt(t,e,n,r),ut(n,r,n,r)},[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:function(t,e,n,r){rt(t,e,n,r),$(n,r,n,r)},[H.PLATE_CARREE]:V,[H.WGS84]:rt,[H.WGS84_ECEF]:function(t,e,n,r){rt(t,e,n,r),Pt(n,r,n,r)}}};function Mt(t,e,n=St()){return null==t||null==e?null:function(t,e,n){if(null==t||null==e||n.source.spatialReference===t&&n.dest.spatialReference===e)return n;const r=J(t,n.source),o=J(e,n.dest);return r===H.UNKNOWN&&o===H.UNKNOWN?(0,N.fS)(t,e)?n.projector=V:n.projector=null:n.projector=ft[r][o],n}(t,e,n).projector}function St(){return{source:{spatialReference:null,spatialReferenceId:H.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:H.UNKNOWN,metersPerUnit:1},projector:V}}const pt={spatialReference:null,spatialReferenceId:H.UNKNOWN},ht={spatialReference:null,spatialReferenceId:H.UNKNOWN},Rt=St(),At=(St(),(0,o.Vl)(1)),Ct=(0,o.BV)(1),Ot=(0,_.c)(),Nt=(0,_.c)(),Tt=(0,_.c)(),gt=(0,_.c)();(0,_.c)()},18571:(t,e,n)=>{n.d(e,{Z:()=>s});let r=0;class o{static fromGE(t){const e=new o;return e._wkt=t.wkt,e._wkid=t.wkid,e._isInverse=t.isInverse,e}constructor(t){this.uid=r++,t?(this._wkt=null!=t.wkt?t.wkt:null,this._wkid=null!=t.wkid?t.wkid:-1,this._isInverse=null!=t.isInverse&&!0===t.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(t){this._wkt=t,this.uid=r++}get wkid(){return this._wkid}set wkid(t){this._wkid=t,this.uid=r++}get isInverse(){return this._isInverse}set isInverse(t){this._isInverse=t,this.uid=r++}getInverse(){const t=new o;return t._wkt=this.wkt,t._wkid=this._wkid,t._isInverse=!this.isInverse,t}}class s{static cacheKey(t,e){return[void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():"",void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():""].join(",")}static fromGE(t){const e=new s;let n="";for(const r of t.steps){const t=o.fromGE(r);e.steps.push(t),n+=t.uid.toString()+","}return e._cachedProjection={},e._gtlistentry=null,e._chain=n,e}constructor(t){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,t&&t.steps)for(const e of t.steps)e instanceof o?this.steps.push(e):this.steps.push(new o({wkid:e.wkid,wkt:e.wkt,isInverse:e.isInverse}))}getInverse(){const t=new s;t.steps=[];for(let e=this.steps.length-1;e>=0;e--){const n=this.steps[e];t.steps.push(n.getInverse())}return t}getGTListEntry(){let t="";for(const e of this.steps)t+=e.uid.toString()+",";return t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t),this._gtlistentry}assignCachedGe(t,e,n){this._cachedProjection[s.cacheKey(t,e)]=n}getCachedGeTransformation(t,e){let n="";for(const t of this.steps)n+=t.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[s.cacheKey(t,e)];return void 0===r?null:r}}},69285:(t,e,n)=>{n.d(e,{k:()=>s});var r=n(67900),o=n(8744);function s(t,e,n){if(null==e||null==n||n.vcsWkid||(0,o.fS)(e,n))return null;const s=(0,r._R)(e)/(0,r._R)(n);if(1===s)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){t&&null!=t.z&&(t.z*=e)}(t,s);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t)for(const n of t.paths)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t)for(const n of t.rings)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const n of t.points)n.length>2&&(n[2]*=e)}(t,s);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,s);default:return null}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5235],{15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>O});var r=i(43697),o=i(99880),a=i(40330),s=i(20102),n=i(96674),l=i(22974),p=i(83379),c=i(70586),d=i(81271),u=i(5600),h=i(75215),m=i(71715),g=i(52011),y=i(6570),b=i(48522),v=i(92036),w=i(92604),f=i(90578);i(67676),i(80442);let k=class extends v.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){null!=e&&(0,d.YP)(e)?w.Z.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.cdnUrl;if(null==i)throw new s.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:t?.signal})}async update(e,t){const{addOrUpdateResource:r}=await i.e(7873).then(i.bind(i,97873));return r(this,"update",e,t)}hasPath(){return null!=this.path}_normalizePath(e,t){return null==e?e:(e=e.replace(/^\/+/,""),null!=t&&(0,d.YP)(e)&&(e=(0,d.PF)(e,t.itemUrl)),e?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,u.Cb)()],k.prototype,"portalItem",void 0),(0,r._)([(0,u.Cb)({type:String,value:null})],k.prototype,"path",null),(0,r._)([(0,f.p)("path")],k.prototype,"_castPath",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],k.prototype,"url",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],k.prototype,"cdnUrl",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],k.prototype,"itemRelativeUrl",null),k=(0,r._)([(0,g.j)("esri.portal.PortalItemResource")],k);const C=k;let S=class extends v.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,u.Cb)()],S.prototype,"created",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"rating",void 0),S=(0,r._)([(0,g.j)("esri.portal.PortalRating")],S);const _=S;var I;const x=new Set(["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","GeoJson","CSV","KML","WFS","WMTS","WMS","Feed"]),U=new Set(["KML","GeoJson","CSV"]);let R=I=class extends((0,n.eC)(p.Z)){static from(e){return(0,h.TJ)(I,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e&&(i="Insights Report"),i}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,a=!1,s=!1,n=!1,l=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.includes("Table"),s=t.includes("Route Layer"),n=t.includes("Markup"),l=t.includes("Spatiotemporal"),p=t.includes("UtilityNetwork"),i=l&&a?"spatiotemporaltable":a?"table":s?"routelayer":n?"markup":l?"spatiotemporal":r?"featureshosted":p?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"video service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e?t.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"360 vr experience"===e?"360vr":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"pro report template"===e?"proreporttemplate":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"notebook code snippets"===e||"notebook code snippet library"===e?"notebookcodesnippets":"suitability model"===e?"suitabilitymodel":"esri classifier definition"===e?"classifierdefinition":"esri classification schema"===e?"classificationschema":"insights data engineering workbook"===e?"dataengineeringworkbook":"insights data engineering model"===e?"dataengineeringmodel":"deep learning studio project"===e?"deeplearningproject":"discussion"===e?"discussion":"allsource project"===e?"allsourceproject":"api key"===e?"apikey":"data pipeline"===e?"datapipelines":"maps",i?(0,o.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return null!=this.type&&x.has(this.type)}get itemCdnUrl(){let e=this.itemUrl;return e&&a.id&&!a.id.findCredential(e)&&(e=a.id._normalizeAGOLorgDomain(e),e=e.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),e=e.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),e=e.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),e}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=b.Z.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof _&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new _({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,l.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,l.d9)(this.categories),created:(0,l.d9)(this.created),culture:this.culture,description:this.description,extent:(0,l.d9)(this.extent),groupCategories:(0,l.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,l.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,l.d9)(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new I({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await(0,c.s3)(this.portal).request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return(0,c.s3)(this.portal).request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await(0,c.s3)(this.portal).request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new _(t)):null}fetchRelatedItems(e,t){return(0,c.s3)(this.portal).requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},I)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return(0,c.s3)(this.portal).request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>(0,c.s3)(this.portal).signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new s.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new s.Z("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:i}=this;await(0,c.s3)(t).signIn();const{copyResources:r,folder:o,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===r,folder:"string"==typeof o?o:o?.id,includeResources:!!r,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${i}/copy`,l);return new I({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,d.HK)(t)?r.query={data:t}:r.query={url:(0,d.hF)(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new s.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:r}=await i.e(7873).then(i.bind(i,97873));return r(this,e,t)}async addResource(e,t,r){const{addOrUpdateResource:o}=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,o(e,"add",t,r)}async removeResource(e,t){const{removeResource:r}=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new s.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await i.e(7873).then(i.bind(i,97873));return t(this,e)}resourceFromPath(e){return new C({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,l.d9)(this.categories),created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};return(0,l.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new I({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,u.Cb)({type:["private","shared","org","public"]})],R.prototype,"access",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"accessInformation",void 0),(0,r._)([(0,u.Cb)({type:String})],R.prototype,"apiKey",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"appProxies"}}})],R.prototype,"applicationProxies",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"avgRating",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"categories",void 0),(0,r._)([(0,u.Cb)({type:Date})],R.prototype,"created",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"culture",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"description",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"displayName",null),(0,r._)([(0,u.Cb)({type:y.Z})],R.prototype,"extent",void 0),(0,r._)([(0,m.r)("extent")],R.prototype,"readExtent",null),(0,r._)([(0,u.Cb)()],R.prototype,"groupCategories",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"iconUrl",null),(0,r._)([(0,u.Cb)()],R.prototype,"id",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"isLayer",null),(0,r._)([(0,u.Cb)({type:Boolean,readOnly:!0})],R.prototype,"isOrgItem",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"itemControl",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"itemPageUrl",null),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"itemUrl",null),(0,r._)([(0,u.Cb)()],R.prototype,"licenseInfo",void 0),(0,r._)([(0,u.Cb)({type:Date})],R.prototype,"modified",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"name",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"numComments",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"numRatings",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"numViews",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"owner",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"ownerFolder",void 0),(0,r._)([(0,u.Cb)({type:b.Z})],R.prototype,"portal",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"screenshots",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"size",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"snippet",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)({type:String})],R.prototype,"sourceUrl",void 0),(0,r._)([(0,u.Cb)({type:String})],R.prototype,"spatialReference",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"tags",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"thumbnail",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"thumbnailUrl",null),(0,r._)([(0,u.Cb)()],R.prototype,"title",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"type",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"typeKeywords",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read(e,t){if(U.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],R.prototype,"url",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"userItemUrl",null),R=I=(0,r._)([(0,g.j)("esri.portal.PortalItem")],R);const O=R}}]);