@arcgis/core 4.27.0-next.20230320 → 4.27.0-next.20230321
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +1 -0
- package/assets/esri/core/workers/chunks/{c36efbdd0a84fe851bbb.js → 433686dfda9e2ff1f98b.js} +1 -1
- package/assets/esri/core/workers/chunks/70ea44365021b665c213.js +1 -0
- package/assets/esri/core/workers/chunks/{f150bd21c3b9e098da57.js → 92951b85676df776961f.js} +56 -56
- package/assets/esri/core/workers/chunks/{19355af765993931a7c0.js → 9b196a726c6d175ca60f.js} +1 -1
- package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +1 -0
- package/assets/esri/core/workers/chunks/c5dd23d11fa91b0f318e.js +1 -0
- package/assets/esri/core/workers/chunks/c8f019d13f6b22481f2e.js +1 -0
- package/assets/esri/core/workers/chunks/f1ab86dbbd5b04e2a96c.js +1 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +18 -0
- package/assets/esri/themes/base/widgets/_ItemList.scss +13 -33
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
- package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
- package/chunks/ColorMaterial.glsl.js +16 -14
- package/interfaces.d.ts +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/CloudsData.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/interfaces.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/buffer/workerHelper.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Upload.js +5 -0
- package/widgets/Editor/UploadState.js +4 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/1ee774c3f29d8074da12.js +0 -1
- package/assets/esri/core/workers/chunks/2883a59fc1fc9e4d71af.js +0 -1
- package/assets/esri/core/workers/chunks/4d4cbfe72835c0460b09.js +0 -1
- package/assets/esri/core/workers/chunks/5bded2588008117d0c35.js +0 -1
- package/assets/esri/core/workers/chunks/9f02a0670ad73718d8f9.js +0 -1
- package/assets/esri/core/workers/chunks/ec73d16ef169adfc34fb.js +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ar.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_bg.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_bs.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ca.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_cs.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_da.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_de.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_el.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_en.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_es.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_et.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_fi.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_fr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_he.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_hr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_hu.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_id.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_it.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ja.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ko.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_lt.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_lv.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_nb.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_nl.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_pl.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_pt-BR.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_pt-PT.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ro.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_ru.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sk.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sl.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_sv.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_th.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_tr.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_uk.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_vi.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_zh-CN.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_zh-HK.json +0 -1
- package/assets/esri/widgets/Directions/t9n/Printout_zh-TW.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2472],{5732:(t,e,n)=>{n.d(e,{c:()=>i});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},46521:(t,e,n)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function r(t,e,n,i,r,s,o,c,a){return[t,e,n,i,r,s,o,c,a]}function s(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>s,c:()=>i,f:()=>r}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:i,createView:s,fromValues:r},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function s(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>o,a:()=>s,b:()=>r,c:()=>i});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:r,create:i,createView:s,fromValues:function(t,e,n,i,r,s,o,c,a,u,h,l,f,d,_,m){return[t,e,n,i,r,s,o,c,a,u,h,l,f,d,_,m]}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function i(){return[0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3]]}function s(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>o,a:()=>i,b:()=>r,c:()=>s});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:r,create:i,createView:s,fromValues:function(t,e,n,i){return[t,e,n,i]}},Symbol.toStringTag,{value:"Module"}))},29268:(t,e,n)=>{n.d(e,{c:()=>g,e:()=>T,g:()=>O,j:()=>p,k:()=>S,l:()=>v}),n(80442);var i,r,s=n(92604),o=n(22021),c=n(52138),a=n(17896),u=n(65617),h=n(98766),l=n(88669);(r=i||(i={}))[r.X=0]="X",r[r.Y=1]="Y",r[r.Z=2]="Z";var f=n(78341),d=n(61277),_=n(12981);const m=g();function g(){return(0,l.c)()}function p(t,e=g()){return(0,h.c)(e,t)}function T(t){return t[3]}function O(t){return t}function A(t,e,n){if(null==e)return!1;const{origin:i,direction:r}=e,s=N;s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2];const o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;const c=2*(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]),a=c*c-4*o*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-t[3]*t[3]);if(a<0)return!1;const u=Math.sqrt(a);let h=(-c-u)/(2*o);const l=(-c+u)/(2*o);return(h<0||l<h&&l>0)&&(h=l),!(h<0||(n&&(n[0]=i[0]+r[0]*h,n[1]=i[1]+r[1]*h,n[2]=i[2]+r[2]*h),0))}const N=(0,u.c)();function S(t,e){return A(t,e,null)}function E(t,e,n){const i=_.WM.get(),r=_.MP.get();(0,a.f)(i,e.origin,e.direction);const s=T(t);(0,a.f)(n,i,e.origin),(0,a.g)(n,n,1/(0,a.l)(n)*s);const o=R(t,e.origin),u=(0,d.EU)(e.origin,n);return(0,c.d)(r,u+o,i),(0,a.m)(n,n,r),n}function b(t,e,n){const i=(0,a.b)(_.WM.get(),e,t),r=(0,a.g)(_.WM.get(),i,t[3]/(0,a.l)(i));return(0,a.a)(n,r,t)}function R(t,e){const n=(0,a.b)(_.WM.get(),e,t),i=(0,a.l)(n),r=T(t),s=r+Math.abs(r-i);return(0,o.ZF)(r/s)}const I=(0,u.c)();function y(t,e,n,r){const s=(0,a.b)(I,e,t);switch(n){case i.X:{const t=(0,o.jE)(s,I)[2];return(0,a.s)(r,-Math.sin(t),Math.cos(t),0)}case i.Y:{const t=(0,o.jE)(s,I),e=t[1],n=t[2],i=Math.sin(e);return(0,a.s)(r,-i*Math.cos(n),-i*Math.sin(n),Math.cos(e))}case i.Z:return(0,a.n)(r,s);default:return}}function M(t,e){const n=(0,a.b)(F,e,t);return(0,a.l)(n)-t[3]}function v(t,e){const n=(0,a.d)(t,e),i=T(t);return n<=i*i}const F=(0,u.c)(),L=g();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:m,altitudeAt:M,angleToSilhouette:R,axisAt:y,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return A(t,e,n)?n:((0,f.JI)(e,t,n),b(t,n,n))},closestPointOnSilhouette:E,containsPoint:v,copy:p,create:g,distanceToSilhouette:function(t,e){const n=(0,a.b)(_.WM.get(),e,t),i=(0,a.p)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(i-r))},elevate:function(t,e,n){return t!==n&&(0,a.c)(n,t),n[3]=t[3]+e,n},fromCenterAndRadius:function(t,e){return(0,l.f)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:function(t,e,n,i){return(0,l.f)(t,e,n,i)},getCenter:O,getRadius:T,intersectRay:A,intersectRayClosestSilhouette:function(t,e,n){if(A(t,e,n))return n;const i=E(t,e,_.WM.get());return(0,a.a)(n,e.origin,(0,a.g)(_.WM.get(),e.direction,(0,a.i)(e.origin,i)/(0,a.l)(e.direction))),n},intersectsRay:S,projectPoint:b,setAltitudeAt:function(t,e,n,r){const s=M(t,e),o=y(t,e,i.Z,F),c=(0,a.g)(F,o,n-s);return(0,a.a)(r,e,c)},setExtent:function(t,e,n){return s.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t===n?n:p(t,n)},tmpSphere:L,wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function i(){return[0,0]}function r(t,e){return[t,e]}function s(t,e){return new Float64Array(t,e,2)}function o(){return r(1,1)}function c(){return r(1,0)}function a(){return r(0,1)}n.d(e,{a:()=>i,c:()=>s,f:()=>r});const u=o(),h=c(),l=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:l,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:i,createView:s,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let i=0;i<n;++i)e[i]=t[i];return e},fromValues:r,ones:o,unitX:c,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},69801:(t,e,n)=>{n.d(e,{WJ:()=>c,Xq:()=>o});var i,r,s=n(44553);(r=i||(i={}))[r.ALL=0]="ALL",r[r.SOME=1]="SOME";class o{constructor(t,e,n){this._namespace=t,this._storage=e,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",n&&(this._storage.registerRemoveFunc(this._namespace,n),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(t,e,n,i=0){this._storage.put(this._namespace+t,e,n,i)}get(t){const e=this._storage.get(this._namespace+t);return void 0===e?++this._miss:++this._hit,e}pop(t){const e=this._storage.pop(this._namespace+t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,n){this._storage.updateSize(this._namespace+t,e,n)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class c{constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new s.Z,this._users=new s.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get size(){return this._size}get sizeMB(){return this._size/1024/1024}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimit()}put(t,e,n,r){const s=this._db.get(t);if(s&&(this._size-=s.size,this._db.delete(t),s.entry!==e&&this._notifyRemove(t,s.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,e,i.ALL);if(void 0===e)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const o=1+Math.max(r,-3)- -3;this._db.set(t,{entry:e,size:n,lifetime:o,lives:o}),this._size+=n,this._checkSizeLimit()}updateSize(t,e,n){const r=this._db.get(t);if(r&&r.entry===e){for(this._size-=r.size;n>this._maxSize;){const r=this._notifyRemove(t,e,i.SOME);if(!(null!=r&&r>0))return void this._db.delete(t);n=r}r.size=n,this._size+=n,this._checkSizeLimit()}}pop(t){const e=this._db.get(t);if(e)return this._size-=e.size,this._db.delete(t),++this._hit,e.entry;++this._miss}get(t){const e=this._db.get(t);if(void 0!==e)return this._db.delete(t),e.lives=e.lifetime,this._db.set(t,e),++this._hit,e.entry;++this._miss}getStats(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},n=new Array;this._db.forEach(((t,i)=>{const r=t.lifetime;n[r]=(n[r]||0)+t.size,this._users.forAll((n=>{const r=n.namespace;if(i.startsWith(r)){const n=e[r]||0;e[r]=n+t.size}}))}));const i={};this._users.forAll((t=>{const n=t.namespace;if(!isNaN(t.hitRate)&&t.hitRate>0){const r=e[n]||0;e[n]=r,i[n]=Math.round(100*t.hitRate)+"%"}else i[n]="0%"}));const r=Object.keys(e);r.sort(((t,n)=>e[n]-e[t])),r.forEach((n=>t[n]=Math.round(e[n]/2**20)+"MB / "+i[n]));for(let e=n.length-1;e>=0;--e){const i=n[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this.size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){this._db.forEach(((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,i.ALL))}))}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,n){let i;return this._removeFuncs.some((r=>{if(t.startsWith(r[0])){const t=r[1](e,n);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[t,e]of this._db){if(this._db.delete(t),e.lives<=1){this._size-=e.size;const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e);if(this._size<=.9*this.maxSize)return}}}},22807:(t,e,n)=>{n.d(e,{x:()=>r});var i=n(41213);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.Y)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,s));t++)this._items.push(this._allocator())}}const s=1024},43090:(t,e,n)=>{function i(t){return 32+t.length}function r(t){if(!t)return 0;let e=a;for(const n in t)if(t.hasOwnProperty(n)){const r=t[n];switch(typeof r){case"string":e+=i(r);break;case"number":e+=16;break;case"boolean":e+=4}}return e}function s(t){if(!t)return 0;if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return 32+8*e;let n=u;for(let i=0;i<e;i++)n+=o(t[i]);return n}(t);let e=a;for(const n in t)t.hasOwnProperty(n)&&(e+=o(t[n]));return e}function o(t){switch(typeof t){case"object":return s(t);case"string":return i(t);case"number":return 16;case"boolean":return 4;default:return 8}}function c(t,e){return u+t.length*e}n.d(e,{Ul:()=>s,Y8:()=>h,do:()=>c,f2:()=>r});const a=32,u=32;var h;!function(t){t[t.KILOBYTES=1024]="KILOBYTES",t[t.MEGABYTES=1048576]="MEGABYTES",t[t.GIGABYTES=1073741824]="GIGABYTES"}(h||(h={}))},16996:(t,e,n)=>{n.d(e,{Ue:()=>a,nF:()=>h,zk:()=>u});var i=n(22021),r=n(22807),s=n(17896),o=n(65617),c=n(12981);function a(t){return t?{origin:(0,o.a)(t.origin),vector:(0,o.a)(t.vector)}:{origin:(0,o.c)(),vector:(0,o.c)()}}function u(t,e,n=a()){return(0,s.c)(n.origin,t),(0,s.b)(n.vector,e,t),n}function h(t,e,n){return function(t,e,n,r,o){const{vector:a,origin:u}=t,h=(0,s.b)(c.WM.get(),e,u),l=(0,s.e)(a,h)/(0,s.p)(a);return(0,s.g)(o,a,(0,i.uZ)(l,0,1)),(0,s.a)(o,o,t.origin)}(t,e,0,0,n)}(0,o.c)(),(0,o.c)(),new r.x((()=>a()))},47545:(t,e,n)=>{n.d(e,{d:()=>s});var i=n(22021),r=n(24882);function s(t,e,n){const s=Array.isArray(t),h=s?t.length/e:t.byteLength/(4*e),l=s?t:new Uint32Array(t,0,h*e),f=n?.minReduction??0,d=n?.originalIndices||null,_=d?d.length:0,m=n?.componentOffsets||null;let g=0;if(m)for(let t=0;t<m.length-1;t++){const e=m[t+1]-m[t];e>g&&(g=e)}else g=h;const p=Math.floor(1.1*g)+1;(null==u||u.length<2*p)&&(u=new Uint32Array((0,i.Sf)(2*p)));for(let t=0;t<2*p;t++)u[t]=0;let T=0;const O=!!m&&!!d,A=O?_:h;let N=(0,r.$z)(h);const S=new Uint32Array(_),E=1.96;let b=0!==f?Math.ceil(4*E*E/(f*f)*f*(1-f)):A,R=1,I=m?m[1]:A;for(let t=0;t<A;t++){if(t===b){const e=1-T/t;if(e+E*Math.sqrt(e*(1-e)/t)<f)return null;b*=2}if(t===I){for(let t=0;t<2*p;t++)u[t]=0;if(d)for(let t=m[R-1];t<m[R];t++)S[t]=N[d[t]];I=m[++R]}const n=O?d[t]:t,i=n*e,r=a(l,i,e);let s=r%p,c=T;for(;0!==u[2*s+1];){if(u[2*s]===r){const t=u[2*s+1]-1;if(o(l,i,t*e,e)){c=N[t];break}}s++,s>=p&&(s-=p)}c===T&&(u[2*s]=r,u[2*s+1]=n+1,T++),N[n]=c}if(0!==f&&1-T/h<f)return null;if(O){for(let t=m[R-1];t<S.length;t++)S[t]=N[d[t]];N=(0,r.mi)(S)}const y=s?new Array(T):new Uint32Array(T*e);T=0;for(let t=0;t<A;t++)N[t]===T&&(c(l,(O?d[t]:t)*e,y,T*e,e),T++);if(d&&!O){const t=new Uint32Array(_);for(let e=0;e<t.length;e++)t[e]=N[d[e]];N=(0,r.mi)(t)}return{buffer:Array.isArray(y)?y:y.buffer,indices:N,uniqueCount:T}}function o(t,e,n,i){for(let r=0;r<i;r++)if(t[e+r]!==t[n+r])return!1;return!0}function c(t,e,n,i,r){for(let s=0;s<r;s++)n[i+s]=t[e+s]}function a(t,e,n){let i=0;for(let r=0;r<n;r++)i=t[e+r]+i|0,i=i+(i<<11)+(i>>>2)|0;return i>>>0}let u=null},16306:(t,e,n)=>{n.d(e,{aX:()=>S});var i=n(68773),r=n(20102),s=n(92604),o=n(38913),c=n(58901),a=n(73913),u=n(8744),h=n(40488),l=(n(66577),n(3172)),f=n(33955),d=n(11282),_=n(17452);async function m(t,e,n){const i="string"==typeof t?(0,_.mN)(t):t,r=e[0].spatialReference,s=(0,f.Ji)(e[0]),o={...n,query:{...i.query,f:"json",sr:r.wkid??JSON.stringify(r),geometries:JSON.stringify((a=e,{geometryType:(0,f.Ji)(a[0]),geometries:a.map((t=>t.toJSON()))}))}},{data:c}=await(0,l.default)(i.path+"/simplify",o);var a;return function(t,e,n){const i=(0,f.q9)(e);return t.map((t=>{const e=i.fromJSON(t);return e.spatialReference=n,e}))}(c.geometries,s,r)}const g=s.Z.getLogger("esri.geometry.support.normalizeUtils");function p(t){return"polygon"===t[0].type}function T(t){return"polyline"===t[0].type}function O(t,e,n){if(e){const e=function(t,e){if(!(t instanceof c.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw g.error(t),new r.Z(t)}const n=(0,a.x3)(t),i=[];for(const t of n){const n=[];i.push(n),n.push([t[0][0],t[0][1]]);for(let i=0;i<t.length-1;i++){const r=t[i][0],s=t[i][1],o=t[i+1][0],c=t[i+1][1],a=Math.sqrt((o-r)*(o-r)+(c-s)*(c-s)),u=(c-s)/a,h=(o-r)/a,l=a/e;if(l>1){for(let t=1;t<=l-1;t++){const i=t*e,o=h*i+r,c=u*i+s;n.push([o,c])}const t=(a+Math.floor(l-1)*e)/2,i=h*t+r,o=u*t+s;n.push([i,o])}n.push([o,c])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:i,spatialReference:t.spatialReference}):new c.Z({paths:i,spatialReference:t.spatialReference})}(t,1e6);t=(0,h.Sx)(e,!0)}return n&&(t=(0,a.Sy)(t,n)),t}function A(t,e,n){if(Array.isArray(t)){const i=t[0];if(i>e){const n=(0,a.XZ)(i,e);t[0]=i+n*(-2*e)}else if(i<n){const e=(0,a.XZ)(i,n);t[0]=i+e*(-2*n)}}else{const i=t.x;if(i>e){const n=(0,a.XZ)(i,e);t=t.clone().offset(n*(-2*e),0)}else if(i<n){const e=(0,a.XZ)(i,n);t=t.clone().offset(e*(-2*n),0)}}return t}function N(t,e){let n=-1;for(let i=0;i<e.cutIndexes.length;i++){const r=e.cutIndexes[i],s=e.geometries[i],o=(0,a.x3)(s);for(let t=0;t<o.length;t++){const e=o[t];e.some((n=>{if(n[0]<180)return!0;{let n=0;for(let t=0;t<e.length;t++){const i=e[t][0];n=i>n?i:n}n=Number(n.toFixed(9));const i=-360*(0,a.XZ)(n,180);for(let n=0;n<e.length;n++){const e=s.getPoint(t,n);s.setPoint(t,n,e.clone().offset(i,0))}return!0}}))}if(r===n){if(p(t))for(const e of(0,a.x3)(s))t[r]=t[r].addRing(e);else if(T(t))for(const e of(0,a.x3)(s))t[r]=t[r].addPath(e)}else n=r,t[r]=s}return t}async function S(t,e,n){if(!Array.isArray(t))return S([t],e);e&&"string"!=typeof e&&g.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof e?e:e?.url??i.Z.geometryServiceUrl;let s,_,p,T,E,b,R,I,y=0;const M=[],v=[];for(const e of t)if(null!=e)if(s||(s=e.spatialReference,_=(0,u.C5)(s),p=s.isWebMercator,b=p?102100:4326,T=a.UZ[b].maxX,E=a.UZ[b].minX,R=a.UZ[b].plus180Line,I=a.UZ[b].minus180Line),_)if("mesh"===e.type)v.push(e);else if("point"===e.type)v.push(A(e.clone(),T,E));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>A(t,T,E))),v.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,_);v.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,n=(0,a.XZ)(t.xmin,E)*(2*T);let i=0===n?e.clone():(0,a.Sy)(e.clone(),n);t.offset(n,0),t.intersects(R)&&t.xmax!==T?(y=t.xmax>y?t.xmax:y,i=O(i,p),M.push(i),v.push("cut")):t.intersects(I)&&t.xmin!==E?(y=t.xmax*(2*T)>y?t.xmax*(2*T):y,i=O(i,p,360),M.push(i),v.push("cut")):v.push(i)}else v.push(e.clone());else v.push(e);else v.push(e);let F=(0,a.XZ)(y,T),L=-90;const w=F,x=new c.Z;for(;F>0;){const t=360*F-180;x.addPath([[t,L],[t,-1*L]]),L*=-1,F--}if(M.length>0&&w>0){const e=N(M,await async function(t,e,n,i){const r=(0,d.en)(t),s=e[0].spatialReference,o={...i,query:{...r.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,f.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(n)}},c=await(0,l.default)(r.path+"/cut",o),{cutIndexes:a,geometries:u=[]}=c.data;return{cutIndexes:a,geometries:u.map((t=>{const e=(0,f.im)(t);return e.spatialReference=s,e}))}}(r,M,x,n)),i=[],s=[];for(let n=0;n<v.length;n++){const r=v[n];if("cut"!==r)s.push(r);else{const r=e.shift(),o=t[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(i.push(r),s.push("simplify")):s.push(p?(0,h.$)(r):r)}}if(!i.length)return s;const o=await m(r,i,n),c=[];for(let t=0;t<s.length;t++){const e=s[t];"simplify"!==e?c.push(e):c.push(p?(0,h.$)(o.shift()):o.shift())}return c}const P=[];for(let t=0;t<v.length;t++){const e=v[t];if("cut"!==e)P.push(e);else{const t=M.shift();P.push(!0===p?(0,h.$)(t):t)}}return P}},73913:(t,e,n)=>{n.d(e,{Sy:()=>a,UZ:()=>o,XZ:()=>c,x3:()=>u});var i=n(58901),r=n(82971),s=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:r.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:r.Z.WGS84})}};function c(t,e){return Math.ceil((t-e)/(2*e))}function a(t,e){const n=u(t);for(const t of n)for(const n of t)n[0]+=e;return t}function u(t){return(0,s.oU)(t)?t.rings:t.paths}},62073:(t,e,n)=>{n(22021),n(17896);var i,r,s=n(65617);n(29268),n(61277),n(12981),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(0,s.c)(),(r=i||(i={}))[r.NONE=0]="NONE",r[r.CLAMP=1]="CLAMP",r[r.INFINITE_MIN=4]="INFINITE_MIN",r[r.INFINITE_MAX=8]="INFINITE_MAX",i.INFINITE_MIN,i.INFINITE_MAX,i.INFINITE_MAX},78341:(t,e,n)=>{n.d(e,{JI:()=>u,Ue:()=>o,re:()=>a}),n(67676);var i=n(22807),r=n(17896),s=n(65617);function o(t){return t?c((0,s.a)(t.origin),(0,s.a)(t.direction)):c((0,s.c)(),(0,s.c)())}function c(t,e){return{origin:t,direction:e}}function a(t,e){const n=h.get();return n.origin=t,n.direction=e,n}function u(t,e,n){const i=(0,r.e)(t.direction,(0,r.b)(n,e,t.origin));return(0,r.a)(n,t.origin,(0,r.g)(n,t.direction,i)),n}n(12981);const h=new i.x((()=>o()))},61277:(t,e,n)=>{n.d(e,{EU:()=>o});var i=n(22021),r=n(17896),s=n(65617);function o(t,e){const n=(0,r.e)(t,e)/((0,r.l)(t)*(0,r.l)(e));return-(0,i.ZF)(n)}(0,s.c)(),(0,s.c)()},12981:(t,e,n)=>{n.d(e,{MP:()=>_,WM:()=>d});var i=n(43090),r=n(41213),s=n(46521),o=n(13598),c=n(94961),a=n(97323),u=n(65617),h=n(88669);class l{constructor(t,e,n){this._itemByteSize=t,this._itemCreate=e,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(n/this._itemByteSize)}get(){0===this._itemsPtr&&(0,r.Y)((()=>this._reset()));const t=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=t;){const t=new ArrayBuffer(this._itemsPerBuffer*this._itemByteSize);for(let e=0;e<this._itemsPerBuffer;++e)this._items.push(this._itemCreate(t,e*this._itemByteSize));this._buffers.push(t)}return this._items[this._itemsPtr++]}_reset(){const t=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>t;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(t=f){return new l(16,a.c,t)}static createVec3f64(t=f){return new l(24,u.b,t)}static createVec4f64(t=f){return new l(32,h.a,t)}static createMat3f64(t=f){return new l(72,s.a,t)}static createMat4f64(t=f){return new l(128,o.a,t)}static createQuatf64(t=f){return new l(32,c.c,t)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this._itemByteSize}}}const f=4*i.Y8.KILOBYTES,d=(l.createVec2f64(),l.createVec3f64()),_=(l.createVec4f64(),l.createMat3f64(),l.createMat4f64());l.createQuatf64()},11282:(t,e,n)=>{n.d(e,{cv:()=>c,en:()=>o,lA:()=>s}),n(68773),n(40330);var i=n(22974),r=n(17452);function s(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,r.mN)(t):(0,i.d9)(t)}function c(t,e,n){const i={};for(const r in t){if("declaredClass"===r)continue;const s=t[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){i[r]=[];for(let t=0;t<s.length;t++)i[r][t]=c(s[t])}else if("object"==typeof s)if(s.toJSON){const t=s.toJSON(n&&n[r]);i[r]=e?t:JSON.stringify(t)}else i[r]=e?s:JSON.stringify(s);else i[r]=s}return i}n(71058)},5329:(t,e,n)=>{n.d(e,{K:()=>s});var i=n(35371),r=n(21968);function s(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).filter((e=>{const n=t.fields.get(e)?.optional;return!(n&&n.glPadding)})).map((i=>{const s=t.fields.get(i),c=s.constructor.ElementCount,a=o(s.constructor.ElementType),u=s.offset,h=!(!s.optional||!s.optional.glNormalized);return new r.G(i,c,a,u,n,h,e)}))}function o(t){const e=c[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const c={u8:i.g.UNSIGNED_BYTE,u16:i.g.UNSIGNED_SHORT,u32:i.g.UNSIGNED_INT,i8:i.g.BYTE,i16:i.g.SHORT,i32:i.g.INT,f32:i.g.FLOAT}},35065:(t,e,n)=>{var i;n.d(e,{T:()=>i}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.AUXPOS1="auxpos1",t.AUXPOS2="auxpos2",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.SUBDIVISIONFACTOR="subdivisionFactor",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.FEATUREVALUE="featureValue",t.MODELORIGINHI="modelOriginHi",t.MODELORIGINLO="modelOriginLo",t.MODEL="model",t.MODELNORMAL="modelNormal",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.NORMALA="normalA",t.NORMALB="normalB",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.U8PADDING="u8padding",t.U16PADDING="u16padding",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.OBJECTANDLAYERIDCOLOR_INSTANCED="objectAndLayerIdColor_instanced"}(i||(i={}))},17288:(t,e,n)=>{n.d(e,{Hr:()=>h,dG:()=>u,tf:()=>o});var i=n(5329),r=n(65576),s=n(35065);const o=(0,r.U$)().vec3f(s.T.POSITION).u16(s.T.COMPONENTINDEX).u16(s.T.U16PADDING),c=(0,r.U$)().vec2u8(s.T.SIDENESS),a=((0,i.K)(c),(0,r.U$)().vec3f(s.T.POSITION0).vec3f(s.T.POSITION1).u16(s.T.COMPONENTINDEX).u8(s.T.VARIANTOFFSET,{glNormalized:!0}).u8(s.T.VARIANTSTROKE).u8(s.T.VARIANTEXTENSION,{glNormalized:!0}).u8(s.T.U8PADDING,{glPadding:!0}).u16(s.T.U16PADDING,{glPadding:!0})),u=a.clone().vec3f(s.T.NORMAL),h=a.clone().vec3f(s.T.NORMALA).vec3f(s.T.NORMALB);new Map([[s.T.POSITION0,0],[s.T.POSITION1,1],[s.T.COMPONENTINDEX,2],[s.T.VARIANTOFFSET,3],[s.T.VARIANTSTROKE,4],[s.T.VARIANTEXTENSION,5],[s.T.NORMAL,6],[s.T.NORMALA,6],[s.T.NORMALB,7],[s.T.SIDENESS,8]])},97411:(t,e,n)=>{n.d(e,{n:()=>h});var i=n(67676),r=n(22021),s=n(17896),o=n(65617);const c=-1;var a,u;function h(t,e,n,o=p){const a=t.vertices.position,u=t.vertices.componentIndex,h=(0,r.Vl)(o.anglePlanar),g=(0,r.Vl)(o.angleSignificantEdge),T=Math.cos(g),O=Math.cos(h),A=m.edge,N=A.position0,S=A.position1,E=A.faceNormal0,b=A.faceNormal1,R=_(t),I=function(t){const e=t.faces.length/3,n=t.faces,i=t.neighbors;let r=0;for(let t=0;t<e;t++){const e=i[3*t],s=i[3*t+1],o=i[3*t+2],a=n[3*t],u=n[3*t+1],h=n[3*t+2];r+=e===c||a<u?1:0,r+=s===c||u<h?1:0,r+=o===c||h<a?1:0}const s=new Int32Array(4*r);let o=0;for(let t=0;t<e;t++){const e=i[3*t],r=i[3*t+1],a=i[3*t+2],u=n[3*t],h=n[3*t+1],l=n[3*t+2];(e===c||u<h)&&(s[o++]=u,s[o++]=h,s[o++]=t,s[o++]=e),(r===c||h<l)&&(s[o++]=h,s[o++]=l,s[o++]=t,s[o++]=r),(a===c||l<u)&&(s[o++]=l,s[o++]=u,s[o++]=t,s[o++]=a)}return s}(t),y=I.length/4,M=e.allocate(y);let v=0;const F=y,L=n.allocate(F);let w=0,x=0,P=0;const z=(0,i.w6)(0,y),B=new Float32Array(y);B.forEach(((t,e,n)=>{a.getVec(I[4*e],N),a.getVec(I[4*e+1],S),n[e]=(0,s.i)(N,S)})),z.sort(((t,e)=>B[e]-B[t]));const C=new Array,D=new Array;for(let t=0;t<y;t++){const i=z[t],r=B[i],o=I[4*i],_=I[4*i+1],m=I[4*i+2],g=I[4*i+3],p=g===c;if(a.getVec(o,N),a.getVec(_,S),p)(0,s.s)(E,R[3*m],R[3*m+1],R[3*m+2]),(0,s.c)(b,E),A.componentIndex=u.get(o),A.cosAngle=(0,s.e)(E,b);else{if((0,s.s)(E,R[3*m],R[3*m+1],R[3*m+2]),(0,s.s)(b,R[3*g],R[3*g+1],R[3*g+2]),A.componentIndex=u.get(o),A.cosAngle=(0,s.e)(E,b),f(A,O))continue;A.cosAngle<-.9999&&(0,s.c)(b,E)}x+=r,P++,p||l(A,T)?(e.write(M,v++,A),C.push(r)):d(A,h)&&(n.write(L,w++,A),D.push(r))}const j=new Float32Array(C.reverse()),U=new Float32Array(D.reverse());return{regular:{instancesData:e.trim(M,v),lodInfo:{lengths:j}},silhouette:{instancesData:n.trim(L,w),lodInfo:{lengths:U}},averageEdgeLength:x/P}}function l(t,e){return t.cosAngle<e}function f(t,e){return t.cosAngle>e}function d(t,e){const n=(0,r.ZF)(t.cosAngle),i=m.fwd,o=m.ortho;return(0,s.r)(i,t.position1,t.position0),n*((0,s.e)((0,s.f)(o,t.faceNormal0,t.faceNormal1),i)>0?-1:1)>e}function _(t){const e=t.faces.length/3,n=t.vertices.position,i=t.faces,r=g.v0,o=g.v1,c=g.v2,a=new Float32Array(3*e);for(let t=0;t<e;t++){const e=i[3*t],u=i[3*t+1],h=i[3*t+2];n.getVec(e,r),n.getVec(u,o),n.getVec(h,c),(0,s.b)(o,o,r),(0,s.b)(c,c,r),(0,s.f)(r,o,c),(0,s.n)(r,r),a[3*t]=r[0],a[3*t+1]=r[1],a[3*t+2]=r[2]}return a}(u=a||(a={}))[u.SOLID=0]="SOLID",u[u.SKETCH=1]="SKETCH";const m={edge:{position0:(0,o.c)(),position1:(0,o.c)(),faceNormal0:(0,o.c)(),faceNormal1:(0,o.c)(),componentIndex:0,cosAngle:0},ortho:(0,o.c)(),fwd:(0,o.c)()},g={v0:(0,o.c)(),v1:(0,o.c)(),v2:(0,o.c)()},p={anglePlanar:4,angleSignificantEdge:35}},212:(t,e,n)=>{n.d(e,{Kl:()=>R,n_:()=>L,kY:()=>I,Yr:()=>F});var i=n(47545);function r(t,e,n){const i=e/3,r=new Uint32Array(n+1),s=new Uint32Array(n+1),o=(t,e)=>{t<e?r[t+1]++:s[e+1]++};for(let e=0;e<i;e++){const n=t[3*e],i=t[3*e+1],r=t[3*e+2];o(n,i),o(i,r),o(r,n)}let c=0,a=0;for(let t=0;t<n;t++){const e=r[t+1],n=s[t+1];r[t+1]=c,s[t+1]=a,c+=e,a+=n}const u=new Uint32Array(6*i),h=r[n],l=(t,e,n)=>{if(t<e){const i=r[t+1]++;u[2*i]=e,u[2*i+1]=n}else{const i=s[e+1]++;u[2*h+2*i]=t,u[2*h+2*i+1]=n}};for(let e=0;e<i;e++){const n=t[3*e],i=t[3*e+1],r=t[3*e+2];l(n,i,e),l(i,r,e),l(r,n,e)}const f=(t,e)=>{const n=2*t,i=e-t;for(let t=1;t<i;t++){const e=u[n+2*t],i=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]=i}};for(let t=0;t<n;t++)f(r[t],r[t+1]),f(h+s[t],h+s[t+1]);const d=new Int32Array(3*i),_=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,m=(t,e)=>{const n=_(t,e);d[3*e+n]=-1},g=(t,e,n,i)=>{const r=_(t,e);d[3*e+r]=i;const s=_(n,i);d[3*i+s]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let i=s[t];const o=s[t+1];for(;e<n&&i<o;){const n=u[2*e],r=u[2*h+2*i];n===r?(g(t,u[2*e+1],r,u[2*h+2*i+1]),e++,i++):n<r?(m(t,u[2*e+1]),e++):(m(r,u[2*h+2*i+1]),i++)}for(;e<n;)m(t,u[2*e+1]),e++;for(;i<o;)m(u[2*h+2*i],u[2*h+2*i+1]),i++}return d}var s=n(65576),o=n(35065),c=n(17288),a=n(77734),u=n(17896),h=n(65617),l=n(5329);class f{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?p:g}write(t,e,n){const i=this._edgeHashFunction(n);E.seed=i;const r=E.getIntRange(0,255),s=E.getIntRange(0,this.settings.variants-1),o=E.getFloat(),c=255*(.5*function(t,e){const n=t<0?-1:1;return Math.abs(t)**1.2*n}(-(1-Math.min(o/.7,1))+Math.max(0,o-.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,r),t.variantStroke.set(e,s),t.variantExtension.set(e,c)}trim(t,e){return t.slice(0,e)}}const d=new Float32Array(6),_=new Uint32Array(d.buffer),m=new Uint32Array(1);function g(t){const e=d;e[0]=t.position0[0],e[1]=t.position0[1],e[2]=t.position0[2],e[3]=t.position1[0],e[4]=t.position1[1],e[5]=t.position1[2],m[0]=5381;for(let t=0;t<_.length;t++)m[0]=31*m[0]+_[t];return m[0]}function p(t){const e=d;e[0]=O(t.position0[0]),e[1]=O(t.position0[1]),e[2]=O(t.position0[2]),e[3]=O(t.position1[0]),e[4]=O(t.position1[1]),e[5]=O(t.position1[2]),m[0]=5381;for(let t=0;t<_.length;t++)m[0]=31*m[0]+_[t];return m[0]}const T=1e4;function O(t){return Math.round(t*T)/T}class A{constructor(){this._commonWriter=new f}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.dG.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.a)(S,n.faceNormal0,n.faceNormal1),(0,u.n)(S,S),t.normal.setVec(e,S)}trim(t,e){return this._commonWriter.trim(t,e)}}A.Layout=c.dG,A.glLayout=(0,l.K)(c.dG,1);class N{constructor(){this._commonWriter=new f}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.Hr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),t.normalA.setVec(e,n.faceNormal0),t.normalB.setVec(e,n.faceNormal1)}trim(t,e){return this._commonWriter.trim(t,e)}}N.Layout=c.Hr,N.glLayout=(0,l.K)(c.Hr,1);const S=(0,h.c)(),E=new a.Z;var b=n(97411);function R(t){const e=I(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return M.updateSettings(t.writerSettings),v.updateSettings(t.writerSettings),(0,b.n)(e,M,v)}function I(t,e,n,s){if(e){const e=r(n,s,t.count);return new y(n,s,e,t)}const o=(0,i.d)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:s}),a=r(o.indices,s,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:a,vertices:c.tf.createView(o.buffer)}}class y{constructor(t,e,n,i){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=i}}const M=new A,v=new N,F=(0,s.U$)().vec3f(o.T.POSITION0).vec3f(o.T.POSITION1),L=(0,s.U$)().vec3f(o.T.POSITION0).vec3f(o.T.POSITION1).u16(o.T.COMPONENTINDEX).u16(o.T.U16PADDING,{glPadding:!0})},73248:(t,e,n)=>{n.r(e),n.d(e,{default:()=>tt});var i,r,s,o,c=n(43697),a=n(95330),u=(n(92604),n(75215),n(67676),n(80442),n(20102),n(52011)),h=n(17896),l=n(65617),f=n(16996),d=n(29268),_=n(26993),m=n(71143),g=n(44553),p=n(22807),T=(n(52138),n(98766),n(88669)),O=n(78341);function A(t){return t?{ray:(0,O.Ue)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,O.Ue)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<s.NUM;n++){const i=t[n];if(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]>=e[3])return!1}return!0}new p.x((()=>A())),n(62073),n(12981),function(t){t[t.LEFT=0]="LEFT",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.TOP=3]="TOP",t[t.NEAR=4]="NEAR",t[t.FAR=5]="FAR"}(i||(i={})),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,function(t){t[t.NUM=6]="NUM"}(s||(s={})),function(t){t[t.NUM=8]="NUM"}(o||(o={})),(0,T.f)(-1,-1,-1,1),(0,T.f)(1,-1,-1,1),(0,T.f)(1,1,-1,1),(0,T.f)(-1,1,-1,1),(0,T.f)(-1,-1,1,1),(0,T.f)(1,-1,1,1),(0,T.f)(1,1,1,1),(0,T.f)(-1,1,1,1),new p.x(A),(0,l.c)(),(0,l.c)(),(0,l.c)(),(0,l.c)(),(0,l.c)(),(0,l.c)(),(0,l.c)(),(0,l.c)();var S,E,b=n(11726);class R{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 I,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),I.clearPool(),C[0]=null,G.prune(),q.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=I.acquire();for(let i=0;i<e;i++){const e=t[i];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}I.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=I.acquire();for(const i of t){const t=null!=e?e:(0,d.j)(this.objectToBoundingSphere(i),Z);x(t[3])?(n.init(this._root),this._remove(i,t,n)):this._degenerateObjects.delete(i)}I.release(n),this._shrink()}update(t,e){if(!x(e[3])&&this._isDegenerate(t))return;const n=function(t){return C[0]=t,C}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const i=(0,O.re)(t,e);this._forEachNode(this._root,(t=>{if(!this._intersectsNode(i,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(i,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(i,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,i){const r=(0,O.re)(t,e);this._forEachNode(this._root,(t=>{if(!this._intersectsNodeWithOffset(r,t,i))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,i)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,i)&&n(t)})),!0}))}forEach(t){this._forEachNode(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,i=(()=>!0),r=1/0){let s=1/0,o=1/0,c=null;const a=L(t,e),u=a=>{if(--r,!i(a))return;const u=this.objectToBoundingSphere(a);if(!N(n,u))return;const h=w(t,e,(0,d.g)(u)),l=h-u[3],f=h+u[3];l<s&&(s=l,o=f,c=a)};return this._forEachNodeDepthOrdered(this._root,(i=>{if(r<=0||!N(n,i.bounds))return!1;if((0,h.g)(j,a,i.halfSize),(0,h.a)(j,j,i.bounds),w(t,e,j)>o)return!1;const s=i.node;return s.terminals.forAll((t=>u(t))),null!==s.residents&&s.residents.forAll((t=>u(t))),!0}),t,e),c}forEachInDepthRange(t,e,n,i,r,s,o){let c=-1/0,a=1/0;const u={setRange:t=>{n===R.DepthOrder.FRONT_TO_BACK?(c=Math.max(c,t.near),a=Math.min(a,t.far)):(c=Math.max(c,-t.far),a=Math.min(a,-t.near))}};u.setRange(i);const l=w(e,n,t),f=L(e,n),_=L(e,-n),m=t=>{if(!o(t))return;const i=this.objectToBoundingSphere(t),h=(0,d.g)(i),f=w(e,n,h)-l,_=f-i[3],m=f+i[3];_>a||m<c||!N(s,i)||r(t,u)};this._forEachNodeDepthOrdered(this._root,(t=>{if(!N(s,t.bounds))return!1;if((0,h.g)(j,f,t.halfSize),(0,h.a)(j,j,t.bounds),w(e,n,j)-l>a)return!1;if((0,h.g)(j,_,t.halfSize),(0,h.a)(j,j,t.bounds),w(e,n,j)-l<c)return!1;const i=t.node;return i.terminals.forAll((t=>m(t))),null!==i.residents&&i.residents.forAll((t=>m(t))),!0}),e,n)}forEachNode(t){this._forEachNode(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.e)(e),i=(0,d.g)(e),r=e=>{const r=this.objectToBoundingSphere(e),s=(0,d.e)(r),o=n+s;return!((0,h.d)((0,d.g)(r),i)-o*o<=0)||t(e)};let s=!0;const o=t=>{s&&(s=r(t))};this._forEachNode(this._root,(t=>{const e=(0,d.e)(t.bounds),r=n+e;if((0,h.d)((0,d.g)(t.bounds),i)-r*r>0)return!1;const c=t.node;return c.terminals.forAll(o),s&&null!==c.residents&&c.residents.forAll(o),s})),s&&this.forEachDegenerateObject(o)}_intersectsNode(t,e){return v(e.bounds,2*-e.halfSize,U),v(e.bounds,2*e.halfSize,V),(0,b.yK)(t.origin,t.direction,U,V)}_intersectsNodeWithOffset(t,e,n){return v(e.bounds,2*-e.halfSize,U),v(e.bounds,2*e.halfSize,V),n.applyToMinMax(U,V),(0,b.yK)(t.origin,t.direction,U,V)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const i=this.objectToBoundingSphere(e);return!(i[3]>0)||(0,d.k)(n.applyToBoundingSphere(i),t)}_forEachNode(t,e){let n=I.acquire().init(t);const i=[n];for(;0!==i.length;){if(n=i.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&i.push(I.acquire().init(n).advance(t));I.release(n)}}_forEachNodeDepthOrdered(t,e,n,i=R.DepthOrder.FRONT_TO_BACK){let r=I.acquire().init(t);const s=[r];for(function(t,e,n){if(!q.length)for(let t=0;t<8;++t)q.push({index:0,distance:0});for(let n=0;n<8;++n){const i=P[n];q.data[n].index=n,q.data[n].distance=w(t,e,i)}q.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=q.data[t].index}(n,i,Y);0!==s.length;){if(r=s.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Y[t];r.node.children[e]&&s.push(I.acquire().init(r).advance(e))}I.release(r)}}_remove(t,e,n){G.clear();const i=n.advanceTo(e,((t,e)=>{G.push(t.node),G.push(e)}))?n.node.terminals:n.node.residents;if(i.removeUnordered(t),0===i.length)for(let t=G.length-2;t>=0;t-=2){const e=G.data[t],n=G.data[t+1];if(!this._purge(e,n))break}}_nodeIsEmpty(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}_purge(t,e){return e>=0&&(t.children[e]=null),!!this._nodeIsEmpty(t)&&(null===t.residents&&(t.residents=new g.Z({shrink:!0})),!0)}_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 i=I.acquire().init(t);this._add(e.getItemAt(n),i),I.release(i)}}_grow(t,e){if(0!==e&&(F(t,e,(t=>this.objectToBoundingSphere(t)),H),x(H[3])&&!this._fitsInsideTree(H)))if(this._nodeIsEmpty(this._root.node))(0,d.j)(H,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(H);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(H,t):this._growRootAsSubNode(t),I.release(t)}}_rebuildTree(t,e){(0,h.c)(X,e.bounds),X[3]=e.halfSize,F([t,X],2,(t=>t),k);const n=I.acquire().init(this._root);this._root.initFrom(null,k,k[3]),this._root.increaseHalfSize(1.25),this._forEachNode(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),I.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return this._forEachNode(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 i=-1/0;const r=this._root.bounds,s=this._root.halfSize;for(let t=0;t<3;t++){const o=r[t]-s-(n[t]-e),c=n[t]+e-(r[t]+s),a=Math.max(0,Math.ceil(o/(2*s))),u=Math.max(0,Math.ceil(c/(2*s)))+1,h=2**Math.ceil(Math.log(a+u)*Math.LOG2E);i=Math.max(i,h),W[t].min=a,W[t].max=u}for(let t=0;t<3;t++){let e=W[t].min,n=W[t].max;const o=(i-(e+n))/2;e+=Math.ceil(o),n+=Math.floor(o);const c=r[t]-s-e*s*2;D[t]=c+(n+e)*s}const o=i*s;return D[3]=o*B,I.acquire().initFrom(null,D,o,0)}_growRootAsSubNode(t){const e=this._root.node;(0,h.c)(H,this._root.bounds),H[3]=this._root.halfSize,this._root.init(t),t.advanceTo(H,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,i=0;for(;i<e.length&&null==t;)n=i++,t=e[n];for(;i<e.length;)if(e[i++])return-1;return n}_isDegenerate(t){return!x(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,i=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:i}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),i=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:i}}static fromJSON(t){const e=new R((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 I{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,i=this.depth){return this.node=null!=t?t:I.createEmptyNode(),null!=e&&(0,d.j)(e,this.bounds),this.halfSize=n,this.depth=i,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*B}advance(t){let e=this.node.children[t];e||(e=I.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=P[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 i=this._childIndex(t);e&&e(this,i),this.advance(i)}}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 g.Z({shrink:!0}),residents:new g.Z({shrink:!0})}}static acquire(){return I._pool.acquire()}static release(t){I._pool.release(t)}static clearPool(){I._pool.prune()}}function y(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 M(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 v(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function F(t,e,n,i){if(1===e){const e=n(t[0]);(0,d.j)(e,i)}else{U[0]=1/0,U[1]=1/0,U[2]=1/0,V[0]=-1/0,V[1]=-1/0,V[2]=-1/0;for(let i=0;i<e;i++){const e=n(t[i]);x(e[3])&&(y(U,e),M(V,e))}(0,h.h)(i,U,V,.5),i[3]=Math.max(V[0]-U[0],V[1]-U[1],V[2]-U[2])/2}}function L(t,e){let n,i=1/0;for(let r=0;r<8;++r){const s=w(t,e,z[r]);s<i&&(i=s,n=z[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function x(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I._pool=new m.Z(I),S=R||(R={}),(E=S.DepthOrder||(S.DepthOrder={}))[E.FRONT_TO_BACK=1]="FRONT_TO_BACK",E[E.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const P=[(0,l.f)(-1,-1,-1),(0,l.f)(1,-1,-1),(0,l.f)(-1,1,-1),(0,l.f)(1,1,-1),(0,l.f)(-1,-1,1),(0,l.f)(1,-1,1),(0,l.f)(-1,1,1),(0,l.f)(1,1,1)],z=[(0,l.f)(-1,-1,-1),(0,l.f)(-1,-1,1),(0,l.f)(-1,1,-1),(0,l.f)(-1,1,1),(0,l.f)(1,-1,-1),(0,l.f)(1,-1,1),(0,l.f)(1,1,-1),(0,l.f)(1,1,1)],B=Math.sqrt(3),C=[null],D=(0,d.c)(),j=(0,l.c)(),U=(0,l.c)(),V=(0,l.c)(),G=new g.Z,Z=(0,d.c)(),H=(0,d.c)(),X=(0,d.c)(),k=(0,d.c)(),W=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],q=new g.Z,Y=[0,0,0,0,0,0,0,0],J=R;var K=n(212);function $(t,e,n){const i=(0,d.c)(),r=(0,d.g)(i);return(0,h.A)(r,r,t,.5),(0,h.A)(r,r,e,.5),i[3]=(0,h.i)(r,t),(0,h.a)(r,r,n),i}let Q=class{constructor(){this._idToComponent=new Map,this._components=new J((t=>t.bounds)),this._edges=new J((t=>t.bounds)),this._tmpLineSegment=(0,f.Ue)(),this._tmpP1=(0,l.c)(),this._tmpP2=(0,l.c)(),this._tmpP3=(0,l.c)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.k_)(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:i}=t;n.push({id:e,uid:i})}return!0}),t.bounds),!n.length)return;const i={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",i,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new et(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=K.n_.createView(t.locations),i=new Array(n.count),r=(0,l.c)(),s=(0,l.c)();for(let o=0;o<n.count;o++){n.position0.getVec(o,r),n.position1.getVec(o,s);const c=$(r,s,t.origin),a=new nt(e,o,c);i[o]=a}this._edges.add(i);const{objectIds:o,origin:c}=t;e.info={locations:n,objectIds:o,origin:c}}_addCandidates(t,e,n){const{info:i}=e.component,{origin:r,objectIds:s}=i,o=i.locations,c=o.position0.getVec(e.index,this._tmpP1),a=o.position1.getVec(e.index,this._tmpP2);(0,h.a)(c,c,r),(0,h.a)(a,a,r);const u=s[o.componentIndex.get(e.index)];this._addEdgeCandidate(t,u,c,a,n),this._addVertexCandidate(t,u,c,n),this._addVertexCandidate(t,u,a,n)}_addEdgeCandidate(t,e,n,i,r){if(!(t.types&_.r.EDGE))return;const s=(0,d.g)(t.bounds),o=(0,f.zk)(n,i,this._tmpLineSegment),c=(0,f.nF)(o,s,this._tmpP3);(0,d.l)(t.bounds,c)&&r.push({type:"edge",objectId:e,target:(0,l.a)(c),distance:(0,h.i)(s,c),start:(0,l.a)(n),end:(0,l.a)(i)})}_addVertexCandidate(t,e,n,i){if(!(t.types&_.r.VERTEX))return;const r=(0,d.g)(t.bounds);(0,d.l)(t.bounds,n)&&i.push({type:"vertex",objectId:e,target:(0,l.a)(n),distance:(0,h.i)(r,n)})}};Q=(0,c._)([(0,u.j)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Q);const tt=Q;class et{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++et.uid}}et.uid=0;class nt{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}}}]);
|