@arcgis/core 4.34.0-next.17 → 4.34.0-next.19

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 (209) hide show
  1. package/EULA.pdf +0 -0
  2. package/applications/MapViewer/templateUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{fa894be8cfb6ed485df9.js → 025891f445869e33252b.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{827919fe23e06e40a330.js → 1a82f903b442a3856bfa.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
  7. package/assets/esri/core/workers/chunks/22206d13a75d61d77023.js +1 -0
  8. package/assets/esri/core/workers/chunks/227d25fcbb5f590c4581.js +1 -0
  9. package/assets/esri/core/workers/chunks/{2ad538440cfb3ab94787.js → 2c0c97acb7714b1e0e01.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
  11. package/assets/esri/core/workers/chunks/3e07de009d5febd62b19.js +1 -0
  12. package/assets/esri/core/workers/chunks/4072ab8378c235a268ca.js +1 -0
  13. package/assets/esri/core/workers/chunks/52410198c4b2eccfeadd.js +1 -0
  14. package/assets/esri/core/workers/chunks/{04e558a970c6a77f243e.js → 5cbaf4ff688aafa6643e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5e53c7e29bb6d43d08be.js +1 -0
  16. package/assets/esri/core/workers/chunks/606782a94adcce6975af.js +1 -0
  17. package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
  18. package/assets/esri/core/workers/chunks/{53e43798d08ad2075c1f.js → 758776e841fd370e3353.js} +1 -1
  19. package/assets/esri/core/workers/chunks/764e505f2bafdf5afaf9.js +1 -0
  20. package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
  21. package/assets/esri/core/workers/chunks/8656c145ff0ca2e51ea6.js +1 -0
  22. package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
  23. package/assets/esri/core/workers/chunks/903c7a0a47c14442d3c1.js +1 -0
  24. package/assets/esri/core/workers/chunks/933d4a3b0cee82cc80fe.js +1 -0
  25. package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
  27. package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
  28. package/assets/esri/core/workers/chunks/{66c8816e91e3f9e214d4.js → a92a344763fbc3cec71e.js} +1 -1
  29. package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
  30. package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{2d89e354eeadadca4f7f.js → b421986cb4e45c632f7c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/c1822b03302c3db71b1f.js +1 -0
  33. package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
  34. package/assets/esri/core/workers/chunks/d568070513f2b98fd9b5.js +1 -0
  35. package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
  36. package/assets/esri/core/workers/chunks/{5bfccd5dffda74740aa4.js → df811b31e0446de5d322.js} +1 -1
  37. package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
  38. package/assets/esri/core/workers/chunks/ec339075bb4faeec1413.js +1 -0
  39. package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
  40. package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
  41. package/assets/esri/themes/base/widgets/_Legend.scss +3 -1
  42. package/assets/esri/themes/dark/main.css +1 -1
  43. package/assets/esri/themes/light/main.css +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  63. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  67. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  68. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  69. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  70. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  71. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  72. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  73. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  74. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  76. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  77. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  78. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  79. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  80. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  81. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  82. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  83. package/chunks/sphere.js +1 -1
  84. package/config.js +1 -1
  85. package/core/accessorSupport/trackingUtils.js +1 -1
  86. package/core/sql.js +1 -1
  87. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  88. package/geometry/support/coordsUtils.js +1 -1
  89. package/geometry/support/sphere.js +1 -1
  90. package/interfaces.d.ts +101 -49
  91. package/kernel.js +1 -1
  92. package/layers/FeatureLayer.js +1 -1
  93. package/layers/OrientedImageryLayer.js +1 -1
  94. package/layers/SubtypeGroupLayer.js +1 -1
  95. package/layers/VectorTileLayer.js +1 -1
  96. package/layers/VideoLayer.js +1 -1
  97. package/layers/graphics/data/QueryEngineResult.js +1 -1
  98. package/layers/mixins/FeatureLayerBase.js +1 -1
  99. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  100. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  101. package/layers/orientedImagery/core/utils.js +1 -1
  102. package/layers/orientedImagery/transformations/updateElevation.js +1 -1
  103. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  104. package/layers/orientedImagery/transformations/utils.js +1 -1
  105. package/layers/support/SubtypeSublayer.js +1 -1
  106. package/layers/support/TitleCreator.js +1 -1
  107. package/layers/support/arcgisLayers.js +1 -1
  108. package/layers/support/fetchService.js +1 -1
  109. package/layers/support/fieldUtils.js +1 -1
  110. package/layers/support/layerUtils.js +1 -1
  111. package/layers/video/VideoCameraSensorModel.js +1 -1
  112. package/layers/video/VideoController.js +1 -1
  113. package/networks/UtilityNetwork.js +1 -1
  114. package/package.json +1 -1
  115. package/portal/support/layersLoader.js +1 -1
  116. package/portal/support/loadUtils.js +1 -1
  117. package/portal/support/portalLayers.js +1 -1
  118. package/request.js +1 -1
  119. package/rest/knowledgeGraphService.js +1 -1
  120. package/rest/support/DateBinParameters.js +1 -1
  121. package/smartMapping/renderers/size.js +1 -1
  122. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  123. package/support/requestUtils.js +1 -1
  124. package/support/revision.js +1 -1
  125. package/symbols/cim/effects/EffectRadial.js +1 -1
  126. package/symbols/cim/utils.js +1 -1
  127. package/symbols/support/previewCIMSymbol.js +1 -1
  128. package/symbols/support/previewSymbol2D.js +1 -1
  129. package/symbols/support/svgUtils.js +1 -1
  130. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  131. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  132. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  133. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  134. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  135. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  136. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  137. package/views/3d/camera/intersectionUtils.js +1 -1
  138. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  139. package/views/3d/layers/I3SMeshView3D.js +1 -1
  140. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  141. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  142. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  143. package/views/3d/state/ViewState.js +1 -1
  144. package/views/3d/state/ViewStateManager.js +1 -1
  145. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  146. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  147. package/views/3d/state/utils/navigationUtils.js +1 -1
  148. package/views/3d/support/popupHitTest.js +1 -1
  149. package/views/3d/terrain/OverlayManager.js +1 -1
  150. package/views/3d/terrain/TerrainSurface.js +1 -1
  151. package/views/3d/terrain/TileRenderer.js +1 -1
  152. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  153. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  154. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  155. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  156. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  157. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  158. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  159. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  160. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  161. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  162. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  163. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  164. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  165. package/views/SceneView.js +1 -1
  166. package/views/analysis/analysisViewUtils.js +1 -1
  167. package/views/layers/DimensionLayerView.js +1 -1
  168. package/views/layers/LineOfSightLayerView.js +1 -1
  169. package/views/layers/ViewshedLayerView.js +1 -1
  170. package/views/support/drapedUtils.js +1 -1
  171. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  172. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  173. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  174. package/widgets/Expand.js +1 -1
  175. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  176. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  177. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  178. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  179. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  180. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  181. package/widgets/OrientedImageryViewer.js +1 -1
  182. package/widgets/Print/PrintViewModel.js +1 -1
  183. package/widgets/Print.js +1 -1
  184. package/widgets/support/GridControls.js +1 -1
  185. package/assets/esri/core/workers/chunks/1443520c9fb23381f8d5.js +0 -1
  186. package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
  187. package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
  188. package/assets/esri/core/workers/chunks/3f8cc157b65a9d570921.js +0 -1
  189. package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
  190. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
  191. package/assets/esri/core/workers/chunks/513dc2467e9b8b8c6df4.js +0 -1
  192. package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
  193. package/assets/esri/core/workers/chunks/5ef1095842e21090f1f4.js +0 -1
  194. package/assets/esri/core/workers/chunks/7716a9fb380d66ba7292.js +0 -1
  195. package/assets/esri/core/workers/chunks/78a57f5aeb277b84b3da.js +0 -1
  196. package/assets/esri/core/workers/chunks/7c56740cac444419e5b4.js +0 -1
  197. package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
  198. package/assets/esri/core/workers/chunks/8855f1a6224ffbd0bb66.js +0 -1
  199. package/assets/esri/core/workers/chunks/885e8e90dfe5dbd5053d.js +0 -1
  200. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
  201. package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
  202. package/assets/esri/core/workers/chunks/beb01d400f1aa089d2dc.js +0 -1
  203. package/assets/esri/core/workers/chunks/cc1328cacc4ac07eb548.js +0 -1
  204. package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
  205. package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
  206. package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
  207. package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
  208. package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
  209. package/assets/esri/core/workers/chunks/f3e179b48bca50c94538.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2765,3186,5011,9141],{4197:(e,t,r)=>{r.d(t,{jh:()=>i,l5:()=>s,xm:()=>o});var n=r(34275);function i(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>y,w2:()=>h});var n=r(69622),i=r(5503),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!n.includes(e))),d=n.filter((e=>!i.includes(e))),h=n.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(o,d).sort(),y=c(e);if(y&&s.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const n of h){const i=u(e,n),o=u(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=f?f.diff[n]=s:f={type:"partial",diff:{[n]:s}})}}return f}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function h(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)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 o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),i=r(69622),o=r(4576),s=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),c=r(30524),p=r(43668);let d=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,p.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){return(await this.getTitles(e,[t],r)).get(t)??""}async getTitles(e,t,r){const n=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,l=a&&s;t.forEach((t=>{const r=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";n.set(t,r)}))}catch{}return n}async _checkAndReQueryGraphics(e,t){const r=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(o.Ru);if(r.length!==t.length)return t;if(t.some((e=>!(0,c.Kl)(e,this.requiredFields)))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=r;const i=await e.queryFeatures(n);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,n._)([(0,l.MZ)()],d.prototype,"_featureUtils",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,n._)([(0,l.MZ)()],d.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,l.MZ)()],d.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"fieldInfoMap",null),(0,n._)([(0,l.MZ)()],d.prototype,"fields",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"objectIdField",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"requiredFields",null),d=(0,n._)([(0,u.$)("esri.layers.support.TitleCreator")],d)},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>s,mj:()=>i});var n=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function o(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,n.sK)(r[e]))}function s(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>b,rU:()=>g,tH:()=>F});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),c='"',p=c+" + ",d=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function b(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,p).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=M.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},37531:(e,t,r)=>{r.d(t,{dt:()=>d,GG:()=>g,UQ:()=>m,Sx:()=>c});var n=r(68197),i=r(60999),o=(r(44208),r(51850)),s=(r(76369),r(62046)),a=(r(2741),r(78888),r(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new n.A([128,128,128]);var l=r(28975),u=r(33910);function c(e,t){if(!e)return null;let r=null;return(0,u.wk)(e)?r=function(e){const t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach((e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)})),r?new n.A(r):null}(e):(0,u.$y)(e)&&(r="cim"===e.type?(0,s.Nk)(e):e.color?new n.A(e.color):null),r?p(r,t):null}function p(e,t){if(null==t||null==e)return e;const r=e.toRgba();return r[3]=r[3]*t,new n.A(r)}function d(e,t,r){e&&(t||null!=r)&&(t&&(t=new n.A(t)),(0,u.wk)(e)?function(e,t,r){const i=e.symbolLayers;if(!i)return;const o=(e,i=!1)=>{let o=t??e??null;return null!=r?.override&&(!o&&i&&(o=new n.A([255,255,255])),o&&(o.a=r.override)),p(o,r?.add)};i.forEach((e=>{if("water"===e.type)return void(e.color=p(e.color,r?.add));const t=null!=e.material?e.material.color:null,n=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:n}):e.material.color=n,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=p(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))}))}(e,t,r):(0,u.$y)(e)&&function(e,t,r){t=t??e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=p(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,r?.add))}(e,t,r))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,r){for(let n=0;n<3;n++){const i=e[n];switch(i){case"symbol-value":{const e=r[n];return null!=e?e/t[n]:1}case"proportional":break;default:if(i&&t[n])return i/t[n]}}return null}function f(e,t,r,n){switch(e){case"proportional":return r*n;case"symbol-value":return null!=t?t:r;default:return e}}async function m(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const n=e.symbolLayers;n&&await(0,i.jJ)(n,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const r=t[2];"number"==typeof r&&(e.size=r)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const r=h(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){const r=y(t,o.Un,[e.width,void 0,e.height]);null!=r&&(e.width=f(t[0],e.width,1,r),e.height=f(t[2],e.height,1,r))}(e,t);break;case"object":await async function(e,t){const{resourceSize:n,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await r.e(5404).then(r.bind(r,95404)),n=await t(e,10),{width:i,height:o,depth:s}=e,a=[i,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/n[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=n[e]*l);return{resourceSize:n,symbolSize:a}}(e),o=y(t,n,i);null!=o&&(e.width=f(t[0],i[0],n[0],o),e.depth=f(t[1],i[1],n[1],o),e.height=f(t[2],i[2],n[2],o))}(e,t)}}(e,t)))}(e,t):void((0,u.$y)(e)&&function(e,t){const r=h(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}(e,t))}function g(e,t,r){if(e&&null!=t)if((0,u.wk)(e)){const n=e.symbolLayers;n&&n.forEach((e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)}))}else(0,u.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},39516:(e,t,r)=>{let n;async function i(){return null==n&&(n=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function o(e,t){const r=await i(),n=r.get(e,t);if(null==n)throw r.getError(e,t);return n}function s(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>o,IW:()=>a,mA:()=>s})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var n=r(90237),i=r(66552),o=r(53966),s=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&c||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],p(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),o=p(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(c(i.minScale),p(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=c(e),r=c(r),t=p(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},50498:(e,t,r)=>{r.d(t,{Ye:()=>p,gy:()=>c,yR:()=>d});var n=r(66552),i=r(5443),o=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:o.A,key:"type",typeMap:{extent:i.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var n,i=r(90237),o=r(13874),s=r(69540),a=r(51447),l=r(25482),u=r(53966),c=r(36708),p=r(24326),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(54339),b=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(s.A.ClonableMixin(l.A)){static{n=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,c.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,f.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,i._)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,i._)([(0,d.MZ)({value:null,types:m.yR,json:{read:f.rS}})],M.prototype,"geometry",null),(0,i._)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,i._)([(0,d.MZ)({type:o.A,value:null})],M.prototype,"popupTemplate",null),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,i._)([(0,d.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,i._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,i._)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,i._)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>p,Nd:()=>d,jm:()=>h,sK:()=>m});var n=r(40876),i=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){const t=new Float32Array(16);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},create:o,fromValues:function(e,t,r,n,i,o,s,a,l,u,c,p,d,h,y,f){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=n,m[4]=i,m[5]=o,m[6]=s,m[7]=a,m[8]=l,m[9]=u,m[10]=c,m[11]=p,m[12]=d,m[13]=h,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=y(e.strength,t.strength,r),this.radius=y(e.radius,t.radius,r),this.threshold=y(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(y(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,n=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class p{constructor(e,t,r,n){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=n,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=y(e.offsetX,t.offsetX,r),this.offsetY=y(e.offsetY,t.offsetY,r),this.blurRadius=y(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(y(e.color[0],t.color[0],r)),this.color[1]=Math.round(y(e.color[1],t.color[1],r)),this.color[2]=Math.round(y(e.color[2],t.color[2],r)),this.color[3]=y(e.color[3],t.color[3],r)}clone(){return new p(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=y(e.angle,t.angle,r),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*n-.213*r,.715-.715*n-.715*r,.072-.072*n+.928*r,0,.213-.213*n+.143*r,.715+.285*n+.14*r,.072-.072*n-.283*r,0,.213-.213*n-.787*r,.715-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(e,t,r){return e+(t-e)*r}function f(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new p(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},59929:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Oe});var n=r(90237),i=r(69540),o=r(5503),s=r(49186),a=r(81583),l=r(91869),u=r(92071),c=r(74887),p=r(36708),d=r(39516),h=r(84952),y=r(10107),f=(r(44208),r(53966)),m=(r(87811),r(36005)),g=r(40608),b=r(4146),w=r(52136),M=r(18768),_=r(63074),v=r(69208),F=r(6455),I=r(47685),T=r(87796),x=r(16131),A=r(8303),S=r(54310),C=r(25036),Z=r(82935),O=r(60694),k=r(10873),E=r(15426),j=r(17036),L=r(30524),N=r(85334),P=r(90360),R=r(86162),q=r(92438),G=r(96576),$=r(93618),z=r(62046),V=r(37531);const D={key:"type",base:q.A,errorContext:"renderer",typeMap:{simple:G.A,"unique-value":$.A,"class-breaks":R.A}},U=(0,P.C)({types:D}),J=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var B=r(13874),H=r(4902),Y=r(4718),X=r(92474),Q=r(97768),W=r(93637),K=r(43937),ee=r(89317),te=r(38141),re=r(16930),ne=r(29005),ie=r(46499),oe=r(39383),se=r(17311),ae=r(61956),le=r(30291),ue=r(59868),ce=r(43440);const pe=(0,j.p)();let de=0;function he(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=ee.K),e}function ye(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=ee.K),e?.target&&(t.write.target=e.target)),t}function fe(e){switch(e){case"point":case"multipoint":return ue.UK.clone();case"polyline":return ue.A7.clone();case"polygon":case"multipatch":return ue.Cx.clone();default:return null}}function me(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ge(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},i=me(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new ne.A({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let be=class extends((0,u.P)(i.A.ClonableMixin(H.A.IdentifiableMixin(X.A)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${de++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,L.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,Q.pR)(e),new se.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}writeFieldOverrides(e,t,r){const{fields:n,parent:i}=this;let o;if(n){o=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:s})=>{if(!s)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let u=!1;r!==a.alias&&(l.alias=r,u=!0),n!==a.editable&&(l.editable=n,u=!0),o.push(l),u&&e++})),0===e&&o.length===n.length&&(o=null)}else o=(0,Y.o8)(e);o?.length&&(0,W.sM)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,u=[];for(const e of n){const n=e.clone(),{name:i}=n,s=t?.find((e=>e.name===i));if(n.visible=!t?.length||!!s,s){const{alias:e,editable:t}=s;e&&(n.alias=e),!1===t&&(n.editable=!1)}const c=a?.[i]??null;n.defaultValue=i===o?r:c;const p=l?.[i]??null;n.domain=i===o?null:p?"inherited"===p.type?n.domain:p.clone():null,u.push(n)}return u}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(f.A.getLogger(this).error(_e("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||f.A.getLogger(this).error(_e("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,L.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new G.A({symbol:fe(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=U(n,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(o=new G.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const i=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:U(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??re.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[ge(this.subtypeCode,t)]}readTitleFromService(e,t){const r=me(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw _e("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw _e("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw _e("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw _e("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:n,objectIdField:s,title:i}}return(0,le.tn)(t,e)}createQuery(){if(!this.parent)throw _e("createQuery");const e=(0,E.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d.mA)(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,E.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw _e("queryAttachments");const n=e.clone();return n.where=Me(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw _e("queryFeatureCount");return r.parent.queryFeatureCount(we(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw _e("queryFeatures");return r.parent.queryFeatures(we(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw _e("queryObjectIds");return r.parent.queryObjectIds(we(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw _e("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw _e("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],be.prototype,"_titleCreator",null),(0,n._)([(0,y.MZ)({type:ce.A,json:ye({name:"attributeTableInfo"})})],be.prototype,"attributeTableTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"capabilities",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"effectiveCapabilities",null),(0,n._)([(0,y.MZ)({json:ye()})],be.prototype,"charts",void 0),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:ye({name:"enableEditing"})})],be.prototype,"editingEnabled",void 0),(0,n._)([(0,y.MZ)({type:Boolean,readOnly:!0})],be.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"elevationInfo",null),(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],be.prototype,"featureTitleFields",null),(0,n._)([(0,y.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],be.prototype,"fieldOverrides",void 0),(0,n._)([(0,K.K)("fieldOverrides")],be.prototype,"writeFieldOverrides",null),(0,n._)([(0,y.MZ)({...pe.fields,readOnly:!0,json:{read:!1}})],be.prototype,"fields",null),(0,n._)([(0,y.MZ)(pe.fieldsIndex)],be.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"floorInfo",null),(0,n._)([(0,y.MZ)({type:te.A,json:ye({name:"formInfo"})})],be.prototype,"formTemplate",void 0),(0,n._)([(0,y.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],be.prototype,"id",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"isTable",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"geometryType",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"globalIdField",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"type",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.kF)))],be.prototype,"labelsVisible",void 0),(0,n._)([(0,y.MZ)({type:[ie.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:oe.w},write:{ignoreOrigin:!0,layerContainerTypes:ee.K}}})],be.prototype,"labelingInfo",void 0),(0,n._)([(0,y.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:ee.K}}})],be.prototype,"layerType",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.fV)))],be.prototype,"legendEnabled",void 0),(0,n._)([(0,y.MZ)({type:["show","hide"]})],be.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Y.o8)(k.hn);return e.json.origins.service.read=!1,he(e,{spatialOnly:!0})})())],be.prototype,"minScale",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Y.o8)(k.hG);return e.json.origins.service.read=!1,he(e,{spatialOnly:!0})})())],be.prototype,"maxScale",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"effectiveScaleRange",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"objectIdField",null),(0,n._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:ye({spatialOnly:!0})})],be.prototype,"opacity",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],be.prototype,"parent",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.M6)))],be.prototype,"popupEnabled",void 0),(0,n._)([(0,y.MZ)({type:B.A,json:ye({name:"popupInfo"})})],be.prototype,"popupTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"defaultPopupTemplate",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"relationships",null),(0,n._)([(0,y.MZ)({types:D,json:ye({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],be.prototype,"renderer",null),(0,n._)([(0,m.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],be.prototype,"readRendererFromService",null),(0,n._)([(0,m.w)("renderer",["layerDefinition.drawingInfo.renderer"])],be.prototype,"readRenderer",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"spatialReference",null),(0,n._)([(0,y.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],be.prototype,"subtypeCode",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"subtypeField",null),(0,n._)([(0,y.MZ)({type:[ne.A],json:ye({name:"layerDefinition.templates"})})],be.prototype,"templates",void 0),(0,n._)([(0,m.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],be.prototype,"readTemplatesFromService",null),(0,n._)([(0,y.MZ)({type:String,json:ye()})],be.prototype,"title",void 0),(0,n._)([(0,m.w)("service","title",["subtypes"])],be.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"url",null),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"userHasUpdateItemPrivileges",null),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:ye({name:"visibility",spatialOnly:!0})})],be.prototype,"visible",void 0),be=(0,n._)([(0,g.$)("esri.layers.support.SubtypeSublayer")],be);const we=(e,t,r)=>{if(!r)return t.createQuery();const n=ae.A.from(r);return n.where=Me(n.where,e.subtypeField,t.subtypeCode),n},Me=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return n.test(o)?o.replace(n,i):(0,d.mA)(i,o)},_e=e=>new s.A("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);var ve=r(96184),Fe=r(91908),Ie=r(54218),Te=r(92935);const xe="SubtypeGroupLayer";function Ae(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Se(e,t){const r=[];for(const n of e){const e=new be;e.read(n,t),r.push(e)}return r}const Ce=(0,j.p)();let Ze=class extends((0,T.j)((0,F.FJ)((0,I.w6)((0,_.dM)((0,Z.e)((0,C.j)((0,S.J)((0,M.b)((0,x.q)((0,A.A)((0,u.P)((0,v.d)((0,w.p)(i.A.ClonableMixin(b.A))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(be)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,c.sg)((async(e,t,n)=>{const{save:i,saveAs:o}=await r.e(5740).then(r.bind(r,33359));switch(e){case Te.X.SAVE:return i(this,t);case Te.X.SAVE_AS:return o(this,n,t)}})),this.addHandles((0,p.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(c.QP).then((async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,E.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,E.C$)(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}get parsedUrl(){const e=(0,h.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,h.fj)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,O.yG)(this.url,t):t}async addAttachment(e,t){const r=await(0,E.Xl)(this,e,t,xe);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const n=await(0,E.bt)(this,e,t,r,xe);return this.lastEditsEventDate=new Date,n}async applyEdits(e,t){return(0,E.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,c.qr)(Promise.all([r.e(708),r.e(364),r.e(8628),r.e(2593),r.e(9062)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,E.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d.mA)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await(0,E.mm)(this,e,t,xe);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,E.WP)(this,e,xe)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,E.pc)(this,e);if(t)return t}const r=(0,E.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return(0,a.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,E.lV)(this,e,t,xe)}async queryFeatures(e,t){const r=await this.load(),n=ae.A.from(e)??r.createQuery(),i=n.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),n.outFields=i);const o=await r.source.queryFeatures(n,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(await(0,E.sg)(this,e,t,xe)).filter(Ie.Et)}async queryFeatureCount(e,t){return(0,E.Ye)(this,e,t,xe)}async queryExtent(e,t){return(0,E.B5)(this,e,t,xe)}async queryRelatedFeatures(e,t){return(0,E.hM)(this,e,t,xe)}async queryRelatedFeaturesCount(e,t){return(0,E.S2)(this,e,t,xe)}async save(e){return this._debouncedSaveOperations(Te.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Te.X.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:n,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==n)return i?.push(Ae(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===n)return i?.push(Ae(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,Fe.D)(this,e)}async getFeatureTitle(e,t){const r=this.findSublayerForFeature(e);return r?await r.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const r=new Map,n=new Map,i=[n];e.forEach((e=>{const t=this.findSublayerForFeature(e);t?(0,l.tE)(r,t,(()=>[])).push(e):n.set(e,this._getFeatureTitleForUnknownSublayer(e))}));const o=await Promise.all(Array.from(r).map((([e,r])=>e.getFeatureTitles(r,t))));return o.forEach((e=>i.push(e))),new Map(i.flatMap((e=>[...e])))}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const r=t.featureTitleFields;for(const t of r)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,L.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,E.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:r,objectIdField:n}=this;if(t&&r.has(t))return e.attributes[r.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():n&&r.has(n)?e.attributes[r.get(n).name]??"":""}};(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"createQueryVersion",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"editingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({...Ce.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ze.prototype,"fields",void 0),(0,n._)([(0,y.MZ)(Ce.fieldsIndex)],Ze.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)(k.id)],Ze.prototype,"id",void 0),(0,n._)([(0,y.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Ze.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{"web-document":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}},"portal-item":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Ze.prototype,"operationalLayerType",null),(0,n._)([(0,y.MZ)(Ce.outFields)],Ze.prototype,"outFields",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"parsedUrl",null),(0,n._)([(0,y.MZ)({clonable:!1})],Ze.prototype,"source",null),(0,n._)([(0,y.MZ)({type:o.A.ofType(be),json:{origins:{service:{read:{source:"subtypes",reader(e,t,r){let n=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const r=e.drawingInfo?.renderer,n=r?U(r,e,t):null;if("simple"===n?.type)return(0,V.Sx)(n.symbol,null)?n.symbol.clone():null}(t,r);n=i?function(e,t){return(0,N.Iy)(J,e,{offset:!0,shuffle:!0}).reverse().map((e=>{const r=t.clone();return"cim"===r.type?(0,z.Fe)(r,e):(0,V.dt)(r,e),new G.A({symbol:r})}))}(e.length,i):null}const i=e.map((({code:e},i)=>{const o=new be({subtypeCode:e});o.read(t,r);const s=n?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},r),o}));return new(o.A.ofType(be))(i)}}}},read:{source:["layers","tables"],reader(e,t,r){let n;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?n=Se(t.layers,r):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(n=Se(t.tables,r)),new(o.A.ofType(be))(n)}},write:{ignoreOrigin:!0,writer(e,t,r,n){const i=[];for(const t of e){const e=t.write({},n);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],Ze.prototype,"sublayers",void 0),(0,n._)([(0,y.MZ)()],Ze.prototype,"useUniqueColorsForSublayers",void 0),(0,n._)([(0,y.MZ)({type:ve.A})],Ze.prototype,"timeInfo",void 0),(0,n._)([(0,y.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Ze.prototype,"title",void 0),(0,n._)([(0,m.w)("service","title",["name"])],Ze.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({json:{read:!1}})],Ze.prototype,"type",void 0),(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],Ze.prototype,"featureTitleFields",null),Ze=(0,n._)([(0,g.$)("esri.layers.SubtypeGroupLayer")],Ze);const Oe=Ze},62046:(e,t,r)=>{r.d(t,{Fe:()=>c,Nk:()=>o});var n=r(68197),i=r(93397);function o(e){const t=[];return s((0,i.lW)(e),t),t.length?new n.A((0,i.e6)(t[0])):null}function s(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const n="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(const e of r.symbolLayers)if(!(e.colorLocked||n&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{s(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const r of e)if(r.join(".")===t.join("."))return;e.push(t)}function l(e,t){const r=t.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach((t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function c(e,t,r){t instanceof n.A||(t=new n.A(t));const o=(0,i.lW)(e);o&&p(o,t,r)}function p(e,t,r){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===n?.type;if(n?.symbolLayers)for(const e of n.symbolLayers){if(e.colorLocked)continue;if(o)if(r){const{layersToColor:t}=r;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const n=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=n;break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{p(e.symbol,t,r)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=n;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,r)}}}function d(e,t){const r=e.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach((e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const r=t.clone();r.a=0,e.toColor=r.toArray()}}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,Ej:()=>d,Ie:()=>m,Jt:()=>g,Ne:()=>h,RF:()=>c,aI:()=>M,fA:()=>s,gE:()=>l,hZ:()=>f,iT:()=>p,is:()=>w,qv:()=>_,vI:()=>y,vY:()=>a,v_:()=>v,vt:()=>o,w1:()=>u});var n=r(5443),i=(r(19419),r(4197));function o(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,r,n=o()){return f(n,_),function(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[r,n,o,s,a,l]=e;return t[0]=r,t[1]=n,t[2]=o,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=n,t[14]=o,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?f(e,_):o(_)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function M(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];o()},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>s});var n=r(60999),i=r(5503),o=r(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach((e=>s(e))):o.A.isLoadable(t)&&r.push(t))};t(s);let a=null;if(await(0,n.Tj)(r,(async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},85334:(e,t,r)=>{r.d(t,{$:()=>g,IB:()=>s,Iy:()=>F,N2:()=>b,RH:()=>M,ZD:()=>w});var n=r(68197),i=r(4576),o=r(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function l(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}r(34727),r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const r=[];let n,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let a=0;for(n=0;n<o;n++){for(a=0,i=0;i<s;i++)a+=e[n][i]*t[i];r.push(a)}return r}function h(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=d(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function y(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function f(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function m(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function g(e){return s(e)?e:u(e)?function(e){return y(m(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):l(e)?function(e){return y(m(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?y(e):a(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,i=n*r,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(e):e}function b(e){return a(e)?e:function(e){const t=e.r,r=e.g,n=e.b,i=Math.max(t,r,n),o=i-Math.min(t,r,n);let s=i,a=0===o?0:i===t?(r-n)/o%6:i===r?(n-t)/o+2:(t-r)/o+4,l=0===o?0:o/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(g(e))}function w(e){return l(e)?e:function(e){return f(h(e))}(g(e))}function M(e){return u(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n);let o=Math.atan2(n,r);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(f(h(e)))}(g(e))}var _,v;function F(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map((e=>"string"==typeof e?new n.A(e):e))).length||1===t){const r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,o.o8)(e),r.seed)),e.length>=t){const r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){const n=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],a=e[i+1];for(let i=1;i<=s;i++){const l=i/(s+1);if(n.push(T(o,a,l,r)),n.length+e.length===t)break e}}return[...e.map((e=>e.clone())),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}(v=_||(_={}))[v.Low=160]="Low",v[v.High=225]="High";const I=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function T(e,t,r,o={}){const s=e.r,a=e.g,l=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*r),h=Math.round(a+(c-a)*r),y=Math.round(l+(p-l)*r);if(!o.offset)return new n.A([d,h,y]);const f=(0,i.Mo)(o.seed);return new n.A([I(d,f),I(h,f),I(y,f)])}},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(49186),i=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),c=r(56400),p=r(96285);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=f(t);if(t&&n){const i=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,c.ZS)(i.dateFieldsTimeReference):a??u.n$:null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,c.ZS)(n.timeReference):a:null,d=new Map([[y(i?.creationDateField??""),l],[y(i?.editDateField??""),l],[y(o),p],[y(s),p]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,u.L5);else{const e=d.get(y(n??""))??a;t.set(n,e)}return t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9468],{240:(t,e,n)=>{n.d(e,{C:()=>u,vt:()=>a,lU:()=>d,fA:()=>h,mR:()=>A,Qj:()=>l,T7:()=>g,gv:()=>p,Ui:()=>I,Tj:()=>S,_I:()=>R,mP:()=>N,LV:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=P){return[t[0],t[1],t[2],t[3]]}function c(t=P[0],e=P[1],n=P[2],o=P[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(T,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(T,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(O,c),c++,(0,r.d)(E,T,_),(0,r.n)(E,E),(0,r.d)(m,_,O),(0,r.n)(m,m),u=!(0,r.q)(T,O)&&!(0,r.q)(_,O)&&Math.abs((0,r.e)(E,m))<f;return u?(function(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2])}(T,_,O,t),!0):(0!==o||1!==i||2!==s)&&d(t,e,n,0,1,2)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const f=.99619469809,T=(0,i.vt)(),_=(0,i.vt)(),O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)();function N(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(O,e,t),function(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}(n,O,o)}function I(t,e,n){return null!=e&&F(L(t,e.origin,e.direction,D,n))}function g(t,e,n){return F(L(t,e.origin,e.vector,C.NONE,n))}function p(t,e,n){return F(L(t,e.origin,e.vector,C.CLAMP,n))}function S(t,e){return b(t,e)>=0}function R(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function b(t,e){return(0,r.e)(t,e)+t[3]}var M,v;function F(t){return t===M.INTERSECTS_INSIDE_OUT||t===M.INTERSECTS_OUTSIDE_IN}function L(t,e,n,i,s){const a=(0,r.e)(t,n),c=b(t,e);if(0===a)return c>=0?M.INSIDE:M.OUTSIDE;let u=-c/a;return i&C.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&C.INFINITE_MIN)&&u<0||!(i&C.INFINITE_MAX)&&u>1?c>=0?M.INSIDE:M.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?M.INTERSECTS_INSIDE_OUT:M.INTERSECTS_OUTSIDE_IN)}(v=M||(M={}))[v.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",v[v.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",v[v.INSIDE=2]="INSIDE",v[v.OUTSIDE=3]="OUTSIDE";const P=[0,0,1,0];var C;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(C||(C={})),C.INFINITE_MIN,C.INFINITE_MAX;const D=C.INFINITE_MAX},431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>B,hx:()=>F,Jb:()=>D});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:N}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function N(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function A(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(R,n.faceNormal0,n.faceNormal1),(0,u.n)(R,R);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,R[0],R[1],R[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const R=(0,l.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new S,D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const N=!!_&&!!f,A=N?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let S=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):A,R=1,b=_?_[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[R-1];t<_[R];t++)g[t]=I[f[t]];b=_[++R]}const n=N?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(N){for(let t=_[R-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const M=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<A;t++)I[t]===m&&(a(h,(N?f[t]:t)*e,M,m*e,e),m++);if(f&&!N){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function l(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),l=n(51850),h=n(11964),d=n(97937),f=n(93687),T=n(3694),_=n(4341),O=(n(58083),n(87317),n(91829)),E=n(71351);function m(t){return t?{ray:(0,E.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,E.vt)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new _.I((()=>m())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,O.fA)(-1,-1,-1,1),(0,O.fA)(1,-1,-1,1),(0,O.fA)(1,1,-1,1),(0,O.fA)(-1,1,-1,1),(0,O.fA)(-1,-1,1,1),(0,O.fA)(1,-1,1,1),(0,O.fA)(1,1,1,1),(0,O.fA)(-1,1,1,1),new _.I(m),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)();var I,g,p=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new R,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),R.clearPool(),V[0]=null,X.prune(),$.prune()}add(t){const e=Array.from(t);this._grow(e);const n=R.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));R.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=R.acquire();for(const o of t){const t=e??(0,d.e)(this.objectToBoundingSphere(o),K);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}R.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),(0,p.O_)(t.origin,t.direction,q,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(q,k),(0,p.O_)(t.origin,t.direction,q,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=x(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!N(n,u))return;const l=w(t,e,(0,d.a)(u)),h=l-u[3],f=l+u[3];h<i&&(i=h,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!N(n,o.bounds))return!1;if((0,u.g)(G,c,o.halfSize),(0,u.f)(G,G,(0,d.a)(o.bounds)),w(t,e,G)>s)return!1;const i=o.node;return i.terminals.forAll((t=>l(t))),null!==i.residents&&i.residents.forAll((t=>l(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const l={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};l.setRange(o);const h=w(e,n,t),f=x(e,n),T=x(e,-n),_=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=w(e,n,u)-h,T=f-o[3],_=f+o[3];T>c||_<a||!N(i,o)||r(t,l)};M(this._root,(t=>{if(!N(i,t.bounds))return!1;if((0,u.g)(G,f,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h>c)return!1;if((0,u.g)(G,T,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h<a)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=R.acquire().init(t);this._add(e.at(n),o),R.release(o)}}_grow(t){if(B(t,(t=>this.objectToBoundingSphere(t)),W),y(W[3])&&!this._fitsInsideTree(W))if(L(this._root.node))(0,d.e)(W,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(W);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(W,t):this._growRootAsSubNode(t),R.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,B([t,Y],(t=>t),J);const n=R.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0))),R.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,R.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(W),(0,d.a)(this._root.bounds)),W[3]=this._root.halfSize,this._root.init(t),t.advanceTo(W,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class R{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:R.createEmptyNode(),e&&(0,d.e)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=R.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=U[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new T.A({shrink:!0}),residents:new T.A({shrink:!0})}}static{this._pool=new f.A(R)}static acquire(){return R._pool.acquire()}static release(t){R._pool.release(t)}static clearPool(){R._pool.prune()}}function b(t,e){let n=R.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(R.acquire().init(n).advance(t));R.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=R.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=U[n];$.data[n].index=n,$.data[n].distance=w(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(R.acquire().init(r).advance(e))}R.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!L(t)&&(null===t.residents&&(t.residents=new T.A({shrink:!0})),!0)}function L(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function P(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function D(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function B(t,e,n){q[0]=1/0,q[1]=1/0,q[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);y(t[3])&&(P(q,t),C(k,t))}(0,u.m)((0,d.a)(n),q,k,.5),n[3]=Math.max(k[0]-q[0],k[1]-q[1],k[2]-q[2])/2}function x(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,j[r]);i<o&&(o=i,n=j[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I=S||(S={}),(g=I.DepthOrder||(I.DepthOrder={}))[g.FRONT_TO_BACK=1]="FRONT_TO_BACK",g[g.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const U=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],j=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),G=(0,l.vt)(),q=(0,l.vt)(),k=(0,l.vt)(),X=new T.A,K=(0,d.c)(),W=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new T.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.f)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,l.vt)(),this._tmpP2=(0,l.vt)(),this._tmpP3=(0,l.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,l.vt)(),i=(0,l.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.f)(a,a,r),(0,u.f)(c,c,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,c,n),rt(t,l,a,n),rt(t,l,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,h.Cr)(n,o,this._tmpLineSegment),a=(0,h._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,l.o8)(a),distance:(0,u.j)(i,a),start:(0,l.o8)(n),end:(0,l.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,l.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>R,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),N=A(1);function A(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=N){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-R,Math.min(t,R)))}function p(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const R=p(34028234663852886e22);function b(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let N=0;const A=E,p=n?.allocate(A);let R=0,b=0,M=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],A=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*A;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*A;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}b+=t,M++,P||function(t,e){return t.cosAngle<e}(_,S)?(e.write(m,N++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,R++,_),F.push(t))}));const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,R),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,N),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,N),r.getVec(d,A),(0,i.d)(N,N,m),(0,i.d)(A,A,m),(0,i.h)(m,N,A),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),N=(0,s.vt)(),A=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),S=Math.cos(p)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9468],{240:(t,e,n)=>{n.d(e,{C:()=>u,vt:()=>a,lU:()=>d,fA:()=>h,mR:()=>A,Qj:()=>l,T7:()=>g,gv:()=>p,Ui:()=>I,Tj:()=>S,_I:()=>R,mP:()=>N,LV:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=P){return[t[0],t[1],t[2],t[3]]}function c(t=P[0],e=P[1],n=P[2],o=P[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(T,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(T,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(O,c),c++,(0,r.d)(E,T,_),(0,r.n)(E,E),(0,r.d)(m,_,O),(0,r.n)(m,m),u=!(0,r.q)(T,O)&&!(0,r.q)(_,O)&&Math.abs((0,r.e)(E,m))<f;return u?(function(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2])}(T,_,O,t),!0):(0!==o||1!==i||2!==s)&&d(t,e,n,0,1,2)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const f=.99619469809,T=(0,i.vt)(),_=(0,i.vt)(),O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)();function N(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(O,e,t),function(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}(n,O,o)}function I(t,e,n){return null!=e&&F(L(t,e.origin,e.direction,D,n))}function g(t,e,n){return F(L(t,e.origin,e.vector,C.NONE,n))}function p(t,e,n){return F(L(t,e.origin,e.vector,C.CLAMP,n))}function S(t,e){return b(t,e)>=0}function R(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function b(t,e){return(0,r.e)(t,e)+t[3]}var M,v;function F(t){return t===M.INTERSECTS_INSIDE_OUT||t===M.INTERSECTS_OUTSIDE_IN}function L(t,e,n,i,s){const a=(0,r.e)(t,n),c=b(t,e);if(0===a)return c>=0?M.INSIDE:M.OUTSIDE;let u=-c/a;return i&C.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&C.INFINITE_MIN)&&u<0||!(i&C.INFINITE_MAX)&&u>1?c>=0?M.INSIDE:M.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?M.INTERSECTS_INSIDE_OUT:M.INTERSECTS_OUTSIDE_IN)}(v=M||(M={}))[v.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",v[v.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",v[v.INSIDE=2]="INSIDE",v[v.OUTSIDE=3]="OUTSIDE";const P=[0,0,1,0];var C;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(C||(C={})),C.INFINITE_MIN,C.INFINITE_MAX;const D=C.INFINITE_MAX},431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>B,hx:()=>F,Jb:()=>D});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:N}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function N(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function A(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(R,n.faceNormal0,n.faceNormal1),(0,u.n)(R,R);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,R[0],R[1],R[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const R=(0,l.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new S,D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const N=!!_&&!!f,A=N?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let S=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):A,R=1,b=_?_[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[R-1];t<_[R];t++)g[t]=I[f[t]];b=_[++R]}const n=N?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(N){for(let t=_[R-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const M=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<A;t++)I[t]===m&&(a(h,(N?f[t]:t)*e,M,m*e,e),m++);if(f&&!N){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function l(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),l=n(51850),h=n(11964),d=n(97937),f=n(93687),T=n(3694),_=n(4341),O=(n(58083),n(87317),n(91829)),E=n(71351);function m(t){return t?{ray:(0,E.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,E.vt)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new _.I((()=>m())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,O.fA)(-1,-1,-1,1),(0,O.fA)(1,-1,-1,1),(0,O.fA)(1,1,-1,1),(0,O.fA)(-1,1,-1,1),(0,O.fA)(-1,-1,1,1),(0,O.fA)(1,-1,1,1),(0,O.fA)(1,1,1,1),(0,O.fA)(-1,1,1,1),new _.I(m),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)();var I,g,p=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new R,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),R.clearPool(),V[0]=null,X.prune(),$.prune()}add(t){const e=Array.from(t);this._grow(e);const n=R.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));R.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=R.acquire();for(const o of t){const t=e??(0,d.h)(this.objectToBoundingSphere(o),K);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}R.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),(0,p.O_)(t.origin,t.direction,q,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(q,k),(0,p.O_)(t.origin,t.direction,q,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=x(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!N(n,u))return;const l=w(t,e,(0,d.a)(u)),h=l-u[3],f=l+u[3];h<i&&(i=h,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!N(n,o.bounds))return!1;if((0,u.g)(G,c,o.halfSize),(0,u.f)(G,G,(0,d.a)(o.bounds)),w(t,e,G)>s)return!1;const i=o.node;return i.terminals.forAll((t=>l(t))),null!==i.residents&&i.residents.forAll((t=>l(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const l={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};l.setRange(o);const h=w(e,n,t),f=x(e,n),T=x(e,-n),_=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=w(e,n,u)-h,T=f-o[3],_=f+o[3];T>c||_<a||!N(i,o)||r(t,l)};M(this._root,(t=>{if(!N(i,t.bounds))return!1;if((0,u.g)(G,f,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h>c)return!1;if((0,u.g)(G,T,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h<a)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=R.acquire().init(t);this._add(e.at(n),o),R.release(o)}}_grow(t){if(B(t,(t=>this.objectToBoundingSphere(t)),W),y(W[3])&&!this._fitsInsideTree(W))if(L(this._root.node))(0,d.h)(W,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(W);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(W,t):this._growRootAsSubNode(t),R.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,B([t,Y],(t=>t),J);const n=R.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0))),R.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,R.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(W),(0,d.a)(this._root.bounds)),W[3]=this._root.halfSize,this._root.init(t),t.advanceTo(W,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class R{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:R.createEmptyNode(),e&&(0,d.h)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=R.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=U[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new T.A({shrink:!0}),residents:new T.A({shrink:!0})}}static{this._pool=new f.A(R)}static acquire(){return R._pool.acquire()}static release(t){R._pool.release(t)}static clearPool(){R._pool.prune()}}function b(t,e){let n=R.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(R.acquire().init(n).advance(t));R.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=R.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=U[n];$.data[n].index=n,$.data[n].distance=w(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(R.acquire().init(r).advance(e))}R.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!L(t)&&(null===t.residents&&(t.residents=new T.A({shrink:!0})),!0)}function L(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function P(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function D(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function B(t,e,n){q[0]=1/0,q[1]=1/0,q[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);y(t[3])&&(P(q,t),C(k,t))}(0,u.m)((0,d.a)(n),q,k,.5),n[3]=Math.max(k[0]-q[0],k[1]-q[1],k[2]-q[2])/2}function x(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,j[r]);i<o&&(o=i,n=j[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I=S||(S={}),(g=I.DepthOrder||(I.DepthOrder={}))[g.FRONT_TO_BACK=1]="FRONT_TO_BACK",g[g.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const U=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],j=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),G=(0,l.vt)(),q=(0,l.vt)(),k=(0,l.vt)(),X=new T.A,K=(0,d.c)(),W=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new T.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.f)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,l.vt)(),this._tmpP2=(0,l.vt)(),this._tmpP3=(0,l.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,l.vt)(),i=(0,l.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.f)(a,a,r),(0,u.f)(c,c,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,c,n),rt(t,l,a,n),rt(t,l,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,h.Cr)(n,o,this._tmpLineSegment),a=(0,h._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,l.o8)(a),distance:(0,u.j)(i,a),start:(0,l.o8)(n),end:(0,l.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,l.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>R,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),N=A(1);function A(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=N){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-R,Math.min(t,R)))}function p(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const R=p(34028234663852886e22);function b(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let N=0;const A=E,p=n?.allocate(A);let R=0,b=0,M=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],A=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*A;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*A;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}b+=t,M++,P||function(t,e){return t.cosAngle<e}(_,S)?(e.write(m,N++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,R++,_),F.push(t))}));const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,R),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,N),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,N),r.getVec(d,A),(0,i.d)(N,N,m),(0,i.d)(A,A,m),(0,i.h)(m,N,A),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),N=(0,s.vt)(),A=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),S=Math.cos(p)}}]);