PageSourceSearch

https://wvias.io/assets/MapView-B0_mDJT8.js

js wvias.io collected 2026-10-06 08:08:49 UTC 300,570 bytes, 12 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Popup-1R4l_Rk-.js","assets/tslib.es6-CnN-Fwk4.js","assets/Polyline-DW6h-wJn.js","assets/index-KmHFZaHn.js","assets/index-7pnnsehL.css","assets/reactiveUtils-BlF6Pmvn.js","assets/Graphic-DSMrqGWg.js","assets/SimpleObservable-DP17qGIk.js","assets/intl-Bcp-4HWi.js","assets/throttle-BOkXZD6o.js","assets/signal-CH5txhzj.js","assets/jsxFactory-BH9g0woS.js","assets/uuid-Oe6SV2kF.js","assets/sanitizerUtils-w06oInkp.js","assets/jsxFactory-OCMtRbrJ.css","assets/substitute-C-Oxf4Wq.js","assets/unitFormatUtils-CCb2Hg_s.js","assets/Cyclical-DOe_l4zr.js","assets/quantityUtils-CgqdIStI.js","assets/AttachmentInfo-C44hl360.js","assets/labelingInfo-Drm3YOUn.js","assets/asyncUtils-7ACV11oo.js","assets/Field-fKOmrRCL.js","assets/fieldType-DlaDkgkc.js","assets/Query-D9kFysTu.js","assets/layerUtils-BoD_3T7B.js","assets/SimpleRenderer-sbvfrvSR.js","assets/commonProperties-CZypN-xj.js","assets/colorRamps-CzZ4QQ5X.js","assets/ColorStop-BYmRaDiu.js","assets/visualVariableUtils-BbFCRhsH.js","assets/lengthUtils-DzweXWru.js","assets/jsonUtils-Dy1BjaDF.js","assets/defaults3D-Brmn9E4R.js","assets/defaults-D5k0mtDd.js","assets/defaultsJSON-GKolV7NZ.js","assets/UniqueValueRenderer-DAmLv4Fx.js","assets/diffUtils-BGJ19Qgy.js","assets/RendererLegendOptions-BjpgQdm8.js","assets/styleUtils-BEmO3o9e.js","assets/NormalizationBinParametersMixin-DYU8CXG4.js","assets/labelUtils-UivC-btj.js","assets/featureUtils-CQFzZTdz.js","assets/utils-Ceo91I53.js","assets/mat4f32-Djp3mnm5.js","assets/mat4-DBP7EIB-.js","assets/timeZoneUtils-DN6aZbvZ.js","assets/utils-BVF1mrHQ.js","assets/cimSymbolUtils-bG81yqgo.js","assets/utils-DQaLv0i_.js","assets/defaultCIMValues-XI-Li77m.js","assets/LRUCache-r3Niy73B.js","assets/MemCache-pMqQE_ou.js","assets/typeUtils-Bf1W9bOd.js","assets/ClassBreaksRenderer-DfkeGrqJ.js","assets/DictionaryScriptEvaluator-DNlT3u1Z.js","assets/Version-CjDQUAis.js","assets/FieldsIndex-ksVk7pB3.js","assets/UnknownTimeZone-BrnDYRwY.js","assets/ArcadeExpression-Coiv7Iwx.js","assets/TimeOnly-2p-NA0__.js","assets/enum-CrUKT3EX.js","assets/heatmapUtils-CdPEtASg.js","assets/vec42-DQQnGzkz.js","assets/vec4f64-DPb6J-GU.js","assets/executeQueryJSON-D4Kp4KcH.js","assets/utils-Bjd_5VA7.js","assets/query-C9e7HiHJ.js","assets/normalizeUtils-CYo271-O.js","assets/normalizeUtilsCommon-DMAIKdZS.js","assets/utils-C0K1iZoR.js","assets/pbfQueryUtils-Kf1_pUjf.js","assets/pbf-CHwDnSpW.js","assets/memoryEstimations-BznOzHIF.js","assets/OptimizedFeature-BijZex2k.js","assets/OptimizedFeatureSet-BR8EEvDc.js","assets/queryZScale-CZtOR6Lk.js","assets/projectionUtils-jNyj10e_.js","assets/FeatureSet-Eo012qCW.js","assets/shared-D4AbzkZi.js","assets/isImageryGraphicOrigin-Ccuhb4eK.js","assets/isImageryTileGraphicOrigin-ZR-gBf9D.js","assets/FeatureLayer-CPROb3LQ.js","assets/MultiOriginJSONSupport-KTF4K6vp.js","assets/layerContainerType-CSXZNpHb.js","assets/FormTemplate-Bb14NBiK.js","assets/GraphicOrigin-C5bClsPi.js","assets/workers-D4-64yVt.js","assets/Queue-7iyt6HPX.js","assets/editsZScale-8hfKxxha.js","assets/APIKeyMixin-BdwXNRAI.js","assets/ArcGISService-Cn04l3R5.js","assets/BlendLayer-cqCUb-pU.js","assets/jsonUtils-DHTqhhEY.js","assets/parser-nkazbN3L.js","assets/CustomParametersMixin-DyKfD6fC.js","assets/DisplayFilteredLayer-BMifFAzG.js","assets/scaleUtils-B4oE2sW8.js","assets/displayFilterUtils-CdUTzrfj.js","assets/EditBusLayer-CEoSfL0D.js","assets/FeatureEffectLayer-CSc0U75K.js","assets/FeatureEffect-BjY6MfYy.js","assets/FeatureFilter-CtyGBX-K.js","assets/FeatureLayerBase-BwpqyNOS.js","assets/HeightModelInfo-B5XH6Z3S.js","assets/OperationalLayer-Dx8CKdWf.js","assets/ElevationInfo-Cv1_4QxI.js","assets/LayerFloorInfo-Gy03Zizr.js","assets/multiLayerServiceUtils-CgbyrZFX.js","assets/Relationship-D06Tv1Cx.js","assets/serviceCapabilitiesUtils-DKE7TFEz.js","assets/infoFor3D-DhzudQro.js","assets/portalItemUtils-CiaF67Pt.js","assets/FeatureReductionLayer-D-GaJshP.js","assets/FeatureReductionSelection-3do7swpO.js","assets/jsonUtils-OGaJDuIU.js","assets/MD5-MtSiOt06.js","assets/OrderedLayer-B-8ixm7U.js","assets/OrderByInfo-DFbMMKgF.js","assets/PortalLayer-BiQMVk2q.js","assets/PortalItem-eqAabtRT.js","assets/RefreshableLayer-lOXG3Tkv.js","assets/ScaleRangeLayer-7rb6l2MD.js","assets/TemporalLayer-D428UYj_.js","assets/TimeInfo-DpP14hcm.js","assets/TrackableLayer-DN8s9Mxz.js","assets/FeatureTemplate-DCSP9PiY.js","assets/FeatureType-pcSuPyil.js","assets/fieldProperties-Bq5IXWcF.js","assets/TitleCreator-DzQus5-W.js","assets/versionUtils-CZ9BuMyn.js","assets/styleUtils-DCGE5p_B.js","assets/popupUtils-CaiO3wO1.js","assets/stream
1LayerUtils-DFlbJ4P1.js","assets/ReactiveMap-CsuCZS6M.js","assets/NetworkElement-0-DBodHo.js","assets/ReactiveSet-D7AlTDdE.js","assets/symbolUtils-Dc6WAy-q.js","assets/Tile-Bd1N3Hza.js","assets/TileKey-9jTzoM1T.js","assets/arcadeUtils-62jCBeLc.js","assets/quickselect-QQC62dOK.js","assets/layerViewUtils-BoH0ZXap.js","assets/geometryServiceUtils-CiOQiLPy.js","assets/project-CHyLzgyL.js","assets/webglDeps-Bq0VrpSC.js","assets/BufferObject-C322KNBe.js","assets/Texture-BYJXNxRX.js","assets/enums-DQOO6RKE.js","assets/FramebufferObject-WZRdCrxT.js","assets/ProgramTemplate-BSySHHDp.js","assets/VertexArrayObject-DkAZk8R-.js","assets/VertexAttributeLocations-BfZbt_DV.js","assets/mapViewDeps-y4babLXh.js","assets/colorUtils-Q7HJ_G6f.js","assets/CIMSymbolHelper-CSm3dBZy.js","assets/BidiEngine-BvER9tXK.js","assets/labelPoint-CvyoI-cN.js","assets/GeometryUtils-DzmxWDrc.js","assets/rasterizingUtils-B00kt_eU.js","assets/definitions-Bxxl7NsE.js","assets/vec2f32-CaVKkSa6.js","assets/Rect-CUzevAry.js","assets/BoundingBox-BSOANoLO.js","assets/FeatureCommandQueue-CWfxkTsn.js","assets/GraphShaderModule-CrTkctmq.js","assets/ShaderBuilder-CBqObNOR.js","assets/UpdateTracking2D-DBODoMwI.js","assets/UpdatingHandles-DsbTLrQ3.js","assets/utils-nIxMg67L.js","assets/constants-BBnGEY1d.js","assets/VertexBuffer-B4ygtrgk.js","assets/VertexElementDescriptor-BLyltQyJ.js","assets/WGLContainer-Dfs9hYPQ.js","assets/Utils-DqnoyfEk.js","assets/vec32-DXtZevea.js","assets/vec3f32-WCVSSNPR.js","assets/Container-DnkrN_-D.js","assets/config-BOD8--da.js","assets/earcut-D9gy186-.js","assets/vec2f64-Cgb6qxNH.js","assets/featureConversionUtils-9Yy2WuE3.js","assets/capabilities-Bi6C4OG6.js","assets/QueueProcessor-Dk1cFc2x.js","assets/SDFHelper-UhMoULPC.js","assets/TexturedLineMeshWriter-B6u4VzPi.js","assets/TurboLine-BcbLu_7m.js","assets/OverrideHelper-vQMN_BJZ.js","assets/callExpressionWithFeature-D1jAp3-h.js","assets/quantizationUtils-Q0gOFAyi.js","assets/GridShader-DCUFFe_b.js","assets/CircularArray-CujHzHWW.js","assets/testSVGPremultipliedAlpha-CUDuZskk.js","assets/SymbolFader-DO0FZVhg.js","assets/constants-BHYAGdRm.js","assets/utils-B7HOvzyj.js","assets/Basemap-DRaURAk2.js","assets/loadAll-CNNE0l72.js","assets/isBasemap-Cp_8tW2x.js","assets/writeUtils-DViglhbH.js","assets/CollectionFlattener-3gB25nZF.js","assets/persistable-DOLCtaMm.js","assets/multiOriginJSONSupportUtils-C0wm8_Yw.js","assets/resourceExtension-BQf8hglw.js","assets/PolygonCollection-BaJ4sqC9.js","assets/TablesMixin-DQHyU5fF.js","assets/Camera-DP3KB27i.js","assets/RenderingContext-DrIryJdf.js","assets/renderState-CKc66y4x.js","assets/glsl-B5bJgrnA.js","assets/CIMResourceManager-F40lXk8y.js","assets/imageUtils-BrDobdiB.js","assets/AttributeStore-DfmzS-Lb.js","assets/FeatureStoreQueryAdapter-CVk7IbZG.js","assets/queryUtils-DuAWXY6B.js","assets/timeSupport-DODtaJuH.js","assets/utils-Ddf5mpPs.js","assets/grouping-COzH5_Bh.js","assets/utils-DDjZAYSk.js","assets/MeshWriterRegistry-BD4zlurs.js","assets/projectOperator-B938JRUY.js","assets/operatorProject-Br74X82w.js","assets/SimpleGeometryCursor-B92kdZ15.js","assets/GraphicsView2D-DXVTSAyW.js","assets/FeatureMetadata-D8pw9AnO.js","assets/normalizeUtilsSync-nMY-H1mH.js","assets/dehydratedFeatures-D8c16jGM.js","assets/GraphicContainer-CnOyRhD8.js","assets/AGraphicContainer-DJU71SQ9.js","assets/TechniqueInstance-9JtuOWOA.js","assets/TileContainer-2RxnUBTY.js","assets/requestImageUtils-DcqoOm58.js","assets/gridUtils-DliK2hoY.js","assets/geodesicUtils-Cw2mNlkv.js","assets/GraphicsCollection-DtHg89xU.js","assets/TileInfo-zwYf_2Lz.js","assets/TileKey-BLFBU5N8.js","assets/Scheduler-d_Y5B9Nv.js","assets/unitBezier-B1N-tmtC.js","assets/TileLayerView2D-Cv7ycvUi.js","assets/imageUtils-pwRd8fqD.js","assets/BitmapTechnique-CO4J1494.js","assets/bitmapUtils-COhiM7zf.js","assets/LayerView2D-DFM94SK7.js","assets/HighlightGraphicContainer-qg_khddK.js","assets/LayerView-qRdmVoIA.js","assets/RefreshableLayerView-DeviuxI0.js","assets/MapServiceLayerViewHelper-DaPSGkJ6.js","assets/floorFilterUtils-DKzVzLpH.js","assets/drapedUtils-DUh9V1V2.js","assets/sublayerUtils-BEQnBRaB.js","assets/popupUtils-DjaqPyFi.js","assets/highlightOptionsUtils-Cpvg1dgH.js","assets/FeatureLayerView2D-RrPIXwyq.js","assets/timeSupport-PMIz7828.js","assets/AttributeBinsFeatureSet-CZWWwIR-.js","assets/AttributeBinsQuery-BQkRc5Cl.js","assets/FixedIntervalBinParameters-Cyu_Ye_K.js","assets/FeatureIdInfo-C-yLzBGK.js","assets/constants-SxxbBSOD.js","assets/parquetUtils-B0CNPlZc.js","assets/locationUtils-BqSxbbIn.js","assets/parquet-ChvrR159.js","assets/net
1workFieldUtils-CaYZrGFV.js","assets/BaseDynamicLayerView2D-Bt6EUz7j.js","assets/BitmapContainer-Az0dFKv7.js","assets/ExportStrategy-BlsLgzky.js","assets/CatalogLayerView2D-DKbCCAKO.js","assets/CatalogDynamicGroupLayerView2D-OLXbbooC.js","assets/CatalogFootprintLayerView2D-D7oGIGPU.js","assets/GeoRSSLayerView2D-B9qo_K-B.js","assets/GraphicsLayerView2D-DM-P44Ye.js","assets/GroupLayerView2D-B0GQU_Mf.js","assets/ImageryLayerView2D-aMeaaxZK.js","assets/RasterVFDisplayObject-BjmVGlHK.js","assets/dataUtils-Dnzhb_RG.js","assets/vectorFieldUtils-XryE1Sfz.js","assets/PixelBlock-B_gU6XMI.js","assets/rasterProjectionHelper-CKIbNxxk.js","assets/rasterFieldUtils-zqEiAp95.js","assets/ImageryTileLayerView2D-BvL5zzX9.js","assets/datasetUtils-DLV0oYkO.js","assets/clipUtils-N3al4Ofh.js","assets/rasterUtils-C4uBZrH-.js","assets/RawBlockCache-BqoxyQ2Q.js","assets/KMLLayerView2D-DwyRFvXO.js","assets/kmlUtils-B6vKXosd.js","assets/KnowledgeGraphLayerView2D-DyyFgNcv.js","assets/MapImageLayerView2D-BOGhOvZp.js","assets/ExportImageParameters-XhwD50Q0.js","assets/MapNotesLayerView2D-BIeSCKIj.js","assets/MediaLayerView2D-D9s09U0F.js","assets/mediaLayerUtils-DUcnz1Nn.js","assets/OverlayContainer-tePG_oKR.js","assets/OGCFeatureLayerView2D-BSQhHD4S.js","assets/RouteLayerView2D-CFNrZAqx.js","assets/Stop-CGolgDTv.js","assets/networkEnums-DlkGlG8A.js","assets/StreamLayerView2D-Cr5E1hNA.js","assets/SubtypeGroupLayerView2D-BTsUOwXG.js","assets/VectorTileLayerView2D-CmgC1hwl.js","assets/PooledRBush-18vGqBYo.js","assets/SourceLayerData-CAK0S-j-.js","assets/StyleRepository-C5qj5hjp.js","assets/VideoLayerView2D-Bq-q56hq.js","assets/GraphicsLayer-D6fOOurY.js","assets/videoUtils-bvDqT3YL.js","assets/ControlPoint-BFKzyJSd.js","assets/WMSLayerView2D-BuctOAVT.js","assets/ExportWMSImageParameters-Dps-WoZw.js","assets/WMTSLayerView2D-Bf8Na-R0.js","assets/ElevationProfileAnalysisView2D-DLm6Flj2.js","assets/createUtils-BL8vA9Oh.js","assets/distanceOperator-DHTbU-TH.js","assets/Point2D-DvNbkpzt.js","assets/Distance2DCalculator-CXhBP-8I-kXraTdiF.js","assets/ProjectionTransformation-CWdDH57S.js","assets/Envelope2D-CdFWH2X4.js","assets/Transformation2D-q4oumeyN.js","assets/OperatorDefinitions-DP7_WWTp.js","assets/apiConverter-WuSDEEBr.js","assets/jsonConverter-CKXvpgAh.js","assets/simplifyOperator-K9ymGxFY.js","assets/operatorSimplify-DuDBHtVg.js","assets/quat-DRbr2exH.js","assets/quatf64-aQ5IuZRd.js","assets/mapCollectionUtils-esMqcvwn.js","assets/elevationInfoUtils-KHKAvsox.js","assets/getDefaultUnitForView-jVCkTIjG.js","assets/GeometryDescriptor-BjmAui9p.js","assets/SketchViewModel-jhVhg-j_.js","assets/hitTestSelectUtils-CTCAULL7.js","assets/projectVectorToVector-OHQBeUJ-.js","assets/projectPointToVector-D-qASDgZ.js","assets/plane-CiKJaUZG.js","assets/vectorStacks-DdEhSi4e.js","assets/sphere-DabW7v7X.js","assets/spatialReferenceEllipsoidUtils-Jp6xRYdx.js","assets/geodeticLengthOperator-V0UNu40V.js","assets/geodeticCurveType-CirnHLSB.js","assets/triangle-94LoPMOX.js","assets/lineSegment-DufyExw6.js","assets/index-M0UMp2ag.js","assets/index-DKX6FN__.js","assets/guid-LcV_DAvu.js","assets/useT9n-B2ZuU92-.js","assets/index-Gq6DVlsv.js","assets/index-CfV9-Pi9.js","assets/dom-CTaXBWtW.js","assets/observers-c5pzqEOa.js","assets/ref-CaF3Wt94.js","assets/static-DJI3XOTF.js","assets/form-Bc4qFZ5T.js","assets/interactive-BaJsPlpB.js","assets/label-C9ydb3d-.js","assets/useSetFocus-Crk3menm.js"])))=>i.map(i=>d[i]);
2import{_ as r}from"./tslib.es6-CnN-Fwk4.js";import{h as k,d as _,m as h,fD as qt,b as T,gw as _t,d7 as bo,av as Ye,l as ee,C as F,gT as sr,gU as or,gV as ts,gW as ar,s as M,q as Se,gX as rr,cx as lr,aP as Ot,N as Rt,_ as Mo,aJ as is,gY as hr,aV as cr,aL as ur,d5 as xo,L as ln,bG as dr,gZ as zt,cF as pr,p as mr,e as mi,c2 as hn,v as cn,w as un,aw as To,dn as Wt,b3 as kt,eD as gr,d6 as $o,u as ie,aM as fr,Q as Pi,aC as Je,f as gi,br as ko,fQ as ke,fS as yr,aU as Si,af as Po,aD as O,cd as So,cj as dn,fy as ns,ck as _r,f9 as vr,fV as ss,fR as Co,fT as Ci,dT as z,dU as Eo,bc as Vo,gB as wr,fN as It,B as br,dR as Mr,dI as xr,dK as os,dL as Tr,dJ as $r,b4 as Io,g_ as kr,f8 as Pr,et as Dn,g$ as Ro,ae as Do,F as as,b1 as Sr,z as Cr,cw as Er,bU as ne,h0 as Vr,fn as Gt,J as Hi,el as Q,ek as Ir,dG as Rr,dF as Dr,au as jt,A as Ar,eg as Lr,h1 as rs,ca as An,ce as Or,bw as zr,aW as Fr,h2 as Nr,h3 as Hr,c3 as ls,am as Zr}from"./Polyline-DW6h-wJn.js";import{_ as x}from"./index-KmHFZaHn.js";import{L as qr,m as se,r as Zi,a as Wr}from"./utils-B7HOvzyj.js";
2import{O as S,b0 as L,at as Ao,l as Gr,R as ge,m as hs,bN as Ln,_ as jr}from"./Graphic-DSMrqGWg.js";import{l as Lo}from"./CollectionFlattener-3gB25nZF.js";import{l as w,h as W,w as X,j as On,g as Oo,a as Ei,k as Ur,q as zo,U as Dt,f as Ke,e as Br,i as Kr,r as Yr,d as Jr,p as Qr}from"./reactiveUtils-BlF6Pmvn.js";import{m as Xr}from"./workers-D4-64yVt.js";import{n as el,i as Fo,l as pn}from"./GraphicsCollection-DtHg89xU.js";import{H as tl,G as zn,J as Fn,W as Ft,L as Nn,f as il}from"./projectionUtils-jNyj10e_.js";import{l as nl,z as sl}from"./TileInfo-zwYf_2Lz.js";import{j as cs,P as No,Q as us,K as ol,J as al,R as rl,B as Vi,y as B,z as Ii,x as Hn,G as ll}from"./jsxFactory-BH9g0woS.js";import{h as Ri}from"./UpdatingHandles-DsbTLrQ3.js";import{d as Di,_ as hl}from"./asyncUtils-7ACV11oo.js";import{s as ds}from"./Queue-7iyt6HPX.js";import{r as cl}from"./signal-CH5txhzj.js";import{m as Ai}from"./HeightModelInfo-B5XH6Z3S.js";import{e as ot,d as ps,l as ul,h as dl,b as pl,m as ml}from"./layerUtils-BoD_3T7B.js";import{p as gl}from"./timeZoneUtils-DN6aZbvZ.js";import{s as mn}from"./ReactiveMap-CsuCZS6M.js";import{b as ms}from"./Query-D9kFysTu.js";import{b as Ut}from"./TablesMixin-DQHyU5fF.js";import{n as D,r as fl}from"./vec2f64-Cgb6qxNH.js";import{M as yl,g as Zn,j as Ho,b as Li,i as At,k as _l,u as Zo,n as vl,a as wl,f as gs,s as bl,h as Ml}from"./Tile-Bd1N3Hza.js";import{L as qn,z as xl}from"./normalizeUtils-CYo271-O.js";import{r as fs}from"./vec2f32-CaVKkSa6.js";import{I as Tl}from"./Scheduler-d_Y5B9Nv.js";import{g as $l}from"./vec32-DXtZevea.js";import{t as Bt}from"./unitBezier-B1N-tmtC.js";import{e as kl}from"./TileKey-9jTzoM1T.js";import{i as Pl}from"./arcadeUtils-62jCBeLc.js";import{M as Sl,P as Cl,S as Kt,o as ys}from"./definitions-Bxxl7NsE.js";import{h as El,A as Vl}from"./Texture-BYJXNxRX.js";import{s as Il}from"./imageUtils-BrDobdiB.js";import{t as Rl}from"./capabilities-Bi6C4OG6.js";import"./intl-Bcp-4HWi.js";let vt=class extends el{constructor(e){super(e),this.addHandles(this.on("before-add",t=>{t.item!=null&&t.item.parent===this.owner&&(k.getLogger(this).warn("Analysis inside the collection must be unique. Not adding this element again."),t.preventDefault())}))}_own(e){e.parent=this.owner}_release(e){e.parent=null}};vt=r([_("esri.support.AnalysesCollection")],vt);const si={widthBreakpoint:{getValue(i){const e=i.viewSize[0],t=i.breakpoints,n=this.values;return e<=t.xsmall?n.xsmall:e<=t.small?n.small:e<=t.medium?n.medium:e<=t.large?n.large:n.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},heightBreakpoint:{getValue(i){const e=i.viewSize[1],t=i.breakpoints,n=this.values;return e<=t.xsmall?n.xsmall:e<=t.small?n.small:e<=t.medium?n.medium:e<=t.large?n.large:n.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},orientation:{getValue(i){const e=i.viewSize,t=e[0],n=e[1],s=this.values;return n>=t?s.portrait:s.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},qi={xsmall:544,small:768,medium:992,large:1200};function Dl(i){const e=i;return e&&e.xsmall<e.small&&e.small<e.medium&&e.medium<e.large}function Wi(i,e){return e?si[i].valueToClassName[e].split(" "):[]}const Al=i=>{const e=i;let t=class extends e{constructor(...n){super(...n),this.orientation=null,this.widthBreakpoint=null,this.heightBreakpoint=null,this.breakpoints=qi}initialize(){this.addHandles(w(()=>[this.breakpoints,this.size],()=>this._updateClassNames(),W))}destroy(){this.destroyed||this._removeActiveClassNames()}set breakpoints(n){if(n!==this._get("breakpoints")){if(!Dl(n)){const s=JSON.stringify(qi,null,2);console.warn("provided breakpoints are not valid, using defaults:"+s),n=qi}this._set("breakpoints",{...n})}}_updateClassNames(){if(!this.container)return;const n=qt.acquire(),s=qt.acquire();let o,a=!1;for(o in si){const l=this[o],c=si[o].getValue({viewSize:this.size,breakpoints:this.breakpoints});l!==c&&(a=!0,this[o]=c,Wi(o,l).forEach(u=>
2s.push(u)),Wi(o,c).forEach(u=>n.push(u)))}a&&(this._applyClassNameChanges(n,s),qt.release(n),qt.release(s))}_applyClassNameChanges(n,s){const o=this.container;o&&(s.forEach(a=>o.classList.remove(a)),n.forEach(a=>o.classList.add(a)))}_removeActiveClassNames(){const n=this.container;if(!n)return;let s;for(s in si)Wi(s,this[s]).forEach(o=>n.classList.remove(o))}};return r([h()],t.prototype,"breakpoints",null),r([h()],t.prototype,"orientation",void 0),r([h()],t.prototype,"widthBreakpoint",void 0),r([h()],t.prototype,"heightBreakpoint",void 0),t=r([_("esri.views.BreakpointsOwner")],t),t};let Re=class extends T{constructor(){super(...arguments),this.items=new S,this._watchUpdatingTracking=new Ri,this._callbacks=new Map,this._projector=cs(),this._hiddenProjector=cs()}get needsRender(){return this.items.length>0}get updating(){return this._watchUpdatingTracking?.updating??!1}initialize(){const e=document.createElement("div");e.className="esri-overlay-surface",this._set("surface",e),this._hiddenSurface=document.createElement("div"),this._hiddenSurface.setAttribute("style","visibility: hidden;"),e.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(()=>this.items,t=>{for(const n of t.added){const s=()=>n.render();this._callbacks.set(n,s),this._projector.append(this.surface,s)}for(const n of t.removed){const s=this._projector.detach(this._callbacks.get(n));this.surface.removeChild(s.domNode),this._callbacks.delete(n)}})}addItem(e){this.items.add(e)}removeItem(e){this.items.remove(e)}destroy(){this.items.removeAll(),this._callbacks.forEach(e=>this._projector.detach(e)),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(e){const t=this._hiddenSurface,n=this._hiddenProjector;let s;const o=()=>(s=e.render(),s);n.append(t,o),n.renderNow();const a={left:0,top:0,right:0,bottom:0};if(s?.domNode){const l=s.domNode.getBoundingClientRect();a.left=l.left,a.top=l.top,a.right=l.right,a.bottom=l.bottom}for(n.detach(o);t.firstChild;)t.removeChild(t.firstChild);return a}overlaps(e,t){const n=this.computeBoundingRect(e),s=this.computeBoundingRect(t);return Math.max(n.left,s.left)<=Math.min(n.right,s.right)&&Math.max(n.top,s.top)<=Math.min(n.bottom,s.bottom)}get hasVisibleItems(){return this.items.some(e=>e.visible)}async prepare(){await document.fonts.load(this._fontString()).catch(()=>{})}renderCanvas(e,t){const n=!!t?.disableDecorations;if(!this.items.some(o=>o.visible&&!(n&&o.isDecoration)))return;const s=e.getContext("2d");s.save(),s.font=this._fontString(),this.items.forEach(o=>{n&&o.isDecoration||(s.save(),o.renderCanvas(s),s.restore())}),s.restore()}_fontString(){return`10px ${getComputedStyle(this.surface).fontFamily}`}};r([h({readOnly:!0})],Re.prototype,"surface",void 0),r([h({readOnly:!0})],Re.prototype,"items",void 0),r([h({readOnly:!0})],Re.prototype,"needsRender",null),r([h({readOnly:!0})],Re.prototype,"_watchUpdatingTracking",void 0),r([h({readOnly:!0})],Re.prototype,"updating",null),Re=r([_("esri.views.overlay.ViewOverlay")],Re);const _s=Re,Gi=[0,0];function Ll(i){const e=(i.ownerDocument||window.document).defaultView,t=i.getBoundingClientRect();return Gi[0]=t.left+(e?.pageXOffset??0),Gi[1]=t.top+(e?.pageYOffset??0),Gi}function vs(i){i&&(i.textContent="",i.parentNode&&i.parentNode.removeChild(i))}function Ol(i){const e=document.createElement("div");return i.appendChild(e),e}const et=16,Mt=750,zl=512,Fl=2,Nl=i=>{const e=i;let t=class extends e{constructor(...n){super(...n),this._freqInfo={freq:et,time:Mt},this._overlayRenderTaskHandle=null,this.aria={},this.height=0,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([w(()=>this.cursor,s=>{const{surface:o}=this;o&&o.setAttribute("data-cursor",s)}),w(()=>this.navigating,s=>{const{surface:o}=this;o&&o.setAttribute("data-navigating",s.toString())}),w(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0})])}initialize(){const n=this;this.addHandles([w(()=>this.ui,(s,o)=>this._handleUIChange(s,o),W),n.on("focus",()=>this.notifyChange("focused")),n.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui?.destroy(),this.container=null)}get container(){return this._get("container")??null}set container(n){const s=this._get("container"),o=No(n);
2if(o||typeof n!="string"||k.getLogger(this).error("#container",`element with id '${n}' not found`),s===o)return;if(this._stopMeasuring(),s&&(s.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this.root&&(vs(this.root),this._set("root",null)),this.userContent&&(us(this.userContent,s),vs(this.userContent),this._set("userContent",null))),!o)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);o.classList.add("esri-view");const a=document.createElement("div");a.className="esri-view-user-storage",us(o,a),o.appendChild(a),this._set("userContent",a);const l=document.createElement("div");l.className="esri-view-root",o.insertBefore(l,o.firstChild),this._set("root",l);const c=document.createElement("div");c.className="esri-view-surface",c.setAttribute("role","application"),c.tabIndex=0,l.appendChild(c),this._set("surface",c);const u=new _s;l.appendChild(u.surface),this._set("overlay",u),this.addHandles(w(()=>u.needsRender,d=>{d&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=_t({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=ee(this._overlayRenderTaskHandle)})),this.forceDOMReadyCycle(),this._set("container",o),this._startMeasuring()}get focused(){const n=document.activeElement===this.surface;return document.hasFocus()&&n}get size(){return[this.width,this.height]}set ui(n){const s=this._get("ui");s!==n&&s?.destroy(),this._set("ui",n)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(n,s,o){const a=this.position;return n-=a?a[0]:0,s-=a?a[1]:0,o?(o[0]=n,o[1]=s):o=[n,s],o}containerToPage(n,s,o){const a=this.position;return n+=a?a[0]:0,s+=a?a[1]:0,o?(o[0]=n,o[1]=s):o=[n,s],o}_updateAria(){const{surface:n,aria:s}=this;n&&(n.ariaLabelledByElements=s?.labelledByElements??null,n.ariaDescribedByElements=s?.describedByElements??null,n.ariaLabel=s?.label??null,n.ariaDescription=s?.description??null)}_handleUIChange(n,s){this.removeHandles("ui"),s&&s!==n&&s.destroy(),n&&(n.view=this,this.addHandles(w(()=>this.root,o=>{n.container=o?Ol(o):null},W),"ui")),this._set("ui",n)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const n=this._freqInfo;n.freq=et,n.time=Mt;const s=_t({prepare:l=>{const c=this._measure(),u=this._freqInfo;if(u.time+=l.deltaTime,c&&(u.freq=et,this._get("resizing")||this._set("resizing",!0)),u.time<u.freq)return;u.time=0;const d=this._position();u.freq=d||c?et:Math.min(Mt,u.freq*Fl),!c&&u.freq>=zl&&(s.pause(),this._get("resizing")&&this._set("resizing",!1))}}),o=new ResizeObserver(l=>{n.freq=et,n.time=Mt,s.resume()});this.container!=null&&o.observe(this.container);const a=Ye(()=>o.disconnect());this.addHandles([bo(window,"resize",()=>{n.freq=et,n.time=Mt,s.resume()}),a,s],"measuring"),this._measure(),this._position()}_measure(){const n=this.container,s=n?n.clientWidth:0,o=n?n.clientHeight:0;if(s===0||o===0)return this.suspended||this._set("suspended",!0),!1;const a=this.width,l=this.height;return s===a&&o===l?(this.suspended&&this._set("suspended",!1),!1):(this._set("width",s),this._set("height",o),this.suspended&&this._set("suspended",!1),this.emit("resize",{oldWidth:a,oldHeight:l,width:s,height:o}),!0)}_position(){const n=this.container,s=this.position,o=n&&Ll(n);return!!o&&(!s||o[0]!==s[0]||o[1]!==s[1])&&(this._set("position",[o[0],o[1]]),!0)}forceDOMReadyCycle(){}};return r([h()],t.prototype,"aria",void 0),r([h()],t.prototype,"container",null),r([h({readOnly:!0})],t.prototype,"focused",null),r([h({readOnly:!0})],t.prototype,"height",void 0),r([h()],t.prototype,"messagesCommon",void 0),r([h({type:_s})],t.prototype,"overlay",void 0),r([h({readOnly:!0})],t.prototype,"position",void 0),r([h({readOnly:!0})],t.prototype,"resizing",void 0),r([h({readOnly:!0})],t.prototype,"root",void 0),r([h({value:null,readOnly:!0})],t.prototype,"size",null),r([h({readOnly:!0})],t.prototype,"surface",void 0),r([h({readOnly:!0})],t.prototype,"suspended",void 0),r([h({nonNullable:!0})],t.prototype,"ui",null),r([h({readOnly:!0})],t.prototype,"userContent",void 0),r([h({readOnly:!0})],t.prototype,"width",void 0),r([h()],t.prototype,"widthBreakpoint",void 0),t=r([_("esri.views.DOMContainer")],t),t},Yt="popup",ws="manual";function fe(i){return i!=null&&"open"in i&&"declaredClass"in i}function Ee(i){return!!i&&i.tagName.toLowerCase()==="arcgis-popup"&&"open"in i}function Hl(i,e,t){const[n,s,o]=e;if(t){const[a,l,c]=t;a&&fe(l)&&(l.view=null,a.remove(l,Yt),l!==s&&s&&l.destroy()),a&&c&&Ee(c)&&(c.view=null,a.remove(c,Yt),c!==o&&o&&c.remove())}n&&fe(s)&&(s.view=i,n.add(s,{key:Yt,position:ws,internal:!0})),n&&o&&Ee(o)&&(o.view=i,n.add(o,{key:Yt,position:ws,internal:!0}))}async function Zl(i,e){const{popup:t,popupElement:n}=i;fe(t)?await Jt(t,null,e):n&&Ee(n)?await Jt(null,n,e):e?.defer(async()=>{await i.setupPopup();const{popup:s,popupElement:o}=i;fe(s)&&!i.destroyed&&i.ready&&i.popupEnabled?await Jt(s,null,e):o&&Ee(o)&&await Jt(null,o,e)})}function ql(i,e){const{popup:t,popupElement:n}=i;if(fe(t))return t.open(e);n&&Ee(n)&&n.open(e)}function Wl(i,e){fe(i)&&i.close(),e&&Ee(e)&&(e.visible=!1)}async function Jt(i,e,t){if(fe(i)){const n=await i.viewModel.handleViewClick(t);
2return void(n?.promises?.length?i.open(n):i.visible&&i.close())}if(e&&Ee(e)){const n=await e.handleViewClick(t);n?.promises?.length?e.open(n):e.visible&&(e.visible=!1)}}const qo=F("mac")?"Meta":"Control",Gl=new Set(["Alt","Control","Meta","Shift","Ctrl","Primary"]),jl=i=>Gl.has(i);let Ul=class{constructor(e,t=[]){this.eventType=e,this.keyModifiers=t}matches(e){if(e.type!==this.eventType)return!1;if(this.keyModifiers.length===0)return!0;const t=e.modifiers;for(const n of this.keyModifiers)if(!t.has(n))return!1;return!0}},A=class{constructor(e){this._manager=null,this._incoming={},this._outgoing={},this._incomingEventMatches=null,this._incomingEventTypes=null,this._outgoingEventTypes=null,this._hasSideEffects=e}get incomingEventMatches(){if(!this._incomingEventMatches){this._incomingEventMatches=[];for(const e in this._incoming){const t=this._incoming[e];for(const n of t)this._incomingEventMatches.push(n.match)}}return this._incomingEventMatches}get incomingEventTypes(){return this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map(e=>e.eventType)),this._incomingEventTypes}get outgoingEventTypes(){return this._outgoingEventTypes||(this._outgoingEventTypes=Object.keys(this._outgoing)),this._outgoingEventTypes}get hasSideEffects(){return this._hasSideEffects}get hasPendingInputs(){return!1}onInstall(e){this._manager||(e.setEventCallback(t=>this._handleEvent(t)),e.setUninstallCallback(()=>this._onUninstall()),this._manager=e)}onUninstall(){}registerIncoming(e,t,n){let s;typeof t=="function"?(n=t,s=[]):s=t||[];const o=typeof e=="string"?new Ul(e,s):e,a=()=>{this._incomingEventTypes=null,this._incomingEventMatches=null},l=d=>{const p=this._incoming[d.match.eventType];if(p){const m=p.indexOf(d);p.splice(m,1),a(),this._manager&&this._manager.updateDependencies()}},c=new Bl(o,n,{onPause:l,onRemove:l,onResume:d=>{const p=this._incoming[d.match.eventType];p&&!p.includes(d)&&(p.push(d),a(),this._manager&&this._manager.updateDependencies())}});let u=this._incoming[o.eventType];return u||(u=[],this._incoming[o.eventType]=u),u.push(c),a(),this._manager&&this._manager.updateDependencies(),c}registerOutgoing(e){if(this._outgoing[e])throw new Error("There is already a callback registered for this outgoing InputEvent: "+e);const t=new Kl(e,{onEmit:(n,s,o,a)=>{this._manager?.emit(n.eventType,s,o,a)},onRemove:n=>{delete this._outgoing[n.eventType],this._manager?.updateDependencies()}});return this._outgoing[e]=t,this._outgoingEventTypes=null,this._manager&&this._manager.updateDependencies(),t}startCapturingPointer(e){this._manager?.setPointerCapture(e,!0)}stopCapturingPointer(e){this._manager?.setPointerCapture(e,!1)}refreshHasPendingInputs(){this._manager?.refreshHasPendingInputs()}_onUninstall(){this._manager&&(this.onUninstall(),this._manager=null)}_handleEvent(e){const t=this._incoming[e.type];if(t){for(const n of t)if(n.match.matches(e)&&(n.callback?.(e),e.shouldStopPropagation()))break}}},Bl=class{constructor(e,t,n){this.match=e,this._callback=t,this._handler=n}pause(){this._handler.onPause(this)}resume(){this._handler.onResume(this)}remove(){this._handler.onRemove(this)}get callback(){return this._callback}},Kl=class{constructor(e,t){this.eventType=e,this._removed=!1,this._handler=t}emit(e,t,n){this._removed||this._handler.onEmit(this,e,t,n)}remove(){this._removed=!0,this._handler.onRemove(this)}},Yl=class extends A{constructor(e){super(!0),this._onChange=e,this._value="mouse",this._x=null,this._y=null,this._id=null,this.registerIncoming("pointer-move",t=>this._update(t.data))}_update(e){const t=e.native.pointerType==="touch"?"touch":"mouse",{x:n,y:s,native:{pointerId:o}}=e;t===this._value&&this._x===n&&this._y===s&&this._id===o||(this._value=t,this._x=n,this._y=s,this._id=o,this._onChange(o,t,n,s))}},Jl=class extends A{get multiTouchActive(){return this._multiTouchActive.value}constructor(){super(!0),this._activeTouchPointerIds=new Set,this._multiTouchActive=cl(!1),this._onPointerAdd=({data:e})=>{e.pointerType==="touch"&&(this._activeTouchPointerIds.add(e.native.pointerId),this._update())},this._onPointerRemove=({data:e})=>{e.pointerType==="touch"&&(this._activeTouchPointerIds.delete(e.native.pointerId),this._update())},this.registerIncoming("pointer-down",this._onPointerAdd),this.registerIncoming("pointer-up",this._onPointerRemove),this.registerIncoming("pointer-capture-lost",this._onPointerRemove),this.registerIncoming("pointer-cancel",this._onPointerRemove)}
2_update(){this._multiTouchActive.value=this._activeTouchPointerIds.size>1}},Ql=class{constructor(e,t){this._owner=t,this._properties={},this._afterDispatchHandle=null;for(const n in e){const s=e[n],o=new sr(s,void 0,void 0,2,2);this._properties[n]={pool:o,acquired:[]}}this._afterDispatchHandle=or(()=>this._release())}destroy(){this._afterDispatchHandle&&(this._afterDispatchHandle.remove(),this._afterDispatchHandle=null);for(const e in this._properties){const t=this._properties[e];for(const n of t.acquired)ts(n)||t.pool.release(n);t.pool.destroy(),t.pool=null,t.acquired=null}this._properties=null,this._owner=null}get(e){const t=this._owner._get(e),n=this._properties[e];let s=n.pool.acquire();for(n.acquired.push(s);s===t;)s=n.pool.acquire(),n.acquired.push(s);return ar(),s}_release(){for(const e in this._properties){const t=this._properties[e];let n=0;for(const s of t.acquired)ts(s)?t.acquired[n++]=s:t.pool.release(s);t.acquired.length=n}}},Xl=class{constructor(){this.id=0,this.type="mouse",this.location=L()}},le=class extends T{constructor(e){super(e),this._pointerCaptures=new Map,this._nameToGroup={},this._handlers=[],this._handlersPriority=[],this._currentPropagation=null,this._updateDependenciesAfterPropagation=!1,this._sourceEvents=new Set,this._keyModifiers=new Set,this._activeKeyModifiers=new Set,this._stoppedPropagationEventIds=new Set,this.primaryKey=qo,this._propertiesPool=new Ql({latestPointerInfo:()=>new Xl},this),this._latestPointerInfo=void 0,this._paused=!1,this._testTimestamp=void 0}initialize(){this.eventSource.onEventReceived=this._onEventReceived.bind(this),this._installRecognizers()}destroy(){const e=Object.keys(this._nameToGroup);for(const t of e)this.uninstallHandlers(t);this.eventSource.destroy(),this._currentPropagation=null,this._propertiesPool.destroy()}get hasPendingInputs(){return this._handlers.some(e=>e.handler.hasPendingInputs)}get multiTouchActive(){return this._multiTouchHandler.multiTouchActive}get latestPointerInfo(){return this._latestPointerInfo}get updating(){return this.hasPendingInputs||this._paused}installHandlers(e,t,n=Ce.INTERNAL){if(this._nameToGroup[e]||t.length===0)return;const s={name:e,handlers:t.map(o=>({handler:o,active:!0,removed:!1,priorityIndex:0,groupPriority:n,eventCallback:null,uninstallCallback:null}))};this._nameToGroup[e]=s;for(let o=s.handlers.length-1;o>=0;o--){const a=s.handlers[o];this._handlers.push(a),a.handler.onInstall({updateDependencies:()=>{this.updateDependencies()},emit:(l,c,u,d,p)=>{this._emitInputEvent(a.priorityIndex+1,l,c,u,p,d)},setPointerCapture:(l,c)=>{this._setPointerCapture(s,a,l,c)},setEventCallback:l=>{a.eventCallback=l},setUninstallCallback:l=>{a.uninstallCallback=l},refreshHasPendingInputs:()=>{this.notifyChange("hasPendingInputs")}})}this.updateDependencies()}uninstallHandlers(e){const t=this._nameToGroup[e];t?(t.handlers.forEach(n=>{n.removed=!0,n.uninstallCallback?.()}),delete this._nameToGroup[e],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):k.getLogger(this).error("There is no InputHandler group registered under the name `"+e+"`")}hasHandlers(e){return this._nameToGroup[e]!==void 0}isModifierKeyDown(e){return this._activeKeyModifiers.has(e)}updateDependencies(){if(this._currentPropagation)return void(this._updateDependenciesAfterPropagation=!0);this._updateDependenciesAfterPropagation=!1;const e=new Set,t=new Set;this._handlersPriority=[];for(let n=this._handlers.length-1;n>=0;n--){const s=this._handlers[n];s.priorityIndex=n,this._handlersPriority.push(s)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(let n=this._handlersPriority.length-1;n>=0;n--){const s=this._handlersPriority[n];s.priorityIndex=n;let o=s.handler.hasSideEffects;if(!o){for(const a of s.handler.outgoingEventTypes)if(e.has(a)){o=!0;break}}if(o)for(const a of s.handler.incomingEventMatches){e.add(a.eventType);for(const l of a.keyModifiers)jl(l)||t.add(l)}s.active=o}this._sourceEvents=e,this._keyModifiers=t,this._pointerCaptures.size>0&&this._sourceEvents.add("pointer-capture-lost"),this._keyModifiers.size>0&&(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up")),this.eventSource&&(this.eventSource.activeEvents=this._sourceEvents)}_setLatestPointer(e,t,n,s){const o=this._latestPointerInfo;if(o==null||o.id!==e||o.type!==t||o.location.x!==n||o.location.y!==s){const a=this._propertiesPool.get("latestPointerInfo");a.id=e,a.type=t,a.location.x=n,a.location.y=s,this._latestPointerInfo=a}}_onEventReceived(e,t){if(e==="pointer-capture-lost"){const o=t;this._pointerCaptures.delete(o.native.pointerId)}this._updateKeyModifiers(e,t);
2const n=this._testTimestamp??t.native?.timestamp,s=t.native?.cancelable;this._emitInputEventFromSource(e,t,n,s)}_updateKeyModifiers(e,t){if(!t)return;let n=!1;const s=()=>{n||(this._activeKeyModifiers=new Set(this._activeKeyModifiers),n=!0)},o=(l,c)=>{c&&!this._activeKeyModifiers.has(l)?(s(),this._activeKeyModifiers.add(l)):!c&&this._activeKeyModifiers.has(l)&&(s(),this._activeKeyModifiers.delete(l))};if(e==="key-down"||e==="key-up"){const l=t.key;this._keyModifiers.has(l)&&o(l,e==="key-down")}const a=t.native;o("Alt",!!a?.altKey),o("Control",!!a?.ctrlKey),o("Ctrl",!!a?.ctrlKey),o("Shift",!!a?.shiftKey),o("Meta",!!a?.metaKey),o("Primary",this._activeKeyModifiers.has(this.primaryKey))}_installRecognizers(){this._latestPointerHandler=new Yl((e,t,n,s)=>this._setLatestPointer(e,t,n,s)),this._multiTouchHandler=new Jl,this.installHandlers("input-manager-logic",[this._latestPointerHandler,this._multiTouchHandler],Ce.ALWAYS),this.recognizers.length>0&&this.installHandlers("default",this.recognizers,Ce.INTERNAL)}_setPointerCapture(e,t,n,s){const o=e.name+"-"+t.priorityIndex,a=this._pointerCaptures.get(n.pointerId)||new Set;this._pointerCaptures.set(n.pointerId,a),s?(a.add(o),a.size===1&&this.eventSource&&this.eventSource.setPointerCapture(n,!0)):a.has(o)&&(a.delete(o),a.size===0&&(this._pointerCaptures.delete(n.pointerId),this.eventSource&&this.eventSource.setPointerCapture(n,!1)))}_garbageCollectRemovedHandlers(){this._handlers=this._handlers.filter(e=>!e.removed),this.updateDependencies()}_emitInputEventFromSource(e,t,n,s){this._emitInputEvent(0,e,t,n,s)}_emitInputEvent(e,t,n,s,o,a){const l=s??this._currentPropagation?.timestamp??performance.now(),c=o??!1,u={event:new eh(t,n,l,a||this._activeKeyModifiers,c),priorityIndex:e};this._currentPropagation?this._currentPropagation.events.push(u):this._doNewPropagation(u)}_doNewPropagation(e){this._currentPropagation={events:new ds,currentHandler:null,needsHandlerGarbageCollect:!1,timestamp:e.event.timestamp},this._currentPropagation.events.push(e),this._continuePropagation()}_continuePropagation(){this._paused=!1;const e=this._currentPropagation;if(e){for(;e.events.length>0;){const{event:t,priorityIndex:n}=e.events.pop(),s=t.data?.eventId;if(!(s!=null&&this._stoppedPropagationEventIds.has(s)))for(e.currentHandler=this._handlersPriority[n];e.currentHandler;){if(e.currentHandler.removed)e.needsHandlerGarbageCollect=!0;else{if(e.currentHandler.active&&!t.shouldStopPropagation()&&e.currentHandler.eventCallback?.(t),t.shouldStopPropagation()){s!=null&&this._stoppedPropagationEventIds.add(s);break}if(t.shouldPausePropagation(()=>this._continuePropagation()))return void this._pausePropagation({event:t,priorityIndex:e.currentHandler.priorityIndex+1})}e.currentHandler=this._handlersPriority[e.currentHandler.priorityIndex+1]}}e.needsHandlerGarbageCollect&&this._garbageCollectRemovedHandlers(),this.hasPendingInputs||this._stoppedPropagationEventIds.clear(),this._currentPropagation=null,this._updateDependenciesAfterPropagation&&this.updateDependencies()}}_pausePropagation(e){const t=new ds;t.push(e);const n=this._currentPropagation;if(n){for(;n.events.length;)t.push(n.events.pop());n.events=t,n.currentHandler=null,this._paused=!0}}_compareHandlerPriority(e,t){if(e.handler.hasSideEffects!==t.handler.hasSideEffects)return e.handler.hasSideEffects?1:-1;if(e.groupPriority!==t.groupPriority)return e.groupPriority>t.groupPriority?-1:1;for(const n of e.handler.incomingEventMatches)for(const s of t.handler.incomingEventMatches){if(n.eventType!==s.eventType)continue;const o=n.keyModifiers.filter(a=>s.keyModifiers.includes(a));if(o.length===n.keyModifiers.length!=(o.length===s.keyModifiers.length))return n.keyModifiers.length>s.keyModifiers.length?-1:1}return e.priorityIndex>t.priorityIndex?-1:1}_sortHandlersPriority(e){const t=[];for(const n of e){let s=0;for(;s<t.length&&this._compareHandlerPriority(n,t[s])>=0;)s++;t.splice(s,0,n)}return t}get test(){}};r([h({readOnly:!0})],le.prototype,"hasPendingInputs",null),r([h({constructOnly:!0})],le.prototype,"eventSource",void 0),r([h({constructOnly:!0})],le.prototype,"recognizers",void 0),r([h()],le.prototype,"multiTouchActive",null),r([h()],le.prototype,"_latestPointerInfo",void 0),r([h()],le.prototype,"latestPointerInfo",null),r([h()],le.prototype,"_paused",void 0),r([h({readOnly:!0})],le.prototype,"updating",null),le=r([_("esri.views.input.InputManager")],le);let eh=class{constructor(e,t,n,s,o){this.type=e,this.data=t,this.timestamp=n,this.modifiers=s,this.cancelable=o,this._propagationState=0,this._resumeCallback=null}stopPropagation(){this._propagationState|=1}shouldStopPropagation(){return!!(1&this._propagationState)}defer(e){this._propagationState|=2;const t=(n,s)=>{this._propagationState&=-3;const o=this._resumeCallback;if(this._resumeCallback=null,o&&o(),s)throw n;return n};return(typeof e=="function"?e():e).then(n=>t(n,!1),n=>t(n,!0))}shouldPausePropagation(e){return!!(2&this._propagationState)&&(this._resumeCallback=e,!0)}preventDefault(){this.data.native.preventDefault()}};const Ce={ALWAYS:1,DEFAULT:0,TOOL:-1,WIDGET:-2,INTERNAL:-3},th=i=>{const e=i;let t=class extends e{constructor(){super(...arguments),this._popupSetupTask=null,this.popup={},this.popupEnabled=!0}initialize(){this.addHandles([w(()=>[this.ui,this.popup,this.popupElement],([n,s,o],a)=>{const[l,c,u]=a??[];Hl(this,[n,s,o],[l,c,u])},X),this.on("click",n=>{this.popup&&this.popupEnabled&&(n.pointerType!=="mouse"||n.button===0)&&Zl(this,n)},Ce.WIDGET)]),On(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>x(()=>import("./Popup-1R4l_Rk-.js").then(n=>n.P),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142])))}destroy(){this.destroyed||this.closePopup()}async openPopup(n){if(fe(this.popup))return this.popup.open(n);if(this.popupElement&&Ee(this.popupElement))this.popupElement.open(n).catch(()=>{});else try{if(await this.setupPopup(),!this.popup)return void k.getLogger(this).error(new M("view:null-popup","Po
2pup is null and can't be opened"));ql(this,n)}catch{}}closePopup(){this._popupSetupTask?.abort(),Wl(this.popup,this.popupElement)}async fetchPopupFeatures(n,s){return await this.when(),this._popupHitsToFeatures(await this._getPopupHits(n,s),s)}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!fe(this.popup))return this._popupSetupTask=Di(async n=>{if(!this.popupEnabled||!Ee(this.popupElement))if(this.dependencies.popup&&typeof this.dependencies.popup=="function")await this.dependencies.popup(),Se(n),customElements.get("arcgis-popup")||k.getLogger(this).error(new M("view:undefined-popup-element","`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement("arcgis-popup");else{const{default:s}=await x(()=>import("./Popup-1R4l_Rk-.js").then(a=>a.P),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142]));if(Se(n),!this.popup||fe(this.popup))return;const o=this.popup;if("open"in o||"close"in o){const{open:a,close:l,...c}=o;this.popup=new s({...c})}else this.popup=new s(o)}}),this._popupSetupTask.promise}async _popupHitsToFeatures({location:n,hits:s},o){const a=[],l=[];let c=!1;const u=rr(o,F("popup-view-fetch-timeout")??nh),d=g=>{const v=new ih(g);return l.push(v),a.push(v.promise),v},p=g=>{const v=l.at(-1);return v&&v.layerView===g&&!c?v:d(g)};for(const g of s)"graphic"in g?(p(g.layerView).graphics.push(g.graphic),c=!1):(a.push(g.layerView.fetchPopupFeaturesAtLocation(g.mapPoint,u)),c=!0);l.forEach(g=>g.resolve(u));const m=lr(a).then(g=>g.filter(v=>!!v).flat());return{pendingFeatures:a,allGraphicsPromise:m,location:n}}async _getPopupHits(n,s){const{hits:o,location:a}=await this.popupHitTest(n);Se(s);const l=[];for(const c of o)if("graphic"in c){if(this._isValidPopupGraphic(c.graphic,s)){const u=this._isValidPopupGraphicsLayerView(c.layerView)?c.layerView:void 0;l.push({graphic:c.graphic,layerView:u})}}else this._isValidPopupLocationLayerView(c.layerView)&&l.push({mapPoint:c.mapPoint,layerView:c.layerView});return{hits:l,location:a}}_isValidPopupGraphic(n,s){return n&&!!n.getEffectivePopupTemplate(s?.defaultPopupTemplateEnabled)}_isValidPopupGraphicsLayerView(n){return!n||(!("layer"in n)||!n.suspended)&&"fetchPopupFeaturesFromGraphics"in n}_isValidPopupLocationLayerView(n){return(!("layer"in n)||!n.suspended)&&"fetchPopupFeaturesAtLocation"in n}};return r([h()],t.prototype,"popup",void 0),r([h()],t.prototype,"popupElement",void 0),r([h()],t.prototype,"popupEnabled",void 0),t=r([_("esri.views.PopupView")],t),t};let ih=class{constructor(e){this.layerView=e,this._resolver=Ot(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(e){const{layerView:t,graphics:n,_resolver:s}=this;if(!t)return s.resolve(n),s.promise;let o;return t.fetchPopupFeaturesFromGraphics(n,e).catch(a=>(o=a,null)).then(a=>{a?s.resolve(a):s.reject(o)}),s.promise}};const nh=5e3;let be=class extends T{constructor(e){super(e),this.view=null,this.baseLayerViews=new S,this.groundLayerViews=new S,this.referenceLayerViews=new S,this._loadingHandle=w(()=>this.view?.map?.basemap,t=>{t&&t.load().catch(()=>{})},W)}destroy(){this._set("view",null),this._loadingHandle=ee(this._loadingHandle),this.baseLayerViews.destroyAll(),this.groundLayerViews.destroyAll(),this.referenceLayerViews.destroyAll()}get suspended(){return this.view?.suspended??!0}get updating(){return this.view?.suspended?!1:!!this.view?.map?.basemap?.loaded&&(this.baseLayerViews.some(t=>t.updating)||this.groundLayerViews.some(t=>t.updating)||this.referenceLayerViews.some(t=>t.updating))}};r([h({constructOnly:!0})],be.prototype,"view",void 0),r([h({readOnly:!0})],be.prototype,"baseLayerViews",void 0),r([h({readOnly:!0})],be.prototype,"groundLayerViews",void 0),r([h({readOnly:!0})],be.prototype,"referenceLayerViews",void 0),r([h({readOnly:!0})],be.prototype,"suspended",null),r([h({type:Boolean,readOnly:!0})],be.prototype,"updating",null),be=r([_("esri.views.BasemapView")],be);const sh=be;let Y=class extends T{constructor(e){super(e),this.factor=1.5,this.offset=L(0,0),this.position=null,this.size=120,this.maskUrl=null,this.maskEnabled=!0,this.overlayUrl=null,this.overlayEnabled=!0,this.visible=!0}get version(){return this.commitProperty("factor"),this.commitProperty("offset"),this.commitProperty("position"),this.commitProperty("visible"),this.commitProperty("size"),this.commitProperty("maskUrl"),this.commitProperty("maskEnabled"),this.commitProperty("overlayUrl"),this.commitProperty("overlayEnabled"),(this._get("version")||0)+1}};r([h({type:Number})],Y.prototype,"factor",void 0),r([h({nonNullable:!0})],Y.prototype,"offset",void 0),r([h()],Y.prototype,"position",void 0),r([h({type:Number,range:{min:0}})],Y.prototype,"size",void 0),r([h()],Y.prototype,"maskUrl",void 0),r([h()],Y.prototype,"maskEnabled",void 0),r([h()],Y.prototype,"overlayUrl",void 0),r([h()],Y.prototype,"overlayEnabled",void 0),r([h({readOnly:!0}
2)],Y.prototype,"version",null),r([h({type:Boolean})],Y.prototype,"visible",void 0),Y=r([_("esri.views.Magnifier")],Y);const Wo=Y;function Ie(i){return!(i==null||typeof i!="object"||!("createQuery"in i)||!i.createQuery)}let te=class extends Oo{constructor(e){super(e),this._selectionMap=new mn,this._sources=new S,this._trashCan=[],this._layerEditHandles=new S,this._vizTaskId=0,this.view=null,this.showHighlight=!0,this.highlightName="default"}initialize(){this.addHandles([w(()=>[this.view,this.showHighlight],()=>this._refreshVisualization()),w(()=>this.view,e=>{e?.when().then(()=>this.syncSources())},W),Ei(()=>this.sources,"change",e=>{const t=this._selectionMap,n=[];for(const s of e.removed){const o=t.get(s);o&&(t.delete(s),o.highlightHandle?.remove(),n.push({layer:s,selection:[],added:[],removed:[...o.selection]}))}this._refreshListeners(),n.length&&this._onSelectionChange(n)},{onListenerAdd:()=>this._refreshListeners()})])}destroy(){this.clear(),this._layerEditHandles.drain(ee)}get selections(){return Array.from(this._selectionMap.entries()).map(e=>{const[t,n]=e;return{layer:t,selection:[...n.selection]}})}get count(){let e=0;for(const t of this._selectionMap.values())e+=t.selection.length;return e}get hasSelection(){return this.count>0}get sources(){return this._sources}set sources(e){Ao(e,this._sources)}syncSources(){const e=new Set,t=this.view?.map;if(!t)return;const n=s=>{ul(s)?(s.layers?.forEach(n),s.tables?.forEach(n)):dl(s)?(s.sublayers?.forEach(n),s.subtables?.forEach(n)):ps(s)?s.sublayers?.forEach(n):Ie(s)&&e.add(s)};t.allLayers.forEach(n),t.allTables.forEach(n),this.sources=[...e]}async getSelectedFeatures(e,t={},n="layerView"){const{view:s,selections:o}=this;if(!s&&n==="layerView")return k.getLogger(this).warn("Cannot query layer views without a view."),[];const a=(e?.length?o.filter(l=>e.includes(l.layer)):o).map(async l=>{const{layer:c,selection:u}=l;if(!u.length)return;const d=ot(c)?c.parent:c;if(d!=null){if(s&&n==="layerView"&&!bs(d)&&Ms(d)){const p=await s.whenLayerView(d).catch(()=>null);if(p)return xs(p,u,t)}return xs(d,u,t)}}).filter(Rt);return(await Promise.all(a)).filter(Rt)}updateSelection(e){const t=new Map;for(const[o,a]of this._selectionMap)t.set(o,[...a.selection]);let n=!1;const s=e.current.concat(e.added);for(const o of s){const a=o.sourceLayer,l=o.getObjectId();if(this.sources.includes(a)&&(Ie(a)||ot(a))&&l!==null){const c=Mo(t,a,()=>[]);c.includes(l)||(c.push(l),n=!0)}}for(const o of e.removed){const a=o.sourceLayer,l=o.getObjectId();if(this.sources.includes(a)&&(Ie(a)||ot(a))&&l!==null){const c=t.get(a),u=c?.indexOf(l);u!==void 0&&u>=0&&(c?.splice(u,1),n=!0)}}if(n){const{_selectionMap:o,_trashCan:a}=this,l=[];for(const[c,u]of t){const d=o.get(c);d!==void 0&&a.push(d),o.set(c,{selection:u}),l.push({layer:c,selection:u,...is(d!==void 0?d.selection:[],u)})}this._onSelectionChange(l)}}setSelection(e,t){this._setSelection(e,t)}getSelection(e){return this._selectionMap.get(e)?.selection}appendToSelection(e,t){const n=this._selectionMap.get(e),s=n!==void 0?[...n.selection]:[];for(const o of t)s.includes(o)||s.push(o);this._setSelection(e,s)}removeFromSelection(e,t){const n=this._selectionMap.get(e);if(!n)return;const s=[];for(const o of n.selection)t.includes(o)||s.push(o);this._setSelection(e,s)}toggleInSelection(e,t){const n=this._selectionMap.get(e);if(!n||n.selection.length===0)return void this._setSelection(e,t);const s=new Set(n.selection),o=new Set(t),a=hr(s,o);this._setSelection(e,Array.from(a))}clear(){const e=this._selectionMap.values();this._trashCan.push(...e);const t=[];for(const[n,s]of this._selectionMap.entries())t.push({layer:n,added:[],removed:[...s.selection],selection:[]});this._selectionMap.clear(),this._onSelectionChange(t)}_onSelectionChange(e){this._refreshVisualization(),this.emit("selection-change",{view:this.view,changes:e})}_refreshVisualization(){for(this._vizTaskId++;this._trashCan.length>0;)this._trashCan.pop()?.highlightHandle?.remove();if(this.view==null)return;const{sources:e,view:t,_selectionMap:n,showHighlight:s}=this,o=this._vizTaskId;for(const a of e){const l=n.get(a),c=ot(a)?a.parent:a;
2if(c!=null&&Ms(c)){if(bs(c))continue;t.whenLayerView(c).then(u=>{l?.highlightHandle?.remove(),l!=null&&s&&o===this._vizTaskId&&"highlight"in u&&typeof u.highlight=="function"&&l.selection.length>0&&(l.highlightHandle=u.highlight(l.selection,this.highlightName))}).catch(()=>{l?.highlightHandle?.remove()})}}}_refreshListeners(){this._layerEditHandles.drain(ee);const e=new Set(this.sources.map(t=>ot(t)?t.parent:t));for(const t of e)Ie(t)&&"on"in t&&t.on&&this._layerEditHandles.push(t.on("edits",n=>this._onLayerEdit(n,t)))}_onLayerEdit(e,t){if(ps(t))this._onParentLayerEdit(e,t);else if(e.deletedFeatures.length&&this._selectionMap.has(t)){const n=[];e.deletedFeatures.forEach(({error:s,objectId:o})=>{o!=null&&s==null&&n.push(o)}),this.removeFromSelection(t,n)}}_onParentLayerEdit(e,t){const{deletedFeatures:n,edits:s,updatedFeatures:o}=e;if(s?.updateFeatures?.forEach(a=>{const l=a.getObjectId()??a.attributes[t.objectIdField];if(l==null||o.find(d=>d.objectId===l)?.error)return;const c=t.findSublayerForFeature(a);if(!Ie(c))return;const u=t.sublayers.find(d=>!(!Ie(d)||!this.getSelection(d)?.includes(l)));Ie(u)&&u!==c&&(this.removeFromSelection(u,[l]),this.appendToSelection(c,[l]))}),n.length){const a=[];n.forEach(({error:l,objectId:c})=>{c!=null&&l==null&&a.push(c)}),t.sublayers.forEach(l=>{Ie(l)&&this._selectionMap.has(l)&&this.removeFromSelection(l,a)})}}_setSelection(e,t){if(!this.sources.includes(e))throw new Error(`Cannot set selection on layer ${e.title} because it is not in 'sources'`);const n=this._selectionMap.get(e);if(n===void 0||!ah(n,{selection:t})){n!==void 0&&this._trashCan.push(n),this._selectionMap.set(e,{selection:[...t]});const s={layer:e,selection:[...t],...is(n!==void 0?n.selection:[],t)};this._onSelectionChange([s])}}};r([h()],te.prototype,"_selectionMap",void 0),r([h()],te.prototype,"_sources",void 0),r([h({readOnly:!0,nonNullable:!0})],te.prototype,"selections",null),r([h({readOnly:!0,nonNullable:!0})],te.prototype,"count",null),r([h()],te.prototype,"view",void 0),r([h({readOnly:!0,nonNullable:!0})],te.prototype,"hasSelection",null),r([h()],te.prototype,"showHighlight",void 0),r([h()],te.prototype,"sources",null),r([h()],te.prototype,"highlightName",void 0),te=r([_("esri.views.SelectionManager")],te);const bs=i=>ot(i)?i.parent?.isTable===!0:i.isTable,oh=i=>i.layer!==void 0,Ms=i=>i?.when!==void 0,ah=(i,e)=>{if(i==null&&e==null)return!0;if(i!=null&&e==null||i==null&&e!=null)return!1;if(i!=null&&e!=null&&i.selection!=null&&e.selection!=null){const t=[...i.selection],n=[...e.selection];if(t.length!==n.length)return!1;t.sort(),n.sort();for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1}return!0},xs=async(i,e,t={})=>{let n;if(oh(i)){const s=i;n=s===void 0?null:await s.queryFeatures(new ms({...t,objectIds:e})).then(o=>({data:o,layer:i.layer}))}else{const s=i;n=s===void 0?null:await s.queryFeatures(new ms({...t,objectIds:e})).then(o=>({data:o,layer:s}))}return n},rh=te;let Pt=class extends Gr(T){constructor(e){super(e),this.accentColor=new ge([255,127,0]),this.textColor=new ge([255,255,255])}};r([h({type:ge,nonNullable:!0})],Pt.prototype,"accentColor",void 0),r([h({type:ge,nonNullable:!0})],Pt.prototype,"textColor",void 0),Pt=r([_("esri.views.Theme")],Pt);const gn=Pt,Go=["click","double-click","immediate-click","immediate-double-click","hold","drag","key-down","key-up","pointer-down","pointer-move","pointer-up","pointer-drag","mouse-wheel","pointer-enter","pointer-leave","gamepad","focus","blur"],jo={};function Uo(i){return!!jo[i]}function lh(i){for(const e of i)if(!Uo(e))return!1;return!0}Go.forEach(i=>{jo[i]=!0});let Bo=class{constructor(e){this._handlers=new Map,this._counter=0,this._handlerCounts=new Map,this.view=e,this.inputManager=null}connect(e){e&&this.disconnect(),this.inputManager=e,this._handlers.forEach(({handler:t,priority:n},s)=>this.inputManager?.installHandlers(s,[t],n))}disconnect(){this.inputManager&&this._handlers.forEach((e,t)=>this.inputManager?.uninstallHandlers(t)),this.inputManager=null}destroy(){this.disconnect(),this._handlers.clear(),this.view=null}on(e,t,n,s){const o=Array.isArray(e)?e:e.split(",");if(!lh(o))return o.some(Uo)&&console.error("Error: registering input events and other events on the view at the same time is not supported."),null;let a,l;Array.isArray(t)?l=t:(a=t,l=[]),typeof n=="function"?a=n:s=n,s=s??Ce.DEFAULT;const c=this._createUniqueGroupName(),u=new hh(this.view,o,l,a);this._handlers.set(c,{handler:u,priority:s});for(const d of o){const p=this._handlerCounts.get(d)||0;this._handlerCounts.set(d,p+1)}return this.inputManager&&this.inputManager.installHandlers(c,[u],s),Ye(()=>this._removeHandler(c,o))}hasHandler(e){return!!this._handlerCounts.get(e)}_removeHandler(e,t){if(this._handlers.has(e)){this._handlers.delete(e);for(const n of t){const s=this._handlerCounts.get(n);s===void 0||(s===1?this._handlerCounts.delete(n):this._handlerCounts.set(n,s-1))}}this.inputManager&&this.inputManager.uninstallHandlers(e)}_createUniqueGroupName(){return this._counter+=1,`viewEvents_${this._counter}`}},hh=class extends A{constructor(e,t,n,s){super(!0),this._latestDragStart=void 0,this.view=e;for(const o of t)switch(o){case"click":this.registerIncoming("click",n,a=>
2s(dh(e,a)));break;case"double-click":this.registerIncoming("double-click",n,a=>s(ph(e,a)));break;case"immediate-click":this.registerIncoming("immediate-click",n,a=>s(mh(e,a)));break;case"immediate-double-click":this.registerIncoming("immediate-double-click",n,a=>s(gh(e,a)));break;case"hold":this.registerIncoming("hold",n,a=>s(fh(e,a)));break;case"drag":this.registerIncoming("drag",n,a=>{const l=this._wrapDrag(a);l&&s(l)});break;case"key-down":this.registerIncoming("key-down",n,a=>s(yh(a)));break;case"key-up":this.registerIncoming("key-up",n,a=>s(_h(a)));break;case"pointer-down":this.registerIncoming("pointer-down",n,a=>s(xt(a,"pointer-down")));break;case"pointer-move":this.registerIncoming("pointer-move",n,a=>s(xt(a,"pointer-move")));break;case"pointer-up":this.registerIncoming("pointer-up",n,a=>s(xt(a,"pointer-up")));break;case"pointer-drag":this.registerIncoming("pointer-drag",n,a=>s(vh(a)));break;case"mouse-wheel":this.registerIncoming("mouse-wheel",n,a=>s(wh(a)));break;case"pointer-enter":this.registerIncoming("pointer-enter",n,a=>s(xt(a,"pointer-enter")));break;case"pointer-leave":this.registerIncoming("pointer-leave",n,a=>s(xt(a,"pointer-leave")));break;case"gamepad":this.registerIncoming("gamepad",n,a=>{s(bh(a))});break;case"focus":this.registerIncoming("focus",n,a=>{s(ch(a))});break;case"blur":this.registerIncoming("blur",n,a=>{s(uh(a))})}}_wrapDrag(e){const t=e.data,{x:n,y:s}=t.center,{action:o,pointerType:a,button:l}=t;if(o==="start"&&(this._latestDragStart=t),!this._latestDragStart)return;const c=t.pointer.native,u=t.buttons,{cancelable:d,timestamp:p}=e,m={x:this._latestDragStart.center.x,y:this._latestDragStart.center.y};return o==="end"&&(this._latestDragStart=void 0),{type:"drag",action:o,x:n,y:s,origin:m,pointerType:a,button:l,buttons:u,radiu
vendor: 3,981 bytes, line 2
2s:t.radius,angle:cr(t.angle),native:c,timestamp:p,cancelable:d,stopPropagation:()=>e.stopPropagation(),defer:g=>e.defer(g),preventDefault:()=>e.preventDefault()}}};function ch(i){return{type:"focus",timestamp:i.timestamp,native:i.data.native,cancelable:i.cancelable,stopPropagation:()=>i.stopPropagation(),defer:e=>i.defer(e),preventDefault:()=>i.preventDefault()}}function uh(i){return{type:"blur",timestamp:i.timestamp,native:i.data.native,cancelable:i.cancelable,stopPropagation:()=>i.stopPropagation(),defer:e=>i.defer(e),preventDefault:()=>i.preventDefault()}}function dh(i,e){const{pointerType:t,button:n,buttons:s,x:o,y:a,native:l,eventId:c}=e.data,{cancelable:u,timestamp:d}=e;return{type:"click",pointerType:t,button:n,buttons:s,x:o,y:a,native:l,timestamp:d,screenPoint:L(o,a),mapPoint:Nt(i,o,a),eventId:c,cancelable:u,stopPropagation:()=>e.stopPropagation(),defer:p=>e.defer(p),preventDefault:()=>e.preventDefault()}}function ph(i,e){const{pointerType:t,button:n,buttons:s,x:o,y:a,native:l,eventId:c}=e.data,{cancelable:u,timestamp:d}=e;return{type:"double-click",pointerType:t,button:n,buttons:s,x:o,y:a,native:l,timestamp:d,mapPoint:Nt(i,o,a),eventId:c,cancelable:u,stopPropagation:()=>e.stopPropagation(),defer:p=>e.defer(p),preventDefault:()=>e.preventDefault()}}function mh(i,e){const{pointerType:t,button:n,buttons:s,x:o,y:a,native:l,eventId:c}=e.data,u=l.pointerId,{cancelable:d,timestamp:p}=e;return{type:"immediate-click",pointerId:u,pointerType:t,button:n,buttons:s,x:o,y:a,native:l,timestamp:p,mapPoint:Nt(i,o,a),eventId:c,cancelable:d,stopPropagation:()=>e.stopPropagation(),defer:m=>e.defer(m),preventDefault:()=>e.preventDefault()}}function gh(i,e){const{pointerType:t,button:n,buttons:s,x:o,y:a,native:l,eventId:c}=e.data,u=l.pointerId,{cancelable:d,timestamp:p}=e;return{type:"immediate-double-click",pointerId:u,pointerType:t,button:n,buttons:s,x:o,y:a,native:l,timestamp:p,mapPoint:Nt(i,o,a),eventId:c,cancelable:d,stopPropagation:()=>e.stopPropagation(),defer:m=>e.defer(m),preventDefault:()=>e.preventDefault()}}function fh(i,e){const{pointerType:t,button:n,buttons:s,x:o,y:a,native:l}=e.data,{cancelable:c,timestamp:u}=e;return{type:"hold",pointerType:t,button:n,buttons:s,x:o,y:a,native:l,timestamp:u,mapPoint:Nt(i,o,a),cancelable:c,stopPropagation:()=>e.stopPropagation(),defer:d=>e.defer(d),preventDefault:()=>e.preventDefault()}}function Nt(i,e,t){return i.toMap(L(e,t),{exclude:[]})}function yh(i){const{key:e,repeat:t,native:n}=i.data,{cancelable:s,timestamp:o}=i;return{type:"key-down",key:e,repeat:t,native:n,timestamp:o,cancelable:s,stopPropagation:()=>i.stopPropagation(),defer:a=>i.defer(a),preventDefault:()=>i.preventDefault()}}function _h(i){const{key:e,native:t}=i.data,{cancelable:n,timestamp:s}=i;return{type:"key-up",key:e,native:t,timestamp:s,cancelable:n,stopPropagation:()=>i.stopPropagation(),defer:o=>i.defer(o),preventDefault:()=>i.preventDefault()}}function xt(i,e){const{x:t,y:n,button:s,buttons:o,native:a,eventId:l}=i.data,c=a.pointerId,u=a.pointerType,{cancelable:d,timestamp:p}=i;return{type:e,x:t,y:n,pointerId:c,pointerType:u,button:s,buttons:o,native:a,timestamp:p,eventId:l,cancelable:d,stopPropagation:()=>i.stopPropagation(),defer:m=>i.defer(m),preventDefault:()=>i.preventDefault()}}function vh(i){const{x:e,y:t,buttons:n,native:s,eventId:o}=i.data.currentEvent,{button:a}=i.data.startEvent,l=i.data.startEvent.native.pointerId,c=i.data.startEvent.native.pointerType,u=i.data.action,d={x:i.data.startEvent.x,y:i.data.startEvent.y},{cancelable:p,timestamp:m}=i;return{type:"pointer-drag",x:e,y:t,pointerId:l,pointerType:c,button:a,buttons:n,action:u,origin:d,native:s,timestamp:m,eventId:o,cancelable:p,stopPropagation:()=>i.stopPropagation(),defer:g=>i.defer(g),preventDefault:()=>i.preventDefault()}}function wh(i){const{cancelable:e,data:t,timestamp:n}=i,{x:s,y:o,deltaY:a,native:l}=t;return{type:"mouse-wheel",x:s,y:o,deltaY:a,native:l,timestamp:n,cancelable:e,stopPropagation:()=>i.stopPropagation(),defer:c=>
2i.defer(c),preventDefault:()=>i.preventDefault()}}function bh(i){const{action:e,state:t,device:n}=i.data,{cancelable:s,timestamp:o}=i,{buttons:a,axes:l}=t;return{type:"gamepad",device:n,timestamp:o,action:e,buttons:a,axes:l,cancelable:s,stopPropagation:()=>i.stopPropagation(),defer:c=>i.defer(c),preventDefault:()=>i.preventDefault()}}const Mh="z",xh="r",Ko={cancel:"Escape",complete:"Enter"},cm={...Ko,redo:xh,undo:Mh,center:"Alt",constraint:"Shift",delete:["Backspace","Delete"],vertexAdd:"f",pan:" "},um={toggle:"Control"},dm={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},pm={moveUp:{key:"ArrowUp",modifier:"Shift",repeats:!0},moveDown:{key:"ArrowDown",modifier:"Shift",repeats:!0},moveLeft:{key:"ArrowLeft",modifier:"Shift",repeats:!0},moveRight:{key:"ArrowRight",modifier:"Shift",repeats:!0},scaleUp:{key:"+",modifier:"Shift"},scaleDown:{key:"-",modifier:"Shift"},factorModifier:{key:qo,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0}};let mm=class{constructor(){this._bindings=new Map}add(e,t){return this.addToggle(e,n=>{n.type==="key-down"&&t(n)})}addToggle(e,t){const n=Th.fromDefinition(e,t),s=Mo(this._bindings,n.key,()=>[]);return s.push(n),Ye(()=>ur(s,n))}register(e,t=Ce.WIDGET){return xo([e.on("key-down",n=>this.dispatch(e.inputManager,n),t),e.on("key-up",n=>this.dispatch(e.inputManager,n),t)])}dispatch(e,t){const n=t.key,s=this._bindings.get(n);if(s)for(const o of s)o.process(e,t)}},Th=class fn{constructor(e,t,n,s,o){this.key=e,this.modifiers=t,this.repeats=n,this.continuePropagation=s,this.callback=o}process(e,t){if(!(t.key!==this.key||"repeat"in t&&t.repeat&&!this.repeats)){for(const n of this.modifiers)if(!e.isModifierKeyDown(n))return;this.continuePropagation||t.stopPropagation(),this.callback(t)}}static fromDefinition(e,t){if(typeof e=="string")return new fn(e,[],!1,!1,t);const{key:n,modifier:s,repeats:o,continuePropagation:a}=e;return new fn(n,s?Array.isArray(s)?s:[s]:[],!!o,!!a,t)}};function $h(i){return[i.on("before-add",e=>{const t=e.item;if(t==null||i.includes(t))return k.getLogger("esri.views.interactive.interactiveToolUtils").warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."),void e.preventDefault();t.onAdd()}),i.on("after-remove",e=>{const t=e.item;t.active&&(t.view.activeTool=null),t.destroy()})]}function yn(i){return i.visible&&i.getEditableFlag!=null&&i.getEditableFlag(0)&&i.getEditableFlag(1)}function kh(i){return i.type==="key-down"&&i.key===Ko.cancel}function de(i){return L(i.x,i.y)}function Yo(i,e){const t=(i instanceof HTMLElement?i:i.surface)?.getBoundingClientRect();return t?L(e.clientX-t.left,e.clientY-t.top):L(0,0)}function Jo(i,e){return e instanceof Event?Yo(i,e):de(e)}function Qo(i){if(i instanceof Event)return!0;if(typeof i=="object"&&"type"in i)switch(i.type){case"click":case"double-click":case"pointer-down":case"pointer-drag":case"pointer-enter":case"pointer-leave":case"pointer-up":case"pointer-move":case"immediate-click":case"immediate-double-click":case"hold":case"drag":case"mouse-wheel":return!0;default:return!1}return!1}let oi=class extends T{constructor(){super(...arguments),this._pointerLocations=new Map,this._hoveredManipulators=new mn,this._grabbedManipulators=new mn,this._draggedManipulators=new Map,this._stopDrag=!1,this._externallyDragging=!1,this._revertToNullActiveTool=!1}get cursor(){return this._cursorFromMap(this._grabbedManipulators,"grabbing")??this._cursorFromMap(this._hoveredManipulators,"pointer")}get hasFocusedManipulators(){return this._grabbedManipulators.size>0||this._draggedManipulators.size>0}handleInputEvent(e,t){const n=()=>e.stopPropagation();switch(e.type){case"pointer-move":Ts(e.pointerType)&&this._pointerLocations.set(e.pointerId,{x:e.x,y:e.y,pointerType:e.pointerType});break;case"drag":this._grabbedManipulators.size>0?this._stopDrag=!0:e.action==="start"?this._externallyDragging=!0:e.action==="end"&&(this._externallyDragging=!1),this._stopDrag&&(n(),e.action==="end"&&(this._stopDrag=!1));break;case"pointer-down":{if(!$s(e))break;const s=de(e),o=tt(s,e.pointerType,t.tools);if(o==null)break;const a=o.manipulator,l=o.tool;a==null||l==null||!a.interactive||a.grabbable&&a.grabbableForEvent(e)||!a.grabbing||a.dragging||this._releaseManipulatorBeforeDragging(a,e,t),a!=null&&l!=null&&a.interactive&&a.grabbable&&a.grabbableForEvent(e)&&!a.grabbing&&(this._grabbedManipulators.set(e.pointerId,{manipulator:a,tool:l,start:s,pointerType:e.pointerType}),this._grabbedManipulators.size===1&&t.activeTool==null&&(this._revertToNullActiveTool=!0,t.setActiveTool(o.tool)),a.grabbing=!0,a.events.emit("grab-changed",{action:"start",pointerType:e.pointerType,screenPoint:s}),n());break}case"pointer-up":this._draggedManipulators.has(e.pointerId)||this._handlePointerEnd(e,t);break;
2case"pointer-drag":{if(!$s(e))break;const s=this._grabbedManipulators.get(e.pointerId),o=s?.manipulator,a=s?.tool;if(o==null||a==null)break;const l=de(e);l.x=ln(l.x,0,t.view.width),l.y=ln(l.y,0,t.view.height);const c=s.start,u=this._draggedManipulators.get(e.pointerId);switch(e.action){case"start":case"update":e.action!=="update"&&this._grabbedManipulators.size!==1||(o.dragging=!0,u?o.events.emit("drag",{action:"update",start:c,screenPoint:l}):o.events.emit("drag",{action:"start",start:c,screenPoint:l,pointerType:e.pointerType}),this._draggedManipulators.set(e.pointerId,{tool:a,manipulator:o,start:c}));break;case"end":o.dragging=!1,u&&o.events.emit("drag",{action:"end",start:c,screenPoint:l}),this._draggedManipulators.delete(e.pointerId),this._handlePointerEnd(e,t)}n();break}case"immediate-click":{const s=de(e),o=tt(s,e.pointerType,t.tools);if(!Ph(e)){for(const u of t.tools)if((o==null||o.tool!==u||u.automaticManipulatorSelection)&&u.manipulators){let d=!1;u.manipulators.forEach(({manipulator:p})=>{p.selected&&(p.selected=!1,d=!0)}),d&&u.onManipulatorSelectionChanged&&u.onManipulatorSelectionChanged()}}if(o==null)break;const{manipulator:a,tool:l}=o;if(!a.interactive)break;a.selectable&&l.automaticManipulatorSelection&&(a.selected=!a.selected,l.onManipulatorSelectionChanged&&l.onManipulatorSelectionChanged());const c=e.native.shiftKey;a.events.emit("immediate-click",{screenPoint:s,button:e.button,pointerType:e.pointerType,shiftKey:c,stopPropagation:n}),ji(a,n);break}case"click":{const s=de(e),o=tt(s,e.pointerType,t.tools),a=o?.manipulator;if(a==null||!a.interactive)break;const l=e.native.shiftKey;a.events.emit(e.type,{screenPoint:s,button:e.button,pointerType:e.pointerType,shiftKey:l}),n();break}case"double-click":{const s=de(e),o=tt(s,e.pointerType,t.tools),a=o!=null?o.manipulator:null;if(a==null||!a.interactive)break;const l=e.native.shiftKey;a.events.emit("double-click",{screenPoint:s,button:e.button,pointerType:e.pointerType,shiftKey:l,stopPropagation:n}),ji(a,n);break}case"immediate-double-click":{const s=de(e),o=tt(s,e.pointerType,t.tools),a=o!=null?o.manipulator:null;if(a==null||!a.interactive)break;const l=e.native.shiftKey;a.events.emit("immediate-double-click",{screenPoint:s,button:e.button,pointerType:e.pointerType,shiftKey:l,stopPropagation:n}),e.pointerType==="mouse"&&ji(a,n);break}}this._onFocusChange(t.tools)}_releaseManipulatorBeforeDragging(e,t,n){e.grabbing=!1,e.events.emit("grab-changed",{action:"end",pointerType:t.pointerType,screenPoint:de(t)}),this._grabbedManipulators.forEach(({manipulator:s},o)=>{s===e&&this._grabbedManipulators.delete(o)}),this._afterManipulatorRelease(n.setActiveTool)}_handlePointerEnd(e,t){const n=this._grabbedManipulators.get(e.pointerId)?.manipulator;n!=null&&n.grabbing&&(n.grabbing=!1,n.events.emit("grab-changed",{action:"end",pointerType:e.pointerType,screenPoint:de(e)}),this._grabbedManipulators.delete(e.pointerId),this._afterManipulatorRelease(t.setActiveTool))}_onFocusChange(e){this._updateFocusedManipulatorTools(e)}_updateFocusedManipulatorTools(e){const t=new Set,n=new Set;this._grabbedManipulators.forEach(({tool:s})=>t.add(s)),this._hoveredManipulators.forEach(({tool:s})=>n.add(s));for(const s of e){s.hasGrabbedManipulators=t.has(s),s.hasHoveredManipulators=n.has(s);const o=this._grabbedManipulators.values(),a=dr(o,({tool:l})=>l===s);s.firstGrabbedManipulator=a!=null?a.manipulator:null}}clearPointers(e,{tools:t,setActiveTool:n},s=!0,o){const a=(l,c)=>l===e&&(o==null||o===c);this._grabbedManipulators.forEach(({tool:l,manipulator:c,pointerType:u},d)=>{a(l,c)&&(this._grabbedManipulators.delete(d),c.grabbing=!1,c.events.emit("grab-changed",{action:"end",screenPoint:null,pointerType:u}))}),this._draggedManipulators.forEach(({tool:l,manipulator:c},u)=>{a(l,c)&&(this._draggedManipulators.delete(u),c.dragging=!1,c.events.emit("drag",{action:"cancel"}))}),s&&this._hoveredManipulators.forEach(({tool:l,manipulator:c},u)=>{a(l,c)&&(this._hoveredManipulators.delete(u),c.hovering=!1)}),this._afterManipulatorRelease(n),this._onFocusChange(t)}updateHoveredStateFromKnownPointers(e){this._pointerLocations.forEach((t,n)=>{this._updateHoveredStateForPointerAtScreenPosition(L(t.x,t.y),n,t.pointerType,e)})}handleHoverEvent(e,t){const n=e.type;n!=="pointer-up"&&n!=="immediate-click"&&n!=="pointer-move"||!Ts(e.pointerType)||(n!=="pointer-up"&&this._externallyDragging?this._clearHoveredManipulatorStates(e.pointerId):this._updateHoveredStateForPointerAtScreenPosition(de(e),e.pointerId,e.pointerType,t))}_updateHoveredStateForPointerAtScreenPosition(e,t,n,s){let o=tt(e,n,s);const a=this._hoveredManipulators.get(t)?.manipulator;o==null||o.manipulator.interactive||(o=null),o!=null&&a===o.manipulator||(a!=null&&(a.hovering=!1),o!=null?(o.manipulator.hovering=!0,this._hoveredManipulators.set(t,o)):this._hoveredManipulators.delete(t),this._onFocusChange(s))}_afterManipulatorRelease(e){this._grabbedManipulators.size===0&&this._revertToNullActiveTool&&(e(null),this._revertToNullActiveTool=!1)}_clearHoveredManipulatorStates(e){this._hoveredManipulators.forEac
2h(({manipulator:t},n)=>{e===n&&(this._hoveredManipulators.delete(e),t.hovering=!1)})}_cursorFromMap(e,t){if(!e?.size)return null;for(const{manipulator:n}of e.values())if(n?.interactive){if(n.grabbing&&n.grabCursor)return n.grabCursor;if(n.cursor)return n.cursor}return t}};function tt(i,e,t){for(const n of t){if(n.manipulators==null||!yn(n))continue;const s=n.manipulators.intersect(i,e);if(s!=null)return{tool:n,manipulator:s}}return null}function Ts(i){return i==="mouse"}function $s(i){return i.pointerType!=="mouse"||i.button===0}function Ph(i){return!!i.native.shiftKey}function ji(i,e){i?.consumesClicks&&e()}r([h()],oi.prototype,"cursor",null),oi=r([_("esri.views.interactive.ToolViewManagerManipulatorState")],oi);const ks="attached",Ui="tools",Sh=1e3;let pe=class extends T{constructor(e){super(e),this._updatingHandles=new Ri,this._clock=zt,this._manipulatorState=new oi,this.tools=new S,this._interacting=!1,this._interactingTimeout=Sh,this._interactingTimeoutHandle=null}initialize(){this.addHandles([this.view.on(Go,e=>{this._handleInputEvent(e)},Ce.TOOL),...$h(this.tools),this.tools.on("before-add",({item:e})=>{this._updateToolEditableFlag(e)}),this.tools.on("before-remove",({item:e})=>{this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs)}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.activeTool=null,this.tools.drain(e=>e.destroy()),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy(),this._manipulatorState.destroy()}get _manipulatorStateEventArgs(){return{tools:this.tools,activeTool:this.activeTool,setActiveTool:e=>{this.activeTool=e},view:this.view}}set activeTool(e){if(e!=null&&!this.view.ready)return void k.getLogger(this).error("Cannot set active tool while view is not ready.");if(e===this.activeTool)return;const t=this.activeTool;this._set("activeTool",e),t?.deactivate(),e?.activate(),this._removeIncompleteTools(e);for(const n of this.tools){this._updateToolEditableFlag(n);const s=yn(n);this.activeTool!=null&&s||this._manipulatorState.clearPointers(n,this._manipulatorStateEventArgs,!s)}}get cursor(){const e=this._manipulatorState.cursor;if(e!=null)return e;for(const t of this.tools)if(t.visible&&t.cursor!=null)return t.cursor;return null}get updating(){return this._updatingHandles.updating||this.tools.some(e=>e.updating)}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=ee(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout(()=>this._interacting=!1,this._interactingTimeout)}attach(){this.view.type==="3d"?this.addHandles([w(()=>{const{state:e}=this.view;return"camera"in e&&e.camera},()=>this._forEachManipulator(e=>e.onViewChange())),this.view.elevationProvider.on("elevation-change",e=>this._forEachManipulator(t=>t.onElevationChange(e)))],ks):this.addHandles(w(()=>this.view.extent,()=>this._forEachManipulator(e=>e.onViewChange())))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(ks),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(e){for(const t of this.tools)t.manipulators&&t.manipulators.forEach(({manipulator:n})=>e(n,t))}_handleInputEvent(e){let t=!1;const n={...e,stopPropagation:()=>{t=!0,e.stopPropagation()}};if(this.activeTool!=null)this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(n);else for(const s of this.tools)!t&&s.visible&&s.handleInputEvent(n);!t&&kh(e)&&this.activeTool&&(e.stopPropagation(),e.preventDefault(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(n,this._manipulatorStateEventArgs),t||this.activeTool==null||this.activeTool.handleInputEventAfter(n),this._manipulatorState.handleHoverEvent(n,this.tools),e.type==="pointer-move"&&(this._manipulatorState.hasFocusedManipulators||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(Ui);for(const e of this.tools){if(e instanceof T){const t=w(()=>[e.cursor,e.visible,e.editable],()=>{yn(e)||this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs)});this.addHandles(t,Ui)}e.manipulators&&this.addHandles([e.manipulators.on("after-remove",t=>{this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs,!0,t.item.manipulator)}),e.manipulators.on("change",()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)})],Ui)}this._manipulatorState.updateHoveredStateFromKnownPointers(this.tools)}_updateToolEditableFlag(e){e.setEditableFlag?.(1,this.activeTool==null||e===this.activeTool)}_removeIncompleteTools(e){this.tools.filter(t=>(e==null||t!==e)&&!t.created&&t.removeIncompleteOnCancel).forEach(t=>{this.tools.remove(t)})}get test(){}};r([h({constructOnly:!0,nonNullable:!0})],pe.prototype,"view",void 0),r([h({value:null}
2)],pe.prototype,"activeTool",null),r([h({readOnly:!0,type:S})],pe.prototype,"tools",void 0),r([h()],pe.prototype,"cursor",null),r([h({readOnly:!0})],pe.prototype,"updating",null),r([h()],pe.prototype,"_interacting",void 0),r([h({readOnly:!0})],pe.prototype,"interacting",null),pe=r([_("esri.views.ToolViewManager")],pe);const Ch=new ge("cyan"),Eh=1,Vh=.25,Ih=new ge("black"),Rh=.4,Dh=.2,_m=.25,Xo="default",Ah="temporary",Lh=new ge("yellow");var _n;let J=_n=class extends T{constructor(i){super(i),this.name=Xo,this.color=Ch.clone(),this.haloColor=null,this.haloOpacity=Eh,this.fillOpacity=Vh,this.shadowColor=Ih.clone(),this.shadowOpacity=Rh,this.shadowDifference=Dh,this.haloWidth=2.1,this.haloBlur=.8/this.haloWidth}equals(i){return this.color.equals(i.color)&&(this.haloColor||this.color).equals(i.haloColor||i.color)&&this.haloOpacity===i.haloOpacity&&this.fillOpacity===i.fillOpacity&&this.haloWidth===i.haloWidth&&this.haloBlur===i.haloBlur&&this.shadowColor.equals(i.shadowColor)&&this.shadowOpacity===i.shadowOpacity&&this.shadowDifference===i.shadowDifference}clone(){return new _n({...this,color:this.color.clone(),haloColor:this.haloColor?.clone(),shadowColor:this.shadowColor?.clone()})}assignFrom(i){this.color=i.color.clone(),this.haloColor=i.haloColor?.clone(),this.haloOpacity=i.haloOpacity,this.fillOpacity=i.fillOpacity,this.shadowColor=i.shadowColor.clone(),this.shadowDifference=i.shadowDifference,this.shadowOpacity=i.shadowOpacity,this.haloBlur=i.haloBlur,this.haloWidth=i.haloWidth}};r([h({type:String,constructOnly:!0,nonNullable:!0})],J.prototype,"name",void 0),r([h({type:ge,nonNullable:!0})],J.prototype,"color",void 0),r([h({type:ge})],J.prototype,"haloColor",void 0),r([h({nonNullable:!0})],J.prototype,"haloOpacity",void 0),r([h({nonNullable:!0})],J.prototype,"fillOpacity",void 0),r([h({type:ge,nonNullable:!0})],J.prototype,"shadowColor",void 0),r([h({nonNullable:!0})],J.prototype,"shadowOpacity",void 0),r([h({nonNullable:!0})],J.prototype,"shadowDifference",void 0),r([h({nonNullable:!0})],J.prototype,"haloWidth",void 0),r([h({nonNullable:!0})],J.prototype,"haloBlur",void 0),J=_n=r([_("esri.views.support.HighlightOptions")],J);const ze=J;function Oh(){return new(S.ofType(ze))([new ze({name:Xo}),new ze({name:Ah,color:Lh})])}let at=class extends T{constructor(e){super(),this.nativeIndex=null,this._detectedDeviceType="unknown",e.mapping==="standard"?this._detectedDeviceType="standard":zh.test(e.id)?this._detectedDeviceType="spacemouse":this._detectedDeviceType="unknown",this.nativeIndex=e.index}get native(){const e=navigator.getGamepads?navigator.getGamepads():[];return this.nativeIndex!=null&&this.nativeIndex<e.length?e[this.nativeIndex]:null}get deviceType(){return this._detectedDeviceType}get axisThreshold(){return Fh[this.deviceType]}};r([h({nonNullable:!0,readOnly:!0})],at.prototype,"nativeIndex",void 0),r([h({type:String,readOnly:!0})],at.prototype,"deviceType",null),r([h({type:Number,readOnly:!0})],at.prototype,"axisThreshold",null),at=r([_("esri.views.input.gamepad.GamepadInputDevice")],at);const Wn=at,zh=new RegExp("^(3dconnexion|space(mouse|navigator|pilot|explorer))","i"),Fh={standard:.15,spacemouse:.025,unknown:0};let St=class extends T{constructor(e){super(e),this.devices=new S,this.enabledFocusMode="document"}};r([h({type:S.ofType(Wn),readOnly:!0})],St.prototype,"devices",void 0),r([h({type:["document","view","none"]})],St.prototype,"enabledFocusMode",void 0),St=r([_("esri.views.input.gamepad.GamepadSettings")],St);const Nh=St;let ai=class extends T{constructor(){super(...arguments),this.gamepad=new Nh}};r([h({readOnly:!0})],ai.prototype,"gamepad",void 0),ai=r([_("esri.views.input.Input")],ai);const Hh=ai,Bi=()=>h({type:["pan","rotate","zoom","none"],nonNullable:!0});let Ze=class extends T{constructor(e){super(e),this.dragPrimary="pan",this.dragSecondary="rotate",this.dragTertiary="zoom",this.mouseWheel="zoom"}};r([Bi()],Ze.prototype,"dragPrimary",void 0),r([Bi()],Ze.prototype,"dragSecondary",void 0),r([Bi()],Ze.prototype,"dragTertiary",void 0),r([h({type:["zoom","none"],nonNullable:!0})],Ze.prototype,"mouseWheel",void 0),Ze=r([_("esri.views.navigation.NavigationActionMap")],Ze);const Gn=Ze;let De=class extends T{constructor(e){super(e),this.enabled=!0,this.device=null,this.mode="pan",this.tiltDirection="forward-down",this.velocityFactor=1}};r([h({type:Boolean,nonNullable:!0})],De.prototype,"enabled",void 0),r([h({type:Wn})],De.prototype,"device",void 0),r([h({type:["pan","zoom"],nonNullable:!0})],De.prototype,"mode",void 0),r([h({type:["forward-down","forward-up"],nonNullable:!0})],De.prototype,"tiltDirection",void 0),r([h({type:Number,nonNullable:!0})],De.prototype,"velocityFactor",void 0),De=r([_("esri.views.navigation.gamepad.GamepadSettings")],De);const ea=De;let Ae=class extends T{constructor(e){super(e),this.actionMap=new Gn,this.browserTouchPanEnabled=!0,this.gamepad=new ea,this.momentumEnabled=!0}
2get mouseWheelZoomEnabled(){return this.actionMap.mouseWheel==="zoom"}set mouseWheelZoomEnabled(e){pr(k.getLogger(this),"mouseWheelZoomEnabled",{replacement:"actionMap.mouseWheel",version:"4.32",warnOnce:!0}),this.actionMap.mouseWheel=e?"zoom":"none"}};r([h({type:Gn,nonNullable:!0})],Ae.prototype,"actionMap",void 0),r([h({type:Boolean})],Ae.prototype,"browserTouchPanEnabled",void 0),r([h({type:ea,nonNullable:!0})],Ae.prototype,"gamepad",void 0),r([h({type:Boolean})],Ae.prototype,"momentumEnabled",void 0),r([h({type:Boolean})],Ae.prototype,"mouseWheelZoomEnabled",null),Ae=r([_("esri.views.navigation.Navigation")],Ae);const Oi=Ae;function $m(i,e,t){const n=ta(i),s=e,o=Zh(n,s,t);if(n){const a=Ai.deriveUnitFromSR(n,i.spatialReference).heightUnit;if(!t&&a!==n.heightUnit){const l=new M("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${a})`,{horizontalUnit:a});return new M("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:n,error:l})}}if(!qh(i)||o===4)return new M("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:n});switch(o){case 1:{const a=n?.heightUnit||"unknown",l=s?.heightUnit||"unknown",c=new M("layerview:incompatible-height-unit",`The vertical units of the layer (${a}) must match the vertical units of the scene (${l})`,{layerUnit:a,sceneUnit:l});return new M("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:n,sceneHeightModelInfo:s,error:c})}case 2:{const a=n?.heightModel||"unknown",l=s?.heightModel||"unknown",c=new M("layerview:incompatible-height-model",`The height model of the layer (${a}) must match the height model of the scene (${l})`,{layerHeightModel:a,sceneHeightModel:l});return new M("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:n,sceneHeightModelInfo:s,error:c})}case 3:{const a=n?.vertCRS||"unknown",l=s?.vertCRS||"unknown",c=new M("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${a}) must match the vertical datum of the scene (${l})`,{layerDatum:a,sceneDatum:l});return new M("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:n,sceneHeightModelInfo:s,error:c})}}return null}function Zh(i,e,t){if(!Ps(i)||!Ps(e))return 4;if(i==null||e==null)return 0;if(!t&&i.heightUnit!==e.heightUnit)return 1;if(i.heightModel!==e.heightModel)return 2;switch(i.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return i.vertCRS===e.vertCRS?0:3;default:return 4}}function Ps(i){return i==null||i.heightModel!=null&&i.heightUnit!=null}function qh(i){return"heightModelInfo"in i&&i.heightModelInfo!=null||i.spatialReference!=null||!sa(i)}function ta(i){if(i.type==="integrated-mesh-3dtiles"||i.type==="gaussian-splat")return null;const e=i.url?mr(i.url):void 0;return!(i.spatialReference?.vcsWkid==null&&e!=null&&e.serverType==="ImageServer")&&ia(i)&&i.heightModelInfo?i.heightModelInfo:sa(i)?Ai.deriveUnitFromSR(Gh,i.spatialReference):null}function ia(i){return"heightModelInfo"in i}function na(i){if(i.type==="unknown"||!("capabilities"in i))return!1;switch(i.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"oriented-imagery":case"wfs":case"knowledge-graph-sublayer":return!0;default:return!1}}function sa(i){return na(i)?!!(i.capabilities&&i.capabilities.data&&i.capabilities.data.supportsZ):oa(i)}function Wh(i){return i.layers!=null||oa(i)||na(i)||ia(i)}function oa(i){switch(i.type){case"building-scene":case"elevation":case"integrated-mesh":case"integrated-mesh-3dtiles":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"catalog":case"catalog-footprint":case"catalog-dynamic-group":case"csv":case"dimension":case"gaussian-splat":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"oriented-imagery":case"parquet":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"video":case"viewshed":case"wcs":case"web-tile":case"wfs":case"wms":case"wmt
2s":case null:return!1}return!1}const Gh=new Ai({heightModel:"gravity-related-height"});let vn,Ki=null;async function jh(i){Ki||(Ki=x(()=>import("./geometryServiceUtils-CiOQiLPy.js"),__vite__mapDeps([143,2,1,3,4,6,5,7,144,66,70])).then(e=>vn=e)),await Ki,Se(i)}async function aa(i,e,t,n){if(!i)return null;const s=i.spatialReference;return zn()||Fn(s,e)?Ft(i,e):vn?vn.projectGeometry(i,e,t,n):(await Promise.race([jh(n),Nn(n)]),aa(i,e,t,n))}async function km(i,e){try{return i?.spatialReference?await tl(i,e):null}catch{return null}}let P=class extends T{constructor(e){super(e),this.required={extent:!1,heightModelInfo:!1,tileInfo:!1},this.defaultSpatialReference=null,this.userSpatialReference=null,this.sourcePreloadCount=10,this.priorityCollection=null,this.requiresExtentInSpatialReference=!0,this.suspended=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._projectExtentTask.task&&(this._projectExtentTask.task=mi(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return this.userSpatialReference??this._spatialReferenceTask.spatialReference}get extent(){return this._extentTask.extent}get heightModelInfo(){return this._heightModelInfoTask.heightModelInfo}get vcsWkid(){return this._heightModelInfoTask.vcsWkid}get latestVcsWkid(){return this._heightModelInfoTask.latestVcsWkid}get viewingMode(){return this.userSpatialReference==null||this.userSpatialReference.equals(this._spatialReferenceTask.spatialReference)?this._spatialReferenceTask.viewingMode:null}get tileInfo(){return this._tileInfoTask.tileInfo}get mapCollections(){const e=this.map?.(),t=[];return this.priorityCollection!=null&&t.push(this.priorityCollection),t.push({parent:e?.basemap,layers:e?.basemap?.baseLayers},{parent:e?.basemap,layers:e?.basemap?.groundLayers},{layers:e?.layers},{parent:e?.ground,layers:e?.ground?.layers},{parent:e?.basemap,layers:e?.basemap?.referenceLayers}),t}get _spatialReferenceTask(){if(this.suspended)return this._get("_spatialReferenceTask")??{updating:!1};let e;if(this._collectLayers(this.mapCollections,n=>{const s=this._getSupportedSpatialReferences(n);if(s.length>0){const o=this._narrowDownSpatialReferenceCandidates(e,s);o!=null&&(e=o)}return e?.length===1})&&e?.length!==1)return{updating:!0};const t=this._pickSpatialReferenceCandidate(e);return{spatialReference:t?.spatialReference??null,viewingMode:t?.viewingMode??null,updating:!1}}get _tileInfoTask(){if(!this.required.tileInfo)return this._get("_tileInfoTask")??{updating:!1};const e=this.map?.(),t=this.spatialReference;if(!t)return{updating:this._spatialReferenceTask.updating};let n;const s=this._collectLayers([{parent:e?.basemap,layers:e?.basemap?.baseLayers},{parent:e?.basemap,layers:e?.basemap?.groundLayers},{layers:e?.layers}],o=>!(!("tileInfo"in o)||!o.tileInfo?.spatialReference.equals(t))&&(n=o,!0),o=>"tileInfo"in o);return n?{tileInfo:n.tileInfo,updating:!1}:{updating:s}}get _heightModelInfoTask(){if(!this.required.heightModelInfo||this.suspended&&this._get("_heightModelInfoTask")?.heightModelInfo)return this._get("_heightModelInfoTask")??{updating:!1};let e={};const t=this._collectLayers(this.mapCollections,n=>{const s=ta(n);return!!s&&(e={heightModelInfo:s,vcsWkid:n.spatialReference?.vcsWkid,latestVcsWkid:n.spatialReference?.latestVcsWkid},!0)},n=>Wh(n));return{...e,updating:t}}get _extentCandidatesTask(){if(this.suspended||!this.required.extent)return this._get("_extentCandidatesTask")??{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const e=[],t=this._collectLayers(this.mapCollections,n=>{const s="fullExtents"in n&&n.fullExtents||(n.fullExtent!=null?[n.fullExtent]:[]),o=this.requiresExtentInSpatialReference?null:s[0],a=s.find(l=>l.spatialReference.equals(this.spatialReference))??o;if(a)return e.push({extent:a,layer:n}),!0;if(this._getSupportedSpatialReferences(n).length>0)for(const l of s)e.push({extent:l,layer:n});return!1});return{candidates:e,updating:t}}get _extentTask(){const{candidates:e,updating:t}=this._extentCandidatesTask;if(t)return{updating:t};if(e==null||e.length===0)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const n=this._pickExtentCandidate(e),s=this.spatialReference;return n.extent.equals(this._projectExtentTask.input)&&s.equals(this._projectExtentTask.spatialReference)?{extent:this._projectExtentTask.output,updating:this._projectExtentTask.task!=null&&!this._projectExtentTask.task.finished}:(this._projectExtentTask.task!=null&&(this._projectExtentTask.task=mi(this._projectExtentTask.task)),this._projectExtentTask={input:n.extent.clone(),output:null,spatialReference:s.clone(),task:Di(async o=>{try{const a=await aa(n.extent,s,"portalItem"in n.layer?n.layer.portalItem:void 0,o);this._projectExtentTask={...this._projectExtentTask,task:null,output:a}}catch{if(hn(o))return;this._projectExtentTask={...this._projectExtentTask,task:null}}})},{updating:!0})}_narrowDownSpatialReferenceCandidates(e,t){if(e==null)return t;const n=new Array;for(const s of e)for(const o of t){if(!s.spatialReference.equals(o.spatialReference))continue;const a=Bh(s.viewingMode,o.viewingMode);if(a!==!1){n.push({spatialReference:s.spatialReference,viewingMode:a});break}}return n.length>0?n:null}_pickSpatialReferenceCandidate(e){const t=this.defaultSpatialReference;return e==null||e.length<1?t?{spatialReference:t,viewingMode:null}:null:(t!=null&&e.length>1&&e.some(({spatialReference:n})=>n.equals(t))&&(e=e.filter(({spatialReference:n})=>n.equals(t))),e.length>1&&e.some(({viewingMode:n})=>n!==2)&&(e=e.filter(({viewingMode:n})=>n!==2)),e[0])}
2_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(t.length===0)return[];const n=[];for(const s of t){const o=this.getSpatialReferenceSupport(s,e);if(o!=null){const a=o.constraints??[{spatialReference:s,viewingMode:null}];for(const{spatialReference:l,viewingMode:c}of a)this.requiresExtentInSpatialReference&&this.userSpatialReference!=null&&!l.equals(this.userSpatialReference)||n.push({spatialReference:l,viewingMode:c})}}return n}_pickExtentCandidate(e){const t=this.spatialReference;return e.find(({extent:n})=>t.equals(n.spatialReference))||e[0]}_collectLayers(e,t,n=()=>!0){switch(this._loadMaybe(this.map?.())){case"loading":return!0;case"failed":return!1}const s=new Uh(n,t);for(const o of e)if(this._collectCollection(o,s),s.done||s.preloading===this.sourcePreloadCount)break;return s.updating}_collectCollection(e,t){if(e.layers){switch(this._loadMaybe(e.parent)){case"loading":return t.updating=!0,void++t.preloading;case"failed":return}for(const n of e.layers)if((n.type!=="graphics"||!n.internal)&&t.layerFilter(n)){switch(this._loadMaybe(n)){case"failed":continue;case"loading":t.updating=!0,++t.preloading;break;case"loaded":if(t.updating||(t.done=t.pushLayer(n)),t.done||t.preloading===this.sourcePreloadCount)break;"layers"in n&&this._collectCollection({layers:n.layers},t)}if(t.done||t.preloading===this.sourcePreloadCount)break}}}_loadMaybe(e){return e&&"loadStatus"in e&&e.loadStatus!=null?e.loadStatus==="not-loaded"?(e.load().catch(t=>{cn(t)}),"loading"):e.loadStatus:"loaded"}};r([h()],P.prototype,"required",void 0),r([h({constructOnly:!0})],P.prototype,"map",void 0),r([h({constructOnly:!0})],P.prototype,"getSpatialReferenceSupport",void 0),r([h()],P.prototype,"defaultSpatialReference",void 0),r([h()],P.prototype,"userSpatialReference",void 0),r([h()],P.prototype,"sourcePreloadCount",void 0),r([h()],P.prototype,"priorityCollection",void 0),r([h()],P.prototype,"requiresExtentInSpatialReference",void 0),r([h()],P.prototype,"suspended",void 0),r([h({readOnly:!0})],P.prototype,"ready",null),r([h({readOnly:!0})],P.prototype,"heightModelInfoReady",null),r([h({readOnly:!0})],P.prototype,"spatialReference",null),r([h({readOnly:!0})],P.prototype,"extent",null),r([h({readOnly:!0})],P.prototype,"heightModelInfo",null),r([h({readOnly:!0})],P.prototype,"vcsWkid",null),r([h({readOnly:!0})],P.prototype,"latestVcsWkid",null),r([h({readOnly:!0})],P.prototype,"viewingMode",null),r([h({readOnly:!0})],P.prototype,"tileInfo",null),r([h({readOnly:!0})],P.prototype,"mapCollections",null),r([h({readOnly:!0})],P.prototype,"_spatialReferenceTask",null),r([h({readOnly:!0})],P.prototype,"_tileInfoTask",null),r([h({readOnly:!0})],P.prototype,"_heightModelInfoTask",null),r([h({readOnly:!0})],P.prototype,"_extentCandidatesTask",null),r([h()],P.prototype,"_extentTask",null),r([h()],P.prototype,"_projectExtentTask",void 0),P=r([_("esri.views.support.DefaultsFromMap")],P);let Uh=class{constructor(e,t){this.layerFilter=e,this.pushLayer=t,this.preloading=-1,this.updating=!1,this.done=!1}};function Bh(i,e){return i!=null?e!=null?i===e&&i:i:e}function Kh(i){return"tryRecycleWith"in i}let Yh=class{constructor(e,t,n){this.layer=e,this.view=t,this.layerViewImporter=n,this._controller=new AbortController,this._started=!1,this.done=!1,this._deferred=Ot(),this.promise=this._deferred.promise,un(this._controller.signal,()=>{this._recycleController?.abort();const s=new M("cancelled:layerview-create","layerview creation cancelled",{layer:e});this._deferred?.reject(s)})}tryRecycle(e){if(!this.done||!this.layerView||!Kh(this.layerView))return null;this._recycleController?.abort(),this._recycleController=new AbortController;const t=this.layer.type,n=this._recycleController.signal;for(let s=0;s<e.length;s++){const o=e[s];if(o.type!==t)continue;const a=this.layerView.tryRecycleWith(o,{signal:n});if(a){e.splice(s,1),this.layer=o;const l=this.layerView,c=l.view;return this.promise=a.then(()=>(Se(n),o.emit("layerview-destroy",{view:c,layerView:l}),c.emit("layerview-destroy",{view:c,layerView:l}),o.emit("layerview-create",{view:c,layerView:l}),c.emit("layerview-create",{view:c,layerView:l}),l)),this.promise}}return null}destroy(){this._controller.abort();const{layerView:e}=this;if(e){const{layer:t,view:n}=this;t.emit("layerview-destroy",{view:n,layerView:e}),n.emit("layerview-destroy",{layer:t,layerView:e})}this.done=!0,this.layer=null,this.layerView=null,this.view=null,this.layerViewImporter=null,this._map=null,this.promise=null,this._deferred=null}async start(){const{view:e}=this;if(this._started||!e.map)return;this._started=!0;const{_controller:{signal:t},layer:n}=this;this._map=e.map;try{let s,o;
2if(await n.load({signal:t}),n.prefetchResources&&await n.prefetchResources({signal:t}),Jh(n))s=await n.createLayerView(e,{signal:t});else{if(!this.layerViewImporter.hasLayerViewModule(n))throw new M("layer:view-not-supported","No layerview implementation was found");const c=await this.layerViewImporter.importLayerView(n);Se(t),s="default"in c?new c.default({layer:n,view:e}):new c({layer:n,view:e})}const a=()=>{o=ee(o),s.destroyed||s.destroy(),this.done=!0};o=un(t,a),Se(t);try{await s.when()}catch(c){throw a(),c}if(!this._map?.allLayers?.includes(n))return a(),void this._deferred?.reject(new M("view:no-layerview-for-layer","The layer has been removed from the map",{layer:n}));this.layerView=s,n.emit("layerview-create",{view:e,layerView:s}),e.emit("layerview-create",{layer:n,layerView:s}),this.done=!0,this._deferred?.resolve(s)}catch(s){n.emit("layerview-create-error",{view:e,error:s}),e.emit("layerview-create-error",{layer:n,error:s}),this.done=!0,this._deferred?.reject(new M("layerview:create-error","layerview creation failed",{layer:n,error:s}))}}};function Jh(i){return i.createLayerView!==pl.prototype.createLayerView}function Qh(i){return i!=null&&typeof i=="object"&&"layerViews"in i}let j=class extends T{constructor(e){super(e),this._layerLayerViewInfoMap=new Map,this._recyclingInfoMap=new Map,this._watchUpdatingTracking=new Ri,this.supportsGround=!0,this._preloadLayerViewModules=()=>{const t=this.view.map?.allLayers;if(t)for(const n of t)this.layerViewFilter?.(n)!==!1&&this.layerViewImporter.hasLayerViewModule(n)&&this.layerViewImporter.importLayerView(n)},this._reschedule=()=>this.destroyed?Promise.reject():(this._workPromise==null&&(this._workPromise=Ot(),this._workPromise.promise.catch(()=>{})),this.removeHandles("reschedule"),this.addHandles(To(this._doWork),"reschedule"),this._workPromise.promise),this._doWork=()=>{if(this.destroyed)return;const{map:t}=this.view;if(!t)return void this.clear();if(this._map!==t&&(this.clear(),this._map=t),this._workPromise==null)return void this.notifyChange("updating");this.removeHandles("reschedule"),this.removeHandles("collection-change");const n=new Set,s=[],o=this.view.ready,a=d=>{if(d!=null){for(const p of d)if(p){if(this.layerViewFilter?.(p)===!1)continue;n.add(p);const m=this._layerLayerViewInfoMap.get(p);m&&o?m.start():m||this._recyclingInfoMap.has(p)||s.push(p),"layers"in p&&p.layers&&a(p.layers)}}};for(const d of this._rootCollectionNames)a(Wt(this,d));const l=new Array,c=d=>{const p=d.tryRecycle(s);p?(this._recyclingInfoMap.set(d.layer,d),this.notifyChange("updating"),p.then(()=>{this._recyclingInfoMap.delete(d.layer),this._layerLayerViewInfoMap.set(d.layer,d),this._reschedule(),this.notifyChange("updating")}).catch(m=>{cn(m)||(this._recyclingInfoMap.delete(d.layer),d.destroy(),this._reschedule(),this.notifyChange("updating"))})):l.push(d)};for(const d of this._layerLayerViewInfoMap.values())n.has(d.layer)||(this._layerLayerViewInfoMap.delete(d.layer),c(d));for(const d of this._recyclingInfoMap.values())n.has(d.layer)||(this._recyclingInfoMap.delete(d.layer),c(d));for(const d of s)this._createLayerView(d);this._refreshCollections(),l.forEach(d=>d.destroy());const u=[t?.ground?.layers,t?.basemap?.baseLayers,t?.basemap?.groundLayers,t?.basemap?.referenceLayers,t?.layers].filter(d=>!!d);n.forEach(d=>"layers"in d&&u.push(d.layers)),this.addHandles(u.map(d=>this._watchUpdatingTracking.addOnCollectionChange(()=>d,this._reschedule)),"collection-change"),this._workPromise.resolve(),this._workPromise=null},this._layersToLayerViews=new Map(e.layerviewMapping)}initialize(){this.addHandles([Ei(()=>this.view?.map?.allLayers,"change",this._preloadLayerViewModules,{onListenerAdd:this._preloadLayerViewModules}),w(()=>{const e=this.view,t=e?.map;return[t?.basemap,t?.ground,t?.layers,e?.ready]},()=>this._reschedule(),X)]),this._preloadLayerViewModules(),this._reschedule()}clearHandles(){this._watchUpdatingTracking.removeAll()}destroy(){this.clear(),Ut(this._recyclingInfoMap),Ut(this._layerLayerViewInfoMap),this._watchUpdatingTracking.destroy(),this._map=null,this._workPromise!=null&&(this._workPromise.reject(kt()),this._workPromise=null)}get _rootCollectionNames(){return Array.from(this._layersToLayerViews.keys())}get updating(){return this._workPromise!=null||this._watchUpdatingTracking.updating||gr(this._layerLayerViewInfoMap,e=>!e.done)||this._recyclingInfoMap.size>0}get updatingRemaining(){let e=0;for(const t of this._layerLayerViewInfoMap.values())t.done||++e;return e}clear(){this.destroyed||(this._clearCollections(),Ut(this._layerLayerViewInfoMap),Ut(this._recyclingInfoMap))}async whenLayerView(e){await this._reschedule();const t=this._layerLayerViewInfoMap.get(e)?.promise;if(!t){const n=this._recyclingInfoMap.get(e)?.promise;if(!n)throw new M("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:e});return n}return t}isCreatingLayerViewsForLayer(e,t){this.commitProperty("updatingRemaining");const n=this._layerLayerViewInfoMap.get(e);if(!n?.done)return!0;const s=n.layerView;return!(!s||!t||s.parent===t)||!!(n.done&&s&&"layers"in e&&e.layers?.length)&&e.layers.some(o=>this.isCreatingLayerViewsForLayer(o,s))}_refreshCollections(){for(const[e,t]of this._layersToLayerViews)this._populateLayerViewsOwners(Wt(this,e),Wt(this,t),this.view);this.notifyChange("updating"),this.notifyChange("updatingRemaining")}_clearCollections(){for(const e of this._layersToLayerViews.values())Wt(this,e)?.removeAll()}_populateLayerViewsOwners(e,t,n){if(!e||!t)return void t?.removeAll();let s=0;for(const o of e){const a=this._layerLayerViewInfoMap.get(o);if(!a?.layerView)continue;const{layerView:l}=a;l.layer=o,l.parent=n,t.at(s)!==l&&t.splice(s,0,l),"layers"in o&&Qh(l)&&this._populateLayerViewsOwners(o.layers,l.layerViews,l),++s}s<t.length&&t.splice(s)}_createLayerView(e){e.load().catch(()=>{}),this.layerViewImporter.hasLayerViewModule(e)&&this.layerViewImporter.importLayerView(e);const t=new Yh(e,this.view,this.layerViewImporter);t.promise?.then(()=>this._refreshCollections(),n=>{n&&(cn(n)||n.name==="cancelled:layerview-create")||k.getLogger(this).error(`Failed to create layerview for layer title:'${e.title??"no title"}', id:'${e.id??"no id"}' of type '${e.type}'.`,{layer:e,error:n}),this.destroyed||this._refreshCollections()}),this._layerLayerViewInfoMap.set(e,t),this.view.ready&&t.start(),this.notifyChange("updating"),this.notifyChange("updatingRemaining")}};r([h()],j.prototype,"_workPromise",void 0),r([h({readOnly:!0})],j.prototype,"_watchUpdatingTracking",void 0),r([h({readOnly:!0})],j.prototype,"_layersToLayerViews",void 0),r([h({constructOnly:!0})],j.prototype,"layerviewMapping",void 0),r([h({readOnly:!0})],j.prototype,"_rootCollectionNames",null),r([h({constructOnly:!0})],j.prototype,"layerViewFilter",void 0),r([h()],j.prototype,"layerViewImporter",void 0),r([h()],j.prototype,"supportsGround",void 0),r([h({readOnly:!0})],j.prototype,"updating",null),r([h({readOnly:!0})],j.prototype,"updatingRemaining",null),r([h({constructOnly:!0})],j.prototype,"view",void 0),j=r([_("esri.views.support.LayerViewManager")],j);const Xh=j;let rt=class extends T{constructor(e){super(e),this.featureTitleFields=!1,this.utilityNetworkFields=!1,this.globalIdField=!1}};r([h()],rt.prototype,"featureTitleFields",void 0),r([h()],rt.prototype,"utilityNetworkFields",void 0),r([h()],rt.prototype,"globalIdField",void 0),rt=r([_("esri.views.support.RequiredFieldsOptions")],rt);const ec=rt;var lt,Fe;let y=(Fe=class extends Ur(zo){constructor(e){super(e),this._userSpatialReference=null,this.handles=new $o,this.updatingHandles=new Ri,this.allLayerViews=new Lo({getCollections:()=>this.layerviewCollections,getChildrenFunction:ic}),this.analyses=new vt,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new Fo,this.typeSpecificPreconditionsReady=!0,this.layerViews=new S,this.magnifier=new Wo,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new S,this._highPriorityCursorHandles=new S,this.input=new Hh,this.navigation=new Oi,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new Bo(this),this.persistableViewModels=new S,this.requiredFieldsOptions=new ec,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this.theme=null,this.handles.add(w(()=>
2this.preconditionsReady,t=>{const n=this.ready;if(t?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,lt.views.add(this)):(this._lockedSpatialReference=null,lt.views.remove(this)),this.notifyChange("spatialReference"),!t&&n)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._teardown();else if(t&&!n){try{this._startup()}catch(s){return void queueMicrotask(()=>{this.fatalError=new M("view:startup-error","View._startup failed",s)})}this.analysisViewManager?.attach(),this.toolViewManager.attach()}},Dt))}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this._validateWithErrorDisplay()]).then(()=>(this._isValid=!0,On(()=>this.ready)))),this.basemapView=new sh({view:this}),this.layerViewManager=new Xh({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new pe({view:this}),this.selectionManager=new rh({view:this}),this.addHandles([Ke(()=>this.readyState==="map-content-error"&&!this.spatialReference,()=>{k.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),w(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},X),w(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},Dt),w(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},X)])}get _layerToLayerviewMapping(){return lt._layerToLayerview}destroy(){this.destroyed||(lt.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=ie(this.graphics),this.analyses=ie(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=ie(this.analysisViewManager),this.toolViewManager=ie(this.toolViewManager),this.layerViewManager=ie(this.layerViewManager),this.selectionManager=ie(this.selectionManager),this.basemapView=ie(this.basemapView),this.layerViews?.forEach(e=>e.destroy()),this.layerViews.length=0,this.invalidate(),this.handles.destroy(),this.map=ie(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return k.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new P({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get highlights(){return this._get("highlights")??Oh()}set highlights(e){this._set("highlights",Ao(e,this._get("highlights"),S.ofType(ze)))}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){return!this.destroying&&!this.destroyed&&!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||hs(this.map)&&!this.map.loaded||this.width===0||this.height===0||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(k.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),hs(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,n=this.map.basemap?.loaded??!0;return e&&n&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=Di(s=>fr(F("view-readyState-waiting-delay"),null,s)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=mi(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const e=this._userSpatialReference||this._lockedSpatialReference||this.getDefaultSpatialReference()||null;if(e&&this.defaultsFromMap?.required?.heightModelInfo){const t=e.clone();return t.vcsWkid=this.defaultsFromMap.vcsWkid,t.latestVcsWkid=this.defaultsFromMap.latestVcsWkid,t}return e}set spatialReference(e){const t=!Pi(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??Br}set timeZone(e){this._userTimeZone=e,gl(e)||k.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}
2get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const n=t==="high"?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,s={cursor:e},o=Ye(()=>n.remove(s));return n.add(s),this.addHandles(o),o}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new gn}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getDefaultSpatialReference(){return this.defaultsFromMap?.spatialReference}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new M("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}when(e,t){return this.isResolved()&&!this.ready&&k.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(Ke(()=>this.destroyed||this.preconditionsReady===!1,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}async _validateWithErrorDisplay(){try{await this.validate()}catch(e){const t=document.createElement("div");t.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const n=document.createElement("div");n.innerHTML="Unable to display map. WebGL2 support is required.",n.setAttribute("style","font-size: 24px; font-weight: bold;");const s=document.createElement("div");s.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",s.setAttribute("style","font-size: 18px;");const o=document.createElement("a");o.innerHTML="https://esriurl.com/webgl-faq",o.target="_blank",o.setAttribute("style","font-size: 18px;"),o.href="https://esriurl.com/webgl-faq",t.appendChild(n),t.appendChild(s),t.appendChild(o);const a=this.getSurface();throw a&&a.appendChild(t),e}}},lt=Fe,Fe._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]],Fe.views=new S,Fe);r([h()],y.prototype,"_userSpatialReference",void 0),r([h()],y.prototype,"activeTool",null),r([h({readOnly:!0})],y.prototype,"allLayerViews",void 0),r([h({readOnly:!0})],y.prototype,"layerviewCollections",null),r([h(pn(vt,"analyses"))],y.prototype,"analyses",void 0),r([h()],y.prototype,"animation",null),r([h()],y.prototype,"basemapView",void 0),r([h()],y.prototype,"center",null),r([h()],y.prototype,"defaultsFromMapSettings",null),r([h()],y.prototype,"defaultsFromMap",null),r([h()],y.prototype,"dependencies",void 0),r([h()],y.prototype,"displayFilterEnabled",void 0),r([h({type:Je})],y.prototype,"extent",null),r([h()],y.prototype,"fatalError",void 0),r([h(pn(Fo,"graphics"))],y.prototype,"graphics",void 0),r([h({readOnly:!0,type:Ai})],y.prototype,"heightModelInfo",null),r([h({type:S.ofType(ze)})],y.prototype,"highlights",null),r([h({readOnly:!0})],y.prototype,"interacting",null),r([h({constructOnly:!0})],y.prototype,"layerViewFilter",void 0),r([h({readOnly:!0})],y.prototype,"navigating",null),r([h({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_lockedSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],y.prototype,"preconditionsReady",null),r([h({readOnly:!0})],y.prototype,"typeSpecificPreconditionsReady",void 0),r([h({type:S,readOnly:!0})],y.prototype,"layerViews",void 0),r([h()],y.prototype,"resolution",null),r([h({type:Wo})],y.prototype,"magnifier",void 0),r([h({value:null,type:qr})],y.prototype,"map",null),r([h()],y.prototype,"padding",void 0),r([h({readOnly:!0})],y.prototype,"ready",void 0),r([h()],y.prototype,"_readyStateWaitingTask",void 0),r([h({readOnly:!0})],y.prototype,"readyState",null),r([h({type:gi})],y.prototype,"spatialReference",null),r([h()],y.prototype,"stationary",null),r([h({type:ml})],y.prototype,"timeExtent",null),r([h({type:String,nonNullable:!0})],y.prototype,"timeZone",null),r([h()],y.prototype,"tools",null),r([h()],y.prototype,"toolViewManager",void 0),r([h({readOnly:!0})],y.prototype,"type",void 0),r([h({type:Number})],y.prototype,"scale",void 0),r([h({readOnly:!0})],y.prototype,"updating",void 0),r([h({readOnly:!0})],y.prototype,"initialExtentRequired",void 0),r([h({readOnly:!0})],y.prototype,"initialExtent",null),r([h()],y.prototype,"cursor",null),r([h({readOnly:!0})],y.prototype,"input",void 0),r([h({type:Oi,nonNullable:!0})],y.prototype,"navigation",void 0),r([h()],y.prototype,"layerViewManager",void 0),r([h()],y.prototype,"analysisViewManager",void 0),r([h()],y.prototype,"selectionManager",void 0),r([h()],y.prototype,"width",void 0),r([h()],y.prototype,"height",void 0),r([h({readOnly:!0})],y.prototype,"resizing",void 0),r([h({value:null,readOnly:!0})],y.prototype,"size",null),r([h({readOnly:!0})],y.prototype,"suspended",void 0),r([h({readOnly:!0})],y.prototype,"viewEvents",void 0),r([h({readOnly:!0})],y.prototype,"persistableViewModels",void 0),r([h()],y.prototype,"_isValid",void 0),r([h()],y.prototype,"_readyCycleForced",void 0),r([h()],y.prototype,"_lockedSpatialReference",void 0),r([h()],y.prototype,"_userTimeZone",void 0),r([h()],y.prototype,"_lockedTimeZone",void 0),r([h()],y.prototype,"_userTimeExtent",void 0),r([h()],y.prototype,"_lockedTimeExtent",void 0),r([h({type:gn}
2)],y.prototype,"theme",void 0),r([h({readOnly:!0,type:gn})],y.prototype,"effectiveTheme",null),y=lt=r([_("esri.views.View")],y);const Yi=globalThis.$arcgis;Yi&&!Yi.views&&Object.defineProperty(Yi,"views",{configurable:!1,enumerable:!0,writable:!1,value:y.views});const tc=y;function ic(i){return i.layerViews}function ye(){return[1,0,0,1,0,0]}function nc(i){return[i[0],i[1],i[2],i[3],i[4],i[5]]}function sc(i,e,t,n,s,o){return[i,e,t,n,s,o]}const oc=ye();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:oc,clone:nc,create:ye,fromValues:sc},Symbol.toStringTag,{value:"Module"}));const ra=96,la=39.37,ac=180/Math.PI;function ha(i){return i.wkid?i:i.spatialReference||gi.WGS84}function jn(i,e){return e.type?z(i,e.x,e.y):It(i,e)}function ca(i){return Po(i)}function zi(i,e,t=0){let n=i.width,s=i.height;if(t!==0){const l=Si(t),c=Math.abs(Math.cos(l)),u=Math.abs(Math.sin(l));n=i.width*c+i.height*u,s=i.width*u+i.height*c}const o=Math.max(1,e[0]),a=Math.max(1,e[1]);return Math.max(n/o,s/a)*mc(i.spatialReference)}async function Ct(i,e,t,n){let s,o;if(!i||Array.isArray(i)&&!i.length)return null;if(S.isCollection(i)&&(i=i.toArray()),Array.isArray(i)&&i.length&&typeof i[0]=="object"){const l=i.every(d=>"attributes"in d),c=i.some(d=>!d.geometry);let u=i;if(l&&c&&e&&e.allLayerViews){const d=new Map;for(const v of i){const f=v.layer,I=d.get(f)||[],$=v.attributes[f.objectIdField];$!=null&&I.push($),d.set(f,I)}const p=[];d.forEach((v,f)=>{const I=e.allLayerViews?.find($=>$.layer.id===f.id);if(I&&"queryFeatures"in I){const $=f.createQuery();$.objectIds=v,$.returnGeometry=!0,p.push(I.queryFeatures($))}});const m=await Promise.all(p),g=[];for(const v of m)if(v&&v.features&&v.features.length)for(const f of v.features)f.geometry!=null&&g.push(f.geometry);u=g}for(const d of u)n=await Ct(d,e,t,n);return n}if(Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number")s=new O(i);else if(i instanceof So)s=i;else if("geometry"in i){if(i.geometry)s=i.geometry;else if(i.layer){const l=i.layer,c=e.allLayerViews?.find(u=>u.layer.id===l.id);if(c&&"queryFeatures"in c){const u=l.createQuery();u.objectIds=[i.attributes[l.objectIdField]],u.returnGeometry=!0,s=(await c.queryFeatures(u))?.features?.[0]?.geometry}}}if(s==null)return null;switch(s.type){case"point":o=new Je({xmin:s.x,ymin:s.y,xmax:s.x,ymax:s.y,spatialReference:s.spatialReference});break;case"extent":case"multipoint":case"polygon":case"polyline":o=xl(s);break;default:o=s.extent}if(!o)return null;zn()||Fn(o.spatialReference,t)||await Nn();const a=Ft(o,t);if(!a)return null;if(n){const l=a.center,c=l.clone();c.x=qn(l.x,n.center.x,t),c.x!==l.x&&a.centerAt(c),n=n.union(a)}else n=a;return n}function rc(i){if(i&&(!Array.isArray(i)||typeof i[0]!="number")&&(typeof i=="object"||Array.isArray(i)&&typeof i[0]=="object")){if("layer"in i&&i.layer?.minScale!=null&&i.layer.maxScale!=null){const e=i.layer;return{min:e.minScale,max:e.maxScale}}if(Array.isArray(i)&&i.length&&i.every(e=>"layer"in e)){let e=0,t=0;for(const n of i){const s=n.layer;s?.minScale&&s.maxScale&&(e=s.minScale<e?s.minScale:e,t=s.maxScale>t?s.maxScale:t)}return e&&t?{min:e,max:t}:null}}}function Ss(i,e){const t=ha(i);return Pi(t,e)||t.imageCoordinateSystem||e.imageCoordinateSystem?i:Ft(i,e)}async function lc(i,e){if(!i||!e)return new se({targetGeometry:new O,scale:0,rotation:0});let t=e.spatialReference;const{constraints:n,padding:s,viewpoint:o,size:a}=e,l=[s?a[0]-s.left-s.right:a[0],s?a[1]-s.top-s.bottom:a[1]];let c=null;i instanceof se?c=i:i.viewpoint?c=i.viewpoint:i.target&&i.target.declaredClass==="esri.Viewpoint"&&(c=i.target);let u=null;c?.targetGeometry?u=c.targetGeometry:i instanceof Je?u=i:i instanceof So?u=await Ct(i,e,t):i&&(u=await Ct(i.center,e,t)||await Ct(i.target,e,t)||await Ct(i,e,t)),!u&&o?.targetGeometry?u=o.targetGeometry:!u&&e.extent&&(u=e.extent),t||(t=ha(e.spatialReference||e.extent||u)),zn()||Pi(u.spatialReference,t)||Fn(u.spatialReference,t)||await Nn();const d=Ss(u,t),p="center"in d?d.center:d;e.pickClosestTarget!==!1&&p.type==="point"&&o.targetGeometry?.type==="point"&&(p.x=qn(p.x,o.targetGeometry.x,p.spatialReference));let m=0;c?m=c.rotation:i.hasOwnProperty("rotation")?m=i.rotation:o&&(m=o.rotation);let g=0;g=c?.targetGeometry!=null&&c.targetGeometry.type==="point"?c.scale:"scale"in i&&i.scale?i.scale:"zoom"in i&&i.zoom!==-1&&n&&n.effectiveLODs?n.zoomToScale(i.zoom):Array.isArray(u)||u.type==="point"||u.type==="extent"&&u.width===0&&u.height===0?o.scale:zi(Ss(u.extent,t),l,m);const v=rc(i.target??i);v&&(v.min&&v.min<g?g=v.min:v.max&&v.max>g&&(g=v.max));let f=new se({targetGeometry:p,scale:g,rotation:m});return n&&(f=n.fit(f),n.constrainByGeometry(f),n.rotationEnabled||(f.rotation=o.rotation)),f}function Z(i,e){const t=i.targetGeometry,n=e.targetGeometry;return t.x=n.x,t.y=n.y,t.spatialReference=n.spatialReference,i.scale=e.scale,i.rotation=e.rotation,i}function hc(i,e,t){return t?z(i,.5*(e[0]-t.right+t.left),.5*(e[1]-t.bottom+t.top)):Ci(i,e,.5)}const cc=(function(){const i=D();return function(e,t,n){const s=t.targetGeometry;jn(i,s);const o=.5*wt(t);return e.xmin=i[0]-o*n[0],e.ymin=i[1]-o*n[1],e.xmax=i[0]+o*n[0],e.ymax=i[1]+o*n[1],e.spatialReference=s.spatialReference,e}})();function uc(i,e,t,n,s){return wn(i,e,t.center),i.scale=zi(t,n),s?.constraints?.constrain(i),i}function dc(i,e,t,n){return Kn(i,e,t,n),Zo(i,i)}const ua=(function(){const i=D();return function(e,t,n){return Co(e,gc(e,t),hc(i,t,n))}})(),pc=(function(){const i=ye(),e=D();return function(t,n,s,o){const a=wt(n),l=Un(n);return z(e,a,a),_l(i,e),Li(i,i,l),At(i,i,ua(e,s,o)),At(i,i,[0,o.top-o.bottom]),z(t,i[4],i[5])}})();function wt(i){return i.scale*da(i.targetGeometry?.spatialReference)}function da(i){return ko(i)?1/(ca(i)*la*ra):1}function Un(i){return Eo(i.rotation)||0}function mc(i){return ko(i)?ca(i)*la*ra:1}function gc(i,e){return Ci(i,e,.5)}const Bn=(function(){const i=D(),e=D(),t=D();return function(n,s,o,a,l,c){return wr(i,s),Ci(e,o,.5*c),z(t,1/a*c,-1/a*c),Ho(n,e),l&&Li(n,n,l),Zn(n,n,t),At(n,n,i),n}})(),Kn=(function(){const i=D();return function(e,t,n,s){const o=wt(t),a=Un(t);return jn(i,t.targetGeometry),Bn(e,i,n,o,a,s)}})(),fc=(function(){const i=D();return function(e,t,n,s){const o=wt(t);return jn(i,t.targetGeometry),Bn(e,i,n,o,0,s)}})();function pa(i){const e=Vo(i);return e?e.valid[1]-e.valid[0]:0}function yc(i,e){return Math.round(pa(i)/e)}const _c=(function(){const i=D(),e=D(),t=[0,0,0];return function(n,s,o){dn(i,n,s),ns(i,i),dn(e,n,o),ns(e,e),_r(t,i,e);
2let a=Math.acos(vr(i,e)/(ss(i)*ss(e)))*ac;return t[2]<0&&(a=-a),isNaN(a)&&(a=0),a}})(),vc=(function(){const i=D();return function(e,t,n,s){const o=e.targetGeometry;return Z(e,t),pc(i,t,n,s),o.x+=i[0],o.y+=i[1],e}})(),wn=function(i,e,t){Z(i,e);const n=i.targetGeometry;return n.x=t.x,n.y=t.y,n.spatialReference=t.spatialReference,i},wc=(function(){const i=D();return function(e,t,n,s,o){o||(o="center"),Co(i,n,s),Ci(i,i,.5);const a=i[0],l=i[1];switch(o){case"center":z(i,0,0);break;case"left":z(i,-a,0);break;case"top":z(i,0,l);break;case"right":z(i,a,0);break;case"bottom":z(i,0,-l);break;case"top-left":z(i,-a,l);break;case"bottom-left":z(i,-a,-l);break;case"top-right":z(i,a,l);break;case"bottom-right":z(i,a,-l)}return Fi(e,t,i),e}})();function Im(i,e,t){return Z(i,e),i.rotation+=t,i}function bc(i,e,t){return Z(i,e),i.rotation=t,i}const Mc=(function(){const i=D();return function(e,t,n,s,o){return Z(e,t),isNaN(n)||n===0||(ga(i,s,t,o),e.scale=t.scale*n,fa(i,i,e,o),Fi(e,e,z(i,i[0]-s[0],s[1]-i[1]))),e}})();function Cs(i,e,t){return Z(i,e),i.scale=t,i}const ma=(function(){const i=D();return function(e,t,n,s,o,a){return Z(e,t),isNaN(n)||n===0||(ga(i,o,t,a),e.scale=t.scale*n,e.rotation+=s,fa(i,i,e,a),Fi(e,e,z(i,i[0]-o[0],o[1]-i[1]))),e}})(),Rm=(function(){const i=D(),e=D();return function(t,n,s,o,a,l,c){return ua(e,l,c),yr(i,a,e),o?ma(t,n,s,o,i,l):Mc(t,n,s,i,l)}})(),ga=(function(){const i=ye();return function(e,t,n,s){return ke(e,t,dc(i,n,s,1))}})(),fa=(function(){const i=ye();return function(e,t,n,s){return ke(e,t,Kn(i,n,s,1))}})(),Fi=(function(){const i=D(),e=ye();return function(t,n,s){Z(t,n);const o=wt(n),a=t.targetGeometry;return yl(e,Un(n)),Zn(e,e,fl(o,o)),ke(i,s,e),a.x+=i[0],a.y+=i[1],t}})();function ri(){const i=new Float32Array(9);return i[0]=1,i[4]=1,i[8]=1,i}function xc(i){const e=new Float32Array(9);return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e}function Tc(i,e,t,n,s,o,a,l,c){const u=new Float32Array(9);return u[0]=i,u[1]=e,u[2]=t,u[3]=n,u[4]=s,u[5]=o,u[6]=a,u[7]=l,u[8]=c,u}Object.freeze(Object.defineProperty({__proto__:null,clone:xc,create:ri,fromValues:Tc},Symbol.toStringTag,{value:"Module"}));function $c(i){return i instanceof Float32Array&&i.length>=2}function kc(i){return Array.isArray(i)&&i.length>=2}function Ji(i){return $c(i)||kc(i)}var bn;const ve=[0,0];let Me=bn=class extends br{constructor(i){super(i),this._viewpoint2D={center:D(),rotation:0,scale:0,spatialReference:void 0},this.center=[0,0],this.extent=new Je,this.id=0,this.inverseTransform=ye(),this.resolution=0,this.rotation=0,this.scale=0,this.transform=ye(),this.transformNoRotation=ye(),this.displayMat3=ri(),this.displayViewMat3=ri(),this.viewMat3=ri(),this.viewMat2d=vl(),this.worldScreenWidth=0,this.size=[0,0]}set pixelRatio(i){this._set("pixelRatio",i),this._update()}set size(i){this._set("size",i),this._update()}set viewpoint(i){if(i){const e=this._viewpoint2D,t=i.targetGeometry;e.center[0]=t.x,e.center[1]=t.y,e.rotation=i.rotation,e.scale=i.scale,e.spatialReference=t.spatialReference}this._update()}get visibleArea(){const[i,e]=this.size;return[this.toMap([0,0],0,0),this.toMap([0,0],0,e),this.toMap([0,0],i,e),this.toMap([0,0],i,0)]}copy(i){const e=this.size,t=this.viewpoint;return t&&e?(this.viewpoint=Z(t,i.viewpoint),this._set("size",It(e,i.size))):(this.viewpoint=i.viewpoint.clone(),this._set("size",[i.size[0],i.size[1]])),this._set("pixelRatio",i.pixelRatio),this}clone(){return new bn({size:this.size,viewpoint:this.viewpoint.clone(),pixelRatio:this.pixelRatio})}toMap(i,e,t){return Ji(e)?ke(i,e,this.inverseTransform):(ve[0]=e,ve[1]=t,ke(i,ve,this.inverseTransform))}toScreen(i,e,t){return Ji(e)?ke(i,e,this.transform):(ve[0]=e,ve[1]=t,ke(i,ve,this.transform))}toScreenNoRotation(i,e,t){return Ji(e)?ke(i,e,this.transformNoRotation):(ve[0]=e,ve[1]=t,ke(i,ve,this.transformNoRotation))}wrapMapCoordinate(i,e){It(i,e);const[t]=e,[n]=this.center,{extent:s,spatialReference:o}=this;let{xmin:a,xmax:l}=s;if(o.isWrappable){const c=pa(o)/2;a=Math.max(a,n-c),l=Math.min(l,n+c)}return(t<a||t>l)&&(i[0]=qn(t,n,o)),i}getScreenTransform(i,e){const{center:t}=this._viewpoint2D,n=this._get("pixelRatio")||1,s=this._get("size");return Bn(i,t,s,e,0,n),i}
2_update(){const{center:i,spatialReference:e,scale:t,rotation:n}=this._viewpoint2D,s=this._get("pixelRatio")||1,o=this._get("size"),a=new se({targetGeometry:new O(i[0],i[1],e),scale:t,rotation:n});if(this._set("viewpoint",a),!o||!e||!t)return;this.resolution=wt(a),this.rotation=n,this.scale=t,this.spatialReference=e,It(this.center,i);const l=o[0]!==0?2/o[0]:0,c=o[1]!==0?-2/o[1]:0;Mr(this.displayMat3,l,0,0,0,c,0,-1,1,1);const u=xr(this.viewMat3),d=fs(o[0]/2,o[1]/2),p=fs(-o[0]/2,-o[1]/2),m=Eo(n);os(u,u,d),Tr(u,u,m),os(u,u,p),$r(this.displayViewMat3,this.displayMat3,u);const g=Ho(this.viewMat2d,d);return Li(g,g,m),At(g,g,p),cc(this.extent,a,o),Kn(this.transform,a,o,s),Zo(this.inverseTransform,this.transform),fc(this.transformNoRotation,a,o,s),this.worldScreenWidth=yc(this.spatialReference,this.resolution),this._set("id",this.id+1),this.notifyChange("visibleArea"),this}};r([h({readOnly:!0})],Me.prototype,"id",void 0),r([h({value:1,json:{write:!0}})],Me.prototype,"pixelRatio",null),r([h({json:{write:!0}})],Me.prototype,"size",null),r([h()],Me.prototype,"spatialReference",void 0),r([h({type:se,json:{write:!0}})],Me.prototype,"viewpoint",null),r([h({readOnly:!0})],Me.prototype,"visibleArea",null),Me=bn=r([_("esri.views.2d.ViewState")],Me);const Es=Me;var Mn,xn;let Pe=Mn=class extends T{constructor(){super(...arguments),this.left=0,this.top=0,this.right=0,this.bottom=0}clone(){return new Mn({left:this.left,top:this.top,right:this.right,bottom:this.bottom})}};r([h()],Pe.prototype,"left",void 0),r([h()],Pe.prototype,"top",void 0),r([h()],Pe.prototype,"right",void 0),r([h()],Pe.prototype,"bottom",void 0),Pe=Mn=r([_("esri.views.2d.PaddedViewState.Padding")],Pe);let ht=xn=class extends Es{constructor(...i){super(...i),this.paddedViewState=new Es,this._updateContent=(()=>{const e=D();return()=>{const t=this._get("size"),n=this._get("padding");if(!t||!n)return;const s=this.paddedViewState;z(e,n.left+n.right,n.top+n.bottom),dn(e,t,e),It(s.size,e);const o=s.viewpoint;o&&(this.viewpoint=o)}})(),this.addHandles(w(()=>[this.size,this.padding],()=>this._updateContent(),Dt)),this.padding=new Pe,this.size=[0,0]}set padding(i){this._set("padding",i||new Pe)}set viewpoint(i){if(i){this.paddedViewState.viewpoint=i;let e=i;const t=this._get("padding");t&&(e=vc(i.clone(),i,this._get("size"),t));const{targetGeometry:n,rotation:s,scale:o}=e,{x:a,y:l,spatialReference:c}=n,u=this._viewpoint2D;u.center[0]=a,u.center[1]=l,u.rotation=s,u.scale=o,u.spatialReference=c,this._update()}}clone(){return new xn({padding:this.padding.clone(),size:this.size.slice(),viewpoint:this.paddedViewState.viewpoint.clone(),pixelRatio:this.pixelRatio})}};r([h()],ht.prototype,"paddedViewState",void 0),r([h({type:Pe})],ht.prototype,"padding",null),r([h()],ht.prototype,"viewpoint",null),ht=xn=r([_("esri.views.2d.PaddedViewState")],ht);const Yn=ht;let Pc=class{constructor(e){this.view=e,this._stationaryHandle=null,this._frameTaskHandle=null,this._updateParameters=null,this._updateRequested=!1,this._scheduler=Tl(),this._schedulerHandle=Ke(()=>this._scheduler.updating,()=>this.requestFrame()),this.stationary=!0,this.prepare=()=>{this._updateParameters&&(this._updateParameters.state=this.view.state,this._updateParameters.stationary=this.view.stationary,this._updateParameters.pixelRatio=window.devicePixelRatio,this._updateParameters.renderingOptions=this.view.renderingOptions,this._updateParameters.targetState.copy(this.view.state),this.view.animation?.target==null||Io(this.view.animation.target)||(this._updateParameters.targetState.viewpoint=this.view.animation.target))},this.update=t=>{if(this._updateRequested=!1,this.view?.destroyed)return;const{allLayerViews:n,graphicsView:s,labelManager:o,state:{id:a}}=this.view;n?.forEach(this._updateLayerView,this),o!=null&&(o.lastUpdateId!==a&&(o.viewChange(),o.lastUpdateId=a),o.updateRequested&&o.processUpdate(this._updateParameters)),s!=null&&(s.lastUpdateId!==a&&(s.viewChange(),s.lastUpdateId=a),s.updateRequested&&s.processUpdate(this._updateParameters)),this.view.graphicsTileStore?.setViewState(this._updateParameters.state),this.view.animation?this._scheduler.state=0:this.view.interacting?this._scheduler.state=1:this._scheduler.state=2,this._scheduler.frame(t)||this._updateRequested||this._scheduler.state!==2||this._frameTaskHandle?.pause()}}destroy(){this.stop(),this._schedulerHandle.remove(),this._scheduler.destroy()}get scheduler(){return this._scheduler}
2start(){if(this._frameTaskHandle)return;const e=this.view;this.stationary=e.stationary,this._updateParameters={state:e.state,targetState:new Yn,pixelRatio:window.devicePixelRatio,stationary:this.stationary,renderingOptions:e.renderingOptions},this._stationaryHandle=w(()=>e.stationary,t=>{this.stationary=t,this.requestFrame()}),this._frameTaskHandle=_t(this),this.requestUpdate()}stop(){this._frameTaskHandle&&(this._updateRequested=!1,this._stationaryHandle?.remove(),this._frameTaskHandle.remove(),this._updateParameters=this._stationaryHandle=this._frameTaskHandle=null,this.stationary=!0)}requestUpdate(){this._updateRequested||(this._updateRequested=!0,this.requestFrame())}requestFrame(){this._frameTaskHandle&&this._frameTaskHandle.resume()}_updateLayerView(e){if(!e.attached)return void this.requestUpdate();const t=this.view.state,n=e.lastUpdateId;n!=null&&(this.stationary||e.moving)||(e.moving=!0),n!==t.id&&e.viewChange(),this.stationary&&e.moving&&(e.moving=!1,e.moveEnd()),e.lastUpdateId=t.id,e.updateRequested&&e.processUpdate(this._updateParameters),"layerViews"in e&&e.layerViews?.forEach(this._updateLayerView,this)}};function Sc(i,e){const{spatialReference:t}=e,n=[e.x,e.y];let s,o,a,l;const c=[0,0],u=Cc(i);for(let m=0;m<u.length;m++){const g=u[m];for(let v=0;v<g.length-1;v++){kr(c,n,g,v);const f=Pr(n,c);(s==null||f<s)&&(s=f,o=[...c],a=m,l=v)}}if(s==null||!o||a==null||l==null)throw new M("nearest-coordinate:failed","Failed to find the nearest coordinate");const[d,p]=o;return{coordinate:new O({x:d,y:p,spatialReference:t}),distance:s}}function Cc(i){switch(i.type){case"extent":return[[[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin]]];case"polygon":return i.rings;case"polyline":return i.paths}}var Tn;let je=Tn=class extends Ln(T){constructor(i){super(i),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(this.geometry==null||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return Ft(this.geometry,this.spatialReference)}catch(i){return k.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:i}),null}return this.geometry}constrain(i,e){if(this.normalizedGeometry==null)return i;const t=i.targetGeometry;if(this.normalizedGeometry.type==="extent"?Dn(this.normalizedGeometry,t):Ro(this.normalizedGeometry,t))return i;const{coordinate:n}=Sc(this.normalizedGeometry,t);return n&&(i.targetGeometry=n),i}clone(){return new Tn({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}};r([h({constructOnly:!0})],je.prototype,"geometry",void 0),r([h({readOnly:!0})],je.prototype,"normalizedGeometry",null),r([h({constructOnly:!0})],je.prototype,"spatialReference",void 0),je=Tn=r([_("esri.views.2d.constraints.GeometryConstraint")],je);var $n;let Et=$n=class extends Ln(T){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(i,e){return this.enabled&&e&&(this.rotationEnabled||(i.rotation=e.rotation)),i}clone(){return new $n({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};r([h()],Et.prototype,"enabled",void 0),r([h()],Et.prototype,"rotationEnabled",void 0),Et=$n=r([_("esri.views.2d.constraints.RotationConstraint")],Et);const ya=Et;var kn;let U=kn=class extends Ln(T){constructor(i){super(i),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let i,{lods:e,minScale:t,maxScale:n,minZoom:s,maxZoom:o}=this,a=-1,l=-1,c=!1,u=!1;if(t!==0&&n!==0&&t<n&&([t,n]=[n,t]),!e?.length)return this._set("effectiveMinScale",t),void this._set("effectiveMaxScale",n);e=e.map(d=>d.clone()),e.sort((d,p)=>p.scale-d.scale),e.forEach((d,p)=>d.level=p);for(const d of e)!c&&t>0&&t>=d.scale&&(a=d.level,c=!0),!u&&n>0&&n>=d.scale&&(l=i?i.level:-1,u=!0),i=d;s===-1&&(s=t===0?0:a),o===-1&&(o=n===0?e.length-1:l),s=Math.max(s,0),s=Math.min(s,e.length-1),o=Math.max(o,0),o=Math.min(o,e.length-1),s>o&&([s,o]=[o,s]),t=e[s].scale,n=e[o].scale,e.splice(0,s),e.splice(o-s+1),e.forEach((d,p)=>{this._lodByScale[d.scale]=d,this._scales[p]=d.scale}),this._set("effectiveLODs",e),this._set("effectiveMinZoom",s),this._set("effectiveMaxZoom",o),this._set("effectiveMinScale",t),this._set("effectiveMaxScale",n)}constrain(i,e){if(e&&i.scale===e.scale)return i;const t=this.effectiveMinScale,n=this.effectiveMaxScale,s=i.targetGeometry,o=e&&e.targetGeometry,a=n!==0&&i.scale<n,l=t!==0&&i.scale>t;if(a||l){const c=l?t:n;if(e&&o){const u=(c-e.scale)/(i.scale-e.scale);s.x=o.x+(s.x-o.x)*u,s.y=o.y+(s.y-o.y)*u}i.scale=c}return this.snapToZoom&&this.effectiveLODs&&(i.scale=this._getClosestScale(i.scale)),i}fit(i){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(i,null);const e=this.scaleToZoom(i.scale),t=Math.abs(e-Math.floor(e));return i.scale=this.zoomToScale(t>.99?Math.round(e):Math.floor(e)),i}zoomToScale(i){if(!this.effectiveLODs)return 0;i-=this.effectiveMinZoom,i=Math.max(0,i);const e=this._scales;if(i<=0)return e[0];if(i>=e.length)return e[e.length-1];const t=Math.floor(i),n=Math.ceil(i);return e[t]+(i-t)*(e[n]-e[t])}scaleToZoom(i){if(!this.effectiveLODs)return-1;const e=this._scales;let t,n;if(i>=e[0])return this.effectiveMinZoom;if(i<=e[e.length-1])return this.effectiveMaxZoom;for(let s=0;s<e.length-1;s++){if(t=e[s],n=e[s+1],n===i)return s+this.effectiveMinZoom+1;if(t>i&&n<i)return s+this.effectiveMinZoom+1-(i-n)/(t-n)}return-1}snapToClosestScale(i){if(!this.effectiveLODs)return i;const e=this.scaleToZoom(i);return this.zoomToScale(Math.round(e))}snapToNextScale(i,e=.5){if(!this.effectiveLODs)return i*e;const t=Math.round(this.scaleToZoom(i));return this.zoomToScale(t+1)}snapToPreviousScale(i,e=2){if(!this.effectiveLODs)return i*e;const t=Math.round(this.scaleToZoom(i));return this.zoomToScale(t-1)}clone(){return new kn({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(i){return this._lodByScale[i]||(i=this._scales.reduce((e,t)=>
2Math.abs(t-i)<=Math.abs(e-i)?t:e,this._scales[0])),this._lodByScale[i].scale}};r([h({readOnly:!0})],U.prototype,"effectiveLODs",void 0),r([h({readOnly:!0})],U.prototype,"effectiveMinZoom",void 0),r([h({readOnly:!0})],U.prototype,"effectiveMaxZoom",void 0),r([h({readOnly:!0})],U.prototype,"effectiveMinScale",void 0),r([h({readOnly:!0})],U.prototype,"effectiveMaxScale",void 0),r([h()],U.prototype,"lods",void 0),r([h()],U.prototype,"minZoom",void 0),r([h()],U.prototype,"maxZoom",void 0),r([h()],U.prototype,"minScale",void 0),r([h()],U.prototype,"maxScale",void 0),r([h()],U.prototype,"snapToZoom",void 0),U=kn=r([_("esri.views.2d.constraints.ZoomConstraint")],U);const _a=U,Ec={base:null,key:"type",typeMap:{extent:Je,polygon:Do}};let R=class extends T{constructor(e){super(e),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0,this.customConstraints=new S}destroy(){this.view=null}get effectiveLODs(){return this._zoom.effectiveLODs}get effectiveMinScale(){return this._zoom.effectiveMinScale}get effectiveMaxScale(){return this._zoom.effectiveMaxScale}get effectiveMinZoom(){return this._zoom.effectiveMinZoom}get effectiveMaxZoom(){return this._zoom.effectiveMaxZoom}set geometry(e){e?this._set("geometry",e):this._set("geometry",null)}get version(){return`${this._zoom?.uid}/${this._rotation?.uid}/${this._geometry?.uid}`}get _geometry(){const e=this._get("_geometry");return e&&this.geometry===e.geometry&&this.view?.constraintsInfo.spatialReference===e.spatialReference?e:new je({geometry:this.geometry,spatialReference:this.view?.constraintsInfo.spatialReference})}get _rotation(){return new ya({rotationEnabled:this.rotationEnabled})}get _zoom(){const e=this._get("_zoom"),t=this.lods||this.view?.constraintsInfo.lods,n=this.minZoom,s=this.maxZoom,o=this.minScale,a=this.maxScale,l=this.snapToZoom;return e&&e.lods===t&&e.minZoom===n&&e.maxZoom===s&&e.minScale===o&&e.maxScale===a&&e.snapToZoom===l?e:new _a({lods:t,minZoom:n,maxZoom:s,minScale:o,maxScale:a,snapToZoom:l})}canZoomInTo(e){const t=this.effectiveMaxScale;return t===0||e>=t}canZoomOutTo(e){const t=this.effectiveMinScale;return t===0||e<=t}constrain(e,t){return this._zoom.constrain(e,t),this._rotation.constrain(e,t),this._geometry.constrain(e,t),this.customConstraints.forEach(n=>n.constrain(e,t)),e}constrainByGeometry(e){return this._geometry.constrain(e),this.customConstraints.forEach(t=>t.applyPanConstraint?.(e)),e}fit(e){return this._zoom.fit(e)}zoomToScale(e){return this._zoom.zoomToScale(e)}scaleToZoom(e){return this._zoom.scaleToZoom(e)}snapScale(e){return this._zoom.snapToClosestScale(e)}snapToNextScale(e){return this._zoom.snapToNextScale(e)}snapToPreviousScale(e){return this._zoom.snapToPreviousScale(e)}};r([h({readOnly:!0})],R.prototype,"effectiveLODs",null),r([h({readOnly:!0})],R.prototype,"effectiveMinScale",null),r([h({readOnly:!0})],R.prototype,"effectiveMaxScale",null),r([h({readOnly:!0})],R.prototype,"effectiveMinZoom",null),r([h({readOnly:!0})],R.prototype,"effectiveMaxZoom",null),r([h({types:Ec,value:null})],R.prototype,"geometry",null),r([h({type:[nl]})],R.prototype,"lods",void 0),r([h()],R.prototype,"minScale",void 0),r([h()],R.prototype,"maxScale",void 0),r([h()],R.prototype,"minZoom",void 0),r([h()],R.prototype,"maxZoom",void 0),r([h()],R.prototype,"rotationEnabled",void 0),r([h()],R.prototype,"snapToZoom",void 0),r([h({type:S})],R.prototype,"customConstraints",void 0),r([h()],R.prototype,"view",void 0),r([h({readOnly:!0})],R.prototype,"version",null),r([h({type:je,readOnly:!0})],R.prototype,"_geometry",null),r([h({type:ya})],R.prototype,"_rotation",null),r([h({readOnly:!0,type:_a})],R.prototype,"_zoom",null),R=r([_("esri.views.2d.MapViewConstraints")],R);const Vs=R;let H=class extends T{constructor(e){super(e),this.constraints=null,this.ready=!1,this.resizeAlign="center",this.addHandles([w(()=>this.constraints?.version,t=>{this.constraints&&t&&this.ready&&(this.state.viewpoint=this.constraints.fit(this.state.paddedViewState.viewpoint))},Dt)])}get center(){if(!this.ready)return this._get("center");const{center:e,spatialReference:t}=this.state.paddedViewState;return this.state.commitProperty("id"),new O({x:e[0],y:e[1],spatialReference:t})}set center(e){if(e==null)return;if(!this.ready)return void this._set("center",e);let t;try{t=this._project(e,this.state.spatialReference)}catch(s){return void k.getLogger(this).error(new M("mapview:invalid-center","could not project the value in the view's spatial reference",{input
vendor: 6,301 bytes, line 2
2:e,error:s}))}const n=this.viewpoint;wn(n,n,t),this.viewpoint=n}get extent(){return this.ready?(this.state.commitProperty("id"),this.state.paddedViewState.extent.clone()):this._get("extent")}set extent(e){if(e==null)return;if(!e.width||!e.height)return void k.getLogger(this).error(new M("mapview:invalid-extent","invalid extent size"));if(!this.ready)return this._set("extent",e),this._set("center",void 0),this._set("viewpoint",void 0),this._set("scale",void 0),void this._set("zoom",void 0);let t;try{t=this._project(e,this.state.spatialReference)}catch(s){return void k.getLogger(this).error(new M("mapview:invalid-extent","could not project the value in the view's spatial reference",{error:s}))}const n=this.viewpoint;uc(n,n,t,this.state.size,{constraints:this.constraints}),this.viewpoint=n}get padding(){return this.ready?this.state.padding:this._get("padding")}set padding(e){this.ready?(this.state.padding=e,this._set("padding",this.state.padding)):this._set("padding",e)}get resolution(){return this.ready?(this.state.commitProperty("id"),this.state.resolution):0}get rotation(){return this.ready?(this.state.commitProperty("id"),this.state.rotation):this._get("rotation")}set rotation(e){if(isNaN(e))return;if(!this.ready)return void this._set("rotation",e);const t=this.viewpoint;bc(t,t,e),this.viewpoint=t}get scale(){return this.ready?(this.state.commitProperty("id"),this.state.scale):this._get("scale")}set scale(e){if(!e||isNaN(e))return;if(!this.ready){this._set("scale",e),this._set("zoom",void 0);const n=this._get("extent");return void(n&&(this._set("extent",void 0),this._set("center",n.center)))}const t=this.viewpoint;Cs(t,t,e),this.viewpoint=t}get viewpoint(){return this.ready?this.state.paddedViewState.viewpoint.clone():this._get("viewpoint")}set viewpoint(e){if(e==null)return;if(!this.ready)return this._set("viewpoint",e),this._set("extent",void 0),this._set("center",void 0),this._set("zoom",void 0),void this._set("scale",void 0);let t,n;try{t=this._project(e,this.state.spatialReference),!e.scale||isNaN(e.scale)?n=new M("mapview:invalid-viewpoint",`invalid scale value of ${e.scale}`):e.targetGeometry==null&&(n=new M("mapview:invalid-viewpoint","geometry not defined"))}catch(o){n=new M("mapview:invalid-viewpoint","could not project the value in the view's spatial reference",{error:o})}if(n)return void k.getLogger(this).error(n);this._scaleBeforeChangingSpatialReference=null;const s=new se({targetGeometry:new O,scale:0,rotation:0});Z(s,t),this.constraints?.constrain(s,this.state.paddedViewState.viewpoint),this.state.viewpoint=s,this._set("viewpoint",s)}get visibleArea(){return this.ready?this.state.visibleArea:null}get zoom(){return this.ready?this.constraints?.scaleToZoom(this.scale)??-1:this._get("zoom")}set zoom(e){if(!(e>=0))return;if(!this.ready){this._set("zoom",e),this._set("scale",void 0);const s=this._get("extent");return void(s&&(this._set("extent",void 0),this._set("center",s.center)))}const t=this.constraints?.zoomToScale(e)??0;if(!t)return void this._set("zoom",-1);const n=this.viewpoint;Cs(n,n,t),this.viewpoint=n,this._set("zoom",this.constraints?.scaleToZoom(this.scale)??-1)}getUserStartupOptions(e){if(!e[0]&&!e[1])return{center:void 0,rotation:void 0,scale:void 0};const{padding:t,constraints:n}=this,s=this._get("center"),o=this._get("extent"),a=this._get("scale"),l=this._get("rotation"),c=this._get("viewpoint"),u=this._get("zoom"),d=u!=null&&n!=null&&n.zoomToScale(u)||void 0;let p,m,g;const v=c?.rotation,f=c?.targetGeometry;f?.type==="extent"?p=f:f?.type==="point"&&(m=f,g=c?.scale);const I=o??p;return{center:s??m??I?.center,rotation:l??v,scale:(a??d??g??(I&&zi(I,[e[0]-t.left-t.right,e[1]-t.top-t.bottom])))||void 0}}startup(e,t,n,s){const o=e.targetGeometry;try{this._project(e,n)}catch(a){k.getLogger(this).warn(new as("mapview:startup-projection-error","projection of initial viewpoint to the view's spatial reference, defaulting to the initial viewpoint.",{center:o.toJSON(),spatialReference:n,error:a})),e.targetGeometry=s||new O({x:0,y:0,spatialReference:n})}this.constraints?.fit(e),this._set("state",new Yn({padding:this.padding,size:t,viewpoint:e})),this._set("ready",!0)}teardown(){this._set("ready",!1);const{center:[e,t],spatialReference:n,rotation:s,scale:o}=this.state.paddedViewState,a=new O({x:e,y:t,spatialReference:n});this._set("viewpoint",null),this._set("extent",null),this._set("center",a),this._set("zoom",-1),this._set("rotation",s),this._set("scale",o),this._set("state",null)}changeSpatialReference(e){const t=this.state.paddedViewState.clone();if(this._scaleBeforeChangingSpatialReference==null)this._scaleBeforeChangingSpatialReference=t.scale;else{const c=t.viewpoint.clone();c.scale=this._scaleBeforeChangingSpatialReference,t.viewpoint=c}const n=t.clone(),[s,o]=t.center;let a=null;try{a=this._project(new O({x:s,y:o,spatialReference:t.spatialReference}),e)}catch(c){Sr()||k.getLogger(this).warn(new as("mapview:spatial-reference-change","could not project the view's center to the new spatial reference",{center:a?.toJSON(),spatialReference:e,error:c}))}a||(a=new O({x:0,y:0,spatialReference:e}));const l=wn(new se({targetGeometry:new O,scale:0,rotation:0}),t.viewpoint,a);n.viewpoint=l;try{const u=[t.size[0]/2,t.size[1]/2],d=[u[0]+20,u[1]],p=t.toMap([0,0],d),{x:m,y:g}=this._project(new O({x:p[0],y:p[1],spatialReference:t.spatialReference}),e);p[0]=m,p[1]=g,n.toScreen(p,p);const v=_c(u,p,d),f=Math.hypot(p[0]-u[0],p[1]-u[1])/20;!Number.isFinite(f)||Math.abs(f)>4?(l.rotation=0,l.targetGeometry=new O({x:0,y:0,spatialReference:e})):(l.scale*=f,l.scale>F("mapview-srswitch-adjust-rotation-scale-threshold")?l.rotation=0:l.rotation+=Number.isFinite(v)?v:0)}catch{}this._get("constraints")?.constrain(l,void 0),this._get("state").viewpoint=l}resize(e,t){if(!this.ready)return;const n=this.state;let s=this.state.paddedViewState.viewpoint;const o=this.state.paddedViewState.size.slice();n.size=[e,t],wc(s,s,o,this.state.paddedViewState.size,this.resizeAlign),s=this.constraints?.constrain(s,void 0)??s,this.state.viewpoint=s}toMap(e){if(!this.ready)return null;const t=[0,0],[n,s]=this.state.toMap(t,[e.x,e.y]),o=this.state.spatialReference;return new O({x:n,y:s,spatialReference:o})}toScreen(e,t){if(!this.ready)return null;const n=this._project(e,this.state.spatialReference),s=[n.x,n.y];
2return t?.pickClosestTarget===!1||this.state.paddedViewState.wrapMapCoordinate(s,s),this.state.toScreen(s,s),L(s[0],s[1])}_project(e,t){const n=e?.targetGeometry||e;if(!t)return e;if(!n)return null;if(t.imageCoordinateSystem||n.spatialReference?.imageCoordinateSystem||Pi(t,n.spatialReference))return e;const s=Ft(n,t);if(!s)throw new M("mapview:projection-not-possible","projecting input geometry to target spatial reference returned a null value",{geometry:n,spatialReference:t});return Vc(e)?(e.targetGeometry=s,e):s}};function Vc(i){return i?.declaredClass==="esri.Viewpoint"}r([h({type:O})],H.prototype,"center",null),r([h()],H.prototype,"constraints",void 0),r([h({type:Je})],H.prototype,"extent",null),r([h({value:{top:0,right:0,bottom:0,left:0},cast:i=>({top:0,right:0,bottom:0,left:0,...i})})],H.prototype,"padding",null),r([h()],H.prototype,"ready",void 0),r([h()],H.prototype,"resizeAlign",void 0),r([h({readOnly:!0})],H.prototype,"resolution",null),r([h({type:Number})],H.prototype,"rotation",null),r([h({type:Number})],H.prototype,"scale",null),r([h({readOnly:!0})],H.prototype,"state",void 0),r([h({type:se})],H.prototype,"viewpoint",null),r([h({readOnly:!0})],H.prototype,"visibleArea",null),r([h()],H.prototype,"zoom",null),H=r([_("esri.views.2d.ViewStateManager")],H);const Is=160;let Vt=class extends T{constructor(){super(...arguments),this._timer=void 0}get stationary(){return!this._timer}flip(){this._timestamp=performance.now(),this._timer==null&&(this._timer=setInterval(()=>{performance.now()-this._timestamp>=Is&&this.clear()},Is))}clear(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}};r([h()],Vt.prototype,"_timer",void 0),r([h()],Vt.prototype,"stationary",null),Vt=r([_("esri.views.2d.support.StationaryManager")],Vt);const Ic=i=>{const e=i;let t=class extends e{constructor(...n){super(...n),this.fullOpacity=1,this.stateManager=new H({constraints:new Vs({view:this})}),this.stationaryManager=new Vt,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!1,labelsAnimationTime:0,labelCollisionsEnabled:!1},this.frameTask=new Pc(this),this.viewEvents=new Bo(this),this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([w(()=>this.viewpoint,()=>this.stationaryManager.flip(),Dt)])}get constraintsInfo(){return{lods:null,spatialReference:null}}get extent(){return this.stateManager?.extent??null}set extent(n){this.stateManager.extent=n}get state(){return this.stateManager.state}get interacting(){return!1}get stationary(){return!this.animation&&this.stationaryManager.stationary}set animation(n){const s=this._get("animation");if(n===s)return;if(s&&s.stop(),n!==this.animationManager.animation&&this.animationManager.stop(),!n||n.isFulfilled())return void this._set("animation",null);this._set("animation",n);const o=()=>{this.destroyed||n===this._get("animation")&&(this._set("animation",null),this.frameTask?.requestFrame())};n.when(o,o)}get constraints(){return this.stateManager?.constraints}set constraints(n){n.view=this;const s=this.stateManager.constraints;this.stateManager.constraints=n,s?.destroy()}get padding(){return this.stateManager?.padding}set padding(n){this.stateManager&&(this.stateManager.padding=n)}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(n){this.stateManager.resizeAlign=n}get rotation(){return this.stateManager.rotation??0}set rotation(n){const{rotationEnabled:s}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=n,this.constraints.rotationEnabled=s}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(n){this.stateManager.viewpoint=n,this.frameTask.requestFrame()}};return r([h({readOnly:!0})],t.prototype,"animationManager",void 0),r([h({readOnly:!0})],t.prototype,"fullOpacity",void 0),r([h()],t.prototype,"stateManager",void 0),r([h()],t.prototype,"constraintsInfo",null),r([h()],t.prototype,"extent",null),r([h({readOnly:!0})],t.prototype,"state",null),r([h({readOnly:!0})],t.prototype,"mapViewNavigation",void 0),r([h()],t.prototype,"renderingOptions",void 0),r([h({readOnly:!0})],t.prototype,"interacting",null),r([h()],t.prototype,"stationary",null),r([h()],t.prototype,"animation",null),r([h({type:Vs})],t.prototype,"constraints",null),r([h()],t.prototype,"padding",null),r([h()],t.prototype,"resizeAlign",null),r([h()],t.prototype,"rotation",null),r([h({readOnly:!0})],t.prototype,"viewEvents",void 0),r([h({type:se})],t.prototype,"viewpoint",null),t=r([_("esri.views.Viewport2DBaseMixin")],t),t},Rc=()=>Cr.respectPrefersReducedMotion&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;var ft;let ct=(ft=class extends zo{constructor(e){super(e),this.state="running",this.target=null,this._resolver=null}initialize(){this._resolver=Ot(),this.addResolvingPromise(this._resolver.promise)}get done(){return this.state==="finished"||this.state==="stopped"}stop(){this.state!=="stopped"&&this.state!=="finished"&&(this._set("state","stopped"),this._resolver?.reject(new M("view:animation-stopped","ViewAnimation stopped")))}finish(){this.state!=="stopped"&&this.state!=="finished"&&(this._set("state","finished"),this._resolver?.resolve())}update(e,t){t||(t=Io(e)?"waiting-for-target":"running"),this._set("target",e),this._set("state",t)}},ft.state={RUNNING:"running",STOPPED:"stopped",FINISHED:"finished",WAITING_FOR_TARGET:"waiting-for-target"},ft);r([h({readOnly:!0}
2)],ct.prototype,"done",null),r([h({readOnly:!0,type:String})],ct.prototype,"state",void 0),r([h()],ct.prototype,"target",void 0),ct=r([_("esri.views.ViewAnimation")],ct);const Pn=ct;let li=class extends T{constructor(e){super(e),this._gotoTask=null}destroy(){this._gotoTask=null}async goTo(e,t){if(!e)return void k.getLogger(this).error("#goTo()","target cannot be null or undefined");const n=new Pn;this.view.animation=n,await On(()=>this.view.ready,t);const s={...t,animate:t?.animate??(!Rc()&&this.view.animationsEnabled),animationMode:t?.animationMode??"auto"},{extent:o,spatialReference:a,size:l,viewpoint:c,constraints:u,padding:d,allLayerViews:p}=this.view,m=lc(e,{extent:o,spatialReference:a,size:l,viewpoint:c,constraints:u,padding:d,allLayerViews:p,pickClosestTarget:t?.pickClosestTarget??!0});return n?.update(m),this._gotoTask={},s.animate?this._gotoAnimated(m,s):this._gotoImmediate(m,s)}_gotoImmediate(e,t){const n=this._gotoTask,s=this.view.animation,o=e.then(a=>{if(Se(t),n!==this._gotoTask)throw new M("view:goto-interrupted","Goto was interrupted");this.view.viewpoint=s.target=a,s.finish()});return this._cancellableGoTo(n,s,o,t)}_gotoAnimated(e,t){const n=this._gotoTask,s=this.view.animation;if(!s)return Promise.resolve();const o=e.then(a=>{if(Se(t),n!==this._gotoTask)throw new M("view:goto-interrupted","Goto was interrupted");return s.update(a),this.view.animationManager.animate(s,this.view.viewpoint,t),s.when().then(()=>{},()=>{})});return this._cancellableGoTo(n,s,o,t)}_cancellableGoTo(e,t,n,s){const o=()=>e===this._gotoTask;return Er(n,s).finally(()=>{o()&&(t.done||t.stop())})}};r([h({constructOnly:!0})],li.prototype,"view",void 0),li=r([_("esri.views.2d.GoToManager")],li);function va(i,e){switch(e){case"primary":return i.pointerType==="touch"||i.button===0;case"secondary":return i.pointerType!=="touch"&&i.button===2;case"tertiary":return i.pointerType!=="touch"&&i.button===1}}function wa(i,e){return e.some(t=>va(i,t))}function Rs(i,{dragPrimary:e,dragSecondary:t,dragTertiary:n}){return[{key:"primary",value:e},{key:"secondary",value:t},{key:"tertiary",value:n}].filter(s=>s.value===i).map(s=>s.key)}let Ds=class extends A{constructor(e,t){super(!0),this._view=e,this.registerIncoming("double-click",t,n=>this._handleDoubleClick(n,t))}_handleDoubleClick(e,t){va(e.data,"primary")&&(e.stopPropagation(),t?this._view.mapViewNavigation.zoomOut([e.data.x,e.data.y]):this._view.mapViewNavigation.zoomIn([e.data.x,e.data.y]))}},Dc=class extends A{constructor(e,t,n){super(!0),this.view=e,this.pointerType=t,this.registerIncoming("double-tap-drag",n,s=>this._handleDoubleTapDrag(s))}_handleDoubleTapDrag(e){const{data:t}=e,{pointerType:n}=t;if(n!==this.pointerType)return;e.stopPropagation();const{action:s,delta:o}=t,{view:a}=this,{mapViewNavigation:l}=a;switch(s){case"begin":{const{scale:c}=a;this._startScale=c,this._currentScale=c,this._previousDelta=o,l.begin();break}case"update":{if(this._previousDelta.y===o.y)return;this._previousDelta=o;const c=1.015**o.y,u=this._startScale*c,d=u/this._currentScale;l.setViewpointImmediate(d),this._currentScale=u;break}case"end":{const{constraints:c}=a,{effectiveLODs:u,snapToZoom:d}=c;if(!d||!u)return void l.end();const p=c.snapScale(this._currentScale),m=(o.y>0?Math.max(p,c.snapToPreviousScale(this._startScale)):Math.min(p,c.snapToNextScale(this._startScale)))/this._currentScale;l.zoom(m).then(()=>{l.end()});break}}}},Ni=class{constructor(e){this._callbacks=e,this._currentCount=0,this._callbacks.condition||(this._callbacks.condition=()=>!0)}handle(e){const t=e.data,n=t.pointers.size;switch(t.action){case"start":this._currentCount=n,this._emitStart(e);break;case"added":this._emitEnd(this._previousEvent),this._currentCount=n,this._emitStart(e);break;case"update":this._emitUpdate(e);break;case"removed":this._startEvent&&this._emitEnd(this._previousEvent),this._currentCount=n,this._emitStart(e);break;case"end":this._emitEnd(e),this._currentCount=0}this._previousEvent=e}_emitStart(e){this._startEvent=e,this._callbacks.condition?.(this._currentCount,e)&&this._callbacks.start(this._currentCount,e,this._startEvent)}_emitUpdate(e){this._callbacks.condition?.(this._currentCount,e)&&this._callbacks.update(this._currentCount,e,this._startEvent)}_emitEnd(e){this._callbacks.condition?.(this._currentCount,e)&&this._callbacks.end(this._currentCount,e,this._startEvent),this._startEvent=null}},Ac=class extends A{constructor(e,t,n){super(!0),this.view=e,this.pointerActions=t,this.registerIncoming("drag",n,s=>this._handleDrag(s)),this.registerIncoming("pointer-down",()=>this.stopMomentumNavigation())}onInstall(e){super.onInstall(e),this._dragEventSeparator=new Ni({start:(t,n)=>{this.view.mapViewNavigation.pan.begin(this.view,n.data),n.stopPropagation()}
2,update:(t,n)=>{this.view.mapViewNavigation.pan.update(this.view,n.data),n.stopPropagation()},end:(t,n)=>{this.view.mapViewNavigation.pan.end(this.view,n.data),n.stopPropagation()},condition:(t,n)=>t===1&&wa(n.data,this.pointerActions)})}_handleDrag(e){const t=this.view.mapViewNavigation;t.pinch.zoomMomentum||t.pinch.rotateMomentum?this.stopMomentumNavigation():this._dragEventSeparator.handle(e)}stopMomentumNavigation(){this.view.mapViewNavigation.pan.stopMomentumNavigation()}},Lc=class extends A{constructor(e,t,n){super(!0),this._view=e,this.pointerActions=t;const s=this._view.mapViewNavigation;this._dragEventSeparator=new Ni({start:(o,a)=>{s.rotate.begin(this._view,a.data),a.stopPropagation()},update:(o,a)=>{s.rotate.update(this._view,a.data),a.stopPropagation()},end:(o,a)=>{s.rotate.end(),a.stopPropagation()},condition:(o,a)=>o===1&&wa(a.data,this.pointerActions)}),this.registerIncoming("drag",n,o=>this._dragEventSeparator.handle(o))}};function re(i){let e=i*i;return i<0&&(e*=-1),e}function Oc(i){return i.translation[0]=0,i.translation[1]=0,i.translation[2]=0,i.heading=0,i.tilt=0,i}function zc(i,e,t){const n=t,s=i.state,o=i.device,a=e.tiltDirection==="forward-down"?1:-1,l=1;return o.deviceType==="standard"?(n.translation[0]=re(s.axes[0]),n.translation[1]=re(s.axes[1]),n.translation[2]=re(s.buttons[7])-re(s.buttons[6]),n.heading=re(s.axes[2]),n.tilt=re(s.axes[3])):o.deviceType==="spacemouse"&&(n.translation[0]=1.2*re(s.axes[0]),n.translation[1]=1.2*re(s.axes[1]),n.translation[2]=2*-re(s.axes[2]),n.heading=1.2*re(s.axes[5]),n.tilt=1.2*re(s.axes[3])),n.tilt*=a,$l(n.translation,n.translation,l),n}function Fc(i){return i.translation[0]===0&&i.translation[1]===0&&i.translation[2]===0&&i.heading===0&&i.tilt===0&&i.zoom===0}let Nc=class extends A{constructor(e){super(!0),this._view=e,this._frameTask=null,this._watchHandles=new $o,this._currentDevice=null,this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this._handle=this.registerIncoming("gamepad",t=>this._handleGamePadEvent(t)),this._handle.pause()}onInstall(e){super.onInstall(e),this._watchHandles.add([w(()=>this._view.navigation.gamepad?.enabled,t=>{t?(this._handle.resume(),this._frameTask||(this._frameTask=_t({update:n=>this._frameUpdate(n.deltaTime)}))):(this._handle.pause(),this._frameTask&&(this._frameTask.remove(),this._frameTask=null))},W)])}onUninstall(){this._watchHandles.removeAll(),this._frameTask&&(this._frameTask.remove(),this._frameTask=null),super.onUninstall()}_handleGamePadEvent(e){const t=this._view.navigation.gamepad.device;t&&e.data.device!==t||this._currentDevice&&this._currentDevice!==e.data.device||(e.data.action==="end"?(this._currentDevice=null,Oc(this._transformation)):(this._currentDevice=e.data.device,zc(e.data,this._view.navigation.gamepad,this._transformation)),this._frameTask?.resume())}_frameUpdate(e){const t=this._transformation;if(Fc(t))return void this._frameTask?.pause();const n=this._view.viewpoint.clone(),s=this._view.navigation.gamepad.velocityFactor,o=Zc*s*e;Fi(n,n,[t.translation[0]*o,-t.translation[1]*o]);const a=1+t.translation[2]*qc*e,l=this._view.constraints.rotationEnabled?-t.heading*Hc*e:0,c=this._view.size,u=[c[0]/2,c[1]];ma(n,n,a,l,u,c);const d=this._view.constraints.constrain(n,this._view.viewpoint);this._view.viewpoint=d}};const Hc=.06,Zc=.7,qc=6e-4;function ba(i){const e=()=>i(document.visibilityState==="visible");return document.addEventListener("visibilitychange",e),Ye(()=>document.removeEventListener("visibilitychange",e))}let Wc=class extends A{constructor(e,t,n){super(!0),this.view=e,this.keys=t,this._isSticky=!1,this._pressedKeys=new Set,this._timeout=void 0,this._currentDirection=void 0,this._stickyKeyDuration=200,this._handleKey=s=>{const o=this._keyMap[s.data.key];if(s.modifiers.has("Meta")||s.modifiers.has("Control"))return void this._stopMovement();if(o==null)return;s.stopPropagation(),s.preventDefault();const a=s.type==="key-down";if(this._pressedKeys[a?"add":"delete"](o),a){if(this._direction===o)return;this._direction=o,this._isSticky=!1,this._setTimeout(()=>{this._isSticky&&this._handlePopKey()})}else{const l=this._timeout===void 0,c=this._pressedKeys.size>0;l||c?this._handlePopKey():this._isSticky=!0}},this._handlePopKey=()=>{this._direction=Array.from(this._pressedKeys).pop(),this._direction==null&&this._stopMovement()},this._stopMovement=()=>{this._isSticky=!1,this._direction=void 0,this._pressedKeys.clear(),this._setTimeout(void 0)},this._keyMap={[t.left]:"left",[t.right]:"right",[t.up]:"up",[t.down]:"down"},this.registerIncoming("key-down",n,this._handleKey),this.registerIncoming("key-up",n,this._handleKey),this.registerIncoming("blur",n,this._stopMovement),this._visibilityHandle=ba(s=>s?null:this._stopMovement())}onUninstall(){this._stopMovement(),this._visibilityHandle?.remove()}get _direction(){return this._currentDirection}set _direction(e){const t=this._currentDirection!=null;if(e!=null){if(t||this.view.mapViewNavigation.begin(),this._currentDirection!==e)switch(e){case"left":this.view.mapViewNavigation.continuousPanLeft();break;case"right":this.view.mapViewNavigation.continuousPanRight();break;case"up":this.view.mapViewNavigation.continuousPanUp();break;case"down":this.view.mapViewNavigation.continuousPanDown()}}else t&&this.view.mapViewNavigation.stop();this._currentDirection=e}_setTimeout(e){clearTimeout(this._timeout),this._timeout=e===void 0?void 0:setTimeout(()=>{this._timeout=void 0,e()},this._stickyKeyDuration)}},Gc=class extends A{constructor(e,t,n){super(!0),this.view=e,this.keys=t,this._keyToDirection=new Map,this._pressed=!1,this._addKeysMapping(t),this.registerIncoming("key-down",n,s=>this._handleKeyDown(s)),this.registerIncoming("key-up",n,s=>this._handleKeyUp(s)),this.registerIncoming("blur",n,()=>this._handleStop()),this._visibilityHandle=ba(s=>s?null:this._handleStop())}onUninstall(){this._visibilityHandle?.remove(),this._handleStop()}_addKeysMapping(e){this._addKeyMapping(e.clockwise,"clockwise"),this._addKeyMapping(e.counterClockwise,"counterClockwise"),this._addKeyMapping(e.reset,"reset")}_addKeyMapping(e,t){for(const n of e)this._keyToDirection.set(n,t)}_handleKeyDown(e){e.data.repeat||this._handleKey(e,!0)}_handleKeyUp(e){this._handleKey(e,!1)}_handleStop(){this._pressed&&(this._pressed=!1,this.view.mapViewNavigation.stop())}_handleKey(e,t){const n=e.modifiers;if(n.size>0&&!n.has("Shift")||!this.view.constraints.rotationEnabled)return;const s=this._keyToDirection.get(e.data.key);if(this._pressed=s!=null,this._pressed){if(e.preventDefault(),t)switch(this.view.mapViewNavigation.begin(),s){case"clockwise":this.view.mapViewNavigation.continuousRotateClockwise();break;case"counterClockwise":this.view.mapViewNavigation.continuousRotateCounterclockwise();break;case"reset":this.view.mapViewNavigation.resetRotation()}else this._pressed=!1,this.view.mapViewNavigation.stop();e.stopPropagation()}}},jc=class extends A{constructor(e,t,n){super(!0),this.view=e,this.keys=t,this._keysToZoomAction={},this.registerIncoming("key-down",n,s=>this._handleKeyDown(s)),t.zoomIn.forEach(s=>this._keysToZoomAction[s]=0),t.zoomOut.forEach(s=>this._keysToZoomAction[s]=1)}_handleKeyDown(e){this._handleKey(e)}_handleKey(e){const t=e.modifiers;if(t.size>0&&!t.has("Shift"))return;const{key:n}=e.data;if(!(n in this._keysToZoomAction))return;const s=this._keysToZoomAction[n],{mapViewNavigation:o}=this.view;let a=null;switch(s){case 0:a=o.zoomIn();break;case 1:a=o.zoomOut();break;default:return}o.begin(),a.then(()=>o.end()),e.stopPropagation()}};const Uc=.6;let Bc=class extends A{constructor(e,t){super(!0),this._view=e,this._canZoom=!0,this.registerIncoming("mouse-wheel",t,n=>this._handleMouseWheel(n))}_handleMouseWheel(e){if(this._view.navigation.actionMap.mouseWheel!=="zoom"||(e.preventDefault(),e.stopPropagation(),!this._canZoom))return;const t=this._view.mapViewNavigation,{x:n,y:s,deltaY:o}=e.data,a=1/Uc**(1/60*o),l=t.zoom(a,[n,s]);this._canZoom=!1,l.catch(()=>{}).then(()=>{this._canZoom=!0,t.end()})}},Kc=class extends A{constructor(e){super(!0),this.view=e,this.registerIncoming("drag",n=>this._handleDrag(n)),this.registerIncoming("pointer-down",()=>this._stopMomentumNavigation());const t=this.view.mapViewNavigation;this._dragEventSeparator=new Ni({start:(n,s)=>{t.pinch.begin(this.view,s.data),s.stopPropagation()},update:(n,s)=>{t.pinch.update(this.view,s.data),s.stopPropagation()},end:(n,s)=>{t.pinch.end(this.view),s.stopPropagation()},condition:n=>
2n>=2})}_handleDrag(e){this._dragEventSeparator.handle(e)}_stopMomentumNavigation(){this.view.mapViewNavigation.pinch.stopMomentumNavigation()}};function As(i){const e=i.native;return e?{buttons:e.buttons.map(t=>t.pressed?t.value||1:0),axes:e.axes.map(t=>Qc(t,i.axisThreshold))}:{buttons:[],axes:[]}}function Yc(i,e){if(i.axes.length!==e.axes.length||i.buttons.length!==e.buttons.length)return!1;for(let t=0;t<i.axes.length;t++)if(i.axes[t]!==e.axes[t])return!1;for(let t=0;t<i.buttons.length;t++)if(i.buttons[t]!==e.buttons[t])return!1;return!0}function Jc(i){for(let e=0;e<i.axes.length;e++)if(i.axes[e]!==0)return!1;for(let e=0;e<i.buttons.length;e++)if(i.buttons[e]!==0)return!1;return!0}function Qc(i,e){const t=Math.abs(i);return t<e?0:Math.sign(i)*(t-e)/(1-e)}let Xc=class{constructor(e,t){this._element=e,this._input=t,this._hasEventListeners=!1,this._onConnectGamepad=o=>{this._connectGamepad(o.gamepad)},this._onDisconnectGamepad=o=>{const a=o.gamepad,l=a.index,c=this._inputDevices[l];c&&(this._emitGamepadEvent(a,As(c),!1),this._inputDevices.splice(l,1),this._latestUpdate.splice(l,1),this._input.gamepad.devices.remove(c),this.ensurePollingState())},this._frameTask=null,this._latestUpdate=new Array,this._inputDevices=new Array,this._callback=null;const n="getGamepads"in window.navigator,s=window.isSecureContext;this.supported=n&&s,this.supported&&(Ls(o=>this._connectGamepad(o)),window.addEventListener("gamepadconnected",this._onConnectGamepad),window.addEventListener("gamepaddisconnected",this._onDisconnectGamepad),this.ensurePollingState())}destroy(){this.hasEventListeners=!1,this.supported&&(window.removeEventListener("gamepadconnected",this._onConnectGamepad),window.removeEventListener("gamepaddisconnected",this._onDisconnectGamepad))}set hasEventListeners(e){this._hasEventListeners!==e&&(this._hasEventListeners=e,this.ensurePollingState())}get _eventsEnabled(){return this.supported&&this._inputDevices.length>0&&this._hasEventListeners}set onEvent(e){this._callback=e}_connectGamepad(e){const t=new Wn(e);t.deviceType!=="unknown"&&(this._inputDevices[e.index]=t,this._input.gamepad.devices.add(t)),this.ensurePollingState()}ensurePollingState(){this._eventsEnabled?this._startPolling():this._stopPolling()}_startPolling(){this._frameTask==null&&(this._frameTask=_t({update:()=>this._readGamepadState()}))}_stopPolling(){this._frameTask!=null&&(this._frameTask.remove(),this._frameTask=null,this._latestUpdate=new Array)}_readGamepadState(){const e=document.hasFocus(),t=this._element.contains(document.activeElement),n=this._input.gamepad.enabledFocusMode==="document"&&!e||this._input.gamepad.enabledFocusMode==="view"&&!t;Ls(s=>{const o=this._inputDevices[s.index];if(!o)return;const a=this._latestUpdate[s.index],l=As(o),c=n||Jc(l);a&&(a.timestamp===s.timestamp||!a.active&&c||Yc(a.state,l))||this._emitGamepadEvent(s,l,!c)})}_emitGamepadEvent(e,t,n){const s=this._latestUpdate[e.index],o=s&&s.active;if(!o&&!n)return;const a=!o&&n?"start":o&&n?"update":"end";this._latestUpdate[e.index]={timestamp:e.timestamp,state:t,active:n},this._callback&&this._callback({device:this._inputDevices[e.index],state:t,action:a})}};function eu(i){if(!i||!i.connected)return!1;for(let e=0;e<i.axes.length;e++)if(isNaN(i.axes[e]))return!1;return!0}function Ls(i){for(const e of navigator.getGamepads())eu(e)&&i(e)}const Os=F("edge"),tu=F("chrome"),iu=F("ff"),nu=F("safari"),zs="esri-view-surface",it={touchNone:`${zs}--touch-none`,touchPan:`${zs}--touch-pan`};var Be;let su=(Be=class{constructor(e,t){this._active={},this._callback=()=>{},this._activePointerCaptures=new Set,this._keyDownState=new Set,this._eventId=1,this._browserTouchPanningEnabled=!1,this._element=e,e.getAttribute("tabindex")||e.setAttribute("tabindex","0"),this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"pointer-cancel":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost},this._updateTouchAction(),this._element.addEventListener("keydown",this._preventAltKeyDefault),this._gamepadSource=new Xc(e,t),this._gamepadSource.onEvent=n=>this._callback("gamepad",n)}destroy(){this._callback=()=>{}
2,this.activeEvents=null,this._activePointerCaptures.forEach(e=>this._releasePointerCaptureSafe(e)),this._activePointerCaptures.clear(),this._gamepadSource=ie(this._gamepadSource),this._removeTouchAction(),this._element.removeEventListener("keydown",this._preventAltKeyDefault)}get browserTouchPanningEnabled(){return this._browserTouchPanningEnabled}set browserTouchPanningEnabled(e){this._browserTouchPanningEnabled=e,this._updateTouchAction(),this._updateTouchEventHandling()}set onEventReceived(e){this._callback=e}set activeEvents(e){for(const t in this._active)if(!e||!e.has(t)){const n=this._active[t];this._element.removeEventListener(Qi[t],n),delete this._active[t]}e&&e.forEach(t=>{if(!this._active[t]&&Qi[t]){const n=(this._eventHandlers[t]||this._handleDefault).bind(this,t);this._element.addEventListener(Qi[t],n),this._active[t]=n}}),this._gamepadSource&&(this._gamepadSource.hasEventListeners=e?.has("gamepad")??!1)}setPointerCapture(e,t){t?this._setPointerCaptureSafe(e.pointerId):(this._releasePointerCaptureSafe(e.pointerId),this._activePointerCaptures.delete(e.pointerId))}_updateTouchAction(){this._element.classList.remove(this._browserTouchPanningEnabled?it.touchNone:it.touchPan),this._element.classList.add(this._browserTouchPanningEnabled?it.touchPan:it.touchNone)}_updateTouchEventHandling(){this._browserTouchPanningEnabled?this._element.addEventListener("touchmove",this._preventMultiTouchPanning):this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_removeTouchAction(){this._element.classList.remove(it.touchNone),this._element.classList.remove(it.touchPan),this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_setPointerCaptureSafe(e){try{this._element.setPointerCapture(e),this._activePointerCaptures.add(e)}catch{}}_releasePointerCaptureSafe(e){try{if(this._element.hasPointerCapture&&!this._element.hasPointerCapture(e))return;this._element.releasePointerCapture(e)}catch{}}_updateNormalizedPointerLikeEvent(e,t){const n=Yo(this._element,e);return Be.test.disableSubpixelCoordinates&&(n.x=Math.round(n.x),n.y=Math.round(n.y)),t.x=n.x,t.y=n.y,t}_handleKey(e,t){const{key:n}=t;n&&e==="key-up"&&this._keyDownState.delete(n);const s={native:t,key:n,repeat:!!n&&this._keyDownState.has(n)};n&&e==="key-down"&&this._keyDownState.add(s.key),this._callback(e,s)}_handlePointer(e,t){const n=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});this._callback(e,n)}_handlePointerPreventDefault(e,t){const n=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});t.preventDefault(),this._callback(e,n)}_getDeltaFromTrackpadOrMouseWheel(e){return e.shiftKey&&F("mac")&&e.deltaY===0?e.deltaX:e.deltaY}_handleMouseWheel(e,t){let n=this._getDeltaFromTrackpadOrMouseWheel(t);switch(t.deltaMode){case 0:Os&&(n=n/document.documentElement.clientHeight*600);break;case 1:n*=30;break;case 2:n*=900}Os?n*=.7:tu||nu?n*=.6:iu&&(n*=1.375);const s=100,o=Math.abs(n);o>s&&(n=n/o*200/(1+Math.exp(-.02*(o-s))));const a=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,deltaY:n});this._callback(e,a)}_handlePointerCaptureLost(e,t){this._activePointerCaptures.delete(t.pointerId),this._handleDefault(e,t)}_handleDefault(e,t){const n={native:t};t.preventDefault(),this._callback(e,n)}_preventAltKeyDefault(e){e.key==="Alt"&&e.preventDefault()}_preventMultiTouchPanning(e){e.touches.length>1&&e.preventDefault()}},Be.test={disableSubpixelCoordinates:!1},Be);const Qi={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove","mouse-wheel":"wheel","pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","pointer-enter":"pointerenter","pointer-leave":"pointerleave","pointer-cancel":"pointercancel",focus:"focus",blur:"blur"};let ou=class extends A{constructor(){super(!0),this.registerIncoming("context-menu",e=>e.data.native.preventDefault())}};const Ma=()=>({maximumClickDelay:300}),au=(i={})=>({...Ma(),movementUntilMouseDrag:1.5,movementUntilPenDrag:6,movementUntilTouchDrag:6,holdDelay:500,...i}),Jn=(i={})=>({...Ma(),maximumDoubleClickDistance:10,maximumDoubleTouchDistance:35,maximumDoubleClickDelay:250,maximumDoubleTouchDelay:350,...i});function fi(i,e){return Math.abs(e.x-i.x)+Math.abs(e.y-i.y)}function ru(i,e){const t=e.x-i.x,n=e.y-i.y;return Math.sqrt(t*t+n*n)}
2function lu(i,e){if(e?(e.radius=0,e.center.x=0,e.center.y=0):e={radius:0,center:L()},i.length===0)return e;if(i.length===1)return e.center.x=i[0].x,e.center.y=i[0].y,e;if(i.length===2){const[C,N]=i,[E,K]=[N.x-C.x,N.y-C.y];return e.radius=Math.sqrt(E*E+K*K)/2,e.center.x=(C.x+N.x)/2,e.center.y=(C.y+N.y)/2,e}let t=0,n=0;for(let C=0;C<i.length;C++)t+=i[C].x,n+=i[C].y;t/=i.length,n/=i.length;const s=i.map(C=>C.x-t),o=i.map(C=>C.y-n);let a=0,l=0,c=0,u=0,d=0,p=0,m=0;for(let C=0;C<s.length;C++){const N=s[C],E=o[C],K=N*N,ce=E*E;a+=K,l+=ce,c+=N*E,u+=K*N,d+=ce*E,p+=N*ce,m+=E*K}const g=.5*(u+p),v=.5*(d+m),f=a*l-c*c,I=(g*l-v*c)/f,$=(a*v-c*g)/f,he=L(I+t,$+n);return{radius:Math.sqrt(I*I+$*$+(a+l)/i.length),center:he}}function Ue(i){const{native:e}=i,{pointerId:t,button:n,pointerType:s}=e;return s==="mouse"?`${t}:${n}`:`${s}`}let hu=class extends A{constructor(e={},t=zt){super(!1),this._clock=t,this._doubleTapDragReady=!1,this._doubleTapDragActive=!1,this._dragStartCenter=L(0,0),this._pointerState=new Map,this._parameters=Jn(e),this._doubleTapDrag=this.registerOutgoing("double-tap-drag"),this._dragEventSeparator=new Ni({start:(n,s)=>this._dragStart(n,s),update:(n,s)=>this._dragUpdate(s),end:(n,s)=>this._dragEnd(s)}),this.registerIncoming("drag",n=>this._dragEventSeparator.handle(n)),this.registerIncoming("pointer-down",n=>this._handlePointerDown(n)),this.registerIncoming("pointer-up",()=>this._handlePointerUp())}onUninstall(){this._pointerState.forEach(e=>{e.doubleTapTimeout=ee(e.doubleTapTimeout)})}get hasPendingInputs(){for(const e of this._pointerState.values())if(e.doubleTapTimeout!=null)return!0;return!1}_clearPointerDown(e){const t=this._pointerState.get(e);t&&(t.doubleTapTimeout=ee(t.doubleTapTimeout),this._pointerState.delete(e),this.refreshHasPendingInputs())}_dragStart(e,t){if(!this._doubleTapDragReady||e!==1)return;this._doubleTapDragReady=!1,this._doubleTapDragActive=!0;const{data:n,modifiers:s}=t,{center:o}=n;this._dragStartCenter=o;const a=Xi("begin",L(0,0),n);this._doubleTapDrag.emit(a,void 0,s),t.stopPropagation()}_dragUpdate(e){if(!this._doubleTapDragActive)return;const{data:t,modifiers:n}=e,{center:s}=t,o=Xi("update",L(s.x-this._dragStartCenter.x,s.y-this._dragStartCenter.y),t);this._doubleTapDrag.emit(o,void 0,n),e.stopPropagation()}_dragEnd(e){if(!this._doubleTapDragActive)return;const{data:t,modifiers:n}=e,{center:s}=t,o=Xi("end",L(s.x-this._dragStartCenter.x,s.y-this._dragStartCenter.y),t);this._doubleTapDrag.emit(o,void 0,n),this._doubleTapDragActive=!1,e.stopPropagation()}_handlePointerDown(e){const{data:t}=e,n=Ue(t),s=this._pointerState.get(n),{pointerType:o}=t.native;if(s){const a=o==="touch"?this._parameters.maximumDoubleTouchDistance:this._parameters.maximumDoubleClickDistance;this._clearPointerDown(n),fi(s.event.data,t)>a?this._storePointerDown(e):this._doubleTapDragReady=!0}else this._storePointerDown(e)}_handlePointerUp(){this._doubleTapDragReady=!1}_storePointerDown(e){const{data:t}=e,{pointerType:n}=t.native,s=Ue(t),o=n==="touch"?this._parameters.maximumDoubleTouchDelay:this._parameters.maximumDoubleClickDelay,a=this._clock.setTimeout(()=>this._clearPointerDown(s),o);this._pointerState.set(s,{event:e,doubleTapTimeout:a}),this.refreshHasPendingInputs()}};function Xi(i,e,t){const{button:n,buttons:s,pointer:o,pointers:a,pointerType:l,timestamp:c}=t;return{action:i,delta:e,button:n,buttons:s,pointer:o,pointers:a,pointerType:l,timestamp:c}}let cu=class extends A{constructor(e){super(!1),this._navigationTouch=e,this._startStateModifiers=new Set,this._activePointerMap=new Map,this._isDragging=!1,this._isCurrentDragSuppressed=!1,this._drag=this.registerOutgoing("drag"),this.registerIncoming("pointer-drag",this._handlePointerDrag.bind(this)),this.registerIncoming("pointer-up",this._handlePointerUpAndPointerLost.bind(this)),this.registerIncoming("pointer-capture-lost",this._handlePointerUpAndPointerLost.bind(this)),this.registerIncoming("pointer-cancel",this._handlePointerUpAndPointerLost.bind(this))}_createPayload(e,t,n,s){return{action:e,pointerType:this._pointerType,button:this._mouseButton,buttons:t.buttons,timestamp:s,pointers:uu(this._activePointerMap),pointer:t,angle:n.angle,radius:n.radius,center:n.center}}_addPointer(e){const t=e.native.pointerId,n=Qt(this._activePointerMap).angle,s={event:e,initialAngle:0,lastAngle:0};this._activePointerMap.set(t,s);const o=hi(s,xa(this._activePointerMap));s.initialAngle=o,s.lastAngle=o,this._updatePointerAngles(n)}_updatePointer(e){if(e&&e.x==null&&e.y==null)return;const t=e.native.pointerId,n=this._activePointerMap.get(t);n?n.event=e:this._addPointer(e)}_removePointer(e){const t=Qt(this._activePointerMap).angle;this._activePointerMap.delete(e),this._updatePointerAngles(t)}_updatePointerAngles(e){const t=Qt(this._activePointerMap);
2this._activePointerMap.forEach(n=>{n.initialAngle=hi(n,t)-e,n.lastAngle=hi(n,t)-e})}_emitEvent(e,t,n){const s=Qt(this._activePointerMap);this._drag.emit(this._createPayload(e,t,s,n),void 0,this._startStateModifiers)}_handlePointerUpAndPointerLost(e){const t=e.data.native.pointerId,n=ne(e.timestamp);this._activePointerMap.get(t)&&(this._activePointerMap.size===1?(this._updatePointer(e.data),!this._isCurrentDragSuppressed&&this._emitEvent("end",e.data,n),this._isDragging=!1,this._isCurrentDragSuppressed=!1,this._removePointer(t)):(this._removePointer(t),this._emitEvent("removed",e.data,ne(e.timestamp))))}_handlePointerDrag(e){const t=e.data,n=t.currentEvent,s=ne(e.timestamp);switch(t.action){case"start":case"update":this._isDragging?this._activePointerMap.has(n.native.pointerId)?(this._updatePointer(n),!this._isCurrentDragSuppressed&&this._emitEvent("update",n,s)):(this._addPointer(n),this._emitEvent("added",n,s),this._isCurrentDragSuppressed=this._isSuppressed):(this._updatePointer(n),this._pointerType=e.data.startEvent.pointerType,this._mouseButton=e.data.startEvent.button,this._startStateModifiers=e.modifiers,this._isDragging=!0,this._isCurrentDragSuppressed=this._isSuppressed,!this._isCurrentDragSuppressed&&this._emitEvent("start",n,s))}}get _isSuppressed(){return!!this._navigationTouch&&!this._navigationTouch.browserTouchPanEnabled&&this._pointerType==="touch"&&this._activePointerMap.size===1}};function xa(i){const e=[];return i.forEach(t=>{e.push(L(t.event.x,t.event.y))}),lu(e)}function Qt(i){const e=xa(i);let t=0;return i.forEach(n=>{let s=hi(n,e),o=s-n.lastAngle;for(;o>Math.PI;)o-=2*Math.PI;for(;o<-Math.PI;)o+=2*Math.PI;s=n.lastAngle+o,n.lastAngle=s;const a=s-n.initialAngle;t+=a}),t/=i.size||1,{angle:t,radius:e.radius,center:e.center}}function uu(i){const e=new Map;return i.forEach((t,n)=>e.set(n,t.event)),e}function hi(i,e){const t=i.event,n=t.x-e.center.x,s=t.y-e.center.y;return Math.atan2(s,n)}let du=class extends A{constructor(e={},t=zt){super(!1),this._clock=t,this._pointerState=new Map,this._parameters=Jn(e),this._immediateDoubleClick=this.registerOutgoing("immediate-double-click"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",this._handlePointerUp.bind(this))}onUninstall(){this._pointerState.forEach(e=>{e.immediateDoubleClick&&e.immediateDoubleClick.timeoutHandle.remove()}),super.onUninstall()}_handlePointerDown(e){const t=e.data,n=Ue(t);if(!this._pointerState.has(n)){const s={downButton:t.native.button,x:t.x,y:t.y,immediateDoubleClick:null};this._pointerState.set(n,s),this.startCapturingPointer(t.native)}}_handlePointerUp(e){const t=e.data,n=Ue(t),s=this._pointerState.get(n);if(s&&s.downButton===t.native.button){const o=s.immediateDoubleClick,a=e.data.native.pointerType==="touch"?this._parameters.maximumDoubleTouchDistance:this._parameters.maximumDoubleClickDistance;o?(o.timeoutHandle.remove(),fi(o,e.data)>a?this._startImmediateDoubleClick(e,s):(this._immediateDoubleClick.emit(e.data,void 0,o.modifiers),this._removeState(t))):fi(s,e.data)>a?this._removeState(t):this._startImmediateDoubleClick(e,s)}}_startImmediateDoubleClick(e,t){const n=e.data.native.pointerType==="touch"?this._parameters.maximumDoubleTouchDelay:this._parameters.maximumDoubleClickDelay;t.immediateDoubleClick={x:e.data.x,y:e.data.y,modifiers:e.modifiers,timeoutHandle:this._clock.setTimeout(()=>this._removeState(e.data),n)}}_removeState(e){const t=Ue(e);this._pointerState.delete(t),this.stopCapturingPointer(e.native),this.refreshHasPendingInputs()}},pu=class extends A{constructor(e={},t=zt){super(!1),this._clock=t,this._pointerState=new Map,this._parameters=au(e),this._pointerDrag=this.registerOutgoing("pointer-drag"),this._immediateClick=this.registerOutgoing("immediate-click"),this._pointerHold=this.registerOutgoing("hold"),this.registerIncoming("pointer-down",n=>this._handlePointerDown(n)),this.registerIncoming("pointer-up",n=>this._handlePointerLoss(n,"pointer-up")),this.registerIncoming("pointer-capture-lost",n=>this._handlePointerLoss(n,"pointer-capture-lost")),this.registerIncoming("pointer-cancel",n=>this._handlePointerLoss(n,"pointer-cancel")),this._moveHandle=this.registerIncoming("pointer-move",n=>this._handlePointerMove(n)),this._moveHandle.pause()}
vendor: 7,793 bytes, line 2
2onUninstall(){this._pointerState.forEach(e=>{e.holdTimeout=ee(e.holdTimeout)}),super.onUninstall()}_handlePointerDown(e){const t=e.data,n=t.native.pointerId;let s=null;this._pointerState.size===0&&(s=this._clock.setTimeout(()=>{const a=this._pointerState.get(n);if(a){if(!a.isDragging){const l=a.previousEvent;this._pointerHold.emit(l,void 0,e.modifiers),a.holdEmitted=!0}a.holdTimeout=null}},this._parameters.holdDelay));const o={startEvent:t,previousEvent:t,startTimestamp:e.timestamp,isDragging:!1,downButton:t.native.button,holdTimeout:s,modifiers:new Set};this._pointerState.set(n,o),this.startCapturingPointer(t.native),this._moveHandle.resume(),this._pointerState.size>1&&this._startDragging(e)}_handlePointerMove(e){const t=e.data,n=t.native.pointerId,s=this._pointerState.get(n);s&&(s.isDragging?this._pointerDrag.emit(Xt("update",s,t),void 0,s.modifiers):ru(t,s.startEvent)>this._getDragThreshold(t.native.pointerType)&&this._startDragging(e),s.previousEvent=t)}_getDragThreshold(e){switch(e){case"touch":return this._parameters.movementUntilTouchDrag;case"pen":return this._parameters.movementUntilPenDrag;default:return this._parameters.movementUntilMouseDrag}}_startDragging(e){const t=e.data,n=t.native.pointerId;this._pointerState.forEach(s=>{s.holdTimeout!=null&&(s.holdTimeout.remove(),s.holdTimeout=null),s.isDragging||(s.modifiers=e.modifiers,s.isDragging=!0,n===s.startEvent.native.pointerId?this._pointerDrag.emit(Xt("start",s,t)):this._pointerDrag.emit(Xt("start",s,s.previousEvent),e.timestamp))})}_handlePointerLoss(e,t){const n=e.data,s=n.native.pointerId,o=this._pointerState.get(s);o&&(o.holdTimeout!=null&&(o.holdTimeout.remove(),o.holdTimeout=null),o.isDragging?this._pointerDrag.emit(Xt("end",o,t==="pointer-up"?n:o.previousEvent),void 0,o.modifiers):t==="pointer-up"&&o.downButton===n.native.button&&e.timestamp-o.startTimestamp<=this._parameters.maximumClickDelay&&!o.holdEmitted&&this._immediateClick.emit(n),this._pointerState.delete(s),this.stopCapturingPointer(n.native),this._pointerState.size===0&&this._moveHandle.pause())}};function Xt(i,e,t){return{action:i,startEvent:e.startEvent,previousEvent:e.previousEvent,currentEvent:t}}let mu=class extends A{constructor(e={},t=zt){super(!1),this._clock=t,this._pointerState=new Map,this._parameters=Jn(e),this._click=this.registerOutgoing("click"),this._doubleClick=this.registerOutgoing("double-click"),this.registerIncoming("immediate-click",n=>this._handleImmediateClick(n)),this.registerIncoming("pointer-down",n=>this._handlePointerDown(n))}onUninstall(){this._pointerState.forEach(e=>e.doubleClickTimer=ee(e.doubleClickTimer))}get hasPendingInputs(){for(const e of this._pointerState.values())if(e.doubleClickTimer!=null)return!0;return!1}_clearDoubleClickTimer(e,t){const n=this._pointerState.get(e);n&&(n.doubleClickTimer=ee(n.doubleClickTimer),t&&this._click.emit(n.event.data,void 0,n.event.modifiers),this._pointerState.delete(e),this.refreshHasPendingInputs())}_doubleClickTimeoutExceeded(e){const t=this._pointerState.get(e);t.pointerDownCount===1&&this._click.emit(t.event.data,void 0,t.event.modifiers),t.doubleClickTimer=null,this._pointerState.delete(e),this.refreshHasPendingInputs()}_handleImmediateClick(e){const t=e.data,{pointerType:n}=t.native,s=gu(t);if(!this._pointerState.has(s))return void this._startClick(e);const o=this._pointerState.get(s),{data:a,modifiers:l}=o.event,c=n==="touch"?this._parameters.maximumDoubleTouchDistance:this._parameters.maximumDoubleClickDistance;fi(a,t)>c?(this._clearDoubleClickTimer(s,!0),this._startClick(e)):(this._clearDoubleClickTimer(s,!1),o.pointerDownCount===2&&this._doubleClick.emit(a,void 0,l))}_handlePointerDown(e){const t=Ue(e.data),n=this._pointerState.get(t);n&&(n.pointerDownCount+=1)}_startClick(e){const{data:t}=e,{native:{pointerType:n}}=t,s=Ue(t),o=n==="touch"?this._parameters.maximumDoubleTouchDelay:this._parameters.maximumDoubleClickDelay,a=this._clock.setTimeout(()=>this._doubleClickTimeoutExceeded(s),o);this._pointerState.set(s,{event:e,doubleClickTimer:a,pointerDownCount:1}),this.refreshHasPendingInputs()}};function gu(i){const{pointerId:e,pointerType:t,button:n}=i.native;return t==="mouse"?`${e}:${n}`:`${t}`}const ei={counter:"Control",pan:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown"},zoom:{zoomIn:["=","+"],zoomOut:["-","_"]},rotate:{clockwise:["a","A"],counterClockwise:["d","D"],reset:["n","N"]}},Fs=Symbol("handles");let ut=class extends T{initialize(){const e=()=>this.view?.ready;this.addHandles([Ke(()=>!e(),()=>this._disconnect()),Ke(e,()=>this._connect())])}destroy(){this._disconnect()}get latestPointerInfo(){return this._inputManager?.latestPointerInfo}get multiTouchActive(){return this._inputManager?.multiTouchActive??!1}isModifierKeyDown(e){return this._inputManager?.isModifierKeyDown(e)??!1}_disconnect(){this.view.viewEvents.disconnect(),this.removeHandles(Fs),this._inputManager=ie(this._inputManager)}_connect(){const e=this.view.surface,t=new su(e,this.view.input),n=[new du,new pu,new mu,new cu(this.view.navigation),new hu],s=new le({eventSource:t,recognizers:n}),o=new Ac(this.view,["primary"]),a=new Lc(this.view,["secondary"]);s.installHandlers("prevent-context-menu",[new ou],Ce.INTERNAL),s.installHandlers("navigation",[new Kc(this.view),new Nc(this.view),new Bc(this.view),new Ds(this.view),new Ds(this.view,[ei.counter]),o,new Wc(this.view,ei.pan),new jc(this.view,ei.zoom),new Gc(this.view,ei.rotate),a,new Dc(this.view,"touch")],Ce.INTERNAL),this.view.viewEvents.connect(s),this._source=t,this._inputManager=s,this.addHandles([w(()=>this.view?.navigation?.browserTouchPanEnabled,l=>{this._source&&(this._source.browserTouchPanningEnabled=!l)},W),w(()=>{const{actionMap:l}=this.view.navigation;return{panActions:Rs("pan",l),rotateActions:Rs("rotate",l)}},({panActions:l,rotateActions:c})=>{o.pointerActions=l,a.pointerActions=c},X)],Fs)}get test(){}};r([h()],ut.prototype,"view",void 0),r([h()],ut.prototype,"latestPointerInfo",null),r([h()],ut.prototype,"multiTouchActive",null),ut=r([_("esri.views.2d.input.MapViewInputManager")],ut);const fu=ut,yu=i=>{const e=i;let t=class extends e{constructor(...n){super(...n),this.goToManager=new li({view:this}),this.animationsEnabled=!0,this.inputManager=new fu({view:this}),this.addHandles([this.on("resize",s=>this.stateManager.resize(s.width,s.height))])}get interacting(){return this.navigating}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}on(n,s,o,a){return this.viewEvents.on(n,s,o,a)||super.on(n,s)}hasEventListener(n){return super.hasEventListener(n)||this.viewEvents.hasHandler(n)}goTo(n,s){return this.goToManager.goTo(n,s)}toMap(n){if(!this.ready)return null;const s=Qo(n)?Jo(this,n):n;return this.stateManager.toMap(s)}};return r([h()],t.prototype,"goToManager",void 0),r([h({readOnly:!0})],t.prototype,"interacting",null),r([h()],t.prototype,"stationary",null),r([h()],t.prototype,"animationsEnabled",void 0),r([h({readOnly:!0})],t.prototype,"inputManager",void 0),t=r([_("esri.views.Viewport2DMixin")],t),t};let Ns=class{constructor(e){this._view=e,this.viewpoint=new se({targetGeometry:new O,scale:0,rotation:0})}get view(){return this._view}get size(){const[e,t]=this._view.size;return Math.sqrt(e*e+t*t)}get scale(){return this.viewpoint.scale}get rotation(){return this.viewpoint.rotation}get center(){return this.viewpoint.targetGeometry}get scaleToResolutionFactor(){return da(this.center.spatialReference)}pixelsPerPanAtZoom(e){return 1/(e*this.scaleToResolutionFactor)}zoomAtPixelsPerPan(e){return 1/(e*this.scaleToResolutionFactor)}pixelsPerRotate(){return this.size/2}compareTo(e,t){t.pan=Vr(this.center,e.center);let n=Math.abs(e.rotation-this.rotation);n=n>=180?360-n:n,t.rotate=Si(n),t.sourceZoom=this.scale,t.targetZoom=e.scale}
2interpolate(e,t,n){const{pan:s,rotate:o,zoom:a,zoomOffset:l}=n,{center:c}=this;c.spatialReference=e.center.spatialReference,c.x=Gt(e.center.x,t.center.x,s),c.y=Gt(e.center.y,t.center.y,s),this.viewpoint.scale=Gt(e.scale,t.scale+l,a);let u=e.rotation;const d=t.rotation;Math.abs(d-u)>=180&&(u+=360*(u<d?1:-1)),this.viewpoint.rotation=Gt(u,d,o)}copyFrom(e){Z(this.viewpoint,e.viewpoint),this._view=e.view}};const _u=i=>i,Lt=i=>i*i,yi=i=>1-Lt(1-i),Hs=i=>i<.5?Lt(2*i)/2:(yi(2*(i-.5))+1)/2,_i=i=>i*i*i,Sn=i=>1-_i(1-i),Zs=i=>i<.5?_i(2*i)/2:(Sn(2*(i-.5))+1)/2,vi=i=>i*i*i*i,Cn=i=>1-vi(1-i),qs=i=>i<.5?vi(2*i)/2:(Cn(2*(i-.5))+1)/2,wi=i=>i*i*i*i*i,En=i=>1-wi(1-i),Ws=i=>i<.5?wi(2*i)/2:(En(2*(i-.5))+1)/2,bi=i=>1-Math.cos(i*Math.PI/2),Vn=i=>1-bi(1-i),Gs=i=>i<.5?bi(2*i)/2:(Vn(2*(i-.5))+1)/2,Mi=i=>2**(10*(i-1)),xi=i=>1-Mi(1-i),js=i=>i<.5?Mi(2*i)/2:(xi(2*(i-.5))+1)/2,Ti=i=>-(Math.sqrt(1-i*i)-1),In=i=>1-Ti(1-i),Us=i=>i<.5?Ti(2*i)/2:(In(2*(i-.5))+1)/2;function oe(i){const e=2*(i-Math.sqrt((i-1)*i)),t=e/2/i;return n=>n<t?i*n*n:e*n-e+1}function ae(i,e){return(t,n)=>t<e?e*i(t/e,n):1-i((1-t)/(1-e),n)*(1-e)}const Bs=ae(oe(1),1),Ks=ae(oe(1),0),$i=ae(oe(1),.5),Ys=ae(oe(2),1),Js=ae(oe(2),0),Qs=ae(oe(2),.5),Xs=ae(oe(3),1),eo=ae(oe(3),0),to=ae(oe(3),.5),io=ae(oe(4),1),no=ae(oe(4),0),so=ae(oe(4),.5),oo={linear:_u,"in-quad":Lt,"out-quad":yi,"in-out-quad":Hs,"in-coast-quad":Bs,"out-coast-quad":Ks,"in-out-coast-quad":$i,"in-cubic":_i,"out-cubic":Sn,"in-out-cubic":Zs,"in-coast-cubic":Ys,"out-coast-cubic":Js,"in-out-coast-cubic":Qs,"in-quart":vi,"out-quart":Cn,"in-out-quart":qs,"in-coast-quart":Xs,"out-coast-quart":eo,"in-out-coast-quart":to,"in-quint":wi,"out-quint":En,"in-out-quint":Ws,"in-coast-quint":io,"out-coast-quint":no,"in-out-coast-quint":so,"in-sine":bi,"out-sine":Vn,"in-out-sine":Gs,"in-expo":Mi,"out-expo":xi,"in-out-expo":js,"in-circ":Ti,"out-circ":In,"in-out-circ":Us,"quad-in":Lt,"quad-out":yi,"quad-in-out":Hs,"quad-in-coast":Bs,"quad-out-coast":Ks,"quad-in-out-coast":$i,"cubic-in":_i,"cubic-out":Sn,"cubic-in-out":Zs,"cubic-in-coast":Ys,"cubic-out-coast":Js,"cubic-in-out-coast":Qs,"quart-in":vi,"quart-out":Cn,"quart-in-out":qs,"quart-in-coast":Xs,"quart-out-coast":eo,"quart-in-out-coast":to,"quint-in":wi,"quint-out":En,"quint-in-out":Ws,"quint-in-coast":io,"quint-out-coast":no,"quint-in-out-coast":so,"sine-in":bi,"sine-out":Vn,"sine-in-out":Gs,"expo-in":Mi,"expo-out":xi,"expo-in-out":js,"cir
2c-in":Ti,"circ-out":In,"circ-in-out":Us,ease:i=>Bt.ease(i),"ease-in":i=>Bt.easeIn(i),"ease-out":i=>Bt.easeOut(i),"ease-in-out":i=>Bt.easeInOut(i)};let vu=class{constructor(){this.pan=0,this.rotate=0,this.fov=0,this.sourceZoom=0,this.targetZoom=0}};const ki={desiredScreenFlow:2,minDuration:ne(500),maxDuration:ne(8e3)},Ta={maxDuration:ne(4e3)};let wu=class $a{constructor(e){this._createCamera=e,this.compared=new vu,this.segmentStart=0,this.segmentEnd=1,this.settings={desiredScreenFlow:ki.desiredScreenFlow},this.source=e(),this.target=e()}clone(){const e=new $a(this._createCamera);return e.copyFrom(this),e}copyFrom(e){this.update(e.source,e.target,e.settings)}update(e,t,n){this.source!==e&&this.source.copyFrom(e),this.target!==t&&this.target.copyFrom(t),this.source.compareTo(this.target,this.compared),this.settings.desiredScreenFlow=n.desiredScreenFlow??ki.desiredScreenFlow,this.desiredPixelFlow=this.settings.desiredScreenFlow*this.target.size,this.halfWindowSize=this.target.size/2}halfWindowPanAtZoom(e){const t=this.target.pixelsPerPanAtZoom(e);return this.halfWindowSize/t}get hasZoom(){return Math.abs(this.compared.sourceZoom-this.compared.targetZoom)>1e-5}get hasPan(){return this.compared.pan>Hi()}get hasFov(){return Math.abs(this.compared.fov)>Hi()}get hasRotate(){return this.compared.rotate>Hi()}},bu=class{constructor(){this.pan=0,this.rotate=0,this.zoom=0,this.fov=0,this.zoomOffset=0}},Mu=class{constructor(){this.segments=new Array}get time(){return this.segments.reduce((e,t)=>Q(e+t.time),Q(0))}interpolateComponentsAt(e,t){e=Math.min(Math.max(e,0),1),e*=this.time;let n=0,s=0;const o=this.definition,a=this.segments.reduce((l,c)=>l||c.definition.hasZoom,!1);for(let l=0;l<this.segments.length;l++){const c=this.segments[l],u=c.definition;if(e<=c.time||l===this.segments.length-1){if(this.segmentInterpolateComponentsAt(c,c.time===0?0:e/c.time,t),o.hasPan&&!isNaN(t.pan)&&isFinite(o.compared.pan)?t.pan=(n+u.compared.pan*t.pan)/o.compared.pan:t.pan=1,o.hasRotate&&!isNaN(t.rotate)&&isFinite(o.compared.rotate)?t.rotate=(s+u.compared.rotate*t.rotate)/o.compared.rotate:t.rotate=1,a&&!isNaN(t.zoom)&&isFinite(u.compared.targetZoom)){const{sourceZoom:d,targetZoom:p}=u.compared,m=t.zoom*(p-d)+d,g=this.segments[0].definition.compared.sourceZoom,v=this.segments[this.segments.length-1].definition.compared.targetZoom,f=Math.abs(p-g)>Math.abs(d-g)?p:d;t.zoomOffset=f-v,t.zoom=(m-g)/(f-g)}else t.zoom=1;return t}e-=c.time,n+=u.compared.pan,s+=u.compared.rotate}}segmentInterpolateComponentsAt(e,t,n){e.interpolateComponentsAt(t,n)}},en=class{get time(){return this._time}constructor(e){e&&this.update(e)}update(e){e&&(this.definition?this.definition.copyFrom(e):this.definition=e.clone()),this._updatePrecomputedVariables(),this._updatePixelFlow()}_updatePrecomputedVariables(){const e=this.definition,t=e.compared,n=t.sourceZoom,s=t.targetZoom;this._zoomSign=n>s?1:-1,this._panPixelsAtSource=t.pan*e.source.pixelsPerPanAtZoom(n);const o=(e.source.pixelsPerRotate()+e.target.pixelsPerRotate())/2;this._rotatePixels=t.rotate*o}_updatePixelFlow(){const e=this.definition.compared.sourceZoom,t=this.definition.compared.targetZoom,{hasZoom:n,hasPan:s,hasRotate:o}=this.definition;let a=0,l=0;n&&(s&&(a=(t/e-1)/(-1/(this._zoomSign*this.definition.halfWindowSize)*Math.LN2*this._panPixelsAtSource)),o&&(l=this._zoomSign*(Math.log(e/t)/Math.LN2)*this.definition.halfWindowSize/this._rotatePixels)),this._zoomPixelFlow=0,this._panPixelFlow=0,this._rotatePixelFlow=0;const c=this.definition.desiredPixelFlow;if(n&&s&&o){const u=a+l+a*l;this._zoomPixelFlow=a*l/u*c,this._panPixelFlow=l/u*c,this._rotatePixelFlow=a/u*c}else if(n&&s){const u=1+a;this._zoomPixelFlow=a/u*c,this._panPixelFlow=1/u*c}else if(n&&o){const u=1+l;this._zoomPixelFlow=l/u*c,this._rotatePixelFlow=1/u*c}else if(s&&o){const u=this._panPixelsAtSource/this._rotatePixels,d=1+u;this._panPixelFlow=u/d*c,this._rotatePixelFlow=1/d*c}else s?this._panPixelFlow=c:n?this._zoomPixelFlow=c:o&&(this._rotatePixelFlow=c);if(this._time=Q(Math.max(this.rotateTime,this.zoomTime,this.panTime)),this.fovTime>this._time){const u=this.fovTime/this._time;this._time=this.fovTime,this._zoomPixelFlow/=u,this._panPixelFlow/=u,this._rotatePixelFlow/=u}}get rotateTime(){return this.definition.hasRotate?Q(this._rotatePixels/this._rotatePixelFlow):Q(0)}get zoomTime(){return this.definition.hasZoom?Q(this._zoomSign*(Math.log(this.definition.compared.sourceZoom/this.definition.compared.targetZoom)/Math.LN2)*this.definition.halfWindowSize/this._zoomPixelFlow):Q(0)}get fovTime(){return this.definition.hasFov?Q(Math.abs(this.definition.compared.fov)/xu):Q(0)}get panTime(){if(!this.definition.hasPan)return Q(0);if(this.definition.hasZoom){const e=-1/(this._zoomSign*this.definition.halfWindowSize)*Math.LN2,t=e*this._panPixelsAtSource;return Q(Math.log(t*(this._zoomPixelFlow/this._panPixelFlow)+1)/(e*this._zoomPixelFlow))}return Q(this._panPixelsAtSource/this._panPixelFlow)}_interpolateComponentsZoom(e){if(e===0||e===1)return e;if(this.definition.hasZoom){const t=this.definition.compared.sourceZoom,n=this.definition.compared.targetZoom;return(t*(t/n)**-e-t)/(n-t)}return e}_interpolateComponentsFov(e){if(e===0)return this.definition.segmentStart;if(e===1)return this.definition.segmentEnd;if(this.definition.hasFov){const{segmentStart:t,segmentEnd:n}=this.definition;return t+e*(n-t)}return this.definition.segmentStart}_interpolateComponentsPan(e){if(e===0||e===1)return e;if(this.definition.hasPan&&this.definition.hasZoom){const t=-1/(this._zoomSign*this.definition.halfWindowSize)*this._zoomPixelFlow;return 1/this._panPixelsAtSource*(this._panPixelFlow*(2**(t*e*this._time)-1))/(t*Math.LN2)}return e}_interpolateComponentsRotate(e){return e}interpolateComponentsAt(e,t){e=Math.min(Math.max(e,0),1),t.zoom=this._interpolateComponentsZoom(e),t.pan=this._interpolateComponentsPan(e),t.rotate=this._interpolateComponentsRotate(e),t.zoomOffset=0,t.fov=this._interpolateComponentsFov(e)}};const xu=Si(45);function Tu(i,e,t){const n=e-i.compared.sourceZoom,s=i.halfWindowPanAtZoom(n);return-i.halfWindowSize*(t.ascensionFactor*Math.LN2*i.compared.pan+s)*Math.log(i.compared.sourceZoom/e)/(i.desiredPixelFlow*Math.LN2*s)}function $u(i,e,t){const n=1/e,s=Math.log(i.compared.sourceZoom*n),o=1/i.desiredPixelFlow,a=1/Math.LN2,l=e-i.compared.sourceZoom,c=1/l,u=(t.ascensionFactor*Math.LN2*i.compared.pan+i.halfWindowPanAtZoom(l))/i.halfWindowPanAtZoom(1);return i.halfWindowSize*n*o*a*c*u-i.halfWindowSize*s*o*a*c+i.halfWindowSize*s*o*a*u/(l*l)}function ku(i,e,t){const n=e-i.compared.sourceZoom,s=1/n,o=1/e,a=Math.log(i.compared.sourceZoom*o),l=(t.ascensionFactor*Math.LN2*i.compared.pan+i.halfWindowPanAtZoom(n))/i.halfWindowPanAtZoom(1);return i.halfWindowSize*s*(-2*s*o*l+2*s*a+2*o-2*a*l/(n*n)-l/(e*e))/(i.desiredPixelFlow*Math.LN2)}function Pu(i,e){return-i.halfWindowSize*Math.log(i.compared.sourceZoom/e)/(i.desiredPixelFlow*Math.LN2)}function Su(i,e){return i.halfWindowSize/(e*i.desiredPixelFlow*Math.LN2)}function Cu(i,e){return-i.halfWindowSize/(e*e*i.desiredPixelFlow*Math.LN2)}
2function Eu(i,e,t){return-i.compared.pan*i.halfWindowSize*(t.ascensionFactor+t.descensionFactor-1)/(i.desiredPixelFlow*i.halfWindowPanAtZoom(e))}function Vu(i,e,t){return i.compared.pan*i.halfWindowSize*(t.ascensionFactor+t.descensionFactor-1)/(i.desiredPixelFlow*i.halfWindowPanAtZoom(e*e))}function Iu(i,e,t){return-2*i.compared.pan*i.halfWindowSize*(t.ascensionFactor+t.descensionFactor-1)/(i.desiredPixelFlow*i.halfWindowPanAtZoom(e*e*e))}function Ru(i,e,t){return i.halfWindowSize*(-i.halfWindowPanAtZoom(e)-t.descensionFactor*Math.LN2*i.compared.pan+i.halfWindowPanAtZoom(i.compared.targetZoom))*Math.log(e/i.compared.targetZoom)/(i.desiredPixelFlow*Math.LN2*i.halfWindowPanAtZoom(-e+i.compared.targetZoom))}function Du(i,e,t){const n=Math.log(e/i.compared.targetZoom),s=1/i.desiredPixelFlow,o=1/Math.LN2,a=-e+i.compared.targetZoom,l=1/a,c=(-i.halfWindowPanAtZoom(e)-t.descensionFactor*Math.LN2*i.compared.pan+i.halfWindowPanAtZoom(i.compared.targetZoom))/i.halfWindowPanAtZoom(1);return-i.halfWindowSize*n*s*o*l+i.halfWindowSize*n*s*o*c/(a*a)+i.halfWindowSize*s*o*l*c/e}function Au(i,e,t){const n=e-i.compared.targetZoom,s=1/n,o=1/e,a=Math.log(e/i.compared.targetZoom),l=(i.halfWindowPanAtZoom(e)+t.descensionFactor*Math.LN2*i.compared.pan-i.halfWindowPanAtZoom(i.compared.targetZoom))/i.halfWindowPanAtZoom(1);return i.halfWindowSize*s*(-2*s*o*l-2*s*a+2*o+2*a*l/(n*n)-l/(e*e))/(i.desiredPixelFlow*Math.LN2)}function Lu(i,e){return i.halfWindowSize*Math.log(e/i.compared.targetZoom)/(i.desiredPixelFlow*Math.LN2)}function Ou(i,e){return i.halfWindowSize/(e*i.desiredPixelFlow*Math.LN2)}function zu(i,e){return-i.halfWindowSize/(e*e*i.desiredPixelFlow*Math.LN2)}function Fu(i){const e=i.compared.sourceZoom-i.compared.targetZoom;if(e===0)return i.compared.pan*i.halfWindowSize/(i.desiredPixelFlow*i.halfWindowPanAtZoom(i.compared.sourceZoom));const t=Math.LN2*i.compared.pan,n=e,s=i.halfWindowPanAtZoom(n),o=i.halfWindowSize*Math.log(i.compared.sourceZoom/i.compared.targetZoom)/(i.desiredPixelFlow*Math.LN2*s);return i.compared.sourceZoom<=i.compared.targetZoom?o*(t-s):o*(t+s)}function Nu(i,e){let t=Hu(i,e);const n={ascensionFactor:e.ascensionFactor!=null?e.ascensionFactor:.5,descensionFactor:e.descensionFactor!=null?e.descensionFactor:.5},s=n.ascensionFactor===0,o=n.descensionFactor===0,a=s?Pu:Tu,l=s?Su:$u,c=s?Cu:ku,u=o?Lu:Ru,d=o?Ou:Du,p=o?zu:Au,m=E=>a(i,E,n)+Eu(i,E,n)+u(i,E,n),g=E=>l(i,E,n)+Vu(i,E,n)+d(i,E,n),v=E=>c(i,E,n)+Iu(i,E,n)+p(i,E,n);let f=m(t);const I=Fu(i);let $;const he=e.maximumIterations||20,C=e.maximumDistance!=null?e.maximumDistance:1/0;for($=0;$<he;$++){const E=e.desiredSlope??1e-6;let K=g(t);Math.abs(K)>E&&(K+=E);const ce=K/v(t);if(isNaN(ce)||t>=C&&ce<0){if(!isFinite(C))return null;t=C,f=m(t);break}if(t-=ce,t<=i.compared.sourceZoom||t<=i.compared.targetZoom)return null;const bt=m(t);if(Math.abs(bt-f)/f<=.005)break;f=bt}return isNaN(f)||f>I*(1-.3)||t<=i.compared.sourceZoom||t<=i.compared.targetZoom?null:t}function Hu(i,e){const t=Math.max(i.compared.sourceZoom,i.compared.targetZoom),n=i.source.zoomAtPixelsPerPan(i.desiredPixelFlow/i.compared.pan)/2;return n<t?e.maximumDistance!=null?t+(e.maximumDistance-t)/2:1.5*t:e.maximumDistance?Math.min(e.maximumDistance,n):n}let Zu=class extends Mu{constructor(e,t){super(),this._preallocSegments=[new en,new en,new en],this._ascensionSegment=null,this._descensionSegment=null,this.update(e,t)}update(e,t){if(!e)return;this.definition?this.definition.copyFrom(e):this.definition=e.clone();const n=t?.apex?Nu(e,t.apex):null;this.segments.length=0,this._ascensionSegment=null,this._descensionSegment=null,n?this._updateWithApex(n,t?.apex):this._updateWithoutApex()}segmentInterpolateComponentsAt(e,t,n){e.interpolateComponentsAt(t,n),e===this._ascensionSegment?n.zoom=yi(n.zoom):e===this._descensionSegment&&(n.zoom=Lt(n.zoom))}_updateWithApex(e,t){const[n,s,o]=this._preallocSegments,a=t?.ascensionFactor??.5,l=Math.min(1-a,t?.ascensionFactor!=null&&t.descensionFactor!=null?t.descensionFactor:.5),c=1-a-l;n.definition?n.definition.copyFrom(this.definition):n.definition=this.definition.clone(),n.definition.compared.targetZoom=e,n.definition.compared.pan=this.definition.compared.pan*a,n.definition.compared.rotate=this.definition.compared.rotate*a,n.definition.segmentEnd=a,n.update(),this._ascensionSegment=n,this.segments.push(n),c>0&&(s.definition?s.definition.copyFrom(this.definition):s.definition=this.definition.clone(),s.definition.copyFrom(this.definition),s.definition.compared.sourceZoom=e,s.definition.compared.targetZoom=e,s.definition.compared.pan=this.definition.compared.pan*c,s.definition.compared.rotate=this.definition.compared.rotate*c,s.definition.segmentStart=n.definition.segmentEnd,s.definition.segmentEnd=n.definition.segmentEnd+c,s.update(),this.segments.push(s)),o.definition?o.definition.copyFrom(this.definition):o.definition=this.definition.clone(),o.definition.compared.sourceZoom=e,o.definition.compared.pan=this.definition.compared.pan*l,o.definition.compared.rotate=this.definition.compared.rotate*l,o.definition.segmentStart=a+c,o.update(),this._descensionSegment=o,this.segments.push(o)}_updateWithoutApex(){const[e]=this._preallocSegments;e.update(this.definition),this.segments.push(e)}};const qu=new bu;let Wu=class{get time(){return this._time}get isLinear(){return this.path.segments.length===1}constructor(e){this._time=ne(0),this._easing=$i,this.definition=new wu(e),this.path=new Zu}update(e,t,n){this.definition.update(e,t,n),this.path.update(this.definition,n),this._time=this._applyTimeSettings(Ir(isFinite(this.path.time)?this.path.time:Q(0)),n),this._easing=n.easing??(this._time>=1e3?$i:xi)}cameraAt(e,t){e=Math.min(Math.max(0,e),1),e=this._normalizedEasing(e);const n=this.path.interpolateComponentsAt(e,qu);t.interpolate(this.definition.source,this.definition.target,n)}_normalizedEasing(e){const t=this._easing(0,this._time),n=this._easing(1,this._time);return(this._easing(e,this._time)-t)/(n-t)}_applyTimeSettings(e,t){const n=t.speedFactor!=null?t.speedFactor:1,s=t.minDuration??ki.minDuration/n,o=t.maxDuration??ki.maxDuration/n;return e=t.duration!=null?ne(t.duration):ne(Math.min(Math.max(e/n,s),o))}};const Gu=2e3,ju=64;let Uu=class{constructor(e){this._view=e,this._animation=new Wu(()=>
2new Ns(this._view)),this._current=new Ns(this._view)}get _source(){return this._animation.definition.source}get _target(){return this._animation.definition.target}get duration(){return this._animation.time}get animation(){return this._animation}update(e,t,n={}){Z(this._current.viewpoint,e),Z(this._source.viewpoint,e),Z(this._target.viewpoint,t),this._animation.update(this._source,this._target,n)}applyRatio(e,t){this._animation.cameraAt(t,this._current),Z(e,this._current.viewpoint)}},dt=class extends T{constructor(e){super(e),this._animation=null,this._destinationViewState=new Yn,this.updateFunction=null,this.easing=oo.ease,this.viewpoint=new se({targetGeometry:new O,scale:0,rotation:0}),this._updateTask=_t({postRender:this._postRender.bind(this)}),this._updateTask.pause(),this._transition=new Uu(e.view)}destroy(){this._updateTask=ee(this._updateTask)}get animation(){return this._animation}set animation(e){this._animation=e,this.view.animation=e}animate(e,t,n){this.stop();const s=this.viewpoint;Z(s,t);const o=e.target;this._transition.update(this.viewpoint,o,{apex:{maximumDistance:Math.min(Math.min(t.scale,o.scale)*ju,this.view.constraints.effectiveMinScale),desiredSlope:5e-8},duration:n?.duration,maxDuration:n?.animationMode==="auto"?ne(1/0):n?.maxDuration??Ta.maxDuration,speedFactor:n?.speedFactor,easing:(typeof n?.easing=="string"?oo[n.easing]:n?.easing)||this.easing}),n?.animationMode==="auto"&&(this._destinationViewState.copy(this.view.state),this._destinationViewState.viewpoint=o,Bu(this._transition.animation,n,this.view.state,this._destinationViewState)||this._transition.update(this.viewpoint,o,{duration:ne(0)}));const a=()=>{this.animation===e&&this._updateTask&&(e.state==="finished"&&(this._transition.applyRatio(this.viewpoint,1),this.view.state&&(this.view.state.viewpoint=this.viewpoint.clone())),this.animation=null,this.updateFunction=null)};return e.when(a,a),this._startTime=performance.now(),this._updateTask.resume(),this.animation=e,e}animateContinuous(e,t){this.stop(),this.updateFunction=t,this.viewpoint=e;const n=new Pn({target:e.clone()}),s=()=>{this.animation===n&&this._updateTask&&(this.animation=null,this.updateFunction=null)};return n.when(s,s),this._startTime=performance.now(),this._updateTask.resume(),this.animation=n,n}stop(){this.animation&&(this.animation.stop(),this.animation=null,this.updateFunction=null)}_postRender(e){const t=this.animation;if(t&&t.state!==Pn.state.STOPPED){if(this.updateFunction)this.updateFunction(this.viewpoint,e.deltaTime),this.animation?.update(this.viewpoint);else{const n=performance.now()-this._startTime,s=this._transition.duration,o=s>0?n/s:1,a=o>=1;this._transition.applyRatio(this.viewpoint,o),a&&this.animation?.finish()}this.view.state&&(this.view.state.viewpoint=this.viewpoint.clone())}else this._updateTask.pause()}};function Bu(i,e,t,n){if(e?.duration!=null)return!0;const{time:s,isLinear:o}=i,a=e?.speedFactor||1;if(s>(e?.maxDuration??Ta.maxDuration/a))return!1;if(o){const c=D(),u=L(...n.toScreen(c,...t.center)),d=L(...t.toScreen(c,...n.center)),p=d!=null&&d.x>-1*t.size[0]&&d.x<(1.5+.5)*t.size[0]&&d.y>-1*t.size[1]&&d.y<(1.5+.5)*t.size[1],m=u!=null&&u.x>-1*n.size[0]&&u.x<(1.5+.5)*n.size[0]&&u.y>-1*n.size[1]&&u.y<(1.5+.5)*n.size[1];if(s>Gu/a&&!p&&!m)return!1}return!0}r([h()],dt.prototype,"easing",void 0),r([h()],dt.prototype,"view",void 0),r([h()],dt.prototype,"viewpoint",void 0),dt=r([_("esri.views.2d.AnimationManager")],dt);const Ku=dt;function V(){return Promise.all([x(()=>import("./webglDeps-Bq0VrpSC.js"),__vite__mapDeps([145,146,2,1,3,4,147,148,149,150,151,73,152])),x(()=>import("./mapViewDeps-y4babLXh.js"),__vite__mapDeps([153,3,4,2,1,10,7,154,6,5,63,64,155,156,157,74,73,158,49,50,159,160,138,139,88,134,24,22,23,25,140,141,161,162,163,34,35,164,165,146,147,148,149,150,166,167,168,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,184,185,186,187,57,58,46,59,60,61,188,189,145,190,191,192,193,194,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,77,205,206,17,56,207,208,209,210,211,72,212,213,41,37,214,68,69,66,70,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,97,232,233,87,234,235,236,11,13,14,104,237,238]))])}const Tt=()=>V().then(()=>x(()=>import("./TileLayerView2D-Cv7ycvUi.js"),__vite__mapDeps([239,1,2,3,4,234,6,5,7,159,50,160,155,156,157,74,73,158,49,138,139,88,134,10,24,22,23,25,140,141,161,162,163,34,35,187,154,63,64,57,58,46,59,60,61,188,189,177,94,44,45,173,174,148,172,150,147,151,152,171,146,175,176,178,179,180,181,75,190,165,149,166,169,170,191,192,193,194,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,77,205,206,17,56,72,164,167,168,31,133,182,183,185,186,208,209,223,212,213,41,37,214,68,69,66,70,215,224,225,226,240,241,242,230,243,142,244,228,229,245,246,247,97,248,249,250,251,252,237,87,235,236,11,13,14,104,238,211]))),Ne=()=>V().then(()=>x(()=>import("./FeatureLayerView2D-RrPIXwyq.js").then(i=>i.F),__vite__mapDeps([253,1,6,2,3,4,5,7,168,164,155,156,157,74,73,158,49,50,159,160,138,139,88,134,10,24,22,23,25,140,141,161,162,163,34,35,165,146,147,148,149,150,166,167,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,102,20,21,12,26,27,28,29,30,32,33,36,37,38,39,40,41,254,195,
2196,197,120,8,198,199,200,201,116,202,203,204,77,205,206,17,56,78,255,256,214,68,69,66,70,257,46,243,142,229,230,191,87,67,71,72,76,258,98,224,57,58,118,62,63,64,184,259,260,261,262,101,93,248,263,251,245,246,252]))),ao={"base-dynamic":()=>V().then(()=>x(()=>import("./BaseDynamicLayerView2D-Bt6EUz7j.js"),__vite__mapDeps([264,1,2,3,4,265,173,174,148,160,163,161,172,150,147,151,73,152,171,146,138,139,88,7,134,10,24,6,5,22,23,25,140,141,175,176,177,94,44,45,178,179,180,181,74,75,241,165,149,166,242,243,142,266,235,236,245,168,246,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,77,205,206,17,56,87,234,11,13,14,104,46,68,69,66,70,237,238,211,182]))),"base-tile":Tt,"bing-maps":Tt,catalog:()=>V().then(()=>x(()=>import("./CatalogLayerView2D-DKbCCAKO.js"),__vite__mapDeps([267,1,6,2,3,4,5,7,243,177,94,44,45,134,142,245,168,195,196,197,21,120,8,198,199,25,200,12,201,116,202,203,204,77,205,206,17,56,87,88,234,235,236,11,13,14,10,104,46,24,22,23,180,138,139,140,141,68,69,66,70,161,237,175,238,160,147,148,211,182]))),"catalog-dynamic-group":()=>V().then(()=>x(()=>import("./CatalogDynamicGroupLayerView2D-OLXbbooC.js"),__vite__mapDeps([268,1,6,2,3,4,5,7,243,177,94,44,45,134,142,245,168,195,196,197,21,120,8,198,199,25,200,12,201,116,202,203,204,77,205,206,17,56,87,88,234,235,236,11,13,14,10,104,46,24,22,23,180,138,139,140,141,68,69,66,70,161,237,175,238,160,147,148,211,182]))),"catalog-footprint":()=>V().then(()=>x(()=>import("./CatalogFootprintLayerView2D-D7oGIGPU.js"),__vite__mapDeps([269,1,2,3,4,253,6,5,7,168,164,155,156,157,74,73,158,49,50,159,160,138,139,88,134,10,24,22,23,25,140,141,161,162,163,34,35,165,146,147,148,149,150,166,167,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,102,20,21,12,26,27,28,29,30,32,33,36,37,38,39,40,41,254,195,196,197,120,8,198,199,200,201,116,202,203,204,77,205,206,17,56,78,255,256,214,68,69,66,70,257,46,243,142,229,230,191,87,67,71,72,76,258,98,224,57,58,118,62,63,64,184,259,260,261,262,101,93,248,263,251,245,246,252,234,235,236,11,13,14,104,237,238,211]))),csv:Ne,"geo-rss":()=>V().then(()=>x(()=>import("./GeoRSSLayerView2D-B9qo_K-B.js"),__vite__mapDeps([270,1,6,2,3,4,5,7,86,26,27,28,29,30,31,32,25,33,34,35,115,53,54,38,51,52,55,56,57,58,46,59,60,61,49,50,62,63,64,36,37,39,78,22,23,243,177,94,44,45,134,142,227,228,229,73,160,167,168,174,148,163,161,172,149,146,147,230,173,150,151,152,171,138,139,88,10,24,140,141,175,176,178,179,180,181,74,75,164,155,156,157,158,159,162,165,166,169,170,133,182,183,68,17,69,66,70,223,187,154,188,189,212,213,8,41,214,77,215,224,225,226,245,195,196,197,21,120,198,199,200,12,201,116,202,203,204,205,206,87,234,235,236,11,13,14,104,237,238,211]))),feature:Ne,geojson:Ne,parquet:Ne,graphics:()=>V().then(()=>x(()=>import("./GraphicsLayerView2D-DM-P44Ye.js"),__vite__mapDeps([271,1,6,2,3,4,5,7,243,177,94,44,45,134,142,227,228,229,73,160,167,168,174,148,163,161,172,149,146,147,230,173,150,151,152,171,138,139,88,10,24,22,23,25,140,141,175,176,178,179,180,181,74,75,164,155,156,157,158,49,50,159,162,34,35,165,166,169,170,31,133,182,183,68,17,69,66,70,223,57,58,46,187,154,63,64,59,60,61,188,189,212,213,8,41,37,214,77,215,224,225,226,245,252,195,196,197,21,120,198,199,200,12,201,116,202,203,204,205,206,56,87,234,235,236,11,13,14,104,237,238,211]))),group:()=>V().then(()=>x(()=>import("./GroupLayerView2D-B0GQU_Mf.js"),__vite__mapDeps([272,1,2,3,4,243,6,5,7,177,94,44,45,134,142,245,168,195,196,197,21,120,8,198,199,25,200,12,201,116,202,203,204,77,205,206,17,56,87,88,234,235,236,11,13,14,10,104,46,24,22,23,180,138,139,140,141,68,69,66,70,161,237,175,238,160,147,148,211,182]))),imagery:()=>V().then(()=>x(()=>import("./ImageryLayerView2D-aMeaaxZK.js"),__vite__mapDeps([273,1,6,2,3,4,5,7,234,274,148,147,151,73,152,171,146,172,275,173,174,160,163,161,150,138,139,88,134,10,24,22,23,25,140,141,175,176,177,94,44,45,178,179,180,181,74,75,276,277,243,142,223,57,58,46,155,156,157,158,49,50,159,162,34,35,187,154,63,64,59,60,61,188,189,212,167,168,213,8,41,37,170,214,77,68,17,69,66,70,215,164,165,149,166,169,31,133,182,183,224,225,226,244,228,229,230,265,241,242,266,235,236,278,279,254,195,
2196,197,21,120,198,199,200,12,201,116,202,203,204,205,206,56,251,245,246,252,87,11,13,14,104,237,238,211]))),"imagery-tile":()=>V().then(()=>x(()=>import("./ImageryTileLayerView2D-BvL5zzX9.js"),__vite__mapDeps([280,1,2,3,4,5,281,274,6,7,148,147,151,73,152,171,146,172,275,173,174,160,163,161,150,138,139,88,134,10,24,22,23,25,140,141,175,176,177,94,44,45,178,179,180,181,74,75,276,277,243,142,282,283,230,165,149,166,218,169,170,182,242,168,235,236,284,278,77,237,252,279,254,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,205,206,17,56,251,245,246,87,234,11,13,14,104,46,68,69,66,70,238,211]))),kml:()=>V().then(()=>x(()=>import("./KMLLayerView2D-DwyRFvXO.js"),__vite__mapDeps([285,1,2,3,4,6,5,7,77,286,115,53,54,27,28,29,30,31,32,25,33,34,35,38,51,52,55,56,57,58,46,59,60,61,49,50,62,63,64,26,36,37,39,78,22,23,66,234,241,161,177,94,44,45,148,147,160,165,146,149,150,166,242,265,173,174,163,172,151,73,152,171,138,139,88,134,10,24,140,141,175,176,178,179,180,181,74,75,243,142,227,228,229,167,168,230,164,155,156,157,158,159,162,169,170,133,182,183,68,17,69,70,223,187,154,188,189,212,213,8,41,214,215,224,225,226,245,220,221,222,278,207,145,208,209,192,283,195,196,197,21,120,198,199,200,12,201,116,202,203,204,205,206,87,235,236,11,13,14,104,237,238,211]))),"knowledge-graph":()=>V().then(()=>x(()=>import("./KnowledgeGraphLayerView2D-DyyFgNcv.js"),__vite__mapDeps([287,1,6,2,3,4,5,7,243,177,94,44,45,134,142,245,168,195,196,197,21,120,8,198,199,25,200,12,201,116,202,203,204,77,205,206,17,56,87,88,234,235,236,11,13,14,10,104,46,24,22,23,180,138,139,140,141,68,69,66,70,161,237,175,238,160,147,148,211,182]))),"link-chart":()=>V().then(()=>x(()=>import("./KnowledgeGraphLayerView2D-DyyFgNcv.js"),__vite__mapDeps([287,1,6,2,3,4,5,7,243,177,94,44,45,134,142,245,168,195,196,197,21,120,8,198,199,25,200,12,201,116,202,203,204,77,205,206,17,56,87,88,234,235,236,11,13,14,10,104,46,24,22,23,180,138,139,140,141,68,69,66,70,161,237,175,238,160,147,148,211,182]))),"knowledge-graph-sublayer":Ne,"map-image":()=>V().then(()=>x(()=>import("./MapImageLayerView2D-BOGhOvZp.js"),__vite__mapDeps([288,1,2,3,4,5,234,6,7,265,173,174,148,160,163,161,172,150,147,151,73,152,171,146,138,139,88,134,10,24,22,23,25,140,141,175,176,177,94,44,45,178,179,180,181,74,75,241,165,149,166,242,243,142,223,57,58,46,155,156,157,158,49,50,159,162,34,35,187,154,63,64,59,60,61,188,189,212,167,168,213,8,41,37,170,214,77,68,17,69,66,70,215,164,169,31,133,182,183,224,225,226,244,228,229,230,266,235,236,245,289,97,248,250,254,195,196,197,21,120,198,199,200,12,201,116,202,203,204,205,206,56,246,247,249,251,252,87,11,13,14,104,237,238,211]))),"map-notes":()=>V().then(()=>x(()=>import("./MapNotesLayerView2D-BIeSCKIj.js"),__vite__mapDeps([290,1,6,2,3,4,5,7,243,177,94,44,45,134,142,227,228,229,73,160,167,168,174,148,163,161,172,149,146,147,230,173,150,151,152,171,138,139,88,10,24,22,23,25,140,141,175,176,178,179,180,181,74,75,164,155,156,157,158,49,50,159,162,34,35,165,166,169,170,31,133,182,183,68,17,69,66,70,223,57,58,46,187,154,63,64,59,60,61,188,189,212,213,8,41,37,214,77,215,224,225,226,245,252,195,196,197,21,120,198,199,200,12,201,116,202,203,204,205,206,56,87,234,235,236,11,13,14,104,237,238,211]))),media:()=>V().then(()=>x(()=>import("./MediaLayerView2D-D9s09U0F.js"),__vite__mapDeps([291,3,4,1,6,2,5,7,292,77,225,69,175,26,27,28,29,30,31,32,25,33,34,35,159,50,160,155,156,157,74,73,158,49,138,139,88,134,10,24,22,23,140,141,161,162,163,187,154,63,64,57,58,46,59,60,61,188,189,177,94,44,45,173,174,148,172,150,147,151,152,171,146,176,178,179,180,181,75,190,165,149,166,169,170,191,192,193,194,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,205,206,17,56,72,164,167,168,133,182,183,185,186,208,209,223,212,213,41,37,214,68,66,70,215,224,226,216,217,293,218,243,142,245,237,87,234,235,236,11,13,14,104,238,211]))),"ogc-feature":()=>V().then(()=>x(()=>import("./OGCFeatureLayerView2D-BSQhHD4S.js"),__vite__mapDeps([294,1,2,3,4,253,6,5,7,168,164,155,156,157,74,73,158,49,50,159,160,138,139,88,134,10,24,22,23,25,140,141,161,162,163,34,35,165,146,147,148,149,150,166,167,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,102,20,21,12,26,27,28,29,30,32,33,36,37,38,39,40,41,254,195,
2196,197,120,8,198,199,200,201,116,202,203,204,77,205,206,17,56,78,255,256,214,68,69,66,70,257,46,243,142,229,230,191,87,67,71,72,76,258,98,224,57,58,118,62,63,64,184,259,260,261,262,101,93,248,263,251,245,246,252,234,235,236,11,13,14,104,237,238,211]))),"open-street-map":Tt,"oriented-imagery":Ne,route:()=>V().then(()=>x(()=>import("./RouteLayerView2D-CFNrZAqx.js"),__vite__mapDeps([295,3,4,1,2,6,5,7,200,296,297,243,177,94,44,45,134,142,227,228,229,73,160,167,168,174,148,163,161,172,149,146,147,230,173,150,151,152,171,138,139,88,10,24,22,23,25,140,141,175,176,178,179,180,181,74,75,164,155,156,157,158,49,50,159,162,34,35,165,166,169,170,31,133,182,183,68,17,69,66,70,223,57,58,46,187,154,63,64,59,60,61,188,189,212,213,8,41,37,214,77,215,224,225,226,245,252,195,196,197,21,120,198,199,12,201,116,202,203,204,205,206,56,87,234,235,236,11,13,14,104,237,238,211]))),stream:()=>V().then(()=>x(()=>import("./StreamLayerView2D-Cr5E1hNA.js"),__vite__mapDeps([298,1,2,3,4,5,78,6,7,22,23,253,168,164,155,156,157,74,73,158,49,50,159,160,138,139,88,134,10,24,25,140,141,161,162,163,34,35,165,146,147,148,149,150,166,167,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,102,20,21,12,26,27,28,29,30,32,33,36,37,38,39,40,41,254,195,196,197,120,8,198,199,200,201,116,202,203,204,77,205,206,17,56,255,256,214,68,69,66,70,257,46,243,142,229,230,191,87,67,71,72,76,258,98,224,57,58,118,62,63,64,184,259,260,261,262,101,93,248,263,251,245,246,252,234,235,236,11,13,14,104,237,238,211]))),"subtype-group":()=>V().then(()=>x(()=>import("./SubtypeGroupLayerView2D-BTsUOwXG.js"),__vite__mapDeps([299,1,2,3,4,5,253,6,7,168,164,155,156,157,74,73,158,49,50,159,160,138,139,88,134,10,24,22,23,25,140,141,161,162,163,34,35,165,146,147,148,149,150,166,167,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,102,20,21,12,26,27,28,29,30,32,33,36,37,38,39,40,41,254,195,196,197,120,8,198,199,200,201,116,202,203,204,77,205,206,17,56,78,255,256,214,68,69,66,70,257,46,243,142,229,230,191,87,67,71,72,76,258,98,224,57,58,118,62,63,64,184,259,260,261,262,101,93,248,263,251,245,246,252,234,235,236,11,13,14,104,237,238,211]))),tile:Tt,"vector-tile":()=>V().then(()=>x(()=>import("./VectorTileLayerView2D-CmgC1hwl.js"),__vite__mapDeps([300,1,2,3,4,37,6,5,7,87,88,8,162,147,148,72,73,159,50,160,139,51,52,194,138,134,10,24,22,23,25,140,141,193,178,158,146,151,152,171,173,174,163,161,172,150,175,176,177,94,44,45,179,180,181,74,75,235,236,230,301,86,302,303,154,63,64,238,243,142,245,168,246,237,195,196,197,21,120,198,199,200,12,201,116,202,203,204,77,205,206,17,56,234,11,13,14,104,46,68,69,66,70,211,182]))),video:()=>V().then(()=>x(()=>import("./VideoLayerView2D-Bq-q56hq.js"),__vite__mapDeps([304,1,6,2,3,4,5,7,305,234,25,92,84,93,94,44,45,122,106,31,306,48,49,50,47,21,51,52,293,161,176,68,17,69,66,70,173,174,148,160,163,172,150,147,151,73,152,171,146,138,139,88,134,10,24,22,23,140,141,175,177,178,179,180,181,74,75,164,155,156,157,158,159,162,34,35,165,149,166,167,168,169,170,133,182,183,218,77,307,243,142,227,228,229,230,223,57,58,46,187,154,63,64,59,60,61,188,189,212,213,8,41,37,214,215,224,225,226,245,195,196,197,120,198,199,200,12,201,116,202,203,204,205,206,56,87,235,236,11,13,14,104,237,238,211]))),wcs:()=>V().then(()=>x(()=>import("./ImageryTileLayerView2D-BvL5zzX9.js"),__vite__mapDeps([280,1,2,3,4,5,281,274,6,7,148,147,151,73,152,171,146,172,275,173,174,160,163,161,150,138,139,88,134,10,24,22,23,25,140,141,175,176,177,94,44,45,178,179,180,181,74,75,276,277,243,142,282,283,230,165,149,166,218,169,170,182,242,168,235,236,284,278,77,237,252,279,254,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,205,206,17,56,251,245,246,87,234,11,13,14,104,46,68,69,66,70,238,211]))),"web-tile":Tt,wfs:Ne,wms:()=>V().then(()=>x(()=>import("./WMSLayerView2D-BuctOAVT.js"),__vite__mapDeps([308,1,2,3,4,5,265,173,174,148,160,163,161,172,150,147,151,73,152,171,146,138,139,88,7,134,10,24,6,22,23,25,140,141,175,176,177,94,44,45,178,179,180,181,74,75,241,165,149,166,242,243,142,266,235,236,245,168,246,309,254,195,
2196,197,21,120,8,198,199,200,12,201,116,202,203,204,77,205,206,17,56,87,234,11,13,14,104,46,68,69,66,70,237,238,211,182]))),wmts:()=>V().then(()=>x(()=>import("./WMTSLayerView2D-Bf8Na-R0.js"),__vite__mapDeps([310,1,2,3,4,240,241,161,177,7,94,6,5,44,45,148,147,160,165,146,149,150,166,242,173,174,163,172,151,73,152,171,138,139,88,134,10,24,22,23,25,140,141,175,176,178,179,180,181,74,75,230,243,142,245,168,246,237,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,77,205,206,17,56,87,234,235,236,11,13,14,104,46,68,69,66,70,238,211,182]))),"base-elevation":null,"building-scene":null,dimension:null,elevation:null,"gaussian-splat":null,"integrated-mesh-3dtiles":null,"integrated-mesh":null,"line-of-sight":null,"point-cloud":null,scene:null,unknown:null,unsupported:null,viewshed:null,voxel:null};function Yu(i){const e=i.declaredClass?i.declaredClass.slice(i.declaredClass.lastIndexOf(".")+1):"Unknown",t=e.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new M(`${t}:view-not-supported`,`${e} is not supported in 2D`)}const ro={hasLayerViewModule:i=>ao[i.type]!=null,importLayerView:i=>{const e=ao[i.type];if(e==null)throw Yu(i);return e(i)}},Ju={"area-measurement":null,dimension:null,"direct-line-measurement":null,"elevation-profile":()=>x(()=>import("./ElevationProfileAnalysisView2D-DLm6Flj2.js"),__vite__mapDeps([311,1,2,3,4,5,6,7,154,63,64,9,10,305,234,25,92,84,93,94,44,45,122,106,31,312,175,233,77,313,314,315,316,317,318,222,319,320,321,322,323,138,139,88,134,24,22,23,140,141,324,325,21,51,52,326,327,328,237,195,196,197,120,8,198,199,200,12,201,116,202,203,204,205,206,17,56,329,168,330,331,332,333,180,334,335,336,18,337,338,339,179,340,341,87,235,236,11,13,14,104,46,68,69,66,70,161,238,160,147,148,211,182])),"line-of-sight":null,slice:null,viewshed:null,"volume-measurement":null};function Qu(i){const e=Ju[i.type];if(!e)throw new M("analysis-view-module-import-utils:analysis-not-supported",`Analysis "${i.type}" is not supported`);return e()}let Xu=class{constructor(e,t={}){this.events=new Kr,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,e!=null?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),e.contains(this._canvas)||e.appendChild(this._canvas)):t.canvas!=null&&(this._canvas=t.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let s=this._canvas.getContext("webgl2",n);s||(s=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=s,this._handles=xo([bo(this._canvas,"webglcontextlost",o=>this.events.emit("webgl-context-lost",o))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||F("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=F("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[n,s,o,a,l,c]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${n}, ${s}, ${o}, ${a}, ${l}, ${c})`}}else t()}resize(e){const t=this._canvas,n=t.style,{state:{size:s},pixelRatio:o}=e,a=s[0],l=s[1],c=Math.round(a*o),u=Math.round(l*o);t.width===c&&t.height===u||(t.width=c,t.height=u),n.width=a+"px",n.height=l+"px"}_computeViewTransform(e,t){const[n,s]=e.center,[o,a]=t.center,[l,c]=e.toScreen([0,0],o,a),[u,d]=e.toScreen([0,0],n,s),p=u-l,m=d-c,g=e.scale/t.scale,v=t.rotation-e.rotation,f=ye();return wl(f),Zn(f,f,[g,g]),Li(f,f,Si(v)),At(f,f,[p,m]),f}};const He={added:[],removed:[]},tn=new Set,ed=new kl(0,0,0,0);function td(i,e){const t=Vo(e);if(!t)return null;const[n,s]=t.valid;return i[2]>s?[jt([i[0],i[1],s,i[3]]),jt([n,i[1],n+i[2]-s,i[3]])]:i[0]<n?[jt([n,i[1],i[2],i[3]]),jt([s-(n-i[0]),i[1],s,i[3]])]:null}let id=class extends Yr{constructor(e){super(),this._tiles=new Map,this._index=Pl(9,F("esri-csp-restrictions")?t=>
2({minX:t.bounds[0],minY:t.bounds[1],maxX:t.bounds[2],maxY:t.bounds[3]}):[".bounds[0]",".bounds[1]",".bounds[2]",".bounds[3]"]),this.tiles=[],this.tileScheme=e}destroy(){super.destroy(),this.clear()}clear(){this.tiles.length=0,this._tiles.clear(),this._index.clear()}has(e){return this._tiles.has(e)}get(e){return this._tiles.get(e)}getIntersectingTiles(e){if(!e||Rr(e)===0||Dr(e)===0)return[];const t=td(e,this.tileScheme.spatialReference);return t!=null?[...new Set([...this.boundsIntersections(t[0]),...this.boundsIntersections(t[1])])]:this.boundsIntersections(e)}boundsIntersections(e){return this._index.search({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]})}updateTiles(e){const t={added:[],removed:[]};for(const n of e.added)if(!this.has(n)){const s=new gs(this.tileScheme,n);this._tiles.set(n,s),this._index.insert(s),t.added.push(s)}for(const n of e.removed)if(this.has(n)){const s=this.get(n);this._tiles.delete(n),this._index.remove(s),t.removed.push(s)}this.tiles.length=0,this._tiles.forEach(n=>this.tiles.push(n)),(t.added.length||t.removed.length)&&this.emit("update",t)}setViewState(e){const t=this.tileScheme.getTileCoverage(e,0);if(!t)return;const{spans:n,lodInfo:s}=t,{level:o}=s;if(n.length>0)for(const{row:a,colFrom:l,colTo:c}of n)for(let u=l;u<=c;u++){const d=ed.set(o,a,s.normalizeCol(u),s.getWorldForColumn(u)).id;if(tn.add(d),!this.has(d)){const p=new gs(this.tileScheme,d);this._tiles.set(d,p),this._index.insert(p),this.tiles.push(p),He.added.push(p)}}for(let a=this.tiles.length-1;a>=0;a--){const l=this.tiles[a];tn.has(l.id)||(this._tiles.delete(l.id),this.tiles.splice(a,1),this._index.remove(l),He.removed.push(l))}(He.added.length||He.removed.length)&&this.emit("update",He),bl.pool.release(t),tn.clear(),He.added.length=0,He.removed.length=0}};const nd=1,gg=[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],fg=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],$t=256,nn=()=>k.getLogger("esri.views.2d.engine.webgl.painter.highlight.HighlightGradient");function sd(i,e){e.fillColor[0]=i.color.r/255,e.fillColor[1]=i.color.g/255,e.fillColor[2]=i.color.b/255,e.fillColor[3]=i.color.a,i.haloColor?(e.outlineColor[0]=i.haloColor.r/255,e.outlineColor[1]=i.haloColor.g/255,e.outlineColor[2]=i.haloColor.b/255,e.outlineColor[3]=i.haloColor.a):(e.outlineColor[0]=e.fillColor[0],e.outlineColor[1]=e.fillColor[1],e.outlineColor[2]=e.fillColor[2],e.outlineColor[3]=e.fillColor[3]),e.fillColor[3]*=i.fillOpacity,e.outlineColor[3]*=i.haloOpacity,e.fillColor[0]*=e.fillColor[3],e.fillColor[1]*=e.fillColor[3],e.fillColor[2]*=e.fillColor[3],e.outlineColor[0]*=e.outlineColor[3],e.outlineColor[1]*=e.outlineColor[3],e.outlineColor[2]*=e.outlineColor[3],e.outlineWidth=(1-i.haloBlur)*i.haloWidth,e.outerHaloWidth=i.haloBlur*i.haloWidth/2,e.innerHaloWidth=i.haloBlur*i.haloWidth/2,e.outlinePosition=0}const od=[0,0,0,0];let ka=class{constructor(){this.type="single",this._highlightOptions=new ze,this._convertedHighlightOptions={fillColor:[0,0,0,0],outlineColor:[0,0,0,0],outlinePosition:0,outlineWidth:0,innerHaloWidth:0,outerHaloWidth:0},this._optionsShadeTexKey="",this._texelData=new Uint8Array(4*$t),this._minMaxDistance=[0,0]}setHighlightOptions(e){this._highlightOptions=e}applyHighlightOptions(e,t){this._updateGradientTexture(e),e.bindTexture(this._shadeTex,Sl),t.setUniform2fv("u_minMaxDistance",this._minMaxDistance)}destroy(){this._shadeTex?.dispose(),this._shadeTex=null}getReasonsWithGradients(){return[{activeReasons:(1<<Cl)-1,activeGradient:this}]}_updateGradientTexture(e){const t=ad(this._highlightOptions);if(t===this._optionsShadeTexKey)return;this._optionsShadeTexKey=t,sd(this._highlightOptions,this._convertedHighlightOptions);const n=this._convertedHighlightOptions,s=n.outlinePosition-n.outlineWidth/2-n.outerHaloWidth,o=n.outlinePosition-n.outlineWidth/2,a=n.outlinePosition+n.outlineWidth/2,l=n.outlinePosition+n.outlineWidth/2+n.innerHaloWidth,c=Math.sqrt(Math.PI/2)*nd,u=Math.abs(s)>c?Math.round(10*(Math.abs(s)-c))/10:0,d=Math.abs(l)>c?Math.round(10*(Math.abs(l)-c))/10:0;let p;u&&!d?nn().error("The outer rim of the highlight is "+u+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards)."):!u&&d?nn().error("The inner rim of the highlight is "+d+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards)."):u&&d&&nn().error("The highlight is "+Math.max(u,d)+"px away from the edge of the feature; consider reducing some width values.");const m=[void 0,void 0,void 0,void 0];function g(f,I,$){m[0]=(1-$)*f[0]+$*I[0],m[1]=(1-$)*f[1]+$*I[1],m[2]=(1-$)*f[2]+$*I[2],m[3]=(1-$)*f[3]+$*I[3]}const{_texelData:v}=this;for(let f=0;f<$t;++f)p=s+f/($t-1)*(l-s),p<s?(m[0]=0,m[1]=0,m[2]=0,m[3]=0):p<o?g(od,n.outlineColor,(p-s)/(o-s)):p<a?[m[0],m[1],m[2],m[3]]=n.outlineColor:p<l?g(n.outlineColor,n.fillColor,(p-a)/(l-a)):[m[0],m[1],m[2],m[3]]=n.fillColor,v[4*f]=255*m[0],v[4*f+1]=255*m[1],v[4*f+2]=255*m[2],v[4*f
2+3]=255*m[3];if(this._minMaxDistance[0]=s,this._minMaxDistance[1]=l,!this._shadeTex){const f=new El($t,1);f.wrapMode=33071,this._shadeTex=new Vl(e,f)}this._shadeTex.updateData(0,0,0,$t,1,this._texelData)}};function ad(i){return`${i.color};${i.haloColor};${i.haloOpacity};${i.fillOpacity};${i.haloWidth};${i.haloBlur}`}let rd=class{constructor(){this.type="multi",this.gradients=[]}setHighlightOptions(e){for(let t=0;t<e.length;t++)this.gradients[t]||(this.gradients[t]=new ka),this.gradients[t].setHighlightOptions(e[t]);for(let t=e.length+1;t<this.gradients.length;t++)this.gradients[t].destroy();this.gradients.length=e.length}destroy(){for(const e of this.gradients)e.destroy()}getReasonsWithGradients(){let e=1;const t=[];for(let n=0;n<this.gradients.length;n++){const s=this.gradients[n];t.push({activeReasons:e,activeGradient:s}),e<<=1}return t}};const Pa={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},ld={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:!1},hd={...Pa,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function cd({pixelRatio:i,state:e,displayLevel:t,requiredLevel:n},s){const o=1/2**(t-s.key.level),a=1/2**(n-s.key.level);return{displayMat3:e.displayMat3,displayViewMat3:e.displayViewMat3,displayViewScreenMat3:s.transforms.displayViewScreenMat3,viewMat3:e.viewMat3,tileMat3:s.transforms.tileMat3,displayZoomFactor:o,requiredZoomFactor:a,tileOffset:[s.x,s.y],currentScale:e.scale,currentZoom:t,metersPerSRUnit:Po(e.spatialReference),rotation:e.rotation,pixelRatio:i}}function Sa(i){return i.passOptions?.type==="highlight"}function Ca(i){return i.passOptions?.type==="hittest"}function ud(i){if(!Ca(i))return null;const{position:e,distance:t,smallSymbolDistance:n,smallSymbolSizeThreshold:s}=i.passOptions;return{position:e,distance:t,smallSymbolDistance:n,smallSymbolSizeThreshold:s}}function dd(i){if(!Sa(i))return null;const{activeReasons:e,highlightAll:t}=i.passOptions;return{activeReasons:e,highlightAll:t?1:0}}function vg(i,e,t){const n={};for(const s in t)typeof t[s]!="function"?n[s]=t[s]:n[s]=t[s](i,e);return n}function wg(i,e){const{attributeView:t,context:n}=i;return{storage:t.getUniforms(n),view:cd(i,e),hittestRequest:ud(i),highlight:dd(i)}}function bg(i){return{inside:i.selection===2,outside:i.selection===3}}function pd(i){return Ca(i)?ld:Sa(i)&&i.passOptions.stepType==="clear"?hd:Pa}function Mg(i){const{row:e,col:t}=i.key,n=t*ys,s=e*ys;return{tileOffsetFromLocalOrigin:[n%Kt,s%Kt],maxIntsToLocalOrigin:[Math.floor(n/Kt),Math.floor(s/Kt)]}}const md=new Ar({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch",mesh:"mesh"});function xg(i){return md.toJSON(i)}function Tg(i){const{bandCount:e,attributeTable:t,colormap:n,pixelType:s}=i.raster.rasterInfo;return e===1&&(t!=null||n!=null||s==="u8"||s==="s8")}function gd(i,e){return e==null?(i?.destroy(),null):(i?.type==="single"&&Array.isArray(e)&&(i.destroy(),i=null),i?.type!=="multi"||Array.isArray(e)||(i.destroy(),i=null),i||(i=Array.isArray(e)?new rd:new ka),Array.isArray(e)?i.type==="multi"&&i.setHighlightOptions(e):i.type==="single"&&i.setHighlightOptions(e),i)}function $g(i,e,t,n){const{painter:s,highlightGradient:o}=i,{highlight:a}=s.effects;if(!o)return;const l=i.passOptions,c=o.getReasonsWithGradients();for(let u=0;u<c.length;u++){const d={...i,passOptions:{type:"highlight",activeGradient:c[u].activeGradient,activeReasons:c[u].activeReasons,stepType:"burn",highlightAll:e}};if(a.bind(d),t(d),u<c.length-1){let m=0;for(let g=u+1;g<c.length;g++)m|=c[g].activeReasons;t({...i,passOptions:{type:"highlight",activeGradient:c[u].activeGradient,activeReasons:m,stepType:"clear",highlightAll:e}})}const p={...i,passOptions:{type:"highlight",activeGradient:c[u].activeGradient,activeReasons:c[u].activeReasons,stepType:"draw",highlightAll:e}};s.setPipelineState(pd(i)),s.updatePipelineState(i.context),a.draw(p),a.unbind()}i.passOptions=l}const ti=i=>parseFloat(i)/100;function fd(i,e,t){const n=typeof i.left=="string"?ti(i.left)*e:i.left,s=typeof i.right=="string"?ti(i.right)*e:i.right,o=typeof i.top=="string"?ti(i.top)*t:i.top,a=typeof i.bottom=="string"?ti(i.bottom)*t:i.bottom,l=o;return{xmin:n,xmax:Math.max(e-s,n),ymin:l,ymax:Math.max(t-a,o)}}
2function Ea(i,e,t,n){switch(e.type){case"rect":{const{width:s,height:o}=i,{xmin:a,xmax:l,ymin:c,ymax:u}=fd(e,s,o),{x:d,y:p}=t;return d>a&&d<l&&p>c&&p<u}case"path":return e.path.length===0||!Array.isArray(e.path[0][0])||Lr(e.path,[t.x,t.y]);case"geometry":return e.geometry==null||(e.geometry.type==="polygon"?Ro(e.geometry,n):Dn(e.geometry,n))}}function yd(i){if(!i.highlights)return null;const e=i.highlights.findIndex(t=>t.name==="default");return e===-1?null:i.highlights.items[e]}function _d(i,e){if(!i.highlights){if(!e)return;i.highlights=new S([new ze])}const t=i.highlights.findIndex(n=>n.name==="default");e?i.highlights.items[t].assignFrom(e):(i.highlights.removeAt(t),i.highlights.length===0&&(i.highlights=null))}async function vd(i,e,t){const n=Qo(e)?Jo(i,e):e;if(!i.ready||isNaN(n.x)||isNaN(n.y))return{screenPoint:n,results:[]};let s=new Set;const o=new Set;let a=!1,l=null,c=null;t?.include?ho(t.include,lo(i,m=>{s.add(m),sn(m,g=>o.add(g))},(m,g)=>{o.add(m),s.add(g)},m=>{l||(l=new Set),l.add(m)},m=>s.add(m),()=>a=!0)):(a=!0,s=new Set(i.allLayerViews),s.forEach(m=>{sn(m,g=>o.add(g))})),t?.exclude&&ho(t.exclude,lo(i,m=>{s.delete(m),sn(m,g=>o.delete(g))},m=>o.delete(m),m=>{c||(c=new Set),c.add(m)}));const u=i.toMap(n),d=i.allLayerViews.filter(m=>!m.suspended&&s.has(m)&&m.clips.every(g=>Ea(i,g,n,u))).reverse();let p=[...a?i.graphicsView.hitTest(u).map(m=>({type:"graphic",graphic:m,layer:null,mapPoint:u})):[],...await Promise.all(d.map(m=>m.hitTest(u,n)).toArray())].filter(Rt).flat().filter(Rt);return p=p.filter(m=>m.type!=="graphic"||m.layer?.type!=="subtype-group"||o.has(m.graphic.layer)),l&&(p=p.filter(m=>!("graphic"in m)||!m.graphic||l?.has(Rn(m.graphic)))),c&&(p=p.filter(m=>!("graphic"in m)||!m.graphic||!c?.has(Rn(m.graphic)))),{screenPoint:n,results:p}}function lo(i,e,t,n,s,o){return a=>{if(a instanceof jr){if(a.layer===i)o?.();else{const l=i.allLayerViews.find(c=>c.layer===a.layer);l&&s?.(l)}n(Rn(a))}else if(!("layer"in a&&"element"in a))if(a.type==="subtype-sublayer"){const l=i.allLayerViews.find(c=>c.layer===a.parent);l&&t(a,l)}else{const l=i.allLayerViews.find(c=>c.layer===a);l&&e(l)}}}function ho(i,e){if(i)if(rs(i))for(const t of i)if(rs(t))for(const n of t)e(n);else e(t);else e(i)}function Rn(i){const e=i.getObjectId();return e?`${i.layer?.uid??i.sourceLayer?.uid??"MapView"}/${e}`:`"MapView/${i.uid}`}function sn(i,e){const t=i.layer;t?.type==="subtype-group"&&t.sublayers.forEach(n=>{e(n)})}function Va(i,e,t){const{ctx:n,canvas:s}=Ra(i,t),o=n.getImageData(0,0,i.width,i.height),a=Aa(s,e);return Da(s),{dataUrl:a,data:o}}function Ia(i,e){const{ctx:t,canvas:n}=Ra(i,e),s=t.getImageData(0,0,i.width,i.height);return Da(n),s}function Ra(i,e){const t=wd();e.premultipliedAlpha&&Td(i),t.width=i.width,t.height=i.height;const n=t.getContext("2d",{willReadFrequently:!0});return n.putImageData(i,0,0),e.flipY&&xd(n),{ctx:n,canvas:t}}function Da(i){i.width=0,i.height=0}function wd(){return on==null&&(on=document.createElement("canvas")),on}let on=null;function Aa(i,e){const t=$d[e.format],n=e.quality/100;return i.toDataURL(t,n)}function La(i,e){const t=Md(i),n=Pd[t];return{format:t,quality:ln(e??n,0,100)}}function Oa(i,e){return e/Math.max(i[0],i[1])}function bd(i,e,t,n=0,s=0,o=i.width-n,a=i.height-s,l=!1){const{data:c}=i,{width:u,height:d,data:p}=e,m=o/u,g=a/d,v=Math.ceil(m/2),f=Math.ceil(g/2),I=i.width;for(let $=0;$<d;$++)for(let he=0;he<u;he++){const C=4*(he+(l?d-$-1:$)*u);let N=0,E=0,K=0,ce=0,bt=0,Qn=0;const tr=($+.5)*g;for(let Ht=Math.floor($*g);Ht<($+1)*g;Ht++){const Xn=Math.abs(tr-(Ht+.5))/f,ir=(he+.5)*m,nr=Xn*Xn;for(let Zt=Math.floor(he*m);Zt<(he+1)*m;Zt++){const es=Math.abs(ir-(Zt+.5))/v,Qe=Math.sqrt(nr+es*es);if(Qe>=1)continue;let Ve=2*Qe*Qe*Qe-3*Qe*Qe+1;const Xe=4*(n+Zt+(s+Ht)*I);Qn+=Ve*c[Xe+3],E+=Ve,!t&&c[Xe+3]<255&&(Ve=Ve*c[Xe+3]/255),K+=Ve*c[Xe],ce+=Ve*c[Xe+1],bt+=Ve*c[Xe+2],N+=Ve}}p[C]=K/N,p[C+1]=ce/N,p[C+2]=bt/N,p[C+3]=Qn/E}return e}function Md(i){switch(i){case"png":case"jpg":case"jpeg":return i;default:return kd}}function xd(i){i.save(),i.globalCompositeOperation="copy",i.scale(1,-1),i.translate(0,-i.canvas.height),i.drawImage(i.canvas,0,0),i.restore(
2)}function Td(i){const e=i.data,t=e.length;for(let n=0;n<t;n+=4){const s=e[n+3];if(s!==255&&s>0){const o=255/s;e[n]=e[n]*o,e[n+1]=e[n+1]*o,e[n+2]=e[n+2]*o}}}const $d={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},co=98,kd="png",Pd={png:100,jpg:co,jpeg:co},kg=Object.freeze(Object.defineProperty({__proto__:null,createEmptyImageData:Il,encode:Va,encodeData:Ia,getFormatAndQuality:La,getMaximumResolutionScale:Oa,resampleHermite:bd,toDataUrl:Aa},Symbol.toStringTag,{value:"Module"})),za={flipY:!0,premultipliedAlpha:!0};async function Sd(i,e){const t=await Fa(i,e),{format:n,quality:s}=La(e?.format,e?.quality);return Va(t,{format:n,quality:s},za)}async function Cd(i,e){const t=await Fa(i,e);return Ia(t,za)}function Fa(i,e){const t=Id(e||{},Vd(i.stage,i.size),i.size,i.padding),n=Ed(e,i.allLayerViews);return i.stage.takeScreenshot(t,n,i.backgroundColor,e?.rotation)}function Ed(i={},e){if(!i.layers)return;const t=[];return i.layers.forEach(n=>{const s=e.find(o=>o.layer.id===n.id);s?.container&&t.push(s.container)}),t}function Vd(i,e){return Math.min(4,Oa(e,Math.min(4096,i.context.parameters.maxTextureSize)))}function Id(i,e,t,n){i.ignorePadding&&(n={left:0,right:0,top:0,bottom:0});let s=null;i.width!=null&&i.height!=null?s=[i.width,i.height]:i.width==null&&i.height!=null?s=[i.height,i.height]:i.width!=null&&i.height==null?s=[i.width,i.width]:i.width==null&&i.height==null&&(s=null);const o=t[0]-(n.left+n.right),a=t[1]-(n.top+n.bottom);let l,c,u=i.area||{x:0,y:0,width:o,height:a};if(s){const d=o/a,p=s[0]/s[1];if(p>d){const m=u.width/p;u={x:u.x,y:Math.round(u.y+(u.height-m)/2),width:u.width,height:Math.round(m)}}else{const m=u.height*p;u={x:Math.round(u.x+(u.width-m)/2),y:u.y,width:Math.round(m),height:u.height}}}else s=[u.width,u.height];return s[0]>u.width?(l=Math.min(s[0]/u.width,e),c=s[0]/u.width/l):(l=1,c=s[0]/u.width),{cropArea:{x:Math.round((u.x+n.left)*l),y:Math.round((u.y+n.top)*l),width:Math.round(u.width*l),height:Math.round(u.height*l)},outputScale:c,resolutionScale:l}}const Rd=i=>i.includes("Brush");let Na=class{constructor(){this._names=new Map}begin(e){this._names.has(e)||(this._names.set(e,!1),Rd(e)&&this.record("Esri.FirstDraw"),performance.mark(`Esri.${e}.Start`))}end(e){this._names.has(e)&&!this._names.get(e)&&(this._names.set(e,!0),performance.mark(`Esri.${e}.End`))}record(e){this._names.has(e)||(this._names.set(e,!0),performance.mark(`Esri.${e}`))}};const uo=Symbol("analyses-owner-handles");let Le=class extends T{constructor(i){super(i),this._allAnalysisViews=new S,this._creatingViewCount=0,this._attachedToViewResolver=po(),this._items=new Map,this._moduleMap=new Map,this._scheduledUpdateHandle=null,this._emitOnView=(e,t)=>this.view.emit(e,t)}destroy(){this._disconnectOwners(),this._attachedToViewResolver.reject(kt("AnalysisViewManager was destroyed")),this._set("view",null)}attach(){this._connectOwners(),this._attachedToViewResolver.resolve()}detach(){this._disconnectOwners(),this._attachedToViewResolver.reject(kt()),this._attachedToViewResolver=po()}get updating(){return!this.view.ready||this._creatingViewCount!==0||this._allAnalysisViews.some(i=>i.updating)}get testInfo(){}async whenAnalysisView(i){await this._attachedToViewResolver.promise;const e=this._items.get(i);if(e==null||e.state.list===1)throw new M("AnalysisViewManager:no-analysis-view-for-analysis","The analysis does not exist in view.analyses",{analysis:i});return e.createAnalysisViewTask.promise}_connectOwners(){this.addHandles(this._connectAnalysesCollection(this.view.analyses),uo)}_disconnectOwners(){this.removeHandles(uo),this._update(),this._creatingViewCount=0}_connectAnalysesCollection(i){for(const n of i)this._addAnalysis(n);const e=i.on("after-add",n=>this._addAnalysis(n.item)),t=i.on("after-remove",n=>this._removeAnalysis(n.item));return Ye(()=>{e.remove(),t.remove();for(const n of i)this._removeAnalysis(n)})}_addAnalysis(i){const e=this._items.get(i);if(e==null){const t={state:{view:0,list:0},analysis:i,view:null,createAnalysisViewTask:null};this._items.set(i,t),t.createAnalysisViewTask=Di(n=>this._createAnalysisViewPromise(t,n).then(s=>(this._emitOnView("analysis-view-create",{analysis:i,analysisView:s}),s),s=>{throw this._emitOnView("analysis-view-create-error",{analysis:i,error:s}),s}))}else e.state.list=0}_removeAnalysis(i){const e=this._items.get(i);e!=null?(e.state.list=1,this._scheduleUpdate()):k.getLogger(this).error("Trying to remove analysis which was not added")}_scheduleUpdate(){this._scheduledUpdateHandle==null&&(this._scheduledUpdateHandle=To(()=>this._update()))}
2_update(){this._scheduledUpdateHandle=ee(this._scheduledUpdateHandle),this._items.forEach(i=>{if(i.state.list!==1)return;const{analysis:e,view:t}=i;switch(this._items.delete(e),i.state.view){case 0:i.createAnalysisViewTask=mi(i.createAnalysisViewTask);break;case 1:t!=null&&(this._allAnalysisViews.remove(t),i.view=ie(t),i.createAnalysisViewTask=null,this._emitOnView("analysis-view-destroy",{analysis:e,analysisView:t}))}})}async _createAnalysisViewPromise(i,e){const{analysis:t}=i;if(this._creatingViewCount+=1,!this._moduleMap.has(t.type))try{this._moduleMap.set(t.type,await this.importAnalysisViewModule(t))}catch{throw this._creatingViewCount-=1,new M("AnalysisViewManager:no-analysis-view-for-analysis",`Analysis of type "${t.type}" is not supported`)}if(hn(e))throw this._creatingViewCount-=1,kt("AnalysisView creation aborted");const n=new(this._moduleMap.get(t.type)).default({analysis:t,view:this.view});let s=!0;un(e,()=>{s&&this._destroyAnalysisView(t,n)});try{await n.when()}catch(o){throw s=!1,this._destroyAnalysisView(t,n),o}if(hn(e))throw kt();return s=!1,i.view=n,i.state.view=1,this._allAnalysisViews.add(n),this._creatingViewCount-=1,n}_destroyAnalysisView(i,e){e.destroyed||(this._creatingViewCount-=1,e.destroy(),this._emitOnView("analysis-view-destroy",{analysis:i,analysisView:e}))}};r([h()],Le.prototype,"updating",null),r([h({constructOnly:!0})],Le.prototype,"importAnalysisViewModule",void 0),r([h({constructOnly:!0})],Le.prototype,"view",void 0),r([h()],Le.prototype,"_allAnalysisViews",void 0),r([h()],Le.prototype,"_creatingViewCount",void 0),Le=r([_("esri.views.support.AnalysisViewManager")],Le);const Dd=Le;function po(){const i=Ot();return i.promise.catch(()=>{}),i}function Ad(i){const e=Rl();return e.available?i==="3d"&&e.majorPerformanceCaveat?new M("webgl:major-performance-caveat-detected",`Your WebGL implementation (${e.unmaskedRenderer}) doesn't seem to support hardware accelerated rendering. Check your browser settings or if your GPU is in a blocklist.`):e.supportsHighPrecisionFragment?e.supportsVertexShaderSamplers?null:new M("webgl:vertex-shader-samplers-required","WebGL support for vertex shader samplers is required but not supported."):new M("webgl:high-precision-fragment-required","WebGL support for high precision fragment shaders is required but not supported."):new M("webgl:required","WebGL2 is required but not supported.",new Error().stack)}function Ld(i){return i&&"nodeType"in i}function Od(i){return i&&typeof i.render=="function"}const mo={component:"esri-component"};let qe=class extends T{constructor(){super(...arguments),this.widget=null}destroy(){this.node=null,this.widget?.destroy()}get id(){return this._get("id")??this.widget?.id??this.node?.id}set id(e){this._set("id",e)}set node(e){const t=this._get("node");e!==t&&(e&&e.classList.add(mo.component),t&&t.classList.remove(mo.component),this._set("node",e))}castNode(e){return this.widget?.destroy(),e?typeof e=="string"||Ld(e)?(this._set("widget",null),No(e)):(Od(e)&&!e.domNode&&(e.domNode=document.createElement("div")),this._set("widget",e),e.domNode):(this._set("widget",null),null)}};r([h()],qe.prototype,"id",null),r([h()],qe.prototype,"node",null),r([An("node")],qe.prototype,"castNode",null),r([h({readOnly:!0})],qe.prototype,"widget",void 0),qe=r([_("esri.views.ui.Component")],qe);const ci=qe,zd={left:0,top:0,bottom:0,right:0},Ha={bottom:30,top:15,right:15,left:15},we="esri-ui",G={ui:we,corner:`${we}-corner`,innerContainer:`${we}-inner-container`,manualContainer:`${we}-manual-container`,cornerContainer:`${we}-corner-container`,topLeft:`${we}-top-left`,topRight:`${we}-top-right`,bottomLeft:`${we}-bottom-left`,bottomRight:`${we}-bottom-right`};function Fd(i){return i&&!i._started&&typeof i.postMixInProperties=="function"&&typeof i.buildRendering=="function"&&typeof i.postCreate=="function"&&typeof i.startup=="function"}function ii(i){return i===0?"0":`${i}px`}function an(i){const e=typeof i=="object"&&i!==null&&Object.getPrototypeOf(i);return(e===null||e===Object.prototype)&&("component"in i||"index"in i||"position"in i)?i:null}function rn(i,{top:e,bottom:t,left:n,right:s}){i.style.top=e,i.style.bottom=t,i.style.left=n,i.style.right=s}let me=class extends Oo{constructor(i){super(i),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentMap=new Map,this._removeWidgetHandleKey=Symbol("componentOnRemoveSymbol"),this._locale=Jr(),this.view=null,this._applyViewPadding=()=>{const e=this.container;e&&rn(e,this._toPixelPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const e=this._innerContainer;e&&rn(e,this._toPixelPosition(this.padding))},this._initContainers()}initialize(){this.addHandles([w(()=>[this.view?.padding,this.container],this._applyViewPadding,W),w(()=>this.padding,this._applyUIPadding,W),w(()=>[this.container,this._locale],([i,e])=>{i&&i.setAttribute("lang",e)},W),Qr(i=>{this._locale=i})])}destroy(){this.removeAllHandles(),this.container=null;for(const i of this._components)i.destroy();this._components.length=0,this._componentMap.clear(),this.view=null,this._set("view",null)}set container(i){const e=this._get("container");i!==e&&(i&&(i.classList.add(G.ui),ol(i),this._attachContainers(i)),e&&(e.classList.remove(G.ui),rn(e,{top:"",bottom:"",left:"",right:""}),e.textContent=""),this._set("container",i))}get height(){const i=this.view?.height??0;if(i===0)return i;const e=this._getViewPadding(),{top:t,bottom:n}=e;return Math.max(i-t-n,0)}get padding(){return this._get("padding")}
2set padding(i){this._overrideIfSome("padding",i)}castPadding(i){return typeof i=="number"?{bottom:i,top:i,right:i,left:i}:{...Ha,...i}}get width(){const i=this.view?.width??0;if(i===0)return i;const e=this._getViewPadding(),{left:t,right:n}=e;return Math.max(i-t-n,0)}add(i,e){let t,n,s;if(Array.isArray(i))return void i.forEach(a=>this.add(a,e));const o=an(i);o&&({index:t,position:e,component:i,key:n}=o),e&&typeof e=="object"&&({index:t,key:n,position:e,internal:s}=e),!i||e&&!this._isValidPosition(e)||this._add(i,e,t??this._getNumComponentsAtPosition(e),n,s)}remove(i,e){if(!i)return;if(Array.isArray(i))return i.map(n=>this.remove(n,e));const t=this._find(i);if(t){const n=this._componentMap.get(t);if(!n||n.key!==e)return;const s=this._components.indexOf(t);return t.node.parentNode?.removeChild(t.node),this._componentMap.delete(t),t.widget?.removeHandlesReference(this._removeWidgetHandleKey),this._components.forEach(a=>{const l=this._componentMap.get(a);l&&l.position===n.position&&l.index>n.index&&l.index--}),this._components.splice(s,1)[0]}}empty(i,e={removeInternal:!1}){if(Array.isArray(i)){for(const s of i)this.empty(s,e);return}const t=this._positionNameToContainerLookup[i??"manual"],n=Array.prototype.slice.call(t.children).map(s=>this._findByNode(s)).filter(s=>s==null?!1:!(this._componentMap.get(s)?.internal??!1)||e.removeInternal);for(const s of n)this.remove(s)}move(i,e){if(Array.isArray(i)&&i.forEach(o=>this.move(o,e)),!i)return;let t;const n=an(i)||an(e);if(n&&(t=n.index,e=n.position,i=n.component||i),e&&!this._isValidPosition(e))return;const s=this.remove(i);s&&this.add(s,{position:e,index:t})}find(i){if(!i)return null;const e=this._findById(i);return e&&(e.widget||e.node)}getComponents(i,e={includeInternal:!1}){return i?Array.isArray(i)?i.flatMap(t=>this._getComponentsAtPosition(t,e)):this._getComponentsAtPosition(i,e):this._components.filter(t=>e.includeInternal||!this._componentMap.get(t)?.internal).map(({widget:t,node:n})=>t??n)}getPosition(i){for(const e in this._positionNameToContainerLookup)if(this._positionNameToContainerLookup[e].contains(i))return e;return null}_add(i,e,t,n,s){i instanceof ci||(i=new ci({node:i}));const{widget:o}=i;o!=null&&o instanceof T&&o.addHandles(Ye(()=>{queueMicrotask(()=>this.remove(i))}),this._removeWidgetHandleKey);const a=this._positionNameToContainerLookup[e];this._components.some(l=>{const c=this._componentMap.get(l)?.position,u=c?this._positionNameToContainerLookup[c]:null;return a===u&&this._componentMap.get(l)?.index===t})&&this._components.forEach(l=>{const c=this._componentMap.get(l),u=c?.position,d=u?this._positionNameToContainerLookup[u]:null;c&&d===a&&c.index>=t&&c.index++}),this._place({component:i,position:e,index:t}),this._components.push(i),this._componentMap.set(i,{key:n,position:e,internal:s,index:t})}_find(i){return i?i instanceof ci?this._findByComponent(i):typeof i=="string"?this._findById(i):"domNode"in i?this._findByNode(i.domNode):this._findByNode(i):null}_getViewPadding(){return this.view?.padding??zd}_attachContainers(i){i.appendChild(this._innerContainer),i.appendChild(this._manualContainer)}_initContainers(){const i=document.createElement("div");i.classList.add(G.innerContainer,G.cornerContainer);const e=document.createElement("div");e.classList.add(G.innerContainer,G.manualContainer);const t=document.createElement("div");t.classList.add(G.topLeft,G.corner),i.appendChild(t);const n=document.createElement("div");n.classList.add(G.topRight,G.corner),i.appendChild(n);const s=document.createElement("div");s.classList.add(G.bottomLeft,G.corner),i.appendChild(s);const o=document.createElement("div");o.classList.add(G.bottomRight,G.corner),i.appendChild(o),this._innerContainer=i,this._manualContainer=e;const a=al();this._cornerNameToContainerLookup={"top-left":t,"top-right":n,"bottom-left":s,"bottom-right":o,"top-leading":a?n:t,"top-trailing":a?t:n,"bottom-leading":a?o:s,"bottom-trailing":a?s:o},this._positionNameToContainerLookup={manual:e,...this._cornerNameToContainerLookup}}_isValidPosition(i){return!!this._positionNameToContainerLookup[i]}
2_place(i){const e=i.position??"manual",{component:t,index:n}=i,s=this._positionNameToContainerLookup[e],o=n!=null&&n>-1;if(Fd(t.widget)&&t.widget.startup(),!o)return void s.appendChild(t.node);const a=Array.from(s.children);if(a.length!==0){for(const l of a){const c=this._findByNode(l);if(c&&n<(this._componentMap.get(c)?.index??0))return void l.parentNode?.insertBefore(t.node,l)}s.appendChild(t.node)}else s.appendChild(t.node)}_toPixelPosition(i){return{top:ii(i.top),left:ii(i.left),right:ii(i.right),bottom:ii(i.bottom)}}_findByComponent(i){return this._components.find(e=>e===i)??null}_findById(i){return this._components.find(({id:e})=>e===i)??null}_findByNode(i){return i?this._components.find(({node:e})=>e===i):null}_getComponentsAtPosition(i,e){const t=this._positionNameToContainerLookup[i];return Array.prototype.slice.call(t.children).map(n=>this._findByNode(n)).filter(Rt).filter(n=>e.includeInternal||!this._componentMap.get(n)?.internal).map(({widget:n,node:s})=>n??s)}_getNumComponentsAtPosition(i){return this._positionNameToContainerLookup[i]?.children.length??0}};r([h()],me.prototype,"_locale",void 0),r([h()],me.prototype,"container",null),r([h()],me.prototype,"height",null),r([h({value:Ha})],me.prototype,"padding",null),r([An("padding")],me.prototype,"castPadding",null),r([h()],me.prototype,"view",void 0),r([h()],me.prototype,"width",null),me=r([_("esri.views.ui.UI")],me);const Nd=me,Hd=new Map;function Zd(i){return Hd.get(i)}function go(i,e){return i&&"copyright"in i&&(!e||typeof i.originOf=="function"&&i.originOf("copyright")==="user")}function qd(i,e){return i.length!==e.length||i.some((t,n)=>t.text!==e[n].text)}function ni(i,e,t){!t||!e||i.find(n=>n.layerView===e&&n.text===t)||i.push({text:t,layerView:e})}function Wd(i){return i.type==="bing-maps"}const ue=[];let pt=class extends T{constructor(i){super(i),this._clear=()=>{this._fetchedAttributionData.clear(),this._pendingAttributions.clear(),this.removeHandles("suspension"),this.notifyChange("state")},this._pendingAttributions=new Set,this._fetchedAttributionData=new Map,this.items=new S,this.view=null,this._allLayerViewsChange=e=>{this.removeHandles("suspension"),this.removeHandles("visible-geometry-changed");const t=this.view?.allLayerViews;t&&(this.addHandles(t.map(n=>w(()=>[n.suspended,n.layer?.attributionVisible],()=>this._updateAttributionItems())).toArray(),"suspension"),t.forEach(n=>{n.declaredClass==="esri.views.3d.layers.IntegratedMesh3DTilesLayerView3D"&&this.addHandles(n.on("visible-geometry-changed",()=>this._updateAttributionItems()),"visible-geometry-changed")})),e?.removed&&e.removed.forEach(n=>{this._pendingAttributions.delete(n),this._fetchedAttributionData.delete(n)}),this._updateAttributionItems()},this.addHandles([Ei(()=>this.view?.allLayerViews,"change",e=>this._allLayerViewsChange(e),{onListenerAdd:()=>this._allLayerViewsChange(),onListenerRemove:this._clear}),Ke(()=>this.view?.stationary===!0,()=>this._updateAttributionItems())])}destroy(){this.view=null,this._fetchedAttributionData.clear(),this._pendingAttributions.clear(),this.items.removeAll()}get state(){return this.view?.ready?this._pendingAttributions.size>0?"loading":"ready":"disabled"}_updateAttributionItems(){const i=this.view,e=i?.allLayerViews;ue.length=0;let t=!1,n=null;if(!i||!e)return void this._clear();e.forEach(o=>{if(o.suspended||!o.layer?.attributionVisible)return;const a=o.layer;if(go(a,"user"))return void ni(ue,o,a.copyright);if(a.type==="integrated-mesh-3dtiles"&&a.hasGoogleUrl&&(t=!0,n=o),a.hasAttributionData){if(this._fetchedAttributionData.has(o)){const c=this._fetchedAttributionData.get(o);return void(c?ni(ue,o,this._getDynamicAttribution(c,i,a)):go(a)&&ni(ue,o,a.copyright))}return void this._fetchAttributionData(o)}const l="portalItem"in a?a.portalItem?.accessInformation:void 0;ni(ue,o,l||a.copyright)});const s=e.find(o=>o.layer?.type==="integrated-mesh-3dtiles");if(this.view&&s){const o=Zd(this.view);if(o){const a=o.getAttributionText();for(let l=a.length-1;l>-1;--l)ue.unshift({text:a[l],layerView:s})}}t&&n&&ue.unshift({text:"Google Maps",layerView:n}),qd(this.items,ue)&&(this.items.removeAll(),this.items.addMany(ue)),ue.length=0,this.notifyChange("state")}
2async _fetchAttributionData(i){if(this._pendingAttributions.has(i))return;this._pendingAttributions.add(i);const e=await hl(i.layer.fetchAttributionData());if(this._pendingAttributions.has(i)){const t=e.ok?this._createContributionIndex(e.value,Wd(i.layer)):null;this._pendingAttributions.delete(i),this._fetchedAttributionData.set(i,t)}this._updateAttributionItems()}_createContributionIndex(i,e){const t=i.contributors,n={};if(!t)return n;for(let s=0;s<t.length;s++){const o=t[s],a=o.coverageAreas;if(!a)return;for(const l of a){const c=l.bbox,u=l.zoomMin-(e&&l.zoomMin?1:0),d=l.zoomMax-(e&&l.zoomMax?1:0),p=new Je({xmin:c[1],ymin:c[0],xmax:c[3],ymax:c[2],spatialReference:gi.WGS84}),m={extent:Or(p),attribution:o.attribution||"",score:l.score!=null?l.score:100,id:s};for(let g=u;g<=d;g++)n[g]??=[],n[g].push(m)}}return n.maxKey=Math.max.apply(null,Object.keys(n)),n}_getDynamicAttribution(i,e,t){const{extent:n,scale:s}=e;let o=t.tileInfo?.scaleToZoom(s)??0;if(o=Math.min(i.maxKey??0,Math.round(o)),!n||o==null||o<=-1)return"";const a=i[o],l=zr(n.center.clone().normalize(),gi.WebMercator),c=new Set;return a?a.filter(u=>{const d=u.id,p=!c.has(d)&&l&&u.extent&&Dn(u.extent,l);return p&&c.add(d),p}).sort((u,d)=>d.score-u.score||u.objectId-d.objectId).map(u=>u.attribution).join(", "):""}};r([h({readOnly:!0,type:S})],pt.prototype,"items",void 0),r([h({readOnly:!0})],pt.prototype,"state",null),r([h()],pt.prototype,"view",void 0),pt=r([_("esri.widgets.Attribution.AttributionViewModel")],pt);const Za=pt,_e={button:"esri-button",buttonDisabled:"esri-button--disabled",buttonHalf:"esri-button--half",buttonSecondary:"esri-button--secondary",buttonSmall:"esri-button--small",buttonTertiary:"esri-button--tertiary",buttonThird:"esri-button--third",empty:"esri-widget__content--empty",heading:"esri-widget__heading",interactive:"esri-interactive",panel:"esri-widget--panel",table:"esri-widget__table",widget:"esri-widget",widgetButton:"esri-widget--button"};function Gd(){return function(i,e){if(!i[e])throw new TypeError(`Cannot auto bind undefined function '${String(e)}'`);return{value:Ud(i[e])}}}function jd(i){const e=i?.type;return i instanceof KeyboardEvent||e==="keyup"||e==="keydown"||e==="keypress"}function Ud(i){return function(e,...t){jd(e)?rl(e.key)&&(e.preventDefault(),e.stopPropagation(),e.target.click()):i.call(this,e,...t)}}const nt="esri-attribution",st={base:nt,poweredBy:`${nt}__powered-by`,sources:`${nt}__sources`,open:`${nt}--open`,sourcesOpen:`${nt}__sources--open`,link:`${nt}__link`};let q=class extends Vi{constructor(e,t){super(e,t),this._isOpen=!1,this._attributionTextOverflowed=!1,this._prevSourceNodeHeight=0,this._sourcesNode=null,this._overflowRequestAnimationFrame=null,this._resizeObserver=new ResizeObserver(n=>{n.forEach(({target:s})=>{this._scheduleOverflowCheck(s)})}),this._mutationObserver=new MutationObserver(n=>{let s=!1;for(const o of n)if(o.type==="childList"||o.type==="characterData"||o.type==="attributes"){s=!0;break}s&&this._sourcesNode&&this._scheduleOverflowCheck(this._sourcesNode)}),this.itemDelimiter=" | ",this.messages=null,this.viewModel=new Za}initialize(){this.addHandles(Ei(()=>this.viewModel?.items,"change",()=>this.scheduleRender()))}destroy(){this._resizeObserver?.disconnect(),this._mutationObserver?.disconnect(),this._overflowRequestAnimationFrame!=null&&(cancelAnimationFrame(this._overflowRequestAnimationFrame),this._overflowRequestAnimationFrame=null)}get _isInteractive(){return this._isOpen||this._attributionTextOverflowed}_scheduleOverflowCheck(e){this._overflowRequestAnimationFrame==null&&(this._overflowRequestAnimationFrame=requestAnimationFrame(()=>{this._overflowRequestAnimationFrame=null,this._checkSourceTextOverflow(e)}))}get attributionText(){return this.viewModel.items.reduce((e,t)=>(e.includes(t.text)||e.push(t.text),e),[]).join(this.itemDelimiter)}get icon(){return"description"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const e={[st.open]:this._isOpen};return B("div",{bind:this,class:this.classes(st.base,_e.widget,e),dir:"ltr",onclick:this._toggleState,onkeydown:this._toggleState},this._renderSourcesNode(),this._renderPoweredBy())}_renderPoweredBy(){return B("div",{class:st.poweredBy},"Powered by"," ",B("a",{class:st.link,href:"https://www.esri.com/",rel:"noreferrer",target:"_blank"},"Esri"))}_renderSourcesNode(){const e=this._isOpen,t=this._isInteractive,n=t?0:void 0,{attributionText:s}
2=this,o={[st.sourcesOpen]:e,[_e.interactive]:t};return B("div",{afterCreate:this._afterSourcesNodeCreate,bind:this,class:this.classes(st.sources,o),innerHTML:s,tabIndex:n})}_afterSourcesNodeCreate(e){this._prevSourceNodeHeight=e.clientWidth,this._sourcesNode=e,this._resizeObserver.observe(e),this._mutationObserver.observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),this._scheduleOverflowCheck(e)}_checkSourceTextOverflow(e){let t=!1;const{clientHeight:n,clientWidth:s,scrollWidth:o}=e,a=o>s,l=this._attributionTextOverflowed!==a;if(this._attributionTextOverflowed=a,l&&(t=!0),this._isOpen){const c=n<this._prevSourceNodeHeight;this._prevSourceNodeHeight=n,c&&(this._isOpen=!1,t=!0)}t&&this.scheduleRender()}_toggleState(){this._isInteractive&&(this._isOpen=!this._isOpen)}};r([h()],q.prototype,"_isOpen",void 0),r([h()],q.prototype,"_isInteractive",null),r([h()],q.prototype,"_attributionTextOverflowed",void 0),r([h()],q.prototype,"_prevSourceNodeHeight",void 0),r([h({readOnly:!0,dependsOn:["viewModel.items.length","itemDelimiter"]})],q.prototype,"attributionText",null),r([h()],q.prototype,"icon",null),r([h()],q.prototype,"itemDelimiter",void 0),r([h()],q.prototype,"label",null),r([h(),Ii("esri/widgets/Attribution/t9n/Attribution")],q.prototype,"messages",void 0),r([h()],q.prototype,"view",null),r([h({type:Za})],q.prototype,"viewModel",void 0),r([Gd()],q.prototype,"_toggleState",null),q=r([_("esri.widgets.Attribution")],q);const Bd=q;function Kd(){const i=F("mapview-essential-goto-duration");return i==null?i:ne(i)}function Yd(i){return i?.spatialReference?.isWebMercator||i?.spatialReference?.isGeographic||!1}function Jd(i,e,t){return i.goTo(e,t)}const Qd=i=>{const e=i;let t=class extends e{constructor(...n){super(...n),this.goToOverride=null,this.view=null}callGoTo(n){const{view:s}=this;return Fr(s),this.goToOverride?this.goToOverride(s,n):Jd(s,n.target,n.options)}};return r([h()],t.prototype,"goToOverride",void 0),r([h()],t.prototype,"view",void 0),t=r([_("esri.widgets.support.GoTo")],t),t};let We=class extends Qd(T){constructor(e){super(e),this.orientation={x:0,y:0,z:0},this.view=null,this._updateForCamera=this._updateForCamera.bind(this),this._updateForRotation=this._updateForRotation.bind(this),this._updateRotationWatcher=this._updateRotationWatcher.bind(this)}initialize(){this._watchForView(W)}destroy(){this.view=null}get canShowNorth(){return Yd(this.view)}get state(){return!this.view?.ready||this.view.type==="2d"&&!this.view.constraints.rotationEnabled?"disabled":this.canShowNorth?"compass":"rotation"}reset(){this.view?.ready&&(this.view?.type==="2d"?this.callGoTo({target:{rotation:0},options:{animationMode:"always",duration:Kd()}}):this.callGoTo({target:{heading:0}}))}_updateForRotation(e){e!=null&&this._set("orientation",{z:e})}_updateForCamera(e){if(!e)return;const t=-e.heading;this._set("orientation",{x:0,y:0,z:t})}_updateRotationWatcher(e){this.removeAllHandles(),this._watchForView(),e&&this.addHandles(e.type==="2d"?w(()=>e?.rotation,this._updateForRotation,W):w(()=>e?.camera,this._updateForCamera,W))}_watchForView(e){this.addHandles(w(()=>this.view,this._updateRotationWatcher,e))}};r([h({readOnly:!0})],We.prototype,"canShowNorth",null),r([h({readOnly:!0})],We.prototype,"orientation",void 0),r([h({readOnly:!0})],We.prototype,"state",null),r([h()],We.prototype,"view",void 0),We=r([_("esri.widgets.Compass.CompassViewModel")],We);const qa=We,fo="esri-compass",yo={base:fo,iconContainer:`${fo}__icon-container`};let xe=class extends Vi{constructor(e,t){super(e,t),this.messages=null,this.viewModel=new qa,this._reset=()=>{this.viewModel.reset()},this._toRotationTransform=n=>({transform:`rotateZ(${n.z}deg)`})}loadDependencies(){return Hn({button:()=>x(()=>import("./index-M0UMp2ag.js"),__vite__mapDeps([342,343,11,1,8,5,2,3,4,12,13,14,344,345,346,347,348,349,350,351,352,353,354,355])),icon:()=>x(()=>import("./index-CfV9-Pi9.js").then(e=>e.i),__vite__mapDeps([347,11,1,8,5,2,3,4,12,13,14,348,349]))})}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get icon(){return this.viewModel.state==="rotation"?"arrow-up":"compass-needle"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}reset(){return this.viewModel.reset()}render(){const{orientation:e,state:t}=this.viewModel,{messages:n}=this;return B("div",{class:this.classes(yo.base,_e.widget)},B("calcite-button",{class:_e.widgetButton,disabled:t==="disabled",kind:"neutral",label:n.reset,onclick:this._reset,round:!0,scale:"s",title:n.reset},B("div",{"aria-hidden":"true",class:yo.iconContainer,title:n.reset},B("calcite-icon",{icon:this.icon,styles:this._toRotationTransform(e)}
2))))}};r([h()],xe.prototype,"goToOverride",null),r([h()],xe.prototype,"icon",null),r([h()],xe.prototype,"label",null),r([h(),Ii("esri/widgets/Compass/t9n/Compass")],xe.prototype,"messages",void 0),r([h()],xe.prototype,"view",null),r([h({type:qa})],xe.prototype,"viewModel",void 0),xe=r([_("esri.widgets.Compass")],xe);const Xd=xe,_o="esri-navigation-toggle",vo={base:_o,isLayoutHorizontal:`${_o}--horizontal`};let mt=class extends T{constructor(i){super(i),this._navigationMode="pan",this.view=null,i?.isDefaultViewModel||Nr(k.getLogger(this),"Navigation Toggle","arcgis-navigation-toggle",{version:"4.33"})}normalizeCtorArgs(i={}){const{isDefaultViewModel:e,...t}=i;return t}initialize(){this.addHandles(Ke(()=>this.view?.navigation?.actionMap,()=>this._updateNavigationActionMap()))}destroy(){this.view=null}get state(){return this.view?.ready&&this.view?.type==="3d"?"ready":"disabled"}get navigationMode(){return this._navigationMode}set navigationMode(i){this._navigationMode=i,this._updateNavigationActionMap()}toggle(){this.state!=="disabled"&&(this.navigationMode=this.navigationMode!=="pan"?"pan":"rotate")}_updateNavigationActionMap(){const i=this.view?.navigation?.actionMap;if(!i)return;const e=this._navigationMode==="pan";i.dragPrimary=e?"pan":"rotate",i.dragSecondary=e?"rotate":"pan"}};r([h({readOnly:!0})],mt.prototype,"state",null),r([h()],mt.prototype,"_navigationMode",void 0),r([h()],mt.prototype,"view",void 0),mt=r([_("esri.widgets.NavigationToggle.NavigationToggleViewModel")],mt);const Wa=mt;let Te=class extends Vi{constructor(e,t){super(e,t),this.messages=null,this.viewModel=new Wa({isDefaultViewModel:!0}),this.toggle=()=>this.viewModel.toggle(),this._panButton=null,this._rotateButton=null,this._toggle=()=>{const n=this.viewModel?.navigationMode==="pan"?this._rotateButton:this._panButton;ll(n),this.toggle()},e?.isDefaultUI||Hr(k.getLogger(this),"Navigation Toggle","arcgis-navigation-toggle",{version:"4.32"})}normalizeCtorArgs(e={}){const{isDefaultUI:t,...n}=e;return n}loadDependencies(){return Hn({button:()=>x(()=>import("./index-M0UMp2ag.js"),__vite__mapDeps([342,343,11,1,8,5,2,3,4,12,13,14,344,345,346,347,348,349,350,351,352,353,354,355]))})}get icon(){return"move"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}set layout(e){e!=="horizontal"&&(e="vertical"),this._set("layout",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const e=this.viewModel?.state==="disabled",t=this.viewModel?.navigationMode==="pan",n=this.messages.toggle;return B("div",{class:this.classes(vo.base,_e.widget,{[vo.isLayoutHorizontal]:this.layout==="horizontal"})},B("calcite-button",{afterCreate:s=>{this._panButton=s},appearance:t?"outline-fill":"solid",class:_e.widgetButton,disabled:e,iconStart:"move",kind:"neutral",label:n,onclick:this._toggle,tabIndex:t?void 0:-1,title:n}),B("calcite-button",{afterCreate:s=>{this._rotateButton=s},appearance:t?"solid":"outline-fill",class:_e.widgetButton,disabled:e,iconStart:"rotate",kind:"neutral",label:n,onclick:this._toggle,tabIndex:t?-1:void 0,title:n}))}};r([h()],Te.prototype,"icon",null),r([h()],Te.prototype,"label",null),r([h({value:"vertical"})],Te.prototype,"layout",null),r([h(),Ii("esri/widgets/NavigationToggle/t9n/NavigationToggle")],Te.prototype,"messages",void 0),r([h()],Te.prototype,"view",null),r([h({type:Wa})],Te.prototype,"viewModel",void 0),Te=r([_("esri.widgets.NavigationToggle")],Te);const ep=Te;let Ge=class extends T{get canZoomIn(){if(!this.view?.ready)return!1;const t=this.view?.constraints?.effectiveMaxScale;return t===0||this._scale>t}get canZoomOut(){const{view:e}=this;if(!e?.ready)return!1;const n=e.constraints?.effectiveMinScale;return n===0||this._scale<n}get _scale(){const e=this.view?.animation?.target;return(e&&"then"in e?void 0:e?.scale)??this.view?.scale??0}};r([h({readOnly:!0})],Ge.prototype,"canZoomIn",null),r([h({readOnly:!0})],Ge.prototype,"canZoomOut",null),r([h()],Ge.prototype,"view",void 0),r([h()],Ge.prototype,"_scale",null),Ge=r([_("esri.widgets.Zoom.ZoomConditions2D")],Ge);const tp=Ge;let gt=class extends T{get canZoomIn(){return!!this.view.ready}get canZoomOut(){return!!this.view.ready}};r([h({readOnly:!0})],gt.prototype,"canZoomIn",null),r([h({readOnly:!0})],gt.prototype,"canZoomOut",null),r([h()],gt.prototype,"view",void 0),gt=r([_("esri.widgets.Zoom.ZoomConditions3D")],gt);const ip=gt;let Oe=class extends T{constructor(e){super(e)}destroy(){this.view=null}get canZoomIn(){return this._zoomConditions!=null&&this._zoomConditions.canZoomIn}get canZoomOut(){return this._zoomConditions!=null&&this._zoomConditions?.canZoomOut}get state(){return this.view?.ready?"ready":"disabled"}set view(e){e?e.type==="2d"?this._zoomConditions=new tp({view:e}):e.type==="3d"&&(this._zoomConditions=new ip({view:e})):this._zoomConditions=null,this._set("view",e)}zoomIn(){const e=this.view;this.canZoomIn&&e&&(e.type==="2d"?e.mapViewNavigation.zoomIn():ls(e.goTo({zoomFactor:2})))}zoomOut(){const e=this.view;this.canZoomOut&&e&&(e.type==="2d"?e.mapViewNavigation.zoomOut():ls(e.goTo({zoomFactor:.5}
2)))}};r([h()],Oe.prototype,"_zoomConditions",void 0),r([h()],Oe.prototype,"canZoomIn",null),r([h()],Oe.prototype,"canZoomOut",null),r([h({readOnly:!0})],Oe.prototype,"state",null),r([h()],Oe.prototype,"view",null),Oe=r([_("esri.widgets.Zoom.ZoomViewModel")],Oe);const Ga=Oe,wo={base:"esri-zoom",horizontalLayout:"esri-zoom--horizontal"};let $e=class extends Vi{constructor(e,t){super(e,t),this.messages=null,this.viewModel=new Ga,this.zoomIn=()=>this.viewModel.zoomIn(),this.zoomOut=()=>this.viewModel.zoomOut()}loadDependencies(){return Hn({button:()=>x(()=>import("./index-M0UMp2ag.js"),__vite__mapDeps([342,343,11,1,8,5,2,3,4,12,13,14,344,345,346,347,348,349,350,351,352,353,354,355]))})}get icon(){return"magnifying-glass-plus"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}set layout(e){e!=="horizontal"&&(e="vertical"),this._set("layout",e)}set view(e){this.viewModel.view=e}get view(){return this.viewModel.view}render(){const e={[wo.horizontalLayout]:this.layout==="horizontal"},{canZoomIn:t,canZoomOut:n}=this.viewModel,{zoomIn:s,zoomOut:o}=this.messages;return B("div",{class:this.classes(wo.base,_e.widget,e)},B("calcite-button",{class:_e.widgetButton,disabled:!t,iconStart:"plus",kind:"neutral",label:s,onclick:this.zoomIn,title:s}),B("calcite-button",{class:_e.widgetButton,disabled:!n,iconStart:"minus",kind:"neutral",label:o,onclick:this.zoomOut,title:o}))}};r([h()],$e.prototype,"icon",null),r([h()],$e.prototype,"label",null),r([h({value:"vertical"})],$e.prototype,"layout",null),r([h(),Ii("esri/widgets/Zoom/t9n/Zoom")],$e.prototype,"messages",void 0),r([h()],$e.prototype,"view",null),r([h({type:Ga})],$e.prototype,"viewModel",void 0),$e=r([_("esri.widgets.Zoom")],$e);const np=$e;function sp(i){return i?.view!==void 0}let ui=class extends Nd{constructor(i){super(i),this._defaultPositionLookup={attribution:"manual",compass:"top-left","navigation-toggle":"top-left",zoom:"top-left"},this.components=[],this._updateViewAwareWidgets=e=>{this.components.forEach(t=>{const n=this._find(t),s=n?.widget;sp(s)&&(s.view=e)})},this._componentsWatcher=(e,t)=>{this._removeComponents(t),this._addComponents(e),this._adjustPadding(e)}}initialize(){this.addHandles([w(()=>this.components,this._componentsWatcher,W),w(()=>this.view,this._updateViewAwareWidgets,W)])}_add(i,e,t,n,s){let o=i;if(typeof i=="string"&&this._defaultPositionLookup[i]){if(this._find(i))return;o=this._createComponent(i)}super._add(o,e,t,n,s)}_removeComponents(i){i.forEach(e=>{const t=this._find(e);t&&(this.remove(t),t.destroy())})}_adjustPadding(i){if(!i.includes("attribution")&&!this._isOverridden("padding")){const{top:e}=this.padding;this.padding=e}}_addComponents(i){this.constructed&&i.forEach(e=>this.add(this._createComponent(e),this._defaultPositionLookup[e]))}_createComponent(i){const e=this._createWidget(i);return new ci({id:i,node:e})}_createWidget(i){const e=this.view;switch(i){case"attribution":return new Bd({view:e});case"compass":return new Xd({view:e});case"navigation-toggle":return new ep({view:e,isDefaultUI:!0});case"zoom":return new np({view:e})}}};r([h()],ui.prototype,"components",void 0),ui=r([_("esri.views.ui.DefaultUI")],ui);const ja=ui;let di=class extends ja{constructor(e){super(e),this.components=["attribution","zoom"]}};r([h()],di.prototype,"components",void 0),di=r([_("esri.views.ui.2d.DefaultUI2D")],di);const Ua=di;let op=class{constructor(i={},e={},t=8,n=1/0){this.disabledExtensions=i,this.debugWebGLExtensions=e,this.maxAnisotropy=t,this.maxPreferredTexturePixels=n}},Ba,Ka,Ya,Ja,Qa,Xa,er;async function ap(){const[,{GraphicsView2D:i,GraphicContainer:e,LabelManager:t,MapViewNavigation:n,MagnifierView2D:s,GridView2D:o,Stage:a}]=await Promise.all([x(()=>import("./webglDeps-Bq0VrpSC.js"),__vite__mapDeps([145,146,2,1,3,4,147,148,149,150,151,73,152])),x(()=>import("./mapViewDeps-y4babLXh.js"),__vite__mapDeps([153,3,4,2,1,10,7,154,6,5,63,64,155,156,157,74,73,158,49,50,159,160,138,139,88,134,24,22,23,25,140,141,161,162,163,34,35,164,165,146,147,148,149,150,166,167,168,169,170,151,152,171,172,173,174,175,176,177,94,44,45,178,179,180,181,75,31,133,182,183,184,185,186,187,57,58,46,59,60,61,188,189,145,190,191,192,193,194,195,196,197,21,120,8,198,199,200,12,201,116,202,203,204,77,205,206,17,56,207,208,209,210,211,72,212,213,41,37,214,68,69,66,70,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,97,232,233,87,234,235,236,11,13,14,104,237,238]))]);Ka=i,Ya=e,Ja=t,Qa=n,Xa=s,er=o,Ba=a}var yt;let b=(yt=class extends yu(Ic(Al(th(Nl(tc))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new Lo({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.labelManager=null,this.navigation=new Oi({actionMap:new Gn({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analyses=new vt,this.analysisViewManager=new Dd({importAnalysisViewModule:t=>Qu(t),view:this}),this.floors=new S,this.grid=null,this.map=null,this.timeline=new Na,this.type="2d",this.view2dType=null,this.ui=new Ua,this.animationsEnabled=!0,this.test={takeScreenshot:async t=>Cd(this._getScreenshotView(t),t)},this.padding={top:0,right:0,bottom:0,left:0},Xr()}
2destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=ie(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new id(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:n,viewpoint:s,extent:o}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&!o&&(t?.effectiveLODs||(a=-1),(!n||e===0&&a===-1)&&(s?.targetGeometry==null||s.targetGeometry.type!=="extent"&&!s.scale))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,n=this.spatialReference;return il(t.spatialReference,n)}get background(){return Zi(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get highlightOptions(){return yd(this)}set highlightOptions(e){_d(this,e)}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&k.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){const e=!(!this.magnifier.visible||this.magnifier.position===null||!this._magnifierView?.updatingHandles.updating),t=!this.destroyed&&(!this.analysisViewManager||!this.layerViewManager||!this.labelManager||!this.graphicsView||this.analysisViewManager.updating===!0||this.layerViewManager.updating===!0||this.labelManager.updating===!0||this.graphicsView.updating===!0||this.allLayerViews.some(n=>!n.destroyed&&!("layerViews"in n)&&n.updating===!0)||e);if(F("esri-2d-log-updating")){const n=this.allLayerViews.reduce((s,o)=>({...s,[`${o.layer.id}(${o.layer.type})`]:!o.destroyed&&!("layerViews"in o)&&o.updating}),{});console.log(`Updating MapView: ${t}
3-> Null LayerViewManager: ${!this.layerViewManager}
4-> Null LabelManager: ${!this.labelManager}
5-> Null GraphicsView: ${!this.graphicsView}
6-> layerViewManager.updating: ${this.layerViewManager?.updating}
7-> labelManager.updating: ${this.labelManager?.updating}
8-> graphicsView.updating: ${this.graphicsView?.updating}
9-> allLayerViews: ${JSON.stringify(n)}
10-> updatingMagnifier: ${e}
11`)}return t}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e&&new Do({rings:[e.map(t=>[t[0],t[1]])],spatialReference:this.spatialReference})}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return vd(this,e,t)}async takeScreenshot(e){return Sd(this._getScreenshotView(e),e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(e.parent==null)throw new M("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){this.graphicsView&&this.graphicsView.graphicUpdateHandler(e)}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return Zi(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return Zi(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return ro.hasLayerViewModule(e)}importLayerView(e){return ro.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(k.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),n=await this.hitTest(e),s=this.allLayerViews.toArray().filter(u=>u.clips.every(d=>Ea(this,d,e,t))).reverse(),o=new globalThis.Map(s.map(u=>[u.layer.uid,u])),a=[];let l=0,c=0;for(;l<n.results.length||c<s.length;){const u=n.results.at(l);if(u&&u.type!=="graphic"){++l;continue}const d=o.get((u?.layer??u?.graphic.layer)?.uid);if((!u||d)&&c<s.length&&s.at(c)!==d){const p=s.at(c);"fetchPopupFeaturesAtLocation"in p&&a.push({mapPoint:t,layerView:p}),++c}else u&&(a.push({graphic:u.graphic,layerView:d}),++l)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}async validate(){let e=Ad(this.type);if(F("safari")&&F("safari")<9&&(e=new M("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:F("safari")})),e!=null)throw k.getLogger(this).warn("#validate()",e.message),e}loadAsyncDependencies(){return ap()}_getDefaultViewpoint(){const{constraints:e,initialExtent:t,map:n,padding:s,size:o}=this;if(!e)return null;const a=n&&"initialViewProperties"in n?n.initialViewProperties:void 0,l=this.stateManager.getUserStartupOptions(this.size),c=a?.viewpoint,u=c?.targetGeometry?.extent??t,d=u?.center,p=c?.rotation??0,m=c?.scale||u&&zi(u,[o[0]-s.left-s.right,o[1]-s.top-s.bottom]),g=l.center??d,v=l.rotation??p,f=l.scale??m;
11return g&&f?new se({targetGeometry:g,scale:f,rotation:v}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new Xu(this.surface),n=new Ba(this.surface,{canvas:this.renderCanvas,contextOptions:new op(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),renderingOptions:this.renderingOptions,timeline:this.timeline},t);this.stage=n,this._magnifierView=new Xa,this._magnifierView.magnifier=this.magnifier,this._gridView=new er;const s=new Ja({view:this});this._set("labelManager",s);const o=new Ku({view:this});this._set("animationManager",o);const a=new Qa({view:this,animationManager:o});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),n.on("webgl-error",c=>this.fatalError=c.error),w(()=>this.stationary,c=>n.stationary=c,X),w(()=>this.background,c=>{n.backgroundColor=c?.color,this._magnifierView.backgroundColor=c?.color},X),w(()=>this.magnifier,c=>this._magnifierView.magnifier=c,X),w(()=>this.grid,c=>this._gridView.grid=c,X),w(()=>this.renderingOptions,c=>n.renderingOptions=c,X),w(()=>this.highlights.items.map(c=>({name:c.name,options:{fillColor:c.color,haloColor:c.haloColor,fillOpacity:c.fillOpacity,haloOpacity:c.haloOpacity,haloWidth:c.haloWidth,haloBlur:c.haloBlur}})),()=>{n.highlightGradient=gd(n.highlightGradient,this.highlights.items)},X),w(()=>this.state.id,()=>n.state=this.state,X),w(()=>this.animationsEnabled,c=>{this.stage.animationsEnabled=c},X)],"map-view"),this._updateStageChildren();const l=this._resolveWhenReady;this._resolveWhenReady=[],l.forEach(c=>c(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(t=>{this.stage.addChild(t.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(){const e=new Ml(sl.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new Ka({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new Ya(e)});this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:n,size:s,stage:o}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:n,size:s,stage:o}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const t of this.allLayerViews)t.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const t of this.allLayerViews)t.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}},yt.type="2d",yt);r([h({constructOnly:!0})],b.prototype,"deactivatedWebGLExtensions",void 0),r([h({constructOnly:!0})],b.prototype,"debugWebGLExtensions",void 0),r([h({readOnly:!0})],b.prototype,"featuresTilingScheme",void 0),r([h({readOnly:!0})],b.prototype,"graphicsTileStore",null),r([h()],b.prototype,"graphicsView",void 0),r([h()],b.prototype,"constraintsInfo",
11null),r([h()],b.prototype,"initialExtentRequired",null),r([h()],b.prototype,"labelManager",void 0),r([h({type:Oi,nonNullable:!0})],b.prototype,"navigation",void 0),r([h({constructOnly:!0})],b.prototype,"renderCanvas",void 0),r([h()],b.prototype,"renderingOptions",void 0),r([h({constructOnly:!0})],b.prototype,"supersampleScreenshotsEnabled",void 0),r([h()],b.prototype,"defaultsFromMapSettings",null),r([h({readOnly:!0})],b.prototype,"typeSpecificPreconditionsReady",null),r([h(pn(vt,"analyses"))],b.prototype,"analyses",void 0),r([h()],b.prototype,"analysisViewManager",void 0),r([h({type:Wr})],b.prototype,"background",null),r([h()],b.prototype,"center",null),r([h({type:S})],b.prototype,"floors",void 0),r([h()],b.prototype,"grid",void 0),r([h({type:ze})],b.prototype,"highlightOptions",null),r([h()],b.prototype,"map",void 0),r([h()],b.prototype,"padding",null),r([h({readOnly:!0})],b.prototype,"rendering",null),r([h({readOnly:!0})],b.prototype,"resolution",null),r([h()],b.prototype,"scale",null),r([h({type:Boolean,value:!1})],b.prototype,"spatialReferenceLocked",null),r([h({readOnly:!0})],b.prototype,"tileInfo",null),r([h({type:Na,readOnly:!0})],b.prototype,"timeline",void 0),r([h({readOnly:!0})],b.prototype,"type",void 0),r([h({readOnly:!0})],b.prototype,"updating",null),r([h({readOnly:!0})],b.prototype,"view2dType",void 0),r([h({readOnly:!0})],b.prototype,"visibleArea",null),r([h()],b.prototype,"zoom",null),r([h({readOnly:!0})],b.prototype,"navigating",null),r([h(),An(i=>i instanceof ja?i:Zr(Ua,i))],b.prototype,"ui",void 0),r([h()],b.prototype,"animationsEnabled",void 0),b=r([_("esri.views.View2D")],b);const rp=b;let pi=class extends rp{constructor(i){super(i),this.view2dType="map"}};r([h({readOnly:!0})],pi.prototype,"view2dType",void 0),pi=r([_("esri.views.MapView")],pi);const lp=pi,Og=Object.freeze(Object.defineProperty({__proto__:null,default:lp},Symbol.toStringTag,{value:"Module"}));export{hc as $,Im as A,_c as B,kh as C,Ca as D,fd as E,dm as F,ma as G,xg as H,gg as I,fg as J,nd as K,Na as L,Xu as M,_m as N,Qd as O,Tg as P,bg as Q,Rm as R,Mg as S,wg as T,vg as U,pd as V,Sa as W,cd as X,Wh as Y,$m as Z,Ql as _,op as a,km as a0,kg as a1,Og as a2,ye as b,Xo as c,_e as d,ri as e,Ce as f,cm as g,$g as h,Ch as i,gd as j,yd as k,_d as l,pa as m,de as n,xc as o,qo as p,pm as q,da as r,um as s,nc as t,ze as u,Kd as v,Fi as w,Rc as x,mm as y,ua as z};
12//# sourceMappingURL=MapView-B0_mDJT8.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.