<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import{d as hn,A as ln}from"./reactiveUtils-05cd30ef.js";import{A as pn,U as dn,O as le,m as X,g as fn,B as gn}from"./JSONSupport-6910839e.js";import{r as _n}from"./sql-0e35b869.js";import{g as mn}from"./timeUtils-917bfe1a.js";import{v as Ft,R,P as S,q as T,o as ht,s as $e,p as Me,c as Vt,_ as Lt,Z as Yt,H as C,j as yn,A as vn,J as Pn}from"./vec32-070cf9c9.js";import{n as Te,e as bt}from"./dehydratedPoint-68269e37.js";import{b as En}from"./Query-6faa2310.js";import{r as W}from"./tslib.es6-a71aabb0.js";import{h as $n,F as Mn,G as Tn,s as kn}from"./typedArrayUtil-57662696.js";import{n as wn,s as Et}from"./Error-d98d8644.js";import{s as pe}from"./Queue-42829b1d.js";import{a as Ln,r as An,h as In}from"./subclass-e4f6e444.js";import{r as Sn}from"./signal-2a34efd5.js";import{e as Nn,t as bn}from"./promiseUtils-9b2cd46b.js";import{r as Rn}from"./Version-70b958c4.js";import{m as xn,l as Cn}from"./mathUtils-50741647.js";import{e as A,u as Dn,q as ke,d as V,j as mt,p as lt,l as zn,B as Hn,_ as qn,o as we,b as Le,E as de}from"./vec2-18936733.js";import{n as Y,t as wt,l as On}from"./vec2f64-776da482.js";import{r as At,n as m,t as pt,N as Gn}from"./vec3f64-b400eac8.js";import{s as jn,j as Un}from"./vec42-90274508.js";import{n as Kn}from"./vec4f64-9e45c1b8.js";import{i as L,d as Fn,t as Yn}from"./geodesicConstants-74d1d3e8.js";import{P as Zn,x as Ae,O as Wn}from"./unitUtils-bfd4c243.js";import"./Extent-1a6f9007.js";import{P as Jn,j as Bn}from"./Polyline-b94583f6.js";import{g as Ie}from"./SpatialReference-c8865848.js";import{M as O,z as Qn,l as Rt,Q as Zt,g as Se,i as Ne,V as Vn,H as be,O as Re,p as Xn}from"./plane-2f25debf.js";import{I as ts,O as es,_ as ns,$ as ss,U as is}from"./sphere-c539685b.js";import{m as rs,j as Xt,x as os,E as as}from"./elevationInfoUtils-fd23bb10.js";import{e as $t}from"./common-9b3106b5.js";var dt;function xe(e,t,n){return D(e,t,n)}function D(e=0,t=0,n=0){return At(e,t,n)}function Yi(e){return e}function Zi(e){return e}function at(e,t,n){return At(e,t,n)}function gt(e){const[t,n,s]=e;return e.length&gt;3?[t,n,s,e[3]]:[t,n,s]}function Wi(e){return e[3]=((e.length&gt;3?e[3]:void 0)??dt.NONE)|dt.TARGET,e}function Ji(e){return Boolean(((e.length&gt;3?e[3]:void 0)??dt.NONE)&amp;dt.TARGET)}function fe(e,t,{coordinateHelper:n,elevationInfo:s},i){return e?cs(n.vectorToDehydratedPoint(e,us),t,s,i):null}function cs(e,t,n,s=D()){return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,t==null||(t.type==="2d"?s[2]=0:s[2]=rs(t,e,n,Xt)??0),s}function Bi(e,t,n){return n?(Te(n,e[0],e[1],e[2],t),n):bt(e[0],e[1],e[2],t)}function Qi(e,t,{z:n,m:s},i,r){const{spatialReference:o,elevationInfo:a}=i;let c;n==null&amp;&amp;s==null?c=void 0:t==null||t.type==="2d"?c=n??void 0:c=os(t,e,o,Xt,a)??0;const[u,l]=e;return r?Te(r,u,l,c,o):r=bt(u,l,c,o),s!=null&amp;&amp;(r.m=s,r.hasM=!0),r}function Vi(e,t,n,s,i=D()){const[r,o]=e;return i[0]=r,i[1]=o,e.length&gt;3&amp;&amp;(i[3]=e[3]??dt.NONE),(n==null?void 0:n.type)!=="3d"?(i[2]=t.value,i):(i[2]=as(n,r,o,t.value,s,t.elevationInfo,Xt)??0,i)}(function(e){e[e.NONE=0]="NONE",e[e.TARGET=1]="TARGET"})(dt||(dt={}));const us=bt(0,0,0,null);var Wt;(function(e){e[e.FEATURE=1]="FEATURE",e[e.SELF=2]="SELF",e[e.ALL=3]="ALL"})(Wt||(Wt={}));const Ce=$n("mac")?"Meta":"Control",hs=new Set(["Alt","Control","Meta","Shift","Ctrl","Primary"]),ls=e=&gt;hs.has(e);class ps{constructor(t,n=[]){this.eventType=t,this.keyModifiers=n}matches(t){if(t.type!==this.eventType)return!1;if(this.keyModifiers.length===0)return!0;const n=t.modifiers;for(const s of this.keyModifiers)if(!n.has(s))return!1;return!0}}let De=class{constructor(t){this._manager=null,this._incoming={},this._outgoing={},this._incomingEventMatches=null,this._incomingEventTypes=null,this._outgoingEventTypes=null,this._hasSideEffects=t}get incomingEventMatches(){if(!this._incomingEventMatches){this._incomingEventMatches=[];for(const t in this._incoming){const n=this._incoming[t];for(const s of n)this._incomingEventMatches.push(s.match)}}return this._incomingEventMatches}get incomingEventTypes(){return this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map(t=&gt;t.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(t){this._manager||(t.setEventCallback(n=&gt;this._handleEvent(n)),t.setUninstallCallback(()=&gt;this._onUninstall()),this._manager=t)}onUninstall(){}registerIncoming(t,n,s){let i;typeof n=="function"?(s=n,i=[]):i=n||[];const r=typeof t=="string"?new ps(t,i):t,o=()=&gt;{this._incomingEventTypes=null,this._incomingEventMatches=null},a=l=&gt;{const h=this._incoming[l.match.eventType];if(h){const d=h.indexOf(l);h.splice(d,1),o(),this._manager&amp;&amp;this._manager.updateDependencies()}},c=new ds(r,s,{onPause:a,onRemove:a,onResume:l=&gt;{const h=this._incoming[l.match.eventType];h&amp;&amp;!h.includes(l)&amp;&amp;(h.push(l),o(),this._manager&amp;&amp;this._manager.updateDependencies())}});let u=this._incoming[r.eventType];return u||(u=[],this._incoming[r.eventType]=u),u.push(c),o(),this._manager&amp;&amp;this._manager.updateDependencies(),c}registerOutgoing(t){if(this._outgoing[t])throw new Error("There is already a callback registered for this outgoing InputEvent: "+t);const n=new fs(t,{onEmit:(s,i,r,o)=&gt;{var a;(a=this._manager)==null||a.emit(s.eventType,i,r,o)},onRemove:s=&gt;{var i;delete this._outgoing[s.eventType],(i=this._manager)==null||i.updateDependencies()}});return this._outgoing[t]=n,this._outgoingEventTypes=null,this._manager&amp;&amp;this._manager.updateDependencies(),n}startCapturingPointer(t){var n;(n=this._manager)==null||n.setPointerCapture(t,!0)}stopCapturingPointer(t){var n;(n=this._manager)==null||n.setPointerCapture(t,!1)}refreshHasPendingInputs(){var t;(t=this._manager)==null||t.refreshHasPendingInputs()}_onUninstall(){this._manager&amp;&amp;(this.onUninstall(),this._manager=null)}_handleEvent(t){var s;const n=this._incoming[t.type];if(n){for(const i of n)if(i.match.matches(t)&amp;&amp;((s=i.callback)==null||s.call(i,t),t.shouldStopPropagation()))break}}},ds=class{constructor(t,n,s){this.match=t,this._callback=n,this._handler=s}pause(){this._handler.onPause(this)}resume(){this._handler.onResume(this)}remove(){this._handler.onRemove(this)}get callback(){return this._callback}},fs=class{constructor(t,n){this.eventType=t,this._removed=!1,this._handler=n}emit(t,n,s){this._removed||this._handler.onEmit(this,t,n,s)}remove(){this._removed=!0,this._handler.onRemove(this)}},gs=class extends De{constructor(t){super(!0),this._onChange=t,this._value="mouse",this._x=null,this._y=null,this.registerIncoming("pointer-move",n=&gt;this._update(n.data))}_update(t){const n=t.native.pointerType==="touch"?"touch":"mouse",{x:s,y:i}=t;n===this._value&amp;&amp;this._x===s&amp;&amp;this._y===i||(this._value=n,this._x=s,this._y=i,this._onChange(n,s,i))}};class _s extends De{get multiTouchActive(){return this._multiTouchActive.value}constructor(){super(!0),this._activeTouchPointerIds=new Set,this._multiTouchActive=Sn(!1),this._onPointerAdd=({data:t})=&gt;{t.pointerType==="touch"&amp;&amp;(this._activeTouchPointerIds.add(t.native.pointerId),this._update())},this._onPointerRemove=({data:t})=&gt;{t.pointerType==="touch"&amp;&amp;(this._activeTouchPointerIds.delete(t.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)}_update(){this._multiTouchActive.value=this._activeTouchPointerIds.size&gt;1}}class ms{constructor(t,n){this._owner=n,this._properties={},this._afterDispatchHandle=null;for(const s in t){const i=t[s],r=new pn(i,void 0,void 0,2,2);this._properties[s]={pool:r,acquired:[]}}this._afterDispatchHandle=dn(()=&gt;this._release())}destroy(){this._afterDispatchHandle&amp;&amp;(this._afterDispatchHandle.remove(),this._afterDispatchHandle=null);for(const t in this._properties){const n=this._properties[t];for(const s of n.acquired)le(s)||n.pool.release(s);n.pool.destroy(),n.pool=null,n.acquired=null}this._properties=null,this._owner=null}get(t){const n=this._owner._get(t),s=this._properties[t];let i=s.pool.acquire();for(s.acquired.push(i);i===n;)s.acquired.push(i),i=s.pool.acquire();return i}_release(){for(const t in this._properties){const n=this._properties[t];let s=0;for(const i of n.acquired)le(i)?n.acquired[s++]=i:n.pool.release(i);n.acquired.length=s}}}let U=class extends fn{constructor(t){super(t),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=Ce,this._latestPointerType="mouse",this._propertiesPool=new ms({latestPointerLocation:Ps},this),this.latestPointerLocation=null,this._paused=!1,this.test={timestamp:void 0,hasCurrentPropagation:()=&gt;!!this._currentPropagation}}initialize(){this.eventSource.onEventReceived=this._onEventReceived.bind(this),this._installRecognizers()}destroy(){const t=Object.keys(this._nameToGroup);for(const n of t)this.uninstallHandlers(n);this.eventSource.destroy(),this._currentPropagation=null,this._propertiesPool.destroy()}get hasPendingInputs(){return this._handlers.some(t=&gt;t.handler.hasPendingInputs)}get latestPointerType(){return this._latestPointerType}get multiTouchActive(){return this._multiTouchHandler.multiTouchActive}get updating(){return this.hasPendingInputs||this._paused}installHandlers(t,n,s=Pt.INTERNAL){if(this._nameToGroup[t]||n.length===0)return;const i={name:t,handlers:n.map(r=&gt;({handler:r,active:!0,removed:!1,priorityIndex:0,groupPriority:s,eventCallback:null,uninstallCallback:null}))};this._nameToGroup[t]=i;for(let r=i.handlers.length-1;r&gt;=0;r--){const o=i.handlers[r];this._handlers.push(o),o.handler.onInstall({updateDependencies:()=&gt;{this.updateDependencies()},emit:(a,c,u,l,h)=&gt;{this._emitInputEvent(o.priorityIndex+1,a,c,u,h,l)},setPointerCapture:(a,c)=&gt;{this._setPointerCapture(i,o,a,c)},setEventCallback:a=&gt;{o.eventCallback=a},setUninstallCallback:a=&gt;{o.uninstallCallback=a},refreshHasPendingInputs:()=&gt;{this.notifyChange("hasPendingInputs")}})}this.updateDependencies()}uninstallHandlers(t){const n=this._nameToGroup[t];n?(n.handlers.forEach(s=&gt;{var i;s.removed=!0,(i=s.uninstallCallback)==null||i.call(s)}),delete this._nameToGroup[t],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):wn.getLogger(this).error("There is no InputHandler group registered under the name `"+t+"`")}hasHandlers(t){return this._nameToGroup[t]!==void 0}isModifierKeyDown(t){return this._activeKeyModifiers.has(t)}updateDependencies(){if(this._currentPropagation)return void(this._updateDependenciesAfterPropagation=!0);this._updateDependenciesAfterPropagation=!1;const t=new Set,n=new Set;this._handlersPriority=[];for(let s=this._handlers.length-1;s&gt;=0;s--){const i=this._handlers[s];i.priorityIndex=s,this._handlersPriority.push(i)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(let s=this._handlersPriority.length-1;s&gt;=0;s--){const i=this._handlersPriority[s];i.priorityIndex=s;let r=i.handler.hasSideEffects;if(!r){for(const o of i.handler.outgoingEventTypes)if(t.has(o)){r=!0;break}}if(r)for(const o of i.handler.incomingEventMatches){t.add(o.eventType);for(const a of o.keyModifiers)ls(a)||n.add(a)}i.active=r}this._sourceEvents=t,this._keyModifiers=n,this._pointerCaptures.size&gt;0&amp;&amp;this._sourceEvents.add("pointer-capture-lost"),this._keyModifiers.size&gt;0&amp;&amp;(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up")),this.eventSource&amp;&amp;(this.eventSource.activeEvents=this._sourceEvents)}_setLatestPointer(t,n,s){this._latestPointerType=t;const i=this._get("latestPointerLocation");if(i==null||i.x!==n||i.y!==s){const r=this._propertiesPool.get("latestPointerLocation");r.x=n,r.y=s,this._set("latestPointerLocation",r)}}_onEventReceived(t,n){if(t==="pointer-capture-lost"){const r=n;this._pointerCaptures.delete(r.native.pointerId)}this._updateKeyModifiers(t,n);const s=this.test.timestamp!=null?this.test.timestamp:n.native?n.native.timestamp:void 0,i=n.native?n.native.cancelable:void 0;this._emitInputEventFromSource(t,n,s,i)}_updateKeyModifiers(t,n){if(!n)return;let s=!1;const i=()=&gt;{s||(this._activeKeyModifiers=new Set(this._activeKeyModifiers),s=!0)},r=(a,c)=&gt;{c&amp;&amp;!this._activeKeyModifiers.has(a)?(i(),this._activeKeyModifiers.add(a)):!c&amp;&amp;this._activeKeyModifiers.has(a)&amp;&amp;(i(),this._activeKeyModifiers.delete(a))};if(t==="key-down"||t==="key-up"){const a=n.key;this._keyModifiers.has(a)&amp;&amp;r(a,t==="key-down")}const o=n.native;r("Alt",!!(o!=null&amp;&amp;o.altKey)),r("Control",!!(o!=null&amp;&amp;o.ctrlKey)),r("Ctrl",!!(o!=null&amp;&amp;o.ctrlKey)),r("Shift",!!(o!=null&amp;&amp;o.shiftKey)),r("Meta",!!(o!=null&amp;&amp;o.metaKey)),r("Primary",this._activeKeyModifiers.has(this.primaryKey))}_installRecognizers(){this._latestPointerHandler=new gs((t,n,s)=&gt;this._setLatestPointer(t,n,s)),this._multiTouchHandler=new _s,this.installHandlers("input-manager-logic",[this._latestPointerHandler,this._multiTouchHandler],Pt.ALWAYS),this.recognizers.length&gt;0&amp;&amp;this.installHandlers("default",this.recognizers,Pt.INTERNAL)}_setPointerCapture(t,n,s,i){const r=t.name+"-"+n.priorityIndex,o=this._pointerCaptures.get(s.pointerId)||new Set;this._pointerCaptures.set(s.pointerId,o),i?(o.add(r),o.size===1&amp;&amp;this.eventSource&amp;&amp;this.eventSource.setPointerCapture(s,!0)):o.has(r)&amp;&amp;(o.delete(r),o.size===0&amp;&amp;(this._pointerCaptures.delete(s.pointerId),this.eventSource&amp;&amp;this.eventSource.setPointerCapture(s,!1)))}_garbageCollectRemovedHandlers(){this._handlers=this._handlers.filter(t=&gt;!t.removed),this.updateDependencies()}_emitInputEventFromSource(t,n,s,i){this._emitInputEvent(0,t,n,s,i)}_emitInputEvent(t,n,s,i,r,o){const a=i!==void 0?i:this._currentPropagation?this._currentPropagation.timestamp:performance.now(),c=r!==void 0&amp;&amp;r,u={event:new ys(n,s,a,o||this._activeKeyModifiers,c),priorityIndex:t};this._currentPropagation?this._currentPropagation.events.push(u):this._doNewPropagation(u)}_doNewPropagation(t){this._currentPropagation={events:new pe,currentHandler:null,needsHandlerGarbageCollect:!1,timestamp:t.event.timestamp},this._currentPropagation.events.push(t),this._continuePropagation()}_continuePropagation(){var n,s,i;this._paused=!1;const t=this._currentPropagation;if(t){for(;t.events.length&gt;0;){const{event:r,priorityIndex:o}=t.events.pop(),a=(n=r.data)==null?void 0:n.eventId;if(!(a!=null&amp;&amp;this._stoppedPropagationEventIds.has(a)))for(t.currentHandler=this._handlersPriority[o];t.currentHandler;){if(t.currentHandler.removed)t.needsHandlerGarbageCollect=!0;else{if(t.currentHandler.active&amp;&amp;!r.shouldStopPropagation()&amp;&amp;((i=(s=t.currentHandler).eventCallback)==null||i.call(s,r)),r.shouldStopPropagation()){a!=null&amp;&amp;this._stoppedPropagationEventIds.add(a);break}if(r.shouldPausePropagation(()=&gt;this._continuePropagation()))return void this._pausePropagation({event:r,priorityIndex:t.currentHandler.priorityIndex+1})}t.currentHandler=this._handlersPriority[t.currentHandler.priorityIndex+1]}}t.needsHandlerGarbageCollect&amp;&amp;this._garbageCollectRemovedHandlers(),this.hasPendingInputs||this._stoppedPropagationEventIds.clear(),this._currentPropagation=null,this._updateDependenciesAfterPropagation&amp;&amp;this.updateDependencies()}}_pausePropagation(t){const n=new pe;n.push(t);const s=this._currentPropagation;if(s){for(;s.events.length;)n.push(s.events.pop());s.events=n,s.currentHandler=null,this._paused=!0}}_compareHandlerPriority(t,n){if(t.handler.hasSideEffects!==n.handler.hasSideEffects)return t.handler.hasSideEffects?1:-1;if(t.groupPriority!==n.groupPriority)return t.groupPriority&gt;n.groupPriority?-1:1;for(const s of t.handler.incomingEventMatches)for(const i of n.handler.incomingEventMatches){if(s.eventType!==i.eventType)continue;const r=s.keyModifiers.filter(o=&gt;i.keyModifiers.includes(o));if(r.length===s.keyModifiers.length!=(r.length===i.keyModifiers.length))return s.keyModifiers.length&gt;i.keyModifiers.length?-1:1}return t.priorityIndex&gt;n.priorityIndex?-1:1}_sortHandlersPriority(t){const n=[];for(const s of t){let i=0;for(;i&lt;n.length&amp;&amp;this._compareHandlerPriority(s,n[i])&gt;=0;)i++;n.splice(i,0,s)}return n}get debug(){const t=n=&gt;{const s=this._setPointerCapture;this._setPointerCapture=()=&gt;{},n(),this._setPointerCapture=s};return{injectEvent:(n,s)=&gt;{t(()=&gt;this._onEventReceived(n,s))},disablePointerCapture:t}}};W([X({readOnly:!0})],U.prototype,"hasPendingInputs",null),W([X({constructOnly:!0})],U.prototype,"eventSource",void 0),W([X({constructOnly:!0})],U.prototype,"recognizers",void 0),W([X()],U.prototype,"_latestPointerType",void 0),W([X()],U.prototype,"latestPointerType",null),W([X()],U.prototype,"multiTouchActive",null),W([X({readOnly:!0})],U.prototype,"latestPointerLocation",void 0),W([X()],U.prototype,"_paused",void 0),W([X({readOnly:!0})],U.prototype,"updating",null),U=W([Ln("esri.views.input.InputManager")],U);let ys=class{constructor(t,n,s,i,r){this.type=t,this.data=n,this.timestamp=s,this.modifiers=i,this.cancelable=r,this._propagationState=rt.NONE,this._resumeCallback=null}stopPropagation(){this._propagationState|=rt.STOPPED}shouldStopPropagation(){return!!(this._propagationState&amp;rt.STOPPED)}async(t){this._propagationState|=rt.PAUSED;const n=(s,i)=&gt;{this._propagationState&amp;=~rt.PAUSED;const r=this._resumeCallback;if(this._resumeCallback=null,r&amp;&amp;r(),i)throw s;return s};return(typeof t=="function"?t():t).then(s=&gt;n(s,!1),s=&gt;n(s,!0))}shouldPausePropagation(t){return!!(this._propagationState&amp;rt.PAUSED)&amp;&amp;(this._resumeCallback=t,!0)}preventDefault(){this.data.native.preventDefault()}};var rt;(function(e){e[e.NONE=0]="NONE",e[e.STOPPED=1]="STOPPED",e[e.PAUSED=2]="PAUSED"})(rt||(rt={}));const Pt={ALWAYS:1,DEFAULT:0,TOOL:-1,WIDGET:-2,INTERNAL:-3};let vs=class{};const Ps=vs,ze="z",He="r",or={redo:He,undo:ze,center:"Alt",constraint:"Shift",cancel:"Escape",delete:["Backspace","Delete"],complete:"Enter",vertexAdd:"f",pan:" "},ge={toggle:"Control"},ar={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},cr={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:Ce,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},editSourcePoints:{key:"Alt",continuePropagation:!0},undo:ze,redo:He};let ur=class{constructor(){this._bindings=new Map}add(t,n){return this.addToggle(t,s=&gt;{s.type==="key-down"&amp;&amp;n(s)})}addToggle(t,n){const s=Jt.fromDefinition(t,n),i=An(this._bindings,s.key,()=&gt;[]);return i.push(s),Nn(()=&gt;Mn(i,s))}register(t,n=Pt.WIDGET){return bn([t.on("key-down",s=&gt;this.dispatch(t.inputManager,s),n),t.on("key-up",s=&gt;this.dispatch(t.inputManager,s),n)])}dispatch(t,n){const s=n.key,i=this._bindings.get(s);if(i)for(const r of i)r.process(t,n)}},Jt=class{constructor(t,n,s,i,r){this.key=t,this.modifiers=n,this.repeats=s,this.continuePropagation=i,this.callback=r}process(t,n){if(!(n.key!==this.key||"repeat"in n&amp;&amp;n.repeat&amp;&amp;!this.repeats)){for(const s of this.modifiers)if(!t.isModifierKeyDown(s))return;this.continuePropagation||n.stopPropagation(),this.callback(n)}}static fromDefinition(t,n){if(typeof t=="string")return new Jt(t,[],!1,!1,n);const{key:s,modifier:i,repeats:r,continuePropagation:o}=t;return new Jt(s,i?Array.isArray(i)?i:[i]:[],!!r,!!o,n)}};class Es extends Rn{constructor(t,n){super(t,n,"webmap")}}function $s(e){return e!=null&amp;&amp;typeof e=="object"&amp;&amp;"declaredClass"in e&amp;&amp;e.declaredClass==="esri.WebMap"}const pr=new Es(2,33),dr=Symbol("grid-placement-graphic");function Ms(e,t){const n=e.x-t.x,s=e.y-t.y;return n*n+s*s}function fr(e,t){return Math.sqrt(Ms(e,t))}function gr(e,t){t.sort((n,s)=&gt;Ft(n.targetPoint,e)-Ft(s.targetPoint,e))}var _e;function _r({point:e,distance:t,returnEdge:n,vertexMode:s,coordinateHelper:{spatialReference:i},filter:r},o,a){return a=a!=null?a.clone():new En({where:"1=1"}),r&amp;&amp;(a.geometry=r.geometry,a.distance=r.distance,a.spatialRelationship=r.spatialRelationship,a.where=_n(a.where,r.where),a.timeExtent=mn(a.timeExtent,r.timeExtent),a.objectIds=Ts(a.objectIds,r.objectIds)),{point:bt(e[0],e[1],e[2],i.toJSON()),mode:o,distance:t,returnEdge:n,vertexMode:s,query:a.toJSON()}}function Ts(e,t){return e||t?t?e?Array.from(gn(new Set(e),new Set(t))):t:e:null}function mr(e,t,n){return{left:fe(e.leftVertex.pos,t,n),right:fe(e.rightVertex.pos,t,n)}}(function(e){e[e.TARGET=0]="TARGET",e[e.REFERENCE=1]="REFERENCE",e[e.REFERENCE_EXTENSION=2]="REFERENCE_EXTENSION"})(_e||(_e={}));const me=Symbol("snapping-toggle");function yr(e,t=()=&gt;{}){const n=hn(()=&gt;({view:e.view,snappingOptions:e.snappingOptions}),({view:s,snappingOptions:i})=&gt;{if(e.removeHandles(me),!s||!i)return;const r=Pt.TOOL,o=[s.on("key-down",a=&gt;{a.key!==ge.toggle||a.repeat||(i.enabledToggled=!0,t())},r),s.on("key-up",a=&gt;{a.key===ge.toggle&amp;&amp;(i.enabledToggled=!1,t())},r),s.on("pointer-move",a=&gt;{const c=a.native.ctrlKey;i.enabledToggled!==c&amp;&amp;(i.enabledToggled=c,t())},r)];e.addHandles(o,me)},ln);e.addHandles(n)}function vr(e){var t;return $s(e)&amp;&amp;"utilityNetworks"in e&amp;&amp;!!((t=e.utilityNetworks)!=null&amp;&amp;t.length)}function qe(e){if(!e)return null;const t=e.wkid;if(t)return Fn[t];const n=e.wkt2??e.wkt;return n?ks(n):null}function ks(e){const t=Yn.exec(e);if(!t||t.length!==2)return null;const n=t[1].split(",");if(!n||n.length&lt;3)return null;const s=parseFloat(n[1]),i=parseFloat(n[2]);return isNaN(s)||isNaN(i)?null:{a:s,f:i===0?0:1/i}}function xt(e){const t=qe(e);if(ws(t))return t;const n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-(n/t.a)**2,radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function ws(e){return e!=null&amp;&amp;"b"in e&amp;&amp;"eSq"in e&amp;&amp;"radius"in e}function kt(e,t,n){const{a:s,eSq:i}=xt(n),r=Math.sqrt(i),o=Math.sin(t[1]*L),a=s*t[0]*L;let c;return i&gt;0?c=s*((1-i)*(o/(1-i*(o*o))-1/(2*r)*Math.log((1-r*o)/(1+r*o))))*.5:c=s*o,e[0]=a,e[1]=c,e}function Ct(e){return Zn(e)&amp;&amp;!!qe(e)}function Pr(e,t="square-meters"){if(e.some(o=&gt;!Ct(o.spatialReference)))throw new Et("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const n=[];for(let o=0;o&lt;e.length;o++){const a=e[o],c=a.spatialReference,{radius:u,densificationRatio:l}=xt(c),h=u*l;n.push(Ls(a,h))}const s=[],i=[0,0],r=[0,0];for(let o=0;o&lt;n.length;o++){const{rings:a,spatialReference:c}=n[o];let u=0;for(let l=0;l&lt;a.length;l++){const h=a[l];kt(i,h[0],c),kt(r,h[h.length-1],c);let d=r[0]*i[1]-i[0]*r[1];for(let p=0;p&lt;h.length-1;p++)kt(i,h[p+1],c),kt(r,h[p],c),d+=r[0]*i[1]-i[0]*r[1];u+=d}u=Ae(u,"square-meters",t),s.push(u/-2)}return s}function Er(e,t="meters"){if(!e)throw new Et("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(e.some(s=&gt;!Ct(s.spatialReference)))throw new Et("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");const n=[];for(let s=0;s&lt;e.length;s++){const i=e[s],{spatialReference:r}=i,o=i.type==="polyline"?i.paths:i.rings;let a=0;for(let c=0;c&lt;o.length;c++){const u=o[c];let l=0;for(let h=1;h&lt;u.length;h++){const d=u[h-1][0],p=u[h][0],f=u[h-1][1],g=u[h][1];if(f!==g||d!==p){const _=new Dt;zt(_,[d,f],[p,g],r),l+=_.distance}}a+=l}a=Ae(a,"meters",t),n.push(a)}return n}function Ls(e,t){if(e.type!=="polyline"&amp;&amp;e.type!=="polygon")throw new Et("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const{spatialReference:n}=e;if(!Ct(n))throw new Et("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");const s=e.type==="polyline"?e.paths:e.rings,i=[],r=[0,0],o=new Dt;for(const c of s){const u=[];i.push(u),u.push([c[0][0],c[0][1]]);let l,h,d=c[0][0],p=c[0][1];for(let f=0;f&lt;c.length-1;f++){if(l=c[f+1][0],h=c[f+1][1],d===l&amp;&amp;p===h)continue;const g=[d,p];zt(o,[d,p],[l,h],n);const{azimuth:_,distance:E}=o,$=E/t;if($&gt;1){for(let k=1;k&lt;=$-1;k++)ft(r,g,_,k*t,n),u.push(r.slice());ft(r,g,_,(E+Math.floor($-1)*t)/2,n),u.push(r.slice())}ft(r,g,_,E,n),u.push(r.slice()),d=r[0],p=r[1]}}const a=In(Ie,n);return e.type==="polyline"?new Jn({paths:i,spatialReference:a}):new Bn({rings:i,spatialReference:a})}let Dt=class{constructor(t=0,n=void 0,s=void 0){this.distance=t,this.azimuth=n,this.reverseAzimuth=s}};function ft(e,t,n,s,i){const r=t[0],o=t[1],a=r*L,c=o*L,u=(n??0)*L,{a:l,b:h,f:d}=xt(i),p=Math.sin(u),f=Math.cos(u),g=(1-d)*Math.tan(c),_=1/Math.sqrt(1+g*g),E=g*_,$=Math.atan2(g,f),k=_*p,N=k*k,M=1-N,v=M*(l*l-h*h)/(h*h),b=1+v/16384*(4096+v*(v*(320-175*v)-768)),z=v/1024*(256+v*(v*(74-47*v)-128));let I,j,w,H=s/(h*b),yt=2*Math.PI;for(;Math.abs(H-yt)&gt;1e-12;)w=Math.cos(2*$+H),I=Math.sin(H),j=Math.cos(H),yt=H,H=s/(h*b)+z*I*(w+z/4*(j*(2*w*w-1)-z/6*w*(4*I*I-3)*(4*w*w-3)));const q=E*I-_*j*f,Z=Math.atan2(E*j+_*I*f,(1-d)*Math.sqrt(N+q*q)),ct=d/16*M*(4+d*(4-3*M)),Gt=Math.atan2(I*p,_*j-E*I*f)-(1-ct)*d*k*(H+ct*I*(w+ct*j*(2*w*w-1)));return e[0]=(a+Gt)/L,e[1]=Z/L,e}function zt(e,t,n,s){const i=t[0]*L,r=t[1]*L,o=n[0]*L,a=n[1]*L,{a:c,b:u,f:l,radius:h}=xt(s),d=o-i,p=Math.atan((1-l)*Math.tan(r)),f=Math.atan((1-l)*Math.tan(a)),g=Math.sin(p),_=Math.cos(p),E=Math.sin(f),$=Math.cos(f);let k,N,M,v,b,z,I,j,w,H,yt=1e3,q=d;do{if(I=Math.sin(q),j=Math.cos(q),M=Math.sqrt($*I*($*I)+(_*E-g*$*j)*(_*E-g*$*j)),M===0)return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;b=g*E+_*$*j,z=Math.atan2(M,b),w=_*$*I/M,N=1-w*w,v=b-2*g*E/N,isNaN(v)&amp;&amp;(v=0),H=l/16*N*(4+l*(4-3*N)),k=q,q=d+(1-H)*l*w*(z+H*M*(v+H*b*(2*v*v-1)))}while(Math.abs(q-k)&gt;1e-12&amp;&amp;--yt&gt;0);if(yt===0){const rn=h,on=Math.acos(Math.sin(r)*Math.sin(a)+Math.cos(r)*Math.cos(a)*Math.cos(o-i))*rn,he=o-i,an=Math.sin(he)*Math.cos(a),cn=Math.cos(r)*Math.sin(a)-Math.sin(r)*Math.cos(a)*Math.cos(he),un=Math.atan2(an,cn);return e.azimuth=un/L,e.distance=on,e.reverseAzimuth=void 0,e}const Z=N*(c*c-u*u)/(u*u),ct=Z/1024*(256+Z*(Z*(74-47*Z)-128)),Gt=u*(1+Z/16384*(4096+Z*(Z*(320-175*Z)-768)))*(z-ct*M*(v+ct/4*(b*(2*v*v-1)-ct/6*v*(4*M*M-3)*(4*v*v-3)))),nn=Math.atan2($*Math.sin(q),_*E-g*$*Math.cos(q)),sn=Math.atan2(_*Math.sin(q),_*E*Math.cos(q)-g*$);return e.azimuth=nn/L,e.distance=Gt,e.reverseAzimuth=sn/L,e}function Mr(e){return Ct(e)?e:Wn(e)?Ie.WGS84:null}function jt(e,t){return e[0]*t[1]-e[1]*t[0]}function As(e,t,n){const s=mt(n,t)/lt(n);return zn(e,n,s)}function Tr(e,t,n,s,i=n){return A(ut,s,n),A(It,t,i),As(_t,It,ut),Dn(e,i,_t)}function kr(e,t,n,s){A(ut,t,n);const i=s/ke(ut);return V(e,n,ut,i)}function wr(e,t){const n=e.start,s=e.end,i=t.start,r=t.end,o=A(ut,s,n),a=A(Oe,r,i),c=jt(o,a);if(Math.abs(c)&lt;=Ss)return[];const u=A(It,n,i),l=jt(a,u)/c,h=jt(o,u)/c;if(l&gt;=0){if(h&gt;=0||t.type===P.LINE)return[V(_t,n,o,l)]}else if(e.type===P.LINE&amp;&amp;(h&gt;=0||t.type===P.LINE))return[V(_t,n,o,l)];return[]}function Is(e,t,n){const s=[],i=A(ut,e.end,e.start),r=A(Oe,e.start,t),o=lt(i),a=2*mt(i,r),c=a*a-4*o*(lt(r)-n*n);if(c===0){const u=-a/(2*o);(e.type===P.LINE||u&gt;=0)&amp;&amp;s.push(V(_t,e.start,i,u))}else if(c&gt;0){const u=Math.sqrt(c),l=(-a+u)/(2*o);(e.type===P.LINE||l&gt;=0)&amp;&amp;s.push(V(_t,e.start,i,l));const h=(-a-u)/(2*o);(e.type===P.LINE||h&gt;=0)&amp;&amp;s.push(V(It,e.start,i,h))}return s}var P;(function(e){e[e.RAY=0]="RAY",e[e.LINE=1]="LINE"})(P||(P={}));const Ss=1e-6,ut=Y(),Oe=Y(),It=Y(),_t=Y();function te({start:e,end:t,type:n},s,i){const r=[],o=A(Mt,t,e),a=A(Ht,e,s),c=lt(o),u=2*mt(o,a),l=u*u-4*c*(lt(a)-i*i);if(l===0){const h=-u/(2*c);(n===x.PLANE||h&gt;=0)&amp;&amp;r.push(V(Y(),e,o,h))}else if(l&gt;0){const h=Math.sqrt(l),d=(-u+h)/(2*c);(n===x.PLANE||d&gt;=0)&amp;&amp;r.push(V(Y(),e,o,d));const p=(-u-h)/(2*c);(n===x.PLANE||p&gt;=0)&amp;&amp;r.push(V(Y(),e,o,p))}return r}function Ge(e,t){const n=e.start,s=e.end,i=A(Mt,s,n),r=ht(Ot,-i[1],i[0],0),o=t.start,a=t.end,c=R(ne,a,o),u=S(c,r),l=ht(Je,n[0],n[1],0),h=R(Be,l,o),d=S(h,r),p=$t();if(Math.abs(u)&lt;p)return[];const f=T(Qe,o,c,d/u);if(t.type===P.RAY){const g=R(Bt,f,o);if(S(g,c)&lt;-p)return[]}if(e.type===x.HALF_PLANE){const g=Hn(Ht,f,n);if(mt(g,i)&lt;-p)return[]}return[pt(f)]}function Ns(e,t){return Rs(St(se,t[2],e),t)}function je(e,t){return Ze(St(se,0,e),St(zs,0,t)).map(([s,i])=&gt;wt(s,i))}function Ue(e,t,n){return Fe(e,St(se,e[2],t),n)}function Ke(e,t,n,s=m()){const i=A(Mt,e,t),r=ke(i);return V(s,t,i,r===0?1:n/r),s[2]=e[2],s}function Fe(e,{start:t,end:n,type:s},i=m()){const r=R(qt,e,t),o=R(Ot,n,t),a=S(r,o)/S(o,o);return T(i,t,o,s===P.RAY?Math.max(a,0):a)}const bs=(()=&gt;{const e=m(),t=m(),n=m();return({start:s,end:i},{center:r,radius:o,normal:a,slicePlane:c})=&gt;{const u=Rt(r,a,Ds);if(y(Zt(u,s),0)&amp;&amp;y(Zt(u,i),0)){Se(a,e,t);const h=(f,g)=&gt;(Vt(n,g,r),we(f,S(n,e),S(n,t)),f),d=Is({start:h(Mt,s),end:h(Ht,i),type:P.LINE},On,o),p=[];for(const[f,g]of d){const _=$e(m(),r);T(_,_,e,f),T(_,_,t,g),c&amp;&amp;!ot(c,_)||p.push(_)}return p}const l=m();return Ne(u,s,i,l)?!y(Me(l,r),o)||c&amp;&amp;!ot(c,l)?[]:[l]:[]}})();function Ye({start:e,end:t,type:n},s,i){const r=[],o=Vt(qt,t,e),a=A(Ht,e,s),c=lt(o),u=2*mt(o,a),l=u*u-4*c*(lt(a)-i*i);if(l===0){const h=-u/(2*c);(n===P.LINE||h&gt;=0)&amp;&amp;r.push(T(m(),e,o,h))}else if(l&gt;0){const h=Math.sqrt(l),d=(-u+h)/(2*c);(n===P.LINE||d&gt;=0)&amp;&amp;r.push(T(m(),e,o,d));const p=(-u-h)/(2*c);(n===P.LINE||p&gt;=0)&amp;&amp;r.push(T(m(),e,o,p))}return r}function Ze(e,t){const n=e.start,s=e.end,i=t.start,r=t.end,o=R(qt,s,n),a=R(Ot,r,i),c=R(ne,i,n),u=Lt(Je,o,a);if(!y(S(c,u),0))return[];const l=Yt(u);if(y(l,0))return[];const h=Lt(Be,c,a),d=S(h,u)/l,p=T(Qe,n,o,d);if(e.type===P.RAY){const f=R(Bt,p,n);if(S(o,f)&lt;-$t())return[]}if(t.type===P.RAY){const f=R(Bt,p,i);if(S(a,f)&lt;-$t())return[]}return[pt(p)]}function Rs({start:e,end:t,type:n},s){const i=R(qt,s,e),r=R(Ot,t,e),o=Lt(ne,r,i),a=Yt(o)/Yt(r),c=$t();if(a&lt;c)switch(n){case P.LINE:return[pt(s)];case P.RAY:return S(r,i)&lt;-c?[]:[pt(s)]}return[]}function ee(e,t,n,s){const[i,r]=e,[o,a]=n,c=o-i,u=a-r,l=c*c+u*u,h=Math.sqrt(l);if(h&gt;t+s)return[];if(h&lt;Math.abs(t-s))return[];if(y(h,0)&amp;&amp;y(t,s))return[];const d=(t*t-s*s+l)/(2*h),p=Math.sqrt(t*t-d*d),f=p*u/h,g=p*c/h,[_,E]=qn(Mt,e,n,d/h);return y(f,g)?[wt(_,E)]:[wt(_+f,E-g),wt(_-f,E+g)]}function St(e,t,{start:n,end:s,type:i}){return ht(e.start,n[0],n[1],t),ht(e.end,s[0],s[1],t),e.type=Cs[i],e}function We(e,t){return y(e[2],t[2])}function y(e,t){return xn(Math.abs(e-t),0,$t())}function xs(e,t){return t.filter(n=&gt;ot(e,n))}function ot(e,t){return Qn(e,t)}var x;(function(e){e[e.PLANE=0]="PLANE",e[e.HALF_PLANE=1]="HALF_PLANE"})(x||(x={}));const Cs={[x.PLANE]:P.LINE,[x.HALF_PLANE]:P.RAY},Mt=Y(),Ht=Y(),qt=m(),Ot=m(),ne=m(),Je=m(),Be=m(),Qe=m(),Bt=m(),Ds=O(),se={start:m(),end:m(),type:P.LINE},zs={start:m(),end:m(),type:P.LINE};class G{intersect(t){return tt(this,t)}closestPoints(t){return[this.closestTo(t)]}}class Tt extends G{constructor(t){super(),this.point=t}equals(t){return this===t||K(t)&amp;&amp;C(this.point,t.point)}closestTo(){return gt(this.point)}}class ie extends G{constructor(t,n,s){super(),this.start=t,this.end=n,this.lineLike={start:t,end:n,type:s}}equals(t){return this===t||J(t)&amp;&amp;this.lineLike.type===t.lineLike.type&amp;&amp;C(this.start,t.start)&amp;&amp;C(this.end,t.end)}closestTo(t){const n=D();return Fe(t,this.lineLike,n),n}}class Ve extends ie{constructor(t,n){super(t,n,P.LINE)}}class Hs extends ie{constructor(t,n){super(t,n,P.RAY)}}class Xe extends G{constructor(t){super(),this.constraints=t}equals(t){return this===t||Qt(t)&amp;&amp;kn(this.constraints,t.constraints,(n,s)=&gt;n.equals(s))}closestTo(t){let n,s=1/0;for(const i of this.constraints){const r=i.closestTo(t),o=Ft(t,r);o&lt;s&amp;&amp;(s=o,n=r)}return gt(n??t)}closestPoints(t){return this.constraints.flatMap(n=&gt;n===this?[]:n.closestPoints(t))}}class qs extends G{constructor(t,n){super(),this.center=t,this.radius=n}equals(t){return this===t||Q(t)&amp;&amp;this.center[0]===t.center[0]&amp;&amp;this.center[1]===t.center[1]&amp;&amp;this.radius===t.radius}closestTo(t){const n=D();return Ke(t,this.center,this.radius,n),n}}class re extends G{constructor(t,n){super(),this.center=t,this.radius=n}equals(t){return this===t||nt(t)&amp;&amp;C(this.center,t.center)&amp;&amp;this.radius===t.radius}closestTo(t){const n=D();return Ke(t,this.center,this.radius,n),n[2]=this.center[2],n}asCircle(){return new oe(gt(this.center),this.radius,at(0,0,1))}}class oe extends G{constructor(t,n,s,i=void 0){super(),this.center=t,this.radius=n,this.normal=s,this.slicePlane=i}equals(t){return this===t||it(t)&amp;&amp;C(this.center,t.center)&amp;&amp;C(this.normal,t.normal)&amp;&amp;this.radius===t.radius}closestTo(t){const{center:n,radius:s}=this;be(this.getPlane(Os),t,Ut);const i=R(Ut,Ut,n),r=yn(i);if(y(r,0))return gt(t);const o=s/Math.sqrt(r),a=D();T(a,n,i,o);const{slicePlane:c}=this;if(c&amp;&amp;!ot(c,a)){const u=ce(c,this);return(u==null?void 0:u.closestTo(t))??gt(t)}return a}getPlane(t=O()){return Rt(this.center,this.normal,t)}}const Ut=m(),Os=O();class Gs extends G{constructor(t){super(),this.z=t}equals(t){return this===t||et(t)&amp;&amp;this.z===t.z}closestTo(t){return at(t[0],t[1],this.z)}getPlane(t=O()){return ht(ye,0,0,this.z),Rt(ye,Gn,t)}}const ye=m();class ae extends G{constructor(t,n,s){super(),this.start=t,this.end=n,this.planeLike={start:t,end:n,type:s}}equals(t){return this===t||B(t)&amp;&amp;this.planeLike.type===t.planeLike.type&amp;&amp;C(this.start,t.start)&amp;&amp;C(this.end,t.end)}closestTo(t){const n=D();return Ue(t,this.planeLike,n),n}closestEndTo(t){const{start:n,end:s}=this.planeLike;return Math.sign(mt(A(js,s,n),A(Us,t,n)))&gt;0?this.end:this.start}getPlane(t=O()){const n=$e(ve,this.end);return n[2]+=1,Xn(this.start,this.end,n,t)}getSlicePlane(t=O()){const{start:n,end:s,type:i}=this.planeLike;if(i===x.PLANE)return;const r=ht(ve,n[0],n[1],0),o=ht(Pe,s[0],s[1],0),a=Vt(Pe,o,r);return Rt(r,a,t),t}}const js=Y(),Us=Y(),ve=m(),Pe=m();class Lr extends ae{constructor(t,n){super(t,n,x.HALF_PLANE)}}class Ar extends ae{constructor(t,n){super(t,n,x.PLANE)}}class Ks extends G{constructor(t,n){super(),this.sphere=es(t,n)}equals(t){return this===t||st(t)&amp;&amp;ns(this.sphere,t.sphere)}closestTo(t){const n=D();return ss(this.sphere,t,n),n}get center(){return is(this.sphere)}get radius(){return this.sphere[3]}}class Fs extends G{constructor(t,n,s){super(),this.start=t,this.end=n,this.getZ=s,this.planeLike={start:t,end:n,type:x.PLANE}}equals(t){return this===t||Nt(t)&amp;&amp;C(this.start,t.start)&amp;&amp;C(this.end,t.end)&amp;&amp;this.getZ===t.getZ}closestTo(t){return Qs(this,t)}addIfOnTheGround(t,n){for(const s of n){const i=this.getZ(s[0],s[1])??0;y(s[2],i)&amp;&amp;(s[2]=i,t.push(s))}}}class Ys extends G{constructor(t,n,s){super(),this._x=t,this._y=n,this._z=s}equals(t){return this===t||di(t)&amp;&amp;this._x===t._x&amp;&amp;this._y===t._y&amp;&amp;this._z===t._z}closestTo([t,n,s]){return xe(this._x??t,this._y??n,this._z??s)}}class Zs extends G{constructor(t,n,s,i,r){super(),this._origin=t,this._spatialReference=n,this._distanceMeters=s,this._z=i,this._directionDegrees=r}equals(t){return this===t||pi(t)&amp;&amp;de(this._origin,t._origin)&amp;&amp;this._spatialReference===t._spatialReference&amp;&amp;this._distanceMeters===t._distanceMeters&amp;&amp;this._z===t._z&amp;&amp;this._directionDegrees===t._directionDegrees}closestTo([t,n,s]){return we(vt,t,n),de(vt,this._origin)||this._applyDirectionAndDistance(vt),xe(vt[0],vt[1],this._z??s)}_applyDirectionAndDistance(t){if(this._directionDegrees!=null&amp;&amp;this._distanceMeters!=null)ft(t,this._origin,this._directionDegrees,this._distanceMeters,this._spatialReference);else if(this._directionDegrees!=null)Js(t,this._origin,this._directionDegrees,t,this._spatialReference);else if(this._distanceMeters!=null){const{azimuth:n}=zt(Ws,this._origin,t,this._spatialReference);ft(t,this._origin,n??0,this._distanceMeters,this._spatialReference)}}}const vt=[0,0],Ws=new Dt;function Js(e,t,n,s,i){let{azimuth:r,distance:o}=zt(Bs,t,s,i);r??(r=0);let a=o*Math.cos((r-n)*L);a=Math.max(0,a),ft(e,t,n,a,i)}const Bs=new Dt;function Qs(e,t){const n=D();return Ue(t,e.planeLike,n),n[2]=e.getZ(n[0],n[1])??en,n}function tt(e,t){if(Qt(e)){const n=[];for(const s of e.constraints){const i=s.intersect(t);i&amp;&amp;n.push(i)}return ue(n)}if(Qt(t))return tt(t,e);if(Nt(e))return Ee(e,t);if(Nt(t))return Ee(t,e);if(K(e)){const{point:n}=e;if(K(t))return C(n,t.point)?e:void 0;const s=t.closestTo(n);return Pn(s,n)?e:void 0}if(J(e)){if(K(t))return tt(t,e);if(J(t))return F(Ze(e.lineLike,t.lineLike));if(et(t))return Vs(e,t);if(B(t))return F(Ge(t.planeLike,e.lineLike));if(Q(t))return F(Ye(e.lineLike,t.center,t.radius));if(it(t))return F(bs(e.lineLike,t));if(nt(t))return Xs(e,t);if(st(t))return ti(e,t)}else if(et(e)){if(K(t)||J(t))return tt(t,e);if(et(t))return ei(e,t);if(B(t))return ni(e,t);if(Q(t))return si(e,t);if(it(t))return ri(e,t);if(nt(t))return ii(e,t);if(st(t))return oi(e,t)}else if(B(e)){if(K(t)||J(t)||et(t))return tt(t,e);if(B(t))return Kt(je(e.planeLike,t.planeLike));if(Q(t))return Kt(te(e.planeLike,t.center,t.radius));if(it(t))return ci(e,t);if(nt(t))return ai(e,t);if(st(t))return ui(e,t)}else if(Q(e)){if(K(t)||J(t)||et(t)||B(t))return tt(t,e);if(Q(t))return Kt(ee(e.center,e.radius,t.center,t.radius));if(it(t))return void 0;if(nt(t))return hi(e,t);if(st(t))return void 0}else if(it(e)){if(K(t)||J(t)||et(t)||B(t)||Q(t))return tt(t,e);if(it(t))return void 0;if(nt(t))return t.asCircle(),void 0;if(st(t))return void 0}else if(nt(e)){if(K(t)||J(t)||et(t)||B(t)||Q(t)||it(t))return tt(t,e);if(nt(t))return li(t,e);if(st(t))return void 0}else if(st(e)){if(K(t)||J(t)||et(t)||B(t)||Q(t)||nt(t))return tt(t,e);if(st(t))return void 0}}const Vs=(()=&gt;{const e=O();return(t,n)=&gt;{const{start:s,end:i}=t;if(We(s,i)&amp;&amp;y(s[2],n.z))return t;const r=D();return Ne(n.getPlane(e),s,i,r)?new Tt(r):void 0}})();function Xs({lineLike:e},{center:t,radius:n}){const s=t[2];return F(Ye(e,t,n).filter(i=&gt;y(i[2],s)))}function ti({lineLike:e},{sphere:t}){return F(ts(t,e.start,e.end))}const ce=(()=&gt;{const e=Kn(),t=m(),n=m();return(s,i,r)=&gt;{const{normal:o,center:a,radius:c}=i;Se(o,t,n);const u=Re(s),l=c*S(u,t),h=c*S(u,n);jn(e,a[0],a[1],a[2],1);const d=Un(s,e),p=Math.hypot(l,h),f=y(p,0);if(y(Zt(s,a),0)){if(f)return i;if(y(c,0))return!r||ot(r,a)?new Tt(gt(a)):void 0;Lt(t,u,o),vn(t,t);const v=new Array,b=pt(a);T(b,b,t,c),r&amp;&amp;!ot(r,b)||v.push(b);const z=pt(a);return T(z,z,t,-c),r&amp;&amp;!ot(r,z)||v.push(z),F(v)}if(f)return;const g=-d/p;if(Math.abs(g)&gt;1||y(g,1))return;const _=Math.atan(l/h),E=Cn(g)-_,$=Math.PI-E,k=new Array,N=m();T(N,a,t,c*Math.cos(E)),T(N,N,n,c*Math.sin(E)),k.push(N);const M=m();return T(M,a,t,c*Math.cos($)),T(M,M,n,c*Math.sin($)),k.push(M),F(r?xs(r,k):k)}})();function ei(e,t){return y(e.z,t.z)?e:void 0}function ni({z:e},{planeLike:t}){const[n,s]=t.start,[i,r]=t.end,o=at(n,s,e),a=at(i,r,e);return t.type===x.PLANE?new Ve(o,a):new Hs(o,a)}function si(e,t){const[n,s]=t.center;return new re(at(n,s,e.z),t.radius)}function ii(e,t){return y(t.center[2],e.z)?t:void 0}const ri=(()=&gt;{const e=O();return(t,n)=&gt;ce(t.getPlane(e),n,n.slicePlane)})();function oi(e,{center:t,radius:n}){const s=Math.abs(t[2]-e.z);if(s&gt;n&amp;&amp;!y(s,n))return;const i=at(t[0],t[1],e.z),r=Math.sqrt(n**2-s**2);return y(r,0)?void 0:new re(i,r)}const ai=(()=&gt;{const e=O();return(t,{center:n,radius:s})=&gt;{const i=te(t.planeLike,n,s),r=n[2];t.getSlicePlane(e);const o=new Array;for(const[a,c]of i){const u=[a,c,r];ot(e,u)&amp;&amp;o.push(u)}return F(o)}})(),ci=(()=&gt;{const e=O(),t=O();return(n,s)=&gt;ce(n.getPlane(e),s,n.getSlicePlane(t))})(),ui=(()=&gt;{const e=O();return(t,{center:n,radius:s})=&gt;{const i=t.getPlane(e),r=Vn(i,n),o=Math.abs(r);if(o&gt;s&amp;&amp;!y(o,s))return;const a=Math.sqrt(s**2-r**2);if(y(a,0)){const l=D();return be(i,n,l),new Tt(l)}const c=D(),u=pt(Re(i));return T(c,n,u,r),new oe(c,a,u,t.getSlicePlane())}})();function hi(e,t){const n=Le(e.center,t.center);return y(n,0)&amp;&amp;y(e.radius,t.radius)?t:tn(ee(e.center,e.radius,t.center,t.radius),t.center[2])}function li(e,t){if(!We(e.center,t.center))return;const n=Le(e.center,t.center);return y(n,0)&amp;&amp;y(e.radius,t.radius)?e:tn(ee(e.center,e.radius,t.center,t.radius),e.center[2])}function Ee(e,t){const{planeLike:n,getZ:s}=e,i=new Array;if(K(t))e.addIfOnTheGround(i,Ns(n,t.point));else if(J(t))e.addIfOnTheGround(i,Ge(n,t.lineLike));else if(Q(t))for(const[r,o]of te(n,t.center,t.radius)){const a=s(r,o);a!=null&amp;&amp;i.push(At(r,o,a))}else if(B(t)||Nt(t))for(const[r,o]of je(n,t.planeLike)){const a=s(r,o)??en;i.push(At(r,o,a))}return F(i)}function Kt(e){return ue(e.map(([t,n])=&gt;{const s=at(t,n,0),i=at(t,n,1);return new Ve(s,i)}))}function F(e){return ue(e.map(t=&gt;t?new Tt(t):void 0))}function tn(e,t){return F(e.map(([n,s])=&gt;[n,s,t]))}function ue(e){if(e.length!==0)return e.length===1?e[0]??void 0:new Xe(e.filter(Tn))}function Qt(e){return e instanceof Xe}function K(e){return e instanceof Tt}function J(e){return e instanceof ie}function et(e){return e instanceof Gs}function B(e){return e instanceof ae}function Q(e){return e instanceof qs}function nt(e){return e instanceof re}function it(e){return e instanceof oe}function st(e){return e instanceof Ks}function Nt(e){return e instanceof Fs}function pi(e){return e instanceof Zs}function di(e){return e instanceof Ys}const en=0;let fi=class{constructor(t,n){this.isDraped=t,this.domain=n}},gi=class extends fi{constructor(t,n,s,i,r=Wt.ALL,o=!0,a=!0){super(i,r),this.type=t,this.lineStart=n,this.lineEnd=s,this.fadeLeft=o,this.fadeRight=a}equals(t){return t instanceof gi&amp;&amp;this.type===t.type&amp;&amp;C(this.lineStart,t.lineStart)&amp;&amp;C(this.lineEnd,t.lineEnd)&amp;&amp;this.fadeLeft===t.fadeLeft&amp;&amp;this.fadeRight===t.fadeRight}get length(){return Me(this.lineStart,this.lineEnd)}};export{xe as $,Ji as A,Vi as B,_e as C,fi as D,cs as E,zt as F,ft as G,Dt as H,Fs as I,Ve as J,Ar as K,K as L,Yi as M,yr as N,ur as O,cr as P,fe as Q,Er as R,mr as S,Bi as T,Ys as U,Fe as V,Tr as W,at as X,kr as Y,Zs as Z,Pt as _,Wt as a,dr as a0,vr as a1,fr as a2,Ce as a3,ar as a4,_r as a5,gr as b,or as c,U as d,Zi as e,gi as f,wr as g,Qi as h,D as i,P as j,Mr as k,qs as l,ue as m,pr as n,ms as o,Wi as p,Gs as q,$s as r,Es as s,De as t,Ms as u,Pr as v,Lr as w,Tt as x,Ct as y,Ls as z};
</pre></body></html>