Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1416 lines
652 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
require({cache:{"esri/views/3d/interactive/editingTools/draw/DrawGraphicTool3D":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/colorUtils ../../../../../core/handleUtils ../../../../../core/maybe ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/has ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../support/elevationInfoUtils ../../../../../symbols/support/ElevationInfo ../../SegmentLabels3D ../../SnappingVisualizer3D ../meshFastUpdateUtils ../settings ../../visualElements/ExtendedLineVisualElement ../../visualElements/OutlineVisualElement ../../visualElements/VerticesVisualElement ../../../layers/graphics/elevationAlignmentUtils ../../../layers/graphics/ElevationContext ../../../layers/graphics/GraphicState ../../../webgl-engine/lib/Material ../../../../draw/DrawGraphicTool ../../../../draw/DrawOperation ../../../../draw/drawSurfaces ../../../../interactive/tooltip/tooltipCommonUtils ../../../../../core/accessorSupport/trackingUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H){a.DrawGraphicTool3D=class extends v.DrawGraphicTool{constructor(N){super(N);this._verticalLineVisualElement=this._verticesVisualElement=this._outlineVisualElement=this._createGraphicState=this._activeVertexVisualElement=null;this._settings=new I.Settings({getTheme:()=>this.view.effectiveTheme});this.geometryType=null;this.type="draw-3d"}initialize(){const {mode:N,offset:M,unit:K}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=
new f({mode:N,offset:M,unit:K})}normalizeCtorArgs(N){return N.elevationInfo?N:{...N,elevationInfo:l.getEffectiveElevationInfo(N.hasZ??!0)}}initializeGraphic(N){const {view:M}=this,K=this._createGraphicState=new B.GraphicState({graphic:N});return h.handlesGroup([M.maskOccludee(N),M.trackGraphicState(K),m.watch(()=>({element:this._outlineVisualElement,isDraped:K.isDraped}),({element:P,isDraped:U})=>{P&&(P.isDraped=U)},m.syncAndInitial),H.autorun(()=>{E.updateMeshTransformFromTooltipInfo(this.tooltipInfos.mesh,
this.geometryToPlace)}),this._setupLoadingIndicator(K),...C.meshTransformFastUpdateHandles(K)])}makeDrawOperation(){const {geometryType:N}=this,M="circle"!==N&&"rectangle"!==N;return new A.DrawOperation({view:this.view,manipulators:this.manipulators,geometryType:v.geometryTypeToDrawOperationGeometryType(N),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new D.SceneDrawSurface(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new D.ElevationDrawSurface(this.elevationInfo,
this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new n.SnappingVisualizer3D,segmentLabels:M?new k.SegmentLabels3D:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===l.getEffectiveElevationMode(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0})}onActiveVertexChanged(N){var {view:M}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=
[N],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(N),h.makeHandle();const K=this._settings,P=K.manipulators.vertex,U=new F.VerticesVisualElement({view:M,spatialReference:M.spatialReference,vertices:[N],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:P.size,outlineSize:P.outlineSize,renderOccluded:P.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=U;const V=new w.ExtendedLineVisualElement({view:M,extensionType:K.visualElements.zVerticalLine.extensionType,
innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:e.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0});this._verticalLineVisualElement=V;M=h.handlesGroup([m.watch(()=>K.visualElements.zVerticalLine,ca=>ca.apply(V),m.initial),m.watch(()=>({selectedColor:g.unitRGBAFromColor(K.colors.selected),outlineColor:g.unitRGBAFromColor(K.manipulators.vertex.outlineColor)}),({selectedColor:ca,outlineColor:ja})=>{U.color=ca;U.outlineColor=ja},m.initial),h.makeHandle(()=>{this._activeVertexVisualElement=
d.destroyMaybe(this._activeVertexVisualElement);this._verticalLineVisualElement=d.destroyMaybe(this._verticalLineVisualElement)})]);U.attached=!0;this._updateVerticalLineVisualElement(N);return M}_updateVerticalLineVisualElement(N){const M=this._verticalLineVisualElement;if(M){var {renderCoordsHelper:K,elevationProvider:P}=this.view;p.set(L,N[0],N[1],N[2]);J.setFromElevationInfo(this.elevationInfo);L[2]=G.evaluateElevationAlignmentAtPoint(L,P,J,K);K.toRenderCoords(L,this.view.spatialReference,L)?
(M.setStartEndFromWorldDownAtLocation(L),M.attached=!0):M.attached=!1}}onOutlineChanged(N){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=N,h.makeHandle();const M=this.internalGraphicsLayer.elevationInfo,{view:K}=this,P=this._settings,U=new y.OutlineVisualElement({view:K,geometry:N,elevationInfo:M,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===l.getEffectiveElevationMode(this.hasZ,M),attached:!1,isDecoration:!0});this._outlineVisualElement=
U;N=h.handlesGroup([m.watch(()=>P.visualElements.lineObjects.outline,V=>V.apply(U),m.initial),m.watch(()=>P.visualElements.lineObjects.shadowStyle,V=>V.apply(U),m.initial),h.makeHandle(()=>{this._outlineVisualElement=d.destroyMaybe(this._outlineVisualElement)})]);U.attached=!0;U.laserlineEnabled=!0;return N}onRegularVerticesChanged(N){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=N,h.makeHandle();const {view:M}=this,K=this._settings,P=K.manipulators.vertex,U=new F.VerticesVisualElement({view:M,
spatialReference:M.spatialReference,vertices:N,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:P.size,outlineSize:P.outlineSize,renderOccluded:P.renderOccluded,attached:!1,isDecoration:!0});N=h.handlesGroup([m.watch(()=>({color:g.unitRGBAFromColor(K.manipulators.vertex.color),outlineColor:g.unitRGBAFromColor(K.manipulators.vertex.outlineColor)}),({color:V,outlineColor:ca})=>{U.color=V;U.outlineColor=ca},m.initial),h.makeHandle(()=>{this._verticesVisualElement=d.destroyMaybe(this._verticesVisualElement)})]);
U.attached=!0;this._verticesVisualElement=U;return N}updateGraphicGeometry(N){if("mesh"===this.geometryType&&"point"===N?.type){const M=this.geometryToPlace;M?.centerAt(N);E.updateMeshTransformFromTooltipInfo(this.tooltipInfos.mesh,M);N=this._graphic;M&&N.geometry===M||(N.geometry=M)}else super.updateGraphicGeometry(N)}_setupLoadingIndicator(N){const {drawOperation:M}=this;if(!this.geometryToPlace)return M.loading=!1,null;M.loading=!0;const K=h.makeHandle(()=>{M.loading=!1});let P=void 0;return h.handlesGroup([m.when(()=>
N.displaying,()=>{P&&cancelAnimationFrame(P);P=requestAnimationFrame(()=>K.remove())},{...m.syncAndInitial,once:!0}),h.makeHandle(()=>P&&cancelAnimationFrame(P)),K])}};c.__decorate([r.property({constructOnly:!0})],a.DrawGraphicTool3D.prototype,"elevationInfo",void 0);c.__decorate([r.property({constructOnly:!0})],a.DrawGraphicTool3D.prototype,"geometryType",void 0);c.__decorate([r.property()],a.DrawGraphicTool3D.prototype,"type",void 0);c.__decorate([r.property({constructOnly:!0})],a.DrawGraphicTool3D.prototype,
"view",void 0);a.DrawGraphicTool3D=c.__decorate([u.subclass("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],a.DrawGraphicTool3D);const J=new q.ElevationContext,L=b.create();Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/SegmentLabels3D":function(){define("exports ../../../chunks/tslib.es6 ../../../core/screenUtils ../../../core/Logger ../../../core/has ../../../core/RandomLCG ../../../core/Error ../../../core/accessorSupport/decorators/subclass ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../interactive/SegmentLabels ../../interactive/support/viewUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.SegmentLabels3D=class extends z.SegmentLabels{getCameraOrExtent({view:b}){return b.state.camera}toScreenPointArray({view:b,elevationInfo:l,editGeometryOperations:f},k,n=g.createScreenPointArray()){({spatialReference:f}=f.data.coordinateHelper);u.vectorToRender(k,f,l,b,p);b.state.camera.projectToScreen(p,n);return n}};a.SegmentLabels3D=c.__decorate([x.subclass("esri.views.3d.interactive.SegmentLabels3D")],a.SegmentLabels3D);const p=t.create();Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/SegmentLabels":function(){define("exports ../../chunks/tslib.es6 ../../Color ../../core/Accessor ../../core/asyncUtils ../../core/colorUtils ../../core/handleUtils ../../core/has ../../core/mathUtils ../../core/promiseUtils ../../core/quantityFormatUtils ../../core/reactiveUtils ../../core/screenUtils ../../core/unitUtils ../../core/accessorSupport/decorators/property ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../core/libs/gl-matrix-2/math/vec2 ../../core/libs/gl-matrix-2/factories/vec2f64 ../../chunks/vec32 ../../geometry/support/coordsUtils ../../geometry/support/vectorStacks ../../intl/messages ../../support/elevationInfoUtils ../../support/getDefaultUnitForView ../overlay/TextOverlayItem ../support/automaticLengthMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A){function D(K,P,U,V,ca){const ja=[];P.data.components[ca].iterateVertices(la=>{ja.push(V.toXYZ(la.pos,G.sv3d.get()))});0===ca&&null!=U&&ja.push(V.toXYZ(U,G.sv3d.get()));if(2>ja.length)return ja;P=ja[0];U=ja[ja.length-1];"polygon"===K.type&&2<ja.length&&!y.equals(P,U)&&ja.push(P);return ja}const E={default:15,far:25};a.SegmentLabels=class extends h{constructor(K){super(K);this.stagedVertex=this.context=null;this.visible=!0;this.edgeDistance=
"default";this._messagesUnits=null;this._labelInfos=[];this._nextLabelIndex=0}initialize(){const K=d.createTask(async P=>{const U=await q.fetchMessageBundle("esri/core/t9n/Units");z.throwIfAborted(P);this._messagesUnits=U});this.addHandles([p.watch(()=>[null!=this.context&&this.getCameraOrExtent(this.context),this.visible,this._edgeDistancePixels,this.stagedVertex,this._messagesUnits],()=>this._update()),...["vertex-add","vertex-update","vertex-remove"].map(P=>p.on(()=>this.context?.editGeometryOperations,
P,()=>this._update())),r.makeHandle(()=>K.abort()),p.watch(()=>this._colors,P=>this._updateStyle(P))])}destroy(){for(this._nextLabelIndex=0;this._labelInfos.length;)this._destroyLabel(this._labelInfos.pop())}get updating(){return null==this._messagesUnits}get test(){}get _edgeDistancePixels(){return E[this.edgeDistance]}get _colors(){const K=this.context?.view.effectiveTheme.textColor??g.fromArray([255,255,255]),P=m.multiplyOpacity(m.getContrast(K,m.BrightnessThreshold.Low),.6);return{textColor:K,
backgroundColor:P}}_update(){if(!this.destroyed){this._nextLabelIndex=0;var {context:K,stagedVertex:P}=this;if(!K)return this._destroyUnusedLabels();var {editGeometryOperations:U}=K,{components:V,geometry:ca,coordinateHelper:ja}=U.data;if(!ca)return this._destroyUnusedLabels();var la=V.length;for(let fa=0;fa<la;++fa){const oa=D(ca,U,P,ja,fa);var Q;if(!(Q=2>oa.length)){a:{Q=oa;var aa=K.view,na=K.elevationInfo,ha=ja.spatialReference;if("2d"===aa.type)Q=!0;else{var da=l.getMetersPerUnit(ha)??1,ta=l.getMetersPerVerticalUnitForSR(ha);
for(let ba=1;ba<Q.length;++ba){var qa=Q[ba-1];const R=Q[ba],Z=(R[0]-qa[0])*da,ka=(R[1]-qa[1])*da;qa=((B.getConvertedElevationFromVector(aa,R,ha,na,B.absoluteHeightElevationInfo)??0)-(B.getConvertedElevationFromVector(aa,qa,ha,na,B.absoluteHeightElevationInfo)??0))*ta;if(Math.abs(qa)/Math.sqrt(Z*Z+ka*ka)>H){Q=!1;break a}}Q=!0}}Q=!Q}if(!Q)for(Q=1===la?!F.isClockwise(oa):!1,aa=N,na=M,this.toScreenPointArray(K,oa[0],aa),ha=1;ha<oa.length;++ha)da=oa[ha-1],ta=oa[ha],this.toScreenPointArray(K,ta,na),this._addLabel(K,
da,aa,ta,na,Q),[aa,na]=[na,aa]}this._destroyUnusedLabels()}}_updateStyle({textColor:K,backgroundColor:P}){const U=this._nextLabelIndex,V=this._labelInfos;for(let ca=0;ca<U;++ca){const {label:ja}=V[ca];ja.textColor=K;ja.backgroundColor=P}}_addLabel(K,P,U,V,ca,ja){const {label:la}=this._getOrCreateLabel(K);if(!this.visible||3025>I.squaredDistance(U,ca))la.visible=!1;else{var {spatialReference:Q}=K.editGeometryOperations.data;P=A.autoDistance2D(P,V,Q);V=this._messagesUnits;K=e.getDefaultUnitForView(K.view);
la.text=null!=V&&null!=P?u.formatLength(V,P,K):"";la.visible=!0;K=ca[0]-U[0];P=ca[1]-U[1];ja?I.set(J,-P,K):I.set(J,P,-K);I.normalize(J,J);I.scale(J,J,this._edgeDistancePixels);I.lerp(L,U,ca,.5);I.add(L,L,J);la.position=[L[0],L[1]];la.anchor=Math.abs(J[0])>Math.abs(J[1])?0<J[0]?"left":"right":0>-J[1]?"top":"bottom"}}_getOrCreateLabel(K){var P=this._labelInfos.length>this._nextLabelIndex;const {textColor:U,backgroundColor:V}=this._colors;if(P)return K=this._labelInfos[this._nextLabelIndex++],{label:P}=
K,P.textColor=U,P.backgroundColor=V,K;P=new v({anchor:"center",fontSize:8,textColor:U,backgroundColor:V});K.view.overlay?.items.add(P);K={label:P};this._labelInfos.push(K);this._nextLabelIndex=this._labelInfos.length;return K}_destroyUnusedLabels(){for(;this._labelInfos.length>this._nextLabelIndex;)this._destroyLabel(this._labelInfos.pop())}_destroyLabel({label:K}){this.context?.view.overlay?.items.remove(K);K.destroy()}};c.__decorate([f.property()],a.SegmentLabels.prototype,"context",void 0);c.__decorate([f.property()],
a.SegmentLabels.prototype,"stagedVertex",void 0);c.__decorate([f.property()],a.SegmentLabels.prototype,"visible",void 0);c.__decorate([f.property()],a.SegmentLabels.prototype,"edgeDistance",void 0);c.__decorate([f.property()],a.SegmentLabels.prototype,"updating",null);c.__decorate([f.property()],a.SegmentLabels.prototype,"_messagesUnits",void 0);c.__decorate([f.property()],a.SegmentLabels.prototype,"_edgeDistancePixels",null);c.__decorate([f.property()],a.SegmentLabels.prototype,"_colors",null);a.SegmentLabels=
c.__decorate([C.subclass("esri.views.interactive.SegmentLabels")],a.SegmentLabels);const H=t.deg2rad(5),J=w.create(),L=w.create(),N=b.createScreenPointArray(),M=b.createScreenPointArray();Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/core/quantityFormatUtils":function(){define(["exports","./Cyclical","./quantityUtils","./unitFormatUtils"],function(a,c,g,h){function d(n,C,I,w=2,y="abbr"){return h.formatDecimal(n,g.toUnit(C,I).value,I,w,y)}function m(n,C,I,w=2,y="abbr"){return h.formatRelativeDecimal(n,
g.toUnit(C,I).value,I,w,y)}function r(n,C,I=2,w="abbr"){return h.formatMetricLength(n,C.value,C.unit,I,w)}function x(n,C,I=2,w="abbr"){return h.formatMetricRelativeLength(n,C.value,C.unit,I,w)}function t(n,C,I=2,w="abbr"){return h.formatMetricVerticalLength(n,C.value,C.unit,I,w)}function z(n,C,I=2,w="abbr"){return h.formatMetricRelativeVerticalLength(n,C.value,C.unit,I,w)}function u(n,C,I=2,w="abbr"){return h.formatMetricArea(n,C.value,C.unit,I,w)}function p(n,C,I=2,w="abbr"){return h.formatImperialLength(n,
C.value,C.unit,I,w)}function b(n,C,I=2,w="abbr"){return h.formatImperialRelativeLength(n,C.value,C.unit,I,w)}function l(n,C,I=2,w="abbr"){return h.formatImperialVerticalLength(n,C.value,C.unit,I,w)}function f(n,C,I=2,w="abbr"){return h.formatImperialRelativeVerticalLength(n,C.value,C.unit,I,w)}function k(n,C,I=2,w="abbr"){return h.formatImperialArea(n,C.value,C.unit,I,w)}a.formatAngle=function(n,C,I,w=c.cyclicalDegrees,y=!0){return h.formatAngleDegrees(n.value,n.unit,n.rotationType,C,I,w,y)};a.formatArea=
function(n,C,I,w=2,y="abbr"){switch(I){case "imperial":return k(n,C,w,y);case "metric":return u(n,C,w,y);default:return d(n,C,I,w,y)}};a.formatDMS=function(n){return h.formatDMS(n.value,n.unit)};a.formatDecimal=d;a.formatImperialArea=k;a.formatImperialLength=p;a.formatImperialRelativeLength=b;a.formatImperialRelativeVerticalLength=f;a.formatImperialVerticalLength=l;a.formatLength=function(n,C,I,w,y="abbr"){w=w??2;switch(I){case "imperial":return p(n,C,w,y);case "metric":return r(n,C,w,y);default:return d(n,
C,I,w,y)}};a.formatMetricArea=u;a.formatMetricLength=r;a.formatMetricRelativeLength=x;a.formatMetricRelativeVerticalLength=z;a.formatMetricVerticalLength=t;a.formatRelativeAngle=function(n,C,I){return h.formatRelativeAngleDegrees(n.value,n.unit,n.rotationType,C,I)};a.formatRelativeDecimal=m;a.formatRelativeLength=function(n,C,I,w=2,y="abbr"){switch(I){case "imperial":return b(n,C,w,y);case "metric":return x(n,C,w,y);default:return m(n,C,I,w,y)}};a.formatRelativeVerticalLength=function(n,C,I,w=2,y=
"abbr"){switch(I){case "imperial":return f(n,C,w,y);case "metric":return z(n,C,w,y);default:return m(n,C,I,w,y)}};a.formatVerticalLength=function(n,C,I,w=2,y="abbr"){switch(I){case "imperial":return l(n,C,w,y);case "metric":return t(n,C,w,y);default:return d(n,C,I,w,y)}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/core/unitFormatUtils":function(){define("exports ./ByteSizeUnit ./Cyclical ./mathUtils ./quantityUtils ./string ./unitUtils ../intl/number".split(" "),function(a,
c,g,h,d,m,r,x){function t(f,k,n){return f.units[k][n]}function z(f,k,n,C=2,I="abbr"){return`${x.formatNumber(k,{minimumFractionDigits:C,maximumFractionDigits:C,signDisplay:0<k?"never":"exceptZero"})} ${t(f,n,I)}`}function u(f,k,n,C=2,I="abbr"){return`${x.formatNumber(k,{minimumFractionDigits:C,maximumFractionDigits:C,signDisplay:"exceptZero"})} ${t(f,n,I)}`}function p(f,k){const n=JSON.stringify(k);let C=b.get(n);C||(C=new Intl.NumberFormat("en-US",k),b.set(n,C));return/^[-+]?360\.?0*\u00b0?$/.test(C.format(f))?
0:f}const b=new Map,l=["B","kB","MB","GB","TB"];a.formatAngleDegrees=function(f,k,n,C,I,w=g.cyclicalDegrees,y=!0){f=w.normalize(d.convertRotationType(r.convertUnit(f,k,"degrees"),n,C),0,y);I=I??2;I={style:"unit",unitDisplay:"narrow",unit:"degree",maximumFractionDigits:I,minimumFractionDigits:I,signDisplay:0<f?"never":"exceptZero"};f=p(f,I);return x.formatNumber(f,I)};a.formatDMS=function(f,k,n=2){f=r.convertUnit(f,k,"degrees");k=f-Math.floor(f);f-=k;k*=60;let C=k-Math.floor(k);k-=C;C*=60;return`${f.toFixed()}\u00b0 ${k.toFixed()}' ${C.toFixed(n)}"`};
a.formatDecimal=z;a.formatFileSize=function(f,k){k=Math.round(k);let n=0===k?0:Math.floor(Math.log(k)/Math.log(c.ByteSizeUnit.KILOBYTES));n=h.clamp(n,0,l.length-1);k=x.formatNumber(k/c.ByteSizeUnit.KILOBYTES**n,{maximumFractionDigits:2});return m.replace(f.units.bytes[l[n]],{fileSize:k})};a.formatImperialArea=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveImperialAreaUnit(k,n);return z(f,r.convertUnit(k,n,w),w,C,I)};a.formatImperialLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveImperialLengthUnit(k,
n);return z(f,r.convertUnit(k,n,w),w,C,I)};a.formatImperialRelativeLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveImperialLengthUnit(k,n);return u(f,r.convertUnit(k,n,w),w,C,I)};a.formatImperialRelativeVerticalLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveImperialVerticalLengthUnit(k,n);return u(f,r.convertUnit(k,n,w),w,C,I)};a.formatImperialVerticalLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveImperialVerticalLengthUnit(k,n);return z(f,r.convertUnit(k,n,w),w,C,I)};a.formatMetricArea=
function(f,k,n,C=2,I="abbr"){const w=r.adaptiveMetricAreaUnit(k,n);return z(f,r.convertUnit(k,n,w),w,C,I)};a.formatMetricLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveMetricLengthUnit(k,n);return z(f,r.convertUnit(k,n,w),w,C,I)};a.formatMetricRelativeLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveMetricLengthUnit(k,n);return u(f,r.convertUnit(k,n,w),w,C,I)};a.formatMetricRelativeVerticalLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveMetricVerticalLengthUnit(k,n);return u(f,r.convertUnit(k,
n,w),w,C,I)};a.formatMetricVerticalLength=function(f,k,n,C=2,I="abbr"){const w=r.adaptiveMetricVerticalLengthUnit(k,n);return z(f,r.convertUnit(k,n,w),w,C,I)};a.formatRelativeAngleDegrees=function(f,k,n,C,I){n!==C&&(f=-f);I=I??2;n={style:"unit",unitDisplay:"narrow",unit:"degree",maximumFractionDigits:I,minimumFractionDigits:I,signDisplay:"exceptZero"};f=r.convertUnit(f,k,"degrees")%360;f=p(f,n);return x.formatNumber(f,n)};a.formatRelativeDecimal=u;a.unitName=t;Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/support/getDefaultUnitForView":function(){define(["exports","../core/unitUtils","../portal/Portal"],function(a,c,g){a.getDefaultUnitForView=function(h){if(null==h)return"metric";var d=h.map;d=(d&&"portalItem"in d?d.portalItem?.portal:null)??g.getDefault();switch(d.user?.units??d.units){case "metric":return"metric";case "english":return"imperial"}return c.getDefaultUnitSystem(h.spatialReference)??"metric"};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/overlay/TextOverlayItem":function(){define("../../chunks/tslib.es6 ../../Color ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../libs/maquette/projection ../../libs/maquette/h ../../libs/maquette/projector".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){const p={bottom:"esri-text-overlay-item-anchor-bottom","bottom-right":"esri-text-overlay-item-anchor-bottom-right","bottom-left":"esri-text-overlay-item-anchor-bottom-left",top:"esri-text-overlay-item-anchor-top","top-right":"esri-text-overlay-item-anchor-top-right","top-left":"esri-text-overlay-item-anchor-top-left",center:"esri-text-overlay-item-anchor-center",right:"esri-text-overlay-item-anchor-right",left:"esri-text-overlay-item-anchor-left"};g=class extends g{get position(){return[this.x,
this.y]}set position(f){this._set("x",f[0]);this._set("y",f[1])}get _textShadowColor(){const {textColor:f,backgroundColor:k}=this,n=k.clone();n.a*=f.a;return n}get _textShadow(){const f=this._textShadowColor.toCss(!0);return`0 0 ${this._textShadowSize}px ${f}`}get padding(){return.5*this.fontSize}get _borderRadius(){return this.padding}constructor(f){super(f);this.y=this.x=0;this.text="-";this.fontSize=14;this.anchor="center";this.isDecoration=this.visible=!0;this.backgroundColor=new c([0,0,0,.6]);
this.textColor=new c([255,255,255]);this._textShadowSize=1}render(){return z.h("div",{classes:this._cssClasses(),styles:{left:Math.floor(this.x)+"px",top:Math.floor(this.y)+"px",visibility:this.visible?"visible":"hidden",fontSize:this.fontSize+"px",lineHeight:this.fontSize+"px",backgroundColor:this.backgroundColor.toCss(!0),color:this.textColor.toCss(!0),padding:this.padding+"px",borderRadius:this._borderRadius+"px",textShadow:this._textShadow}},[this.text])}renderCanvas(f){if(this.visible){var k=
f.font.replace(/^(.*?)px/,"");f.font=`${this.fontSize}px ${k}`;var n=this.padding,C=this._borderRadius,I=f.measureText(this.text).width,w=this.fontSize;k=b[this.anchor];f.textAlign="center";f.textBaseline="middle";I+=2*n;n=w+2*n;this._roundedRect(f,this.x+k.x*I,this.y+k.y*n,I,n,C);f.fillStyle=this.backgroundColor.toCss(!0);f.fill();C=this.x+(k.x+.5)*I;k=this.y+(k.y+.5)*n;this._renderTextShadow(f,this.text,C,k);f.fillStyle=this.textColor.toCss(!0);f.fillText(this.text,C,k)}}_renderTextShadow(f,k,n,
C){f.lineJoin="miter";f.fillStyle=`rgba(${this._textShadowColor.r}, ${this._textShadowColor.g}, ${this._textShadowColor.b}, ${1/l.length})`;const I=this._textShadowSize;for(const [w,y]of l)f.fillText(k,n+I*w,C+I*y)}_roundedRect(f,k,n,C,I,w){f.beginPath();f.moveTo(k,n+w);f.arcTo(k,n,k+w,n,w);f.lineTo(k+C-w,n);f.arcTo(k+C,n,k+C,n+w,w);f.lineTo(k+C,n+I-w);f.arcTo(k+C,n+I,k+C-w,n+I,w);f.lineTo(k+w,n+I);f.arcTo(k,n+I,k,n+I-w,w);f.closePath()}_cssClasses(){const f={"esri-text-overlay-item":!0};let k;for(k in p)f[p[k]]=
this.anchor===k;return f}};a.__decorate([h.property()],g.prototype,"x",void 0);a.__decorate([h.property()],g.prototype,"y",void 0);a.__decorate([h.property()],g.prototype,"position",null);a.__decorate([h.property()],g.prototype,"text",void 0);a.__decorate([h.property()],g.prototype,"fontSize",void 0);a.__decorate([h.property()],g.prototype,"anchor",void 0);a.__decorate([h.property()],g.prototype,"visible",void 0);a.__decorate([h.property()],g.prototype,"isDecoration",void 0);a.__decorate([h.property()],
g.prototype,"backgroundColor",void 0);a.__decorate([h.property()],g.prototype,"textColor",void 0);a.__decorate([h.property()],g.prototype,"_textShadowSize",void 0);a.__decorate([h.property()],g.prototype,"_textShadowColor",null);a.__decorate([h.property()],g.prototype,"_textShadow",null);a.__decorate([h.property()],g.prototype,"padding",null);a.__decorate([h.property()],g.prototype,"_borderRadius",null);g=a.__decorate([x.subclass("esri.views.overlay.TextOverlayItem")],g);const b={bottom:{x:-.5,y:-1,
textAlign:"center",textBaseline:"bottom"},"bottom-left":{x:0,y:-1,textAlign:"left",textBaseline:"bottom"},"bottom-right":{x:-1,y:-1,textAlign:"right",textBaseline:"bottom"},center:{x:-.5,y:-.5,textAlign:"center",textBaseline:"middle"},left:{x:0,y:-.5,textAlign:"left",textBaseline:"middle"},right:{x:-1,y:-.5,textAlign:"right",textBaseline:"middle"},top:{x:-.5,y:0,textAlign:"center",textBaseline:"top"},"top-left":{x:0,y:0,textAlign:"left",textBaseline:"top"},"top-right":{x:-1,y:0,textAlign:"right",
textBaseline:"top"}},l=[];for(a=0;360>a;a+=22.5)l.push([Math.cos(Math.PI*a/180),Math.sin(Math.PI*a/180)]);return g})},"esri/libs/maquette/h":function(){define(["exports"],function(a){let c=(g,h,d)=>{for(let m=0,r=h.length;m<r;m++){let x=h[m];Array.isArray(x)?c(g,x,d):null!==x&&void 0!==x&&!1!==x&&("string"===typeof x&&(x={vnodeSelector:"",properties:void 0,children:void 0,text:x.toString(),domNode:null}),d.push(x))}};a.h=function(g,h,d){if(Array.isArray(h))d=h,h=void 0;else if(h&&("string"===typeof h||
h.hasOwnProperty("vnodeSelector"))||d&&("string"===typeof d||d.hasOwnProperty("vnodeSelector")))throw Error("h called with invalid arguments");let m,r;d&&1===d.length&&"string"===typeof d[0]?m=d[0]:d&&(r=[],c(g,d,r),0===r.length&&(r=void 0));return{vnodeSelector:g,properties:h,children:r,text:""===m?void 0:m,domNode:null}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/automaticLengthMeasurementUtils":function(){define(["exports","../../core/libs/gl-matrix-2/factories/vec3f64",
"./euclideanLengthMeasurementUtils","./geodesicLengthMeasurementUtils"],function(a,c,g,h){const d=c.create(),m=c.create();a.autoDistance2D=function(r,x,t){d[0]=r[0];d[1]=r[1];d[2]=3===r.length?r[2]:0;m[0]=x[0];m[1]=x[1];m[2]=3===x.length?x[2]:0;return h.geodesicDistance(d,m,t)??g.euclideanHorizontalDistance(d,m,t)};a.autoDistanceBetweenPoints2D=function(r,x){return h.geodesicDistanceBetweenPoints(r,x)??g.euclideanHorizontalDistanceBetweenPoints(r,x)};a.autoLength2D=function(r){return h.geodesicLength(r)??
g.euclideanHorizontalLength(r)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/geodesicLengthMeasurementUtils":function(){define("exports ../../core/quantityUtils ../../core/libs/gl-matrix-2/factories/vec3f64 ../../geometry/geometryEngine ../../geometry/support/geodesicUtils ../../geometry/support/spatialReferenceUtils ./geodesicMeasurementUtils".split(" "),function(a,c,g,h,d,m,r){function x(k,n,C){return r.geodesicMeasure(C,t,z,k,n,C)}function t(k,n,C){return c.createLength(d.inverseGeodeticSolver(b,
k,n,C).distance,"meters")}function z(k,n,C){return c.createLength(h.geodesicLength({type:"polyline",spatialReference:C,paths:[[[...k],[...n]]]},"meters"),"meters")}function u(k){return c.createLength(d.geodesicLengths([k],"meters")[0],"meters")}function p(k){return c.createLength(h.geodesicLength(k,"meters"),"meters")}const b=new d.InverseGeodeticSolverResult,l=g.create(),f=g.create();a.geodesicDistance=x;a.geodesicDistanceBetweenPoints=function(k,n){if(!m.equals(k.spatialReference,n.spatialReference))return null;
const {spatialReference:C}=k;l[0]=k.x;l[1]=k.y;l[2]=k.hasZ?k.z:0;f[0]=n.x;f[1]=n.y;f[2]=n.hasZ?n.z:0;return x(l,f,C)};a.geodesicLength=function(k){const {spatialReference:n}=k;return r.geodesicMeasure(n,u,p,k)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/geodesicUtils":function(){define("exports ../../geometry ../../core/Error ../../core/unitUtils ./geodesicConstants ./spatialReferenceUtils ../Polyline ../Polygon ../Point ../SpatialReference".split(" "),
function(a,c,g,h,d,m,r,x,t,z){function u(w){if(!w)return null;if(m.isGeographic(w)&&w.wkid){var y=d.spheroids[w.wkid];if(y)return y}if(w=w.wkt2||w.wkt)if((w=d.wktSpheroidRegex.exec(w))&&2===w.length?(y=w[1].split(","),!y||3>y.length?w=null:(w=parseFloat(y[1]),y=parseFloat(y[2]),w=isNaN(w)||isNaN(y)?null:{a:w,f:0===y?0:1/y})):w=null,w)return w;return null}function p(w){w=u(w);if(null!=w&&"b"in w&&"eSq"in w&&"radius"in w)return w;const y=w.a*(1-w.f);return Object.assign(w,{b:y,eSq:1-(y/w.a)**2,radius:(2*
w.a+y)/3,densificationRatio:1E4/((2*w.a+y)/3)})}function b(w){return null!=w&&0>w?w+360:w}function l(w,y,F){const {a:G,eSq:q}=p(F);F=Math.sqrt(q);const B=Math.sin(y[1]*d.toRadians);y=G*y[0]*d.toRadians;F=0<q?G*(1-q)*(B/(1-q*B*B)-1/(2*F)*Math.log((1-F*B)/(1+F*B)))*.5:G*B;w[0]=y;w[1]=F;return w}function f(w){return null!==u(w)}function k(w,y){if("polyline"!==w.type&&"polygon"!==w.type)throw new g("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const {spatialReference:F}=
w;if(!f(F))throw new g("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");var G="polyline"===w.type?w.paths:w.rings;const q=[],B=[0,0],e=new I;for(const D of G){G=[];q.push(G);G.push([D[0][0],D[0][1]]);var v=D[0][0],A=D[0][1];let E,H;for(let J=0;J<D.length-1;J++){E=D[J+1][0];H=D[J+1][1];if(v===E&&A===H)continue;const L=[v,A];C(e,[v,A],[E,H],F);const {azimuth:N,distance:M}=e;v=M/y;if(1<v){for(A=1;A<=v-1;A++)n(B,L,N,A*y,F),G.push(B.slice(0));n(B,L,
N,(M+Math.floor(v-1)*y)/2,F);G.push(B.slice(0))}n(B,L,N,M,F);G.push(B.slice(0));v=B[0];A=B[1]}}return"polyline"===w.type?new r({paths:q,spatialReference:F}):new x({rings:q,spatialReference:F})}function n(w,y,F,G,q){const B=y[0]*d.toRadians;y=y[1]*d.toRadians;F=(F??0)*d.toRadians;const {a:e,b:v,f:A}=p(q);q=Math.sin(F);F=Math.cos(F);var D=(1-A)*Math.tan(y);y=1/Math.sqrt(1+D*D);const E=D*y,H=Math.atan2(D,F);D=y*q;const J=D*D;var L=1-J,N=L*(e*e-v*v)/(v*v);const M=1+N/16384*(4096+N*(-768+N*(320-175*N))),
K=N/1024*(256+N*(-128+N*(74-47*N)));N=G/(v*M);let P=2*Math.PI,U,V,ca,ja;for(;1E-12<Math.abs(N-P);)ca=Math.cos(2*H+N),U=Math.sin(N),V=Math.cos(N),ja=K*U*(ca+K/4*(V*(-1+2*ca*ca)-K/6*ca*(-3+4*U*U)*(-3+4*ca*ca))),P=N,N=G/(v*M)+ja;G=E*U-y*V*F;L=A/16*L*(4+A*(4-3*L));G=Math.atan2(E*V+y*U*F,(1-A)*Math.sqrt(J+G*G))/d.toRadians;w[0]=(B+(Math.atan2(U*q,y*V-E*U*F)-(1-L)*A*D*(N+L*U*(ca+L*V*(-1+2*ca*ca)))))/d.toRadians;w[1]=G;return w}function C(w,y,F,G){var q=y[0]*d.toRadians;y=y[1]*d.toRadians;var B=F[0]*d.toRadians;
F=F[1]*d.toRadians;const {a:e,b:v,f:A,radius:D}=p(G),E=B-q;var H=Math.atan((1-A)*Math.tan(y)),J=Math.atan((1-A)*Math.tan(F));G=Math.sin(H);H=Math.cos(H);const L=Math.sin(J);J=Math.cos(J);let N=1E3,M=E,K,P,U;let V,ca,ja;do{var la=Math.sin(M);var Q=Math.cos(M);U=Math.sqrt(J*la*J*la+(H*L-G*J*Q)*(H*L-G*J*Q));if(0===U)return w.distance=0,w.azimuth=void 0,w.reverseAzimuth=void 0,w;Q=G*L+H*J*Q;V=Math.atan2(U,Q);ca=H*J*la/U;P=1-ca*ca;la=Q-2*G*L/P;isNaN(la)&&(la=0);ja=A/16*P*(4+A*(4-3*P));K=M;M=E+(1-ja)*A*
ca*(V+ja*U*(la+ja*Q*(-1+2*la*la)))}while(1E-12<Math.abs(M-K)&&0<--N);if(0===N)return G=Math.acos(Math.sin(y)*Math.sin(F)+Math.cos(y)*Math.cos(F)*Math.cos(B-q))*D,q=B-q,w.azimuth=Math.atan2(Math.sin(q)*Math.cos(F),Math.cos(y)*Math.sin(F)-Math.sin(y)*Math.cos(F)*Math.cos(q))/d.toRadians,w.distance=G,w.reverseAzimuth=void 0,w;q=P*(e*e-v*v)/(v*v);y=q/1024*(256+q*(-128+q*(74-47*q)));B=Math.atan2(H*Math.sin(M),H*L*Math.cos(M)-G*J);w.azimuth=Math.atan2(J*Math.sin(M),H*L-G*J*Math.cos(M))/d.toRadians;w.distance=
v*(1+q/16384*(4096+q*(-768+q*(320-175*q))))*(V-y*U*(la+y/4*(Q*(-1+2*la*la)-y/6*la*(-3+4*U*U)*(-3+4*la*la))));w.reverseAzimuth=B/d.toRadians;return w}class I{constructor(w=0,y,F){this.distance=w;this.azimuth=y;this.reverseAzimuth=F}}a.InverseGeodeticSolverResult=I;a.directGeodeticSolver=n;a.geodesicAreas=function(w,y="square-meters"){if(w.some(B=>!f(B.spatialReference)))throw new g("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const F=[];for(var G=
0;G<w.length;G++){var q=w[G];const {radius:B,densificationRatio:e}=p(q.spatialReference);F.push(k(q,B*e))}w=[];G=[0,0];q=[0,0];for(let B=0;B<F.length;B++){const {rings:e,spatialReference:v}=F[B];let A=0;for(let D=0;D<e.length;D++){const E=e[D];l(G,E[0],v);l(q,E[E.length-1],v);let H=q[0]*G[1]-G[0]*q[1];for(let J=0;J<E.length-1;J++)l(G,E[J+1],v),l(q,E[J],v),H+=q[0]*G[1]-G[0]*q[1];A+=H}A=h.convertUnit(A,"square-meters",y);w.push(A/-2)}return w};a.geodesicCompatibleSpatialReference=function(w){return f(w)?
w:m.isWebMercator(w)?z.WGS84:null};a.geodesicDensify=k;a.geodesicDistance=function(w,y,F="meters"){if(!w||!y)throw new g("geodesic-distance:missing-parameters","one or both input parameters are missing");if(!w.spatialReference||!y.spatialReference)throw new g("geodesic-distance:invalid-parameters","one or both input points do not have a spatial reference");if(!m.equals(w.spatialReference,y.spatialReference))throw new g("geodesic-distance:invalid-parameters","spatial references of input parameters do not match");
const {spatialReference:G}=w;if(!f(G))throw new g("geodesic-distance:not-supported","input geometry spatial reference is not supported");if(w.x===y.x&&w.y===y.y)return new I(0,0,0);const q=new I;C(q,[w.x,w.y],[y.x,y.y],G);q.distance=h.convertUnit(q.distance,"meters",F);q.azimuth=b(q.azimuth);q.reverseAzimuth=b(q.reverseAzimuth);return q};a.geodesicLengths=function(w,y="meters"){if(!w)throw new g("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(w.some(q=>!f(q.spatialReference)))throw new g("geodesic-lengths:invalid-spatial-reference",
"the input geometries spatial reference is not supported");const F=[];for(let q=0;q<w.length;q++){var G=w[q];const {spatialReference:B}=G;G="polyline"===G.type?G.paths:G.rings;let e=0;for(let v=0;v<G.length;v++){const A=G[v];let D=0;for(let E=1;E<A.length;E++){const H=A[E-1][0],J=A[E][0],L=A[E-1][1],N=A[E][1];if(L!==N||H!==J){const M=new I;C(M,[H,L],[J,N],B);D+=M.distance}}e+=D}e=h.convertUnit(e,"meters",y);F.push(e)}return F};a.inverseGeodeticSolver=C;a.isSupported=f;a.pointFromDistance=function(w,
y,F){if(!w||null==y||null==F)throw new g("point-from-distance:missing-parameters","one or more input parameters are missing or undefined");if(0>F||360<F)throw new g("point-from-distance:-of-bounds","azimuth is restricted to angles between, and including, 0\u00b0 to 360\u00b0 degrees");if(!w.spatialReference)throw new g("point-from-distance:missing-spatial-reference","the input point must have a spatial reference");const {spatialReference:G}=w;if(!f(G))throw new g("geodesic-distance:not-supported",
"input geometry spatial reference is not supported");const q=[0,0];n(q,[w.x,w.y],F,y,G);return new t({x:q[0],y:q[1],spatialReference:G})};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/geodesicMeasurementUtils":function(){define(["exports","../../geometry/support/geodesicUtils","../../geometry/support/spatialReferenceUtils"],function(a,c,g){a.geodesicDistanceThreshold=1E5;a.geodesicMeasure=function(h,d,m,...r){return g.isGeographic(h)&&c.isSupported(h)?d.apply(void 0,
r):g.isWebMercator(h)?m.apply(void 0,r):null};a.supportsGeodesicMeasurement=function(h){return g.isGeographic(h)&&c.isSupported(h)||g.isWebMercator(h)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/support/viewUtils":function(){define("exports ../../../core/screenUtils ../../../core/libs/gl-matrix-2/math/vec2 ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../layers/graphics/dehydratedPoint ../../../support/elevationInfoUtils".split(" "),
function(a,c,g,h,d,m,r){function x(f,k,n,C,I=d.create()){f=h.copy(u,f);f[2]=r.getConvertedElevationFromVector(C,f,k,n)||0;C.renderCoordsHelper.toRenderCoords(f,k,I);return I}function t(f,k,n,C){if("2d"===C.type)return z.x=f[0],z.y=f[1],z.spatialReference=k,C.toScreen(z);x(f,k,n,C,u);C.state.camera.projectToScreen(u,l);return c.createScreenPoint(l[0],l[1])}const z=m.makeDehydratedPoint(0,0,0,null),u=d.create(),p=c.createRenderScreenPointArray(),b=c.createRenderScreenPointArray(),l=c.createScreenPointArray();
a.anyMapPointToRender=function(f,k,n,C,I=d.create()){f=k.toXYZ(f);f[2]=r.getConvertedElevationFromVector(C,f,k.spatialReference,n)||0;C.renderCoordsHelper.toRenderCoords(f,k.spatialReference,I);return I};a.anyMapPointToScreenPoint=function(f,k,n,C){return t(k.toXYZ(f),k.spatialReference,n,C)};a.renderScreenSpaceTangent=function(f,k,n,C){n.projectToRenderScreen(f,p);n.projectToRenderScreen(k,b);g.subtract(C,b,p);g.normalize(C,C)};a.vectorToRender=x;a.vectorToScreenPoint=t;Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/3d/interactive/SnappingVisualizer3D":function(){define("exports ../../../Color ../../../core/colorUtils ../../../core/has ../../../core/handleUtils ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/projection/projectVectorToVector ../../../support/elevationInfoUtils ./visualElements/ExtendedLineVisualElement ./visualElements/ParallelLineVisualElement ./visualElements/PointVisualElement ./visualElements/RightAngleQuadVisualElement ../layers/interfaces ../webgl-engine/lib/Material ../../interactive/sketch/normalizedPoint ../../interactive/snapping/Settings ../../interactive/snapping/SnappingDomain ../../interactive/snapping/snappingUtils ../../interactive/snapping/SnappingVisualizer ../../interactive/snapping/hints/LineSnappingHint ../../interactive/support/viewUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F){function G(D){({effectiveTheme:D}=D.view);const E=c.toUnitRGBA(D.accentColor),H=[0,0,0,0];return{intersectionPointColor:H,intersectionPointOutlineColor:E,pointColor:H,pointOutlineColor:E,lineColor:E,lineOutlineColor:void 0,parallelSignColor:E,rightAngleColor:E,rightAngleColorDraped:c.toUnitRGBA(g.multiplyOpacity(D.accentColor,.5)),rightAngleOutlineColor:E}}function q(D,E,{selfSnappingZ:H,view:J,spatialReference:L}){return 0!==(E&C.SnappingDomain.SELF)&&
k.isTarget(D)&&null!=H?k.withSelfSnappingZ(D,H,J,L):D}function B(D){return D.isDraped?t.onTheGroundElevationInfo:t.absoluteHeightElevationInfo}function e(D,E,H,J,L,N,M,K=!1,P=!0,U=!0){E=v(E,J,L,N,K);H=v(H,J,L,N,K);N=new z.ExtendedLineVisualElement({view:N,extensionType:z.ExtensionType.FADED,start:E,end:H,isDraped:K,color:M.lineColor,renderOccluded:K?f.RenderOccludedFlag.OccludeAndTransparent:f.RenderOccludedFlag.Opaque,renderGroup:l.DrapedRenderGroup.SnappingHint,isDecoration:!0});switch(D){case I.LineSegmentHintType.TARGET:N.width=
n.defaults.lineHintWidthTarget;N.fadedExtensions={start:0,end:n.defaults.lineHintFadedExtensions};break;case I.LineSegmentHintType.REFERENCE_EXTENSION:N.width=n.defaults.lineHintWidthReference;N.fadedExtensions={start:0,end:0};break;case I.LineSegmentHintType.REFERENCE:N.width=n.defaults.lineHintWidthReference,N.fadedExtensions={start:P?n.defaults.lineHintFadedExtensions:0,end:U?n.defaults.lineHintFadedExtensions:0}}N.attached=!0;return N}function v(D,E,H,J,L){const N=r.create();L?x.projectVectorToVector(D,
E,N,J.basemapTerrain.overlayManager.renderer.spatialReference):F.vectorToRender(D,E,H,J,N);return N}class A extends w.SnappingVisualizer{sortUniqueHints(D){return D.sort((E,H)=>(H instanceof y.LineSnappingHint?H.length:0)-(E instanceof y.LineSnappingHint?E.length:0))}visualizeIntersectionPoint(D,E){const {spatialReference:H,view:J}=E;E=G(E);return d.destroyHandle(new p.PointVisualElement({view:J,primitive:"circle",geometry:k.toDehydratedPoint(D.intersectionPoint,H),elevationInfo:D.isDraped?t.onTheGroundElevationInfo:
t.absoluteHeightElevationInfo,size:20,outlineSize:2,color:E.intersectionPointColor,outlineColor:E.intersectionPointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizePoint(D,E){const {view:H,spatialReference:J}=E,L=G(E);E=q(D.point,D.domain,E);return d.destroyHandle(new p.PointVisualElement({view:H,primitive:"circle",geometry:k.toDehydratedPoint(E,J),elevationInfo:B(D),size:20,outlineSize:2,color:L.pointColor,outlineColor:L.pointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,
attached:!0}))}visualizeLine(D,E){const {view:H,spatialReference:J}=E,L=G(E),N=q(D.lineStart,D.domain,E);E=q(D.lineEnd,D.domain,E);return d.destroyHandle(e(D.type,N,E,J,B(D),H,L,D.isDraped,D.fadeLeft,D.fadeRight))}visualizeParallelSign(D,E){const {view:H,spatialReference:J}=E;var L=G(E);const {isDraped:N}=D;var M=B(D),K=q(D.lineStart,D.domain,E);D=q(D.lineEnd,D.domain,E);K=v(K,J,M,H,N);M=v(D,J,M,H,N);M=m.lerp(M,K,M,.5);L=new u.ParallelLineVisualElement({view:H,attached:!1,offset:n.defaults.parallelLineHintOffset,
length:n.defaults.parallelLineHintLength,width:n.defaults.parallelLineHintWidth,color:L.parallelSignColor,location:M,renderOccluded:N?f.RenderOccludedFlag.OccludeAndTransparent:f.RenderOccludedFlag.Opaque,isDraped:N,renderGroup:l.DrapedRenderGroup.SnappingHint,isDecoration:!0});L.setDirectionFromPoints(K,M);L.attached=!0;return d.destroyHandle(L)}visualizeRightAngleQuad(D,E){const {view:H,spatialReference:J}=E,L=G(E);var N=B(D);const {isDraped:M}=D;var K=q(D.previousVertex,D.domain,E),P=q(D.centerVertex,
D.domain,E);D=q(D.nextVertex,D.domain,E);K=v(K,J,N,H,M);P=v(P,J,N,H,M);N=v(D,J,N,H,M);return d.destroyHandle(new b.RightAngleQuadVisualElement({view:H,attached:!0,color:M?L.rightAngleColorDraped:L.rightAngleColor,renderOccluded:M?f.RenderOccludedFlag.OccludeAndTransparent:f.RenderOccludedFlag.Transparent,outlineRenderOccluded:M?f.RenderOccludedFlag.OccludeAndTransparent:f.RenderOccludedFlag.Opaque,outlineColor:L.rightAngleOutlineColor,outlineSize:n.defaults.rightAngleHintOutlineSize,size:n.defaults.rightAngleHintSize,
isDraped:M,geometry:{previous:K,center:P,next:N},renderGroup:l.DrapedRenderGroup.SnappingHint,isDecoration:!0}))}}a.SnappingVisualizer3D=A;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/ExtendedLineVisualElement":function(){define("exports ../../../../core/has ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f32 ../../../../geometry/support/clipRay ../../../../geometry/support/frustum ../../../../geometry/support/lineSegment ../../../../geometry/support/ray ./EngineVisualElement ./LaserlineVisualElement ../../terrain/OverlayRenderer ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/lib/RenderGeometry ../../webgl-engine/lib/VertexAttribute ../../webgl-engine/materials/RibbonLineMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C){function I(e){e.geometries=[]}class w extends u.EngineVisualElement{constructor(e){super(e);this._ray=z.create();this._isWorldDown=!1;this._start=h.create();this._end=h.fromValues(1,0,0);this._width=1;this._color=m.fromValues(1,0,1,1);this._polygonOffset=!1;this._writeDepthEnabled=!0;this._innerWidth=0;this._innerColor=m.fromValues(1,1,1,1);this._stippleOffColor=this._stipplePattern=null;this._stipplePreferContinuous=!0;this._falloff=0;this._extensionType=
a.ExtensionType.LINE;this._laserlineStyle=null;this._laserlineEnabled=!1;this._renderOccluded=f.RenderOccludedFlag.OccludeAndTransparent;this._fadedExtensions=B;this._laserline=new p.LaserlineVisualElement({view:this.view,isDecoration:e.isDecoration});this.applyProperties(e)}destroy(){this._laserline.destroy();super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:v=>this._createObject3DResources(v),destroyResources:I,recreateGeometry:(v,A)=>this._recreateObject3DGeometry(v,
A),cameraChanged:()=>this._updateGeometry()}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:I,recreateGeometry:v=>this._recreateDrapedGeometry(v)}}updateVisibility(e){super.updateVisibility(e);this._laserline.visible=e}onAttachedChange(){this._laserline.attached=this._laserlineAttached}setStartEndFromWorldDownAtLocation(e){this._isWorldDown=!0;g.copy(this._start,e);this.view.renderCoordsHelper.worldUpAtPosition(e,this._end);g.subtract(this._end,
e,this._end);z.fromPoints(this._start,this._end,this._ray);this._updateGeometry()}get start(){return this._start}set start(e){this._isWorldDown=!1;g.exactEquals(this._start,e)||(g.copy(this._start,e),z.fromPoints(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(e){this._isWorldDown=!1;g.exactEquals(this._end,e)||(g.copy(this._end,e),z.fromPoints(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&
(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){d.exactEquals(e,this._color)||(d.copy(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==
this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){d.exactEquals(e,this._innerColor)||(d.copy(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const v=null!=e!==(null!=this._stipplePattern);this._stipplePattern=e;v?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){null!=e&&null!=this._stippleOffColor&&
d.exactEquals(e,this._stippleOffColor)||(this._stippleOffColor=null!=e?m.clone(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&
(this._extensionType=e,this.recreateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&null!=this._laserlineStyle&&this.attached&&!this.isDraped}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e;this._laserline.attached=this._laserlineAttached;null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==
this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get _normalizedRenderOccluded(){return this.isDraped&&this._renderOccluded===f.RenderOccludedFlag.OccludeAndTransparentStencil?f.RenderOccludedFlag.OccludeAndTransparent:this._renderOccluded}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=e??B;this.recreateGeometry()}_updateMaterial(){const {materialParameters:e}=this;this.object3dResources.resources?.material.setParameters(e);this.drapedResources.resources?.material.setParameters(e)}get materialParameters(){return{width:this._width,
color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,hasPolygonOffset:this._polygonOffset,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration,writeDepth:this._writeDepthEnabled}}_createObject3DResources(e){const v=new C.RibbonLineMaterial(this.materialParameters),A=[];this._createObject3DGeometry(v,e,A);
return{material:v,geometries:A,forEach:D=>{D(v);A.forEach(D)}}}_recreateObject3DGeometry(e,v){e.geometries.length=0;this._createObject3DGeometry(e.material,v,e.geometries)}_createObject3DGeometry(e,v,A){e=this._createGeometry(e);A.push(e);v.addGeometry(e);this._updateVerticesObject3D(v)}_createDrapedResources(){const e=new C.RibbonLineMaterial(this.materialParameters),v=this._createDrapedGeometry(e);return{material:e,geometries:[v]}}_recreateDrapedGeometry(e){e.geometries=[this._createDrapedGeometry(e.material)]}_createDrapedGeometry(e){e=
this._createGeometry(e);this._updateVerticesDraped(e);return new k.RenderGeometry(e)}_createGeometry(e){const v=this.extensionType===a.ExtensionType.FADED,A=v?[h.create(),h.create(),h.create(),h.create()]:[h.create(),h.create()];return l.createPolylineGeometry(e,A,null,v?[1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]:null)}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const e=this.object3dResources.object;e&&this._updateVerticesObject3D(e)}}_updateVerticesObject3D(e){const v=
this._lineSegment;this._updateVertexAttributesObject3D(e,v);this._laserline.intersectsLine=v}_updateVerticesDraped(e){this._updateVertexAttributesDraped(e,this._lineSegment)}get _lineSegment(){return this._extensionType===a.ExtensionType.FADED?this._updateLineSegmentFinite(q):this._updateLineSegmentInfinite(this._extensionType,q)}_updateLineSegmentFinite(e){return t.fromPoints(this._start,this._end,e)}_updateLineSegmentInfinite(e,v){var A=this.view.state.camera;r.fromRay(this._ray,y);switch(e){case a.ExtensionType.LINE:y.c0=
-Number.MAX_VALUE;break;case a.ExtensionType.RAY:case a.ExtensionType.GROUND_RAY:var D=this._ray.origin;e=this.view.elevationProvider.getElevation(D[0],D[1],D[2],this.view.renderCoordsHelper.spatialReference,"ground")??0;D=this.view.renderCoordsHelper.getAltitude(D);this._isWorldDown&&D<e&&g.negate(y.ray.direction,y.ray.direction);this._extensionType===a.ExtensionType.GROUND_RAY&&null!=e&&(y.c1=Math.abs(D-e))}if(!x.intersectClipRay(A.frustum,y))return this._updateLineSegmentFinite(v);A=r.getStart(y,
F);e=r.getEnd(y,G);return t.fromPoints(A,e,v)}_updateVertexAttributesObject3D(e,v){const A=e.geometries[0].getMutableAttribute(n.VertexAttribute.POSITION)?.data;if(A){var D=0;for(const E of this._lineVertices(v))A[D++]=E[0],A[D++]=E[1],A[D++]=E[2];e.geometryVertexAttributeUpdated(e.geometries[0],n.VertexAttribute.POSITION)}}_updateVertexAttributesDraped(e,v){const A=e.getMutableAttribute(n.VertexAttribute.POSITION)?.data;if(A){var D=0;for(const E of this._lineVertices(v))A[D++]=E[0],A[D++]=E[1],A[D++]=
b.drapedZ;e.invalidateBoundingInfo()}}*_lineVertices(e){this.extensionType===a.ExtensionType.FADED?(yield t.pointAt(e,-this.fadedExtensions.start,F),yield t.pointAt(e,0,F),yield t.pointAt(e,1,F),yield t.pointAt(e,1+this.fadedExtensions.end,F)):(yield t.pointAt(e,0,F),yield t.pointAt(e,1,F))}}const y=r.create(),F=h.create(),G=h.create(),q=t.create();a.ExtensionType=void 0;(function(e){e[e.LINE=0]="LINE";e[e.RAY=1]="RAY";e[e.GROUND_RAY=2]="GROUND_RAY";e[e.FADED=3]="FADED"})(a.ExtensionType||(a.ExtensionType=
{}));c=1/3;const B={start:c,end:c};a.ExtendedLineVisualElement=w;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/factories/vec4f32":function(){define(["exports"],function(a){function c(){return new Float32Array(4)}function g(I){const w=new Float32Array(4);w[0]=I[0];w[1]=I[1];w[2]=I[2];w[3]=I[3];return w}function h(I,w,y,F){const G=new Float32Array(4);G[0]=I;G[1]=w;G[2]=y;G[3]=F;return G}function d(I,w){return new Float32Array(I,w,4)}function m(){return c()}
function r(){return h(1,1,1,1)}function x(){return h(1,0,0,0)}function t(){return h(0,1,0,0)}function z(){return h(0,0,1,0)}function u(){return h(0,0,0,1)}const p=c(),b=r(),l=x(),f=t(),k=z(),n=u(),C=Object.freeze(Object.defineProperty({__proto__:null,ONES:b,UNIT_W:n,UNIT_X:l,UNIT_Y:f,UNIT_Z:k,ZEROS:p,clone:g,create:c,createView:d,fromValues:h,ones:r,unitW:u,unitX:x,unitY:t,unitZ:z,zeros:m},Symbol.toStringTag,{value:"Module"}));a.ONES=b;a.UNIT_W=n;a.UNIT_X=l;a.UNIT_Y=f;a.UNIT_Z=k;a.ZEROS=p;a.clone=
g;a.create=c;a.createView=d;a.fromValues=h;a.ones=r;a.unitW=u;a.unitX=x;a.unitY=t;a.unitZ=z;a.vec4f32=C;a.zeros=m;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/EngineVisualElement":function(){define(["exports","./DrapedVisualElementResources","./VisualElement","./VisualElementResources"],function(a,c,g,h){class d extends g.VisualElement{constructor(m){super(m);this._isDraped=!1;this.object3dResources=new h.VisualElementResources(this.createObject3DResourceFactory(m.view));
this.drapedResources=new c.DrapedVisualElementResources(this.createDrapedResourceFactory(m.view));this.isDraped=m.isDraped??!1}get isDraped(){return this._isDraped}set isDraped(m){m!==this._isDraped&&(this._isDraped=m,this.object3dResources.attached=this.attached&&!m,this.drapedResources.attached=this.attached&&m)}get renderGroup(){return this.drapedResources.renderGroup}set renderGroup(m){this.drapedResources.renderGroup=m}createResources(){this.object3dResources.attached=!this._isDraped;this.drapedResources.attached=
this._isDraped}destroyResources(){this.object3dResources.attached=!1;this.drapedResources.attached=!1}recreate(){this.object3dResources.recreate();this.drapedResources.recreate()}recreateGeometry(){this.object3dResources.recreateGeometry();this.drapedResources.recreateGeometry()}destroy(){this.object3dResources.destroy();this.drapedResources.destroy();super.destroy()}updateVisibility(m){this.object3dResources.visible=m;this.drapedResources.visible=m}}a.EngineVisualElement=d;Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/DrapedVisualElementResources":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Accessor ../../../../core/Identifiable ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../layers/interfaces ../../webgl-engine/lib/ModelDirtyTypes ../../webgl-engine/lib/UpdatePolicy".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){class b{constructor(f){this._resourceFactory=f;this._resources=null;this._visible=!0;this._attached=!1;this._renderGroup=z.DrapedRenderGroup.Outline}destroy(){this._destroyResources()}get resources(){return null!=this._resources?this._resources.external:null}get visible(){return this._visible}set visible(f){f!==this._visible&&(this._visible=f,this._syncGeometriesToRenderer())}get attached(){return this._attached}set attached(f){f!==this._attached&&(this._attached=
f,this._createOrDestroyResources())}get renderGroup(){return this._renderGroup}set renderGroup(f){this._renderGroup=f;const k=this._resources?.layerView;k&&(k.renderGroup=f)}recreate(){this.attached&&this._createResources()}recreateGeometry(){this._resourceFactory.recreateGeometry?null!=this._resources&&(this._ensureRenderGeometriesRemoved(),this._resourceFactory.recreateGeometry(this._resources.external),this._syncGeometriesToRenderer()):this.recreate()}_createOrDestroyResources(){this._attached?
null==this._resources&&this._createResources():this._destroyResources()}_createResources(){this._destroyResources();const f=this._resourceFactory.createResources(),k=new l({view:this._resourceFactory.view,renderGroup:this._renderGroup}),n=this._resourceFactory.view.basemapTerrain?.overlayManager;this._resources={layerView:new l({view:this._resourceFactory.view,renderGroup:this._renderGroup}),external:f,geometriesAdded:!1};n&&(this._resources.drapeSourceRenderer=n.registerGeometryDrapeSource(k));this._syncGeometriesToRenderer()}_destroyResources(){if(null!=
this._resources){this._ensureRenderGeometriesRemoved();var f=this._resourceFactory.view.basemapTerrain?.overlayManager;f&&f.unregisterDrapeSource(this._resources.layerView);this._resourceFactory.destroyResources(this._resources.external);this._resources=null}}_syncGeometriesToRenderer(){this._visible?this._ensureRenderGeometriesAdded():this._ensureRenderGeometriesRemoved()}_ensureRenderGeometriesRemoved(){null!=this._resources?.drapeSourceRenderer&&this._resources.geometriesAdded&&(this._resources.drapeSourceRenderer.removeGeometries(this._resources.external.geometries,
u.DirtyOperation.UPDATE),this._resources.geometriesAdded=!1)}_ensureRenderGeometriesAdded(){null==this._resources?.drapeSourceRenderer||this._resources.geometriesAdded||(this._resources.drapeSourceRenderer.addGeometries(this._resources.external.geometries,u.DirtyOperation.UPDATE),this._resources.geometriesAdded=!0)}}let l=class extends h.IdentifiableMixin(g){constructor(f){super(f);this.drapeSourceType=z.DrapeSourceType.Features;this.updatePolicy=p.UpdatePolicy.SYNC;this.renderGroup=z.DrapedRenderGroup.Outline}};
c.__decorate([d.property({constructOnly:!0})],l.prototype,"view",void 0);c.__decorate([d.property({readOnly:!0})],l.prototype,"drapeSourceType",void 0);c.__decorate([d.property()],l.prototype,"renderGroup",void 0);l=c.__decorate([t.subclass("esri.views.3d.interactive.visualElements.DrapedVisualElementResources")],l);a.DrapedVisualElementResources=b;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/VisualElement":function(){define(["exports",
"../../../../core/has","../../../../core/reactiveUtils"],function(a,c,g){class h{get isDecoration(){return this._isDecoration}set isDecoration(d){this._isDecoration=d}constructor(d){this._resourcesCreated=this._attached=this._isDecoration=!1;this._visible=!0;this.view=d.view;this._handle=g.watch(()=>d.view.ready,m=>{this._resourcesCreated&&(m?this._createResources():this._destroyResources())})}applyProperties(d){let m=!1;for(const r in d)r in this&&("attached"===r?m=d[r]:this[r]=d[r]);this.attached=
m}destroy(){this.attached=!1;this._handle.remove()}get attached(){return this._attached}set attached(d){d!==this._attached&&this.view._stage&&((this._attached=d)&&!this._resourcesCreated?this._createResources():!this._attached&&this._resourcesCreated&&this._destroyResources(),this.onAttachedChange(d))}onAttachedChange(d){}get visible(){return this._visible}set visible(d){d!==this._visible&&(this._visible=d,this.attached&&this.updateVisibility(d))}_createResources(){this.createResources();this._resourcesCreated=
!0;this.updateVisibility(this.visible)}_destroyResources(){this.destroyResources();this._resourcesCreated=!1}}a.VisualElement=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/VisualElementResources":function(){define("exports ../../../../core/reactiveUtils ../../webgl-engine/lib/ContentObjectType ../../webgl-engine/lib/Object3D ../../webgl-engine/lib/UpdatePolicy ../../webgl-engine/lib/WebGLLayer".split(" "),function(a,c,g,h,d,m){class r{constructor(x){this._resourceFactory=
x;this._resources=null;this._visible=!0;this._attached=!1}destroy(){this._destroyResources()}get object(){return null!=this._resources?this._resources.object:null}get resources(){return null!=this._resources?this._resources.external:null}get visible(){return this._visible}set visible(x){x!==this._visible&&(this._visible=x,this._syncVisible())}get attached(){return this._attached}set attached(x){x!==this._attached&&(this._attached=x,this._createOrDestroyResources())}recreate(){this.attached&&this._createResources()}recreateGeometry(){if(this._resourceFactory.recreateGeometry){var x=
this._resourceFactory.view._stage;if(null!=this._resources&&x){var t=this._resources.object;this._resources.external.forEach(z=>{z.type!==g.ContentObjectType.Mesh&&z.type!==g.ContentObjectType.Line&&z.type!==g.ContentObjectType.Point||x.remove(z)});t.removeAllGeometries();this._resourceFactory.recreateGeometry(this._resources.external,t,this._resources.layer);this._resources.external.forEach(z=>{z.type!==g.ContentObjectType.Mesh&&z.type!==g.ContentObjectType.Line&&z.type!==g.ContentObjectType.Point||
x.add(z)})}}else this.recreate()}_createOrDestroyResources(){this._attached?this._resources||this._createResources():this._destroyResources()}_createResources(){this._destroyResources();var x=this._resourceFactory;const t=x.view,z=t._stage;if(z){var u=new m.WebGLLayer(z,{pickable:!1,updatePolicy:d.UpdatePolicy.SYNC}),p=new h.Object3D({castShadow:!1}),b=x.createResources(p,u);b.forEach(f=>{z.add(f);f.type===g.ContentObjectType.Texture&&f.load(z.renderView.renderingContext)});z.add(p);u.add(p);var l=
x.cameraChanged;x=l?c.watch(()=>t.state.camera,f=>l(f),c.initial):null;this._resources={layer:u,object:p,external:b,cameraHandle:x};this._syncVisible()}}_destroyResources(){if(null!=this._resources){var x=this._resourceFactory.view._stage;x&&(x.remove(this._resources.object),this._resources.layer.destroy(),this._resources.external.forEach(t=>{x.remove(t);t.type===g.ContentObjectType.Texture&&t.unload()}));this._resources.object.dispose();this._resources.cameraHandle?.remove();this._resourceFactory.destroyResources(this._resources.external);
this._resources=null}}_syncVisible(){null!=this._resources&&(this._resources.object.visible=this._visible)}}a.VisualElementResources=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/LaserlineVisualElement":function(){define("exports ../../../../core/has ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../geometry/support/lineSegment ./VisualElement ../../webgl-engine/effects/laserlines/LaserLineRenderer ../../../../chunks/Laserlines.glsl".split(" "),
function(a,c,g,h,d,m,r,x){class t extends m.VisualElement{constructor(u){super(u);this._angleCutoff=x.defaultAngleCutoff;this._style={};this._heightManifoldTarget=h.create();this._heightManifoldEnabled=!1;this._intersectsLine=d.create();this._intersectsLineInfinite=this._intersectsLineEnabled=!1;this._pointDistanceLine=this._pathVerticalPlaneBuffers=this._lineVerticalPlaneSegment=null;this.applyProperties(u)}get testData(){}createResources(){this._ensureRenderer()}destroyResources(){this._disposeRenderer()}updateVisibility(){this._syncRenderer();
this._syncHeightManifold();this._syncIntersectsLine();this._syncPathVerticalPlane();this._syncLineVerticalPlane();this._syncPointDistance()}get angleCutoff(){return this._angleCutoff}set angleCutoff(u){this._angleCutoff!==u&&(this._angleCutoff=u,this._syncAngleCutoff())}get style(){return this._style}set style(u){this._style=u;this._syncStyle()}get heightManifoldTarget(){return this._heightManifoldEnabled?this._heightManifoldTarget:null}set heightManifoldTarget(u){null!=u?(g.copy(this._heightManifoldTarget,
u),this._heightManifoldEnabled=!0):this._heightManifoldEnabled=!1;this._syncRenderer();this._syncHeightManifold()}set intersectsWorldUpAtLocation(u){if(null==u)this.intersectsLine=null;else{var p=this.view.renderCoordsHelper.worldUpAtPosition(u,z);this.intersectsLine=d.fromValues(u,p);this.intersectsLineInfinite=!0}}get intersectsLine(){return this._intersectsLineEnabled?this._intersectsLine:null}set intersectsLine(u){null!=u?(d.copy(u,this._intersectsLine),this._intersectsLineEnabled=!0):this._intersectsLineEnabled=
!1;this._syncIntersectsLine();this._syncRenderer()}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(u){this._intersectsLineInfinite=u;this._syncIntersectsLineInfinite()}get lineVerticalPlaneSegment(){return this._lineVerticalPlaneSegment}set lineVerticalPlaneSegment(u){this._lineVerticalPlaneSegment=null!=u?d.copy(u):null;this._syncLineVerticalPlane();this._syncRenderer()}get pathVerticalPlane(){return this._pathVerticalPlaneBuffers}set pathVerticalPlane(u){this._pathVerticalPlaneBuffers=
u;this._syncPathVerticalPlane();this._syncLineVerticalPlane();this._syncPointDistance();this._syncRenderer()}get pointDistanceLine(){return this._pointDistanceLine}set pointDistanceLine(u){this._pointDistanceLine=null!=u?{origin:h.clone(u.origin),target:u.target?h.clone(u.target):null}:null;this._syncPointDistance();this._syncRenderer()}_syncRenderer(){this.attached&&this.visible&&(this._intersectsLineEnabled||this._heightManifoldEnabled||null!=this._pointDistanceLine||null!=this._pathVerticalPlaneBuffers)?
this._ensureRenderer():this._disposeRenderer()}_ensureRenderer(){null==this._renderer&&(this._renderer=new r.LaserLineRenderer({renderCoordsHelper:this.view.renderCoordsHelper,contrastControlEnabled:!0,_isDecoration:this.isDecoration,viewingMode:this.view.state.viewingMode}),this._syncStyle(),this._syncHeightManifold(),this._syncIntersectsLine(),this._syncIntersectsLineInfinite(),this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance(),this._syncAngleCutoff(),this.view._stage&&
this.view._stage.addRenderPlugin(this._renderer))}_syncStyle(){null!=this._renderer&&(this._renderer.setParameters(this._style),null!=this._style.intersectsLineRadius&&(this._renderer.intersectsLineRadius=this._style.intersectsLineRadius))}_syncAngleCutoff(){null!=this._renderer&&this._renderer.setParameters({angleCutoff:this._angleCutoff})}_syncHeightManifold(){null!=this._renderer&&(this._renderer.heightManifoldEnabled=this._heightManifoldEnabled&&this.visible,this._heightManifoldEnabled&&(this._renderer.heightManifoldTarget=
this._heightManifoldTarget))}_syncIntersectsLine(){null!=this._renderer&&(this._renderer.intersectsLineEnabled=this._intersectsLineEnabled&&this.visible,this._intersectsLineEnabled&&(this._renderer.intersectsLineSegment=this._intersectsLine))}_syncIntersectsLineInfinite(){null!=this._renderer&&(this._renderer.intersectsLineInfinite=this._intersectsLineInfinite)}_syncPathVerticalPlane(){null!=this._renderer&&(this._renderer.pathVerticalPlaneEnabled=null!=this._pathVerticalPlaneBuffers&&this.visible,
null!=this._pathVerticalPlaneBuffers&&(this._renderer.pathVerticalPlaneBuffers=this._pathVerticalPlaneBuffers))}_syncLineVerticalPlane(){null!=this._renderer&&(this._renderer.lineVerticalPlaneEnabled=null!=this._lineVerticalPlaneSegment&&this.visible,null!=this._lineVerticalPlaneSegment&&(this._renderer.lineVerticalPlaneSegment=this._lineVerticalPlaneSegment))}_syncPointDistance(){if(null!=this._renderer){var u=this._pointDistanceLine,p=null!=u;this._renderer.pointDistanceEnabled=p&&null!=u.target&&
this.visible;p&&(this._renderer.pointDistanceOrigin=u.origin,null!=u.target&&(this._renderer.pointDistanceTarget=u.target))}}_disposeRenderer(){null!=this._renderer&&this.view._stage&&(this.view._stage.removeRenderPlugin(this._renderer),this._renderer=null)}}const z=h.create();a.LaserlineVisualElement=t;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/has ../../../../../core/maybe ../../../../../core/accessorSupport/decorators/property ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass ../../../../../chunks/vec32 ../../../../../geometry/support/clipRay ../../../../../geometry/support/frustum ../../../../../geometry/support/lineSegment ../../../../../geometry/support/ray ../../../../ViewingMode ../RenderPlugin ./LaserlinePathData ./LaserlinePathTechnique ./LaserlinePathTechniqueConfiguration ./LaserlineTechnique ./LaserlineTechniqueConfiguration ../../lib/RenderSlot ../../materials/internal/MaterialUtil".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F){a.LaserLineRenderer=class extends f.SyncPrepareRenderPlugin{constructor(q){super(q);this._technique=null;this._pathVerticalPlaneEnabled=this._intersectsLineInfinite=this._intersectsLineEnabled=this._lineVerticalPlaneEnabled=this._pointDistanceEnabled=this._heightManifoldEnabled=!1;this._pathTechnique=this._pathVerticalPlaneData=null;this._passParameters=new I.LaserlinePassParameters;this.produces=new Map([[y.RenderSlot.LASERLINES,()=>!this.contrastControlEnabled],
[y.RenderSlot.LASERLINES_CONTRAST_CONTROL,()=>this.contrastControlEnabled]])}initialize(){this._passParameters.renderCoordsHelper=this.renderCoordsHelper}consumes(){return f.ConsumesDepth}get isDecoration(){return this._isDecoration}get heightManifoldEnabled(){return this._heightManifoldEnabled}set heightManifoldEnabled(q){this._heightManifoldEnabled!==q&&(this._heightManifoldEnabled=q,this._requestRender())}get heightManifoldTarget(){return this._passParameters.heightManifoldTarget}set heightManifoldTarget(q){t.copy(this._passParameters.heightManifoldTarget,
q);this._requestRender()}get pointDistanceEnabled(){return this._pointDistanceEnabled}set pointDistanceEnabled(q){q!==this._pointDistanceEnabled&&(this._pointDistanceEnabled=q,this._requestRender())}get pointDistanceTarget(){return this._passParameters.pointDistanceTarget}set pointDistanceTarget(q){t.copy(this._passParameters.pointDistanceTarget,q);this._requestRender()}get pointDistanceOrigin(){return this._passParameters.pointDistanceOrigin}set pointDistanceOrigin(q){t.copy(this._passParameters.pointDistanceOrigin,
q);this._requestRender()}get lineVerticalPlaneEnabled(){return this._lineVerticalPlaneEnabled}set lineVerticalPlaneEnabled(q){q!==this._lineVerticalPlaneEnabled&&(this._lineVerticalPlaneEnabled=q,this._requestRender())}get lineVerticalPlaneSegment(){return this._passParameters.lineVerticalPlaneSegment}set lineVerticalPlaneSegment(q){p.copy(q,this._passParameters.lineVerticalPlaneSegment);this._requestRender()}get intersectsLineEnabled(){return this._intersectsLineEnabled}set intersectsLineEnabled(q){q!==
this._intersectsLineEnabled&&(this._intersectsLineEnabled=q,this._requestRender())}get intersectsLineSegment(){return this._passParameters.intersectsLineSegment}set intersectsLineSegment(q){p.copy(q,this._passParameters.intersectsLineSegment);this._requestRender()}get intersectsLineRadius(){return this._passParameters.intersectsLineRadius}set intersectsLineRadius(q){q!==this._passParameters.intersectsLineRadius&&(this._passParameters.intersectsLineRadius=q,this._requestRender())}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(q){q!==
this._intersectsLineInfinite&&(this._intersectsLineInfinite=q,this._requestRender())}get pathVerticalPlaneEnabled(){return this._pathVerticalPlaneEnabled}set pathVerticalPlaneEnabled(q){q!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=q,null!=this._pathVerticalPlaneData&&this._requestRender())}set pathVerticalPlaneVertices(q){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new k.LaserlinePathData(this._passParameters.renderCoordsHelper));this._pathVerticalPlaneData.vertices=
q;this.pathVerticalPlaneEnabled&&this._requestRender()}set pathVerticalPlaneBuffers(q){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new k.LaserlinePathData(this._passParameters.renderCoordsHelper));this._pathVerticalPlaneData.buffers=q;this.pathVerticalPlaneEnabled&&this._requestRender()}setParameters(q){F.updateParameters(this._passParameters,q)&&this._requestRender()}initializeRenderContext(q){this._context=q;this._techniques=q.techniques;this._techniqueConfig=new w.LaserlineTechniqueConfiguration;
q=new C.LaserlinePathTechniqueConfiguration;q.contrastControlEnabled=this.contrastControlEnabled;this._pathTechnique=this._techniques.acquire(n.LaserlinePathTechnique,q)}uninitializeRenderContext(){this._technique=h.releaseMaybe(this._technique);this._pathVerticalPlaneData=h.disposeMaybe(this._pathVerticalPlaneData);this._pathTechnique=h.releaseMaybe(this._pathTechnique)}prepareTechnique(){return this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled?
(this._techniqueConfig.heightManifoldEnabled=this.heightManifoldEnabled,this._techniqueConfig.lineVerticalPlaneEnabled=this.lineVerticalPlaneEnabled,this._techniqueConfig.pointDistanceEnabled=this.pointDistanceEnabled,this._techniqueConfig.intersectsLineEnabled=this.intersectsLineEnabled,this._techniqueConfig.contrastControlEnabled=this.contrastControlEnabled,this._techniqueConfig.spherical=this.viewingMode===l.ViewingMode.Global,this._technique=this._techniques.releaseAndAcquire(I.LaserlineTechnique,
this._techniqueConfig,this._technique)):this._pathTechnique}renderNode(q,B,e){if(e=e?.get("normals")?.getTexture())this._passParameters.normals=e,(this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled)&&this._renderUnified(q,B),this.pathVerticalPlaneEnabled&&this._renderPath(q)}_renderUnified(q,B){const e=q.rctx;this._updatePassParameters(q);e.bindTechnique(B,q.bindParameters,this._passParameters);e.screen.draw()}_renderPath(q){null!=this._pathVerticalPlaneData&&
null!=this._pathTechnique&&(q.rctx.bindTechnique(this._pathTechnique,q.bindParameters,{...this._passParameters,origin:this._pathVerticalPlaneData.origin}),this._pathVerticalPlaneData.draw(q.rctx))}_updatePassParameters(q){this._intersectsLineEnabled&&(q=q.bindParameters.camera,this._intersectsLineInfinite?(z.fromRay(b.wrap(this._passParameters.intersectsLineSegment.origin,this._passParameters.intersectsLineSegment.vector),G),G.c0=-Number.MAX_VALUE,u.intersectClipRay(q.frustum,G)&&(z.getStart(G,this._passParameters.lineStartWorld),
z.getEnd(G,this._passParameters.lineEndWorld))):(t.copy(this._passParameters.lineStartWorld,this._passParameters.intersectsLineSegment.origin),t.add(this._passParameters.lineEndWorld,this._passParameters.intersectsLineSegment.origin,this._passParameters.intersectsLineSegment.vector)))}_requestRender(){this._context&&this._context.requestRender()}get test(){}};c.__decorate([d.property({constructOnly:!0})],a.LaserLineRenderer.prototype,"viewingMode",void 0);c.__decorate([d.property({constructOnly:!0})],
a.LaserLineRenderer.prototype,"contrastControlEnabled",void 0);c.__decorate([d.property({constructOnly:!0})],a.LaserLineRenderer.prototype,"_isDecoration",void 0);c.__decorate([d.property({constructOnly:!0})],a.LaserLineRenderer.prototype,"renderCoordsHelper",void 0);a.LaserLineRenderer=c.__decorate([x.subclass("esri.views.3d.webgl-engine.effects.laserlines.LaserLineRenderer")],a.LaserLineRenderer);const G=z.create();Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/effects/laserlines/LaserlinePathData":function(){define("exports ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../geometry/support/DoubleArray ../../../support/buffer/glUtil ../../../support/buffer/InterleavedLayout ./LaserlinePathTechnique ../../lib/VertexArrayObject ../../lib/VertexAttribute ../../../../webgl/BufferObject ../../../../webgl/enums".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){class p{constructor(k){this._renderCoordsHelper=k;this._buffers=null;this._origin=g.create();this._dirty=!1;this._count=0;this._vao=null}set vertices(k){const n=h.newDoubleArray(3*k.length);let C=0;for(const I of k)n[C++]=I[0],n[C++]=I[1],n[C++]=I[2];this.buffers=[n]}set buffers(k){this._buffers=k;if(0<this._buffers.length){k=this._buffers[0];const n=3*Math.floor(k.length/3/2);c.set(this._origin,k[n],k[n+1],k[n+2])}else c.set(this._origin,0,0,0);this._dirty=!0}get origin(){return this._origin}draw(k){const n=
this._ensureVAO(k);null!=n&&(k.bindVAO(n),k.drawArrays(u.PrimitiveType.TRIANGLES,0,this._count))}dispose(){null!=this._vao&&this._vao.dispose()}_ensureVAO(k){if(null==this._buffers)return null;null==this._vao&&(this._vao=this._createVAO(k,this._buffers));this._ensureVertexData(this._vao,this._buffers);return this._vao}_createVAO(k,n){n=this._createDataBuffer(n);this._dirty=!1;return new x.VertexArrayObject(k,r.attributeLocations,{data:d.glLayout(f)},{data:z.BufferObject.createVertex(k,u.Usage.STATIC_DRAW,
n)})}_ensureVertexData(k,n){this._dirty&&(n=this._createDataBuffer(n),k.vertexBuffers.data?.setData(n),this._dirty=!1)}_createDataBuffer(k){var n=k.reduce((G,q)=>G+6*(q.length/3-1),0);this._count=n;n=f.createBuffer(n);const C=this._origin;let I=0,w=0;for(const G of k){for(k=0;k<G.length;k+=3){var y=c.set(l,G[k],G[k+1],G[k+2]);0===k?w=this._renderCoordsHelper.getAltitude(y):this._renderCoordsHelper.setAltitude(y,w);var F=this._renderCoordsHelper.worldUpAtPosition(y,b);const q=I+2*k;y=c.subtract(l,
y,C);if(k<G.length-3){n.up.setVec(q,F);n.up.setVec(q+3,F);n.up.setVec(q+5,F);for(let B=0;6>B;B++)n.start.setVec(q+B,y);n.extrude.setValues(q,0,-1);n.extrude.setValues(q+1,1,-1);n.extrude.setValues(q+2,1,1);n.extrude.setValues(q+3,0,-1);n.extrude.setValues(q+4,1,1);n.extrude.setValues(q+5,0,1)}if(0<k)for(n.up.setVec(q-2,F),n.up.setVec(q-4,F),n.up.setVec(q-5,F),F=-6;0>F;F++)n.end.setVec(q+F,y)}I+=6*(G.length/3-1)}return n.buffer}}const b=g.create(),l=g.create(),f=m.newLayout().vec3f(t.VertexAttribute.START).vec3f(t.VertexAttribute.END).vec3f(t.VertexAttribute.UP).vec2f(t.VertexAttribute.EXTRUDE);
a.LaserlinePathData=p;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique":function(){define("require exports ../../core/shaderTechnique/ReloadableShaderModule ../../core/shaderTechnique/ShaderTechnique ../../lib/Program ../../lib/VertexAttribute ../../../../../chunks/LaserlinePath.glsl ../../../../webgl/enums ../../../../webgl/renderState".split(" "),function(a,c,g,h,d,m,r,x,t){class z extends h.ShaderTechnique{initializeProgram(p){return new d.Program(p.rctx,
z.shader.get().build(this.configuration),u)}initializePipeline(){return t.makePipelineState({blending:t.simpleBlendingParams(x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA),colorWrite:t.defaultColorWriteParams})}}z.shader=new g.ReloadableShaderModule(r.LaserlinePath,()=>new Promise((p,b)=>a(["../../shaders/LaserlinePath.glsl"],p,b)));const u=new Map([[m.VertexAttribute.START,0],[m.VertexAttribute.END,1],[m.VertexAttribute.UP,2],[m.VertexAttribute.EXTRUDE,3]]);c.LaserlinePathTechnique=z;c.attributeLocations=
u;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/chunks/LaserlinePath.glsl":function(){define("exports ../core/libs/gl-matrix-2/math/mat4 ../core/libs/gl-matrix-2/factories/mat4f64 ../core/libs/gl-matrix-2/math/vec2 ../core/libs/gl-matrix-2/factories/vec2f64 ../views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl ../views/3d/webgl-engine/core/shaderModules/Float2PassUniform ../views/3d/webgl-engine/core/shaderModules/FloatPassUniform ../views/3d/webgl-engine/core/shaderModules/interfaces ../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform ../views/3d/webgl-engine/core/shaderModules/ShaderBuilder ../views/3d/webgl-engine/lib/VertexAttribute".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){function b(k){const n=new u.ShaderBuilder;n.include(m.Laserline,k);const {vertex:C,fragment:I}=n;C.uniforms.add(new z.Matrix4PassUniform("modelView",(w,{camera:y})=>c.translate(f,y.viewMatrix,w.origin)),new z.Matrix4PassUniform("proj",(w,{camera:y})=>y.projectionMatrix),new x.FloatPassUniform("glowWidth",(w,{camera:y})=>w.glowWidth*y.pixelRatio),new r.Float2PassUniform("pixelToNDC",(w,{camera:y})=>h.set(l,2/y.fullViewport[2],2/y.fullViewport[3])));n.attributes.add(p.VertexAttribute.START,
"vec3");n.attributes.add(p.VertexAttribute.END,"vec3");n.attributes.add(p.VertexAttribute.UP,"vec3");n.attributes.add(p.VertexAttribute.EXTRUDE,"vec2");n.varyings.add("uv","vec2");n.varyings.add("vViewStart","vec3");n.varyings.add("vViewEnd","vec3");n.varyings.add("vViewPlane","vec4");C.code.add(t.glsl`void main() {
vec3 pos = mix(start, end, extrude.x);
vec4 viewPos = modelView * vec4(pos, 1);
vec4 projPos = proj * viewPos;
vec2 ndcPos = projPos.xy / projPos.w;
vec3 viewUp = (modelView * vec4(extrude.y * up, 0)).xyz;
vec4 projPosUp = proj * vec4(viewPos.xyz + viewUp, 1);
vec2 projExtrudeDir = normalize(projPosUp.xy / projPosUp.w - ndcPos);
vec2 lxy = abs(sign(projExtrudeDir) - ndcPos);
ndcPos += length(lxy) * projExtrudeDir;
vec3 worldPlaneNormal = normalize(cross(up, normalize(end - start)));
vec3 viewPlaneNormal = (modelView * vec4(worldPlaneNormal, 0)).xyz;
vViewStart = (modelView * vec4(start, 1)).xyz;
vViewEnd = (modelView * vec4(end, 1)).xyz;
vViewPlane = vec4(viewPlaneNormal, -dot(viewPlaneNormal, vViewStart));
float xPaddingPixels = sign(dot(viewPlaneNormal, viewPos.xyz)) * (extrude.x * 2.0 - 1.0) * glowWidth;
ndcPos.x += xPaddingPixels * pixelToNDC.x;
uv = ndcPos * 0.5 + 0.5;
gl_Position = vec4(ndcPos, 0, 1);
}`);I.uniforms.add(new x.FloatPassUniform("perScreenPixelRatio",(w,y)=>y.camera.perScreenPixelRatio));I.code.add(t.glsl`float planeDistancePixels(vec4 plane, vec3 pos, vec3 start, vec3 end) {
vec3 origin = mix(start, end, 0.5);
vec3 basis = end - origin;
vec3 posAtOrigin = pos - origin;
float x = dot(normalize(basis), posAtOrigin);
float y = dot(plane.xyz, posAtOrigin);
float dx = max(abs(x) - length(basis), 0.0);
float dy = y;
float dist = length(vec2(dx, dy));
float width = fwidth(y);
float maxPixelDistance = length(pos) * perScreenPixelRatio * 2.0;
float pixelDist = dist / min(width, maxPixelDistance);
return abs(pixelDist);
}
void main() {
vec3 dEndStart = vViewEnd - vViewStart;
if (dot(dEndStart, dEndStart) < 1e-5) {
discard;
}
vec3 pos;
vec3 normal;
float angleCutoffAdjust;
float depthDiscontinuityAlpha;
if (!laserlineReconstructFromDepth(pos, normal, angleCutoffAdjust, depthDiscontinuityAlpha)) {
discard;
}
float distance = planeDistancePixels(vViewPlane, pos, vViewStart, vViewEnd);
vec4 color = laserlineProfile(distance);
float alpha = (1.0 - smoothstep(0.995 - angleCutoffAdjust, 0.999 - angleCutoffAdjust, abs(dot(normal, vViewPlane.xyz))));
fragColor = laserlineOutput(color * alpha * depthDiscontinuityAlpha);
}`);return n}const l=d.create(),f=g.create();g=Object.freeze(Object.defineProperty({__proto__:null,build:b},Symbol.toStringTag,{value:"Module"}));a.LaserlinePath=g;a.build=b})},"esri/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl":function(){define("exports ./output/ReadDepth.glsl ./util/CameraSpace.glsl ../shaderModules/Float3PassUniform ../shaderModules/FloatPassUniform ../shaderModules/interfaces ../shaderModules/Texture2DPassUniform".split(" "),function(a,c,g,h,d,m,r){a.Laserline=function(x,
t){const z=x.fragment;z.include(c.ReadDepth);x.include(g.CameraSpace);z.uniforms.add(new d.FloatPassUniform("globalAlpha",u=>u.globalAlpha),new h.Float3PassUniform("glowColor",u=>u.glowColor),new d.FloatPassUniform("glowWidth",(u,p)=>u.glowWidth*p.camera.pixelRatio),new d.FloatPassUniform("glowFalloff",u=>u.glowFalloff),new h.Float3PassUniform("innerColor",u=>u.innerColor),new d.FloatPassUniform("innerWidth",(u,p)=>u.innerWidth*p.camera.pixelRatio),new r.Texture2DPassUniform("depthMap",(u,p)=>p.depth?.attachment),
new r.Texture2DPassUniform("normalMap",u=>u.normals),new r.Texture2DPassUniform("frameColor",(u,p)=>p.mainColor));z.code.add(m.glsl`vec4 blendPremultiplied(vec4 source, vec4 dest) {
float oneMinusSourceAlpha = 1.0 - source.a;
return vec4(
source.rgb + dest.rgb * oneMinusSourceAlpha,
source.a + dest.a * oneMinusSourceAlpha
);
}`);z.code.add(m.glsl`vec4 premultipliedColor(vec3 rgb, float alpha) {
return vec4(rgb * alpha, alpha);
}`);z.code.add(m.glsl`vec4 laserlineProfile(float dist) {
if (dist > glowWidth) {
return vec4(0.0);
}
float innerAlpha = (1.0 - smoothstep(0.0, innerWidth, dist));
float glowAlpha = pow(max(0.0, 1.0 - dist / glowWidth), glowFalloff);
return blendPremultiplied(
premultipliedColor(innerColor, innerAlpha),
premultipliedColor(glowColor, glowAlpha)
);
}`);z.code.add(m.glsl`bool laserlineReconstructFromDepth(out vec3 pos, out vec3 normal, out float angleCutoffAdjust, out float depthDiscontinuityAlpha) {
float depth = depthFromTexture(depthMap, uv);
if (depth == 1.0) {
return false;
}
float linearDepth = linearizeDepth(depth);
pos = reconstructPosition(gl_FragCoord.xy, linearDepth);
float minStep = 6e-8;
float depthStep = clamp(depth + minStep, 0.0, 1.0);
float linearDepthStep = linearizeDepth(depthStep);
float depthError = abs(linearDepthStep - linearDepth);
if (depthError > 0.2) {
normal = texture(normalMap, uv).xyz * 2.0 - 1.0;
angleCutoffAdjust = 0.004;
} else {
normal = normalize(cross(dFdx(pos), dFdy(pos)));
angleCutoffAdjust = 0.0;
}
float ddepth = fwidth(linearDepth);
depthDiscontinuityAlpha = 1.0 - smoothstep(0.0, 0.01, -ddepth / linearDepth);
return true;
}`);t.contrastControlEnabled?(z.uniforms.add(new d.FloatPassUniform("globalAlphaContrastBoost",u=>null!=u.globalAlphaContrastBoost?u.globalAlphaContrastBoost:1)),z.code.add(m.glsl`float rgbToLuminance(vec3 color) {
return dot(vec3(0.2126, 0.7152, 0.0722), color);
}
vec4 laserlineOutput(vec4 color) {
float backgroundLuminance = rgbToLuminance(texture(frameColor, uv).rgb);
float alpha = clamp(globalAlpha * max(backgroundLuminance * globalAlphaContrastBoost, 1.0), 0.0, 1.0);
return color * alpha;
}`)):z.code.add(m.glsl`vec4 laserlineOutput(vec4 color) {
return color * globalAlpha;
}`)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration":function(){define(["exports","../../../../../chunks/tslib.es6","../../core/shaderTechnique/ShaderTechniqueConfiguration"],function(a,c,g){class h extends g.ShaderTechniqueConfiguration{constructor(){super(...arguments);this.contrastControlEnabled=!1}}c.__decorate([g.parameter()],h.prototype,"contrastControlEnabled",void 0);a.LaserlinePathTechniqueConfiguration=
h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique":function(){define("require exports ../../../../../core/mathUtils ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../geometry/support/lineSegment ../../core/shaderModules/interfaces ../../core/shaderTechnique/ReloadableShaderModule ../../core/shaderTechnique/ShaderTechnique ../../lib/DefaultVertexAttributeLocations ../../lib/Program ../../../../../chunks/Laserlines.glsl ../../../../webgl/enums ../../../../webgl/renderState".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b){class l extends m.NoParameters{constructor(){super(...arguments);this.innerColor=h.fromValues(1,1,1);this.innerWidth=1;this.glowColor=h.fromValues(1,.5,0);this.glowFalloff=this.glowWidth=8;this.globalAlpha=.75;this.globalAlphaContrastBoost=2;this.angleCutoff=g.deg2rad(6);this.pointDistanceOrigin=h.create();this.pointDistanceTarget=h.create();this.lineVerticalPlaneSegment=d.create();this.intersectsLineSegment=d.create();this.intersectsLineRadius=3;this.heightManifoldTarget=
h.create();this.lineStartWorld=h.create();this.lineEndWorld=h.create()}}class f extends x.ShaderTechnique{initializeProgram(k){return new z.Program(k.rctx,f.shader.get().build(this.configuration),t.Default3D)}initializePipeline(){return b.makePipelineState({blending:b.simpleBlendingParams(p.BlendFactor.ONE,p.BlendFactor.ONE_MINUS_SRC_ALPHA),colorWrite:b.defaultColorWriteParams})}}f.shader=new r.ReloadableShaderModule(u.LaserlinesShader,()=>new Promise((k,n)=>a(["../../shaders/Laserlines.glsl"],k,
n)));c.LaserlinePassParameters=l;c.LaserlineTechnique=f;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/chunks/Laserlines.glsl":function(){define("exports ../core/mathUtils ../core/libs/gl-matrix-2/math/vec2 ../core/libs/gl-matrix-2/factories/vec2f64 ./vec32 ../core/libs/gl-matrix-2/factories/vec3f64 ./vec42 ../core/libs/gl-matrix-2/factories/vec4f64 ../geometry/support/lineSegment ../geometry/support/plane ./sphere ../views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl ../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl ../views/3d/webgl-engine/core/shaderModules/Float2PassUniform ../views/3d/webgl-engine/core/shaderModules/Float3PassUniform ../views/3d/webgl-engine/core/shaderModules/Float4PassUniform ../views/3d/webgl-engine/core/shaderModules/FloatPassUniform ../views/3d/webgl-engine/core/shaderModules/interfaces ../views/3d/webgl-engine/core/shaderModules/ShaderBuilder".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I){function w(J){const L=new I.ShaderBuilder;L.include(b.ScreenSpacePass);L.include(p.Laserline,J);const N=L.fragment;if(J.lineVerticalPlaneEnabled||J.heightManifoldEnabled)N.uniforms.add(new n.FloatPassUniform("maxPixelDistance",(M,K)=>J.heightManifoldEnabled?2*K.camera.computeScreenPixelSizeAt(M.heightManifoldTarget):2*K.camera.computeScreenPixelSizeAt(M.lineVerticalPlaneSegment.origin))),N.code.add(C.glsl`float planeDistancePixels(vec4 plane, vec3 pos) {
float dist = dot(plane.xyz, pos) + plane.w;
float width = fwidth(dist);
dist /= min(width, maxPixelDistance);
return abs(dist);
}`),J.spherical?(N.uniforms.add(new k.Float4PassUniform("heightManifoldOrigin",(M,K)=>{d.transformMat4(B,M.heightManifoldTarget,K.camera.viewMatrix);d.transformMat4(A,[0,0,0],K.camera.viewMatrix);d.subtract(A,A,B);d.normalize(e,A);e[3]=d.length(A);return e}),new f.Float3PassUniform("globalOrigin",(M,K)=>d.transformMat4(B,[0,0,0],K.camera.viewMatrix)),new n.FloatPassUniform("cosSphericalAngleThreshold",(M,K)=>1-Math.max(2,d.distance(K.camera.eye,M.heightManifoldTarget)*K.camera.perRenderPixelRatio)/
d.length(M.heightManifoldTarget))),N.code.add(C.glsl`float globeDistancePixels(float posInGlobalOriginLength) {
float dist = abs(posInGlobalOriginLength - heightManifoldOrigin.w);
float width = fwidth(dist);
dist /= min(width, maxPixelDistance);
return abs(dist);
}
float heightManifoldDistancePixels(vec4 heightPlane, vec3 pos) {
vec3 posInGlobalOriginNorm = normalize(globalOrigin - pos);
float cosAngle = dot(posInGlobalOriginNorm, heightManifoldOrigin.xyz);
vec3 posInGlobalOrigin = globalOrigin - pos;
float posInGlobalOriginLength = length(posInGlobalOrigin);
float sphericalDistance = globeDistancePixels(posInGlobalOriginLength);
float planarDistance = planeDistancePixels(heightPlane, pos);
return cosAngle < cosSphericalAngleThreshold ? sphericalDistance : planarDistance;
}`)):N.code.add(C.glsl`float heightManifoldDistancePixels(vec4 heightPlane, vec3 pos) {
return planeDistancePixels(heightPlane, pos);
}`);J.pointDistanceEnabled&&(N.uniforms.add(new n.FloatPassUniform("maxPixelDistance",(M,K)=>2*K.camera.computeScreenPixelSizeAt(M.pointDistanceTarget))),N.code.add(C.glsl`float sphereDistancePixels(vec4 sphere, vec3 pos) {
float dist = distance(sphere.xyz, pos) - sphere.w;
float width = fwidth(dist);
dist /= min(width, maxPixelDistance);
return abs(dist);
}`));J.intersectsLineEnabled&&(N.uniforms.add(new n.FloatPassUniform("perScreenPixelRatio",(M,K)=>K.camera.perScreenPixelRatio)),N.code.add(C.glsl`float lineDistancePixels(vec3 start, vec3 dir, float radius, vec3 pos) {
float dist = length(cross(dir, pos - start)) / (length(pos) * perScreenPixelRatio);
return abs(dist) - radius;
}`));(J.lineVerticalPlaneEnabled||J.intersectsLineEnabled)&&N.code.add(C.glsl`bool pointIsWithinLine(vec3 pos, vec3 start, vec3 end) {
vec3 dir = end - start;
float t2 = dot(dir, pos - start);
float l2 = dot(dir, dir);
return t2 >= 0.0 && t2 <= l2;
}`);N.code.add(C.glsl`void main() {
vec3 pos;
vec3 normal;
float angleCutoffAdjust;
float depthDiscontinuityAlpha;
if (!laserlineReconstructFromDepth(pos, normal, angleCutoffAdjust, depthDiscontinuityAlpha)) {
discard;
}
vec4 color = vec4(0, 0, 0, 0);`);if(J.heightManifoldEnabled){N.uniforms.add(new l.Float2PassUniform("angleCutoff",K=>y(K)),new k.Float4PassUniform("heightPlane",(K,P)=>F(K.heightManifoldTarget,K.renderCoordsHelper.worldUpAtPosition(K.heightManifoldTarget,B),P.camera.viewMatrix)));const M=J.spherical?C.glsl`normalize(globalOrigin - pos)`:C.glsl`heightPlane.xyz`;N.code.add(C.glsl`
{
vec2 angleCutoffAdjusted = angleCutoff - angleCutoffAdjust;
// Fade out laserlines on flat surfaces
float heightManifoldAlpha = 1.0 - smoothstep(angleCutoffAdjusted.x, angleCutoffAdjusted.y, abs(dot(normal, ${M})));
vec4 heightManifoldColor = laserlineProfile(heightManifoldDistancePixels(heightPlane, pos));
color = max(color, heightManifoldColor * heightManifoldAlpha);
}
`)}J.pointDistanceEnabled&&(N.uniforms.add(new l.Float2PassUniform("angleCutoff",M=>y(M)),new k.Float4PassUniform("pointDistanceSphere",(M,K)=>{d.transformMat4(u.getCenter(H),M.pointDistanceOrigin,K.camera.viewMatrix);H[3]=d.distance(M.pointDistanceOrigin,M.pointDistanceTarget);return H})),N.code.add(C.glsl`{
float pointDistanceSphereDistance = sphereDistancePixels(pointDistanceSphere, pos);
vec4 pointDistanceSphereColor = laserlineProfile(pointDistanceSphereDistance);
float pointDistanceSphereAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, normalize(pos - pointDistanceSphere.xyz))));
color = max(color, pointDistanceSphereColor * pointDistanceSphereAlpha);
}`));J.lineVerticalPlaneEnabled&&(N.uniforms.add(new l.Float2PassUniform("angleCutoff",M=>y(M)),new k.Float4PassUniform("lineVerticalPlane",(M,K)=>{var P=t.pointAt(M.lineVerticalPlaneSegment,.5,B);P=M.renderCoordsHelper.worldUpAtPosition(P,v);const U=d.normalize(A,M.lineVerticalPlaneSegment.vector);P=d.cross(B,P,U);d.normalize(P,P);return F(M.lineVerticalPlaneSegment.origin,P,K.camera.viewMatrix)}),new f.Float3PassUniform("lineVerticalStart",(M,K)=>{const P=d.copy(B,M.lineVerticalPlaneSegment.origin);
M.renderCoordsHelper.setAltitude(P,0);return d.transformMat4(P,P,K.camera.viewMatrix)}),new f.Float3PassUniform("lineVerticalEnd",(M,K)=>{const P=d.add(B,M.lineVerticalPlaneSegment.origin,M.lineVerticalPlaneSegment.vector);M.renderCoordsHelper.setAltitude(P,0);return d.transformMat4(P,P,K.camera.viewMatrix)})),N.code.add(C.glsl`{
if (pointIsWithinLine(pos, lineVerticalStart, lineVerticalEnd)) {
float lineVerticalDistance = planeDistancePixels(lineVerticalPlane, pos);
vec4 lineVerticalColor = laserlineProfile(lineVerticalDistance);
float lineVerticalAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, lineVerticalPlane.xyz)));
color = max(color, lineVerticalColor * lineVerticalAlpha);
}
}`));J.intersectsLineEnabled&&(N.uniforms.add(new l.Float2PassUniform("angleCutoff",M=>y(M)),new f.Float3PassUniform("intersectsLineStart",(M,K)=>d.transformMat4(B,M.lineStartWorld,K.camera.viewMatrix)),new f.Float3PassUniform("intersectsLineEnd",(M,K)=>d.transformMat4(B,M.lineEndWorld,K.camera.viewMatrix)),new f.Float3PassUniform("intersectsLineDirection",(M,K)=>{d.copy(e,M.intersectsLineSegment.vector);e[3]=0;return d.normalize(B,r.transformMat4(e,e,K.camera.viewMatrix))}),new n.FloatPassUniform("intersectsLineRadius",
M=>M.intersectsLineRadius)),N.code.add(C.glsl`{
if (pointIsWithinLine(pos, intersectsLineStart, intersectsLineEnd)) {
float intersectsLineDistance = lineDistancePixels(intersectsLineStart, intersectsLineDirection, intersectsLineRadius, pos);
vec4 intersectsLineColor = laserlineProfile(intersectsLineDistance);
float intersectsLineAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, 1.0 - abs(dot(normal, intersectsLineDirection)));
color = max(color, intersectsLineColor * intersectsLineAlpha);
}
}`));N.code.add(C.glsl`fragColor = laserlineOutput(color * depthDiscontinuityAlpha);
}`);return L}function y(J){return g.set(q,Math.cos(J.angleCutoff),Math.cos(Math.max(0,J.angleCutoff-c.deg2rad(2))))}function F(J,L,N){d.transformMat4(D,J,N);d.copy(e,L);e[3]=0;r.transformMat4(e,e,N);return z.fromPositionAndNormal(D,e,E)}const G=c.deg2rad(6),q=h.create(),B=m.create(),e=x.create(),v=m.create(),A=m.create(),D=m.create(),E=z.create(),H=u.create();h=Object.freeze(Object.defineProperty({__proto__:null,build:w,defaultAngleCutoff:G},Symbol.toStringTag,{value:"Module"}));a.LaserlinesShader=
h;a.build=w;a.defaultAngleCutoff=G})},"esri/views/3d/webgl-engine/effects/laserlines/LaserlineTechniqueConfiguration":function(){define(["exports","../../../../../chunks/tslib.es6","../../core/shaderTechnique/ShaderTechniqueConfiguration","./LaserlinePathTechniqueConfiguration"],function(a,c,g,h){class d extends h.LaserlinePathTechniqueConfiguration{constructor(){super(...arguments);this.spherical=this.intersectsLineEnabled=this.lineVerticalPlaneEnabled=this.pointDistanceEnabled=this.heightManifoldEnabled=
!1}}c.__decorate([g.parameter()],d.prototype,"heightManifoldEnabled",void 0);c.__decorate([g.parameter()],d.prototype,"pointDistanceEnabled",void 0);c.__decorate([g.parameter()],d.prototype,"lineVerticalPlaneEnabled",void 0);c.__decorate([g.parameter()],d.prototype,"intersectsLineEnabled",void 0);c.__decorate([g.parameter()],d.prototype,"spherical",void 0);a.LaserlineTechniqueConfiguration=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/ParallelLineVisualElement":function(){define("exports ../../../../core/reactiveUtils ../../../../core/screenUtils ../../../../core/libs/gl-matrix-2/math/vec2 ../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f32 ../../../../layers/graphics/dehydratedPoint ./EngineVisualElement ../../terrain/OverlayRenderer ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/lib/RenderGeometry ../../webgl-engine/lib/VertexAttribute ../../webgl-engine/materials/RibbonLineMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n){function C(E){return[b.createPolylineGeometry(E,[r.create(),r.create()]),b.createPolylineGeometry(E,[r.create(),r.create()])]}function I(E,H,J,L,N,M){J=h.scale(q,h.set(q,E[1]*J,E[0]*-J),L+N/2);H=h.add(B,h.add(B,h.add(B,H,h.scale(B,E,M/2)),J),J);E=h.add(e,H,h.scale(e,E,-M));return{start:H,end:E}}function w(E){E.geometries.length=0}function y(E){E.pixelRatioHandle.remove();E.geometries=[]}class F extends u.EngineVisualElement{constructor(E){super(E);this._location=
r.create();this._direction=r.fromValues(1,0,0);this._offset=this._width=1;this._length=18;this._color=t.fromValues(1,0,1,1);this._renderOccluded=l.RenderOccludedFlag.OccludeAndTransparent;this.applyProperties(E)}createObject3DResourceFactory(E){return{view:E,createResources:H=>this._createObject3DResources(H),destroyResources:w,recreateGeometry:(H,J)=>this._recreateObject3DGeometry(H,J),cameraChanged:()=>this._updateGeometry()}}createDrapedResourceFactory(E){return{view:E,createResources:()=>this._createDrapedResources(),
destroyResources:y,recreateGeometry:H=>this._recreateDrapedGeometry(H)}}get location(){return this._location}set location(E){m.exactEquals(this._location,E)||(m.copy(this._location,E),this._updateGeometry())}get direction(){return this._direction}set direction(E){m.exactEquals(this._direction,E)||(m.copy(this._direction,E),this._updateGeometry())}setDirectionFromPoints(E,H){m.normalize(this._direction,m.subtract(this._direction,H,E));this._updateGeometry()}get width(){return this._width}set width(E){E!==
this._width&&(this._width=E,this._updateMaterial())}get offset(){return this._offset}set offset(E){E!==this._offset&&(this._offset=E,this._updateGeometry())}get length(){return this._length}set length(E){E!==this._length&&(this._length=E,this._updateGeometry())}get color(){return this._color}set color(E){x.exactEquals(E,this._color)||(x.copy(this._color,E),this._updateMaterial())}get renderOccluded(){return this._renderOccluded}set renderOccluded(E){E!==this._renderOccluded&&(this._renderOccluded=
E,this._updateMaterial())}_createObject3DResources(E){const H=new n.RibbonLineMaterial(this.materialParameters),J=[];this._createObject3DGeometry(H,E,J);return{material:H,geometries:J,forEach:L=>{L(H);J.forEach(L)}}}_recreateObject3DGeometry(E,H){E.geometries.length=0;this._createObject3DGeometry(E.material,H,E.geometries)}_createObject3DGeometry(E,H,J){const [L,N]=C(E);H.addGeometry(L);H.addGeometry(N);J.push(L);J.push(N);this._updateVerticesObject3D(H)}_createDrapedResources(){const E=new n.RibbonLineMaterial(this.materialParameters),
H=c.watch(()=>this.view.state.contentPixelRatio,()=>{this.drapedResources.recreateGeometry()});return{material:E,geometries:this._createDrapedGeometry(E),pixelRatioHandle:H}}_recreateDrapedGeometry(E){E.geometries=this._createDrapedGeometry(E.material)}_createDrapedGeometry(E){E=C(E);this._updateVerticesDraped(E);return E.map(H=>new f.RenderGeometry(H))}_updateMaterial(){const {materialParameters:E}=this;this.object3dResources.resources?.material.setParameters(E);this.drapedResources.resources?.material.setParameters(E)}get materialParameters(){return{width:this._width,
color:this._color,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const E=this.object3dResources.object;E&&this._updateVerticesObject3D(E)}}_updateVerticesObject3D(E){const H=this.view.state.camera;H.projectToScreen(this.location,v);m.add(G,this.location,this.direction);H.projectToScreen(G,A);h.normalize(A,h.subtract(A,A,v));this._updateVertexAttributesObject3D(H,E,0,v,A,1);this._updateVertexAttributesObject3D(H,
E,1,v,A,-1)}_updateVertexAttributesObject3D(E,H,J,L,N,M){J=H.geometries[J];const K=J.getMutableAttribute(k.VertexAttribute.POSITION)?.data;if(K){var {start:P,end:U}=I(N,L,M,this.offset,this.width,this.length);E.unprojectFromScreen(g.castScreenPointArray(P),G);K[0]=G[0];K[1]=G[1];K[2]=G[2];E.unprojectFromScreen(g.castScreenPointArray(U),G);K[3]=G[0];K[4]=G[1];K[5]=G[2];H.geometryVertexAttributeUpdated(J,k.VertexAttribute.POSITION)}}_updateVerticesDraped(E){const {view:{basemapTerrain:{overlayManager:H},
state:{contentPixelRatio:J}}}=this,{location:L,width:N,length:M,offset:K}=this;var P=D;P.spatialReference=H.renderer.spatialReference;P.x=L[0];P.y=L[1];var U=this.view.overlayPixelSizeInMapUnits(P)*J;P=N*U;const V=M*U;U*=K;this._updateVertexAttributesDraped(E[0],P,V,U,-1);this._updateVertexAttributesDraped(E[1],P,V,U,1)}_updateVertexAttributesDraped(E,H,J,L,N){const M=E.getMutableAttribute(k.VertexAttribute.POSITION)?.data;if(M){var {location:K,direction:P}=this,{start:U,end:V}=I(P,K,N,L,H,J);M[0]=
U[0];M[1]=U[1];M[2]=p.drapedZ;M[3]=V[0];M[4]=V[1];M[5]=p.drapedZ;E.invalidateBoundingInfo()}}}const G=r.create(),q=d.create(),B=d.create(),e=d.create(),v=g.createScreenPointArray(),A=g.createScreenPointArray(),D=z.makeDehydratedPoint(0,0,void 0,null);a.ParallelLineVisualElement=F;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/PointVisualElement":function(){define("exports ../../../../core/mathUtils ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f64 ../../../../geometry/projection/projectVectorToVector ../../../../geometry/support/aaBoundingBox ../../../../geometry/support/vectorStacks ./Object3DVisualElement ../../layers/graphics/elevationAlignmentUtils ../../layers/graphics/ElevationContext ../../support/engineContent/sdfPrimitives ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/VertexAttribute ../../webgl-engine/materials/HUDMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k){class n extends z.Object3DVisualElement{constructor(y){super(y);this._geometry=this._texture=this._material=null;this._size=3;this._color=m.fromValues(1,0,1,1);this._pixelSnappingEnabled=!0;this._primitive="square";this._outlineSize=1;this._outlineColor=m.fromValues(1,1,1,1);this._elevationInfo=null;this.applyProperties(y)}get geometry(){return this._geometry}set geometry(y){this._geometry=y;this.recreateGeometry()}get size(){return this._size}set size(y){if(y!==
this._size){const F=this._preferredTextureSize;this._size=y;F<this._preferredTextureSize?this.recreate():this._updateSizeAttribute()}}get color(){return this._color}set color(y){d.exactEquals(y,this._color)||(d.copy(this._color,y),this._updateMaterial())}get pixelSnappingEnabled(){return this._pixelSnappingEnabled}set pixelSnappingEnabled(y){this._pixelSnappingEnabled!==y&&(this._pixelSnappingEnabled=y,this._updateMaterial())}get primitive(){return this._primitive}set primitive(y){this._primitive!==
y&&(this._primitive=y,this.recreate())}get outlineSize(){return this._outlineSize}set outlineSize(y){y!==this._outlineSize&&(this._outlineSize=y,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(y){d.exactEquals(y,this._outlineColor)||(d.copy(this._outlineColor,y),this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(y){this._elevationInfo=y;this.recreateGeometry()}_updateMaterial(){this._material&&this._material.setParameters(this._materialParameters)}_updateSizeAttribute(){const y=
this.object;if(null!=y){var F=y.geometries[0];if(null!=F){F=F.getMutableAttribute(f.VertexAttribute.SIZE).data;var G=this._geometrySize;F[0]=G;F[1]=G;y.geometryVertexAttributeUpdated(y.geometries[0],f.VertexAttribute.SIZE)}}}get _materialParameters(){return{color:this._color,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:b.requiresHalfTexelOffset(this._primitive),distanceFieldBoundingBox:I,occlusionTest:!1,outlineColor:this._outlineColor,outlineSize:this._outlineSize,textureId:this._texture?.id,
polygonOffset:!1,shaderPolygonOffset:0,drawInSecondSlot:!0,depthEnabled:!1,pixelSnappingEnabled:this.pixelSnappingEnabled,isDecoration:this.isDecoration}}get _geometrySize(){return this._size/C}createExternalResources(){this._texture=b.createTexture(this._primitive,this._preferredTextureSize);this._material=new k.HUDMaterial(this._materialParameters);const y=this.view._stage;this._texture.load(y.renderView.renderingContext);y.add(this._texture)}destroyExternalResources(){this._texture&&(this.view._stage.remove(this._texture),
this._texture.dispose(),this._texture=null);this._material=null}createGeometries(y){const F=this._createRenderGeometry();null!=F&&y.addGeometry(F)}forEachExternalMaterial(y){this._material&&y(this._material)}get _preferredTextureSize(){return c.clamp(2*this._geometrySize,16,128)}calculateMapBounds(y){var F=this.object?.geometries[0];if(!F)return!1;F=F.attributes.get(f.VertexAttribute.POSITION).data;r.projectVectorToVector(F,this.view.renderCoordsHelper.spatialReference,w,this.view.spatialReference);
x.expandWithBuffer(y,w);return!0}_createRenderGeometry(){const {geometry:y,_material:F}=this;if(null==y||null==F)return null;const {renderCoordsHelper:G,elevationProvider:q}=this.view;var B=u.evaluateElevationAlignmentAtPoint(y,q,p.ElevationContext.fromElevationInfo(this.elevationInfo),G),e=g.set(t.sv3d.get(),y.x,y.y,B);B=t.sv3d.get();r.projectVectorToVector(e,y.spatialReference,B,G.spatialReference);e=this._geometrySize;return l.createPointGeometry(F,null,B,null,[e,e],[0,0,0,1])}}const C=b.defaultSymbolSizeRatio,
I=[C/2,C/2,1-C/2,1-C/2],w=h.create();a.PointVisualElement=n;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/Object3DVisualElement":function(){define("exports ../../../../core/libs/gl-matrix-2/math/mat4 ../../../../core/libs/gl-matrix-2/factories/mat4f64 ./VisualElement ../../webgl-engine/lib/Object3D ../../webgl-engine/lib/UpdatePolicy ../../webgl-engine/lib/WebGLLayer".split(" "),function(a,c,g,h,d,m,r){class x extends h.VisualElement{constructor(t){super(t);
this._resources=null;this._transform=g.create()}get object(){return null!=this._resources?this._resources.object:null}get transform(){return this._transform}set transform(t){c.copy(this._transform,t);null!=this._resources&&(this._resources.object.transformation=this._transform)}recreate(){this.attached&&this.createResources()}recreateGeometry(){if(null!=this._resources){var t=this._resources.object,z=this.view._stage;z.removeMany(t.geometries);t.removeAllGeometries();this.createGeometries(t);t.visible=
this.visible;z.addMany(t.geometries)}}createResources(){this.destroyResources();const t=this.view._stage;if(t){var z=new r.WebGLLayer(t,{pickable:!1,updatePolicy:m.UpdatePolicy.SYNC}),u=new d.Object3D({castShadow:!1});u.transformation=this._transform;this.createExternalResources();this.createGeometries(u);t.addMany(u.geometries);this.forEachExternalMaterial(p=>t.add(p));t.add(u);z.add(u);u.visible=this.visible;this._resources={layer:z,object:u}}}destroyResources(){const t=this.view._stage;null!=this._resources&&
t&&(t.remove(this._resources.object),this._resources.layer.destroy(),this.forEachExternalMaterial(z=>{t.remove(z)}),t.removeMany(this._resources.object.geometries),this._resources.object.dispose(),this.destroyExternalResources(),this._resources=null)}updateVisibility(t){null!=this._resources&&(this._resources.object.visible=t)}}a.Object3DVisualElement=x;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/RightAngleQuadVisualElement":function(){define("exports ../../../../core/reactiveUtils ../../../../core/libs/gl-matrix-2/math/mat4 ../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f64 ../../../../geometry/support/vectorStacks ../../../../layers/graphics/dehydratedPoint ./EngineVisualElement ../../terrain/OverlayRenderer ../../webgl-engine/lib/Attribute ../../webgl-engine/lib/Geometry ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/lib/RenderGeometry ../../webgl-engine/lib/VertexAttribute ../../webgl-engine/materials/ColorMaterial ../../webgl-engine/materials/RibbonLineMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w){function y(B){B.pixelRatioHandle.remove();B.geometries=[]}class F extends u.EngineVisualElement{constructor(B){super(B);this._maxSize=0;this._position=m.create();this._up=m.create();this._right=m.create();this._renderOccluded=k.RenderOccludedFlag.OccludeAndTransparent;this._color=x.fromValues(1,0,0,1);this._outlineColor=x.fromValues(0,0,0,1);this._outlineSize=0;this._size=32;this._outlineRenderOccluded=k.RenderOccludedFlag.Opaque;this.applyProperties(B)}createObject3DResourceFactory(B){return{view:B,
createResources:e=>this._createObject3DResources(e),destroyResources:()=>{},cameraChanged:()=>this._updateTransformObject3D()}}createDrapedResourceFactory(B){return{view:B,createResources:()=>this._createDrapedResources(),destroyResources:y}}get renderOccluded(){return this._renderOccluded}set renderOccluded(B){B!==this._renderOccluded&&(this._renderOccluded=B,this._updateQuadMaterial())}get color(){return this._color}set color(B){r.copy(this._color,B);this._updateQuadMaterial()}get outlineColor(){return this._outlineColor}set outlineColor(B){r.copy(this._outlineColor,
B);this._updateOutlineMaterial()}get outlineSize(){return this._outlineSize}set outlineSize(B){const e=0===this._outlineSize!==(0===B);this._outlineSize=B;e?this.recreateGeometry():this._updateOutlineMaterial()}get size(){return this._size}set size(B){B!==this._size&&(this._size=B,this._updateTransform())}get outlineRenderOccluded(){return this._outlineRenderOccluded}set outlineRenderOccluded(B){this._outlineRenderOccluded=B;this._updateOutlineMaterial()}set geometry({previous:B,center:e,next:v}){this._maxSize=
Math.min(d.distance(e,B),d.distance(e,v))/3;d.normalize(this._up,d.subtract(this._up,B,e));d.normalize(this._right,d.subtract(this._right,v,e));d.copy(this._position,e);this.recreateGeometry()}_createObject3DResources(B){const e=new I.ColorMaterial(this._quadMaterialParameters),v=0===this._outlineSize?void 0:new w.RibbonLineMaterial(this._outlineMaterialParameters);this._createObject3DGeometries(B,e,v);return{quadMaterial:e,outlineMaterial:v,forEach:A=>{A(e);v&&A(v)}}}_createObject3DGeometries(B,
e,v){if(!d.exactEquals(this._up,m.ZEROS)||!d.exactEquals(this._right,m.ZEROS)){e=this._createGeometries(e,v);for(const A of e)B.addGeometry(A);this._updateTransformObject3D(B)}}_createDrapedResources(){const B=new I.ColorMaterial(this._quadMaterialParameters),e=0===this._outlineSize?void 0:new w.RibbonLineMaterial(this._outlineMaterialParameters),v=this._createGeometries(B,e).map(D=>new n.RenderGeometry(D));this._setTransformDraped(v);const A=c.watch(()=>this.view.state.contentPixelRatio,()=>{this.drapedResources.recreateGeometry()});
return{quadMaterial:B,outlineMaterial:e,geometries:v,pixelRatioHandle:A}}_createGeometries(B,e){const {up:v,right:A,corner:D}=this._getVertices();B=new l.Geometry(B,[[C.VertexAttribute.POSITION,new b.Attribute([0,0,0,...A,...v,...D],[0,1,2,1,2,3],3,!0)]]);if(!e)return[B];e=f.createPolylineGeometry(e,[v,D,A]);return[B,e]}_getVertices(){let B=this._up,e=this._right;const v=d.add(t.sv3d.get(),B,e);this.isDraped&&(B=d.copy(t.sv3d.get(),B),e=d.copy(t.sv3d.get(),e),B[2]=0,e[2]=0,v[2]=0);return{up:B,right:e,
corner:v}}_updateTransform(){this.isDraped?this.drapedResources.recreateGeometry():this._updateTransformObject3D()}_updateTransformObject3D(B=this.object3dResources.object){if(B){var e=this._size*this.view.state.camera.computeScreenPixelSizeAt(this._position);e=Math.min(this._maxSize,e);g.fromTranslation(G,this._position);g.scale(G,G,[e,e,e]);B.transformation=G}}_setTransformDraped(B){if(0!==B.length){var {view:{basemapTerrain:{overlayManager:e},state:{contentPixelRatio:v}}}=this,{_position:A,_size:D}=
this,E=d.copy(t.sv3d.get(),A);E[2]=p.drapedZ;var H=q;H.spatialReference=e.renderer.spatialReference;H.x=E[0];H.y=E[1];H=this.view.overlayPixelSizeInMapUnits(H)*v;H=Math.min(this._maxSize,D*H);g.fromTranslation(G,E);g.scale(G,G,[H,H,1]);for(const J of B)J.transformation=G}}get _quadMaterialParameters(){return{color:this._color,forceTransparentMode:!0,writeDepth:!1,polygonOffset:!0,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateQuadMaterial(){this.object3dResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters);
this.drapedResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters)}get _outlineMaterialParameters(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded,isDecoration:this.isDecoration}}_updateOutlineMaterial(){this.object3dResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters);this.drapedResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters)}}const G=h.create(),q=z.makeDehydratedPoint(0,
0,void 0,null);a.RightAngleQuadVisualElement=F;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/sketch/normalizedPoint":function(){define(["exports","../../../core/libs/gl-matrix-2/factories/vec3f64","../../../layers/graphics/dehydratedPoint","../../../support/elevationInfoUtils"],function(a,c,g,h){function d(t=0,z=0,u=0){return c.fromValues(t,z,u)}function m(t,z,u,p=d()){p[0]=t.x;p[1]=t.y;p[2]=t.z??0;if(null==z)return p;p[2]="2d"===z.type?0:h.getConvertedElevation(z,
t,u,h.absoluteHeightElevationInfo)??0;return p}var r;(function(t){t[t.NONE=0]="NONE";t[t.TARGET=1]="TARGET"})(r||={});const x=g.makeDehydratedPoint(0,0,0,null);a.asVec2=function(t){return t};a.clone=function(t){const [z,u,p]=t;return 3<t.length?[z,u,p,t[3]]:[z,u,p]};a.create=function(t,z,u){return d(t,z,u)};a.createWritable=d;a.fromAnyMapPoint=function(t,z,{coordinateHelper:u,elevationInfo:p},b){return t?m(u.vectorToDehydratedPoint(t,x),z,p,b):null};a.fromPoint=m;a.fromValues=function(t,z,u){return c.fromValues(t,
z,u)};a.fromVec3=function(t){return t};a.isTarget=function(t){return!!(((3<t.length?t[3]:void 0)??r.NONE)&r.TARGET)};a.markAsTarget=function(t){t[3]=((3<t.length?t[3]:void 0)??r.NONE)|r.TARGET;return t};a.toDehydratedPoint=function(t,z,u){return u?(g.setDehydratedPoint(u,t[0],t[1],t[2],z),u):g.makeDehydratedPoint(t[0],t[1],t[2],z)};a.toElevationAlignedDehydratedPoint=function(t,z,{z:u,m:p},b,l){const {spatialReference:f,elevationInfo:k}=b;z=null==u&&null==p?void 0:null==z||"2d"===z.type?u??void 0:
h.getConvertedElevationFromVector(z,t,f,h.absoluteHeightElevationInfo,k)??0;const [n,C]=t;l?g.setDehydratedPoint(l,n,C,z,f):l=g.makeDehydratedPoint(n,C,z,f);null!=p&&(l.m=p,l.hasM=!0);return l};a.withSelfSnappingZ=function(t,z,u,p,b=d()){const [l,f]=t;b[0]=l;b[1]=f;3<t.length&&(b[3]=t[3]??r.NONE);if("3d"!==u?.type)return b[2]=z.value,b;b[2]=h.getConvertedElevationFromXYZ(u,l,f,z.value,p,z.elevationInfo,h.absoluteHeightElevationInfo)??0;return b};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/snapping/Settings":function(){define("exports ../../../chunks/tslib.es6 ../../../Color ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/accessorSupport/decorators/subclass".split(" "),function(a,c,g,h,d,m){let r=class extends h.JSONSupport{constructor(){super(...arguments);this.enabled=!0}};c.__decorate([d.property({type:Boolean})],r.prototype,"enabled",void 0);r=c.__decorate([m.subclass("esri.views.interactive.snapping.Settings.DefaultSnappingAlgorithm")],
r);h=class extends h.JSONSupport{constructor(x){super(x);this.lineSnapper=new r;this.parallelLineSnapper=new r;this.rightAngleSnapper=new r;this.rightAngleTriangleSnapper=new r;this.shortLineThreshold=15;this.distance=5;this.parallelLineThreshold=this.intersectionParallelLineThreshold=this.pointThreshold=1E-6;this.verticalLineThresholdMeters=.3;this.touchSensitivityMultiplier=1.5;this.pointOnLineThreshold=1E-6;this.orange=new g([255,127,0]);this.orangeTransparent=new g([255,127,0,.5]);this.lineHintWidthTarget=
this.lineHintWidthReference=3;this.lineHintFadedExtensions=.3;this.parallelLineHintWidth=2;this.parallelLineHintLength=24;this.parallelLineHintOffset=1.5;this.rightAngleHintSize=24;this.rightAngleHintOutlineSize=1.5;this.satisfiesConstraintScreenThreshold=1}};c.__decorate([d.property({type:r,constructOnly:!0,nonNullable:!0,json:{write:!0}})],h.prototype,"lineSnapper",void 0);c.__decorate([d.property({type:r,constructOnly:!0,nonNullable:!0,json:{write:!0}})],h.prototype,"parallelLineSnapper",void 0);
c.__decorate([d.property({type:r,constructOnly:!0,nonNullable:!0,json:{write:!0}})],h.prototype,"rightAngleSnapper",void 0);c.__decorate([d.property({type:r,constructOnly:!0,nonNullable:!0,json:{write:!0}})],h.prototype,"rightAngleTriangleSnapper",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:-1,max:50,step:1},json:{write:!0}})],h.prototype,"shortLineThreshold",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:-1,max:50,step:1},json:{write:!0}})],h.prototype,
"distance",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:1E-5},json:{write:!0}})],h.prototype,"pointThreshold",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:1E-5},json:{write:!0}})],h.prototype,"intersectionParallelLineThreshold",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:1E-5},json:{write:!0}})],h.prototype,"parallelLineThreshold",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,
max:1},json:{write:!0}})],h.prototype,"verticalLineThresholdMeters",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],h.prototype,"touchSensitivityMultiplier",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:1E-5},json:{write:!0}})],h.prototype,"pointOnLineThreshold",void 0);c.__decorate([d.property({type:g,nonNullable:!0})],h.prototype,"orange",void 0);c.__decorate([d.property({type:g,nonNullable:!0})],h.prototype,"orangeTransparent",
void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],h.prototype,"lineHintWidthReference",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],h.prototype,"lineHintWidthTarget",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],h.prototype,"lineHintFadedExtensions",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],
h.prototype,"parallelLineHintWidth",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:50},json:{write:!0}})],h.prototype,"parallelLineHintLength",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:5},json:{write:!0}})],h.prototype,"parallelLineHintOffset",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:46},json:{write:!0}})],h.prototype,"rightAngleHintSize",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,
range:{min:0,max:6},json:{write:!0}})],h.prototype,"rightAngleHintOutlineSize",void 0);c.__decorate([d.property({type:Number,nonNullable:!0,range:{min:0,max:5},json:{write:!0}})],h.prototype,"satisfiesConstraintScreenThreshold",void 0);h=c.__decorate([m.subclass("esri.views.interactive.snapping.Settings.Defaults")],h);c=new h;a.defaults=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/SnappingDomain":function(){define(["exports"],function(a){a.SnappingDomain=
void 0;var c=a.SnappingDomain||(a.SnappingDomain={});c[c.FEATURE=1]="FEATURE";c[c.SELF=2]="SELF";c[c.ALL=3]="ALL";Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/snappingUtils":function(){define("exports ../../../core/reactiveUtils ../../../core/SetUtils ../../../core/sql ../../../core/timeUtils ../../../chunks/vec32 ../../../layers/graphics/dehydratedPoint ../../../rest/support/Query ../../input/InputManager ../keybindings ../sketch/normalizedPoint ../../../webmap/utils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){function b(f,k){const n=f.x-k.x;f=f.y-k.y;return n*n+f*f}a.LineSegmentHintType=void 0;(function(f){f[f.TARGET=0]="TARGET";f[f.REFERENCE=1]="REFERENCE";f[f.REFERENCE_EXTENSION=2]="REFERENCE_EXTENSION"})(a.LineSegmentHintType||(a.LineSegmentHintType={}));const l=Symbol("snapping-toggle");a.editEdgeToSnappingEdge=function(f,k,n){return{left:u.fromAnyMapPoint(f.leftVertex.pos,k,n),right:u.fromAnyMapPoint(f.rightVertex.pos,k,n)}};a.isUtilityNetworkWebMap=function(f){return p.isWebMap(f)&&
"utilityNetworks"in f&&!!f.utilityNetworks?.length};a.makeFilter=function(f){return f.createQuery()};a.makeSnappingQuery=function({point:f,distance:k,returnEdge:n,vertexMode:C,coordinateHelper:{spatialReference:I},filter:w},y,F){F=null!=F?F.clone():new x({where:"1\x3d1"});if(w){F.geometry=w.geometry;F.distance=w.distance;F.spatialRelationship=w.spatialRelationship;F.where=h.sqlAnd(F.where,w.where);F.timeExtent=d.mergeTimeExtents(F.timeExtent,w.timeExtent);var G=F;var q=F.objectIds;w=w.objectIds;q=
q||w?w?q?Array.from(g.intersection(new Set(q),new Set(w))):w:q:null;G.objectIds=q}return{point:r.makeDehydratedPoint(f[0],f[1],f[2],I.toJSON()),mode:y,distance:k,returnEdge:n,vertexMode:C,query:F.toJSON()}};a.objectEqual=function(f,k){const n=f.length===k.length&&f[0]===k[0]&&f[1]===k[1];switch(f.length){case 2:return n;case 3:return n&&f[2]===k[2];case 4:return n&&f[2]===k[2]&&f[3]===k[3]}return!1};a.screenDistance=function(f,k){return Math.sqrt(b(f,k))};a.setupSnappingToggleHandles=function(f,k=
()=>{}){const n=c.watch(()=>({view:f.view,snappingOptions:f.snappingOptions}),({view:C,snappingOptions:I})=>{f.removeHandles(l);if(C&&I){var w=t.ViewEventPriorities.TOOL;C=[C.on("key-down",y=>{y.key!==z.snappingKeys.toggle||y.repeat||(I.enabledToggled=!0,k())},w),C.on("key-up",y=>{y.key===z.snappingKeys.toggle&&(I.enabledToggled=!1,k())},w),C.on("pointer-move",y=>{y=y.native.ctrlKey;I.enabledToggled!==y&&(I.enabledToggled=y,k())},w)];f.addHandles(C,l)}},c.syncAndInitial);f.addHandles(n)};a.sortCandidatesInPlace=
function(f,k){k.sort((n,C)=>{n=m.squaredDistance(n.targetPoint,f);C=m.squaredDistance(C.targetPoint,f);return n-C})};a.squaredScreenDistance=b;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/keybindings":function(){define("exports ../../core/arrayUtils ../../core/handleUtils ../../core/MapUtils ../input/InputManager ../input/keys".split(" "),function(a,c,g,h,d,m){m={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:m.primaryKey,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},undo:"z",redo:"r"};class r{constructor(){this._bindings=new Map}add(t,z){return this.addToggle(t,u=>{"key-down"===u.type&&
z(u)})}addToggle(t,z){const u=x.fromDefinition(t,z),p=h.getOrCreateMapValue(this._bindings,u.key,()=>[]);p.push(u);return g.makeHandle(()=>c.remove(p,u))}register(t,z=d.ViewEventPriorities.WIDGET){return g.handlesGroup([t.on("key-down",u=>this.dispatch(t.inputManager,u),z),t.on("key-up",u=>this.dispatch(t.inputManager,u),z)])}dispatch(t,z){const u=this._bindings.get(z.key);if(u)for(const p of u)p.process(t,z)}}class x{constructor(t,z,u,p,b){this.key=t;this.modifiers=z;this.repeats=u;this.continuePropagation=
p;this.callback=b}process(t,z){if(!(z.key!==this.key||"repeat"in z&&z.repeat&&!this.repeats)){for(const u of this.modifiers)if(!t.isModifierKeyDown(u))return;this.continuePropagation||z.stopPropagation();this.callback(z)}}static fromDefinition(t,z){if("string"===typeof t)return new x(t,[],!1,!1,z);const {key:u,modifier:p,repeats:b,continuePropagation:l}=t;return new x(u,p?Array.isArray(p)?p:[p]:[],!!b,!!l,z)}}a.KeyBindings=r;a.mediaKeys=m;a.sketchKeys={redo:"r",undo:"z",center:"Alt",constraint:"Shift",
cancel:"Escape",delete:["Backspace","Delete"],complete:"Enter",vertexAdd:"f",pan:" "};a.snappingKeys={toggle:"Control"};a.tooltipKeys={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/SnappingVisualizer":function(){define("exports ../../../core/handleUtils ./hints/IntersectionSnappingHint ./hints/LineSnappingHint ./hints/ParallelSnappingHint ./hints/PointSnappingHint ./hints/RightAngleSnappingHint".split(" "),
function(a,c,g,h,d,m,r){class x{draw(t,z){var u=[];for(var p of t){t=!0;for(const b of u)if(p.equals(b)){t=!1;break}t&&u.push(p)}u=this.sortUniqueHints(u);p=[];for(const b of u)b instanceof g.IntersectionSnappingHint&&p.push(this.visualizeIntersectionPoint(b,z)),b instanceof h.LineSnappingHint&&p.push(this.visualizeLine(b,z)),b instanceof d.ParallelSnappingHint&&p.push(this.visualizeParallelSign(b,z)),b instanceof r.RightAngleSnappingHint&&p.push(this.visualizeRightAngleQuad(b,z)),b instanceof m.PointSnappingHint&&
p.push(this.visualizePoint(b,z));return c.handlesGroup(p)}sortUniqueHints(t){return t}}a.SnappingVisualizer=x;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/hints/IntersectionSnappingHint":function(){define(["exports","../../../../chunks/vec32","../SnappingDomain","./SnappingHint"],function(a,c,g,h){class d extends h.SnappingHint{constructor(m,r,x=g.SnappingDomain.ALL){super(r,x);this.intersectionPoint=m}equals(m){return m instanceof d?c.exactEquals(this.intersectionPoint,
m.intersectionPoint):!1}}a.IntersectionSnappingHint=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/hints/SnappingHint":function(){define(["exports"],function(a){class c{constructor(g,h){this.isDraped=g;this.domain=h}}a.SnappingHint=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/hints/LineSnappingHint":function(){define("exports ../../../../core/has ../../../../core/Logger ../../../../chunks/vec32 ../SnappingDomain ./SnappingHint".split(" "),
function(a,c,g,h,d,m){class r extends m.SnappingHint{constructor(x,t,z,u,p=d.SnappingDomain.ALL,b=!0,l=!0){super(u,p);this.type=x;this.lineStart=t;this.lineEnd=z;this.fadeLeft=b;this.fadeRight=l}equals(x){return x instanceof r?this.type===x.type&&h.exactEquals(this.lineStart,x.lineStart)&&h.exactEquals(this.lineEnd,x.lineEnd)&&this.fadeLeft===x.fadeLeft&&this.fadeRight===x.fadeRight:!1}get length(){return h.distance(this.lineStart,this.lineEnd)}}a.LineSnappingHint=r;Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/snapping/hints/ParallelSnappingHint":function(){define("exports ../../../../core/has ../../../../core/Logger ../../../../chunks/vec32 ../SnappingDomain ./SnappingHint".split(" "),function(a,c,g,h,d,m){class r extends m.SnappingHint{constructor(x,t,z,u=d.SnappingDomain.ALL){super(z,u);this.lineStart=x;this.lineEnd=t}equals(x){return x instanceof r?h.exactEquals(this.lineStart,x.lineStart)&&h.exactEquals(this.lineEnd,x.lineEnd):!1}}a.ParallelSnappingHint=
r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/hints/PointSnappingHint":function(){define(["exports","../../../../chunks/vec32","./SnappingHint"],function(a,c,g){class h extends g.SnappingHint{constructor(d,m,r){super(m,r);this.point=d}equals(d){return d instanceof h?c.exactEquals(this.point,d.point):!1}}a.PointSnappingHint=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/hints/RightAngleSnappingHint":function(){define("exports ../../../../core/has ../../../../core/Logger ../../../../chunks/vec32 ../SnappingDomain ./SnappingHint".split(" "),
function(a,c,g,h,d,m){class r extends m.SnappingHint{constructor(x,t,z,u,p=d.SnappingDomain.ALL){super(u,p);this.previousVertex=x;this.centerVertex=t;this.nextVertex=z}equals(x){return x instanceof r?h.exactEquals(this.previousVertex,x.previousVertex)&&h.exactEquals(this.centerVertex,x.centerVertex)&&h.exactEquals(this.nextVertex,x.nextVertex):!1}}a.RightAngleSnappingHint=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/meshFastUpdateUtils":function(){define(["exports",
"../../../../core/handleUtils","../../../../core/reactiveUtils","../../../../layers/graphics/sources/interfaces"],function(a,c,g,h){a.meshTransformFastUpdateHandles=function(d){const m=d.graphic;return m?[g.watch(()=>"visible"in d?d.visible:d.displaying,r=>{r&&m.notifyMeshTransformChanged({action:h.MeshTransformUpdateAction.EnableFastUpdates})},{...g.syncAndInitial}),c.makeHandle(()=>m.notifyMeshTransformChanged({action:h.MeshTransformUpdateAction.DisableFastUpdates}))]:[]};Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/settings":function(){define("exports ../../../../chunks/tslib.es6 ../../../../Color ../../../../core/Accessor ../../../../core/colorUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../visualElements/ExtendedLineVisualElement ../../webgl-engine/lib/Material ../../webgl-engine/materials/lineStippleUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b){function l(e,v){v&&Object.assign(e,v)}class f{constructor(e){this.height=90;this.coneHeight=40;this.coneWidth=23;this.width=3;this.renderOccluded=p.RenderOccludedFlag.Opaque;this.color=e.accent}}class k{constructor({colors:e,...v}){this.size=11;this.outlineSize=1;this.collisionPadding=9;this.color=e.accent;this.outlineColor=e.outline;this.renderOccluded=p.RenderOccludedFlag.Opaque;this.hoverOutlineColor=e.selectedOutline;l(this,v)}applyColor(e){this._apply(this.color,
e)}applyOutline(e){this._apply(this.outlineColor,e)}applyHoverOutline(e){this._apply(this.hoverOutlineColor,e)}_apply(e,v){v.setParameters({color:d.unitRGBAFromColor(e),renderOccluded:this.renderOccluded})}}class n{constructor({colors:e,...v}){this.size=40;this.height=.2;this.offset=.25;this.collisionPadding=2;this.renderOccluded=p.RenderOccludedFlag.Transparent;this.minSquaredEdgeLength=900;this.color=d.multiplyOpacity(e.accent,.5);this.hoverColor=e.accent;l(this,v)}applyColor(e){this._apply(this.color,
e)}applyHover(e){this._apply(this.hoverColor,e)}_apply(e,v){v.setParameters({color:d.unitRGBAFromColor(e),renderOccluded:this.renderOccluded})}}class C{constructor(e){this.vertex=new k({colors:e,color:e.accent,outlineColor:e.outline});this.edge=new k({colors:e,color:d.desaturate(d.multiplyOpacity(e.accent,2/3),.5),outlineColor:d.multiplyOpacity(e.outline,.5),size:8,collisionPadding:8});this.selected=new k({colors:e,color:e.selected,outlineColor:e.outline});this.edgeOffset=new n({colors:e})}}class I{constructor({colors:e,
...v}){this.width=1.5;this.stipplePattern=b.createStipplePatternSimple(3.3);this.falloff=0;this.innerWidth=1.5;this.renderOccluded=p.RenderOccludedFlag.OccludeAndTransparent;this.color=e.selected;this.stippleOffColor=e.outline;this.innerColor=e.selected;l(this,v)}apply(e){e.color=d.unitRGBAFromColor(this.color);e.width=this.width;e.stipplePattern=this.stipplePattern;e.stippleOffColor=d.unitRGBAFromColor(this.stippleOffColor);e.falloff=this.falloff;e.innerWidth=this.innerWidth;e.innerColor=d.unitRGBAFromColor(this.innerColor);
e.renderOccluded=this.renderOccluded}}class w{constructor({colors:e,...v}){this.size=4;this.outlineSize=1;this.shape="square";this.color=e.selected;this.outlineColor=e.outline;l(this,v)}apply(e){e.color=d.unitRGBAFromColor(this.color);e.size=this.size;e.outlineSize=this.outlineSize;e.outlineColor=d.unitRGBAFromColor(this.outlineColor);e.primitive=this.shape}}class y{constructor({colors:e,...v}){this.innerWidth=1;this.glowFalloff=this.glowWidth=8;this.globalAlpha=.3;this.globalAlphaContrastBoost=1.5;
this.radius=3;this.innerColor=e.selected;this.heightFillColor=this.glowColor=e.accent;l(this,v)}apply(e,v=1){v={glowColor:g.toUnitRGB(this.glowColor),glowFalloff:this.glowFalloff,glowWidth:this.glowWidth,innerColor:g.toUnitRGB(this.innerColor),innerWidth:this.innerWidth,globalAlpha:this.globalAlpha*v*this.glowColor.a,globalAlphaContrastBoost:this.globalAlphaContrastBoost,intersectsLineRadius:this.radius};"style"in e?e.style=v:e.laserlineStyle=v}}class F{constructor(e){this.outline=new I({colors:e,
color:e.stippleOff,renderOccluded:p.RenderOccludedFlag.OccludeAndTransparentStencil,stippleOffColor:e.stippleOn,innerWidth:0});this.staged=new I({colors:e,color:e.stippleOn,renderOccluded:p.RenderOccludedFlag.OccludeAndTransparentStencil,innerColor:e.stagedSolid,stippleOffColor:e.stippleOff});this.shadowStyle=new y({colors:e,globalAlpha:.3,glowColor:e.accent,glowFalloff:8,glowWidth:8,innerColor:e.selected,innerWidth:1})}}class G{constructor(e){this.outline=new w({colors:e,color:e.selected,outlineColor:e.outline,
outlineSize:1,shape:"circle",size:4});this.shadowStyle=new y({colors:e,globalAlpha:.3,glowColor:e.accent,glowFalloff:1.5,glowWidth:6,innerColor:e.selected,innerWidth:1,radius:2})}}class q extends I{constructor({colors:e,...v}){super({colors:e});this.extensionType=u.ExtensionType.GROUND_RAY;l(this,v)}}class B{constructor(e){this.laserlineAlphaMultiplier=1.5;this.heightPlaneAngleCutoff=20;this.lineObjects=new F(e);this.pointObjects=new G(e);this.heightPlane=new y({colors:e,globalAlpha:.3,glowColor:e.accent,
glowFalloff:8,glowWidth:8,innerColor:e.selected,innerWidth:1});this.heightBox=new y({colors:e,globalAlpha:.3,glowColor:e.accent,glowFalloff:8,glowWidth:8,innerColor:e.selected,innerWidth:0,heightFillColor:e.accent});this.zVerticalLine=new q({colors:e,color:d.multiplyOpacity(e.accent,.5),falloff:2,innerColor:d.multiplyOpacity(e.selected,0),renderOccluded:p.RenderOccludedFlag.OccludeAndTransparent,stipplePattern:null,width:5,extensionType:u.ExtensionType.GROUND_RAY})}}a.Settings=class extends h{constructor(e){super(e)}get colors(){const e=
this.getTheme().accentColor,v=e.a;return{accent:e,contrast:d.getContrast(e),selected:g.fromArray([255,255,255,v]),selectedOutline:g.fromArray([255,255,255,v]),staged:g.fromArray([12,207,255,v]),stagedSolid:g.fromArray([12,207,255,1]),outline:g.fromArray([0,0,0,.5*v]),stippleOn:g.fromArray([255,255,255,1]),stippleOff:g.fromArray([0,0,0,.5])}}get visualElements(){return new B(this.colors)}get manipulators(){return new C(this.colors)}get zManipulator(){return new f(this.colors)}};c.__decorate([m.property()],
a.Settings.prototype,"colors",null);c.__decorate([m.property()],a.Settings.prototype,"visualElements",null);c.__decorate([m.property()],a.Settings.prototype,"manipulators",null);c.__decorate([m.property()],a.Settings.prototype,"zManipulator",null);c.__decorate([m.property()],a.Settings.prototype,"getTheme",void 0);a.Settings=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.settings")],a.Settings);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/OutlineVisualElement":function(){define("exports ../../../../core/Evented ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f32 ../../../../geometry/projection/projectBuffer ../../../../geometry/support/aaBoundingBox ../../../../geometry/support/DoubleArray ../../../../layers/graphics/dehydratedPoint ../../../../support/elevationInfoUtils ../../../../symbols/support/ElevationInfo ./EngineVisualElement ./LaserlineVisualElement ../../layers/graphics/ElevationContext ../../support/engineContent/line ../../support/renderInfoUtils/line ../../webgl-engine/lib/Material ../../webgl-engine/lib/RenderGeometry ../../webgl-engine/lib/VertexAttribute ../../webgl-engine/materials/RibbonLineMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y){function F(e){e.geometries=[]}class G extends b.EngineVisualElement{constructor(e){super(e);this._attachmentOrigin=z.makeDehydratedPoint(0,0,0,null);this._attachmentOriginDirty=!0;this.events=new c;this._geometry=null;this._width=1;this._color=m.fromValues(1,0,1,1);this._innerWidth=0;this._innerColor=m.fromValues(1,1,1,1);this._stippleOffColor=this._stipplePattern=null;this._falloff=0;this._laserlineStyle=this._elevationInfo=null;this._laserlineEnabled=
!1;this._renderOccluded=C.RenderOccludedFlag.OccludeAndTransparentStencil;this._attachmentOrigin.spatialReference=e.view.spatialReference;this._laserline=new l.LaserlineVisualElement({view:e.view,isDecoration:e.isDecoration});this.applyProperties(e);this.attached=e.attached??!0}destroy(){this._laserline.destroy();super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:v=>this._createObject3DResources(v),destroyResources:F,recreateGeometry:(v,A)=>{v.geometries.length=0;this._recreateGeometry(A,
v.material,v.geometries)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:F,recreateGeometry:v=>{v.geometries=this._createRenderGeometriesDraped(v.material);this._attachmentOriginChanged()}}}get _laserlineAttached(){return this.attached&&this.visible&&null!=this._laserlineStyle&&!this.isDraped&&this.laserlineEnabled}onAttachedChange(e){this._laserline.attached=this._laserlineAttached;e&&this._attachmentOriginChanged()}get geometry(){return this._geometry}set geometry(e){this._geometry=
e;this.recreateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){d.exactEquals(e,this._color)||(d.copy(this._color,e),this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){d.exactEquals(e,this._innerColor)||(d.copy(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const v=
null!=e!==(null!=this._stipplePattern);this._stipplePattern=e;v?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){e&&this._stippleOffColor&&d.exactEquals(e,this._stippleOffColor)||(this._stippleOffColor=e?m.clone(e):null,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=
e;this.recreateGeometry()}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e;this._laserline.attached=this._laserlineAttached;null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=
e,this._updateMaterial())}get attachmentOrigin(){if(!this._attachmentOriginDirty)return this._attachmentOrigin;const e=this.object3dResources.resources?.geometries;if(!e||0===e.length)return null;g.set(B,0,0,0);let v=0;for(const A of e)A.computeAttachmentOrigin(q)&&(g.add(B,B,q),v++);if(0===v)return null;g.scale(B,B,1/v);this.view.renderCoordsHelper.fromRenderCoords(B,this._attachmentOrigin);this._attachmentOriginDirty=!1;return this._attachmentOrigin}_updateMaterial(){null!=this.object3dResources.resources&&
this.object3dResources.resources.material.setParameters(this._materialParameters);null!=this.drapedResources.resources&&this.drapedResources.resources.material.setParameters(this._materialParameters)}get _isClosed(){return null!=this.geometry&&"polygon"===this.geometry.type}get _materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:!1,isClosed:this._isClosed,falloff:this._falloff,innerColor:this._innerColor,
innerWidth:this._innerWidth,join:"round",hasPolygonOffset:!0,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration}}get _normalizedRenderOccluded(){return this.isDraped&&this._renderOccluded===C.RenderOccludedFlag.OccludeAndTransparentStencil?C.RenderOccludedFlag.OccludeAndTransparent:this._renderOccluded}_recreateGeometry(e,v,A){this._createRenderGeometries(v,A);for(const D of A)e.addGeometry(D);this._attachmentOriginChanged()}_attachmentOriginChanged(){this._attachmentOriginDirty=
!0;this.events.emit("attachment-origin-changed")}_createObject3DResources(e){const v=new y.RibbonLineMaterial(this._materialParameters),A=[];this._recreateGeometry(e,v,A);return{material:v,geometries:A,forEach:D=>{D(v);A.forEach(D)}}}_createDrapedResources(){const e=new y.RibbonLineMaterial(this._materialParameters),v=this._createRenderGeometriesDraped(e);return{material:e,geometries:v}}_createRenderGeometriesDraped(e){const {geometry:v,view:A}=this,D=A.basemapTerrain.spatialReference;return null==
v||null==D?[]:n.geometryToRenderInfoDraped(v,D).lines.map(({position:E})=>new I.RenderGeometry(k.createGeometry(e,{overlayInfo:{spatialReference:D,renderCoordsHelper:A.renderCoordsHelper},attributeData:{position:E},removeDuplicateStartEnd:this._isClosed})))}calculateMapBounds(e){if(null==this.object3dResources.resources)return!1;const v=this.view.renderCoordsHelper;for(const A of this.object3dResources.resources.geometries){const D=A.attributes.get(w.VertexAttribute.POSITION),E=t.newDoubleArray(D.data.length);
r.projectBuffer(D.data,v.spatialReference,0,E,this.view.spatialReference,0,D.data.length/3);x.expandWithBuffer(e,E)}return!0}_createRenderGeometries(e,v){var A=this.geometry;if(null!=A){A=n.geometryToRenderInfo(A,this.view.elevationProvider,this.view.renderCoordsHelper,f.ElevationContext.fromElevationInfo(this.elevationInfo??new p({mode:u.getGeometryEffectiveElevationMode(A,null)})));var D=[];for(const {position:E,mapPositions:H}of A.lines)v.push(k.createGeometry(e,{mapPositions:H,attributeData:{position:E},
removeDuplicateStartEnd:this._isClosed})),D.push(E);this._laserline.pathVerticalPlane=D}}}const q=h.create(),B=h.create();a.OutlineVisualElement=G;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/VerticesVisualElement":function(){define("exports ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f64 ./Object3DVisualElement ../../layers/graphics/ElevationContext ../../support/renderInfoUtils/point ../../webgl-engine/lib/basicInterfaces ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/materials/ShadedColorMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){class b extends m.Object3DVisualElement{constructor(f){super(f);this.view=null;this._renderOccluded=u.RenderOccludedFlag.OccludeAndTransparent;this._spatialReference=this._vertices=null;this._color=d.fromArray([1,127/255,0,1]);this._size=11;this._outlineColor=d.fromArray([0,0,0,.5]);this._outlineSize=1;this._elevationInfo=null;this.applyProperties(f)}get renderOccluded(){return this._renderOccluded}set renderOccluded(f){f!==this._renderOccluded&&(this._renderOccluded=
f,this._updateMaterial(),this._updateOutlineMaterial())}get vertices(){return this._vertices}set vertices(f){this._vertices=f;this.recreateGeometry()}get spatialReference(){return this._spatialReference}set spatialReference(f){this._spatialReference=f;this.recreateGeometry()}get color(){return this._color}set color(f){h.exactEquals(f,this._color)||(h.copy(this._color,f),this._updateMaterial())}get size(){return this._size}set size(f){f!==this._size&&(this._size=f,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(f){h.exactEquals(f,
this._outlineColor)||(h.copy(this._outlineColor,f),this._updateOutlineMaterial())}get outlineSize(){return this._outlineSize}set outlineSize(f){f!==this._outlineSize&&(this._outlineSize=f,this._updateOutlineMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(f){this._elevationInfo=f;this.recreateGeometry()}get _vertexMaterialParameters(){return{color:this._color,screenSizeScale:this.size,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}get _vertexOutlineMaterialParameters(){return{color:this._outlineColor,
screenSizeScale:this.size+2*this.outlineSize,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this.attached&&this._vertexMaterial.setParameters(this._vertexMaterialParameters)}_updateOutlineMaterial(){this.attached&&this._vertexOutlineMaterial.setParameters(this._vertexOutlineMaterialParameters)}_createRenderGeometries(){var f=this.vertices;if(null==f||0===f.length)return[];var k=x.geometryToRenderInfo(f,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,
r.ElevationContext.fromElevationInfo(this.elevationInfo));f=[];const n=k.numVertices;k=k.position;for(let I=0;I<n;++I){var C=c.set(l,k[3*I],k[3*I+1],k[3*I+2]);const w=z.createSphereGeometry(this._vertexMaterial,.5,16,16,{offset:C});C=z.createSphereGeometry(this._vertexOutlineMaterial,.5,16,16,{offset:C});f.push({vertexGeometry:w,vertexOutlineGeometry:C})}return f}createGeometries(f){const k=this._createRenderGeometries();for(const {vertexGeometry:n,vertexOutlineGeometry:C}of k)f.addGeometry(n),f.addGeometry(C)}createExternalResources(){this._vertexMaterial=
new p.ShadedColorMaterial({...this._vertexMaterialParameters,writeDepth:!0,cullFace:t.CullFaceOptions.Back,screenSizeEnabled:!0});this._vertexOutlineMaterial=new p.ShadedColorMaterial({...this._vertexOutlineMaterialParameters,forceTransparentMode:!0,writeDepth:!0,cullFace:t.CullFaceOptions.Front,screenSizeEnabled:!0,shadingEnabled:!1})}destroyExternalResources(){this._vertexOutlineMaterial=this._vertexMaterial=null}forEachExternalMaterial(f){f(this._vertexMaterial);f(this._vertexOutlineMaterial)}}
const l=g.create();a.VerticesVisualElement=b;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/support/renderInfoUtils/point":function(){define(["exports","../../../../geometry/support/DoubleArray","../../layers/graphics/elevationAlignmentUtils"],function(a,c,g){a.geometryToRenderInfo=function(h,d,m,r,x){const t=c.newDoubleArray(3*h.length),z=c.newDoubleArray(t.length);h.forEach((u,p)=>{t[3*p]=u[0];t[3*p+1]=u[1];t[3*p+2]=2<u.length?u[2]:0});d=g.applyPerVertexElevationAlignment(t,
d,0,z,0,t,0,t.length/3,m,r,x);return{numVertices:h.length,position:t,mapPositions:z,projectionSuccess:null!=d,sampledElevation:d}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/materials/ShadedColorMaterial":function(){define("exports ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../core/libs/gl-matrix-2/factories/vec4f64 ../../../../geometry/support/aaBoundingBox ../../../../geometry/support/buffer/BufferView ../../support/buffer/InterleavedLayout ../core/shaderLibrary/ShaderOutput ../lib/basicInterfaces ../lib/GLMaterial ../lib/Material ../lib/RayIntersections ../lib/RenderSlot ../lib/Util ../lib/VertexAttribute ./internal/bufferWriterUtils ../shaders/ShadedColorMaterialTechnique".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n){class C extends u.Material{constructor(q){super(q,new w);this.supportsEdges=!0;this.produces=new Map([[b.RenderSlot.OPAQUE_MATERIAL,B=>B===x.ShaderOutput.Highlight||x.isColorOrOID(B)&&!this._isTransparent],[b.RenderSlot.TRANSPARENT_MATERIAL,B=>x.isColorOrOID(B)&&this._isTransparent&&this.parameters.writeDepth],[b.RenderSlot.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,B=>x.isColorOrOID(B)&&this._isTransparent&&!this.parameters.writeDepth]]);this._configuration=
new n.ShadedColorMaterialTechniqueConfiguration;this._vertexAttributeLocations=n.vertexAttributeLocations}getConfiguration(q,B){this._configuration.output=q;this._configuration.cullFace=this.parameters.cullFace;this._configuration.hasSlicePlane=this.parameters.hasSlicePlane;this._configuration.transparent=this._isTransparent;this._configuration.writeDepth=this.parameters.writeDepth;this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled;this._configuration.shadingEnabled=this.parameters.shadingEnabled;
this._configuration.transparencyPassType=B.transparencyPassType;this._configuration.multipassEnabled=B.multipassEnabled;this._configuration.cullAboveGround=B.multipassTerrain.cullAboveGround;return this._configuration}intersect(q,B,e,v,A,D){if(this.parameters.screenSizeEnabled){const E=q.attributes.get(f.VertexAttribute.OFFSET);p.intersectTriangleGeometry(q,e,v,A,{applyToVertex:(H,J,L,N)=>{N=c.set(F,E.data[3*N],E.data[3*N+1],E.data[3*N+2]);H=c.set(G,H,J,L);c.scale(N,N,this.parameters.screenSizeScale*
e.camera.computeScreenPixelSizeAt(N));c.add(H,H,N);return[H[0],H[1],H[2]]},applyToAabb:H=>{const J=d.center(H,F);return d.scale(H,this.parameters.screenSizeScale*e.camera.computeScreenPixelSizeAt(J))}},D)}else p.intersectTriangleGeometry(q,e,v,A,void 0,D)}createGLMaterial(q){return new I(q)}createBufferWriter(){return new y(this.parameters.screenSizeEnabled)}get _isTransparent(){return 1>this.parameters.color[3]||this.parameters.forceTransparentMode}}class I extends z{beginSlot(q){return this.ensureTechnique(n.ShadedColorMaterialTechnique,
q)}}class w extends u.MaterialParameters{constructor(){super(...arguments);this.color=h.fromValues(1,1,1,1);this.shadingTint=h.fromValues(0,0,0,.25);this.shadingDirection=c.normalize(g.create(),[.5,-.5,-.5]);this.screenSizeScale=14;this.forceTransparentMode=!1;this.writeDepth=!0;this.hasSlicePlane=!1;this.cullFace=t.CullFaceOptions.None;this.screenSizeEnabled=!1;this.shadingEnabled=!0}}class y{constructor(q){this.screenSizeEnabled=q;q=r.newLayout().vec3f(f.VertexAttribute.POSITION).vec3f(f.VertexAttribute.NORMAL);
this.screenSizeEnabled&&q.vec3f(f.VertexAttribute.OFFSET);this.vertexBufferLayout=q}elementCount(q){return q.attributes.get(f.VertexAttribute.POSITION).indices.length}write(q,B,e,v,A){k.writeDefaultAttributes(e,this.vertexBufferLayout,q,B,v,A);if(this.screenSizeEnabled)if(e.attributes.has(f.VertexAttribute.OFFSET))if(q=e.attributes.get(f.VertexAttribute.OFFSET),l.assert(3===q.size),v=v.getField(f.VertexAttribute.OFFSET,m.BufferViewVec3f))k.writePosition(q,B,v,A);else throw Error("unable to acquire view for "+
f.VertexAttribute.OFFSET);else throw Error(`${f.VertexAttribute.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);}}const F=g.create(),G=g.create();a.ShadedColorMaterial=C;a.ShadedColorMaterialParameters=w;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique":function(){define("require exports ../../../../chunks/tslib.es6 ../core/shaderLibrary/ShaderOutput ../core/shaderTechnique/ReloadableShaderModule ../core/shaderTechnique/ShaderTechnique ../core/shaderTechnique/ShaderTechniqueConfiguration ../lib/basicInterfaces ../lib/OrderIndependentTransparency ../lib/Program ../lib/TransparencyPassType ../lib/VertexAttribute ../materials/DefaultTechniqueConfiguration ../../../../chunks/ShadedColorMaterial.glsl ../../../webgl/enums ../../../webgl/renderState".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k){class n extends m.ShaderTechnique{initializeProgram(w){return new z.Program(w.rctx,n.shader.get().build(this.configuration),I)}_setPipelineState(w){const y=this.configuration,F=w===u.TransparencyPassType.NONE,G=w===u.TransparencyPassType.FrontFace;return k.makePipelineState({blending:y.output===h.ShaderOutput.Color&&y.transparent?F?t.blendingDefault:t.oitBlending(w):null,culling:k.cullingParams(y.cullFace),depthTest:{func:G?f.CompareFunction.LESS:y.shadingEnabled?
f.CompareFunction.LEQUAL:f.CompareFunction.LESS},depthWrite:F?y.writeDepth?k.defaultDepthWriteParams:null:t.oitDepthWrite(w),drawBuffers:t.oitDrawBuffers(w),colorWrite:k.defaultColorWriteParams,polygonOffset:F||G?null:t.OITPolygonOffset})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}n.shader=new d.ReloadableShaderModule(l.ShadedColorMaterialShader,()=>new Promise((w,y)=>a(["./ShadedColorMaterial.glsl"],w,y)));class C extends b.DefaultTechniqueConfiguration{constructor(){super(...arguments);
this.output=h.ShaderOutput.Color;this.cullFace=x.CullFaceOptions.None;this.transparencyPassType=u.TransparencyPassType.NONE;this.transparent=this.hasSlicePlane=!1;this.shadingEnabled=this.screenSizeEnabled=this.writeDepth=!0;this.cullAboveGround=this.multipassEnabled=!1}}g.__decorate([r.parameter({count:h.ShaderOutput.COUNT})],C.prototype,"output",void 0);g.__decorate([r.parameter({count:x.CullFaceOptions.COUNT})],C.prototype,"cullFace",void 0);g.__decorate([r.parameter({count:u.TransparencyPassType.COUNT})],
C.prototype,"transparencyPassType",void 0);g.__decorate([r.parameter()],C.prototype,"hasSlicePlane",void 0);g.__decorate([r.parameter()],C.prototype,"transparent",void 0);g.__decorate([r.parameter()],C.prototype,"writeDepth",void 0);g.__decorate([r.parameter()],C.prototype,"screenSizeEnabled",void 0);g.__decorate([r.parameter()],C.prototype,"shadingEnabled",void 0);g.__decorate([r.parameter()],C.prototype,"multipassEnabled",void 0);g.__decorate([r.parameter()],C.prototype,"cullAboveGround",void 0);
g.__decorate([r.parameter({constValue:!1})],C.prototype,"occlusionPass",void 0);const I=new Map([[p.VertexAttribute.POSITION,0],[p.VertexAttribute.NORMAL,1],[p.VertexAttribute.OFFSET,2]]);c.ShadedColorMaterialTechnique=n;c.ShadedColorMaterialTechniqueConfiguration=C;c.vertexAttributeLocations=I;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/chunks/ShadedColorMaterial.glsl":function(){define("exports ../core/libs/gl-matrix-2/factories/vec4f64 ../views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl ../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput ../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl ../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl ../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl ../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff ../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl ../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl ../views/3d/webgl-engine/core/shaderModules/Float3PassUniform ../views/3d/webgl-engine/core/shaderModules/Float4PassUniform ../views/3d/webgl-engine/core/shaderModules/interfaces ../views/3d/webgl-engine/core/shaderModules/ShaderBuilder ../views/3d/webgl-engine/lib/TransparencyPassType ../views/3d/webgl-engine/lib/VertexAttribute".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k){function n(I){const w=new l.ShaderBuilder,y=I.multipassEnabled&&I.output===h.ShaderOutput.Color;w.include(m.Transform,I);w.include(g.ScreenSizeScaling,I);w.include(d.SliceDraw,I);const {vertex:F,fragment:G}=w;G.include(t.ColorConversion);z.addProjViewLocalOrigin(F,I);G.uniforms.add(new p.Float4PassUniform("uColor",q=>q.color));w.attributes.add(k.VertexAttribute.POSITION,"vec3");w.varyings.add("vWorldPosition","vec3");y&&w.varyings.add("depth","float");I.screenSizeEnabled&&
w.attributes.add(k.VertexAttribute.OFFSET,"vec3");I.shadingEnabled&&(z.addViewNormal(F),w.attributes.add(k.VertexAttribute.NORMAL,"vec3"),w.varyings.add("vViewNormal","vec3"));F.code.add(b.glsl`
void main(void) {
vWorldPosition = ${I.screenSizeEnabled?"screenSizeScaling(offset, position)":"position"};
`);I.shadingEnabled&&F.code.add(b.glsl`vec3 worldNormal = normal;
vViewNormal = (viewNormal * vec4(worldNormal, 1)).xyz;`);F.code.add(b.glsl`
${y?"depth \x3d (view * vec4(vWorldPosition, 1.0)).z;":""}
gl_Position = transformPosition(proj, view, vWorldPosition);
}
`);y&&w.include(r.multipassTerrainTest,I);G.code.add(b.glsl`
void main() {
discardBySlice(vWorldPosition);
${y?"terrainDepthTest(depth);":""}
`);I.shadingEnabled?(G.uniforms.add(new u.Float3PassUniform("shadingDirection",q=>q.shadingDirection)),G.uniforms.add(new p.Float4PassUniform("shadedColor",q=>{{var B=q.shadingTint;q=q.color;const e=1-B[3],v=B[3]+q[3]*e;0===v?C[3]=v:(C[0]=(B[0]*B[3]+q[0]*q[3]*e)/v,C[1]=(B[1]*B[3]+q[1]*q[3]*e)/v,C[2]=(B[2]*B[3]+q[2]*q[3]*e)/v,C[3]=q[3]);B=C}return B})),G.code.add(b.glsl`vec3 viewNormalNorm = normalize(vViewNormal);
float shadingFactor = 1.0 - clamp(-dot(viewNormalNorm, shadingDirection), 0.0, 1.0);
vec4 finalColor = mix(uColor, shadedColor, shadingFactor);`)):G.code.add(b.glsl`vec4 finalColor = uColor;`);I.transparencyPassType===f.TransparencyPassType.ColorAlpha&&(w.outputs.add("fragColor","vec4",0),w.outputs.add("fragAlpha","float",1));G.code.add(b.glsl`
${I.output===h.ShaderOutput.ObjectAndLayerIdColor?b.glsl`finalColor.a = 1.0;`:""}
if (finalColor.a < ${b.glsl.float(x.symbolAlphaCutoff)}) {
discard;
}
${I.output===h.ShaderOutput.Color?b.glsl`fragColor = highlightSlice(finalColor, vWorldPosition); ${I.transparencyPassType===f.TransparencyPassType.ColorAlpha?b.glsl`
fragColor = premultiplyAlpha(fragColor);
fragAlpha = fragColor.a;`:""}`:""}
}
`);return w}const C=c.create();c=Object.freeze(Object.defineProperty({__proto__:null,build:n},Symbol.toStringTag,{value:"Module"}));a.ShadedColorMaterialShader=c;a.build=n})},"esri/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl":function(){define(["exports","./util/View.glsl","../shaderModules/FloatPassUniform","../shaderModules/interfaces"],function(a,c,g,h){a.ScreenSizeScaling=function(d,m){m.screenSizeEnabled&&(d=d.vertex,c.addCameraPosition(d,m),d.uniforms.add(new g.FloatPassUniform("perScreenPixelRatio",
(r,x)=>x.camera.perScreenPixelRatio),new g.FloatPassUniform("screenSizeScale",r=>r.screenSizeScale)),d.code.add(h.glsl`float computeRenderPixelSizeAt( vec3 pWorld ){
vec3 viewForward = - vec3(view[0][2], view[1][2], view[2][2]);
float viewDirectionDistance = abs(dot(viewForward, pWorld - cameraPosition));
return viewDirectionDistance * perScreenPixelRatio;
}
vec3 screenSizeScaling(vec3 position, vec3 anchor){
return position * screenSizeScale * computeRenderPixelSizeAt(anchor) + anchor;
}`))};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/layers/graphics/GraphicState":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Evented ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass".split(" "),function(a,c,g,h,d,m,r,x){a.GraphicState=class extends g.EventedAccessor{constructor(t){super(t);this.isDraped=this.displaying=
this.tracking=!1}};c.__decorate([h.property({constructOnly:!0})],a.GraphicState.prototype,"graphic",void 0);c.__decorate([h.property()],a.GraphicState.prototype,"tracking",void 0);c.__decorate([h.property()],a.GraphicState.prototype,"displaying",void 0);c.__decorate([h.property()],a.GraphicState.prototype,"isDraped",void 0);a.GraphicState=c.__decorate([x.subclass("esri.views.3d.layers.graphics.GraphicState")],a.GraphicState);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/DrawGraphicTool":function(){define("exports ../../chunks/tslib.es6 ../../Graphic ../../UndoRedo ../../core/asyncUtils ../../core/Evented ../../core/handleUtils ../../core/maybe ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../geometry/coordinateFormatter ../../layers/GraphicsLayer ../../layers/graphics/dehydratedFeatureComparison ./support/CreateOperationGeometry ./support/createUtils ./support/surfaceCoordinateSystems ./support/tooltipUtils ../interactive/InteractiveToolBase ../interactive/sketch/SketchOptions ../interactive/tooltip/Tooltip ../interactive/tooltip/tooltipCommonUtils ../../core/accessorSupport/trackingUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e){a.DrawGraphicTool=class extends m.EventedMixin(F.InteractiveToolBase){constructor(D){super(D);this._createOperationGeometry=this._coordinateFormatterLoadTask=this._graphic=null;this.defaultZ=0;this.geometryType=this.directionOptions=null;this.hasZ=!0;this.snappingManager=this.geometryToPlace=null;this.snapToScene=!1;this.sketchOptions=new G}initialize(){const {view:D}=this;this.internalGraphicsLayer=new k({listMode:"hide",internal:!0});
this.view.map.layers.add(this.internalGraphicsLayer);const E=this.drawOperation=this.makeDrawOperation();this.tooltipInfos=y.createTooltipInfos(D.type,this.sketchOptions);const H=this.tooltip=new q.Tooltip({view:D});y.initializeConstraints(this._tooltipsContext);this._coordinateFormatterLoadTask=d.createTask(()=>f.load());this.addHandles([E.on("vertex-add",J=>this.onVertexAdd(J)),E.on("vertex-remove",J=>this.onVertexRemove(J)),E.on("vertex-update",J=>this.onVertexUpdate(J)),E.on("cursor-update",J=>
this.onCursorUpdate(J)),E.on("cursor-remove",()=>this._updateGraphic()),E.on("complete",J=>this.onComplete(J)),this._coordinateFormatterLoadTask,H.on("paste",J=>B.pasteLocation(J,this.activeTooltipInfo)),t.watch(()=>this.cursor,J=>{E.cursor=J},t.syncAndInitial),e.autorun(()=>{const {activeTooltipInfo:J,sketchOptions:L}=this;y.updateTooltipInfo(J,this._tooltipsContext);H.info=L.tooltips.effectiveEnabled?J:null}),e.autorun(()=>{E.constraintZ=y.getConstraintZ(this._tooltipsContext)})]);this.finishToolCreation()}destroy(){this.drawOperation=
x.destroyMaybe(this.drawOperation);this.tooltip=x.destroyMaybe(this.tooltip);this._destroyAllVisualizations();this.view.map.remove(this.internalGraphicsLayer);this.internalGraphicsLayer=x.destroyMaybe(this.internalGraphicsLayer);this._set("view",null)}get _drawSpatialReference(){return this.drawOperation.coordinateHelper.spatialReference}get _tooltipsContext(){return{createOperationGeometry:this._createOperationGeometry,defaultZ:this.defaultZ,directionOptions:this.directionOptions,drawOperation:this.drawOperation,
forceUniformSize:this.forceUniformSize,geometryType:this.geometryType,graphic:this.graphic,sketchOptions:this.sketchOptions,tooltipInfos:this.tooltipInfos,view:this.view}}get canRedo(){return this.drawOperation.canRedo}get canUndo(){return this.drawOperation.canUndo}set centered(D){this._set("centered",D);this._updateGraphic()}get cursor(){return this._get("cursor")}set cursor(D){this._set("cursor",D)}set enabled(D){this.drawOperation.interactive=D;this._set("enabled",D)}set forceUniformSize(D){this._set("forceUniformSize",
D);this._updateGraphic()}get graphic(){return this._graphic}set graphicSymbol(D){this._set("graphicSymbol",D);null!=this._graphic&&(this._graphic.symbol=D)}set mode(D){const E=this.drawOperation;E&&(E.drawingMode=D);this._set("mode",D)}get updating(){return this.drawOperation?.updating??!1}get undoRedo(){const {view:{type:D,map:E}}=this;return"2d"===D&&E&&"undoRedo"in E&&E.undoRedo instanceof h.UndoRedo?E.undoRedo:null}set undoRedo(D){this._override("undoRedo",D)}completeCreateOperation(){this.drawOperation.complete()}onInputEvent(D){if(!this.destroyed&&
!B.enterInputModeIfAvailable(D,this.tooltip))this.drawOperation.onInputEvent(D)}redo(){this.drawOperation.redo()}reset(){}undo(){this.drawOperation.undo();0===this.drawOperation.numCommittedVertices&&y.initializeConstraints(this._tooltipsContext)}_destroyAllVisualizations(){this.removeHandles(A.outline);this.removeHandles(A.regularVertices);this.removeHandles(A.activeVertex);this.removeHandles(A.activeEdge);this.removeHandles(v)}_createOrUpdateGraphic(D){if(null!=this._graphic)return this.updateGraphicGeometry(D),
this._graphic;const E=new g({...this.graphicProperties,symbol:this.graphicSymbol});this._graphic=E;this.updateGraphicGeometry(D);this.internalGraphicsLayer.add(E);this.addHandles(this.initializeGraphic(E));this.notifyChange("graphic");this.addHandles(r.makeHandle(()=>{this.internalGraphicsLayer.remove(E);this._graphic===E&&(this._graphic=null)}),v);return E}updateGraphicGeometry(D){this._graphic.geometry=D}_getCreateOperationGeometry(D={operationComplete:!1}){if(null!=this.drawOperation){var {coordinateHelper:E,
view:H,visualizationCursorVertex:J,lastVertex:L,committedVertices:N,geometryIncludingUncommittedVertices:M,numCommittedVertices:K}=this.drawOperation;if(0<K||null!=J){var P=D.operationComplete?N:M,U=P.length,V=null!=J?E.pointToArray(J):null,ca=this._drawSpatialReference,ja="3d"===H.type&&"global"===H.viewingMode,la=new C.CreateOperationGeometry;la.committedVertices=N;la.cursorVertex=V;var {geometryType:Q}=this;switch(Q){case "point":case "mesh":la.full=E.arrayToPoint(P[0]);break;case "multipoint":la.full=
0<U?I.createMultipoint(P,ca):null;break;case "polyline":case "polygon":0<U&&(la.full="polygon"===Q?I.createPolygon([P],ca,ja,!0):I.createPolyline([P],ca,ja),la.cursorEdge=null!=V&&L&&!n.pointEquals(J,L)?I.createPolyline([[V,E.pointToArray(L)]],ca,ja):null,la.outline=1<U?la.full:null);break;case "circle":case "rectangle":la.committedVertices=la.cursorVertex=null;if(!U)break;V=w.createViewAlignedCoordinateSystem(H,P[0]);ca=P[0];ja=V.makeMapPoint(ca[0]+48*H.resolution,ca[1]);"circle"===Q?1===U&&D.operationComplete?
la.circle=I.createCircle([ca,ja],V,!0):2===U&&(this.forceUniformSize?la.circle=I.createCircle(P,V,this.centered):la.rectangle=I.createEllipse(P,V,this.centered)):1===U&&D.operationComplete?la.rectangle=I.createSquare([ca,ja],V,!0):2===U&&(la.rectangle=this.forceUniformSize?I.createSquare(P,V,this.centered):I.createRectangle(P,V,this.centered));la.full=null!=la.circle?la.circle.geometry:la.rectangle?.geometry;la.outline="polygon"===la.full?.type?la.full:null;break;default:return null}return la}}}initializeGraphic(D){return r.makeHandle()}onComplete(D){if(this.drawOperation){this._updateGraphic();
var E=null;if(this.drawOperation.isCompleted){const H=this._getCreateOperationGeometry({operationComplete:!0});null!=H&&(E=this._createOrUpdateGraphic(H.full))}this._createOperationGeometry=null;this.emit("complete",{graphic:E,...D})}}onCursorUpdate(D){this._updateGraphic();this.emit("cursor-update",D)}onDeactivate(){const {drawOperation:D}=this;D&&(D.isCompleted||D.cancel())}onOutlineChanged(D){return r.makeHandle()}onCursorEdgeChanged(D){return r.makeHandle()}onVertexAdd(D){y.unlockConstraintsOnVertexAddOrRemove(this._tooltipsContext);
this._updateGraphic();y.lockElevationOnVertexAdd(D.vertices.at(0)?.coordinates,this._tooltipsContext);this.emit("vertex-add",D)}onVertexRemove(D){y.unlockConstraintsOnVertexAddOrRemove(this._tooltipsContext);this._updateGraphic();this.emit("vertex-remove",D)}onVertexUpdate(D){this._updateGraphic();this.emit("vertex-update",D)}_updateGraphic(){const D=this._getCreateOperationGeometry();this._createOperationGeometry=D;null==D?this._destroyAllVisualizations():(null!=D.cursorEdge?this.addHandles(this.onCursorEdgeChanged(D.cursorEdge),
A.activeEdge):this.removeHandles(A.activeEdge),null!=D.outline?this.addHandles(this.onOutlineChanged(D.outline),A.outline):this.removeHandles(A.outline),null!=D.committedVertices?this.addHandles(this.onRegularVerticesChanged(D.committedVertices),A.regularVertices):this.removeHandles(A.regularVertices),null!=D.cursorVertex?this.addHandles(this.onActiveVertexChanged(D.cursorVertex),A.activeVertex):this.removeHandles(A.activeVertex),null!=D.full?this._createOrUpdateGraphic(D.full):this.removeHandles(v))}get activeTooltipInfo(){return this._coordinateFormatterLoadTask?.finished?
y.getActiveTooltipInfo(this._tooltipsContext):null}};c.__decorate([z.property()],a.DrawGraphicTool.prototype,"_coordinateFormatterLoadTask",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"_createOperationGeometry",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"_tooltipsContext",null);c.__decorate([z.property({value:!0})],a.DrawGraphicTool.prototype,"centered",null);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"cursor",null);c.__decorate([z.property({nonNullable:!0})],
a.DrawGraphicTool.prototype,"defaultZ",void 0);c.__decorate([z.property({constructOnly:!0})],a.DrawGraphicTool.prototype,"directionOptions",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"drawOperation",void 0);c.__decorate([z.property({value:!0})],a.DrawGraphicTool.prototype,"enabled",null);c.__decorate([z.property({value:!0})],a.DrawGraphicTool.prototype,"forceUniformSize",null);c.__decorate([z.property({constructOnly:!0})],a.DrawGraphicTool.prototype,"geometryType",void 0);c.__decorate([z.property()],
a.DrawGraphicTool.prototype,"graphic",null);c.__decorate([z.property({constructOnly:!0})],a.DrawGraphicTool.prototype,"graphicProperties",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"graphicSymbol",null);c.__decorate([z.property({constructOnly:!0})],a.DrawGraphicTool.prototype,"hasZ",void 0);c.__decorate([z.property({constructOnly:!0})],a.DrawGraphicTool.prototype,"geometryToPlace",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"mode",null);c.__decorate([z.property()],
a.DrawGraphicTool.prototype,"snappingManager",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"snapToScene",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"tooltip",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"tooltipInfos",void 0);c.__decorate([z.property({constructOnly:!0,type:G})],a.DrawGraphicTool.prototype,"sketchOptions",void 0);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"updating",null);c.__decorate([z.property({constructOnly:!0,
nonNullable:!0})],a.DrawGraphicTool.prototype,"view",void 0);c.__decorate([z.property({constructOnly:!0})],a.DrawGraphicTool.prototype,"undoRedo",null);c.__decorate([z.property()],a.DrawGraphicTool.prototype,"activeTooltipInfo",null);a.DrawGraphicTool=c.__decorate([l.subclass("esri.views.draw.DrawGraphicTool")],a.DrawGraphicTool);const v=Symbol("create-operation-graphic"),A={outline:Symbol("outline-visual"),regularVertices:Symbol("regular-vertices-visual"),activeVertex:Symbol("active-vertex-visual"),
activeEdge:Symbol("active-edge-visual")};a.geometryTypeToDrawOperationGeometryType=function(D){switch(D){case "point":case "polyline":case "polygon":case "multipoint":return D;case "circle":case "rectangle":return"segment";case "mesh":return"point"}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/UndoRedo":function(){define("exports ./chunks/tslib.es6 ./core/Accessor ./core/Collection ./core/reactiveUtils ./core/accessorSupport/decorators/property ./core/has ./core/Logger ./core/RandomLCG ./core/accessorSupport/decorators/subclass ./core/support/UpdatingHandles ./undoredo/OperationStatus ./undoredo/UndoableOperation ./undoredo/UndoRedoError".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l){a.UndoRedo=class extends g{constructor(){super(...arguments);this._stack=new h;this._stackPosition=-1;this._updatingHandles=new u.UpdatingHandles}get updating(){return this._updatingHandles.updating}get canUndo(){return this.hasUndo&&!this.updating}get hasUndo(){return 0<=this._stackPosition}get canRedo(){return this.hasRedo&&!this.updating}get hasRedo(){return this._stackPosition<this._stack.length-1}_truncateForwardStack(){this._stack.splice(this._stackPosition+
1,this._stack.length-this._stackPosition).forEach(f=>f.destroy())}_drainStack(){this._stack.drain(f=>f.destroy());this._stackPosition=-1}async undo(){if(!this.hasUndo)throw new l.UndoInvalidError;if(this.updating)throw new l.UndoRedoUpdatingError;const f=this._stack.getItemAt(this._stackPosition);await this._updatingHandles.addPromise((async()=>{await f.executeUndoRedoOperation(b.UndoRedoExecutionMethod.Undo);--this._stackPosition;f.canRedo||this._truncateForwardStack()})())}async redo(){if(!this.hasRedo)throw new l.RedoInvalidError;
if(this.updating)throw new l.UndoRedoUpdatingError;const f=this._stack.getItemAt(this._stackPosition+1);await this._updatingHandles.addPromise((async()=>{await f.executeUndoRedoOperation(b.UndoRedoExecutionMethod.Redo);++this._stackPosition})())}peekUndo(){return this.canUndo?this._stack.getItemAt(this._stackPosition):null}peekRedo(){return this.canRedo?this._stack.getItemAt(this._stackPosition+1):null}async inject(f){if(this.updating)throw new l.UndoRedoUpdatingError;await this._updatingHandles.addPromise((async()=>
{f.status===p.OperationStatus.NeverApplied&&await f.executeUndoRedoOperation(b.UndoRedoExecutionMethod.Apply);f.canUndo?(this._stack.splice(this._stackPosition+1,0,f),this._stackPosition++):-1<this._stackPosition&&(this._stack.splice(0,this._stackPosition+1).forEach(k=>k.destroy()),this._stackPosition=-1)})())}async add(f){if(this.updating)throw new l.UndoRedoUpdatingError;await this._updatingHandles.addPromise((async()=>{f.status===p.OperationStatus.NeverApplied&&await f.executeUndoRedoOperation(b.UndoRedoExecutionMethod.Apply);
-1<=this._stackPosition&&this._truncateForwardStack();f.canUndo?(this._stack.push(f),this._stackPosition=this._stack.length-1):this._drainStack()})())}async removeTagged(f,k=!1){if(!this.updating||k){await d.whenOnce(()=>!this.updating);k=new h;for(let n=0;n<this._stack.length;n++){const C=this._stack.getItemAt(n);C.tag===f?(C.destroy(),n===this._stackPosition&&(this._stackPosition=k.length-1)):k.push(C)}this._stack=k;this._stackPosition>k.length-1&&(this._stackPosition=k.length-1)}}async clear(f=
!1){if(this.updating&&!f)throw new l.UndoRedoUpdatingError;await d.whenOnce(()=>!this.updating);this._drainStack()}};c.__decorate([m.property()],a.UndoRedo.prototype,"_stack",void 0);c.__decorate([m.property()],a.UndoRedo.prototype,"_stackPosition",void 0);c.__decorate([m.property()],a.UndoRedo.prototype,"updating",null);c.__decorate([m.property({readOnly:!0})],a.UndoRedo.prototype,"canUndo",null);c.__decorate([m.property({readOnly:!0})],a.UndoRedo.prototype,"hasUndo",null);c.__decorate([m.property({readOnly:!0})],
a.UndoRedo.prototype,"canRedo",null);c.__decorate([m.property({readOnly:!0})],a.UndoRedo.prototype,"hasRedo",null);a.UndoRedo=c.__decorate([z.subclass("esri.UndoRedo")],a.UndoRedo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/undoredo/OperationStatus":function(){define(["exports"],function(a){a.OperationStatus=void 0;var c=a.OperationStatus||(a.OperationStatus={});c[c.NeverApplied=0]="NeverApplied";c[c.Applied=1]="Applied";c[c.Undone=2]="Undone";Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/undoredo/UndoableOperation":function(){define("exports ../chunks/tslib.es6 ../core/Accessor ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./OperationStatus ./UndoRedoError".split(" "),function(a,c,g,h,d,m,r,x,t,z){a.UndoRedoExecutionMethod=void 0;(function(u){u[u.Apply=0]="Apply";u[u.Undo=1]="Undo";u[u.Redo=2]="Redo"})(a.UndoRedoExecutionMethod||(a.UndoRedoExecutionMethod={}));a.UndoableOperation=
class extends g{constructor(){super(...arguments);this.name="";this.tag=Symbol();this.status=t.OperationStatus.NeverApplied}get canUndo(){return this.status===t.OperationStatus.Applied}get canRedo(){return this.status===t.OperationStatus.Undone}async executeUndoRedoOperation(u){switch(u){case a.UndoRedoExecutionMethod.Apply:if(this.status!==t.OperationStatus.NeverApplied)throw new z.ApplyInvalidError;await this.apply();this.status=t.OperationStatus.Applied;break;case a.UndoRedoExecutionMethod.Undo:if(this.status!==
t.OperationStatus.Applied)throw new z.UndoInvalidError;await this.undo();this.status=t.OperationStatus.Undone;break;case a.UndoRedoExecutionMethod.Redo:if(this.status!==t.OperationStatus.Undone)throw new z.UndoInvalidError;await this.redo();this.status=t.OperationStatus.Applied}}};c.__decorate([h.property()],a.UndoableOperation.prototype,"name",void 0);c.__decorate([h.property()],a.UndoableOperation.prototype,"tag",void 0);a.UndoableOperation=c.__decorate([x.subclass("esri.undoredo.UndoableOperation")],
a.UndoableOperation);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/undoredo/UndoRedoError":function(){define(["exports"],function(a){a.UndoRedoErrorCodes=void 0;(function(r){r.UndoRedoUpdating="UndoRedoUpdating";r.UndoInvalidError="UndoInvalidError";r.RedoInvalidError="RedoInvalidError";r.ApplyInvalidError="ApplyInvalidError"})(a.UndoRedoErrorCodes||(a.UndoRedoErrorCodes={}));const c={[a.UndoRedoErrorCodes.UndoRedoUpdating]:"Cannot perform operation whilst undo redo is updating",
[a.UndoRedoErrorCodes.UndoInvalidError]:"There are no items to Undo",[a.UndoRedoErrorCodes.RedoInvalidError]:"There are no items to Redo",[a.UndoRedoErrorCodes.ApplyInvalidError]:"Cannot apply an item that is already applied"};class g extends Error{constructor(){super(c[a.UndoRedoErrorCodes.UndoRedoUpdating]);this.type="undo-redo-updating-error"}}class h extends Error{constructor(){super(c[a.UndoRedoErrorCodes.UndoInvalidError]);this.type="undo-redo-undo-error"}}class d extends Error{constructor(){super(c[a.UndoRedoErrorCodes.RedoInvalidError]);
this.type="undo-redo-redo-error"}}class m extends Error{constructor(){super(c[a.UndoRedoErrorCodes.ApplyInvalidError]);this.type="undo-redo-apply-error"}}a.ApplyInvalidError=m;a.RedoInvalidError=d;a.UndoInvalidError=h;a.UndoRedoErrorMessages=c;a.UndoRedoUpdatingError=g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/coordinateFormatter":function(){define("exports ../core/Error ../chunks/pe ./Point ./SpatialReference ../intl/number".split(" "),function(a,c,g,h,d,m){function r(){return g.isLoaded()}
function x(p,b){const l=[];p=p.replaceAll(/[\u00B0\u00BA]/g,"^");p=p.replaceAll("\u2032","'");p=p.replaceAll("\u2033",'"');const f=t(b);return g.PeNotationDms.dmsToGeog(f,1,[p],l)?new h(l[0][0],l[0][1],b||d.WGS84):null}function t(p){let b=null;p||(p=d.WGS84);if(p.wkid){if(b=g.PeFactory.geogcs(p.wkid),!b)throw new c("coordinate-formatter:invalid-spatial-reference","wkid is not valid");}else if(p.wkt2||p.wkt){if(b=g.PeFactory.fromString(g.PeDefs.PE_TYPE_GEOGCS,p.wkt2||p.wkt),!b)throw new c("coordinate-formatter:invalid-spatial-reference",
"wkt is not valid");}else throw new c("coordinate-formatter:invalid-spatial-reference","wkid and wkt are missing");return b}function z(p){let b=-1;switch(p){case "automatic":b=g.PeNotationMgrs.PE_MGRS_STYLE_AUTO;break;case "new-180-in-zone-01":b=g.PeNotationMgrs.PE_MGRS_STYLE_NEW|g.PeNotationMgrs.PE_MGRS_180_ZONE_1_PLUS;break;case "new-180-in-zone-60":b=g.PeNotationMgrs.PE_MGRS_STYLE_NEW;break;case "old-180-in-zone-01":b=g.PeNotationMgrs.PE_MGRS_STYLE_OLD|g.PeNotationMgrs.PE_MGRS_180_ZONE_1_PLUS;
break;case "old-180-in-zone-60":b=g.PeNotationMgrs.PE_MGRS_STYLE_OLD}return b}function u(p){let b=-1;switch(p){case "latitude-band-indicators":b=g.PeNotationUtm.PE_UTM_OPTS_NONE;break;case "north-south-indicators":b=g.PeNotationUtm.PE_UTM_OPTS_NS}return b}a.fromLatitude=function(p){return p&&r()?m.parseNumber(p)??x(`${p} | 00\u00b0 00' 00" E`)?.latitude??null:null};a.fromLatitudeLongitude=x;a.fromLongitude=function(p){return p&&r()?m.parseNumber(p)??x(`0\u00b0 0' 0" N | ${p}`)?.longitude??null:null};
a.fromMgrs=function(p,b,l){const f=[],k=z(l);if(-1===k)return console.warn(`invalid conversionMode: ${l}`),null;l=t(b);return g.PeNotationMgrs.mgrsToGeogExtended(l,1,[p],k,f)?new h(f[0][0],f[0][1],b||d.WGS84):null};a.fromUsng=function(p,b){const l=[];!b&&/\(.+27/.test(p)&&(b=d.GCS_NAD_1927);const f=t(b);return g.PeNotationUsng.usngToGeog(f,1,[p],l)?new h(l[0][0],l[0][1],b||d.WGS84):null};a.fromUtm=function(p,b,l){const f=[],k=u(l);if(-1===k)return console.warn(`invalid conversionMode: ${l}`),null;
l=t(b);return g.PeNotationUtm.utmToGeog(l,1,[p],k,f)?new h(f[0][0],f[0][1],b||d.WGS84):null};a.isLoaded=r;a.isSupported=function(){return g.isSupported()};a.load=function(){return g.load()};a.toLatitudeLongitude=function(p,b,l=0){const f=[[p.x,p.y]],k=[];p=t(p.spatialReference);let n=0;switch(b){case "dd":n=g.PeNotationDms.geogToDd(p,1,f,l,k);break;case "ddm":n=g.PeNotationDms.geogToDdm(p,1,f,l,k);break;case "dms":n=g.PeNotationDms.geogToDms(p,1,f,l,k);break;default:return console.warn(`invalid format: ${b}`),
null}return n?k[0]:null};a.toMgrs=function(p,b,l=0,f=!1){const k=[[p.x,p.y]],n=[];p=t(p.spatialReference);let C=z(b);if(-1===C)return console.warn(`invalid conversionMode: ${b}`),null;f&&(C|=g.PeNotationMgrs.PE_MGRS_ADD_SPACES);return g.PeNotationMgrs.geogToMgrsExtended(p,1,k,l,!1,C,n)?n[0]:null};a.toUsng=function(p,b=0,l=!1){const f=[[p.x,p.y]],k=[];p=t(p.spatialReference);return g.PeNotationUsng.geogToUsng(p,1,f,b,!1,l,k)?k[0]:null};a.toUtm=function(p,b,l=!1){const f=[[p.x,p.y]],k=[];p=t(p.spatialReference);
let n=u(b);if(-1===n)return console.warn(`invalid conversionMode: ${b}`),null;l&&(n|=g.PeNotationUtm.PE_UTM_OPTS_ADD_SPACES);return g.PeNotationUtm.geogToUtm(p,1,f,n,k)?k[0]:null};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/layers/GraphicsLayer":function(){define("../chunks/tslib.es6 ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../core/support/OwningCollection ./Layer ./mixins/BlendLayer ./mixins/ScaleRangeLayer ../support/GraphicsCollection ../symbols/support/ElevationInfo".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){g=class extends t.BlendLayer(z.ScaleRangeLayer(x)){constructor(b){super(b);this.elevationInfo=null;this.graphics=new u.GraphicsCollection;this.screenSizePerspectiveEnabled=!0;this.type="graphics";this.internal=!1}destroy(){this.removeAll();this.graphics.destroy()}add(b){this.graphics.add(b);return this}addMany(b){this.graphics.addMany(b);return this}removeAll(){this.graphics.removeAll();return this}remove(b){this.graphics.remove(b)}removeMany(b){this.graphics.removeMany(b)}on(b,
l){return super.on(b,l)}graphicChanged(b){this.emit("graphic-update",b)}};a.__decorate([c.property({type:p})],g.prototype,"elevationInfo",void 0);a.__decorate([c.property(r.owningCollectionProperty(u.GraphicsCollection,"graphics"))],g.prototype,"graphics",void 0);a.__decorate([c.property({type:["show","hide"]})],g.prototype,"listMode",void 0);a.__decorate([c.property()],g.prototype,"screenSizePerspectiveEnabled",void 0);a.__decorate([c.property({readOnly:!0})],g.prototype,"type",void 0);a.__decorate([c.property({constructOnly:!0})],
g.prototype,"internal",void 0);return g=a.__decorate([m.subclass("esri.layers.GraphicsLayer")],g)})},"esri/views/draw/support/CreateOperationGeometry":function(){define(["exports"],function(a){class c{constructor(){this.rectangle=this.circle=this.cursorEdge=this.outline=this.full=this.cursorVertex=this.committedVertices=null}}a.CreateOperationGeometry=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/support/createUtils":function(){define("exports ../../../geometry ../../../core/arrayUtils ../../../core/lang ../../../core/unitUtils ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/Circle ../../../geometry/geometryEngine ../../../geometry/support/coordsUtils ../../../geometry/support/spatialReferenceUtils ./surfaceCoordinateSystems ../../../geometry/Point ../../../geometry/Multipoint ../../../geometry/Polyline ../../../geometry/Polygon".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k){function n(q,B){B=new b({x:q[0],y:q[1],spatialReference:B});2<q.length&&(B.z=q[2]);return B}function C(q,B,e,v=!0){q=h.clone(q);q.forEach(A=>{g.equals(A[0],A[A.length-1])&&1!==A.length||A.push(A[0])});q=new k({rings:q,spatialReference:B});q.rings.forEach(A=>{z.isClockwise(A)||A.reverse()});e&&z.unnormalizeGeometryOnDatelineCrossing(q);v&&q.isSelfIntersecting&&u.isValid(B)&&(q=t.simplify(q));return q}function I(q,B,e){const v=w(B[3],B[2],e),A=w(B[1],B[2],e),
D=w(B[0],B[1],e);B=w(B[0],B[3],e);return{geometry:q,midpoints:null!=v&&null!=A&&null!=D&&null!=B?{top:v,right:A,bottom:D,left:B}:null}}function w(q,B,e){F[0]=q.x;F[1]=q.y;F[2]=0;G[0]=B.x;G[1]=B.y;G[2]=0;m.lerp(F,F,G,.5);y.x=F[0];y.y=G[1];y.z=G[2];q=e.localToMap(y);return null!=q?n(q,e.spatialReference):null}const y=p.makeSurfacePoint(0,0,0),F=r.create(),G=r.create();a.createCircle=function(q,B,e,v){var A=B.mapToLocalMultiple(q),D=q=null;e?(q=A[0],D=A[1]):(q=A[0],e=A[1],D=Math.round(e.x-q.x),e=Math.round(e.y-
q.y),A=Math.max(Math.abs(D),Math.abs(e)),q=p.makeSurfacePoint(0<D?q.x+A/2:q.x-A/2,0<e?q.y+A/2:q.y-A/2),D=p.makeSurfacePoint(Math.abs(D)>Math.abs(e)?q.x-A/2:q.x,Math.abs(D)>Math.abs(e)?q.y:q.y-A/2));e=B.localToMap(q);A=B.localToMap(D);if(null==e||null==A)return null;B.doUnnormalization&&z.unnormalizeVerticesOnDatelineCrossing([[e,A]],B.spatialReference);e=n(e,B.spatialReference);A=n(A,B.spatialReference);const E=d.getMetersPerUnitForSR(B.spatialReference);var H=0;u.isValid(B.spatialReference)?H=E*
t.distance(e,A,null):(H=q.x-D.x,q=q.y-D.y,H=E*Math.sqrt(H*H+q*q)*(v||1));B=new x({center:e,radius:H,radiusUnit:"meters",spatialReference:B.spatialReference});return{geometry:C(B.rings,B.spatialReference,!1),center:e,edge:A}};a.createEllipse=function(q,B,e){function v(K){return p.makeSurfacePoint(H*Math.cos(K)+E.x,J*Math.sin(K)+E.y)}var A=B.mapToLocalMultiple(q);q=A[0];var D=A[1];A=Math.round(D.x-q.x);D=Math.round(D.y-q.y);const E=p.makeSurfacePoint(e?q.x:q.x+A/2,e?q.y:q.y+D/2),H=e?A:A/2,J=e?D:D/2;
e=[];q=2*Math.PI/60;for(A=0;60>A;A++)e.push(v(A*q));e.push(e[0]);const {spatialReference:L,doUnnormalization:N}=B;e=C([e.map(K=>B.localToMap(K)).filter(g.isSome)],L,N,!1);q=B.localToMap(v(Math.PI/2));A=B.localToMap(v(0));D=B.localToMap(v(-Math.PI/2));const M=B.localToMap(v(Math.PI));return{geometry:e,midpoints:null!=q&&null!=A&&null!=D&&null!=M?{top:n(q,L),right:n(A,L),bottom:n(D,L),left:n(M,L)}:null}};a.createMultipoint=function(q,B){return new l({points:q,spatialReference:B})};a.createPoint=n;a.createPolygon=
C;a.createPolyline=function(q,B,e){q=new f({paths:q,spatialReference:B});e&&z.unnormalizeGeometryOnDatelineCrossing(q);return q};a.createRectangle=function(q,B,e){var v=B.mapToLocalMultiple(q);1===v.length&&(q=v[0],v=[p.makeSurfacePoint(q.x-48,q.y+48),p.makeSurfacePoint(q.x+48,q.y-48),p.makeSurfacePoint(q.x+48,q.y-48),p.makeSurfacePoint(q.x-48,q.y+48)]);q=[];var A=v[0].x,D=v[0].y,E=v[1].x;v=v[1].y;if(e){e=Math.round(E-A);const H=Math.round(v-D);q.push(p.makeSurfacePoint(A-e,D-H),p.makeSurfacePoint(E,
D-H),p.makeSurfacePoint(E,v),p.makeSurfacePoint(A-e,v))}else q.push(p.makeSurfacePoint(A,D),p.makeSurfacePoint(E,D),p.makeSurfacePoint(E,v),p.makeSurfacePoint(A,v));e=C([q.map(H=>B.localToMap(H)).filter(g.isSome)],B.spatialReference,B.doUnnormalization,!0);return I(e,q,B)};a.createSquare=function(q,B,e){var v=B.mapToLocalMultiple(q);q=[];var A=v[0].x,D=v[0].y,E=Math.round(v[1].x-A);const H=Math.round(v[1].y-D);v=Math.max(Math.abs(E),Math.abs(H));e?(e=A+v,E=D+v,A-=v,D-=v,q.push(p.makeSurfacePoint(e,
D),p.makeSurfacePoint(A,D),p.makeSurfacePoint(A,E),p.makeSurfacePoint(e,E))):(e=0<E?A+v:A-v,v=0<H?D+v:D-v,q.push(p.makeSurfacePoint(A,D),p.makeSurfacePoint(e,D),p.makeSurfacePoint(e,v),p.makeSurfacePoint(A,v)));D=C([q.map(J=>B.localToMap(J)).filter(g.isSome)],B.spatialReference,B.doUnnormalization,!0);return I(D,q,B)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/Circle":function(){define("../chunks/tslib.es6 ../core/unitUtils ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./ellipsoidUtils ./Point ./Polygon ./SpatialReference ./support/geodesicUtils ./support/webMercatorUtils ./support/WKIDUnitConversion".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l){var f;h=f=class extends z{constructor(...k){super(...k);this.center=null;this.geodesic=!1;this.numberOfPoints=60;this.radius=1E3;this.radiusUnit="meters"}normalizeCtorArgs(k,n){if(!k?.center){if(k?.rings)return super.normalizeCtorArgs(k,n);k={center:k}}return{...super.normalizeCtorArgs(),...k,...n}}initialize(){var k=this.center;const n=this.numberOfPoints;this.hasZ=k?.hasZ??!1;if(0===this.rings.length&&k){var C=c.convertUnit(this.radius,this.radiusUnit,"meters"),
I=k.spatialReference,w="geographic";if(I.isWebMercator)w="webMercator";else if(null!=(I.wkid&&l[I.wkid])||(I.wkt2||I.wkt)&&c.isProjectedWKT(I.wkt2||I.wkt))w="projected";if(this.geodesic){let y;switch(w){case "webMercator":y=b.webMercatorToGeographic(k);break;case "projected":console.error("Creating a geodesic circle requires the center to be specified in web mercator or geographic coordinate system");break;case "geographic":y=k}k=this._createGeodesicCircle(y,C,n);"webMercator"===w&&(k=b.geographicToWebMercator(k))}else{let y;
"webMercator"===w||"projected"===w?y=C/c.getMetersPerUnit(k.spatialReference):"geographic"===w&&(y=c.lengthToDegrees(C,"meters",x.getReferenceEllipsoid(k.spatialReference).radius));k=this._createPlanarCircle(k,y,n)}this.spatialReference=k.spatialReference;this.addRing(k.rings[0])}}clone(){const {center:k,numberOfPoints:n,radius:C,radiusUnit:I,geodesic:w}=this;return new f({center:k?.clone(),numberOfPoints:n,radius:C,radiusUnit:I,geodesic:w})}_createGeodesicCircle(k,n,C){let I=0;const w=[];for(;360>
I;){const y=[0,0];p.directGeodeticSolver(y,[k.x,k.y],I,n,u.WGS84);this.hasZ&&y.push(k.z);w.push(y);I+=360/C}w.push(w[0]);return new z(w)}_createPlanarCircle(k,n,C){const I=[],w=2*Math.PI/C;for(let F=0;F<C;++F){var y=w*F;y=[k.x+Math.cos(-y)*n,k.y+Math.sin(-y)*n];this.hasZ&&y.push(k.z);I.push(y)}I.push(I[0]);return new z({spatialReference:k.spatialReference,rings:[I]})}};a.__decorate([g.property({type:t})],h.prototype,"center",void 0);a.__decorate([g.property()],h.prototype,"geodesic",void 0);a.__decorate([g.property()],
h.prototype,"numberOfPoints",void 0);a.__decorate([g.property()],h.prototype,"radius",void 0);a.__decorate([g.property()],h.prototype,"radiusUnit",void 0);return h=f=a.__decorate([r.subclass("esri.geometry.Circle")],h)})},"esri/views/draw/support/surfaceCoordinateSystems":function(){define("exports ../../../geometry ../../../core/arrayUtils ../../../core/libs/gl-matrix-2/math/mat2d ../../../core/libs/gl-matrix-2/factories/mat2df64 ../../../core/libs/gl-matrix-2/math/quat ../../../core/libs/gl-matrix-2/factories/quatf64 ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/support/Axis ../../../geometry/Point".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){function p(n,C,I=null){return null!=I?[n,C,I]:[n,C]}function b(n,C,I=null){return null!=I?{x:n,y:C,z:I}:{x:n,y:C}}class l{constructor(n){this.spatialReference=n}mapToLocalMultiple(n){return n.map(C=>this.mapToLocal(C)).filter(g.isSome)}get doUnnormalization(){return!1}}class f extends l{constructor(n,C,I=null){super(C);this._defaultZ=I;this.transform=d.create();this.transformInv=d.create();this.transform=d.clone(n);h.invert(this.transformInv,this.transform)}makeMapPoint(n,
C){return p(n,C,this._defaultZ)}mapToLocal(n){return b(this.transform[0]*n[0]+this.transform[2]*n[1]+this.transform[4],this.transform[1]*n[0]+this.transform[3]*n[1]+this.transform[5])}localToMap(n){return p(this.transformInv[0]*n.x+this.transformInv[2]*n.y+this.transformInv[4],this.transformInv[1]*n.x+this.transformInv[3]*n.y+this.transformInv[5],this._defaultZ)}}class k extends l{constructor(n,C){super(n.spatialReference);this.view=n;this.defaultZ=null;this.pWS=t.create();this.tangentFrameUpWS=t.create();
this.tangentFrameRightWS=t.create();this.tangentFrameForwardWS=t.create();this.localFrameRightWS=t.create();this.localFrameUpWS=t.create();this.worldToLocalTransform=r.create();this.localToWorldTransform=r.create();this.scale=1;this.scale=n.resolution;this.referenceMapPoint=C;this.defaultZ=C.hasZ?C.z:null;n=n.state.camera.viewRight;this.view.renderCoordsHelper.toRenderCoords(this.referenceMapPoint,this.pWS);this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,z.Axis.X,this.tangentFrameRightWS);
this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,z.Axis.Y,this.tangentFrameUpWS);this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,z.Axis.Z,this.tangentFrameForwardWS);C=t.create();x.scale(C,this.tangentFrameForwardWS,x.dot(n,this.tangentFrameForwardWS));x.subtract(this.localFrameRightWS,n,C);x.normalize(this.localFrameRightWS,this.localFrameRightWS);x.cross(this.localFrameUpWS,this.tangentFrameForwardWS,this.localFrameRightWS);m.rotationTo(this.worldToLocalTransform,this.localFrameRightWS,
this.tangentFrameRightWS);m.invert(this.localToWorldTransform,this.worldToLocalTransform)}get doUnnormalization(){return"global"===this.view.viewingMode}makeMapPoint(n,C){return p(n,C,this.defaultZ)}mapToLocal(n){const C=t.create();this.view.renderCoordsHelper.toRenderCoords(new u({x:n[0],y:n[1],spatialReference:this.spatialReference}),C);x.transformQuat(C,C,this.worldToLocalTransform);n=this.view.renderCoordsHelper.fromRenderCoords(C,new u({spatialReference:this.view.spatialReference}));return null!=
n?b(n.x/this.scale,n.y/this.scale):null}localToMap(n){const C=t.create();this.view.renderCoordsHelper.toRenderCoords(new u({x:n.x*this.scale,y:n.y*this.scale,spatialReference:this.spatialReference}),C);x.transformQuat(C,C,this.localToWorldTransform);n=this.view.renderCoordsHelper.fromRenderCoords(C,new u({spatialReference:this.view.spatialReference}));return null!=n?p(n.x,n.y,this.defaultZ):null}}a.AffineCoordinateSystem=f;a.SceneViewCoordinateSystem=k;a.SurfaceCoordinateSystem=l;a.createViewAlignedCoordinateSystem=
function(n,C){return"2d"===n.type?new f(n.state.transform,n.spatialReference,2<C.length?C[2]:null):"3d"===n.type?(C=2<C.length?new u({x:C[0],y:C[1],z:C[2],spatialReference:n.spatialReference}):new u({x:C[0],y:C[1],spatialReference:n.spatialReference}),new k(n,C)):null};a.makeMapPoint=p;a.makeSurfacePoint=b;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/factories/mat2df64":function(){define(["exports"],function(a){function c(){return[1,0,0,1,0,0]}function g(x){return[x[0],
x[1],x[2],x[3],x[4],x[5]]}function h(x,t,z,u,p,b){return[x,t,z,u,p,b]}function d(x,t){return new Float64Array(x,t,6)}const m=c(),r=Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:m,clone:g,create:c,createView:d,fromValues:h},Symbol.toStringTag,{value:"Module"}));a.IDENTITY=m;a.clone=g;a.create=c;a.createView=d;a.fromValues=h;a.mat2df64=r;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/support/tooltipUtils":function(){define("exports ../../../core/quantityUtils ../../../core/unitUtils ../../../support/elevationInfoUtils ./helpMessageUtils ./helpMessageUtils3d ../../interactive/sketch/constraintUtils ../../interactive/tooltip/tooltipCommonUtils ../../interactive/tooltip/infos/DrawCircleTooltipInfo ../../interactive/tooltip/infos/DrawMeshTooltipInfo ../../interactive/tooltip/infos/DrawPointTooltipInfo ../../interactive/tooltip/infos/DrawPolygonTooltipInfo ../../interactive/tooltip/infos/DrawPolylineTooltipInfo ../../interactive/tooltip/infos/DrawRectangleTooltipInfo ../../support/angularMeasurementUtils ../../support/automaticAreaMeasurementUtils ../../support/automaticLengthMeasurementUtils ../../support/euclideanLengthMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C){function I({geometryType:H,graphic:J,tooltipInfos:L}){return"multipoint"===H||J?.geometry?.type!==E[H]?null:L[H]}function w(H,J,L){const {drawOperation:N,view:M,sketchOptions:K}=L,{cursorVertex:P}=N;H.sketchOptions=K;H.viewType=M.type;H.setLocationFromPoint(J,L.drawOperation.coordinateHelper.spatialReference);G(H.elevation,L);N.constraints=P?{context:D(P,L),x:H.x.committed,y:H.y.committed,longitude:H.longitude.committed,latitude:H.latitude.committed,elevation:H.elevation.committed,
distance:null,direction:null}:void 0}function y(H,J){const {drawOperation:L,sketchOptions:N,view:M}=J,{cursorVertex:K,lastVertex:P,secondToLastVertex:U}=L;var V=N.values.effectiveDirectionMode;H.sketchOptions=N;H.viewType=M.type;const ca=P&&K?n.autoDistanceBetweenPoints2D(P,K)??c.zeroMeters:null;H.distance.actual=ca;H.distance.readOnly=null==P;H.direction.actual=null;H.direction.readOnly=!0;P&&K&&("absolute"===V||U)&&(V=f.directionForVertices(U,P,K,V),H.direction.actual=V??c.zeroDegreesGeographic,
H.direction.readOnly=!1);H.setLocationFromPoint(K,J.drawOperation.coordinateHelper.spatialReference);G(H.elevation,J);V=F(P,J);H.xyMode=V;H.direction.visible="direction-distance"===V;H.distance.visible="direction-distance"===V;H.effectiveX.visible="coordinates"===V;H.effectiveY.visible="coordinates"===V;V=K??P;L.constraints=V?{context:D(V,J),x:H.x.committed,y:H.y.committed,longitude:H.longitude.committed,latitude:H.latitude.committed,elevation:H.elevation.committed,distance:H.distance.committed,direction:H.direction.committed}:
void 0}function F(H,{sketchOptions:J}){J=J.tooltips.xyMode;return"auto"===J?H?"direction-distance":"coordinates":J}function G(H,J){const {drawOperation:L}=J;H.actual=C.elevationFromPoint(L?.cursorVertex??L?.lastVertex)??A(J);H.visible=L.hasZ;H.readOnly=!1;H.showAsZ=!0}function q(H){H=H.createOperationGeometry?.full;return"polygon"!==H?.type?c.zeroSquareMeters:k.autoArea2D(H)??c.zeroSquareMeters}function B(H){H=H.createOperationGeometry?.rectangle?.midpoints;return(null!=H?n.autoDistanceBetweenPoints2D(H.left,
H.right):null)??c.zeroMeters}function e(H){H=H.createOperationGeometry?.rectangle?.midpoints;return(null!=H?n.autoDistanceBetweenPoints2D(H.top,H.bottom):null)??c.zeroMeters}function v({createOperationGeometry:H}){return(null!=H?.circle?.center&&null!=H.circle.edge?n.autoDistanceBetweenPoints2D(H.circle.center,H.circle.edge):null)??c.zeroMeters}function A(H){const J=g.getMetersPerVerticalUnitForSR(H.drawOperation.coordinateHelper.spatialReference);return c.createLength(H.defaultZ*J,"meters")}function D(H,
J){return r.getConstraintContext(H,J.view,J.drawOperation.coordinateHelper.spatialReference,J.drawOperation.elevationInfo??h.absoluteHeightElevationInfo,J.drawOperation.coordinateHelper.hasZ(),J.sketchOptions.values.effectiveDirectionMode)}const E={point:"point",mesh:"mesh",polyline:"polyline",polygon:"polygon",circle:"polygon",rectangle:"polygon"};a.createTooltipInfos=function(H,J){return{point:new u.DrawPointTooltipInfo({sketchOptions:J,viewType:H}),polyline:new b.DrawPolylineTooltipInfo({sketchOptions:J,
viewType:H}),polygon:new p.DrawPolygonTooltipInfo({sketchOptions:J,viewType:H}),mesh:new z.DrawMeshTooltipInfo({sketchOptions:J,viewType:H}),rectangle:new l.DrawRectangleTooltipInfo({sketchOptions:J}),circle:new t.DrawCircleTooltipInfo({sketchOptions:J})}};a.getActiveTooltipInfo=I;a.getConstraintZ=function(H){const {geometryType:J,tooltipInfos:L}=H;switch(J){case "point":case "mesh":case "polyline":case "polygon":const N=L[J].elevation.committed;return N?c.valueInUnit(N,"meters")/g.getMetersPerVerticalUnitForSR(H.drawOperation.coordinateHelper.spatialReference):
void 0}};a.initializeConstraints=function(H){const {directionOptions:J,geometryType:L,sketchOptions:N,tooltipInfos:M}=H,K=U=>{const V=(H.drawOperation.elevationInfo??h.absoluteHeightElevationInfo).mode;U=M[U].elevation;"relative-to-ground"===V||"relative-to-scene"===V||"on-the-ground"===V?U.lock(A(H)):U.unlock()},P=U=>{J&&(U=M[U].direction,U.committed=J.angle,U.unlockOnVertexPlacement=!1,N.values.directionMode=J.mode)};switch(L){case "polygon":case "polyline":K(L);P(L);break;case "point":case "mesh":K(L)}};
a.lockElevationOnVertexAdd=function(H,J){const {drawOperation:L,view:N}=J,M=I(J);var K=J.drawOperation.elevationInfo??h.absoluteHeightElevationInfo;if("2d"!==N.type&&H&&"absolute-height"===K.mode&&1===L?.numCommittedVertices&&M&&("draw-polyline"===M.type||"draw-polygon"===M.type)&&!M.elevation.locked){var [P,U,V]=H;{var ca=V;const {view:ja,drawOperation:la}=J;"3d"===ja.type&&la?(ca??=0,H=J.drawOperation.coordinateHelper.spatialReference,K=h.getConvertedElevationFromXYZ(ja,P,U,ca,H,J.drawOperation.elevationInfo??
h.absoluteHeightElevationInfo,K),J=C.elevationFromZ(K,H)??A(J)):J=void 0}null!=J&&M.elevation.lock(J)}};a.unlockConstraintsOnVertexAddOrRemove=function(H){I(H)?.allFields.forEach(J=>{J.unlockOnVertexPlacement&&J.unlock()})};a.updateTooltipInfo=function(H,J){switch(H?.type){case "draw-point":var L=J.graphic?.geometry;"point"===L?.type&&(w(H,L,J),H.helpMessage=d.getDrawHelpMessage("point",L));break;case "draw-polyline":{const {createOperationGeometry:K,drawOperation:P}=J;L=null!=K?K.full:null;"polyline"===
L?.type&&(y(H,J),H.totalLength.actual=P.lastVertex?n.autoLength2D(L)??c.zeroMeters:null,H.helpMessage=d.getDrawHelpMessage("polyline",L))}break;case "draw-polygon":{const {createOperationGeometry:K,drawOperation:P}=J;L=null!=K?K.full:null;"polygon"===L?.type&&(y(H,J),H.area.actual=P.lastVertex?k.autoArea2D(L)??c.zeroSquareMeters:null,H.helpMessage=d.getDrawHelpMessage("polygon",L))}break;case "draw-rectangle":H.sketchOptions=J.sketchOptions;H.xSize=B(J);H.ySize=e(J);H.area=q(J);break;case "draw-circle":const {forceUniformSize:N,
sketchOptions:M}=J;H.sketchOptions=M;H.radius=N?v(J):null;H.xSize=N?null:B(J);H.ySize=N?null:e(J);H.area=q(J);break;case "draw-mesh":{const {graphic:K,view:P}=J;L=K?.geometry;"3d"===P.type&&"mesh"===L?.type&&(w(H,L.origin,J),x.updateTooltipInfoFromMeshTransform(H,L),H.helpMessage=m.getDrawMeshHelpMessage(K,P))}}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/support/helpMessageUtils":function(){define(["exports"],function(a){a.getDrawHelpMessage=function(c,g){switch(c){case "point":case "multipoint":return"point";
case "polyline":return 2>(null!=g&&"polyline"===g.type&&g.paths.length?g.paths[0].length:0)?"polylineZeroVertices":"polylineOneVertex";case "polygon":return c=null!=g&&"polygon"===g.type&&g.rings.length?g.rings[0].length:0,c=3>c?"polylineZeroVertices":4>c?"polygonOneVertex":"polygonTwoVertices",c}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/support/helpMessageUtils3d":function(){define(["exports","../../../core/unitUtils","../../../chunks/vec32","../../../core/libs/gl-matrix-2/factories/vec3f64",
"../../../support/elevationInfoUtils"],function(a,c,g,h,d){const m=h.create();a.getDrawMeshHelpMessage=function(r,x){var t=r?.geometry;if(r&&"mesh"===t?.type&&x){var {renderCoordsHelper:z,elevationProvider:u}=x,{camera:p}=x.state,{extent:b}=t,{center:l,spatialReference:f}=b,k=c.getMetersPerUnitForSR(f),n=c.getMetersPerVerticalUnitForSR(f),C=c.getMetersPerUnitForSR(z.spatialReference),I=(b.zmax??0)*n;t=I-(b.zmin??0)*n;k=Math.max(b.width*k,b.height*n,t)/C;var {x:w,y}=l;b=l.z??0;g.set(m,w,y,b);z.toRenderCoords(m,
f,m);k/=p.computeScreenPixelSizeAt(m);if(k>1*p.width)return"meshTooClose";if(20>k)return"meshTooFar";r=d.getGraphicEffectiveElevationInfo(r);({absoluteZ:x}=d.zValueInAbsoluteHeightMode(w,y,I,f,x,r));n*=u.getElevation(w,y,b,f,"ground")??0;return x<n+.1*t?"meshUnderground":"mesh"}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/sketch/constraintUtils":function(){define("exports ../../../geometry ../../../core/quantityUtils ../../../core/unitUtils ../../../chunks/vec32 ../../../geometry/projection/projectVectorToVector ../../../geometry/support/geodesicUtils ../../../layers/graphics/dehydratedPoint ../../../support/elevationInfoUtils ./constraints ./normalizedPoint ../../support/angularMeasurementUtils ../../../geometry/SpatialReference".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b){function l(v,A,D,E){if(null!=D&&null!=v){var H=w(v,E);if(null!=H){D=p.getDegreesGeographic(D);var J=N=>{if(null!=N){var M=u.createWritable();N=g.createAngle(N,"degrees","geographic");if(p.pointFromDistanceAlongAzimuth(M,H,E.measurementSR,10,N,E.mode))return new z.VerticalHalfPlaneConstraint(H,M)}},L=()=>{if(null!=A&&null!=v)return p.getDegreesGeographic(p.directionBetweenPoints(A,v))};switch(E.directionMode){case p.DirectionMode.Absolute:return J(D);case p.DirectionMode.Relative:return L=
L(),null==L?void 0:J(L+D);case p.DirectionMode.RelativeBilateral:return L=L(),null==L?void 0:z.constraintOrSet([J(L+D),J(L-D)])}}}}function f(v,A){v=F(v,A)?.value??void 0;return null!=v?new z.HorizontalPlaneConstraint(v):void 0}function k(v,A,D){const {context:E,longitude:H,latitude:J,direction:L,distance:N,elevation:M}=D;if(null!=H||null!=J||null!=N||null!=M||null!=L)return null!=H||null!=J?(v=p.getDegreesGeographic(H),A=p.getDegreesGeographic(J),D=y(M,E),new z.CoordinateConstraint(v,A,D)):n(v,A,
D)}function n(v,A,{context:D,direction:E,distance:H,elevation:J}){if(null==A)return f(J,D);const {view:L,elevationInfo:N,measurementSR:M}=D,K=u.fromPoint(A,L,N);if(M&&m.projectVectorToVector(K,A.spatialReference,G,M)){var [P,U]=G,V=null!=H?g.valueInUnit(H,"meters"):void 0;E=p.getDegreesGeographic(E);var ca=y(J,D);J=ja=>{const la=new z.GeodesicConstraint([P,U],M,V,ca,ja);return null==V||null==ja||null==ca&&D.hasZ?la:new z.PointConstraint(la.closestTo(K))};if(null==E)return J(void 0);H=()=>{if(null!=
v&&null!=A)return p.getDegreesGeographic(p.directionBetweenPoints(v,A))};switch(D.directionMode){case p.DirectionMode.Absolute:return J(E);case p.DirectionMode.Relative:return H=H(),null==H?void 0:J(H+E);case p.DirectionMode.RelativeBilateral:return H=H(),null==H?void 0:z.constraintOrSet([J(H+E),J(H-E)])}}}function C({x:v,y:A,elevation:D,context:E}){e.x=v?.value??0;e.y=A?.value??0;e.spatialReference=E.spatialReference;const H=w(e,E,q);return new z.CoordinateConstraint(null!=v&&null!=H?H[0]:void 0,
null!=A&&null!=H?H[1]:void 0,y(D,E))}function I(v){let A;for(const D of v)D&&(A=A?.intersect(D)??D);return A}function w(v,A,D=u.createWritable()){const {view:E,elevationInfo:H,measurementSR:J,origin:L,mode:N}=A;u.fromPoint(v,E,H,D);if(m.projectVectorToVector(D,v.spatialReference,D,J))return"geodesic"!==N&&d.subtract(D,D,L),D}function y(v,A){v=F(v,A);return null!=v?g.valueInUnit(v,"meters"):void 0}function F(v,{view:A,origin:D,elevationInfo:E,hasZ:H,measurementSR:J}){if(null!=v&&H&&(H=h.verticalLengthUnitFromSpatialReference(J),
null!=H)){var [L,N]=D;v=g.valueInUnit(v,H);A="3d"===A?.type?t.getConvertedElevationFromXYZ(A,L,N,v,J,E):v;if(null!=A)return g.createLength(A,H)}}const G=u.createWritable(),q=u.createWritable(),B=u.createWritable(),e=x.makeDehydratedPoint(0,0,0,b.WGS84);a.constraintSpaceToPoint=function(v,A,D,E){const {view:H,measurementSR:J,spatialReference:L,origin:N,mode:M}=D;"geodesic"===M?d.copy(B,v):d.add(B,v,N);if(m.projectVectorToVector(B,J,B,L))return u.toElevationAlignedDehydratedPoint(B,H,A,D,E)};a.getConstraintContext=
function(v,A,D,E,H,J){let L="geodesic",N=r.geodesicCompatibleSpatialReference(D);const M=u.createWritable();u.fromPoint(v,A,E,M);M[2]=0;N&&m.projectVectorToVector(M,D,M,N)||(L="euclidean",N=D);return{mode:L,view:A,elevationInfo:E,hasZ:H,directionMode:J,spatialReference:v.spatialReference,measurementSR:N,origin:M}};a.getGeodesicConstraint=k;a.getPointConstraint=function(v){return"geodesic"===v.context.mode?k(null,null,v):C(v)};a.getPolylineOrPolygonConstraint=function(v,A,D){const {context:E,x:H,y:J,
distance:L,direction:N,elevation:M}=D;if("geodesic"===E.mode)return k(A,v,D);if(null!=H||null!=J)return C(D);if(null==L||null==v)D=void 0;else{var K=h.lengthUnitFromSpatialReference(E.measurementSR);null==K?D=void 0:(D=w(v,E),null==D?D=void 0:(K=g.valueInUnit(L,K),D=new z.VerticalCylinderConstraint(D,K)))}return I([D,l(v,A,N,E),f(M,E)])};a.intersectAll=I;a.pointToConstraintSpace=w;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/sketch/constraints":function(){define("exports ../../../core/arrayUtils ../../../core/mathUtils ../../../core/libs/gl-matrix-2/math/vec2 ../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../chunks/vec42 ../../../core/libs/gl-matrix-2/factories/vec4f64 ../../../geometry/support/geodesicConstants ../../../geometry/support/geodesicUtils ../../../geometry/support/plane ../../../chunks/sphere ../../3d/support/mathUtils ./normalizedPoint ../../support/geometry3dUtils ../../support/geometry2dUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n){function C(S,T){if(S instanceof ja){var ma=[];for(const sa of S.constraints)(S=sa.intersect(T))&&ma.push(S);return v(ma)}if(T instanceof ja)return C(T,S);if(S instanceof O)return G(S,T);if(T instanceof O)return G(T,S);if(A(S)){({point:ma}=S);if(A(T))return m.exactEquals(ma,T.point)?S:void 0;T=T.closestTo(ma);return m.equals(T,ma)?S:void 0}if(D(S)){if(A(T))return C(T,S);if(D(T))return B(k.intersectLineLikes(S.lineLike,T.lineLike));if(E(T))return pa(S,T);
if(H(T))return B(k.intersectVerticalPlaneAndLineLike(T.planeLike,S.lineLike));if(J(T))return B(k.intersectLineLikeAndVerticalCylinder(S.lineLike,T.center,T.radius));if(N(T))return B(k.intersectLineLikeAndCircle(S.lineLike,T));if(L(T))return I(S,T);if(M(T))return w(S,T)}else if(E(S)){if(A(T)||D(T))return C(T,S);if(E(T))return k.isClose(S.z,T.z)?S:void 0;if(H(T))return y(S,T);if(J(T)){const [sa,wa]=T.center;return new Q(f.fromValues(sa,wa,S.z),T.radius)}if(N(T))return va(S,T);if(L(T))return k.isClose(T.center[2],
S.z)?T:void 0;if(M(T))return F(S,T)}else if(H(S)){if(A(T)||D(T)||E(T))return C(T,S);if(H(T))return q(k.intersectVerticalPlanes(S.planeLike,T.planeLike));if(J(T))return q(k.intersectVerticalPlaneAndVerticalCylinder(S.planeLike,T.center,T.radius));if(N(T))return za(S,T);if(L(T))return xa(S,T);if(M(T))return Ba(S,T)}else if(J(S)){if(A(T)||D(T)||E(T)||H(T))return C(T,S);if(J(T))return q(k.intersectVerticalCylinders(f.asVec2(S.center),S.radius,f.asVec2(T.center),T.radius));if(!N(T)){if(L(T))return ma=
h.squaredDistance(f.asVec2(S.center),f.asVec2(T.center)),k.isClose(ma,0)&&k.isClose(S.radius,T.radius)||(S=k.intersectVerticalCylinders(f.asVec2(S.center),S.radius,f.asVec2(T.center),T.radius),T=e(S,T.center[2])),T;M(T)}}else if(N(S)){if(A(T)||D(T)||E(T)||H(T)||J(T))return C(T,S);N(T)||(L(T)?T.asCircle():M(T))}else if(L(S)){if(A(T)||D(T)||E(T)||H(T)||J(T)||N(T))return C(T,S);if(L(T))return k.vectorsHaveCloseZ(T.center,S.center)?(ma=h.squaredDistance(f.asVec2(T.center),f.asVec2(S.center)),k.isClose(ma,
0)&&k.isClose(T.radius,S.radius)||(S=k.intersectVerticalCylinders(f.asVec2(T.center),T.radius,f.asVec2(S.center),S.radius),T=e(S,T.center[2]))):T=void 0,T;M(T)}else if(M(S)){if(A(T)||D(T)||E(T)||H(T)||J(T)||L(T))return C(T,S);M(T)}}function I({lineLike:S},{center:T,radius:ma}){const sa=T[2];S=k.intersectLineLikeAndVerticalCylinder(S,T,ma).filter(wa=>k.isClose(wa[2],sa));return B(S)}function w({lineLike:S},{sphere:T}){return B(b.intersectLine(T,S.start,S.end))}function y({z:S},{planeLike:T}){const [ma,
sa]=T.start,[wa,ya]=T.end,Aa=f.fromValues(ma,sa,S);S=f.fromValues(wa,ya,S);return T.type===k.VerticalPlaneType.PLANE?new V(Aa,S):new ca(Aa,S)}function F(S,{center:T,radius:ma}){const sa=Math.abs(T[2]-S.z);if(!(sa>ma)||k.isClose(sa,ma))if(S=f.fromValues(T[0],T[1],S.z),ma=Math.sqrt(ma**2-sa**2),!k.isClose(ma,0))return new Q(S,ma)}function G(S,T){const {planeLike:ma,getZ:sa}=S,wa=[];if(A(T))S.addIfOnTheGround(wa,k.intersectVerticalPlaneAndPoint(ma,T.point));else if(D(T))S.addIfOnTheGround(wa,k.intersectVerticalPlaneAndLineLike(ma,
T.lineLike));else if(J(T))for(const [ya,Aa]of k.intersectVerticalPlaneAndVerticalCylinder(ma,T.center,T.radius))S=sa(ya,Aa),null!=S&&wa.push(r.fromValues(ya,Aa,S));else if(H(T)||T instanceof O)for(const [ya,Aa]of k.intersectVerticalPlanes(ma,T.planeLike))S=sa(ya,Aa)??0,wa.push(r.fromValues(ya,Aa,S));return B(wa)}function q(S){return v(S.map(([T,ma])=>{const sa=f.fromValues(T,ma,0);T=f.fromValues(T,ma,1);return new V(sa,T)}))}function B(S){return v(S.map(T=>T?new P(f.fromVec3(T)):void 0))}function e(S,
T){return B(S.map(([ma,sa])=>[ma,sa,T]))}function v(S){if(0!==S.length)return 1===S.length?S[0]??void 0:new ja(S.filter(c.isSome))}function A(S){return S instanceof P}function D(S){return S instanceof U}function E(S){return S instanceof da}function H(S){return S instanceof qa}function J(S){return S instanceof la}function L(S){return S instanceof Q}function N(S){return S instanceof aa}function M(S){return S instanceof ra}class K{intersect(S){return C(this,S)}closestPoints(S){return[this.closestTo(S)]}}
class P extends K{constructor(S){super();this.point=S}equals(S){return this===S||A(S)&&m.exactEquals(this.point,S.point)}closestTo(){return f.clone(this.point)}}class U extends K{constructor(S,T,ma){super();this.start=S;this.end=T;this.lineLike={start:S,end:T,type:ma}}equals(S){return this===S||D(S)&&this.lineLike.type===S.lineLike.type&&m.exactEquals(this.start,S.start)&&m.exactEquals(this.end,S.end)}closestTo(S){const T=f.createWritable();k.projectPointToLineLike(S,this.lineLike,T);return T}}class V extends U{constructor(S,
T){super(S,T,n.LineType.LINE)}}class ca extends U{constructor(S,T){super(S,T,n.LineType.RAY)}}class ja extends K{constructor(S){super();this.constraints=S}equals(S){return this===S||S instanceof ja&&c.equals(this.constraints,S.constraints,(T,ma)=>T.equals(ma))}closestTo(S){let T=Infinity,ma;for(const sa of this.constraints){const wa=sa.closestTo(S),ya=m.squaredDistance(S,wa);ya<T&&(T=ya,ma=wa)}return f.clone(ma??S)}closestPoints(S){return this.constraints.flatMap(T=>T===this?[]:T.closestPoints(S))}}
class la extends K{constructor(S,T){super();this.center=S;this.radius=T}equals(S){return this===S||J(S)&&this.center[0]===S.center[0]&&this.center[1]===S.center[1]&&this.radius===S.radius}closestTo(S){const T=f.createWritable();k.projectPointToVerticalCylinder(S,this.center,this.radius,T);return T}}class Q extends K{constructor(S,T){super();this.center=S;this.radius=T}equals(S){return this===S||L(S)&&m.exactEquals(this.center,S.center)&&this.radius===S.radius}closestTo(S){const T=f.createWritable();
k.projectPointToVerticalCylinder(S,this.center,this.radius,T);T[2]=this.center[2];return T}asCircle(){return new aa(f.clone(this.center),this.radius,f.fromValues(0,0,1))}}class aa extends K{constructor(S,T,ma,sa){super();this.center=S;this.radius=T;this.normal=ma;this.slicePlane=sa}equals(S){return this===S||N(S)&&m.exactEquals(this.center,S.center)&&m.exactEquals(this.normal,S.normal)&&this.radius===S.radius}closestTo(S){const {center:T,radius:ma}=this;p.projectPoint(this.getPlane(ha),S,na);var sa=
m.sub(na,na,T),wa=m.squaredLength(sa);if(k.isClose(wa,0))return f.clone(S);const ya=ma/Math.sqrt(wa);wa=f.createWritable();m.scaleAndAdd(wa,T,sa,ya);({slicePlane:sa}=this);return sa&&!k.isPointInsidePlane(sa,wa)?ua(sa,this)?.closestTo(S)??f.clone(S):wa}getPlane(S=p.create()){return p.fromPositionAndNormal(this.center,this.normal,S)}}const na=r.create(),ha=p.create();class da extends K{constructor(S){super();this.z=S}equals(S){return this===S||E(S)&&this.z===S.z}closestTo(S){return f.fromValues(S[0],
S[1],this.z)}getPlane(S=p.create()){m.set(ta,0,0,this.z);return p.fromPositionAndNormal(ta,r.UNIT_Z,S)}}const ta=r.create();class qa extends K{constructor(S,T,ma){super();this.start=S;this.end=T;this.planeLike={start:f.asVec2(S),end:f.asVec2(T),type:ma}}equals(S){return this===S||H(S)&&this.planeLike.type===S.planeLike.type&&m.exactEquals(this.start,S.start)&&m.exactEquals(this.end,S.end)}closestTo(S){const T=f.createWritable();k.projectPointToVerticalPlane(S,this.planeLike,T);return T}closestEndTo(S){const {start:T,
end:ma}=this.planeLike;return 0<Math.sign(h.dot(h.subtract(fa,ma,T),h.subtract(oa,f.asVec2(S),T)))?this.end:this.start}getPlane(S=p.create()){const T=m.copy(ba,this.end);T[2]+=1;return p.fromPoints(this.start,this.end,T,S)}getSlicePlane(S=p.create()){const {start:T,end:ma,type:sa}=this.planeLike;if(sa!==k.VerticalPlaneType.PLANE){var wa=m.set(ba,T[0],T[1],0),ya=m.set(R,ma[0],ma[1],0);ya=m.subtract(R,ya,wa);p.fromPositionAndNormal(wa,ya,S);return S}}}const fa=d.create(),oa=d.create(),ba=r.create(),
R=r.create();class Z extends qa{constructor(S,T){super(S,T,k.VerticalPlaneType.HALF_PLANE)}}class ka extends qa{constructor(S,T){super(S,T,k.VerticalPlaneType.PLANE)}}class ra extends K{constructor(S,T){super();this.sphere=b.fromCenterAndRadius(S,T)}equals(S){return this===S||M(S)&&b.exactEquals(this.sphere,S.sphere)}closestTo(S){const T=f.createWritable();b.projectPoint(this.sphere,S,T);return T}get center(){return b.getCenter(this.sphere)}get radius(){return this.sphere[3]}}class O extends K{constructor(S,
T,ma){super();this.start=S;this.end=T;this.getZ=ma;this.planeLike={start:f.asVec2(S),end:f.asVec2(T),type:k.VerticalPlaneType.PLANE}}equals(S){return this===S||S instanceof O&&m.exactEquals(this.start,S.start)&&m.exactEquals(this.end,S.end)&&this.getZ===S.getZ}closestTo(S){const T=f.createWritable();k.projectPointToVerticalPlane(S,this.planeLike,T);T[2]=this.getZ(T[0],T[1])??0;return T}addIfOnTheGround(S,T){for(const ma of T)T=this.getZ(ma[0],ma[1])??0,k.isClose(ma[2],T)&&(ma[2]=T,S.push(ma))}}class W extends K{constructor(S,
T,ma){super();this._x=S;this._y=T;this._z=ma}equals(S){return this===S||S instanceof W&&this._x===S._x&&this._y===S._y&&this._z===S._z}closestTo([S,T,ma]){return f.create(this._x??S,this._y??T,this._z??ma)}}class X extends K{constructor(S,T,ma,sa,wa){super();this._origin=S;this._spatialReference=T;this._distanceMeters=ma;this._elevationMeters=sa;this._directionDegrees=wa}equals(S){return this===S||S instanceof X&&h.exactEquals(this._origin,S._origin)&&this._spatialReference===S._spatialReference&&
this._distanceMeters===S._distanceMeters&&this._elevationMeters===S._elevationMeters&&this._directionDegrees===S._directionDegrees}closestTo([S,T,ma]){h.set(Y,S,T);h.exactEquals(Y,this._origin)||this._applyDirectionAndDistance(Y);return f.create(Y[0],Y[1],this._elevationMeters??ma)}_applyDirectionAndDistance(S){if(null!=this._directionDegrees&&null!=this._distanceMeters)u.directGeodeticSolver(S,this._origin,this._directionDegrees,this._distanceMeters,this._spatialReference);else if(null!=this._directionDegrees){var T=
this._origin,ma=this._directionDegrees,sa=this._spatialReference;let {azimuth:wa,distance:ya}=u.inverseGeodeticSolver(ia,T,S,sa);wa??=0;let Aa=ya*Math.cos((wa-ma)*z.toRadians);Aa=Math.max(0,Aa);u.directGeodeticSolver(S,T,ma,Aa,sa)}else null!=this._distanceMeters&&({azimuth:T}=u.inverseGeodeticSolver(ea,this._origin,S,this._spatialReference),u.directGeodeticSolver(S,this._origin,T??0,this._distanceMeters,this._spatialReference))}}const Y=[0,0],ea=new u.InverseGeodeticSolverResult,ia=new u.InverseGeodeticSolverResult,
pa=(()=>{const S=p.create();return(T,ma)=>{const {start:sa,end:wa}=T;if(k.vectorsHaveCloseZ(sa,wa)&&k.isClose(sa[2],ma.z))return T;T=f.createWritable();if(p.intersectLine(ma.getPlane(S),sa,wa,T))return new P(T)}})(),ua=(()=>{const S=t.create(),T=r.create(),ma=r.create();return(sa,wa,ya)=>{const {normal:Aa,center:Ea,radius:Fa}=wa;l.tangentFrame(Aa,T,ma);const Ga=p.getNormal(sa);var Da=Fa*m.dot(Ga,T),Ca=Fa*m.dot(Ga,ma);x.set(S,Ea[0],Ea[1],Ea[2],1);const Ja=x.dot(sa,S),Ha=Math.hypot(Da,Ca),Ia=k.isClose(Ha,
0);if(k.isClose(p.distance(sa,Ea),0)){if(Ia)return wa;if(k.isClose(Fa,0))return!ya||k.isPointInsidePlane(ya,Ea)?new P(f.clone(Ea)):void 0;m.cross(T,Ga,Aa);m.normalize(T,T);Da=[];Ca=r.clone(Ea);m.scaleAndAdd(Ca,Ca,T,Fa);ya&&!k.isPointInsidePlane(ya,Ca)||Da.push(Ca);Ca=r.clone(Ea);m.scaleAndAdd(Ca,Ca,T,-Fa);ya&&!k.isPointInsidePlane(ya,Ca)||Da.push(Ca);return B(Da)}if(!(Ia||(sa=-Ja/Ha,1<Math.abs(sa)||k.isClose(sa,1))))return Da=Math.atan(Da/Ca),sa=g.asinClamped(sa)-Da,Da=Math.PI-sa,Ca=[],wa=r.create(),
m.scaleAndAdd(wa,Ea,T,Fa*Math.cos(sa)),m.scaleAndAdd(wa,wa,ma,Fa*Math.sin(sa)),Ca.push(wa),sa=r.create(),m.scaleAndAdd(sa,Ea,T,Fa*Math.cos(Da)),m.scaleAndAdd(sa,sa,ma,Fa*Math.sin(Da)),Ca.push(sa),B(ya?k.pointsInsidePlane(ya,Ca):Ca)}})(),va=(()=>{const S=p.create();return(T,ma)=>ua(T.getPlane(S),ma,ma.slicePlane)})(),xa=(()=>{const S=p.create();return(T,{center:ma,radius:sa})=>{sa=k.intersectVerticalPlaneAndVerticalCylinder(T.planeLike,ma,sa);ma=ma[2];T.getSlicePlane(S);T=[];for(const [wa,ya]of sa)sa=
[wa,ya,ma],k.isPointInsidePlane(S,sa)&&T.push(sa);return B(T)}})(),za=(()=>{const S=p.create(),T=p.create();return(ma,sa)=>ua(ma.getPlane(S),sa,ma.getSlicePlane(T))})(),Ba=(()=>{const S=p.create();return(T,{center:ma,radius:sa})=>{var wa=T.getPlane(S);const ya=p.signedDistance(wa,ma);var Aa=Math.abs(ya);if(!(Aa>sa)||k.isClose(Aa,sa)){sa=Math.sqrt(sa**2-ya**2);if(k.isClose(sa,0))return T=f.createWritable(),p.projectPoint(wa,ma,T),new P(T);Aa=f.createWritable();wa=r.clone(p.getNormal(wa));m.scaleAndAdd(Aa,
ma,wa,ya);return new aa(Aa,sa,wa,T.getSlicePlane())}}})();a.CircleConstraint=aa;a.Constraint=K;a.CoordinateConstraint=W;a.DrapedLineConstraint=O;a.GeodesicConstraint=X;a.HorizontalCircleConstraint=Q;a.HorizontalPlaneConstraint=da;a.LineConstraint=V;a.LineLikeConstraint=U;a.PointConstraint=P;a.RayConstraint=ca;a.SetConstraint=ja;a.SphereConstraint=ra;a.VerticalCylinderConstraint=la;a.VerticalHalfPlaneConstraint=Z;a.VerticalPlaneConstraint=ka;a.VerticalPlaneLikeConstraint=qa;a.constraintOrSet=v;a.isPoint=
A;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/geometry3dUtils":function(){define("exports ../../core/mathUtils ../../core/libs/gl-matrix-2/math/vec2 ../../core/libs/gl-matrix-2/factories/vec2f64 ../../chunks/vec32 ../../core/libs/gl-matrix-2/factories/vec3f64 ../../core/libs/gl-matrix-2/math/common ../../geometry/support/plane ../3d/support/mathUtils ./geometry2dUtils".split(" "),function(a,c,g,h,d,m,r,x,t,z){function u(J,{start:L,end:N,type:M},K=m.create()){J=
d.sub(F,J,L);N=d.sub(G,N,L);J=d.dot(J,N)/d.dot(N,N);return d.scaleAndAdd(K,L,N,M===z.LineType.RAY?Math.max(J,0):J)}function p({start:J,end:L,type:N},M){const K=d.sub(F,M,J);L=d.sub(G,L,J);if(N===z.LineType.RAY&&d.dot(L,K)<-r.getEpsilon())return d.distance(J,M);J=d.cross(q,L,K);return d.len(J)/d.len(L)}function b(J,L){const N=J.start,M=L.start;var K=L.end;const P=d.sub(F,J.end,N);K=d.sub(G,K,M);var U=d.sub(q,M,N),V=d.cross(B,P,K),ca=d.dot(U,V);if(!k(ca,0))return[];ca=d.sqrLen(V);if(k(ca,0))return[];
U=d.cross(e,U,K);V=d.dot(U,V)/ca;V=d.scaleAndAdd(v,N,P,V);return J.type===z.LineType.RAY&&(J=d.sub(A,V,N),d.dot(P,J)<-r.getEpsilon())||L.type===z.LineType.RAY&&(L=d.sub(A,V,M),d.dot(K,L)<-r.getEpsilon())?[]:[m.clone(V)]}function l({start:J,end:L,type:N},M){const K=d.sub(F,M,J);J=d.sub(G,L,J);L=d.cross(q,J,K);L=d.sqrLen(L)/d.sqrLen(J);const P=r.getEpsilon();if(L<P)switch(N){case z.LineType.LINE:return[m.clone(M)];case z.LineType.RAY:return d.dot(J,K)<-P?[]:[m.clone(M)]}return[]}function f(J,L,{start:N,
end:M,type:K}){d.set(J.start,N[0],N[1],L);d.set(J.end,M[0],M[1],L);J.type=I[K];return J}function k(J,L){return c.floatEqualAbsolute(Math.abs(J-L),0,r.getEpsilon())}function n(J,L){return x.isPointInside(J,L)}const C=(()=>{const J=m.create(),L=m.create(),N=m.create();return({start:M,end:K},{center:P,radius:U,normal:V,slicePlane:ca})=>{var ja=x.fromPositionAndNormal(P,V,D);if(k(x.distance(ja,M),0)&&k(x.distance(ja,K),0)){t.tangentFrame(V,J,L);ja=(la,Q)=>{d.subtract(N,Q,P);g.set(la,d.dot(N,J),d.dot(N,
L));return la};K=z.intersectLineLikeAndCircle({start:ja(w,M),end:ja(y,K),type:z.LineType.LINE},h.ZEROS,U);M=[];for(const [la,Q]of K)K=d.copy(m.create(),P),d.scaleAndAdd(K,K,J,la),d.scaleAndAdd(K,K,L,Q),ca&&!n(ca,K)||M.push(K);return M}V=m.create();return x.intersectLine(ja,M,K,V)?!k(d.distance(V,P),U)||ca&&!n(ca,V)?[]:[V]:[]}})();a.VerticalPlaneType=void 0;(function(J){J[J.PLANE=0]="PLANE";J[J.HALF_PLANE=1]="HALF_PLANE"})(a.VerticalPlaneType||(a.VerticalPlaneType={}));const I={[a.VerticalPlaneType.PLANE]:z.LineType.LINE,
[a.VerticalPlaneType.HALF_PLANE]:z.LineType.RAY},w=h.create(),y=h.create(),F=m.create(),G=m.create(),q=m.create(),B=m.create(),e=m.create(),v=m.create(),A=m.create(),D=x.create(),E={start:m.create(),end:m.create(),type:z.LineType.LINE},H={start:m.create(),end:m.create(),type:z.LineType.LINE};Object.defineProperty(a,"LineType",{enumerable:!0,get:()=>z.LineType});a.intersectLineAndPoint=l;a.intersectLineLikeAndCircle=C;a.intersectLineLikeAndVerticalCylinder=function({start:J,end:L,type:N},M,K){const P=
[];L=d.subtract(F,L,J);var U=g.subtract(y,J,M);M=g.squaredLength(L);const V=2*g.dot(L,U);K=g.squaredLength(U)-K*K;K=V*V-4*M*K;0===K?(M=-V/(2*M),(N===z.LineType.LINE||0<=M)&&P.push(d.scaleAndAdd(m.create(),J,L,M))):0<K&&(K=Math.sqrt(K),U=(-V+K)/(2*M),(N===z.LineType.LINE||0<=U)&&P.push(d.scaleAndAdd(m.create(),J,L,U)),M=(-V-K)/(2*M),(N===z.LineType.LINE||0<=M)&&P.push(d.scaleAndAdd(m.create(),J,L,M)));return P};a.intersectLineLikes=b;a.intersectVerticalCylinderAndPoint=function(J,L,N){return k(g.squaredDistance(N,
J),L*L)?[m.clone(N)]:[]};a.intersectVerticalCylinders=function(J,L,N,M){const [K,P]=J,[U,V]=N;var ca=U-K,ja=V-P;const la=ca*ca+ja*ja,Q=Math.sqrt(la);if(Q>L+M||Q<Math.abs(L-M)||k(Q,0)&&k(L,M))return[];M=(L*L-M*M+la)/(2*Q);L=Math.sqrt(L*L-M*M);ja=L*ja/Q;ca=L*ca/Q;const [aa,na]=g.lerp(w,J,N,M/Q);return k(ja,ca)?[h.fromValues(aa,na)]:[h.fromValues(aa+ja,na-ca),h.fromValues(aa-ja,na+ca)]};a.intersectVerticalPlaneAndLineLike=function(J,L){const N=J.start,M=g.subtract(w,J.end,N);var K=d.set(G,-M[1],M[0],
0);const P=L.start,U=d.sub(q,L.end,P);var V=d.dot(U,K),ca=d.set(B,N[0],N[1],0);ca=d.sub(e,ca,P);ca=d.dot(ca,K);K=r.getEpsilon();if(Math.abs(V)<K)return[];V=d.scaleAndAdd(v,P,U,ca/V);return L.type===z.LineType.RAY&&(L=d.sub(A,V,P),d.dot(L,U)<-K)||J.type===a.VerticalPlaneType.HALF_PLANE&&(J=g.sub(y,V,N),g.dot(J,M)<-K)?[]:[m.clone(V)]};a.intersectVerticalPlaneAndPoint=function(J,L){return l(f(E,L[2],J),L)};a.intersectVerticalPlaneAndVerticalCylinder=function({start:J,end:L,type:N},M,K){const P=[];L=
g.subtract(w,L,J);var U=g.subtract(y,J,M);M=g.squaredLength(L);const V=2*g.dot(L,U);K=g.squaredLength(U)-K*K;K=V*V-4*M*K;0===K?(M=-V/(2*M),(N===a.VerticalPlaneType.PLANE||0<=M)&&P.push(g.scaleAndAdd(h.create(),J,L,M))):0<K&&(K=Math.sqrt(K),U=(-V+K)/(2*M),(N===a.VerticalPlaneType.PLANE||0<=U)&&P.push(g.scaleAndAdd(h.create(),J,L,U)),M=(-V-K)/(2*M),(N===a.VerticalPlaneType.PLANE||0<=M)&&P.push(g.scaleAndAdd(h.create(),J,L,M)));return P};a.intersectVerticalPlanes=function(J,L){J=f(E,0,J);L=f(H,0,L);
return b(J,L).map(([N,M])=>h.fromValues(N,M))};a.isClose=k;a.isPointInsidePlane=n;a.pointToLineLikeDistance=p;a.pointToVerticalCylinderDistance=function(J,L,N){return g.distance(J,L)-N};a.pointToVerticalPlaneDistance=function(J,L){return p(f(E,J[2],L),J)};a.pointsInsidePlane=function(J,L){return L.filter(N=>n(J,N))};a.projectPointToLineLike=u;a.projectPointToVerticalCylinder=function(J,L,N,M=m.create()){const K=g.subtract(w,J,L),P=g.length(K);g.scaleAndAdd(M,L,K,0===P?1:N/P);M[2]=J[2];return M};a.projectPointToVerticalPlane=
function(J,L,N){return u(J,f(E,J[2],L),N)};a.vectorsHaveCloseZ=function(J,L){return k(J[2],L[2])};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/geometry2dUtils":function(){define(["exports","../../core/mathUtils","../../core/libs/gl-matrix-2/math/vec2","../../core/libs/gl-matrix-2/factories/vec2f64"],function(a,c,g,h){function d(b,l){return b[0]*l[1]-b[1]*l[0]}function m(b,l,f){l=g.dot(f,l)/g.squaredLength(f);return g.scale(b,f,l)}function r(b,l,f,k,n=f){g.subtract(t,
k,f);g.subtract(u,l,n);m(p,u,t);return g.add(b,n,p)}function x(b,l,f,k){g.subtract(t,l,f);l=k/g.length(t);return g.scaleAndAdd(b,f,t,l)}a.LineType=void 0;(function(b){b[b.RAY=0]="RAY";b[b.LINE=1]="LINE"})(a.LineType||(a.LineType={}));const t=h.create(),z=h.create(),u=h.create(),p=h.create();a.cross=d;a.intersectCircleAndPoint=function(b,l,f){x(u,f,b,l);return c.floatEqualAbsolute(u[0],f[0])&&c.floatEqualAbsolute(u[1],f[1])?[h.clone(f)]:[]};a.intersectLineAndPoint=function(b,l){r(u,l,b.start,b.end);
return c.floatEqualAbsolute(u[0],l[0])&&c.floatEqualAbsolute(u[1],l[1])?[h.clone(l)]:[]};a.intersectLineAndRay=function(b,l){const f=b.start;var k=l.start,n=l.end;const C=g.subtract(t,b.end,f);var I=g.subtract(z,n,k);n=d(C,I);if(1E-6>=Math.abs(n))return[];k=g.subtract(u,f,k);I=d(I,k)/n;n=d(C,k)/n;if(0<=I){if(0<=n||l.type===a.LineType.LINE)return[g.scaleAndAdd(p,f,C,I)]}else if(b.type===a.LineType.LINE&&(0<=n||l.type===a.LineType.LINE))return[g.scaleAndAdd(p,f,C,I)];return[]};a.intersectLineLikeAndCircle=
function(b,l,f){const k=[],n=g.subtract(t,b.end,b.start);var C=g.subtract(z,b.start,l);l=g.squaredLength(n);const I=2*g.dot(n,C);f=g.squaredLength(C)-f*f;f=I*I-4*l*f;0===f?(l=-I/(2*l),(b.type===a.LineType.LINE||0<=l)&&k.push(g.scaleAndAdd(p,b.start,n,l))):0<f&&(f=Math.sqrt(f),C=(-I+f)/(2*l),(b.type===a.LineType.LINE||0<=C)&&k.push(g.scaleAndAdd(p,b.start,n,C)),l=(-I-f)/(2*l),(b.type===a.LineType.LINE||0<=l)&&k.push(g.scaleAndAdd(u,b.start,n,l)));return k};a.pointToLineDistance=function(b,l,f){return Math.abs((l[0]-
b[0])*(f[1]-b[1])-(l[1]-b[1])*(f[0]-b[0]))/g.distance(l,f)};a.projectPoint=m;a.projectPointToCircle=x;a.projectPointToLine=r;a.projectPointToRay=function(b,l,f,k){g.subtract(t,k,f);g.subtract(u,l,f);l=g.dot(t,u)/g.squaredLength(t);return 0<l?g.scaleAndAdd(b,f,t,l):g.copy(b,f)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/angularMeasurementUtils":function(){define("exports ../../core/Cyclical ../../core/quantityUtils ../../core/unitUtils ../../core/libs/gl-matrix-2/math/vec2 ../../core/libs/gl-matrix-2/factories/vec2f64 ../../chunks/vec32 ../../core/libs/gl-matrix-2/factories/vec3f64 ../../geometry/projection/projectVectorToVector ../../geometry/support/geodesicUtils ../../geometry/support/spatialReferenceUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){function p(q,B){if(null!=q&&null!=B)return q=n(q,B),null!=q?g.createAngle(q,"radians","geographic"):void 0}function b(q,B,e){if(q&&B&&e&&(q=n(q,B),B=n(B,e),null!=q&&null!=B))return g.createAngle(B-q,"radians","geographic")}function l(q,B){if(null!=q)switch(B){case a.DirectionMode.Absolute:return f(q);case a.DirectionMode.Relative:return q=k(q),q=G.normalize(q,0,!0),-180===q&&(q=180),g.createAngle(q,"degrees","geographic");case a.DirectionMode.RelativeBilateral:return q=
k(q),q=Math.abs(G.normalize(q,0,!0)),g.createAngle(q,"degrees","geographic")}}function f(q){q=k(q);q=F.normalize(q,0,!0);return g.createAngle(q,"degrees","geographic")}function k(q){if(null!=q)return g.convertRotationType(h.convertUnit(q.value,q.unit,"degrees"),q.rotationType,"geographic")}a.DirectionMode=void 0;(function(q){q.Absolute="absolute";q.Relative="relative";q.RelativeBilateral="relative-bilateral"})(a.DirectionMode||(a.DirectionMode={}));const n=(()=>{const q=x.create(),B=x.create();return(e,
v)=>{r.set(q,e.x,e.y,e.z??0);r.set(B,v.x,v.y,v.z??0);return C(q,B,e.spatialReference,v.spatialReference)}})(),C=(()=>{const q=m.create(),B=x.create(),e=x.create();return(v,A,D,E)=>{if(!r.exactEquals(v,A)){var H=z.geodesicCompatibleSpatialReference(D),J=z.geodesicCompatibleSpatialReference(E);if(H&&J&&u.equals(H,J)&&t.projectVectorToVector(v,D,B,H)&&t.projectVectorToVector(A,E,e,J))return{azimuth:v}=z.inverseGeodeticSolver(w,B,e,H),null!=v?h.convertUnit(v,"degrees","radians"):void 0;q[0]=A[0]-v[0];
q[1]=A[1]-v[1];v=d.angle(m.UNIT_Y,q);0>q[0]&&(v=y-v);return v}}})(),I=(()=>{const q=x.create();return(B,e,v,A,D,E="geodesic")=>{r.copy(q,e);D=k(D);if("geodesic"===E&&(E=z.geodesicCompatibleSpatialReference(v))&&t.projectVectorToVector(q,v,q,E))return z.directGeodeticSolver(B,q,D,A,E),B[2]=e[2],t.projectVectorToVector(B,E,B,v)?!0:!1;v=g.convertRotationType(D,"geographic","arithmetic");v=h.convertUnit(v,"degrees","radians");r.set(B,e[0]+A*Math.cos(v),e[1]+A*Math.sin(v),e[2]);return!0}})(),w=new z.InverseGeodeticSolverResult,
y=2*Math.PI,F=c.cyclicalDegrees,G=new c.Cyclical(-180,180);a.convertAngle=function(q,B,e){let v=h.convertUnit(q.value,q.unit,"degrees");v=g.convertRotationType(v,q.rotationType,e);v=h.convertUnit(v,"degrees",B);return g.createAngle(v,B,e)};a.directionBetweenPoints=p;a.directionForVertices=function(q,B,e,v=a.DirectionMode.Absolute){if(B&&e)switch(v){case a.DirectionMode.Absolute:return p(B,e);case a.DirectionMode.Relative:return l(b(q,B,e),a.DirectionMode.Relative);case a.DirectionMode.RelativeBilateral:return l(b(q,
B,e),a.DirectionMode.RelativeBilateral)}};a.getDegreesArithmetic=function(q){if(null!=q)return g.convertRotationType(h.convertUnit(q.value,q.unit,"degrees"),q.rotationType,"arithmetic")};a.getDegreesGeographic=k;a.getNormalizedDirection=l;a.getNormalizedGeographicOrientation=f;a.pointFromDistanceAlongAzimuth=I;a.radiansGeographicBetweenVec=C;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/tooltipCommonUtils":function(){define("exports ../../../core/asyncUtils ../../../core/handleUtils ../../../core/mathUtils ../../../core/quantityUtils ../../../core/unitUtils ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/coordinateFormatter ../../../geometry/Point ../../../geometry/support/MeshTransform ../../../geometry/support/meshVertexSpaceUtils ../../../geometry/support/spatialReferenceUtils ../../../geometry/support/webMercatorUtils ../keybindings ./fields/parsingAndFormattingUtils ../../support/angularMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n){function C(B,e){const {x:v,y:A,z:D}=e,{x:E,y:H,z:J}=I(B,e.spatialReference);B=null==E||h.floatEqualUlp(E,v)?0:E-v;e=null==H||h.floatEqualUlp(H,A)?0:H-A;const L=null==J||null==D||h.floatEqualUlp(J,D)?0:J-D;return{dx:B,dy:e,dz:L}}function I(B,e){let v,A;B.geographic?(v=n.getDegreesGeographic(B.longitude.actual),A=n.getDegreesGeographic(B.latitude.actual),b.isWebMercator(e)&&(null!=v&&null!=A?[v,A]=l.lngLatToXY(v,A,G):null!=v?v=l.lngLatToXY(v,0,G)[0]:null!=
A&&(A=l.lngLatToXY(0,A,G)[1])),B=B.elevation.actual,e=m.verticalLengthUnitFromSpatialReference(e),e=null!=e&&null!=B?d.valueInUnit(B,e):void 0):(v=B.x.actual?.value,A=B.y.actual?.value,e=B.elevation.actual?.value);return{x:v,y:A,z:e}}function w(B){return r.equals(B,x.UNIT_Z)?1:r.equals(B,q)?-1:null}function y(B){const e=B?.sketchOptions;if(!e)return!1;const {inputEnabled:v,visibleElements:A}=e.tooltips;return v&&!0===B.editableFields.some(({name:D})=>"x"===D||"y"===D?A.coordinates:A[D])}function F(B,
e){if(e&&"geographic"in e){var v=B.clipboardData?.getData("text");if(v)if(e.geographic){if(v=k.parseLatitudeLongitude(v))e.longitude.applyValue(v.longitude),e.latitude.applyValue(v.latitude),B.stopPropagation(),B.preventDefault()}else if(v=k.parseXY(v))e.x.applyValue(v.x),e.y.applyValue(v.y),B.stopPropagation(),B.preventDefault()}}const G=[0,0],q=r.negate(x.create(),x.UNIT_Z);a.connectPasteEvent=function(B){let e=null;return g.handlesGroup([B.on("paste",async v=>{e?.abort();e=c.createTask(async()=>
{t.isLoaded()||await t.load();F(v,B.info)})}),c.createTask(()=>t.load()),g.makeHandle(()=>e?.abort())])};a.enterInputModeIfAvailable=function(B,e){return"key-down"===B.type&&B.key===f.tooltipKeys.enterInputMode&&e&&y(e.info)?(e.enterInputMode(),B.stopPropagation(),!0):!1};a.getXYZDeltasFromTooltipInfo=C;a.pasteLocation=F;a.updateMeshOriginFromTooltipInfo=function(B,e,v){if(e&&p.isRelativeVertexSpace(e.vertexSpace)){var {origin:A,spatialReference:D}=e,{x:E,y:H,z:J}=I(B,D),{dx:L,dy:N,dz:M}=C(B,A);if(0!==
L||0!==N||0!==M)v.onMoveStart?.(),e.centerAt(new z({x:E??A.x,y:H??A.y,z:J??A.z,spatialReference:D})),v.onMove?.(L,N,M),v.onMoveStop?.()}};a.updateMeshTransformFromTooltipInfo=function(B,e,v){if(e&&p.isRelativeVertexSpace(e.vertexSpace)){e=e.transform??(e.transform=new u);var {rotationAngle:A,rotationAxis:D}=e,E=n.getDegreesArithmetic(B.orientation.actual),H=w(D);null!=E&&null!=H&&E!==A&&(v?.onRotateStart?.(A),E*=H,e.rotationAngle=E,v?.onRotate?.(E),v?.onRotateStop?.(E));E=B.scale.actual?.value;H=
e?Math.max(...e.scale):1;null!=E&&E!==H&&({scale:B}=e,v?.onScaleStart?.(B[0],B[1],B[2]),0===H?B=x.clone(x.ONES):(E/=H,B=r.scale(x.create(),B,E)),e.scale=B,v?.onScale?.(B[0],B[1],B[2]),v?.onScaleStop?.(B[0],B[1],B[2]))}};a.updateTooltipInfoFromMeshTransform=function(B,e){const v=p.isRelativeVertexSpace(e.vertexSpace),{scale:A,orientation:D}=B;({transform:B}=e);B?(e=w(B.rotationAxis),e=null!=e?e*B.rotationAngle:null):e=0;v&&null!=e?(D.actual=d.createAngle(e,"degrees","arithmetic"),D.visible=!0):(D.actual=
null,D.visible=!1);v?(A.actual=d.createScalar(B?Math.max(...B.scale):1),A.visible=!0):(A.actual=null,A.visible=!1)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/fields/parsingAndFormattingUtils":function(){define("exports ../../../../core/Cyclical ../../../../core/quantityFormatUtils ../../../../core/quantityUtils ../../../../geometry/coordinateFormatter ../../../../intl/number ../../../support/angularMeasurementUtils".split(" "),function(a,c,g,h,
d,m,r){function x(e){return m.formatNumber(e,{signDisplay:"exceptZero",...I(1)})}function t(e){return g.formatAngle(e,e.rotationType,1)}function z(e){e=r.getDegreesGeographic(e);return m.formatNumber(e,{style:"unit",unitDisplay:"narrow",unit:"degree",signDisplay:0<e?"never":"exceptZero",...I(1)})}function u(e){return g.formatAngle(e,e.rotationType,1)}function p(e){return l(e,q)}function b(e){return l(e,B)}function l(e,v){return g.formatAngle(h.toUnit(e,"degrees"),"geographic",6,v,!1)}function f(e,
v){e=v.normalize(h.toUnit(e,"degrees").value,void 0,!1);return C(h.createScalar(e),6)}function k(e){return m.formatNumber(e.value,{style:"percent"})}function n(e){return m.formatNumber(e,{style:"percent",maximumFractionDigits:0})}function C(e,v){return m.formatNumber(e.value,I(v))}function I(e){return{minimumFractionDigits:e,maximumFractionDigits:e}}function w(e,v,A){e=e.replaceAll(/[\s+]/g,"");""!==A&&(e=e.replaceAll(A,""));""!==v&&(e=e.replaceAll(v,"."));return e}function y(e){return null!=e?h.createAngle(e,
"degrees","geographic"):null}const F=e=>{let v=`[-+]?[0-9${e.thousands}]+`;""!==e.decimal&&(v+=`${e.decimal}[0-9]+`);return new RegExp(`^(${v}\\s*)${e.separator}(\\s*${v})$`,"i")},G=[];for(const e of[",","\\|","\\s+"])for(const v of["\\.",",",""])for(const A of["",",","\\.","\u202f","\\s+"])e!==v&&e!==A&&v!==A&&G.push({separator:e,decimal:v,thousands:A,pattern:F({decimal:v,thousands:A,separator:e})});const q=new c.Cyclical(-180,180),B=new c.Cyclical(-90,90);a.cleanNumber=w;a.createGeographicCoordinate=
y;a.formatLatitudeDecimalDegreesForInputMode=function(e){return f(e,B)};a.formatLongitudeDecimalDegreesForInputMode=function(e){return f(e,q)};a.getFormatters=function(e,v){return{angleRelative:x,direction:t,directionRelative:z,directionRelativeBilateral:u,latitudeDecimalDegrees:b,longitudeDecimalDegrees:p,area:(A,D)=>g.formatArea(e,A,D??v.area),length:(A,D,E)=>g.formatLength(e,A,D??v.length,E),lengthRelative:(A,D)=>g.formatRelativeLength(e,A,D??v.length),totalLength:(A,D)=>g.formatLength(e,A,D??
v.length),verticalLength:(A,D)=>g.formatVerticalLength(e,A,D??v.length),verticalLengthRelative:(A,D)=>g.formatRelativeVerticalLength(e,A,D??v.verticalLength),percentage:k,scalar:C,scale:n}};a.makeQuantityParser=function(e){return(v,A)=>{v=m.parseNumber(v);return null!=v?e(v,A):null}};a.parseLatitude=function(e){return y(d.fromLatitude(e))};a.parseLatitudeLongitude=function(e){if(!e||null!=m.parseNumber(e)||!d.isLoaded())return null;var v=d.fromLatitudeLongitude(e);e=y(v?.latitude);v=y(v?.longitude);
return null!=v&&null!=e?{latitude:e,longitude:v}:null};a.parseLongitude=function(e){return y(d.fromLongitude(e))};a.parseXY=function(e){for(const {decimal:A,thousands:D,pattern:E}of G){E.lastIndex=0;var v=e.match(E);if(!v)continue;const H=m.parseNumber(w(v[1],A,D));v=m.parseNumber(w(v[2],A,D));if(null!=H&&null!=v)return{x:h.createScalar(H),y:h.createScalar(v)}}return null};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/DrawCircleTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t){a.DrawCircleTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);this.type="draw-circle";this.ySize=this.xSize=this.radius=null;this.area=g.zeroSquareMeters}get allFields(){return[]}};c.__decorate([h.property()],a.DrawCircleTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.DrawCircleTooltipInfo.prototype,"radius",void 0);c.__decorate([h.property()],a.DrawCircleTooltipInfo.prototype,"xSize",void 0);c.__decorate([h.property()],a.DrawCircleTooltipInfo.prototype,
"ySize",void 0);c.__decorate([h.property()],a.DrawCircleTooltipInfo.prototype,"area",void 0);c.__decorate([h.property()],a.DrawCircleTooltipInfo.prototype,"allFields",null);a.DrawCircleTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.DrawCircleTooltipInfo")],a.DrawCircleTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/SketchTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Accessor ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass".split(" "),
function(a,c,g,h,d,m,r,x){a.SketchTooltipInfo=class extends g{constructor(t){super(t);this.viewType=this.helpMessage=void 0}get visibleElements(){return this.sketchOptions.tooltips.visibleElements}get allFields(){return[]}get editableFields(){return this.allFields.filter(t=>t.visible&&!t.readOnly)}clearInputValues(){this.allFields.forEach(t=>t.clearInputValue())}};c.__decorate([h.property()],a.SketchTooltipInfo.prototype,"sketchOptions",void 0);c.__decorate([h.property()],a.SketchTooltipInfo.prototype,
"visibleElements",null);c.__decorate([h.property()],a.SketchTooltipInfo.prototype,"helpMessage",void 0);c.__decorate([h.property()],a.SketchTooltipInfo.prototype,"viewType",void 0);c.__decorate([h.property()],a.SketchTooltipInfo.prototype,"allFields",null);c.__decorate([h.property()],a.SketchTooltipInfo.prototype,"editableFields",null);a.SketchTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.SketchTooltipInfo")],a.SketchTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/infos/DrawMeshTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../fields/fields ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),function(a,c,g,h,d,m,r,x,t,z){a.DrawMeshTooltipInfo=class extends z.TooltipInfoWithCoordinates(t.SketchTooltipInfo){constructor(u){super(u);
this.type="draw-mesh";this.orientation=x.makeOrientationField({lockable:!1});this.scale=x.makeScaleField({lockable:!1})}get allFields(){return[this.longitude,this.latitude,this.x,this.y,this.elevation,this.orientation,this.scale]}};c.__decorate([g.property()],a.DrawMeshTooltipInfo.prototype,"helpMessage",void 0);c.__decorate([g.property()],a.DrawMeshTooltipInfo.prototype,"allFields",null);a.DrawMeshTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.DrawMeshTooltipInfo")],a.DrawMeshTooltipInfo);
Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/fields/fields":function(){define("exports ../../../../core/quantityUtils ./parsingAndFormattingUtils ./TooltipField ./TooltipFieldElevation ./TooltipFieldOrientation ../../../support/angularMeasurementUtils".split(" "),function(a,c,g,h,d,m,r){function x(z){return new h.TooltipField({name:"distance",actual:c.zeroMeters,parse:g.makeQuantityParser((u,p)=>c.createLength(Math.max(u,0),p.inputUnitInfos.length.unit)),
format:(u,p)=>p.formatters.length(u),formatForInputMode:(u,p)=>p.formatters.scalar(c.toUnit(u,p.inputUnitInfos.length.unit)),suffix:u=>u.inputUnitInfos.length.abbreviation,title:u=>u.messages.sketch.distance,...z})}function t(z,u){return new h.TooltipField({actual:c.createScalar(0),parse:g.makeQuantityParser(p=>c.createScalar(p)),format:(p,b)=>b.formatters.scalar(p),formatForInputMode:(p,b)=>b.formatters.scalar(p),title:p=>p.messages.sketch[z],...u})}a.makeAreaField=function(z){return new h.TooltipField({name:"area",
actual:c.zeroSquareMeters,parse:g.makeQuantityParser((u,p)=>c.createArea(u,p.inputUnitInfos.area.unit)),format:(u,p)=>p.formatters.area(u),formatForInputMode:(u,p)=>p.formatters.scalar(c.toUnit(u,p.inputUnitInfos.area.unit)),suffix:u=>u.inputUnitInfos.area.abbreviation,title:u=>u.messages.sketch.area,readOnly:!0,...z})};a.makeDirectionField=function(z){return new h.TooltipField({name:"direction",actual:c.zeroDegrees,parse:g.makeQuantityParser((u,p)=>c.createAngle(u,p.inputUnitInfos.direction.unit,
"geographic")),format:(u,p)=>{const b=p.sketchOptions.values.effectiveDirectionMode;u=r.getNormalizedDirection(u,b);switch(b){case r.DirectionMode.Absolute:return p.formatters.direction(u);case r.DirectionMode.Relative:return p.formatters.directionRelative(u);case r.DirectionMode.RelativeBilateral:return p.formatters.directionRelativeBilateral(u)}},formatForInputMode:(u,p)=>{u=r.getNormalizedDirection(u,p.sketchOptions.values.effectiveDirectionMode);return p.formatters.scalar(c.toUnit(u,p.inputUnitInfos.direction.unit))},
suffix:u=>u.inputUnitInfos.direction.abbreviation,title:u=>{const p=u.sketchOptions.values.effectiveDirectionMode,{absolute:b,relative:l}=u.messages.sketch.direction;switch(p){case r.DirectionMode.Absolute:return b;case r.DirectionMode.Relative:case r.DirectionMode.RelativeBilateral:return l}},...z})};a.makeElevationField=function(z){return new d.TooltipFieldElevation(z)};a.makeLatitudeField=function(z){return new h.TooltipField({name:"y",actual:c.zeroDegrees,parse:g.parseLatitude,format:(u,p)=>p.formatters.latitudeDecimalDegrees(u),
formatForInputMode:u=>g.formatLatitudeDecimalDegreesForInputMode(u),suffix:u=>u.inputUnitInfos.longitudeLatitude.abbreviation,title:u=>u.messages.sketch.latitude,...z})};a.makeLengthField=x;a.makeLongitudeField=function(z){return new h.TooltipField({name:"x",actual:c.zeroDegrees,parse:g.parseLongitude,format:(u,p)=>p.formatters.longitudeDecimalDegrees(u),formatForInputMode:u=>g.formatLongitudeDecimalDegreesForInputMode(u),suffix:u=>u.inputUnitInfos.longitudeLatitude.abbreviation,title:u=>u.messages.sketch.longitude,
...z})};a.makeOrientationField=function(z){return new m.TooltipFieldOrientation(z)};a.makeScaleField=function(z){return t("scale",{name:"scale",actual:null,parse:g.makeQuantityParser(u=>c.createScalar(Math.abs(u))),...z})};a.makeTotalLengthField=function(){return x({format:(z,u)=>u.formatters.totalLength(z),title:z=>z.messages.sketch.totalLength,readOnly:!0})};a.makeXField=function(z){return t("x",{name:"x",...z})};a.makeYField=function(z){return t("y",{name:"y",...z})};Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/fields/TooltipField":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Accessor ../../../../core/uuid ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass".split(" "),function(a,c,g,h,d,m,r,x,t){function z(u){return null!=u&&""===u.trim()}a.TooltipField=class extends g{constructor(u){super(u);this.actual=
null;this.lockable=!0;this.id=h.generateUUID();this.inputValue=null;this.readOnly=!1;this.suffix=null;this.visible=!0;this.invalid=!1;this.unlockOnVertexPlacement=!0}get committed(){return this.lockable?this._get("committed"):null}set committed(u){this.lockable&&this._set("committed",u)}get dirty(){return null!=this.inputValue}get locked(){return this.lockable&&null!=this.committed}onInput(u){this.inputValue=u}onCommit(u,p,b){this.lockable?this._onCommitLockable(u,b):this._onCommitNonLockable(b);
if(!this.invalid||"commit-and-exit"!==u)b.onCommit(p,u)}_onCommitLockable(u,p){const {inputValue:b,locked:l}=this;l&&z(b)?this.unlock():("commit-and-exit"===u&&!l||null!=b)&&this._parseInputAndLock(p)}_onCommitNonLockable(u){const {inputValue:p}=this;z(p)?this.setActual(null):null!=p&&this._parseInputAndSetActual(u)}applyValue(u){this.lockable?this.lock(u):this.setActual(u)}clearInputValue(){this.inputValue=null;this.invalid=!1}setActual(u){this.actual=u;this.clearInputValue()}lock(u){this.lockable&&
(this.committed=u??this.actual,this.clearInputValue())}unlock(){this.lockable&&(this.committed=null,this.clearInputValue())}toggleLock(u){this.lockable&&(this.locked?this.unlock():this._parseInputAndLock(u))}getSuffix(u){const {suffix:p}=this;return"function"===typeof p?p(u):p}getFormattedValue(u){const {actual:p,committed:b,format:l}=this;return null!=b?l(b,u):null!=p?l(p,u):null}getRawDisplayValue(u){const {actual:p,committed:b,inputValue:l}=this;return null!=l?l:this.lockable&&null!=b?this.formatForInputMode(b,
u):null!=p?this.formatForInputMode(p,u):null}_parseInputAndSetActual(u){const {inputValue:p}=this;if(null==p||z(p))return this.setActual(null);u=this.parse(p,u);null==u?this.invalid=!0:this.setActual(u)}_parseInputAndLock(u){const {inputValue:p,actual:b}=this;if(z(p))return this.unlock();if(null==p)return this.lock(b);u=this.parse(p,u);null==u?this.invalid=!0:this.lock(u)}};c.__decorate([d.property()],a.TooltipField.prototype,"actual",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"committed",
null);c.__decorate([d.property()],a.TooltipField.prototype,"dirty",null);c.__decorate([d.property()],a.TooltipField.prototype,"format",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"formatForInputMode",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"lockable",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"locked",null);c.__decorate([d.property()],a.TooltipField.prototype,"id",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"inputValue",void 0);
c.__decorate([d.property()],a.TooltipField.prototype,"name",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"parse",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"readOnly",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"suffix",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"title",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"visible",void 0);c.__decorate([d.property()],a.TooltipField.prototype,"invalid",void 0);c.__decorate([d.property()],
a.TooltipField.prototype,"unlockOnVertexPlacement",void 0);a.TooltipField=c.__decorate([t.subclass("esri.views.interactive.tooltip.fields.TooltipField")],a.TooltipField);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/fields/TooltipFieldElevation":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./parsingAndFormattingUtils ./TooltipField".split(" "),
function(a,c,g,h,d,m,r,x,t,z){a.TooltipFieldElevation=class extends z.TooltipField{constructor(u){super(u);this.showAsZ=!1}normalizeCtorArgs(u){return{name:"elevation",actual:g.zeroMeters,parse:t.makeQuantityParser((p,b)=>g.createLength(p,b.inputUnitInfos.verticalLength.unit)),format:(p,b)=>b.formatters.verticalLength(p),formatForInputMode:(p,b)=>b.formatters.scalar(g.toUnit(p,b.inputUnitInfos.verticalLength.unit)),suffix:p=>p.inputUnitInfos.verticalLength.abbreviation,title:p=>p.messages.sketch[this.showAsZ?
"z":"elevation"],unlockOnVertexPlacement:!1,...u}}};c.__decorate([h.property()],a.TooltipFieldElevation.prototype,"showAsZ",void 0);a.TooltipFieldElevation=c.__decorate([x.subclass("esri.views.interactive.tooltip.fields.TooltipFieldElevation")],a.TooltipFieldElevation);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/fields/TooltipFieldOrientation":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityFormatUtils ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./parsingAndFormattingUtils ./TooltipField ../../../support/angularMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipFieldOrientation=class extends u.TooltipField{constructor(b){super(b);this.precision=1}normalizeCtorArgs(b){return{name:"orientation",actual:null,parse:z.makeQuantityParser((l,f)=>h.createAngle(l,f.inputUnitInfos.orientation.unit,"geographic")),format:l=>{l=p.getNormalizedGeographicOrientation(l);return g.formatAngle(l,"geographic",this.precision)},formatForInputMode:(l,f)=>{l=p.getNormalizedGeographicOrientation(l);return f.formatters.scalar(l)},suffix:l=>
l.inputUnitInfos.orientation.abbreviation,title:l=>l.messages.sketch.orientation,...b}}};c.__decorate([d.property()],a.TooltipFieldOrientation.prototype,"precision",void 0);a.TooltipFieldOrientation=c.__decorate([t.subclass("esri.views.interactive.tooltip.fields.TooltipFieldOrientation")],a.TooltipFieldOrientation);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TooltipInfoWithCoordinates":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../geometry/support/pointUtils ../fields/fields ../fields/parsingAndFormattingUtils ../../../support/geodesicMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){const b=[0,0];a.TooltipInfoWithCoordinates=l=>{l=class extends l{constructor(){super(...arguments);this.longitude=z.makeLongitudeField();this.latitude=z.makeLatitudeField();this.x=z.makeXField();this.y=z.makeYField();this.elevation=z.makeElevationField();this.geographic=!1}get effectiveX(){return this.geographic?this.longitude:this.x}get effectiveY(){return this.geographic?this.latitude:this.y}get key(){return{longitude:this.longitude.actual,latitude:this.latitude.actual,
x:this.x.actual,y:this.y.actual,elevation:this.elevation.actual,geographic:this.geographic}}setLocationFromPoint(f,k=f?.spatialReference){this.geographic=k?p.supportsGeodesicMeasurement(k):!1;null==f?(this._setActualLonLat(null,null),this._setActualXY(null,null)):this.geographic?(f=t.getLongitudeLatitude(f,b),this._setActualLonLat(u.createGeographicCoordinate(f?.[0]),u.createGeographicCoordinate(f?.[1]))):this._setActualXY(g.createScalar(f.x),g.createScalar(f.y))}_setActualLonLat(f,k){this.longitude.actual=
f;this.latitude.actual=k}_setActualXY(f,k){this.x.actual=f;this.y.actual=k}};c.__decorate([h.property()],l.prototype,"geographic",void 0);c.__decorate([h.property()],l.prototype,"effectiveX",null);c.__decorate([h.property()],l.prototype,"effectiveY",null);c.__decorate([h.property()],l.prototype,"key",null);return l=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.TooltipInfoWithCoordinates")],l)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/DrawPointTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),
function(a,c,g,h,d,m,r,x,t){a.DrawPointTooltipInfo=class extends t.TooltipInfoWithCoordinates(x.SketchTooltipInfo){constructor(z){super(z);this.type="draw-point"}get allFields(){return[this.longitude,this.latitude,this.x,this.y,this.elevation]}};c.__decorate([g.property()],a.DrawPointTooltipInfo.prototype,"helpMessage",void 0);c.__decorate([g.property()],a.DrawPointTooltipInfo.prototype,"allFields",null);a.DrawPointTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.DrawPointTooltipInfo")],
a.DrawPointTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/DrawPolygonTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../fields/fields ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),function(a,c,g,h,d,m,r,x,t,z){a.DrawPolygonTooltipInfo=
class extends z.TooltipInfoWithCoordinates(t.SketchTooltipInfo){constructor(u){super(u);this.type="draw-polygon";this.direction=x.makeDirectionField();this.distance=x.makeLengthField({title:p=>p.messages.sketch.distance});this.area=x.makeAreaField();this.xyMode="direction-distance"}get allFields(){return[this.direction,this.distance,this.longitude,this.latitude,this.x,this.y,this.elevation,this.area]}};c.__decorate([g.property()],a.DrawPolygonTooltipInfo.prototype,"xyMode",void 0);c.__decorate([g.property()],
a.DrawPolygonTooltipInfo.prototype,"helpMessage",void 0);c.__decorate([g.property()],a.DrawPolygonTooltipInfo.prototype,"allFields",null);a.DrawPolygonTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.DrawPolygonTooltipInfo")],a.DrawPolygonTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/DrawPolylineTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../fields/fields ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),
function(a,c,g,h,d,m,r,x,t,z){a.DrawPolylineTooltipInfo=class extends z.TooltipInfoWithCoordinates(t.SketchTooltipInfo){constructor(u){super(u);this.type="draw-polyline";this.direction=x.makeDirectionField();this.distance=x.makeLengthField({title:p=>p.messages.sketch.distance});this.totalLength=x.makeTotalLengthField();this.xyMode="direction-distance"}get allFields(){return[this.direction,this.distance,this.longitude,this.latitude,this.x,this.y,this.elevation,this.totalLength]}};c.__decorate([g.property()],
a.DrawPolylineTooltipInfo.prototype,"helpMessage",void 0);c.__decorate([g.property()],a.DrawPolylineTooltipInfo.prototype,"xyMode",void 0);c.__decorate([g.property()],a.DrawPolylineTooltipInfo.prototype,"allFields",null);a.DrawPolylineTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.DrawPolylineTooltipInfo")],a.DrawPolylineTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/DrawRectangleTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t){a.DrawRectangleTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);this.type="draw-rectangle";this.ySize=this.xSize=g.zeroMeters;this.area=g.zeroSquareMeters}get allFields(){return[]}};c.__decorate([h.property()],a.DrawRectangleTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.DrawRectangleTooltipInfo.prototype,"xSize",void 0);c.__decorate([h.property()],a.DrawRectangleTooltipInfo.prototype,"ySize",void 0);c.__decorate([h.property()],
a.DrawRectangleTooltipInfo.prototype,"area",void 0);c.__decorate([h.property()],a.DrawRectangleTooltipInfo.prototype,"allFields",null);a.DrawRectangleTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.DrawRectangleTooltipInfo")],a.DrawRectangleTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/automaticAreaMeasurementUtils":function(){define(["exports","./euclideanAreaMeasurementUtils","./geodesicAreaMeasurementUtils"],function(a,
c,g){function h(d,m,r=c.createEuclideanPlanarAreaCache()){return"on-the-ground"===m?(m=g.geodesicArea(d),null!=m?m:c.euclideanHorizontalPlanarArea(d,r)):c.euclideanPlanarArea(d,r)}a.autoArea2D=function(d,m=c.createEuclideanPlanarAreaCache()){return h(d,"on-the-ground",m)};a.autoAreaByElevationMode=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/euclideanAreaMeasurementUtils":function(){define("exports ../../core/quantityUtils ../../core/unitUtils ../../chunks/earcut ../../chunks/vec32 ../../core/libs/gl-matrix-2/factories/vec3f64 ../../geometry/projection/projectVectorToVector ../../geometry/support/plane ../../geometry/support/triangle ./measurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z){function u(k,n,C=k.hasZ){const I=z.computeEuclideanMeasurementSR(k.spatialReference),w=g.areaUnitFromSpatialReference(I);if(null==w)return null;let y=0;for(const v of k.rings){var F=v.length;if(3>F)continue;const {positionsWorldCoords:A}=n;for(;A.length<F;)A.push(m.create());var G=l,q=d.set(f,0,0,0),B=1/F;for(let D=0;D<F;D++){var e=v[D];2>e.length?e=!1:(d.set(G,e[0],e[1],C?e[2]||0:0),e=!0);if(!e||!r.projectVectorToVector(G,k.spatialReference,A[D],I))return null;d.scaleAndAdd(q,
q,A[D],B)}G=x.fromPoints(A[0],A[1],q,x.wrap());if(0!==d.squaredLength(x.getNormal(G))){for(B=0;B<F;B++)x.projectPointLocal(G,q,A[B],A[B]);F=b(A);for(q=0;q<F.length;q+=3)y+=t.areaPoints2d(A[F[q]],A[F[q+1]],A[F[q+2]])}}return c.createArea(y,w)}function p(){return{positionsWorldCoords:[]}}function b(k){var n=h.earcut;const C=new Float64Array(2*k.length);for(let I=0;I<k.length;++I){const w=k[I],y=2*I;C[y]=w[0];C[y+1]=w[1]}return n.call(h,C,[],2)}const l=m.create(),f=m.create();a.computeEuclideanPlanarArea=
u;a.createEuclideanPlanarAreaCache=p;a.euclideanHorizontalPlanarArea=function(k,n=p()){return u(k,n,!1)};a.euclideanPlanarArea=function(k,n=p()){return u(k,n)};a.triangulate=b;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/geodesicAreaMeasurementUtils":function(){define(["exports","../../core/quantityUtils","../../geometry/geometryEngine","../../geometry/support/geodesicUtils","./geodesicMeasurementUtils"],function(a,c,g,h,d){function m(x){return c.createArea(Math.abs(h.geodesicAreas([x],
"square-meters")[0]),"square-meters")}function r(x){try{return c.createArea(Math.abs(g.geodesicArea(x,"square-meters")),"square-meters")}catch(t){return null}}a.geodesicArea=function(x){const {spatialReference:t}=x;return d.geodesicMeasure(t,m,r,x)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/InteractiveToolBase":function(){define("exports ../../chunks/tslib.es6 ../../core/Accessor ../../core/has ../../core/Logger ../../core/promiseUtils ../../core/accessorSupport/decorators/property ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./interfaces ./ManipulatorCollection".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.InteractiveToolBase=class extends g{constructor(p){super(p);this.manipulators=new u.ManipulatorCollection;this.automaticManipulatorSelection=!0;this.hasHoveredManipulators=this.hasGrabbedManipulators=!1;this.firstGrabbedManipulator=null;this.created=!1;this.removeIncompleteOnCancel=!0;this._editableFlags=new Map([[z.EditableFlag.MANAGER,!0],[z.EditableFlag.USER,!0]]);this._creationFinishedResolver=m.createResolver()}get active(){return null!=this.view&&this.view.activeTool===
this}set visible(p){this._get("visible")!==p&&(this._set("visible",p),this._syncVisible())}get editable(){return this.getEditableFlag(z.EditableFlag.USER)}set editable(p){this.setEditableFlag(z.EditableFlag.USER,p)}get updating(){return!1}get cursor(){return null}get hasFocusedManipulators(){return this.hasGrabbedManipulators||this.hasHoveredManipulators}destroy(){this.manipulators.destroy();this._set("view",null)}onAdd(){this._syncVisible()}activate(){null!=this.view&&(this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}handleInputEvent(p){this.onInputEvent(p)}handleInputEventAfter(p){this.onInputEventAfter(p)}setEditableFlag(p,
b){this._editableFlags.set(p,b);this.manipulators.isToolEditable=this.internallyEditable;this._updateManipulatorAttachment();p===z.EditableFlag.USER&&this.notifyChange("editable");this.onEditableChange();this.onManipulatorSelectionChanged()}getEditableFlag(p){return this._editableFlags.get(p)??!1}whenCreated(){return this._creationFinishedResolver.promise}onManipulatorSelectionChanged(){}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(p){}onInputEventAfter(p){}get internallyEditable(){return this.getEditableFlag(z.EditableFlag.USER)&&
this.getEditableFlag(z.EditableFlag.MANAGER)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this);this._set("created",!0)}_syncVisible(){this.initialized&&(this.visible?this._show():(this._hide(),this.active&&(this.view.activeTool=null)))}_show(){this._updateManipulatorAttachment();this.onShow()}_hide(){this._updateManipulatorAttachment();this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};c.__decorate([r.property({constructOnly:!0})],
a.InteractiveToolBase.prototype,"view",void 0);c.__decorate([r.property({readOnly:!0})],a.InteractiveToolBase.prototype,"active",null);c.__decorate([r.property({value:!0})],a.InteractiveToolBase.prototype,"visible",null);c.__decorate([r.property({value:!0})],a.InteractiveToolBase.prototype,"editable",null);c.__decorate([r.property({readOnly:!0})],a.InteractiveToolBase.prototype,"manipulators",void 0);c.__decorate([r.property({readOnly:!0})],a.InteractiveToolBase.prototype,"updating",null);c.__decorate([r.property()],
a.InteractiveToolBase.prototype,"cursor",null);c.__decorate([r.property({readOnly:!0})],a.InteractiveToolBase.prototype,"automaticManipulatorSelection",void 0);c.__decorate([r.property()],a.InteractiveToolBase.prototype,"hasFocusedManipulators",null);c.__decorate([r.property()],a.InteractiveToolBase.prototype,"hasGrabbedManipulators",void 0);c.__decorate([r.property()],a.InteractiveToolBase.prototype,"hasHoveredManipulators",void 0);c.__decorate([r.property()],a.InteractiveToolBase.prototype,"firstGrabbedManipulator",
void 0);c.__decorate([r.property({readOnly:!0})],a.InteractiveToolBase.prototype,"created",void 0);c.__decorate([r.property({readOnly:!0})],a.InteractiveToolBase.prototype,"removeIncompleteOnCancel",void 0);a.InteractiveToolBase=c.__decorate([t.subclass("esri.views.interactive.InteractiveToolBase")],a.InteractiveToolBase);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/ManipulatorCollection":function(){define(["exports","../../core/Collection"],function(a,c){a.ManipulatorVisibilityPredicate=
void 0;(function(h){h[h.WhenToolEditable=0]="WhenToolEditable";h[h.WhenToolNotEditable=1]="WhenToolNotEditable";h[h.Always=2]="Always"})(a.ManipulatorVisibilityPredicate||(a.ManipulatorVisibilityPredicate={}));class g{constructor(){this._isToolEditable=!0;this._manipulators=new c;this._resourceContexts={manipulator3D:{}};this._attached=!1}set isToolEditable(h){this._isToolEditable=h}get length(){return this._manipulators.length}add(h,d=a.ManipulatorVisibilityPredicate.WhenToolEditable){this.addMany([h],
d)}addMany(h,d=a.ManipulatorVisibilityPredicate.WhenToolEditable){for(const m of h)h={manipulator:m,visibilityPredicate:d,attached:!1},this._manipulators.add(h),this._attached&&this._updateManipulatorAttachment(h)}remove(h){for(let d=0;d<this._manipulators.length;d++)if(this._manipulators.at(d).manipulator===h){h=this._manipulators.splice(d,1)[0];this._detachManipulator(h);break}}removeAll(){this._manipulators.forEach(h=>{this._detachManipulator(h)});this._manipulators.removeAll()}attach(){this._manipulators.forEach(h=>
{this._updateManipulatorAttachment(h)});this._attached=!0}detach(){this._manipulators.forEach(h=>{this._detachManipulator(h)});this._attached=!1}destroy(){this.detach();this._manipulators.forEach(({manipulator:h})=>h.destroy());this._manipulators.destroy();this._resourceContexts=null}on(h,d){return this._manipulators.on(h,m=>{d(m)})}forEach(h){for(const d of this._manipulators.items)h(d)}some(h){return this._manipulators.items.some(h)}toArray(){const h=[];this.forEach(d=>h.push(d.manipulator));return h}intersect(h,
d){let m=null,r=Number.MAX_VALUE;this._manipulators.forEach(({manipulator:x,attached:t})=>{t&&x.interactive&&(t=x.intersectionDistance(h,d),null!=t&&t<r&&(r=t,m=x))});return m}_updateManipulatorAttachment(h){this._isManipulatorItemVisible(h)?this._attachManipulator(h):this._detachManipulator(h)}_attachManipulator(h){h.attached||(h.manipulator.attach&&h.manipulator.attach(this._resourceContexts),h.attached=!0)}_detachManipulator(h){if(h.attached){var d=h.manipulator;d.grabbing=!1;d.dragging=!1;d.hovering=
!1;d.selected=!1;d.detach&&d.detach(this._resourceContexts);h.attached=!1}}_isManipulatorItemVisible(h){return h.visibilityPredicate===a.ManipulatorVisibilityPredicate.Always?!0:this._isToolEditable?h.visibilityPredicate===a.ManipulatorVisibilityPredicate.WhenToolEditable:h.visibilityPredicate===a.ManipulatorVisibilityPredicate.WhenToolNotEditable}}a.ManipulatorCollection=g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/sketch/SketchOptions":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./SketchLabelOptions ./SketchTooltipOptions ./SketchValueOptions".split(" "),
function(a,c,g,h,d,m,r,x,t,z){c=class extends c{constructor(u){super(u);this.labels=new x;this.tooltips=new t;this.values=new z}};a.__decorate([g.property({nonNullable:!0,type:x})],c.prototype,"labels",void 0);a.__decorate([g.property({nonNullable:!0,type:t})],c.prototype,"tooltips",void 0);a.__decorate([g.property({nonNullable:!0,type:z})],c.prototype,"values",void 0);return c=a.__decorate([r.subclass("esri.views.interactive.sketch.SketchOptions")],c)})},"esri/views/interactive/sketch/SketchLabelOptions":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "),
function(a,c,g,h,d,m,r){c=class extends c{constructor(x){super(x);this.enabled=!1}};a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"enabled",void 0);return c=a.__decorate([r.subclass("esri.views.interactive.sketch.SketchLabelOptions")],c)})},"esri/views/interactive/sketch/SketchTooltipOptions":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./SketchTooltipElevationOptions ./SketchTooltipVisibleElements".split(" "),
function(a,c,g,h,d,m,r,x,t){c=class extends c{constructor(z){super(z);this.forceEnabled=this.enabled=!1;this.helpMessageIcon=this.helpMessage=null;this.inputEnabled=!0;this.elevation=new x.SketchTooltipElevationOptions;this.visibleElements=new t;this.visualVariables=null;this.xyMode="auto"}get effectiveEnabled(){return this.forceEnabled||this.enabled}};a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"enabled",void 0);a.__decorate([g.property()],c.prototype,"forceEnabled",void 0);
a.__decorate([g.property()],c.prototype,"effectiveEnabled",null);a.__decorate([g.property()],c.prototype,"helpMessage",void 0);a.__decorate([g.property()],c.prototype,"helpMessageIcon",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"inputEnabled",void 0);a.__decorate([g.property({type:x.SketchTooltipElevationOptions,nonNullable:!0})],c.prototype,"elevation",void 0);a.__decorate([g.property({type:t,nonNullable:!0})],c.prototype,"visibleElements",void 0);a.__decorate([g.property()],
c.prototype,"visualVariables",void 0);a.__decorate([g.property()],c.prototype,"xyMode",void 0);return c=a.__decorate([r.subclass("esri.views.interactive.sketch.SketchTooltipOptions")],c)})},"esri/views/interactive/sketch/SketchTooltipElevationOptions":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "),
function(a,c,g,h,d,m,r,x){a.SketchTooltipElevationOptions=class extends g{constructor(t){super(t);this.mode="absolute-height"}toJSON(){return{mode:this.mode}}};c.__decorate([h.property({type:String,nonNullable:!0})],a.SketchTooltipElevationOptions.prototype,"mode",void 0);a.SketchTooltipElevationOptions=c.__decorate([x.subclass("esri.views.interactive.sketch.SketchTooltipElevationOptions")],a.SketchTooltipElevationOptions);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/sketch/SketchTooltipVisibleElements":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "),
function(a,c,g,h,d,m,r){c=class extends c{constructor(x){super(x);this.header=this.elevation=this.distance=this.direction=this.coordinates=this.area=!0;this.helpMessage=!1;this.totalLength=this.size=this.scale=this.rotation=this.radius=this.orientation=!0}};a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"area",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"coordinates",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,
"direction",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"distance",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"elevation",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"header",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"helpMessage",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"orientation",void 0);a.__decorate([g.property({type:Boolean,
nonNullable:!0})],c.prototype,"radius",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"rotation",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"scale",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"size",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"totalLength",void 0);return c=a.__decorate([r.subclass("esri.views.interactive.sketch.SketchTooltipVisibleElements")],c)})},"esri/views/interactive/sketch/SketchValueOptions":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../support/angularMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x){c=class extends c{constructor(t){super(t);this.directionMode="relative";this.relativeDirectionIsBilateral=!1}get effectiveDirectionMode(){switch(this.directionMode){case "relative":return this.relativeDirectionIsBilateral?x.DirectionMode.RelativeBilateral:x.DirectionMode.Relative;case "absolute":return x.DirectionMode.Absolute}}};a.__decorate([g.property({type:String,nonNullable:!0})],c.prototype,"directionMode",void 0);a.__decorate([g.property({type:Boolean,nonNullable:!0})],
c.prototype,"relativeDirectionIsBilateral",void 0);a.__decorate([g.property()],c.prototype,"effectiveDirectionMode",null);return c=a.__decorate([r.subclass("esri.views.interactive.sketch.SketchValueOptions")],c)})},"esri/views/interactive/tooltip/Tooltip":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Evented ../../../core/events ../../../core/maybe ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../support/themeUtils ./css ./content/tooltipContentFactory ../../../widgets/support/widgetUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f){function k(I){if("fixed"!==I.positionMode||I.position){var {style:w}=I.container,y=I.position??I.screenPoint;null!=y&&null!=I.content?(w.display="block",I=f.isRTL(I.container),y=`translate(${Math.round(y.x)+C[0]*(I?-1:1)}px, ${Math.round(y.y)+C[1]}px)`,w.transform=I?`translate(-100%, 0) ${y}`:y):w.display="none"}}var n=`${b.base}`;a.Tooltip=class extends g.EventedAccessor{constructor(I){super(I);this.content=this.position=this.info=null;I=document.createElement("div");
I.classList.add(n);p.setCalciteThemeClass(I);this.contentContainer=I}initialize(){const {contentContainer:I}=this;this.addHandles([m.watch(()=>this.view.overlay?.surface,w=>{I.remove();w?.appendChild(I)},m.syncAndInitial),m.watch(()=>this.info,(w,y)=>{if(null!=this.content&&null!=w&&null!=y&&w.type===y.type)this.content.info=w;else if(this.content=d.destroyMaybe(this.content),w=l.tooltipContentFactory(this,w))this.content=w,w.container&&I.appendChild(w.container),this.exitInputMode()},m.syncAndInitial),
m.watch(()=>({container:this.contentContainer,content:this.content,screenPoint:this._screenPoint,positionMode:this.positionMode,position:this.position}),k,m.syncAndInitial),h.on(this.contentContainer,"paste",w=>{this.emit("paste",w)})])}destroy(){this.info=null;this.content=d.destroyMaybe(this.content);this.contentContainer.remove()}get positionMode(){return"input"===this.content?.mode?"fixed":"follow-cursor"}get mode(){return this.content?.mode??"feedback"}get _screenPoint(){const {inputManager:I}=
this.view;return I?.multiTouchActive?null:I?.latestPointerLocation}get visible(){return"none"!==this.contentContainer?.style.display}clear(){this.info=null}async enterInputMode(I){await this.content?.enterInputMode(I)}async exitInputMode(I){await this.content?.exitInputMode(I)}};c.__decorate([r.property({nonNullable:!0})],a.Tooltip.prototype,"view",void 0);c.__decorate([r.property()],a.Tooltip.prototype,"info",void 0);c.__decorate([r.property()],a.Tooltip.prototype,"positionMode",null);c.__decorate([r.property()],
a.Tooltip.prototype,"position",void 0);c.__decorate([r.property()],a.Tooltip.prototype,"content",void 0);c.__decorate([r.property()],a.Tooltip.prototype,"mode",null);c.__decorate([r.property()],a.Tooltip.prototype,"contentContainer",void 0);c.__decorate([r.property()],a.Tooltip.prototype,"_screenPoint",null);a.Tooltip=c.__decorate([u.subclass("esri.views.interactive.tooltip.Tooltip")],a.Tooltip);const C=[20,20];Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/css":function(){define(["exports"],
function(a){a.base="esri-tooltip";a.content="esri-tooltip-content";a.contentHeader="esri-tooltip-content__header";a.contentHeaderActions="esri-tooltip-content__header__actions";a.contentHeaderSpacer="esri-tooltip-content__header__spacer";a.contentInputMode="esri-tooltip-content--input";a.drawContentHeaderActions="esri-tooltip-draw-header-actions";a.helpMessage="esri-tooltip-help-message";a.helpMessageIcon="esri-tooltip-help-message__icon";a.helpMessageText="esri-tooltip-help-message__text";a.table=
"esri-tooltip-table";Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/tooltipContentFactory":function(){define("exports ./TooltipContentDrawCircle ./TooltipContentDrawMesh ./TooltipContentDrawPoint ./TooltipContentDrawPolygon ./TooltipContentDrawPolyline ./TooltipContentDrawRectangle ./TooltipContentExtentRotate ./TooltipContentExtentScale ./TooltipContentMovePoint ./TooltipContentReshapeEdgeOffset ./TooltipContentSelectedVertex ./TooltipContentTransformAbsolute ./TooltipContentTransformMesh ./TooltipContentTransformPoint ./TooltipContentTransformRotate ./TooltipContentTransformScale ./TooltipContentTranslate ./TooltipContentTranslateVertex ./TooltipContentTranslateXY ./TooltipContentTranslateZ".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y){a.tooltipContentFactory=function(F,G){if(null==G)return null;const q=document.createElement("div");switch(G.type){case "draw-point":return new h.TooltipContentDrawPoint({tooltip:F,info:G,container:q});case "draw-polygon":return new d.TooltipContentDrawPolygon({tooltip:F,info:G,container:q});case "draw-polyline":return new m.TooltipContentDrawPolyline({tooltip:F,info:G,container:q});case "draw-mesh":return new g.TooltipContentDrawMesh({tooltip:F,
info:G,container:q});case "draw-rectangle":return new r.TooltipContentDrawRectangle({tooltip:F,info:G,container:q});case "draw-circle":return new c.TooltipContentDrawCircle({tooltip:F,info:G,container:q});case "extent-rotate":return new x.TooltipContentExtentRotate({tooltip:F,info:G,container:q});case "extent-scale":return new t.TooltipContentExtentScale({tooltip:F,info:G,container:q});case "move-point":return new z.TooltipContentMovePoint({tooltip:F,info:G,container:q});case "selected-vertex":return new p.TooltipContentSelectedVertex({tooltip:F,
info:G,container:q});case "transform-absolute":return new b.TooltipContentTransformAbsolute({tooltip:F,info:G,container:q});case "transform-point":return new f.TooltipContentTransformPoint({tooltip:F,info:G,container:q});case "transform-mesh":return new l.TooltipContentTransformMesh({tooltip:F,info:G,container:q});case "transform-rotate":return new k.TooltipContentTransformRotate({tooltip:F,info:G,container:q});case "transform-scale":return new n.TooltipContentTransformScale({tooltip:F,info:G,container:q});
case "translate":return new C.TooltipContentTranslate({tooltip:F,info:G,container:q});case "translate-vertex":return new I.TooltipContentTranslateVertex({tooltip:F,info:G,container:q});case "translate-z":return new y.TooltipContentTranslateZ({tooltip:F,info:G,container:q});case "translate-xy":return new w.TooltipContentTranslateXY({tooltip:F,info:G,container:q});case "reshape-edge-offset":return new u.TooltipContentReshapeEdgeOffset({tooltip:F,info:G,container:q})}};Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentDrawCircle":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ../components/ValueByValue ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentDrawCircle=
class extends z.TooltipContent{_renderContent(){const {area:b,radius:l,xSize:f,ySize:k,visibleElements:n}=this.info,C=this._messagesTooltip.sketch,I=this._formatters;return p.tsx(p.tsxFragment,null,n.radius&&null!=l?p.tsx(x.TooltipField,{title:C.radius,value:I.length(l)}):null,n.size&&null!=f&&null!=k?p.tsx(x.TooltipField,{title:C.size,value:p.tsx(t.ValueByValue,{left:I.length(f),right:I.length(k)})}):null,n.area?p.tsx(x.TooltipField,{title:C.area,value:I.area(b)}):null)}};a.TooltipContentDrawCircle=
c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentDrawCircle")],a.TooltipContentDrawCircle);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/components/TooltipField":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../css ../../../../widgets/Widget ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){const p=`${x.base}-field`;var b=`${p}--input`,l=`${p}__title`,f=`${p}__value`;a.TooltipField=class extends t{constructor(){super(...arguments);this.hidden=!1;this.mode="feedback"}render(){return u.tsx("div",{class:this.classes({[p]:!0,[b]:"input"===this.mode})},u.tsx("div",{class:l},this.title),u.tsx("div",{class:f},this.value))}};c.__decorate([g.property()],a.TooltipField.prototype,"hidden",void 0);c.__decorate([g.property()],a.TooltipField.prototype,"mode",void 0);
c.__decorate([g.property()],a.TooltipField.prototype,"title",void 0);c.__decorate([g.property()],a.TooltipField.prototype,"value",void 0);a.TooltipField=c.__decorate([r.subclass("esri.views.interactive.tooltip.components.TooltipField")],a.TooltipField);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/components/ValueByValue":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../css ../../../../widgets/Widget ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){var p=`${x.base}-value-by-value`;a.ValueByValue=class extends t{constructor(){super(...arguments);this.divider="\u00d7"}render(){return u.tsx("div",{class:p},u.tsx("span",null,this.left),u.tsx("span",null,this.divider),u.tsx("span",null,this.right))}};c.__decorate([g.property()],a.ValueByValue.prototype,"left",void 0);c.__decorate([g.property()],a.ValueByValue.prototype,"divider",void 0);c.__decorate([g.property()],a.ValueByValue.prototype,"right",void 0);a.ValueByValue=
c.__decorate([r.subclass("esri.views.interactive.tooltip.components.ValueByValue")],a.ValueByValue);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContent":function(){define("require exports ../../../../chunks/tslib.es6 ../../../../core/a11yUtils ../../../../core/has ../../../../core/memoize ../../../../core/promiseUtils ../../../../core/scheduling ../../../../core/unitFormatUtils ../../../../core/unitUtils ../../../../core/accessorSupport/decorators/property ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../support/getDefaultUnitForView ../../keybindings ../css ../fields/parsingAndFormattingUtils ../../../../widgets/Widget ../../../../chunks/componentsUtils ../../../../widgets/support/widgetUtils ../../../../widgets/support/decorators/messageBundle ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G){async function q(e){await e?.setFocus()}function B(e){return(Array.isArray(e)?e:[e]).flat(10).filter(v=>!!v)}c.TooltipContent=class extends I{constructor(){super(...arguments);this._focusAbortController=new AbortController;this._transition=null;this._mode="feedback";this._getFormatters=m.memoize(C.getFormatters);this._onDiscard=()=>{this.info.clearInputValues();this.exitInputMode()};this._onCommit=(e,v)=>{if("commit-and-exit"===v)this.exitInputMode();
else if("commit-on-blur"!==v){var A=this._getFocusableElements(),D=A.length;e=A.indexOf(e);-1===e?this.exitInputMode():q(A.at(((e+("commit-and-next"===v?1:-1))%D+D)%D))}};this._handleTab=e=>{if(e.code===k.tooltipKeys.next){var v=this._getFocusableElements(),A=v.at(0);v=v.at(-1);A&&v&&(e.shiftKey?document.activeElement===A&&(e.preventDefault(),q(v)):document.activeElement===v&&(e.preventDefault(),q(A)))}}}get mode(){return this._mode}get _displayUnits(){const e=f.getDefaultUnitForView(this.tooltip.view);
return{length:e,verticalLength:e,area:e,angle:"degrees"}}get _inputUnitInfos(){const e=this._messagesUnits;var v=H=>({unit:H,abbreviation:t.unitName(e,H,"abbr")}),A=f.getDefaultUnitForView(this.tooltip.view);const D=v(z.defaultLengthUnit(A)),E=v(z.defaultVerticalLengthUnit(A));A=v(z.defaultAreaUnit(A));v=v("degrees");return{length:D,lengthRelative:D,verticalLength:E,verticalLengthRelative:E,area:A,direction:v,orientation:v,rotation:v,longitudeLatitude:v}}get _formatters(){return this._getFormatters(this._messagesUnits,
this._displayUnits)}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,sketchOptions:this.info.sketchOptions,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const {visibleElements:e}=this.info.sketchOptions.tooltips,v=this._renderedContent,A=this._renderedActions,D=this._renderedHelpMessage,E=0<v.length,H=E||!!D,J="input"===this.mode;return G.tsx("div",{class:y.classes(n.content,J&&n.contentInputMode),onkeydown:this._handleTab},
J&&H&&e.header?G.tsx("div",{class:n.contentHeader,key:"header"},G.tsx("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",onclick:this._onDiscard,scale:"s",tabIndex:-1}),0<A.length?G.tsx(G.tsxFragment,null,G.tsx("div",{class:n.contentHeaderSpacer,key:"spacer"}),G.tsx("div",{class:n.contentHeaderActions,key:"actions"},A)):null):null,E?G.tsx("div",{class:n.table,key:"content"},...v):null,D)}_renderActions(){return null}loadDependencies(){return w.loadCalciteComponents({button:()=>
new Promise((e,v)=>a(["../../../../chunks/calcite-button"],e,v)),icon:()=>new Promise((e,v)=>a(["../../../../chunks/calcite-icon"],e,v)),input:()=>new Promise((e,v)=>a(["../../../../chunks/calcite-input"],e,v))})}async enterInputMode(e){try{await this._transitionTo("input"),await this._focusField(e)}catch(v){r.throwIfNotAbortError(v)}}async exitInputMode({focusOnView:e=!0}={}){try{const {container:v,info:A}=this;A.clearInputValues();e=e?v?.closest(".esri-view")?.querySelector(".esri-view-surface"):
null;await this._transitionTo("feedback");e instanceof HTMLElement&&e.focus()}catch(v){r.throwIfNotAbortError(v)}}get _renderedContent(){return B(this._renderContent())}get _renderedActions(){return B(this._renderActions())}get _renderedHelpMessage(){const {sketchOptions:e,visibleElements:v}=this.info;if(!v.helpMessage)return null;const A=e.tooltips.helpMessage??this._defaultHelpMessage;if(!A)return null;const D=e.tooltips.helpMessageIcon??"information";return G.tsx("div",{class:n.helpMessage,key:"help-message"},
D?G.tsx("calcite-icon",{class:n.helpMessageIcon,icon:D,scale:"s"}):null,G.tsx("div",{class:n.helpMessageText},A))}get _defaultHelpMessage(){const {helpMessage:e,viewType:v}=this.info;return null==e?null:this._messagesTooltip?.sketch?.["3d"===v?"helpMessages3d":"helpMessages2d"]?.[e]}async _focusField(e){this._focusAbortController?.abort();this._focusAbortController=new AbortController;var {signal:v}=this._focusAbortController;await this._waitForInputs();r.throwIfAborted(v);v=this._getFocusableInputs();
v=e?v.find(A=>A.getAttribute("data-field-name")===e):v.at(0);await q(v)}async _transitionTo(e){if(this._mode!==e){var v=()=>{this._mode=e};if(this.domNode?.firstChild&&document.startViewTransition&&!h.prefersReducedMotion()){this.autoRenderingEnabled=!1;this._transition?.skipTransition();var A=this._transition=document.startViewTransition(()=>{if(!this.destroyed)return this.autoRenderingEnabled=!0,v(),this.renderNow(),x.waitTick()});try{await this._transition.finished}finally{A===this._transition&&
(this._transition=null)}}else v()}}async _waitForInputs(){const e=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===e().length;)await r.after(20);await x.waitAnimationFrame()}_getFocusableInputs(){return Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[])}_getFocusableElements(){const e=this.domNode?.querySelector(`.${n.drawContentHeaderActions}`);return[...Array.from(e?.querySelectorAll(`.${n.contentHeaderActions} calcite-button:not([disabled])`)??
[]),...this._getFocusableInputs()]}};g.__decorate([F.messageBundle("esri/core/t9n/Units"),u.property()],c.TooltipContent.prototype,"_messagesUnits",void 0);g.__decorate([F.messageBundle("esri/views/interactive/tooltip/t9n/Tooltip"),u.property()],c.TooltipContent.prototype,"_messagesTooltip",void 0);g.__decorate([u.property()],c.TooltipContent.prototype,"info",void 0);g.__decorate([u.property()],c.TooltipContent.prototype,"tooltip",void 0);g.__decorate([u.property()],c.TooltipContent.prototype,"_mode",
void 0);g.__decorate([u.property()],c.TooltipContent.prototype,"mode",null);g.__decorate([u.property()],c.TooltipContent.prototype,"_displayUnits",null);g.__decorate([u.property()],c.TooltipContent.prototype,"_inputUnitInfos",null);g.__decorate([u.property()],c.TooltipContent.prototype,"_formatters",null);g.__decorate([u.property()],c.TooltipContent.prototype,"fieldContext",null);g.__decorate([u.property()],c.TooltipContent.prototype,"_renderedContent",null);g.__decorate([u.property()],c.TooltipContent.prototype,
"_renderedActions",null);g.__decorate([u.property()],c.TooltipContent.prototype,"_renderedHelpMessage",null);g.__decorate([u.property()],c.TooltipContent.prototype,"_defaultHelpMessage",null);c.TooltipContent=g.__decorate([l.subclass("esri.views.interactive.tooltip.content.TooltipContent")],c.TooltipContent);Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/core/memoize":function(){define(["exports"],function(a){a.memoize=function(c){let g,h=[],d,m=!1;return function(...r){var x;
if(x=m&&g===this)a:if(r.length!==h.length)x=!1;else{for(x=0;x<r.length;++x)if(r[x]!==h[x]){x=!1;break a}x=!0}if(x)return d;d=c.apply(this,r);g=this;h=r;m=!0;return d}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentDrawMesh":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentDrawMesh=class extends t.TooltipContent{_renderContent(){const {fieldContext:p,info:b,mode:l}=this,{visibleElements:f}=b;return u.tsx(x.Fields,{context:p,fields:[f.coordinates?b.effectiveX:void 0,f.coordinates?b.effectiveY:void 0,f.elevation?b.elevation:void 0,f.orientation?b.orientation:void 0,f.scale?b.scale:void 0],mode:l})}};a.TooltipContentDrawMesh=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentDrawMesh")],a.TooltipContentDrawMesh);
Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/Fields":function(){define(["exports","../components/TooltipEditableField","../../../../widgets/support/jsxFactory"],function(a,c,g){a.Fields=function(h){const d=h.fields.filter(m=>!0===m?.visible);return 0===d.length?null:g.tsx(g.tsxFragment,null,d.map(m=>g.tsx(c.TooltipEditableField,{context:h.context,field:m,key:m.id,mode:h.mode})))};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/tooltip/components/TooltipEditableField":function(){define("require exports ../../../../chunks/tslib.es6 ../../../../core/reactiveUtils ../../../../core/scheduling ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../keybindings ../css ../../../../widgets/Widget ../../../../chunks/componentsUtils ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k){const n=`${p.base}-editable-field`;var C=`${n}--input`,I=`${n}--feedback`,w=`${n}--read-only`,y=`${n}--locked`,F=`${n}__title`,G=`${n}__value`,q=`${n}__value__content`,B=`${n}__value__content--read-only`,e=`${n}__lock-icon`,v=`${n}__input`,A=`${n}__input-suffix`,D=`${n}__button`;c.TooltipEditableField=class extends b{constructor(){super(...arguments);this._input=null;this._onKeyDown=E=>{if(E.key===u.tooltipKeys.discard&&"input"===this.mode&&this._input)this.context.onDiscard(this._input)};
this._onInputKeyDown=E=>{const H=this._input;if(H)switch(E.key){case u.tooltipKeys.commit:return this.field.onCommit("commit-and-exit",H,this.context);case u.tooltipKeys.next:return E.preventDefault(),E.stopPropagation(),this.field.onCommit(E.shiftKey?"commit-and-previous":"commit-and-next",H,this.context)}};this._onInput=E=>{this.field.onInput(E.target.value)};this._onInputBlur=()=>{const E=this._input;if(E)this.field.onCommit("commit-on-blur",E,this.context)};this._selectText=()=>{const E=()=>{this._input===
document.activeElement&&this._input?.selectText()};E();d.waitAnimationFrame().then(E)}}initialize(){this.addHandles(h.watch(()=>this._rawDisplayValue,()=>{const {committed:E,inputValue:H}=this.field;E||H||this._input!==document.activeElement||this._selectText()}))}loadDependencies(){return l.loadCalciteComponents({button:()=>new Promise((E,H)=>a(["../../../../chunks/calcite-button"],E,H)),icon:()=>new Promise((E,H)=>a(["../../../../chunks/calcite-icon"],E,H)),input:()=>new Promise((E,H)=>a(["../../../../chunks/calcite-input"],
E,H))})}render(){const {field:E,mode:H}=this,J="input"===H,{locked:L,readOnly:N}=E;return k.tsx("div",{class:this.classes({[n]:!0,[I]:"feedback"===H,[C]:"input"===H,[y]:L,[w]:N})},k.tsx("div",{class:F,key:"title"},this._title),k.tsx("div",{class:G,key:"value",onkeydown:this._onKeyDown},J?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||"\u2014"}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){const {title:E}=
this.field;return"string"===typeof E?E:E(this.context)}_renderValueFeedbackMode(){return k.tsx(k.tsxFragment,null,k.tsx("div",{class:q,key:"value-feedback"},this._formattedValue),this.field.locked&&"input"!==this.mode?k.tsx("calcite-icon",{class:e,icon:"lock",key:"icon",scale:"s"}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return k.tsx("div",{class:this.classes(q,B),key:"value-read-only"},this._formattedValue)}_renderValueWritable(){const {field:E}=
this,{name:H,invalid:J,locked:L}=E;var N=this.context?.messages.sketch??{};N=L?N.unlockConstraint:N.lockConstraint;return k.tsx(k.tsxFragment,null,k.tsx("calcite-input",{afterCreate:M=>{this._input=M},class:v,"data-field-name":H,"data-testid":`tooltip-field-${H}`,onblur:this._onInputBlur,onfocus:this._selectText,onkeydown:this._onInputKeyDown,scale:"s",status:J?"invalid":"idle",type:"text",value:this._rawDisplayValue??"\u2014",onCalciteInputInput:this._onInput}),k.tsx("div",{class:A,key:"suffix"},
this._suffix),E.lockable?k.tsx("calcite-button",{alignment:"center",appearance:"transparent",class:D,"data-testid":`tooltip-field-${H}-lock`,iconStart:L?"lock":"unlock",key:"lock",kind:"neutral",label:N,onclick:()=>{E.toggleLock(this.context)},scale:"s",tabIndex:-1,title:N}):k.tsx("div",{key:"lock-empty"}))}};g.__decorate([m.property()],c.TooltipEditableField.prototype,"field",void 0);g.__decorate([m.property()],c.TooltipEditableField.prototype,"context",void 0);g.__decorate([m.property()],c.TooltipEditableField.prototype,
"mode",void 0);g.__decorate([m.property()],c.TooltipEditableField.prototype,"_input",void 0);g.__decorate([m.property()],c.TooltipEditableField.prototype,"_formattedValue",null);g.__decorate([m.property()],c.TooltipEditableField.prototype,"_rawDisplayValue",null);g.__decorate([m.property()],c.TooltipEditableField.prototype,"_suffix",null);g.__decorate([m.property()],c.TooltipEditableField.prototype,"_title",null);c.TooltipEditableField=g.__decorate([z.subclass("esri.views.interactive.tooltip.components.TooltipEditableField")],
c.TooltipEditableField);Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentDrawPoint":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,
z,u){a.TooltipContentDrawPoint=class extends t.TooltipContent{_renderContent(){const {fieldContext:p,info:b,mode:l}=this,{elevation:f,visibleElements:k}=b;return u.tsx(x.Fields,{context:p,fields:[k.coordinates?b.effectiveX:void 0,k.coordinates?b.effectiveY:void 0,k.elevation?f:void 0],mode:l})}};a.TooltipContentDrawPoint=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentDrawPoint")],a.TooltipContentDrawPoint);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/tooltip/content/TooltipContentDrawPolygon":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/DrawHeaderActions ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentDrawPolygon=class extends z.TooltipContent{_renderContent(){const {fieldContext:b,
info:l,mode:f}=this,{xyMode:k,visibleElements:n}=l;return p.tsx(t.Fields,{context:b,fields:[...("direction-distance"===k?[n.direction?l.direction:void 0,n.distance?l.distance:void 0]:[n.coordinates?l.effectiveX:void 0,n.coordinates?l.effectiveY:void 0]),n.elevation?l.elevation:void 0,n.area?l.area:void 0],mode:f})}_renderActions(){const {xyMode:b,sketchOptions:l}=this.info;return p.tsx(x.DrawHeaderActions,{sketchOptions:l,visibleElements:{direction:"direction-distance"===b}})}};a.TooltipContentDrawPolygon=
c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentDrawPolygon")],a.TooltipContentDrawPolygon);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/components/DrawHeaderActions":function(){define("require exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../css ./directionModeIcons ../../../../widgets/Widget ../../../../chunks/componentsUtils ../../../../widgets/support/widgetUtils ../../../../widgets/support/decorators/messageBundle ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f){function k(n){const {directionMode:C}=n.sketchOptions.values,I=n.messages?.sketch,w=I?.directionModeSelect?.title;return f.tsx("calcite-dropdown",{key:"direction-mode",placement:"bottom-end",scale:"s",widthScale:"s",onCalciteDropdownSelect:y=>{y=y.target.selectedItems?.[0]?.getAttribute("data-mode");n.sketchOptions.values.directionMode=y??"absolute"}},f.tsx("calcite-button",{alignment:"end",appearance:"transparent",iconStart:z.directionModeIcons[C],kind:"neutral",
label:w,scale:"s",slot:"trigger",title:w}),f.tsx("calcite-dropdown-group",{selectionMode:"single"},f.tsx("calcite-dropdown-item",{"data-mode":"relative","data-testid":"tooltip-direction-mode-relative",iconStart:z.directionModeIcons.relative,key:"relative",selected:"relative"===C},I?.directionModeSelect?.relative),f.tsx("calcite-dropdown-item",{"data-mode":"absolute","data-testid":"tooltip-direction-mode-absolute",iconStart:z.directionModeIcons.absolute,key:"absolute",selected:"absolute"===C},I?.directionModeSelect?.absolute)))}
c.DrawHeaderActions=class extends u{constructor(n){super(n);this.visibleElements={}}render(){return f.tsx("div",{class:t.drawContentHeaderActions},this._isElementVisible("direction")?f.tsx(k,{messages:this.messages,sketchOptions:this.sketchOptions}):null)}loadDependencies(){return p.loadCalciteComponents({button:()=>new Promise((n,C)=>a(["../../../../chunks/calcite-button"],n,C)),dropdown:()=>new Promise((n,C)=>a(["../../../../chunks/calcite-dropdown"],n,C)),"dropdown-item":()=>new Promise((n,C)=>
a(["../../../../chunks/calcite-dropdown-item"],n,C)),"dropdown-group":()=>new Promise((n,C)=>a(["../../../../chunks/calcite-dropdown-group"],n,C))})}_isElementVisible(n){return this.visibleElements?.[n]??this.sketchOptions.tooltips.visibleElements[n]}};g.__decorate([l.messageBundle("esri/views/interactive/tooltip/t9n/Tooltip"),h.property()],c.DrawHeaderActions.prototype,"messages",void 0);g.__decorate([h.property()],c.DrawHeaderActions.prototype,"sketchOptions",void 0);g.__decorate([h.property()],
c.DrawHeaderActions.prototype,"visibleElements",void 0);c.DrawHeaderActions=g.__decorate([x.subclass("esri.views.interactive.tooltip.components.DrawHeaderActions")],c.DrawHeaderActions);Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/components/directionModeIcons":function(){define(["exports"],function(a){a.directionModeIcons={absolute:"absolute-direction",relative:"relative-direction"};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/tooltip/content/TooltipContentDrawPolyline":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/DrawHeaderActions ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentDrawPolyline=class extends z.TooltipContent{_renderContent(){const {fieldContext:b,
info:l,mode:f}=this,{xyMode:k,visibleElements:n}=l;return p.tsx(t.Fields,{context:b,fields:[...("direction-distance"===k?[n.direction?l.direction:void 0,n.distance?l.distance:void 0]:[n.coordinates?l.effectiveX:void 0,n.coordinates?l.effectiveY:void 0]),n.elevation?l.elevation:void 0,n.totalLength?l.totalLength:void 0],mode:f})}_renderActions(){const {xyMode:b,sketchOptions:l}=this.info;return p.tsx(x.DrawHeaderActions,{sketchOptions:l,visibleElements:{direction:"direction-distance"===b}})}};a.TooltipContentDrawPolyline=
c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentDrawPolyline")],a.TooltipContentDrawPolyline);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentDrawRectangle":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ../components/ValueByValue ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentDrawRectangle=class extends z.TooltipContent{_renderContent(){const {area:b,xSize:l,ySize:f,visibleElements:k}=this.info,n=this._messagesTooltip.sketch,C=this._formatters;return p.tsx(p.tsxFragment,null,k.size&&null!=l&&null!=f?p.tsx(x.TooltipField,{title:n.size,value:p.tsx(t.ValueByValue,{left:C.length(l),right:C.length(f)})}):null,k.area?p.tsx(x.TooltipField,{title:n.area,value:C.area(b)}):null)}};a.TooltipContentDrawRectangle=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentDrawRectangle")],
a.TooltipContentDrawRectangle);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentExtentRotate":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentExtentRotate=class extends t.TooltipContent{_renderContent(){const {angle:p,visibleElements:b}=this.info,l=this._messagesTooltip.sketch;return u.tsx(u.tsxFragment,null,b.rotation?u.tsx(x.TooltipField,{title:l.rotation,value:this._formatters.angleRelative(p)}):null)}};a.TooltipContentExtentRotate=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentExtentRotate")],a.TooltipContentExtentRotate);Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentExtentScale":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ../components/ValueByValue ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentExtentScale=
class extends z.TooltipContent{_renderContent(){const b=this.info,{visibleElements:l}=b,f=this._messagesTooltip.sketch,k=this._formatters;return p.tsx(p.tsxFragment,null,l.size?p.tsx(x.TooltipField,{title:f.size,value:p.tsx(t.ValueByValue,{left:k.length(b.xSize),right:k.length(b.ySize)})}):null,l.scale?p.tsx(x.TooltipField,{title:f.scale,value:p.tsx(t.ValueByValue,{left:k.scale(b.xScale),right:k.scale(b.yScale)})}):null)}};a.TooltipContentExtentScale=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentExtentScale")],
a.TooltipContentExtentScale);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentMovePoint":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,
x,t,z,u){a.TooltipContentMovePoint=class extends t.TooltipContent{_renderContent(){const {fieldContext:p,info:b,mode:l}=this,{visibleElements:f}=b;return u.tsx(x.Fields,{context:p,fields:[f.coordinates?b.effectiveX:void 0,f.coordinates?b.effectiveY:void 0,f.elevation?b.elevation:void 0],mode:l})}};a.TooltipContentMovePoint=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentMovePoint")],a.TooltipContentMovePoint);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentReshapeEdgeOffset=class extends t.TooltipContent{_renderContent(){const {area:p,
distance:b,totalLength:l,visibleElements:f}=this.info,k=this._messagesTooltip.sketch,n=this._formatters;return u.tsx(u.tsxFragment,null,f.distance?u.tsx(x.TooltipField,{title:k.distance,value:n.lengthRelative(b)}):null,f.area&&null!=p?u.tsx(x.TooltipField,{title:k.area,value:n.area(p)}):null,f.totalLength&&null!=l?u.tsx(x.TooltipField,{title:k.totalLength,value:n.length(l)}):null)}};a.TooltipContentReshapeEdgeOffset=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentReshapeEdgeOffset")],
a.TooltipContentReshapeEdgeOffset);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentSelectedVertex":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,
c,g,h,d,m,r,x,t,z,u){a.TooltipContentSelectedVertex=class extends t.TooltipContent{_renderContent(){const {fieldContext:p,info:b,mode:l}=this,{visibleElements:f}=b;return u.tsx(x.Fields,{context:p,fields:[f.coordinates?b.effectiveX:void 0,f.coordinates?b.effectiveY:void 0,f.elevation?b.elevation:void 0,f.area&&"polygon"===b.geometryType?b.area:null,f.totalLength&&"polyline"===b.geometryType?b.totalLength:null],mode:l})}};a.TooltipContentSelectedVertex=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentSelectedVertex")],
a.TooltipContentSelectedVertex);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTransformAbsolute":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityFormatUtils ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentTransformAbsolute=class extends z.TooltipContent{_renderContent(){const {info:b}=this,{visibleElements:l}=b,f=this._messagesTooltip.sketch,k=this._formatters;return p.tsx(p.tsxFragment,null,l.orientation&&null!=b.orientation?p.tsx(t.TooltipField,{key:"orientation",title:f.orientation,value:g.formatAngle(b.orientation,b.rotationType,b.orientationPrecision)}):null,l.size&&null!=b.size?p.tsx(t.TooltipField,{key:"size",title:f.size,value:k.length(b.size,
b.sizeUnit,b.sizePrecision)}):null)}};a.TooltipContentTransformAbsolute=c.__decorate([x.subclass("esri.views.interactive.tooltip.content.TooltipContentTransformAbsolute")],a.TooltipContentTransformAbsolute);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTransformMesh":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentTransformMesh=class extends t.TooltipContent{_renderContent(){const {fieldContext:p,info:b,mode:l}=this,{visibleElements:f}=b;return u.tsx(x.Fields,{context:p,fields:[f.coordinates?b.effectiveX:void 0,f.coordinates?b.effectiveY:void 0,f.elevation?b.elevation:void 0,f.orientation?b.orientation:void 0,f.scale?b.scale:void 0],mode:l})}};a.TooltipContentTransformMesh=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTransformMesh")],
a.TooltipContentTransformMesh);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTransformPoint":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ./Fields ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,
h,d,m,r,x,t,z,u){a.TooltipContentTransformPoint=class extends t.TooltipContent{_renderContent(){const {fieldContext:p,info:b,mode:l}=this,{visibleElements:f}=b;return u.tsx(x.Fields,{context:p,fields:[f.coordinates?b.effectiveX:void 0,f.coordinates?b.effectiveY:void 0,f.elevation?b.elevation:void 0],mode:l})}};a.TooltipContentTransformPoint=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTransformPoint")],a.TooltipContentTransformPoint);Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTransformRotate":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityFormatUtils ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u,p){a.TooltipContentTransformRotate=
class extends z.TooltipContent{_renderContent(){const {info:b}=this,{visibleElements:l}=b,f=this._messagesTooltip.sketch;return p.tsx(p.tsxFragment,null,l.rotation&&null!=b.rotation?p.tsx(t.TooltipField,{key:"rotation",title:f.rotation,value:g.formatRelativeAngle(b.rotation,b.rotationType,b.rotationPrecision)}):null,l.orientation&&null!=b.orientation?p.tsx(t.TooltipField,{key:"orientation",title:f.orientation,value:g.formatAngle(b.orientation,b.rotationType,b.orientationPrecision)}):null)}};a.TooltipContentTransformRotate=
c.__decorate([x.subclass("esri.views.interactive.tooltip.content.TooltipContentTransformRotate")],a.TooltipContentTransformRotate);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTransformScale":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentTransformScale=class extends t.TooltipContent{_renderContent(){const {info:p}=this,{visibleElements:b}=p,l=this._messagesTooltip.sketch,f=this._formatters;return u.tsx(u.tsxFragment,null,b.scale&&null!=p.scale?u.tsx(x.TooltipField,{key:"scale",title:l.scale,value:f.percentage(p.scale)}):null,b.size&&null!=p.size?u.tsx(x.TooltipField,{key:"size",title:l.size,value:f.length(p.size,p.sizeUnit,p.sizePrecision)}):null)}};a.TooltipContentTransformScale=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTransformScale")],
a.TooltipContentTransformScale);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTranslate":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,
c,g,h,d,m,r,x,t,z,u){a.TooltipContentTranslate=class extends t.TooltipContent{_renderContent(){const {info:p}=this,{visibleElements:b}=p,l=this._messagesTooltip.sketch,f=this._formatters;return u.tsx(u.tsxFragment,null,b.distance?u.tsx(x.TooltipField,{title:l.distance,value:f.length(p.distance)}):null)}};a.TooltipContentTranslate=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTranslate")],a.TooltipContentTranslate);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/tooltip/content/TooltipContentTranslateVertex":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentTranslateVertex=class extends t.TooltipContent{_renderContent(){const {distance:p,
elevation:b,area:l,totalLength:f,visibleElements:k}=this.info,n=this._messagesTooltip.sketch,C=this._formatters;return u.tsx(u.tsxFragment,null,k.distance?u.tsx(x.TooltipField,{title:n.distance,value:C.length(p)}):null,k.elevation&&null!=b?.actual?u.tsx(x.TooltipField,{title:n.elevation,value:C.verticalLength(b.actual)}):null,k.area&&null!=l?u.tsx(x.TooltipField,{title:n.area,value:C.area(l)}):null,k.totalLength&&null!=f?u.tsx(x.TooltipField,{title:n.totalLength,value:C.length(f)}):null)}};a.TooltipContentTranslateVertex=
c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTranslateVertex")],a.TooltipContentTranslateVertex);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTranslateXY":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentTranslateXY=class extends t.TooltipContent{_renderContent(){const {info:p}=this,{visibleElements:b}=p,l=this._messagesTooltip.sketch,f=this._formatters;return u.tsx(u.tsxFragment,null,b.distance?u.tsx(x.TooltipField,{title:l.distance,value:f.length(p.distance)}):null)}};a.TooltipContentTranslateXY=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTranslateXY")],a.TooltipContentTranslateXY);Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/content/TooltipContentTranslateZ":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../components/TooltipField ./TooltipContent ../../../../widgets/support/widgetUtils ../../../../widgets/support/jsxFactory".split(" "),function(a,c,g,h,d,m,r,x,t,z,u){a.TooltipContentTranslateZ=class extends t.TooltipContent{_renderContent(){const {info:p}=
this,{visibleElements:b}=p,l=this._messagesTooltip.sketch;return u.tsx(u.tsxFragment,null,b.distance?u.tsx(x.TooltipField,{title:l.distance,value:this._formatters.verticalLengthRelative(p.distance)}):null)}};a.TooltipContentTranslateZ=c.__decorate([r.subclass("esri.views.interactive.tooltip.content.TooltipContentTranslateZ")],a.TooltipContentTranslateZ);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/DrawOperation":function(){define("exports ../../chunks/tslib.es6 ../../core/Accessor ../../core/Evented ../../core/lang ../../core/maybe ../../core/memoize ../../core/promiseUtils ../../core/ReactiveSet ../../core/reactiveUtils ../../core/screenUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/diffUtils ../../core/support/UpdatingHandles ../../layers/graphics/dehydratedFeatureComparison ../../support/elevationInfoUtils ../ViewingMode ./DrawingMode ./DrawManipulator ../interactive/coordinateHelper ../interactive/dragEventPipeline ../interactive/editGeometry/EditGeometry ../interactive/editGeometry/EditGeometryOperations ../interactive/sketch/constraints ../interactive/sketch/constraintUtils ../interactive/sketch/SketchLabelOptions ../interactive/snapping/SnappingContext ../interactive/snapping/SnappingDragPipelineStep ../interactive/snapping/SnappingOperation ../interactive/snapping/snappingUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H,J,L){const N=Symbol(),M=Symbol();a.DrawOperation=class extends h.EventedMixin(g){constructor(K){super(K);this._hideDefaultCursor=this._createOperationCompleted=!1;this._pointerDownStates=new t;this._stagedPointerType=this._stagedScreenPoint=null;this._updatingHandles=new n.UpdatingHandles;this._stagedPointerId=null;this.constraintsEnabled=!1;this.constraints=void 0;this._getPointConstraint=r.memoize(A.getPointConstraint);this._getPolylineOrPolygonConstraint=
r.memoize(A.getPolylineOrPolygonConstraint);this.defaultZ=this.constraintZ=null;this.isDraped=!0;this.labelOptions=new D;this.cursor=null;this.loading=!1;this.secondToLastVertex=this.lastVertex=this.firstVertex=this.snapToSceneEnabled=null;null==K.elevationInfo&&(this.elevationInfo=I.getEffectiveElevationInfo(!!K.hasZ))}initialize(){const {geometryType:K,view:P}=this,U=P.spatialReference,V="viewingMode"in P.state?P.state.viewingMode:w.ViewingMode.Local,ca="segment"===K||"multipoint"===K?"polyline":
K;this.coordinateHelper=G.createCoordinateHelper(this.hasZ,this.hasM,U);this._editGeometryOperations=new e.EditGeometryOperations(new B.EditGeometry(ca,this.coordinateHelper),V);this._snappingOperation=new J.SnappingOperation({view:P});this.addHandles([z.watch(()=>({stagedPoint:this._snappingOperation.stagedPoint,constraint:this._constraint}),({stagedPoint:Q,constraint:aa},na)=>{const {snappingOptions:ha}=this;ha&&(ha.forceDisabled=null!=aa&&v.isPoint(aa));if(null!=na&&Q===na.stagedPoint&&aa!==na.constraint)return this._onKeyboardBasedChange();
this._processCursor(Q??this._screenToMap(this._stagedScreenPoint))},{equals:(Q,aa)=>Q.stagedPoint===aa.stagedPoint&&m.equalsMaybe(Q.constraint,aa.constraint)}),z.watch(()=>this.view.viewpoint,(Q,aa)=>{Q&&aa&&k.diff(Q,aa)&&this._onKeyboardBasedChange()})]);this._activeComponent=new B.Component(U,V);this._editGeometryOperations.data.components.push(this._activeComponent);const ja=this.segmentLabels;null!=ja&&(ja.context={view:P,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,
labelOptions:this.labelOptions},this.addHandles(z.watch(()=>this.labelOptions.enabled,Q=>{ja.visible=Q},z.syncAndInitial)));this.addHandles(this._editGeometryOperations.on(["vertex-add","vertex-update","vertex-remove"],Q=>{const aa=Q.vertices.map(da=>({componentIndex:0,vertexIndex:da.index,coordinates:this.coordinateHelper.vectorToArray(da.pos)})),na=aa.map(da=>da.coordinates);var ha=this.coordinateHelper.vectorToDehydratedPoint(this._activeComponent.getFirstVertex()?.pos)??null;C.pointEquals(ha,
this.firstVertex)||(this.firstVertex=ha);ha=this.coordinateHelper.vectorToDehydratedPoint(this._activeComponent.getLastVertex()?.pos)??null;C.pointEquals(ha,this.lastVertex)||(this.lastVertex=ha);ha=this.coordinateHelper.vectorToDehydratedPoint(this._activeComponent.edges.at(-1)?.leftVertex?.pos)??null;C.pointEquals(ha,this.secondToLastVertex)||(this.secondToLastVertex=ha);this._processCursor(this.cursorVertex);switch(Q.type){case "vertex-add":this.emit(Q.type,{...Q,added:na,vertices:aa});break;case "vertex-update":this.emit(Q.type,
{...Q,updated:na,vertices:aa});break;case "vertex-remove":this.emit(Q.type,{...Q,removed:na,vertices:aa})}}));const la=this._manipulator=new F.DrawManipulator({consumesClicks:!1,grabbableForEvent:Q=>"click"!==this.drawingMode?!0:"touch"===Q.pointerType&&this._snappingEnabled&&1===this._pointerDownStates.size});this.manipulators.add(la);la.grabbable="point"!==K;this.addHandles([la.events.on("immediate-click",Q=>this._onImmediateClick(Q)),la.events.on("immediate-double-click",Q=>this._onImmediateDoubleClick(Q)),
z.watch(()=>this.drawingMode,()=>{this.removeHandles(N);this.addHandles(this._createManipulatorDragPipeline(la),N)},z.syncAndInitial),z.watch(()=>({effectiveCursor:this.effectiveCursor}),({effectiveCursor:Q})=>{la.cursor=Q},z.syncAndInitial)]);L.setupSnappingToggleHandles(this,()=>{var Q=this._getSnappingContext(this.view.inputManager.latestPointerType??"mouse");null!=this.snappingManager&&(Q=this._snappingOperation.snapAgainNearPreviousMapPoint(this.snappingManager,Q),this._updatingHandles.addPromise(x.ignoreAbortErrors(Q)))})}destroy(){m.destroyMaybe(this.segmentLabels);
m.destroyMaybe(this._snappingOperation);this._editGeometryOperations=m.destroyMaybe(this._editGeometryOperations);this._updatingHandles.destroy()}get _isDragging(){const {_stagedPointerId:K,_manipulator:P}=this;return null!=K&&this._pointerDownStates.has(K)||P.grabbing||!P.interactive}get _snappingEnabled(){return null!=this.snappingManager&&this.snappingManager.options.effectiveEnabled}get _requiresScenePoint(){const K=this._updateAndGetEffectiveDrawSurface();return"3d"===this.view.type&&this.drawSurface!==
K}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activeComponent.vertices.map(K=>this.coordinateHelper.vectorToArray(K.pos))}get _constraint(){const {constraints:K,constraintsEnabled:P}=this;if(K&&P)switch(this.geometryType){case "point":return this._getPointConstraint(K);case "polygon":case "polyline":return this._getPolylineOrPolygonConstraint(this.lastVertex,this.secondToLastVertex,K)}}set drawingMode(K){this._set("drawingMode",
K??y.defaultDrawingMode)}get effectiveCursor(){return this.loading?"progress":this._hideDefaultCursor?null:this.cursor||"crosshair"}get interactive(){return this._manipulator.interactive}set interactive(K){this._manipulator.interactive=K}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activeComponent.vertices.length}get snappingOptions(){return null!=this.snappingManager?this.snappingManager.options:null}get cursorVertex(){return this._get("cursorVertex")}get visualizationCursorVertex(){return"mouse"===
this._stagedPointerType?this.cursorVertex:null}get committableVertex(){const {cursorVertex:K,lastVertex:P,firstVertex:U,geometryType:V}=this;return"polygon"===V&&C.pointNear(K,U)||C.pointNear(K,P)?null:K}get updating(){return this._updatingHandles.updating}get geometryIncludingUncommittedVertices(){const {committedVertices:K,committableVertex:P,coordinateHelper:U}=this,V=K.slice();null!=P&&V.push(U.pointToArray(P));return V}cancel(){this.complete({aborted:!0})}commitStagedVertex(){this._snappingOperation.abort();
const {committableVertex:K}=this;null!=K&&this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(K))}complete(K){K=K?.aborted||!1;this._snappingOperation.abort();this.snappingManager?.doneSnapping();const {geometryType:P,numCommittedVertices:U}=this,V="multipoint"===P&&0===U||"polyline"===P&&2>U||"polygon"===P&&3>U;"segment"!==P&&"point"!==P||this.commitStagedVertex();this._createOperationCompleted=!V;if(this.isCompleted||K)this._stagedPointerType=this._stagedPointerId=this._stagedScreenPoint=
null,this._processCursor(null),this.emit("complete",{vertices:this.committedVertices.map((ca,ja)=>({componentIndex:0,vertexIndex:ja,coordinates:ca})),aborted:K,type:"complete"})}onInputEvent(K){switch(K.type){case "pointer-down":this._pointerDownStates.add(K.pointerId);break;case "pointer-up":this._pointerDownStates.delete(K.pointerId)}switch(K.type){case "pointer-move":return this._onPointerMove(K);case "hold":return this._onHold(K)}}redo(){this._editGeometryOperations.redo()}undo(){null!=this.snappingManager&&
this.snappingManager.doneSnapping();this._editGeometryOperations.undo()}_processCursor(K){const P=d.clone(this.cursorVertex);K=(K=d.clone(K))&&(this._updateAndGetEffectiveDrawSurface()?.constrainZ(K)??K);K=this._snapToClosingVertex(K);K=this._applyConstraints(K);C.pointNear(P,K)||(this._set("cursorVertex",K),this.segmentLabels?.set("stagedVertex",null!=K?this.coordinateHelper.pointToVector(K):null),null==K||"mouse"!==this._stagedPointerType?this.emit("cursor-remove"):this.emit("cursor-update",{updated:null,
vertices:[{componentIndex:0,vertexIndex:this._activeComponent.vertices.length,coordinates:this.coordinateHelper.pointToArray(K)}],operation:"apply",type:"vertex-update"}))}_snapToClosingVertex(K){if(null==K||this._isDragging||"polygon"!==this.geometryType||2>=this.numCommittedVertices)return K;const P=this._mapToScreen(K);if(!P)return K;const U=this._activeComponent;return this._vertexWithinPointerDistance(U.vertices[0].pos,P)?this.firstVertex:this._vertexWithinPointerDistance(U.vertices.at(-1).pos,
P)?this.lastVertex:K}_createManipulatorDragPipeline(K){switch(this.drawingMode){case "click":return this._createManipulatorDragPipelineClick(K);case "freehand":return this._createManipulatorDragPipelineFreehand(K);case "hybrid":return this._createManipulatorDragPipelineHybrid(K)}}_createManipulatorDragPipelineClick(K){return q.createManipulatorDragEventPipeline(K,(P,U,V,ca)=>{const ja="touch"===ca&&this._snappingEnabled;if(!this.isCompleted&&ja){var {snappingStep:la,cancelSnapping:Q}=H.createSnapDragEventPipelineStep({predicate:()=>
ja,snappingManager:this.snappingManager,snappingContext:new E.SnappingContext({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,feature:this.graphic,pointer:ca,visualizer:this.snappingVisualizer,drawConstraints:this.constraints}),updatingHandles:this._updatingHandles,useZ:!this._requiresScenePoint});V=V.next(aa=>{ja&&null!=this.snappingManager&&this.snappingManager.doneSnapping();return aa}).next(Q);U.next(this._screenToMapDragEventStep()).next(aa=>{"start"===aa.action&&
(this._processCursor(aa.mapStart),("segment"===this.geometryType||ja&&!this.numCommittedVertices)&&this.commitStagedVertex());return aa}).next(q.sceneSnappingAtLocation(this.view,this.elevationInfo)).next(...la).next(aa=>{ja&&(this._processCursor(aa.mapEnd),"end"===aa.action&&this.commitStagedVertex());return aa}).next(aa=>{"end"===aa.action&&("mouse"!==this._stagedPointerType&&this._snappingOperation.abort(),"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete());return aa})}})}_createManipulatorDragPipelineFreehand(K){return q.createManipulatorDragEventPipeline(K,
(P,U)=>{this.isCompleted||U.next(this._screenToMapDragEventStep()).next(V=>{"start"===V.action&&(this._snappingOperation.abort(),null==this.committableVertex&&this._processCursor(V.mapStart),"segment"===this.geometryType&&this.commitStagedVertex());return V}).next(V=>{switch(V.action){case "start":case "update":this._processCursor(V.mapEnd);"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case "end":this.complete()}return V})})}_createManipulatorDragPipelineHybrid(K){return q.createManipulatorDragEventPipeline(K,
(P,U)=>{this.isCompleted||U.next(this._screenToMapDragEventStep()).next(V=>{"start"===V.action&&(this._snappingOperation.abort(),this.addHandles(this._editGeometryOperations.createUndoGroup(),M),this._processCursor(V.mapStart),this.commitStagedVertex());return V}).next(V=>{switch(V.action){case "start":case "update":this._processCursor(V.mapEnd);"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case "end":"mouse"!==this._stagedPointerType&&this._snappingOperation.abort(),
this.removeHandles(M),"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()}return V})})}get _drawAtFixedElevation(){const {constraintsEnabled:K,constraintZ:P,geometryType:U,numCommittedVertices:V}=this;return K?null!=P||"segment"===U&&0<V:("segment"===U||"polygon"===U)&&0<V}_updateAndGetEffectiveDrawSurface(){const {constraintsEnabled:K,coordinateHelper:P,drawSurface:U,elevationDrawSurface:V,snapToSceneEnabled:ca}=this;if(null==V)return U;if(!this.hasZ)return V.defaultZ=null,
V;const ja=this.elevationInfo?.mode;let la=this.defaultZ,Q=K||"absolute-height"===ja;null!=ca&&(Q=ca);"on-the-ground"===ja&&(Q=!1);this._drawAtFixedElevation&&(la=(K?this.constraintZ:null)??P.getZ(this._activeComponent.vertices[0].pos),Q=!1);if(Q)return U;V.defaultZ=la;return V}_mapToScreen(K){return this._updateAndGetEffectiveDrawSurface()?.mapToScreen(K)}_onHold(K){this._snappingOperation.abort();"click"===this.drawingMode&&"touch"===K.pointerType&&this._snappingEnabled&&this._processCursor(K.mapPoint);
K.stopPropagation()}_onImmediateClick(K){if(!("mouse"===K.pointerType&&2===K.button||this._manipulator.dragging))try{const {drawingMode:P,geometryType:U}=this;this._stagedPointerType=K.pointerType;this._stagedScreenPoint=K.screenPoint;const V=this._screenToMap(K.screenPoint);null==V||null==V||"freehand"===P&&"point"!==U||(this._snappingEnabled&&null!=this.cursorVertex||this._processCursor(V),null==this.committableVertex?this.complete():(this.commitStagedVertex(),"mouse"!==K.pointerType&&this._processCursor(null),
("freehand"===P||"point"===U||"segment"===U&&2===this.numCommittedVertices||"segment"===U&&"hybrid"===P&&1===this.numCommittedVertices)&&this.complete()))}finally{K.stopPropagation()}}_onImmediateDoubleClick(K){this._manipulator.dragging||"point"===this.geometryType||(this.complete(),K.stopPropagation())}_onPointerMove(K){const P=u.createScreenPoint(K.x,K.y);this._stagedScreenPoint=P;this._stagedPointerType=K.pointerType;this._stagedPointerId=K.pointerId;this._isDragging?this._snappingOperation.abort():
(K.stopPropagation(),this._processCursorMovementRelativeToSurface(P,K.pointerType))}_onKeyboardBasedChange(){"mouse"!==this._stagedPointerType||!this._stagedScreenPoint||null==this._stagedPointerId||this._isDragging?this._snappingOperation.abort():this._processCursorMovementRelativeToSurface(this._stagedScreenPoint,this._stagedPointerType)}_processCursorMovementRelativeToSurface(K,P){const U=this._snappingOperation,V=this._screenToMap(K);K=this._requiresScenePoint?this.drawSurface?.screenToMap(K):
null;if(null==V)this._hideDefaultCursor=!0,this._processCursor(null),U.abort();else{this._hideDefaultCursor=!1;var ca=this.snappingManager;null==ca?(this._processCursor(V),U.abort()):(P=this._getSnappingContext(P),this._updatingHandles.addPromise(x.ignoreAbortErrors(U.snap({point:V,scenePoint:K},ca,P))))}}_applyConstraints(K){const {_constraint:P,constraints:U}=this;if(!K||!U||!P)return K;var {context:V}=U,ca=A.pointToConstraintSpace(K,V);ca=ca?P.closestTo(ca):void 0;if(!ca)return K;K=A.constraintSpaceToPoint(ca,
K,V);V="2d"===this.view.type||"absolute-height"!==V.elevationInfo.mode;null!=K&&V&&null!=this.constraintZ&&this.hasZ&&(K.z=this.constraintZ);return K}_screenToMap(K){return K?this._updateAndGetEffectiveDrawSurface()?.screenToMap(K):null}_screenToMapDragEventStep(){let K=null;return P=>{"start"===P.action&&(K=this._screenToMap(P.screenStart));if(null==K)return null;const U=this._screenToMap(P.screenEnd);return null!=U?{...P,mapStart:K,mapEnd:U}:null}}_vertexWithinPointerDistance(K,P){const U=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(K));
null!=U?(K=U.x-P.x,P=U.y-P.y,P=25>=K*K+P*P):P=!1;return P}_getSnappingContext(K){const P=this._drawAtFixedElevation?this.elevationDrawSurface?.defaultZ:null;return new E.SnappingContext({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:K,feature:this.graphic,visualizer:this.snappingVisualizer,selfSnappingZ:null!=P?{value:P,elevationInfo:this.elevationInfo}:null,drawConstraints:this.constraints})}};c.__decorate([p.property()],a.DrawOperation.prototype,"_hideDefaultCursor",
void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"_stagedPointerId",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"_isDragging",null);c.__decorate([p.property()],a.DrawOperation.prototype,"_snappingOperation",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"_snappingEnabled",null);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"graphic",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"constraintsEnabled",void 0);c.__decorate([p.property()],
a.DrawOperation.prototype,"constraints",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"_constraint",null);c.__decorate([p.property()],a.DrawOperation.prototype,"constraintZ",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"defaultZ",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"isDraped",void 0);c.__decorate([p.property({value:y.defaultDrawingMode})],a.DrawOperation.prototype,"drawingMode",null);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,
"elevationDrawSurface",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"elevationInfo",void 0);c.__decorate([p.property({constructOnly:!0,type:D})],a.DrawOperation.prototype,"labelOptions",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"geometryType",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"hasM",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"hasZ",void 0);c.__decorate([p.property()],
a.DrawOperation.prototype,"cursor",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"effectiveCursor",null);c.__decorate([p.property()],a.DrawOperation.prototype,"loading",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"manipulators",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"drawSurface",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"segmentLabels",void 0);c.__decorate([p.property({constructOnly:!0})],
a.DrawOperation.prototype,"snappingManager",void 0);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"snappingVisualizer",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"snapToSceneEnabled",void 0);c.__decorate([p.property({readOnly:!0})],a.DrawOperation.prototype,"cursorVertex",null);c.__decorate([p.property({readOnly:!0})],a.DrawOperation.prototype,"visualizationCursorVertex",null);c.__decorate([p.property()],a.DrawOperation.prototype,"committableVertex",null);
c.__decorate([p.property()],a.DrawOperation.prototype,"firstVertex",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"lastVertex",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"secondToLastVertex",void 0);c.__decorate([p.property()],a.DrawOperation.prototype,"updating",null);c.__decorate([p.property({constructOnly:!0})],a.DrawOperation.prototype,"view",void 0);a.DrawOperation=c.__decorate([f.subclass("esri.views.draw.DrawOperation")],a.DrawOperation);a.defaultCursor="crosshair";
a.defaultLoadingCursor="progress";Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/DrawingMode":function(){define(["exports"],function(a){a.defaultDrawingMode="click";a.drawingModes=["freehand","hybrid","click"];Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/DrawManipulator":function(){define(["exports","../../core/Evented"],function(a,c){class g{constructor({consumesClicks:h,grabbableForEvent:d}){this.events=new c;this.interactive=
!0;this.selectable=!1;this.cursor=null;this.grabbable=!0;this.consumesClicks=h;this.grabbableForEvent=d}destroy(){}intersectionDistance(h,d){return 0}attach(){}detach(){}onElevationChange(){}onViewChange(){}}a.DrawManipulator=g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/coordinateHelper":function(){define("exports ../../core/libs/gl-matrix-2/math/vec2 ../../core/libs/gl-matrix-2/factories/vec2f64 ../../chunks/vec32 ../../core/libs/gl-matrix-2/factories/vec3f64 ../../chunks/vec42 ../../core/libs/gl-matrix-2/factories/vec4f64 ../../geometry/Point".split(" "),
function(a,c,g,h,d,m,r,x){var t;(function(b){b[b.Z=0]="Z";b[b.M=1]="M"})(t||={});class z{constructor(b){this.spatialReference=b}createVector(){return this._tag(g.create())}pointToVector(b){return this._tag(g.fromValues(b.x,b.y))}arrayToVector(b){return this._tag(g.fromValues(b[0],b[1]))}vectorToArray(b){return[b[0],b[1]]}pointToArray(b){return[b.x,b.y]}vectorToPoint(b,l=new x){l.x=b[0];l.y=b[1];l.z=void 0;l.m=void 0;l.spatialReference=this.spatialReference;return l}arrayToPoint(b,l=new x){l.x=b[0];
l.y=b[1];l.z=void 0;l.m=void 0;l.spatialReference=this.spatialReference;return l}vectorToDehydratedPoint(b,l){if(b)return l??={x:void 0,y:void 0,z:void 0,m:void 0,hasZ:void 0,hasM:void 0,spatialReference:void 0,type:"point"},l.x=b[0],l.y=b[1],l.z=void 0,l.m=void 0,l.hasZ=!1,l.hasM=!1,l.spatialReference=this.spatialReference,l}lerp(b,l,f,k){return c.lerp(k,b,l,f)}addDelta(b,l,f){b[0]+=l;b[1]+=f}distance(b,l){return c.distance(b,l)}getZ(b,l){return l}hasZ(){return!1}getM(b,l){return l}hasM(){return!1}clone(b){return this._tag(g.fromArray(b))}copy(b,
l){return c.copy(l,b)}fromXYZ(b){return this._tag(g.fromValues(b[0],b[1]))}toXYZ(b,l=d.create()){return h.set(l,b[0],b[1],0)}pointToXYZ(b,l=d.create()){return h.set(l,b.x,b.y,0)}equals(b,l){return c.equals(b,l)}_tag(b){return b}}class u{constructor(b,l){this._valueType=b;this.spatialReference=l}createVector(){return this._tag(d.create())}pointToVector(b){return this._tag(d.fromValues(b.x,b.y,this._valueType===t.Z?b.z:b.m))}arrayToVector(b){return this._tag(d.fromValues(b[0],b[1],b[2]||0))}vectorToArray(b){return[b[0],
b[1],b[2]]}pointToArray(b){return this._valueType===t.Z?[b.x,b.y,b.z]:[b.x,b.y,b.m]}vectorToPoint(b,l=new x){l.x=b[0];l.y=b[1];l.z=this._valueType===t.Z?b[2]:void 0;l.m=this._valueType===t.M?b[2]:void 0;l.spatialReference=this.spatialReference;return l}arrayToPoint(b,l=new x){l.x=b[0];l.y=b[1];l.z=this._valueType===t.Z?b[2]:void 0;l.m=this._valueType===t.M?b[2]:void 0;l.spatialReference=this.spatialReference;return l}vectorToDehydratedPoint(b,l){if(b){l??={x:void 0,y:void 0,z:void 0,m:void 0,hasZ:void 0,
hasM:void 0,spatialReference:void 0,type:"point"};var f=this._valueType===t.Z,k=this._valueType===t.M;l.x=b[0];l.y=b[1];l.z=f?b[2]:void 0;l.m=k?b[2]:void 0;l.hasZ=f;l.hasM=k;l.spatialReference=this.spatialReference;return l}}lerp(b,l,f,k){return h.lerp(k,b,l,f)}addDelta(b,l,f,k){b[0]+=l;b[1]+=f;this._valueType===t.Z&&(b[2]+=k)}distance(b,l){return this._valueType===t.Z?h.distance(b,l):c.distance(b,l)}getZ(b,l){return this._valueType===t.Z?b[2]:l}hasZ(){return this._valueType===t.Z}getM(b,l){return this._valueType===
t.M?b[2]:l}hasM(){return this._valueType===t.M}clone(b){return this._tag(d.fromArray(b))}copy(b,l){return h.copy(l,b)}fromXYZ(b,l=0,f=0){return this._tag(d.fromValues(b[0],b[1],this._valueType===t.Z?2<b.length?b[2]:l:f))}toXYZ(b,l=d.create()){return h.set(l,b[0],b[1],this._valueType===t.Z?b[2]:0)}pointToXYZ(b,l=d.create()){return h.set(l,b.x,b.y,this._valueType===t.Z?b.z??0:0)}equals(b,l){return h.equals(b,l)}_tag(b){return b}}class p{constructor(b){this.spatialReference=b}createVector(){return this._tag(r.create())}pointToVector(b){return this._tag(r.fromValues(b.x,
b.y,b.z,b.m))}arrayToVector(b){return this._tag(r.fromValues(b[0],b[1],b[2]||0,b[3]||0))}vectorToArray(b){return[b[0],b[1],b[2],b[3]]}pointToArray(b){return[b.x,b.y,b.z,b.m]}vectorToPoint(b,l=new x){l.x=b[0];l.y=b[1];l.z=b[2];l.m=b[3];l.spatialReference=this.spatialReference;return l}arrayToPoint(b,l=new x){l.x=b[0];l.y=b[1];l.z=b[2];l.m=b[3];l.spatialReference=this.spatialReference;return l}vectorToDehydratedPoint(b,l){if(b)return l??={x:void 0,y:void 0,z:void 0,m:void 0,hasZ:void 0,hasM:void 0,
spatialReference:void 0,type:"point"},l.x=b[0],l.y=b[1],l.z=b[2],l.m=b[3],l.hasZ=!0,l.hasM=!0,l.spatialReference=this.spatialReference,l}lerp(b,l,f,k){return m.lerp(k,b,l,f)}addDelta(b,l,f,k){b[0]+=l;b[1]+=f;b[2]+=k}distance(b,l){return h.distance(b,l)}getZ(b){return b[2]}hasZ(){return!0}getM(b){return b[3]}hasM(){return!0}clone(b){return this._tag(r.fromArray(b))}copy(b,l){return m.copy(l,b)}fromXYZ(b,l=0,f=0){return this._tag(r.fromValues(b[0],b[1],2<b.length?b[2]:l,f))}toXYZ(b,l=d.create()){return h.set(l,
b[0],b[1],b[2])}pointToXYZ(b,l=d.create()){return h.set(l,b.x,b.y,b.z??0)}equals(b,l){return m.equals(b,l)}_tag(b){return b}}a.CoordinateHelper2D=z;a.CoordinateHelper3D=u;a.CoordinateHelper4D=p;a.createCoordinateHelper=function(b,l,f){return b&&l?new p(f):l?new u(t.M,f):b?new u(t.Z,f):new z(f)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/dragEventPipeline":function(){define("exports ../../core/arrayUtils ../../core/has ../../core/lang ../../core/mathUtils ../../core/screenUtils ../../geometry/projection ../../geometry/support/meshVertexSpaceUtils ../../layers/graphics/hydratedFeatures ../../support/elevationInfoUtils ./editGeometry/EditGeometryOperations".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){function p(y,F){let G=null,q=null;return B=>{if("cancel"===B.action)null!=q&&(q.execute({action:"cancel"}),q=G=null);else{var e={action:B.action,screenStart:B.start,screenEnd:B.screenPoint};"start"===B.action&&null==G&&(G=new w,q=new w,F(y,G,q,B.pointerType,e));null!=G&&G.execute(e);"end"===B.action&&null!=G&&(q=G=null)}}}function b(y){let F=null;return G=>{"start"===G.action&&(F=f(y,G.mapStart.spatialReference));if(null==F)return null;const q=G.mapEnd.x-G.mapStart.x,
B=G.mapEnd.y-G.mapStart.y,e=(G.mapEnd.z??0)-(G.mapStart.z??0);F.move(q,B,e,G.action);return{...G,translationX:q,translationY:B,translationZ:e}}}function l(y,F){return null==y?null:y.spatialReference.equals(F)?y.clone():r.project(y,F)}function f(y,F){const G=y.operations;if(!G)return null;const q=G.data.geometry;F=t.hydratedSpatialReference(F);if(q.spatialReference.equals(F))return k(y,G,()=>{});if("mesh"!==q.type){F=l(q,F);if(null==F)return null;const B=q.spatialReference;F=u.EditGeometryOperations.fromGeometry(F,
G.viewingMode);return k(y,F,()=>{const e=r.project(q,B);G.trySetGeometry(e)})}if(x.isMeshWithRelativeVertexSpace(q)){F=l(q.origin,F);if(!F)return null;const B=q.spatialReference,e=u.EditGeometryOperations.fromGeometry(F,G.viewingMode);return k(y,G,()=>{const v=r.project(e.data.geometry,B);G.move(v.x-q.origin.x,v.y-q.origin.y,(v.z??0)-(q.origin.z??0))})}return null}function k(y,F,G){let q=0,B=0,e=0;return{move:(v,A,D,E)=>{"start"===E&&(e=B=q=0);v-=q;A-=B;D-=e;F.move(v,A,D);q+=v;B+=A;e+=D;G();"end"===
E&&y.endInteraction?.()}}}function n(y){const F=y.operations?.createResetState();return G=>{F?.remove();return G}}function C(y,F,G){const q=F.elevationProvider.getElevation(y.x,y.y,y.z??0,y.spatialReference,"scene")??0;y=t.clonePoint(y);y.z=q;y.hasZ=!0;y.z=z.getZForElevationMode(y,F,G);return y}const I=()=>{};class w{constructor(){this.execute=I}next(y,F=new w){null!=y&&(this.execute=G=>{G=y(G);null!=G&&F.execute(G)});return F}}a.EventPipeline=w;a.addMapDelta=function(){let y=0,F=0,G=0;return q=>
{"start"===q.action&&(y=q.mapStart.x,F=q.mapStart.y,G=q.mapStart.z);const B=q.mapEnd.x-y,e=q.mapEnd.y-F,v=q.mapEnd.z-G;y=q.mapEnd.x;F=q.mapEnd.y;G=q.mapEnd.z;return{...q,mapDeltaX:B,mapDeltaY:e,mapDeltaZ:v,mapDeltaSpatialReference:q.mapStart.spatialReference}}};a.addScreenDelta=function(){let y=0,F=0;return G=>{"start"===G.action&&(y=G.screenStart.x,F=G.screenStart.y);const q=G.screenEnd.x-y,B=G.screenEnd.y-F;y=G.screenEnd.x;F=G.screenEnd.y;return{...G,screenDeltaX:q,screenDeltaY:B}}};a.constrainToMapAxis=
function(y,F){const G=[y.x,y.y,y.z??0],q=[Math.cos(F),Math.sin(F)];y=Math.sqrt(q[0]*q[0]+q[1]*q[1]);if(0===y)return null;q[0]/=y;q[1]/=y;const B=e=>{const v=(e.x-G[0])*q[0]+(e.y-G[1])*q[1];e.x=G[0]+v*q[0];e.y=G[1]+v*q[1]};return e=>{B(e.mapStart);B(e.mapEnd);return{...e,axis:q}}};a.createDragEventPipelineCallback=p;a.createManipulatorDragEventPipeline=function(y,F){return y.events.on("drag",p(y,F))};a.dragAtLocation=function(y,F){let G=null,q=0,B=0;return e=>{"start"===e.action&&(G=y.toScreen?.(F),
null!=G&&(0>G.x||G.x>y.width||0>G.y||G.y>y.height?G=null:(q=e.screenStart.x-G.x,B=e.screenStart.y-G.y)));if(null==G)return null;var v=d.clamp(e.screenEnd.x-q,0,y.width);const A=d.clamp(e.screenEnd.y-B,0,y.height);v=m.createScreenPoint(v,A);e.screenStart=G;e.screenEnd=v;return e}};a.dragManipulatedObject=b;a.dragManipulatedObjectMany=function(y){const F=y.map(G=>b(G)).filter(c.isSome);return G=>{const q=G.mapEnd.x-G.mapStart.x,B=G.mapEnd.y-G.mapStart.y,e=G.mapEnd.z-G.mapStart.z;F.forEach(v=>v(G));
return{...G,translationX:q,translationY:B,translationZ:e}}};a.resetManipulatedObject=n;a.resetManipulatedObjectMany=function(y){const F=y.map(G=>n(G)).filter(G=>null!=G);return G=>{F.forEach(q=>q(G));return G}};a.resetProperties=function(y,F){const G=new Map;for(const q of F)G.set(q,h.clone(y[q]));return q=>{G.forEach((B,e)=>{y[e]=B});return q}};a.sceneSnappingAtLocation=function(y,F,G=[]){if("2d"===y.type)return B=>B;let q=null;return B=>{"start"===B.action&&(q=y.toMap(B.screenStart,{exclude:G}),
null!=q&&(q.z=z.getZForElevationMode(q,y,F)));const e=y.toMap(B.screenEnd,{exclude:G});null!=e&&(e.z=z.getZForElevationMode(e,y,F));return{...B,scenePoints:null!=q&&null!=e?{sceneStart:q,sceneEnd:e}:null}}};a.sceneSnappingAtProjectedLocation=function(y,F){if("2d"===y.type)return q=>q;let G=null;return q=>{"start"===q.action&&(G=C(q.mapStart,y,F));const B=C(q.mapEnd,y,F);return{...q,scenePoints:null!=G&&null!=B?{sceneStart:G,sceneEnd:B}:null}}};a.screenToMap=function(y,F=null,G){let q=null;const B=
null==F||y.spatialReference?.equals(F)?v=>v:v=>null!=v?r.project(v,F):v,e={exclude:[],...G};return v=>{"start"===v.action&&(q=B(y.toMap(v.screenStart,e)));if(null==q)return null;const A=B(y.toMap(v.screenEnd,e));return null!=A?{...v,mapStart:q,mapEnd:A}:null}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/EditGeometryOperations":function(){define("exports ../../../core/Evented ../../../core/handleUtils ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/support/coordsUtils ./EditGeometry ./interfaces ./operations/AppendVertex ./operations/UpdateVertices ./operations/RemoveVertices ./operations/SplitEdge ./operations/SetVertexPosition ./operations/CloseComponent ./operations/MoveMesh ./operations/MoveVertex ./operations/OffsetEdgeVertex ./operations/RotateVertex ./operations/ScaleVertex ./operations/SetAllVertexPositions ./operations/UndoGroup".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w){class y extends c{constructor(F,G){super();this.data=F;this.viewingMode=G;this._undoStack=[];this._redoStack=[];this._listener=this.data.on("change",q=>{q.addedVertices&&this.emit("vertex-add",{type:"vertex-add",vertices:q.addedVertices,operation:q.operation});q.removedVertices&&this.emit("vertex-remove",{type:"vertex-remove",vertices:q.removedVertices,operation:q.operation});q.updatedVertices&&this.emit("vertex-update",{type:"vertex-update",vertices:q.updatedVertices,
operation:q.operation})})}destroy(){this._listener.remove()}splitEdge(F,G){return this._apply(new u.SplitEdge(this.data,F,G))}updateVertices(F,G,q=r.AccumulationBehavior.ACCUMULATE_STEPS){return this._apply(new t.UpdateVertices(this.data,F,G),q)}move(F,G,q,B=r.AccumulationBehavior.ACCUMULATE_STEPS){return m.isMeshEditGeometry(this.data)?this._apply(new l.MoveMesh(this.data,F,G,q),B):this.moveVertices(this.data.allVertices,F,G,q,B)}moveVertices(F,G,q,B,e=r.AccumulationBehavior.ACCUMULATE_STEPS){return m.isMeshEditGeometry(this.data)?
this._apply(new l.MoveMesh(this.data,G,q,B),e):this.updateVertices(F,new f.MoveVertex(this.data.coordinateHelper,G,q,B),e)}scale(F,G,q,B,e=r.AccumulationBehavior.ACCUMULATE_STEPS,v=t.AccumulationType.CUMULATIVE){return this.scaleVertices(this.data.allVertices,F,G,q,B,e,v)}scaleVertices(F,G,q,B,e,v=r.AccumulationBehavior.ACCUMULATE_STEPS,A=t.AccumulationType.CUMULATIVE){return this.updateVertices(F,new C.ScaleVertex(G,q,B,e,A),v)}rotate(F,G,q=r.AccumulationBehavior.ACCUMULATE_STEPS,B=t.AccumulationType.CUMULATIVE){return this.rotateVertices(this.data.allVertices,
F,G,q,B)}rotateVertices(F,G,q,B=r.AccumulationBehavior.ACCUMULATE_STEPS,e=t.AccumulationType.CUMULATIVE){return this.updateVertices(F,new n.RotateVertex(G,q,e),B)}removeVertices(F){return this._apply(new z.RemoveVertices(this.data,F,this._minNumVerticesPerType))}appendVertex(F){return 0===this.data.components.length?null:this._apply(new x.AppendVertex(this.data,this.data.components[0],F))}setVertexPosition(F,G){return this._apply(new p.SetVertexPosition(this.data,F,G))}offsetEdge(F,G,q,B=r.AccumulationBehavior.ACCUMULATE_STEPS){return this.updateVertices([G.leftVertex,
G.rightVertex],new k.OffsetEdgeVertex(this.data.coordinateHelper,F,G,q),B)}trySetGeometry(F,G=r.AccumulationBehavior.ACCUMULATE_STEPS){const {data:q}=this,{coordinateHelper:B}=q;if(q.type===F.type&&q.spatialReference.equals(F.spatialReference)&&B.hasZ()===F.hasZ&&B.hasM()===F.hasM&&d.hasCompatibleTopology(q.geometry,F)&&!m.isMeshEditGeometry(q))return F=Array.from(m.EditGeometry.fromGeometry(F,this.viewingMode).iterateVertices(),e=>e.pos),this.setVertexPositions(F,G)}setVertexPositions(F,G=r.AccumulationBehavior.ACCUMULATE_STEPS){return this._apply(new I.SetAllVertexPositions(this.data,
F),G)}createResetState(){if(m.isMeshEditGeometry(this.data))return this._createResetStateMesh();const F=this.data.geometry.clone();return g.makeHandle(()=>this.trySetGeometry(F))}closeComponent(F){return this.data.components.includes(F)?this._apply(new b.CloseComponent(this.data,F)):null}canRemoveVertex(F){return F.vertices.length>this._minNumVerticesPerType}createUndoGroup(){const F=new w.UndoGroup;this._apply(F);return g.makeHandle(()=>F.close())}undo(){if(0<this._undoStack.length){const F=this._undoStack.pop();
F.undo();this._redoStack.push(F);return F}return null}redo(){if(0<this._redoStack.length){const F=this._redoStack.pop();F.apply();this._undoStack.push(F);return F}return null}get canUndo(){return 0<this._undoStack.length}get canRedo(){return 0<this._redoStack.length}get lastOperation(){return 0<this._undoStack.length?this._undoStack[this._undoStack.length-1]:null}get _minNumVerticesPerType(){switch(this.data.type){case "point":return 1;case "polyline":return 2;case "polygon":return 3;default:return 0}}_apply(F,
G=r.AccumulationBehavior.ACCUMULATE_STEPS){G!==r.AccumulationBehavior.NEW_STEP&&null!=this.lastOperation&&this.lastOperation.accumulate(F)||(F.apply(),this._undoStack.push(F),this._redoStack=[]);return F}_createResetStateMesh(){if(!m.isMeshEditGeometry(this.data))return g.makeHandle();const F=this.data.geometry,{vertexSpace:G}=F;if(G.origin){const B=h.clone(G.origin);return g.makeHandle(()=>{F.vertexSpace.origin=B})}const q=F.vertexAttributes.clonePositional();return g.makeHandle(()=>{F.vertexAttributes=
q;F.vertexAttributesChanged()})}static fromGeometry(F,G){return new y(m.EditGeometry.fromGeometry(F,G),G)}}a.EditGeometryOperations=y;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/EditGeometry":function(){define("exports ../../../core/arrayUtils ../../../core/compilerUtils ../../../core/Evented ../../../geometry/Polygon ../../../geometry/Polyline ../coordinateHelper ./unnormalizationHelper".split(" "),function(a,c,g,h,d,m,r,x){function t(l,f,
k){const n=l.coordinateHelper;k=new p(f.spatialReference,k);k.index=0;const C=new z(k);C.index=0;C.pos=n.pointToVector(f);k.vertices.push(C);l.components.push(k)}class z{constructor(l){this.component=l;this.rightEdge=this.leftEdge=null;this.type="vertex";this.index=null}get pos(){return this._pos}set pos(l){this._pos=l;this.component.unnormalizeVertexPositions()}}class u{constructor(l,f,k){this.component=l;this.leftVertex=f;this.rightVertex=k;this.type="edge";f.rightEdge=this;k.leftEdge=this}}class p{constructor(l,
f){this._spatialReference=l;this._viewingMode=f;this.vertices=[];this.edges=[];this.index=null}unnormalizeVertexPositions(){1>=this.vertices.length||x.unnormalize(this.vertices,x.getUnnormalizationInfo(this._spatialReference,this._viewingMode))}updateVertexIndex(l,f){if(0!==this.vertices.length){var k=this.vertices[0],n=null;do n=l,n.index=f++,l=n.rightEdge?n.rightEdge.rightVertex:null;while(null!=l&&l!==k);n.leftEdge&&n!==this.vertices[this.vertices.length-1]&&this.swapVertices(this.vertices.indexOf(n),
this.vertices.length-1)}}getFirstVertex(){return this.vertices.at(0)}getLastVertex(){return this.vertices.at(-1)}isClosed(){return 2<this.vertices.length&&null!==this.vertices[0].leftEdge}swapVertices(l,f){const k=this.vertices[l];this.vertices[l]=this.vertices[f];this.vertices[f]=k}iterateVertices(l){if(0!==this.vertices.length){var f=this.vertices[0],k=f;do l(k,k.index),k=null!=k.rightEdge?k.rightEdge.rightVertex:null;while(k!==f&&null!=k)}}}class b extends h{constructor(l,f){super();this.type=
l;this.coordinateHelper=f;this._geometry=null;this._dirty=!0;this.components=[]}get geometry(){if(this._dirty){switch(this.type){case "point":this._geometry=this._toPoint();break;case "polyline":this._geometry=this._toPolyline();break;case "polygon":this._geometry=this._toPolygon();break;case "mesh":break;default:g.neverReached(this.type)}this._dirty=!1}return this._geometry}get spatialReference(){return this.coordinateHelper.spatialReference}get allVertices(){return Array.from(this.iterateVertices())}*iterateVertices(){for(const l of this.components)for(const f of l.vertices)yield f}notifyChanges(l){this._dirty=
!0;this.emit("change",l)}_toPoint(){return 0===this.components.length||0===this.components[0].vertices.length?null:this.coordinateHelper.vectorToPoint(this.components[0].vertices[0].pos)}_toPolyline(){const l=[],f=this.coordinateHelper.vectorToArray;for(const k of this.components){if(1>k.vertices.length)continue;const n=[];let C=k.vertices.find(w=>null==w.leftEdge);const I=C;do n.push(f(C.pos)),C=C.rightEdge?C.rightEdge.rightVertex:null;while(C&&C!==I);l.push(n)}return new m({paths:l,spatialReference:this.spatialReference,
hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}_toPolygon(){const l=[],f=this.coordinateHelper.vectorToArray;for(const k of this.components){if(1>k.vertices.length)continue;const n=[],C=k.vertices[0];let I=C;const w=I;do n.push(f(I.pos)),I=null!=I.rightEdge?I.rightEdge.rightVertex:null;while(I&&I!==w);k.isClosed()&&n.push(f(C.pos));l.push(n)}return new d({rings:l,spatialReference:this.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}static fromGeometry(l,
f){var k=r.createCoordinateHelper(l.hasZ,l.hasM,l.spatialReference);k=new b(l.type,k);switch(l.type){case "polygon":var n=l.spatialReference,C=k.coordinateHelper;l=l.rings;for(var I=0;I<l.length;++I){var w=l[I],y=new p(n,f);y.index=I;var F=2<w.length&&c.equals(w[0],w[w.length-1]),G=F?w.length-1:w.length;for(var q=0;q<G;++q){var B=C.arrayToVector(w[q]);const e=new z(y);y.vertices.push(e);e.pos=B;e.index=q}w=y.vertices.length-1;for(G=0;G<w;++G)q=new u(y,y.vertices[G],y.vertices[G+1]),y.edges.push(q);
F&&(F=new u(y,y.vertices[y.vertices.length-1],y.vertices[0]),y.edges.push(F));k.components.push(y)}break;case "polyline":n=l.spatialReference;C=k.coordinateHelper;l=l.paths;for(I=0;I<l.length;++I){F=l[I];y=new p(n,f);y.index=I;w=F.length;for(G=0;G<w;++G)q=C.arrayToVector(F[G]),B=new z(y),y.vertices.push(B),B.pos=q,B.index=G;F=y.vertices.length-1;for(w=0;w<F;++w)G=new u(y,y.vertices[w],y.vertices[w+1]),y.edges.push(G);k.components.push(y)}break;case "point":t(k,l,f);break;case "mesh":t(k,l.anchor,
f),k._geometry=l,k._dirty=!1}return k}}a.Component=p;a.Edge=u;a.EditGeometry=b;a.Vertex=z;a.isMeshEditGeometry=function(l){return"mesh"===l.type};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/unnormalizationHelper":function(){define(["exports","../../../geometry/support/spatialReferenceUtils","../../ViewingMode"],function(a,c,g){a.getUnnormalizationInfo=function(h,d){h=c.getInfo(h);return d===g.ViewingMode.Global&&h?{supported:!0,lowerBoundX:h.valid[0],
upperBoundX:h.valid[1]}:{supported:!1,lowerBoundX:null,upperBoundX:null}};a.unnormalize=function(h,d){if(d.supported){var m=Infinity,r=-Infinity,x=d.upperBoundX-d.lowerBoundX;h.forEach(z=>{let u=z.pos[0];for(;u<d.lowerBoundX;)u+=x;for(;u>d.upperBoundX;)u-=x;m=Math.min(m,u);r=Math.max(r,u);z.pos[0]=u});var t=r-m;x-t<t&&h.forEach(z=>{0>z.pos[0]&&(z.pos[0]+=x)})}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/interfaces":function(){define(["exports"],
function(a){a.AccumulationBehavior=void 0;var c=a.AccumulationBehavior||(a.AccumulationBehavior={});c[c.NEW_STEP=0]="NEW_STEP";c[c.ACCUMULATE_STEPS=1]="ACCUMULATE_STEPS";Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/AppendVertex":function(){define(["exports","../EditGeometry"],function(a,c){class g{constructor(h,d,m){this._editGeometry=h;this._component=d;this._pos=m;this._right=this._left=this._originalEdge=this._addedVertex=null}apply(){let h=
"redo";null==this._addedVertex&&(h="apply",this._addedVertex=new c.Vertex(this._component));const d=this._component.getLastVertex();if(null==d)this._component.vertices.push(this._addedVertex),this._addedVertex.pos=this._pos,this._addedVertex.index=0;else{let m=null;d.rightEdge&&(this._originalEdge=d.rightEdge,m=this._originalEdge.rightVertex,this._component.edges.splice(this._component.edges.indexOf(this._originalEdge),1));this._component.vertices.push(this._addedVertex);this._addedVertex.pos=this._pos;
null==this._left&&(this._left=new c.Edge(this._component,d,this._addedVertex));this._component.edges.push(this._left);d.rightEdge=this._left;null!=this._originalEdge&&null!=m&&(null==this._right&&(this._right=new c.Edge(this._component,this._addedVertex,m)),this._component.edges.push(this._right),m.leftEdge=this._right);this._component.updateVertexIndex(this._addedVertex,d.index+1)}this._editGeometry.notifyChanges({operation:h,addedVertices:[this._addedVertex]})}undo(){null!=this._addedVertex&&(this._component.vertices.splice(this._component.vertices.indexOf(this._addedVertex),
1),null!=this._left&&(this._component.edges.splice(this._component.edges.indexOf(this._left),1),this._left.leftVertex.rightEdge=null),null!=this._right&&(this._component.edges.splice(this._component.edges.indexOf(this._right),1),this._right.rightVertex.leftEdge=null),null!=this._originalEdge&&(this._component.edges.push(this._originalEdge),this._originalEdge.leftVertex.rightEdge=this._originalEdge,this._originalEdge.rightVertex.leftEdge=this._originalEdge),null!=this._left?this._component.updateVertexIndex(this._left.leftVertex,
this._left.leftVertex.index):this._component.updateVertexIndex(this._addedVertex,0),this._editGeometry.notifyChanges({operation:"undo",removedVertices:[this._addedVertex]}))}accumulate(){return!1}}a.AppendVertex=g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/UpdateVertices":function(){define(["exports"],function(a){class c{constructor(g,h,d){this._editGeometry=g;this._vertices=h;this.operation=d;this._undone=!1}apply(){this._vertices.forEach(g=>
this.operation.apply(g));this._editGeometry.components.forEach(g=>g.unnormalizeVertexPositions());this._editGeometry.notifyChanges({operation:this._undone?"redo":"apply",updatedVertices:this._vertices})}undo(){this._vertices.forEach(g=>this.operation.undo(g));this._editGeometry.notifyChanges({operation:"undo",updatedVertices:this._vertices});this._undone=!0}canAccumulate(g){if(this._undone||g._vertices.length!==this._vertices.length)return!1;for(let h=0;h<g._vertices.length;++h)if(g._vertices[h]!==
this._vertices[h])return!1;return this.operation.canAccumulate(g.operation)}accumulate(g){return g instanceof c&&this.canAccumulate(g)?(this._vertices.forEach(h=>this.operation.accumulate(h,g.operation)),this.operation.accumulateParams(g.operation),this._editGeometry.components.forEach(h=>h.unnormalizeVertexPositions()),this._editGeometry.notifyChanges({operation:"apply",updatedVertices:this._vertices}),!0):!1}}a.AccumulationType=void 0;(function(g){g[g.CUMULATIVE=0]="CUMULATIVE";g[g.REPLACE=1]="REPLACE"})(a.AccumulationType||
(a.AccumulationType={}));a.UpdateVertices=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/RemoveVertices":function(){define(["exports","../EditGeometry"],function(a,c){class g{constructor(h,d,m=0){this._editGeometry=h;this._vertices=d;this._minNumberOfVertices=m;this.removedVertices=null}apply(){let h="redo";if(null==this.removedVertices){const d=this.removedVertices=[];this._vertices.forEach(m=>{m=this._removeVertex(m);null!=m&&d.push(m)});
h="apply"}else this.removedVertices.forEach(d=>{this._removeVertex(d.removedVertex)});this._editGeometry.notifyChanges({operation:h,removedVertices:this._vertices})}undo(){this.removedVertices?.forEach(h=>{this._undoRemoveVertex(h)});this._editGeometry.notifyChanges({operation:"undo",addedVertices:this._vertices})}accumulate(){return!1}_removeVertex(h){const d=h.component;if(d.vertices.length<=this._minNumberOfVertices)return null;const m={removedVertex:h,createdEdge:null},r=h.leftEdge,x=h.rightEdge;
d.vertices.splice(d.vertices.indexOf(h),1);r&&(d.edges.splice(d.edges.indexOf(r),1),r.leftVertex.rightEdge=null);x&&(d.edges.splice(d.edges.indexOf(x),1),x.rightVertex.leftEdge=null);0===h.index&&x&&0<this._vertices.length&&d.swapVertices(d.vertices.indexOf(x.rightVertex),0);r&&x&&(m.createdEdge=new c.Edge(d,r.leftVertex,x.rightVertex),d.edges.push(m.createdEdge));x&&d.updateVertexIndex(x.rightVertex,x.rightVertex.index-1);return m}_undoRemoveVertex(h){const d=h.removedVertex,m=h.removedVertex.component,
r=d.leftEdge,x=d.rightEdge;h.createdEdge&&m.edges.splice(m.edges.indexOf(h.createdEdge),1);m.vertices.push(d);r&&(m.edges.push(r),r.leftVertex.rightEdge=r);x&&(m.edges.push(x),x.rightVertex.leftEdge=x);m.updateVertexIndex(d,d.index)}}a.RemoveVertices=g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/SplitEdge":function(){define(["exports","../EditGeometry"],function(a,c){class g{constructor(h,d,m){this._editGeometry=h;this._edge=d;this._t=
m;this._right=this._left=this.createdVertex=null}apply(){let h="redo";const d=this._edge,m=d.component,r=d.leftVertex,x=d.rightVertex;m.edges.splice(m.edges.indexOf(d),1);null==this.createdVertex&&(h="apply",this.createdVertex=new c.Vertex(d.component));m.vertices.push(this.createdVertex);this.createdVertex.pos=this._editGeometry.coordinateHelper.lerp(d.leftVertex.pos,d.rightVertex.pos,this._t,this._editGeometry.coordinateHelper.createVector());null==this._left&&(this._left=new c.Edge(m,r,this.createdVertex));
this._left.leftVertex.leftEdge?m.edges.push(this._left):m.edges.unshift(this._left);r.rightEdge=this._left;null==this._right&&(this._right=new c.Edge(m,this.createdVertex,x));m.edges.push(this._right);x.leftEdge=this._right;m.updateVertexIndex(this.createdVertex,r.index+1);this._editGeometry.notifyChanges({operation:h,addedVertices:[this.createdVertex]})}undo(){if(null==this.createdVertex||null==this._left||null==this._right)return null;const h=this._edge,d=h.component,m=this.createdVertex.leftEdge?.leftVertex,
r=this.createdVertex.rightEdge?.rightVertex;d.vertices.splice(d.vertices.indexOf(this.createdVertex),1);d.edges.splice(d.edges.indexOf(this._left),1);d.edges.splice(d.edges.indexOf(this._right),1);this._edge.leftVertex.leftEdge?d.edges.push(this._edge):d.edges.unshift(this._edge);m&&(m.rightEdge=h);r&&(r.leftEdge=h);m&&d.updateVertexIndex(m,m.index);this._editGeometry.notifyChanges({operation:"undo",removedVertices:[this.createdVertex]})}accumulate(){return!1}}a.SplitEdge=g;Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/SetVertexPosition":function(){define(["exports"],function(a){class c{constructor(g,h,d){this._editGeometry=g;this._vertex=h;this._pos=d}apply(){const g=null==this._originalPosition;g&&(this._originalPosition=this._vertex.pos);this._apply(g?"apply":"redo")}undo(){this._vertex.pos=this._originalPosition;this._editGeometry.notifyChanges({operation:"undo",updatedVertices:[this._vertex]})}accumulate(g){return g instanceof
c&&g._vertex===this._vertex?(this._pos=g._pos,this._apply("apply"),!0):!1}_apply(g){this._vertex.pos=this._pos;this._editGeometry.components.forEach(h=>h.unnormalizeVertexPositions());this._editGeometry.notifyChanges({operation:g,updatedVertices:[this._vertex]})}}a.SetVertexPosition=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/CloseComponent":function(){define(["exports","../../../../core/arrayUtils","../EditGeometry"],function(a,
c,g){class h{constructor(d,m){this._editGeometry=d;this._component=m;this._createdEdge=null}apply(){let d="redo";if(null==this._createdEdge){d="apply";const m=this._component.getFirstVertex(),r=this._component.getLastVertex();if(this._component.isClosed()||3>this._component.vertices.length||null==m||null==r)return;this._createdEdge=new g.Edge(this._component,r,m)}this._createdEdge.leftVertex.rightEdge=this._createdEdge;this._createdEdge.rightVertex.leftEdge=this._createdEdge;this._component.edges.push(this._createdEdge);
this._editGeometry.notifyChanges({operation:d})}undo(){null!=this._createdEdge&&(c.remove(this._component.edges,this._createdEdge),this._createdEdge.leftVertex.rightEdge=null,this._createdEdge.rightVertex.leftEdge=null,this._editGeometry.notifyChanges({operation:"undo"}))}accumulate(){return!1}}a.CloseComponent=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/MoveMesh":function(){define(["exports"],function(a){class c{constructor(g,
h,d,m){this._editGeometry=g;this.dx=h;this.dy=d;this.dz=m;this._firstTime=!0}apply(){const g=this._firstTime?"apply":"redo";this._firstTime=!1;this._apply(g,this.dx,this.dy,this.dz)}undo(){this._apply("undo",-this.dx,-this.dy,-this.dz)}accumulate(g){const h=this._editGeometry.geometry;return g instanceof c&&g._editGeometry.geometry===h?(this._apply("apply",g.dx,g.dy,g.dz),this.dx+=g.dx,this.dy+=g.dy,this.dz+=g.dz,!0):!1}_apply(g,h,d,m){const r=this._editGeometry.geometry;r.offset(h,d,m);if(h=this._editGeometry.components[0].getFirstVertex())h.pos=
this._editGeometry.coordinateHelper.pointToVector(r.anchor),this._editGeometry.notifyChanges({operation:g,updatedVertices:[h]})}}a.MoveMesh=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/MoveVertex":function(){define(["exports"],function(a){class c{constructor(g,h,d,m){this._helper=g;this.dx=h;this.dy=d;this.dz=m}_move(g,h,d,m){this._helper.addDelta(g.pos,h,d,m)}apply(g){this._move(g,this.dx,this.dy,this.dz)}undo(g){this._move(g,-this.dx,
-this.dy,-this.dz)}canAccumulate(g){return g instanceof c}accumulate(g,h){this._move(g,h.dx,h.dy,h.dz)}accumulateParams(g){this.dx+=g.dx;this.dy+=g.dy;this.dz+=g.dz}}a.MoveVertex=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/OffsetEdgeVertex":function(){define("exports ../../../../core/mathUtils ../../../../core/libs/gl-matrix-2/math/vec2 ../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../geometry/support/plane ../../../../geometry/support/vector ../../../support/geometry2dUtils".split(" "),
function(a,c,g,h,d,m,r,x,t){class z{get plane(){return this._plane}get requiresSplitEdgeLeft(){return!this._left.isOriginalDirection}get requiresSplitEdgeRight(){return!this._right.isOriginalDirection}get edgeDirection(){return this._edgeDirection}constructor(b,l,f,k=0,n=p.IMMEDIATE){this._helper=b;this._planeType=l;this._edge=f;this.distance=k;this._plane=r.create();this._offsetPlane=r.create();this._minDistance=-Infinity;this._maxDistance=Infinity;this._selectedArrow=1;n===p.IMMEDIATE&&this._initialize()}_initialize(){this._initializeNeighbors();
this._initializePlane();this._initializeDistanceConstraints()}_initializeNeighbors(){const b=this._toXYZ(this._edge.leftVertex.pos),l=this._toXYZ(this._edge.leftVertex.leftEdge?.leftVertex?.pos),f=this._toXYZ(this._edge.rightVertex.pos),k=this._toXYZ(this._edge.rightVertex.rightEdge?.rightVertex?.pos);this._edgeDirection=d.direction(m.create(),b,f);l?(this._left=this._computeNeighbor(b,l,this._edgeDirection),this._right=this._computeNeighbor(f,k,this._edgeDirection,this._left)):(this._right=this._computeNeighbor(f,
k,this._edgeDirection),this._left=this._computeNeighbor(b,l,this._edgeDirection,this._right))}_toXYZ(b){return null!=b?this._helper.toXYZ(b):null}_pointToXYZ(b){return this._toXYZ(this._helper.pointToVector(b))}_computeNeighbor(b,l,f,k){const n=m.create();if(l)return d.direction(n,b,l),k=!this._passesBisectingAngleThreshold(n,f),{start:b,end:l,direction:k?this._bisectVectorsPerpendicular(f,n):n,isOriginalDirection:!k};this._helper.hasZ()?k&&(d.cross(n,f,k.direction),d.cross(n,n,f),d.normalize(n,n),
Math.sign(n[1])!==Math.sign(f[0])&&d.scale(n,n,-1)):d.set(n,-f[1],f[0],0);return{start:b,end:l,direction:n,isOriginalDirection:!0}}_passesBisectingAngleThreshold(b,l){b=Math.abs(x.angle(l,b));return b>=u&&b<=Math.PI-u}_bisectVectorsPerpendicular(b,l){b=0>d.dot(b,l)?b:d.negate(m.create(),b);const f=Math.abs(d.dot(b,l));if(!(.001>f||.999<f))return this._bisectDirection(b,l);l=d.cross(m.create(),b,[0,0,1]);return d.normalize(l,l)}_bisectDirection(b,l){b=d.add(m.create(),b,l);return d.normalize(b,b)}_initializePlane(){const b=
this._computeNormalDirection(this._left),l=this._computeNormalDirection(this._right);0>d.dot(b,l)&&d.negate(l,l);r.fromPositionAndNormal(this._left.start,this._bisectDirection(b,l),this._plane)}_computeNormalDirection(b){b=d.cross(m.create(),b.direction,this._edgeDirection);d.normalize(b,b);b=d.cross(m.create(),this._edgeDirection,b);this._planeType===a.PlaneType.XY&&(b[2]=0);return d.normalize(b,b)}_initializeDistanceConstraints(){null==this._left.end||this.requiresSplitEdgeLeft||this._updateDistanceConstraint(r.signedDistance(this._plane,
this._left.end));null==this._right.end||this.requiresSplitEdgeRight||this._updateDistanceConstraint(r.signedDistance(this._plane,this._right.end));this._updateIntersectDistanceConstraint(this._plane)}_updateDistanceConstraint(b){0>=b&&(this._minDistance=Math.max(this._minDistance,b));0<=b&&(this._maxDistance=Math.min(this._maxDistance,b))}_updateIntersectDistanceConstraint(b){var l=r.getNormal(b);const f=this._edgeDirection;var k=d.add(m.create(),this._left.start,this._left.direction);const n=d.add(m.create(),
this._right.start,this._right.direction);var C=this._pointInBasis2D(h.create(),l,f,this._left.start),I=this._pointInBasis2D(h.create(),l,f,k),w=this._pointInBasis2D(h.create(),l,f,this._right.start);l=this._pointInBasis2D(h.create(),l,f,n);[w]=t.intersectLineAndRay({start:I,end:C,type:t.LineType.LINE},{start:l,end:w,type:t.LineType.LINE});w&&(C=g.subtract(h.create(),C,I),g.normalize(C,C),I=g.subtract(h.create(),w,I),I=g.dot(C,I),k=d.add(m.create(),k,d.scale(m.create(),this._left.direction,-I)),b=
r.signedDistance(b,k),this._updateDistanceConstraint(b))}_pointInBasis2D(b,l,f,k){b[0]=x.projectPointSignedLength(l,k);b[1]=x.projectPointSignedLength(f,k);return b}_offset(b,l){Number.isFinite(this._minDistance)&&(l=Math.max(this._minDistance,l));Number.isFinite(this._maxDistance)&&(l=Math.min(this._maxDistance,l));r.copy(this._offsetPlane,this._plane);this._offsetPlane[3]-=l;l=(k,n,C)=>null!=n&&r.intersectLine(this._offsetPlane,k,d.add(m.create(),k,n),C);const f=m.create();(b===this._edge.leftVertex?
l(this._left.start,this._left.direction,f):l(this._right.start,this._right.direction,f))&&this._helper.copy(this._helper.fromXYZ(f,void 0,this._helper.getM(b.pos)),b.pos)}selectArrowFromStartPoint(b){this._selectedArrow=r.isPointInside(this.plane,this._pointToXYZ(b))?1:-1}get selectedArrow(){return this._selectedArrow}signedDistanceToPoint(b){return r.signedDistance(this.plane,this._pointToXYZ(b))}apply(b){this._offset(b,this.distance)}undo(b){this._offset(b,0)}canAccumulate(b){return b instanceof
z&&this._edge.leftVertex.index===b._edge.leftVertex.index&&this._edge.rightVertex.index===b._edge.rightVertex.index&&this._edge.component===b._edge.component&&this._maybeEqualsVec3(this._left.direction,b._left.direction)&&this._maybeEqualsVec3(this._right.direction,b._right.direction)&&d.equals(r.getNormal(this._plane),r.getNormal(b._plane))}accumulate(b,l){this._offset(b,this._plane[3]-l._plane[3]+l.distance)}accumulateParams(b){this.distance=b.distance-b._plane[3]+this._plane[3]}clone(){const b=
new z(this._helper,this._planeType,this._edge,this.distance,p.DEFERRED);r.copy(b._plane,this._plane);r.copy(b._offsetPlane,this._offsetPlane);b._maxDistance=this._maxDistance;b._minDistance=this._minDistance;b._left=this._cloneNeighbor(this._left);b._right=this._cloneNeighbor(this._right);b._edgeDirection=d.copy(m.create(),this._edgeDirection);return b}_maybeEqualsVec3(b,l){return null==b&&null==l||null!=b&&null!=l&&d.equals(b,l)}_cloneNeighbor({start:b,end:l,direction:f,isOriginalDirection:k}){return{start:d.copy(m.create(),
b),end:null!=l?d.copy(m.create(),l):null,direction:d.copy(m.create(),f),isOriginalDirection:k}}}const u=c.deg2rad(15);a.PlaneType=void 0;(function(b){b[b.XYZ=0]="XYZ";b[b.XY=1]="XY"})(a.PlaneType||(a.PlaneType={}));var p;(function(b){b[b.IMMEDIATE=0]="IMMEDIATE";b[b.DEFERRED=1]="DEFERRED"})(p||={});a.OffsetEdgeVertex=z;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/RotateVertex":function(){define(["exports","../../../../core/arrayUtils",
"../../../../core/libs/gl-matrix-2/math/vec2","./UpdateVertices"],function(a,c,g,h){class d{constructor(m,r,x=h.AccumulationType.CUMULATIVE){this.origin=m;this.angle=r;this._accumulationType=x}_rotate(m,r){g.rotate(m.pos,m.pos,this.origin,r)}apply(m){this._rotate(m,this.angle)}undo(m){this._rotate(m,-this.angle)}canAccumulate(m){return m instanceof d&&c.equals(this.origin,m.origin)}accumulate(m,r){this._rotate(m,r._accumulationType===h.AccumulationType.REPLACE?r.angle-this.angle:r.angle)}accumulateParams(m){this.angle=
m._accumulationType===h.AccumulationType.REPLACE?m.angle:this.angle+m.angle}}a.RotateVertex=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/ScaleVertex":function(){define(["exports","../../../../core/arrayUtils","../../../../core/libs/gl-matrix-2/factories/vec2f64","../../../../core/libs/gl-matrix-2/math/vec2","./UpdateVertices"],function(a,c,g,h,d){class m{constructor(r,x,t,z,u=d.AccumulationType.CUMULATIVE){this.origin=r;this.axis1=
x;this.factor1=t;this.factor2=z;this._accumulationType=u;this.axis2=g.fromValues(x[1],-x[0])}_scale(r,x,t){h.projectAndScale(r.pos,r.pos,this.origin,this.axis1,x);h.projectAndScale(r.pos,r.pos,this.origin,this.axis2,t)}apply(r){this._scale(r,this.factor1,this.factor2)}undo(r){this._scale(r,1/this.factor1,1/this.factor2)}canAccumulate(r){return r instanceof m&&c.equals(this.origin,r.origin)&&c.equals(this.axis1,r.axis1)}accumulate(r,x){x._accumulationType===d.AccumulationType.REPLACE?this._scale(r,
x.factor1/this.factor1,x.factor2/this.factor2):this._scale(r,x.factor1,x.factor2)}accumulateParams(r){const x=r._accumulationType===d.AccumulationType.REPLACE;this.factor1=x?r.factor1:this.factor1*r.factor1;this.factor2=x?r.factor2:this.factor2*r.factor2}}a.ScaleVertex=m;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/SetAllVertexPositions":function(){define(["exports"],function(a){class c{constructor(g,h){this._editGeometry=g;this._newPositions=
h}apply(){const g=null==this._originalPositions?"apply":"redo";if(!this._originalPositions){const h=this._editGeometry.coordinateHelper;this._originalPositions=this._editGeometry.allVertices.map(d=>h.clone(d.pos))}this._apply(g,this._newPositions)}undo(){this._originalPositions&&this._apply("undo",this._originalPositions)}accumulate(g){return g instanceof c?(this._newPositions=g._newPositions,this._apply("apply",this._newPositions),!0):!1}_apply(g,h){const d=this._editGeometry.coordinateHelper,m=
this._editGeometry.allVertices;for(let r=0;r<m.length;r++)d.copy(h[r],m[r].pos);this._editGeometry.components.forEach(r=>r.unnormalizeVertexPositions());this._editGeometry.notifyChanges({operation:g,updatedVertices:m})}}a.SetAllVertexPositions=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/operations/UndoGroup":function(){define(["exports"],function(a){const c=Symbol();class g{constructor(d){this._operations=[];this._closed=!1;this[h]=!0;d&&
(this._operations=d,this._closed=!0)}close(){this._closed=!0}apply(){for(const d of this._operations)d.apply()}undo(){for(let d=this._operations.length-1;0<=d;d--)this._operations[d].undo()}accumulate(d){if(this._closed)return!1;const m=this._operations.length?this._operations[this._operations.length-1]:null;m&&m.accumulate(d)||(this._operations.push(d),d.apply());return!0}}var h=c;a.UndoGroup=g;a.isUndoGroup=function(d){return c in d};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},
"esri/views/interactive/snapping/SnappingContext":function(){define(["exports"],function(a){class c{constructor(g){this.drawConstraints=this.selfSnappingZ=this.visualizer=this.excludeFeature=this.vertexHandle=null;this.editGeometryOperations=g.editGeometryOperations;this.elevationInfo=g.elevationInfo;this.pointer=g.pointer;this.vertexHandle=g.vertexHandle;this.excludeFeature=g.excludeFeature;this.feature=g.feature;this.visualizer=g.visualizer;this.selfSnappingZ=g.selfSnappingZ;this.drawConstraints=
g.drawConstraints}get coordinateHelper(){return this.editGeometryOperations.data.coordinateHelper}get spatialReference(){return this.coordinateHelper.spatialReference}}a.SnappingContext=c;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/SnappingDragPipelineStep":function(){define("exports ../../../core/maybe ../../../core/promiseUtils ../../../core/reactiveUtils ../../../layers/graphics/dehydratedFeatureComparison ../../../layers/graphics/hydratedFeatures ../../../support/elevationInfoUtils ../dragEventPipeline ./SnappingContext ../../support/Scheduler".split(" "),
function(a,c,g,h,d,m,r,x,t,z){function u(I,w,y){return g.debounce(async({frameTask:F,point:G,scenePoint:q,context:B,event:e,delta:v,getLastState:A},D)=>{const E=await F.schedule(()=>I.snap({point:G,scenePoint:q,context:B,signal:D}),D);E.valid&&(F=await F.schedule(()=>E.apply(),D),A=A(),null!=A.point&&G!==A.point&&(F=I.update({point:A.point,scenePoint:A.scenePoint,context:B})),null!=A.updatePoint&&d.pointEquals(F,A.updatePoint)||(k(e.mapEnd,F,v,w),y.execute(e)))})}function p(I){return"3d"===I.type?
I.resourceController.scheduler.registerTask(z.TaskPriority.SNAPPING):z.ImmediateTask}function b(I,w,y){return{context:new t.SnappingContext({editGeometryOperations:I.editGeometryOperations,elevationInfo:I.elevationInfo,pointer:I.pointer,vertexHandle:null!=w.info?w.info.handle:null,excludeFeature:I.excludeFeature,feature:I.feature,visualizer:I.visualizer}),originalPos:null!=w.snapOrigin?I.coordinateHelper.vectorToDehydratedPoint(w.snapOrigin):w.mapStart,originalScenePos:null!=w.scenePoints?w.scenePoints.sceneStart:
null,frameTask:y}}function l(I,[w,y,F]){I=m.clonePoint(I);I.x+=w;I.y+=y;I.hasZ&&(I.z+=F);return I}function f(I,w){return[I.x-w.x,I.y-w.y,I.hasZ&&w.hasZ?I.z-w.z:0]}function k(I,w,[y,F,G],q){I.x=w.x+y;I.y=w.y+F;q&&I.hasZ&&w.hasZ&&(I.z=w.z+G)}function n(I,w){if(!I.hasZ())return null;var y=w.vertices;w=null;for(const F of y){y=I.getZ(F.pos);if(null!=w&&null!=y&&1E-6<Math.abs(y-w))return null;null==w&&(w=y)}return w}function C(I){return I}a.createSnapDragEventPipelineStep=function({predicate:I=()=>!0,
snappingManager:w,snappingContext:y,updatingHandles:F,useZ:G=!0}){const q=new x.EventPipeline;if(null==w)return{snappingStep:[C,q],cancelSnapping:C};let B=null,e=null,v,A=null;const D=()=>{B=c.abortMaybe(B);w.doneSnapping();e?.frameTask.remove();e=null;v=c.removeMaybe(v);A=null},E=u(w,G,q);let H=null,J=null,L=null;return{snappingStep:[N=>{if(!I(N))return N;const {action:M}=N;if("start"===M){var {info:K}=N;const U=p(w.view);e=b(y,N,U);e.context.selfSnappingZ=null;G||null==K||(K=n(y.coordinateHelper,
K.handle.component),null!=K&&(e.context.selfSnappingZ={value:K,elevationInfo:y.elevationInfo??r.absoluteHeightElevationInfo}))}if(null!=e){const {context:U,originalScenePos:V,originalPos:ca}=e,{mapEnd:ja,mapStart:la,scenePoints:Q}=N,aa=l(ca,f(ja,la)),na=f(la,ca),ha={...N,action:"update"},da=e.context;var P=null==V||null==Q?null:l(V,f(Q.sceneEnd,Q.sceneStart));L=K=w.update({point:aa,scenePoint:P,context:U});k(ja,K,na,G);H=aa;J=P;if("end"!==M){const {frameTask:ta}=e;null==B&&(B=new AbortController);
A=qa=>{F.addPromise(g.ignoreAbortErrors(E({frameTask:ta,event:ha,context:da,point:aa,scenePoint:P,delta:na,getLastState:()=>({point:H,scenePoint:J,updatePoint:qa.forceUpdate?null:L})},B.signal)))};A({forceUpdate:!1});null==v&&(v=h.watch(()=>w.options.effectiveEnabled,()=>A?.({forceUpdate:!0})))}}"end"===M&&D();return N},q],cancelSnapping:N=>{D();return N}}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/snapping/SnappingOperation":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/maybe ../../../core/promiseUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../support/Scheduler".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.SnappingOperation=class extends g{constructor(p){super(p);this.constrainResult=b=>b;this._stagedPoint=this._abortController=this._frameTask=this._snapPoints=null;this._snap=d.debounce(async(b,l,f,k)=>{const n=this._frameTask;if(null!=n){var C=await n.schedule(()=>l.snap({...b,context:f,signal:k}),k);C.valid&&await n.schedule(()=>{this.stagedPoint=C.apply();b!==this._snapPoints&&null!=this._snapPoints&&(this.stagedPoint=l.update({...this._snapPoints,context:f}))},
k)}})}get stagedPoint(){return this._stagedPoint}set stagedPoint(p){this._stagedPoint=this.constrainResult(p)}initialize(){const p="3d"===this.view.type?this.view?.resourceController?.scheduler:null;this._frameTask=null!=p?p.registerTask(u.TaskPriority.SNAPPING):u.ImmediateTask}destroy(){this._abortController=h.abortMaybe(this._abortController);this._frameTask=h.removeMaybe(this._frameTask)}update(p,b,l){this._snapPoints=p;const {point:f,scenePoint:k}=p;return this.stagedPoint=p=b.update({point:f,
scenePoint:k,context:l})}async snap(p,b,l){const {point:f,scenePoint:k}=p;this.stagedPoint=b.update({point:f,scenePoint:k,context:l});this._snapPoints=p;null==this._abortController&&(this._abortController=new AbortController);return this._snap(p,b,l,this._abortController.signal)}async snapAgainNearPreviousMapPoint(p,b){null!=this._snapPoints&&await this.snap(this._snapPoints,p,b)}abort(){this._abortController=h.abortMaybe(this._abortController);this._snapPoints=null}};c.__decorate([m.property({constructOnly:!0})],
a.SnappingOperation.prototype,"view",void 0);c.__decorate([m.property()],a.SnappingOperation.prototype,"stagedPoint",null);c.__decorate([m.property()],a.SnappingOperation.prototype,"constrainResult",void 0);c.__decorate([m.property()],a.SnappingOperation.prototype,"_stagedPoint",void 0);a.SnappingOperation=c.__decorate([z.subclass("esri.views.interactive.snapping.SnappingOperation")],a.SnappingOperation);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/draw/drawSurfaces":function(){define("exports ../../geometry ../../core/screenUtils ../../layers/graphics/dehydratedPoint ../../layers/graphics/hydratedFeatures ../../support/elevationInfoUtils ../../geometry/SpatialReference ../../geometry/Point".split(" "),
function(a,c,g,h,d,m,r,x){class t{constructor(b,l,f,k=null){this._elevationInfo=b;this.defaultZ=l;this._view=f;this._excludeGraphics=k}screenToMap(b){const {defaultZ:l,_view:f}=this;b=f.sceneIntersectionHelper.intersectElevationFromScreen(g.createScreenPointArray(b.x,b.y),this._elevationInfo,l??0,this._excludeGraphics);null==l&&null!=b&&(b.z=void 0);return b}mapToScreen(b){b=h.makeDehydratedPoint(b.x,b.y,m.getConvertedElevation(this._view,b,this._elevationInfo),b.spatialReference);return this._view.toScreen(b)}constrainZ(b){const {defaultZ:l}=
this;null!=l&&b.z!==l&&(b=d.clonePoint(b),b.z=l);return b}}class z{constructor(b,l,f=[]){this.view=b;this.elevationInfo=l;this.exclude=f}screenToMap(b){b=this.view.toMap(b,{exclude:this.exclude,excludeHud:!0});null!=b&&(b.z=m.getZForElevationMode(b,this.view,this.elevationInfo));return b}mapToScreen(b){let l=b;null!=this.elevationInfo&&(l=h.makeDehydratedPoint(b.x,b.y,m.getConvertedElevation(this.view,b,this.elevationInfo),b.spatialReference));return this.view.toScreen(l)}constrainZ(b){return b}}
class u{constructor(b,l=!1,f=0){this.view=b;this.hasZ=l;this.defaultZ=f;this.mapToScreen=k=>b.toScreen(k);this.screenToMap=l?k=>{k=b.toMap(k);k.z=f;return k}:k=>b.toMap(k)}constrainZ(b){const {defaultZ:l}=this;this.hasZ&&b.z!==l&&(b=d.clonePoint(b),b.z=l);return b}}class p{screenToMap(b){const {x:l,y:f}=b;return new x({x:l,y:f,spatialReference:p.spatialReference})}mapToScreen(b){return g.createScreenPoint(b.x,b.y)}constrainZ(b){return b}}p.spatialReference=new r;a.ElevationDrawSurface=t;a.MapDrawSurface=
u;a.SceneDrawSurface=z;a.ScreenDrawSurface=p;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/move/MoveTool3D":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/arrayUtils ../../../../../core/Collection ../../../../../core/Evented ../../../../../core/handleUtils ../../../../../core/maybe ../../../../../core/quantityUtils ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/has ../../../../../core/Logger ../../../../../core/accessorSupport/decorators/subclass ../../../../../core/support/UpdatingHandles ../../../../../layers/graphics/dehydratedPoint ../../../../../support/elevationInfoUtils ../../SnappingVisualizer3D ../geometryUtils ../isSupportedObjectUtils ../manipulatedObjectUtils ../manipulatorUtils ../meshFastUpdateUtils ../tooltipUtils3D ../visualElementUtils ../manipulations/config ../manipulations/MoveManipulation ../manipulations/moveUtils ../manipulations/MoveXYObjectManipulation ./isSupportedObject ../../visualElements/OutlineVisualElement ../../../../interactive/dragEventPipeline ../../../../interactive/InteractiveToolBase ../../../../interactive/editGeometry/EditGeometryOperations ../../../../interactive/sketch/SketchOptions ../../../../interactive/snapping/SnappingContext ../../../../interactive/snapping/SnappingDragPipelineStep ../../../../interactive/tooltip/Tooltip ../../../../interactive/tooltip/tooltipCommonUtils ../../../../interactive/tooltip/infos/MovePointTooltipInfo ../../../../interactive/tooltip/infos/TranslateTooltipInfo ../../../../interactive/tooltip/infos/TranslateXYTooltipInfo ../../../../interactive/tooltip/infos/TranslateZTooltipInfo ../../../../support/automaticLengthMeasurementUtils ../../../../support/euclideanLengthMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H,J,L,N,M,K,P,U,V,ca,ja,la,Q,aa){function na(ba,R,Z){if(null==R||"end"===R.action)ba.distance=x.zeroMeters;else{var {mapStart:ka,mapEnd:ra}=R;R=Z(ka,ra);ba.distance=null!=R?R:x.zeroMeters}}class ha{constructor(ba){this.objects=ba;this.type="move-start"}}class da{constructor(ba,R,Z){this.dx=ba;this.dy=R;this.objects=Z;this.type="move"}}class ta{constructor(ba){this.objects=ba;this.type="move-stop"}}const qa=Symbol("manipulators"),
fa=Symbol("tooltips");a.MoveTool3D=class extends J.InteractiveToolBase{constructor(ba){super(ba);this._infos=new Map;this.events=new d;this.objects=new h;this.enableZ=!0;this.sketchOptions=new N;this.type="move-3d";this._translateZTooltipInfo=this._translateXYTooltipInfo=this._translateTooltipInfo=this._latestTooltipInfo=null;this._updatingHandles=new l.UpdatingHandles;this._moveManipulation=null}initialize(){var {view:ba}=this;this.tooltip=new P.Tooltip({view:ba});this.addHandles([this.objects.on("change",
R=>{R.removed.forEach(Z=>this.removeHandles(Z));this._updateObjectInfos(R);this._setupFastTransformUpdates(R.added);this._refreshManipulators()}),this.objects.on("change",()=>this._connectTooltips())]);ba=this.objects.toArray();this._updateObjectInfos({added:ba,removed:[]});this._setupFastTransformUpdates(ba);this._refreshManipulators();this._connectTooltips();this.finishToolCreation()}destroy(){this.tooltip=r.destroyMaybe(this.tooltip);this._moveManipulation=r.destroyMaybe(this._moveManipulation);
this._set("view",null);this._updatingHandles.destroy()}onInputEvent(ba){if(!this.destroyed&&!U.enterInputModeIfAvailable(ba,this.tooltip))return super.onInputEvent(ba)}get updating(){return this._updatingHandles.updating}get _shouldShowMovePointTooltip(){var {objects:ba}=this;if(1!==ba.length)return!1;ba=w.manipulatedObjectGeometry(ba.at(0))?.type;return"point"===ba||"mesh"===ba}get activeTooltipInfo(){return this._shouldShowMovePointTooltip?this._movePointTooltipInfo:this._latestTooltipInfo}reset(){}_updateObjectInfos({added:ba,
removed:R}){for(const Z of ba)D.isSupportedObject(Z)===I.SupportedObjectResult.SUPPORTED&&(ba=new oa(Z),this._infos.set(Z,ba));for(const Z of R)this._infos.delete(Z)}_setupFastTransformUpdates(ba){for(const R of ba)ba=this._infos.get(R),this.addHandles(F.meshTransformFastUpdateHandles(ba.object),R)}_refreshManipulators(){this.removeHandles(qa);this._moveManipulation=r.destroyMaybe(this._moveManipulation);this.manipulators.removeAll();if(0!==this._infos.size){var ba=Array.from(this._infos.values());
this._createManipulators(ba);this._createVisualElements(ba);this._updateMoveManipulation(ba)}}_createManipulators(ba){for(const R of ba){const Z=R.object;R.manipulationXY=new A.MoveXYObjectManipulation({tool:this,view:this.view,object:Z});R.manipulationXY.forEachManipulator(ka=>{this.addHandles([ka.events.on("immediate-click",ra=>{this.events.emit("immediate-click",{...ra,object:Z});ra.stopPropagation()}),ka.events.on("grab-changed",({action:ra})=>{"start"===ra?this._showTooltip(e.ManipulationType.XY):
this._hideTooltip()})],qa)});this.addHandles(R.manipulationXY.createDragPipeline((ka,ra,O,W)=>this._buildDragEventPipeline(ba,e.ManipulationType.XY,ka,ra,O,W)),qa)}this._createMoveManipulation(ba)}_createMoveManipulation(ba){const R=new e.MoveManipulation({tool:this,view:this.view,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:1===ba.length?e.MoveManipulation.radiusForSymbol(ba[0].object.graphic?.symbol):B.discRadius});this._moveManipulation=R;R.elevationInfo={mode:"absolute-height",
offset:0};R.forEachManipulator(O=>{this.addHandles(O.events.on("immediate-click",W=>{const X=this.objects.at(0);!R.zManipulation.hasManipulator(O)&&1===this.objects.length&&X&&this.events.emit("immediate-click",{...W,object:X});W.stopPropagation()}),qa)});var Z=O=>W=>{this.addHandles([W.events.on("focus-changed",({action:X})=>{"focus"===X?this._showTooltip(O):this._hideTooltip()}),W.events.on("grab-changed",()=>{this._latestTooltipInfo&&(this._latestTooltipInfo.distance=x.zeroMeters)})],qa)};this._moveManipulation.xyManipulation.forEachManipulator(Z(e.ManipulationType.XY));
this._moveManipulation.xyAxisManipulation.forEachManipulator(Z(e.ManipulationType.XY_AXIS));this._moveManipulation.zManipulation.forEachManipulator(Z(e.ManipulationType.Z));Z=()=>this._updateMoveManipulation(ba);for(const O of ba)this.addHandles([O.object.on("committed",Z),t.watch(()=>O.object.visible,Z)],qa);const ka=ba[ba.length-1];this.addHandles(ka.object.on("committed",()=>this._updateMoveManipulationAngle(ka)),qa);({object:Z}=ka);const {operations:ra}=Z;ra&&this.addHandles(R.createDragPipeline((O,
W,X,Y,ea)=>this._buildDragEventPipeline(ba,O,W,X,Y,ea),Z.elevationInfo,ra.data.spatialReference,Z.graphic),qa);this._updateMoveManipulationAngle(ka)}_createVisualElements(ba){for(const R of ba){const Z=q.createVisualElements({view:this.view,object:R.object,forEachManipulator:ka=>{R.manipulationXY?.forEachManipulator(ka);this._moveManipulation?.forEachManipulator(ka)},onManipulatorsChanged:()=>m.makeHandle()});null!=Z&&(R.geometryRepresentation=Z.visualElement,R.geometryRepresentation instanceof E.OutlineVisualElement&&
this.addHandles([R.geometryRepresentation.events.on("attachment-origin-changed",()=>{R.object.isDraped||this._updateMoveManipulation(ba)}),t.watch(()=>R.object.isDraped,()=>this._updateMoveManipulation(ba))],qa),this.addHandles(Z,qa))}}_updateMoveManipulationAngle(ba){this._moveManipulation&&(this._moveManipulation.angle=C.orientation(w.manipulatedObjectGeometry(ba.object)))}_updateMoveManipulation(ba){const R=f.makeDehydratedPoint(0,0,0,this.view.spatialReference);let Z=0,ka=!1;const ra=this._moveManipulation;
if(ra){for(const O of ba)if(O.object.visible&&(this.enableZ&&y.canMoveZOperations(O.object.operations,O.object.elevationInfo)&&(ka=!0),ba=O.geometryRepresentation instanceof E.OutlineVisualElement&&!O.object.isDraped?O.geometryRepresentation.attachmentOrigin:O.object.origin,null!=ba)){const {x:W,y:X,z:Y}=ba;R.x+=W;R.y+=X;if(Y){let ea;(ea=R).z??(ea.z=0);R.z+=Y}Z++}0<Z?(R.x/=Z,R.y/=Z,R.z??(R.z=0),R.z/=Z,ra.location=R,ra.xyManipulation.available=!0,ra.xyAxisManipulation.available=!0,ra.zManipulation.available=
ka):ra.available=!1}}_buildDragEventPipeline(ba,R,Z,ka,ra,O){const W=[],X=[];let Y=null,ea=null;const ia=()=>{for(const pa of W)pa.dragging=!1;W.length=0;X.length=0;ea=Y=null;this._moveManipulation&&(this._moveManipulation.interactive=!0)};if(1===ba.length&&R===e.ManipulationType.XY){const pa=ba[0].object;({steps:ka,cancel:ra}=this._buildSnappingPipelineSteps(pa,pa.elevationInfo,ka,ra,O))}ra=ra.next(pa=>ea?.(pa)).next(()=>{X.length&&this.events.emit("move-stop",new ta(X));this.destroyed||ia();return null});
ka=ka.next(pa=>{if("start"===pa.action){W.length=0;X.length=0;for(const ua of ba)ua.dragging||!ua.manipulationXY?.hasManipulator(Z)&&ua.manipulationXY?.grabbing||(W.push(ua),X.push(ua.object),ua.dragging=!0);if(0!==X.length&&(this._moveManipulation&&(this._moveManipulation.interactive=!1),Y=H.dragManipulatedObjectMany(X),ea=H.resetManipulatedObjectMany(X),this._emitRecordUndo(),this.events.emit("move-start",new ha(X)),this.destroyed))return null}return 0!==X.length?pa:null}).next(pa=>Y?.(pa)).next(pa=>
{this._updateMoveTooltip(R,pa);return pa}).next(pa=>{switch(pa.action){case "start":case "update":if(pa.translationX||pa.translationY||pa.translationZ){const ua=this.view.toScreen(pa.mapStart);pa=this.view.toScreen(pa.mapEnd);this.events.emit("move",new da(pa.x-ua.x,pa.y-ua.y,X))}break;case "end":this.events.emit("move-stop",new ta(X)),this.destroyed||ia()}return null});return{steps:ka,cancel:ra}}_connectTooltips(){this.removeHandles(fa);let ba;if(this._shouldShowMovePointTooltip){const R=this.objects.at(0),
{events:Z}=this;this._movePointTooltipInfo??(this._movePointTooltipInfo=new V.MovePointTooltipInfo({viewType:this.view.type,sketchOptions:this.sketchOptions}));const ka={onMoveStart:()=>{this._emitRecordUndo();Z.emit("move-start",new ha([R]))},onMove:()=>Z.emit("move",new da(0,0,[R])),onMoveStop:()=>Z.emit("move-stop",new ta([R]))};ba=G.connectTooltipToManipulatedObject(this.tooltip,R,()=>({sketchOptions:this.sketchOptions,activeTooltipInfo:this._movePointTooltipInfo,callbacks:ka}))}else ba=t.watch(()=>
this.sketchOptions.tooltips.effectiveEnabled?this._latestTooltipInfo:null,R=>{this.tooltip.info=R},t.syncAndInitial);this.addHandles(ba,fa)}_showTooltip(ba){this._shouldShowMovePointTooltip||this._updateMoveTooltip(ba)}_hideTooltip(){this._shouldShowMovePointTooltip||(this.tooltip?.clear(),this._latestTooltipInfo=null)}_updateMoveTooltip(ba,R){if(!this._shouldShowMovePointTooltip){var {sketchOptions:Z}=this;switch(ba){case e.ManipulationType.XY:this._latestTooltipInfo=this._translateTooltipInfo??
(this._translateTooltipInfo=new ca.TranslateTooltipInfo({sketchOptions:Z}));na(this._latestTooltipInfo,R,(ka,ra)=>Q.autoDistanceBetweenPoints2D(ka,ra));break;case e.ManipulationType.XY_AXIS:this._latestTooltipInfo=this._translateXYTooltipInfo??(this._translateXYTooltipInfo=new ja.TranslateXYTooltipInfo({sketchOptions:Z}));na(this._latestTooltipInfo,R,(ka,ra)=>x.scale(Q.autoDistanceBetweenPoints2D(ka,ra),v.axisConstrainedDragSign(R)));break;case e.ManipulationType.Z:this._latestTooltipInfo=this._translateZTooltipInfo??
(this._translateZTooltipInfo=new la.TranslateZTooltipInfo({sketchOptions:Z})),na(this._latestTooltipInfo,R,aa.verticalSignedDistanceBetweenPoints)}this._latestTooltipInfo.sketchOptions=Z}}_emitRecordUndo(){const ba=this.objects.toArray().map(R=>R.createUndoRecord?.()).filter(g.isSome);0<ba.length&&this.events.emit("record-undo",{updates:ba})}_buildSnappingPipelineSteps(ba,R,Z,ka,ra){const O=w.manipulatedObjectGeometry(ba);if(null==O||"point"!==O.type&&"mesh"!==O.type)return{steps:Z,cancel:ka};const W=
("point"===O.type?O:O.anchor).clone(),X=new M.SnappingContext({elevationInfo:R,pointer:ra,editGeometryOperations:L.EditGeometryOperations.fromGeometry(W,this.view.state.viewingMode),visualizer:new n.SnappingVisualizer3D,excludeFeature:ba.graphic}),{snappingStep:Y,cancelSnapping:ea}=K.createSnapDragEventPipelineStep({snappingContext:X,snappingManager:this.snappingManager,updatingHandles:this._updatingHandles});ka=ka.next(ea);Z=Z.next(ia=>{W.z=k.getConvertedElevation(this.view,W,ba.elevationInfo,{mode:"absolute-height",
offset:0});const pa=X.coordinateHelper.pointToVector(W);return{...ia,snapOrigin:pa}}).next(...Y);return{steps:Z,cancel:ka}}};c.__decorate([z.property({constructOnly:!0,nonNullable:!0})],a.MoveTool3D.prototype,"view",void 0);c.__decorate([z.property()],a.MoveTool3D.prototype,"objects",void 0);c.__decorate([z.property({constructOnly:!0,nonNullable:!0})],a.MoveTool3D.prototype,"enableZ",void 0);c.__decorate([z.property({constructOnly:!0,type:N})],a.MoveTool3D.prototype,"sketchOptions",void 0);c.__decorate([z.property({constructOnly:!0})],
a.MoveTool3D.prototype,"snappingManager",void 0);c.__decorate([z.property()],a.MoveTool3D.prototype,"type",void 0);c.__decorate([z.property()],a.MoveTool3D.prototype,"updating",null);c.__decorate([z.property()],a.MoveTool3D.prototype,"_latestTooltipInfo",void 0);c.__decorate([z.property()],a.MoveTool3D.prototype,"_shouldShowMovePointTooltip",null);c.__decorate([z.property()],a.MoveTool3D.prototype,"activeTooltipInfo",null);a.MoveTool3D=c.__decorate([b.subclass("esri.views.3d.interactive.editingTools.move.MoveTool3D")],
a.MoveTool3D);class oa{constructor(ba){this.object=ba;this.manipulationXY=this.geometryRepresentation=null;this.dragging=!1}}a.MoveEvent=da;a.MoveStartEvent=ha;a.MoveStopEvent=ta;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/geometryUtils":function(){define(["exports","../../../../core/libs/gl-matrix-2/factories/vec2f64","../../../../core/libs/gl-matrix-2/math/common"],function(a,c,g){function h(d){if(null==d||"polyline"!==d.type&&"polygon"!==
d.type)return 0;var m="polyline"===d.type?d.paths:d.rings;d=g.getEpsilon();for(const r of m)for(m=0;m<r.length-1;m++){const x=r[m],t=r[m+1],z=x[0]-t[0],u=x[1]-t[1];if(z*z+u*u>d)return Math.atan2(t[1]-x[1],t[0]-x[0])}return 0}a.mainAxis=function(d){d=h(d);return c.fromValues(Math.cos(d),Math.sin(d))};a.orientation=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/isSupportedObjectUtils":function(){define(["exports","../../../../core/has"],function(a,
c){a.SupportedObjectResult=void 0;(function(g){g[g.SUPPORTED=0]="SUPPORTED";g[g.GRAPHICS_LAYER_MISSING=1]="GRAPHICS_LAYER_MISSING";g[g.GEOMETRY_MISSING=2]="GEOMETRY_MISSING";g[g.GEOMETRY_TYPE_UNSUPPORTED=3]="GEOMETRY_TYPE_UNSUPPORTED";g[g.ELEVATION_MODE_UNSUPPORTED=4]="ELEVATION_MODE_UNSUPPORTED";g[g.SYMBOL_TYPE_UNSUPPORTED=5]="SYMBOL_TYPE_UNSUPPORTED"})(a.SupportedObjectResult||(a.SupportedObjectResult={}));a.isSupportedObjectResultMessage=function(g){switch(g){case a.SupportedObjectResult.GRAPHICS_LAYER_MISSING:return"not owned by a graphics layer";
case a.SupportedObjectResult.GEOMETRY_MISSING:return"no geometry";case a.SupportedObjectResult.GEOMETRY_TYPE_UNSUPPORTED:return"the geometry type is not supported";case a.SupportedObjectResult.ELEVATION_MODE_UNSUPPORTED:return"the elevation mode is not supported";case a.SupportedObjectResult.SYMBOL_TYPE_UNSUPPORTED:return"the symbol type is not supported"}return""};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulatedObjectUtils":function(){define(["exports"],
function(a){a.manipulatedObjectGeometry=function(c){return c?.operations?.data.geometry};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulatorUtils":function(){define(["exports","../../../../core/handleUtils","../../../../support/elevationInfoUtils"],function(a,c,g){a.canMoveZOperations=function(h,d){return!!h?.data.coordinateHelper.hasZ()&&"on-the-ground"!==d.mode&&!g.hasFeatureExpressionInfo(d)};a.disableDisplayOnGrab=function(h,d){let m=
null;const r=h.events.on("grab-changed",x=>{null!=m&&(m.remove(),m=null);"start"===x.action&&(m=h.disableDisplay());d&&d(x)});return c.makeHandle(()=>{m?.remove();r.remove()})};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/tooltipUtils3D":function(){define("exports ../../../../core/handleUtils ../../../../core/reactiveUtils ./manipulatedObjectUtils ../../../interactive/editGeometry/interfaces ../../../interactive/tooltip/tooltipCommonUtils ../../../support/euclideanLengthMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r){function x(p,b,{callbacks:l}){const f=h.manipulatedObjectGeometry(b);switch(f?.type){case "mesh":t(p,f.origin,b,l);"orientation"in p&&"scale"in p&&m.updateMeshTransformFromTooltipInfo(p,f,l);break;case "point":t(p,f,b,l)}}function t(p,b,l,f){const {dx:k,dy:n,dz:C}=m.getXYZDeltasFromTooltipInfo(p,b);if(0!==k||0!==n||0!==C)f.onMoveStart?.(),l.operations?.move(k,n,C,d.AccumulationBehavior.NEW_STEP),f.onMove?.(k,n,C),f.onMoveStop?.()}function z(p,b){const l=h.manipulatedObjectGeometry(b);
if(p&&l&&("mesh"===l.type||"point"===l.type)){var f="mesh"===l.type,k=f?l.origin:l;p.setLocationFromPoint(k);u(p,k,b);"transform-mesh"===p.type&&f&&m.updateTooltipInfoFromMeshTransform(p,l);p.clearInputValues()}}function u(p,b,l){p.elevation.actual=r.elevationFromPoint(b);p.elevation.visible=!!l.operations?.data.coordinateHelper.hasZ();p.elevation.readOnly=!1;p.elevation.showAsZ=!0}a.connectTooltipToManipulatedObject=function(p,b,l){function f(){const C=l();return{...C,activeTooltipInfo:C.sketchOptions.tooltips.effectiveEnabled?
C.activeTooltipInfo:null}}function k({activeTooltipInfo:C,sketchOptions:I}){n=!0;C&&(C.sketchOptions=I,z(C,b));p.info=C;n=!1}let n=!1;return c.handlesGroup([g.watch(f,k,g.syncAndInitial),g.watch(()=>{const C=f(),{activeTooltipInfo:I}=C;if(I)return{context:C,activeTooltipInfo:I,key:I.key,geometry:h.manipulatedObjectGeometry(b)}},(C,I)=>{C&&!n&&I&&I.key!==C.key&&x(C.activeTooltipInfo,b,C.context)},g.sync),b.on("committed",()=>k(f())),m.connectPasteEvent(p)])};a.updateElevationFromPoint=u;a.updateTooltipInfoFromManipulatedObject=
z;a.updateXYZFromTooltipInfo=t;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/visualElementUtils":function(){define(["exports","./lineObjectVisualElementUtils","./manipulatedObjectUtils","./originGeometryVisualElementUtils"],function(a,c,g,h){a.createVisualElements=function(d){switch(g.manipulatedObjectGeometry(d.object)?.type){case "point":case "mesh":return h.createVisualElements(d);case "polygon":case "polyline":return c.createVisualElements(d);
default:return null}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/lineObjectVisualElementUtils":function(){define("exports ../../../../core/handleUtils ../../../../core/mathUtils ../../../../core/reactiveUtils ../../../../core/signal ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../Manipulator3D ./GrabbingState ./manipulatedObjectUtils ./ManipulatorState ./ManipulatorType ./settings ../visualElements/ExtendedLineVisualElement ../visualElements/LaserlineVisualElement ../visualElements/OutlineVisualElement ../../webgl-engine/lib/Material".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n){function C(G){const {view:q,object:B}=G;G=z.manipulatedObjectGeometry(B);const e=new k.OutlineVisualElement({view:q,geometry:y(G)?G:null,elevationInfo:B.elevationInfo,attached:!1,isDecoration:!0}),v=new b.Settings({getTheme:()=>q.effectiveTheme}),A=c.handlesGroup([h.watch(()=>v.visualElements.lineObjects.outline,D=>D.apply(e),h.initial),h.watch(()=>v.visualElements.lineObjects.shadowStyle,D=>D.apply(e),h.initial),h.watch(()=>B.visible,()=>{e.attached=B.visible}),
h.watch(()=>B.isDraped,D=>{e.isDraped=D},h.initial),B.on("committed",()=>{const D=z.manipulatedObjectGeometry(B);e.geometry=y(D)?D:null}),c.destroyHandle(e)]);e.attached=B.visible;return{visualElement:e,remove:()=>A.remove()}}function I(G,q){const {object:B,view:e}=G,v=[];var A=B.elevationInfo;const D="on-the-ground"===A.mode||!A.offset&&"absolute-height"!==A.mode,E=new u.ManipulatorState,H=new b.Settings({getTheme:()=>e.effectiveTheme}),J=H.visualElements,L=new l.ExtendedLineVisualElement({view:e,
extensionType:J.zVerticalLine.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:n.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0});A=g.deg2rad(J.heightPlaneAngleCutoff);const N=new f.LaserlineVisualElement({view:e,attached:!1,angleCutoff:A,isDecoration:!0}),M=d.signal(1);v.push(h.watch(()=>({lineShadowStyle:H.visualElements.lineObjects.shadowStyle,pointShadowStyle:H.visualElements.pointObjects.shadowStyle,alpha:M.value}),({lineShadowStyle:V,pointShadowStyle:ca,alpha:ja})=>
{V.apply(q,ja);ca.apply(L,ja)},h.initial));const K=d.signal(1);v.push(h.watch(()=>({heightPlane:H.visualElements.heightPlane,alpha:K.value}),({heightPlane:V,alpha:ca})=>V.apply(N,ca),h.initial));const P=()=>{E.update(G);var V=z.manipulatedObjectGeometry(B);B.visible&&(!D||!B.isDraped&&y(V)&&V.hasZ)?(q.laserlineEnabled=!0,M.value=E.grabbingState&t.GrabbingState.XY?J.laserlineAlphaMultiplier:1,K.value=E.grabbingState&t.GrabbingState.Z?J.laserlineAlphaMultiplier:1,V=1===E.numSelected?E.firstSelected:
1<E.numSelected&&null!=E.firstGrabbedXY?E.firstGrabbedXY:null,null!=V?(L.setStartEndFromWorldDownAtLocation(V.renderLocation),L.attached=!0):L.attached=!1,w(G,q,N,E)):(q.laserlineEnabled=!1,L.attached=!1,N.attached=!1)};v.push(h.watch(()=>H.visualElements.zVerticalLine,V=>V.apply(L),h.initial));v.push(B.on("committed",P),h.watch(()=>B.visible,P),q.events.on("attachment-origin-changed",P),c.destroyHandle(L),c.destroyHandle(N));const U=[];A=()=>{c.removeHandles(U);U.length=0;G.forEachManipulator(V=>
U.push(V.events.on("grab-changed",P)));G.forEachManipulator(V=>U.push(V.events.on("select-changed",P)));P()};A();v.push(G.onManipulatorsChanged(A),c.refHandle(()=>c.handlesGroup(U)));return c.handlesGroup(v)}function w(G,q,B,e){if(0<e.numSelected){m.set(F,0,0,0);let v=0;G.forEachManipulator((A,D)=>{D===p.ManipulatorType.TRANSLATE_XY&&A.selected&&A instanceof x.Manipulator3D&&(m.add(F,F,A.renderLocation),v++)});0<v?(B.heightManifoldTarget=m.scale(F,F,1/v),B.attached=!0):B.attached=!1}else q=q.attachmentOrigin,
null!=q&&G.view.renderCoordsHelper.toRenderCoords(q,F)?(B.heightManifoldTarget=F,B.attached=!0):B.attached=!1}function y(G){return null!=G&&("polygon"===G.type||"polyline"===G.type)}const F=r.create();a.createVisualElements=function(G){const {object:q}=G,B=C(G);G=I(G,B.visualElement);const e=[B,G];q.maskOccludee&&e.push(q.maskOccludee());return{visualElement:B.visualElement,remove:()=>c.removeHandles(e)}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/Manipulator3D":function(){define("exports ../../../geometry ../../../core/compilerUtils ../../../core/Evented ../../../core/handleUtils ../../../core/has ../../../core/mathUtils ../../../core/maybe ../../../core/screenUtils ../../../core/libs/gl-matrix-2/math/mat3 ../../../core/libs/gl-matrix-2/factories/mat3f64 ../../../core/libs/gl-matrix-2/math/mat4 ../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../core/libs/gl-matrix-2/math/vec2 ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/ellipsoidUtils ../../../geometry/projection ../../../geometry/projection/localRotationUtils ../../../geometry/projection/projectors ../../../geometry/support/aaBoundingRect ../../../geometry/support/lineSegment ../../../geometry/support/plane ../../../geometry/support/ray ../../../geometry/support/vectorStacks ../../../layers/graphics/hydratedFeatures ../../../support/elevationInfoUtils ../support/ElevationProvider ../support/geometryUtils/ray ../webgl/RenderCamera ../webgl-engine/lib/Object3D ../webgl-engine/lib/UpdatePolicy ../webgl-engine/lib/WebGLLayer ../../interactive/interfaces ../../../geometry/Point".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H,J,L,N,M){function K(R){return 0!==R[12]||0!==R[13]||0!==R[14]}class P{constructor(R){this.metadata=void 0;this._camera=new E;this._elevation={offset:0,override:null};this.collisionType={type:"point"};this.collisionPriority=0;this._renderObjects=[];this._available=this.autoScaleRenderObjects=!0;this._noDisplayCount=0;this._radius=10;this._worldSized=!1;this.focusMultiplier=2;this.touchMultiplier=2.5;this.worldOriented=!1;this._modelTransform=
b.create();this._worldFrame=null;this._renderLocation=k.create();this._renderLocationDirty=!0;this._location=new M({x:0,y:0,z:0});this._elevationAlignedLocation=new M;this.interactive=this._elevationAlignedLocationDirty=!0;this.selectable=!1;this.consumesClicks=this.grabbable=!0;this.grabCursor=this.cursor=null;this._selected=this._hovering=this.dragging=this._grabbing=!1;this._state=N.ManipulatorStateCustomFlags.None;this._focused=!1;this.events=new h.EventEmitter;this._screenLocation={screenPointArray:t.createScreenPointArray(),
renderScreenPointArray:t.createRenderScreenPointArray3(),pixelSize:0};this._screenLocationDirty=!0;this._attached=this._engineResourcesAddedToStage=!1;this._location.spatialReference=R.view.spatialReference;Object.assign(this,R);(R=this.view.state?.camera)&&this._camera.copyFrom(R)}destroy(){this._applyObjectTransform=ba;this._removeResourcesFromStage();this._camera=this.view=this._engineResources=null}get _stage(){return this.view?._stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(R){this._elevationInfo=
R;this._renderLocationDirty=this._elevationAlignedLocationDirty=!0;this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(R){this._removeResourcesFromStage();this._engineResources=null;this._renderObjects=R.slice();this._updateEngineObject()}set available(R){R!==this._available&&(this._available=R,this._updateEngineObject())}get available(){return this._available}disableDisplay(){this._noDisplayCount++;1===this._noDisplayCount&&this._updateEngineObject();return d.makeHandle(()=>
{this._noDisplayCount--;0===this._noDisplayCount&&this._updateEngineObject()})}set radius(R){R!==this._radius&&(this._radius=R,this._updateEngineObject())}get radius(){return this._radius}set worldSized(R){R!==this._worldSized&&(this._worldSized=R,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(R){K(R)&&(this._screenLocationDirty=!0);p.copy(this._modelTransform,R);this._updateEngineObject()}get renderLocation(){if(this._renderLocationDirty)if(this._renderLocationDirty=
!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented){this._worldFrame||(this._worldFrame=b.create());a:{var R=this.view,Z=this._renderLocation,ka=this._worldFrame;switch(R.viewingMode){case "local":p.identity(ka);break a;case "global":R=n.getReferenceEllipsoid(R.renderCoordsHelper.spatialReference),w.sphericalPCPFtoLonLatElevation(Z,0,na,0,R.radius),I.computeENUToSphericalPCPFLocalRotation(r.deg2rad(na[0]),r.deg2rad(na[1]),ka)}}}else this._worldFrame&&
(this._worldFrame=null);return this._renderLocation}set renderLocation(R){this.view.renderCoordsHelper.fromRenderCoords(R,this._location);this.elevationAlignedLocation=this._location}get location(){return this._location}set location(R){e.clonePoint(R,this._location);this._notifyLocationChanged()}_notifyLocationChanged(){this._elevationAlignedLocationDirty=this._screenLocationDirty=this._renderLocationDirty=!0;this._updateEngineObject();this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){if(!this._elevationAlignedLocationDirty)return this._elevationAlignedLocation;
this._evaluateElevationAlignment();this._updateElevationAlignedLocation();return this._elevationAlignedLocation}set elevationAlignedLocation(R){e.clonePoint(R,this._location);this._evaluateElevationAlignment();this._location.z-=this._elevation.offset;this._updateElevationAlignedLocation();this._updateEngineObject();this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const R=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=
this.location.x;this._elevationAlignedLocation.y=this.location.y;this._elevationAlignedLocation.z=R+this._elevation.offset;this._elevationAlignedLocation.spatialReference=e.hydratedSpatialReference(this.location.spatialReference);this._screenLocationDirty=this._renderLocationDirty=!0;this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(R){R!==this._grabbing&&(this._grabbing=R,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(R){R!==
this._hovering&&(this._hovering=R,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(R){R!==this._selected&&(this._selected=R,this._updateEngineObject(),this.events.emit("select-changed",{action:R?"select":"deselect"}))}get state(){return this._state}set state(R){R!==this._state&&(this._state=R,this._updateEngineObject())}updateStateEnabled(R,Z){this.state=Z?this.state|R:this.state&~R}_setFocused(R){R!==this._focused&&(this._focused=
R,this.events.emit("focus-changed",{action:!0===R?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){this._ensureScreenLocation();return this._screenLocation}_ensureScreenLocation(){if(this._screenLocationDirty){this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation);this._screenLocationDirty=!1;if(K(this._modelTransform)){var R=this._calculateModelTransformOffset(fa);R=f.add(R,R,this.renderLocation)}else R=this.renderLocation;this._camera.projectToRenderScreen(R,
this._screenLocation.renderScreenPointArray);this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(R){this._applyObjectTransform=R;this._screenLocationDirty=!0;this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(R,Z){if(!this.available)return null;R=t.screenPointObjectToArray(R,U);var ka=this._getCollisionRadius(Z);Z=-1*this.collisionPriority;
switch(this.collisionType.type){case "point":if(l.squaredDistance(this.screenLocation.screenPointArray,R)<ka*ka)return this.screenLocation.renderScreenPointArray[2]+Z;break;case "line":var ra=this.collisionType.paths,O=this._getWorldToScreenObjectScale();O=this._calculateObjectTransform(O,Q);ka*=this.screenLocation.pixelSize;R=D.fromScreen(this._camera,R,ca);if(null==R)break;for(var W of ra)if(0!==W.length){ra=f.transformMat4(na,W[0],O);for(var X=1;X<W.length;X++){var Y=f.transformMat4(ha,W[X],O),
ea=F.closestRayDistance2(F.fromPoints(ra,Y,V),R);if(null!=ea&&ea<ka*ka)return O=f.add(B.sv3d.get(),ra,Y),f.scale(O,O,.5),R=t.castRenderScreenPointArray(B.sv3d.get()),this._camera.projectToRenderScreen(O,R),R[2]+Z;f.copy(ra,Y)}}break;case "disc":ra=this.collisionType.direction;O=this.collisionType.offset??k.ZEROS;W=this._getWorldToScreenObjectScale();X=this._calculateObjectTransform(W,Q);W=ka*this.screenLocation.pixelSize;R=D.fromScreen(this._camera,R,ca);if(null==R)break;ka=z.fromMat4(ja,X);ka=f.transformMat3(ta,
ra,ka);O=f.transformMat4(qa,O,X);G.fromPositionAndNormal(O,ka,aa);ka=da;if(G.intersectRay(aa,R,ka)&&f.squaredDistance(ka,O)<W*W)return this.screenLocation.renderScreenPointArray[2]+Z;break;case "ribbon":const {paths:ia,direction:pa}=this.collisionType;W=this._getWorldToScreenObjectScale();W=this._calculateObjectTransform(W,Q);ka*=this._camera.computeScreenPixelSizeAt(this.renderLocation);ra=D.fromScreen(this._camera,R,ca);if(null==ra)break;R=z.fromMat4(ja,W);R=f.transformMat3(ta,pa,R);X=this._calculateModelTransformPosition(qa);
G.fromPositionAndNormal(X,R,aa);R=da;if(!G.intersectRay(aa,ra,R))break;for(O of ia)if(0!==O.length)for(ra=f.transformMat4(na,O[0],W),X=1;X<O.length;X++){Y=f.transformMat4(ha,O[X],W);ea=F.distance2(F.fromPoints(ra,Y,V),R);if(null!=ea&&ea<ka*ka)return O=f.add(B.sv3d.get(),ra,Y),f.scale(O,O,.5),R=t.castRenderScreenPointArray(B.sv3d.get()),this._camera.projectToRenderScreen(O,R),R[2]+Z;f.copy(ra,Y)}break;default:g.neverReached(this.collisionType)}return null}attach(R={manipulator3D:{}}){const Z=this._stage;
Z&&(R=R.manipulator3D,null==R.engineLayerId?(this._engineLayer=new L.WebGLLayer(Z,{pickable:!1,updatePolicy:J.UpdatePolicy.SYNC}),R.engineLayerId=this._engineLayer.id):Z?.getObject&&(this._engineLayer=Z.getObject(R.engineLayerId)),R.engineLayerReferences=(R.engineLayerReferences||0)+1,this._materialIdReferences=R.materialIdReferences,null==this._materialIdReferences&&(this._materialIdReferences=new Map,R.materialIdReferences=this._materialIdReferences),this._camera.copyFrom(this.view.state.camera),
this._attached=!0,this._updateEngineObject(),C.canProjectWithoutEngine(this._location.spatialReference,this.view.spatialReference)||(this.location=new M({x:0,y:0,z:0,spatialReference:this.view.spatialReference})))}detach(R={manipulator3D:{}}){R=R.manipulator3D;R.engineLayerReferences--;const Z=0===R.engineLayerReferences;this._removeResourcesFromStage();Z&&(R.engineLayerId=null,x.destroyMaybe(this._engineLayer));this._materialIdReferences=this._engineLayer=this._engineResources=null;this._attached=
!1}onViewChange(){this._camera.copyFrom(this.view.state.camera);this._screenLocationDirty=!0;this._updateEngineObject()}onElevationChange(R){C.projectPoint(this.location,oa,R.spatialReference)&&y.containsPointObject(R.extent,oa)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null!=this.elevationInfo){var R=null,Z=0,ka=v.getElevationOffset(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case "on-the-ground":R=
A.getElevationAtPoint(this.view.elevationProvider,this.location,"ground")??0;break;case "relative-to-ground":Z=(A.getElevationAtPoint(this.view.elevationProvider,this.location,"ground")??0)+ka;break;case "relative-to-scene":Z=(A.getElevationAtPoint(this.view.elevationProvider,this.location,"scene")??0)+ka;break;case "absolute-height":Z=ka}if(Z!==this._elevation.offset||R!==this._elevation.override)this._elevation.offset=Z,this._elevation.override=R}}_updateEngineObject(){if(this._attached)if(this.available){var R=
this._getWorldToScreenObjectScale(),Z=Q;!0===this.autoScaleRenderObjects?(R*=this._getFocusedSize(this._radius,this.focused),this._calculateObjectTransform(R,Z)):this._calculateObjectTransform(R,Z);var {objectsByState:ka}=this._ensureEngineResources();R=(this.focused?N.ManipulatorStateFlags.Focused:N.ManipulatorStateFlags.Unfocused)|(this.selected?N.ManipulatorStateFlags.Selected:N.ManipulatorStateFlags.Unselected);var ra=0<this._noDisplayCount;for(const {stateMask:O,objects:W}of ka)if(ra)for(const X of W)X.visible=
!1;else if(ka=(O&N.ManipulatorStateCustomFlags.All)===N.ManipulatorStateCustomFlags.None||(this.state&O)===(O&N.ManipulatorStateCustomFlags.All),(O&N.ManipulatorStateFlags.All)!==N.ManipulatorStateFlags.None&&(R&O)!==(O&N.ManipulatorStateFlags.All)||!ka)for(const X of W)X.visible=!1;else for(const X of W)X.visible=!0,X.transformation=Z}else this._removeResourcesFromStage()}_ensureEngineResources(){if(null==this._engineResources){const R=this._engineLayer,Z=[],ka=new Set;this.renderObjects.forEach(({geometry:{material:W}})=>
{ka.has(W)||(Z.push(W),ka.add(W))});const ra=new Map;this._renderObjects.forEach(W=>{const X=new H.Object3D({castShadow:!1,geometries:[W.geometry]}),Y=ra.get(W.stateMask)||[];Y.push(X);ra.set(W.stateMask,Y)});const O=[];ra.forEach((W,X)=>O.push({stateMask:X,objects:W}));this._engineResources={objectsByState:O,layer:R,materials:Z}}this._addResourcesToStage();return this._engineResources}_addResourcesToStage(){const R=this._stage;if(!this._engineResourcesAddedToStage&&null!=this._engineResources&&R){var {objectsByState:Z,
layer:ka,materials:ra}=this._engineResources;ra.forEach(O=>{const W=this._materialIdReferences,X=W.get(O.id)||0;0===X&&R.add(O);W.set(O.id,X+1)});Z.forEach(({objects:O})=>{ka.addMany(O);R.addMany(O)});this._engineResourcesAddedToStage=!0}}_removeResourcesFromStage(){const R=this._stage;if(this._engineResourcesAddedToStage&&null!=this._engineResources&&R){var {objectsByState:Z,layer:ka,materials:ra}=this._engineResources;Z.forEach(({objects:O})=>{ka.removeMany(O);R.removeMany(O)});ra.forEach(O=>{const W=
this._materialIdReferences,X=W.get(O.id);1===X?(R.remove(O),W.delete(O.id)):W.set(O.id,X-1)});this._engineResourcesAddedToStage=!1}}_getCollisionRadius(R){return this._getFocusedSize(this.radius,!0)*("touch"===R?this.touchMultiplier:1)}_getFocusedSize(R,Z){return R*(Z?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(R){var Z=this._getWorldToScreenObjectScale();Z=this._calculateObjectTransform(Z,la);return f.set(R,
Z[12],Z[13],Z[14])}_calculateModelTransformOffset(R){const Z=this._calculateModelTransformPosition(R);return f.subtract(R,Z,this.renderLocation)}_calculateObjectTransform(R,Z){p.set(Z,R,0,0,0,0,R,0,0,0,0,R,0,0,0,0,1);this._worldFrame&&p.multiply(Z,Z,this._worldFrame);p.multiply(Z,Z,this._modelTransform);Z[12]+=this.renderLocation[0];Z[13]+=this.renderLocation[1];Z[14]+=this.renderLocation[2];Z[15]=1;null!=this._applyObjectTransform&&this._applyObjectTransform(Z);return Z}get test(){}}const U=t.createScreenPointArray(),
V=F.create(),ca=q.create(),ja=u.create(),la=b.create(),Q=b.create(),aa=G.create(),na=k.create(),ha=k.create(),da=k.create(),ta=k.create(),qa=k.create(),fa=k.create(),oa=new M({x:0,y:0,z:0,spatialReference:null}),ba=()=>{};a.Manipulator3D=P;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/GrabbingState":function(){define(["exports"],function(a){a.GrabbingState=void 0;var c=a.GrabbingState||(a.GrabbingState={});c[c.NONE=0]="NONE";c[c.ANY=1]="ANY";
c[c.Z=2]="Z";c[c.XY=4]="XY";Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/ManipulatorState":function(){define(["exports","../Manipulator3D","./GrabbingState","./ManipulatorType"],function(a,c,g,h){class d{constructor(){this.grabbingState=g.GrabbingState.NONE;this.firstSelected=this.zManipulator=null;this.numSelected=0;this.firstGrabbedXY=null}update(m){this.grabbingState=g.GrabbingState.NONE;this.zManipulator=null;this.numSelected=0;this.firstGrabbedXY=
this.firstSelected=null;m.forEachManipulator((r,x)=>{x===h.ManipulatorType.TRANSLATE_Z&&(this.zManipulator=r);r instanceof c.Manipulator3D&&(r.selected&&(0===this.numSelected&&(this.firstSelected=r),this.numSelected++),null==this.firstGrabbedXY&&r.grabbing&&x===h.ManipulatorType.TRANSLATE_XY&&(this.firstGrabbedXY=r));if(r.grabbing)switch(this.grabbingState|=g.GrabbingState.ANY,x){case h.ManipulatorType.TRANSLATE_Z:this.grabbingState|=g.GrabbingState.Z;break;case h.ManipulatorType.TRANSLATE_XY:this.grabbingState|=
g.GrabbingState.XY}})}}a.ManipulatorState=d;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/ManipulatorType":function(){define(["exports"],function(a){a.ManipulatorType=void 0;var c=a.ManipulatorType||(a.ManipulatorType={});c[c.TRANSLATE_Z=0]="TRANSLATE_Z";c[c.TRANSLATE_XY=1]="TRANSLATE_XY";c[c.SCALE=2]="SCALE";c[c.ROTATE=3]="ROTATE";c[c.SCALE_ROTATE=4]="SCALE_ROTATE";Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/originGeometryVisualElementUtils":function(){define("exports ../../../../core/handleUtils ../../../../core/mathUtils ../../../../core/reactiveUtils ../../../../core/signal ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../geometry/projection/projectPointToVector ../../../../geometry/projection/projectVectorToVector ../../../../geometry/support/aaBoundingBox ../../../../geometry/support/aaBoundingRect ../../../../support/elevationInfoUtils ./GrabbingState ./manipulatedObjectUtils ./ManipulatorState ./settings ../visualElements/ExtendedLineVisualElement ../visualElements/LaserlineVisualElement ../visualElements/PointVisualElement ../../layers/graphics/elevationAlignmentUtils ../../layers/graphics/ElevationContext ../../webgl-engine/lib/Material".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F){function G(H,J,L){const {view:N,object:M}=H,K=new k.Settings({getTheme:()=>N.effectiveTheme}),P=new n.ExtendedLineVisualElement({view:N,extensionType:K.visualElements.zVerticalLine.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:F.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0});J.push(h.watch(()=>K.visualElements.zVerticalLine,da=>da.apply(P),h.initial));const U=new C.LaserlineVisualElement({view:N,intersectsLineInfinite:!0,
attached:!1,isDecoration:!0});var V=g.deg2rad(K.visualElements.heightPlaneAngleCutoff);const ca=new C.LaserlineVisualElement({view:N,attached:!1,angleCutoff:V,isDecoration:!0});V=M.elevationInfo;const ja=y.ElevationContext.fromElevationInfo(V),la="on-the-ground"===V.mode||!V.offset&&"absolute-height"!==V.mode,Q=new f.ManipulatorState,aa=d.signal(1);J.push(h.watch(()=>({heightPlane:K.visualElements.heightPlane,alpha:aa.value}),({heightPlane:da,alpha:ta})=>da.apply(ca,ta),h.initial));const na=d.signal(1);
J.push(h.watch(()=>({shadowStyle:K.visualElements.pointObjects.shadowStyle,alpha:na.value}),({shadowStyle:da,alpha:ta})=>da.apply(U,ta),h.initial));const ha=()=>{Q.update(H);var da=B(l.manipulatedObjectGeometry(M)),ta=la&&(M.isDraped||null==da||!da.hasZ);let qa=!0;if(ta||null==da)qa=!1;else{p.featureExpressionInfoIsZero(M.elevationInfo)&&(da=da.clone(),da.z=0);const fa=w.evaluateElevationAlignmentAtPoint(da,N.elevationProvider,ja,N.renderCoordsHelper);m.set(D,da.x,da.y,fa);t.projectVectorToVector(D,
da.spatialReference,D,N.renderCoordsHelper.spatialReference);P.setStartEndFromWorldDownAtLocation(D);U.intersectsWorldUpAtLocation=D}aa.value=Q.grabbingState&b.GrabbingState.Z?K.visualElements.laserlineAlphaMultiplier:1;da=z.empty(E);!ta&&M.visible&&L.calculateMapBounds(da)&&t.projectVectorToVector(z.getMin(da,D),N.spatialReference,D,N.renderCoordsHelper.spatialReference)?(ca.heightManifoldTarget=D,ca.attached=!0):ca.attached=!1;na.value=Q.grabbingState&b.GrabbingState.XY?K.visualElements.laserlineAlphaMultiplier:
1;ta=qa&&M.visible&&!ta;U.attached=ta;P.attached=ta};J.push(h.watch(()=>[M.visible,M.isDraped],ha),M.on("committed",ha));H.forEachManipulator(da=>{J.push(da.events.on("grab-changed",ha))});J.push(c.destroyHandle(U));J.push(c.destroyHandle(P));J.push(c.destroyHandle(ca));ha()}function q(H,J){const {view:L,object:N}=H,M=new I.PointVisualElement({view:L,geometry:B(l.manipulatedObjectGeometry(N)),elevationInfo:N.elevationInfo,isDecoration:!0});e(H,M,J);J.push(c.destroyHandle(M));return M}function B(H){return null==
H?null:"point"===H.type?H:"mesh"===H.type?H.anchor.clone():null}function e(H,J,L){const {view:N,object:M}=H,K=new k.Settings({getTheme:()=>N.effectiveTheme});v(H,J,L);K.visualElements.pointObjects.outline.apply(J);L.push(h.watch(()=>M.visible,()=>{J.attached=M.visible},h.initial))}function v(H,J,L){const {view:N,object:M}=H;let K=null;const P=U=>{null!=K&&(K.remove(),K=null);M.isDraped&&null!=U&&(K=A(N,U,()=>{J.geometry=U}))};H=()=>{const U=B(l.manipulatedObjectGeometry(M));null!=U&&p.featureExpressionInfoIsZero(M.elevationInfo)&&
(U.z=0);P(U);J.geometry=U};L.push(M.on("committed",H),c.refHandle(()=>K));H()}function A(H,J,L){x.projectPointToVector(J,D,H.elevationProvider.spatialReference);const N=D[0],M=D[1];return H.elevationProvider.on("elevation-change",K=>{u.containsXY(K.extent,N,M)&&L()})}const D=r.create(),E=z.create();a.createVisualElements=function(H){const J=[],L=q(H,J);G(H,J,L);return{visualElement:L,remove:()=>c.removeHandles(J)}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/config":function(){define(["exports"],
function(a){const c=Math.ceil(70/3*2),g=5*Math.PI/12,h=1*Math.PI/3;a.alignArrowsScaleThreshold=1E6;a.discCollisionRadius=80;a.discHeight=.02;a.discRadius=70;a.discRadiusSmall=c;a.discTranslateArrowOffset=100;a.discTranslateArrowSize=54;a.dragThresholdPx=10;a.geometrySegments=128;a.indicatorThickness=9;a.innerIndicatorRadius=190;a.outerIndicatorRadius=213;a.ringHeight=.5;a.ringIndicatorDelayMs=200;a.ringRadius=160;a.ringResetAnimationSpeedFactor=3;a.ringThickness=24;a.rotateIndicatorArcLength=g;a.rotateIndicatorArrowPlacementPercentage=
.2;a.rotateIndicatorArrowTipLength=60;a.rotateIndicatorArrowTipRadius=23;a.rotateIndicatorDirectionBuffer=.3;a.scaleIndicatorArcLength=h;a.scaleIndicatorDirectionBuffer=.2;a.scaleIndicatorOffset1=30;a.scaleIndicatorOffset2=53;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/MoveManipulation":function(){define("exports ../../../../../core/Handles ../../../../../core/handleUtils ../../../../../core/has ../../../../../core/reactiveUtils ../ManipulatorType ./config ./Manipulation ./MoveXYAxisManipulation ./MoveXYDiscManipulation ./MoveZManipulation".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){class p extends x.Manipulation{constructor(b){super();this._handles=new c;this._interactive=!0;const {tool:l,view:f,snapToScene:k,radius:n}=b;this._view=f;this.xyManipulation=new z.MoveXYDiscManipulation({tool:l,view:f,snapToScene:k,radius:n});this.xyAxisManipulation=new t.MoveXYAxisManipulation({tool:l,view:f,radius:n});this.zManipulation=new u.MoveZManipulation({tool:l,view:f,radius:n});this.xyManipulation.available=b.xyAvailable;this.xyAxisManipulation.available=
b.xyAxisAvailable;this.zManipulation.available=b.zAvailable;this._autoHideXYAxis();this.forEachManipulator(C=>this._handles.add(C.events.on("grab-changed",()=>this._updateManipulatorInteractivity())))}destroy(){this._handles.destroy();this.xyManipulation.destroy();this.xyAxisManipulation.destroy();this.zManipulation.destroy()}createManipulatedObjectDragPipeline(b,l,f){return g.handlesGroup([this.xyManipulation.createManipulatedObjectDragPipeline((k,n,C,I,w)=>b(a.ManipulationType.XY,k,n,C,I,w),l,f),
this.xyAxisManipulation.createManipulatedObjectDragPipeline((k,n,C,I,w)=>b(a.ManipulationType.XY_AXIS,k,n,C,I,w),l,f),this.zManipulation.createManipulatedObjectDragPipeline((k,n,C,I,w)=>b(a.ManipulationType.Z,k,n,C,I,w),l,f)])}createDragPipeline(b,l,f,k){return g.handlesGroup([this.xyManipulation.createDragPipeline((n,C,I,w,y)=>b(a.ManipulationType.XY,n,C,I,w,y),l,f,k),this.xyAxisManipulation.createDragPipeline((n,C,I,w,y)=>b(a.ManipulationType.XY_AXIS,n,C,I,w,y),l,f,k),this.zManipulation.createDragPipeline((n,
C,I,w,y)=>b(a.ManipulationType.Z,n,C,I,w,y),f)])}set snapToScene(b){this.xyManipulation.snapToScene=b}set angle(b){this.xyAxisManipulation.angle=b}set interactive(b){this._interactive!==b&&(this._interactive=b,this._updateManipulatorInteractivity())}set radius(b){this.xyAxisManipulation.radius=b;this.xyManipulation.radius=b;this.zManipulation.radius=b}set displayScale(b){this.xyManipulation.displayScale=b;this.xyAxisManipulation.displayScale=b}forEachManipulator(b){this.xyManipulation.forEachManipulator(l=>
b(l,m.ManipulatorType.TRANSLATE_XY));this.xyAxisManipulation.forEachManipulator(l=>b(l,m.ManipulatorType.TRANSLATE_XY));this.zManipulation.forEachManipulator(l=>b(l,m.ManipulatorType.TRANSLATE_Z))}get _xyAxisVisible(){const b=this.xyManipulation.someManipulator(l=>l.focused)||this.xyAxisManipulation.someManipulator(l=>l.focused);return this._view.inputManager&&"touch"===this._view.inputManager.latestPointerType||b}_autoHideXYAxis(){const b=this.xyAxisManipulation;var l=this.xyManipulation;if(!h("esri-mobile")){var f=
[];l.forEachManipulator(k=>f.push(k));b.forEachManipulator(k=>f.push(k));l=()=>{const k=[];this._xyAxisVisible||b.forEachManipulator(n=>k.push(n.disableDisplay()));this._handles.remove("disable-xy-axis-display");this._handles.add(k,"disable-xy-axis-display")};for(const k of f)this._handles.add(k.events.on("focus-changed",l));this._view.inputManager&&this._handles.add(d.when(()=>this._view.inputManager?.latestPointerType,l));l()}}_updateManipulatorInteractivity(){const b=this.grabbing;this.forEachManipulator(l=>
{l.interactive=!b&&this._interactive||l.grabbing})}static radiusForSymbol(b){return(b=null!=b&&"point-3d"===b.type&&b.symbolLayers)&&b.some(l=>"icon"===l.type)?r.discRadiusSmall:r.discRadius}}a.ManipulationType=void 0;(function(b){b[b.XY=0]="XY";b[b.XY_AXIS=1]="XY_AXIS";b[b.Z=2]="Z"})(a.ManipulationType||(a.ManipulationType={}));a.MoveManipulation=p;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/Manipulation":function(){define(["exports",
"../../Manipulator3D"],function(a,c){class g{constructor(){this._available=!0}set location(h){this._forEachManipulator3D(d=>d.location=h)}set elevationAlignedLocation(h){this._forEachManipulator3D(d=>d.elevationAlignedLocation=h)}set elevationInfo(h){this._forEachManipulator3D(d=>d.elevationInfo=h)}get renderLocation(){let h;this._forEachManipulator3D(d=>{h||(h=d.renderLocation)});return h}get available(){return this._available}set available(h){this._available=h;this._forEachManipulator3D(d=>d.available=
h)}get hovering(){return this.someManipulator(h=>h.hovering)}get grabbing(){return this.someManipulator(h=>h.grabbing)}get dragging(){return this.someManipulator(h=>h.dragging)}get selected(){return this.someManipulator(h=>h.selected)}hasManipulator(h){return this.someManipulator(d=>d===h)}someManipulator(h){let d=!1;this.forEachManipulator(m=>{!d&&h(m)&&(d=!0)});return d}_forEachManipulator3D(h){this.forEachManipulator((d,m)=>{d instanceof c.Manipulator3D&&h(d,m)})}}a.Manipulation=g;Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation":function(){define("exports ../../../../../Color ../../../../../core/Evented ../../../../../core/Handles ../../../../../core/handleUtils ../../../../../core/has ../../../../../core/maybe ../../../../../core/reactiveUtils ../../../../../core/libs/gl-matrix-2/math/mat4 ../../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../geometry/support/vectorStacks ../../Manipulator3D ../../RenderObject ../dragEventPipeline3D ../ManipulatorType ./config ./Manipulation ./moveUtils ../../../webgl-engine/lib/basicInterfaces ../../../webgl-engine/lib/GeometryUtil ../../../webgl-engine/lib/Material ../../../webgl-engine/materials/ColorMaterial ../../../../interactive/dragEventPipeline ../../../../interactive/interfaces".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e){class v extends I.Manipulation{constructor(A){super();this._handles=new h;this._arrowManipulatorInfos=[];this._angle=0;this._scale=1;this._radius=C.discRadius;this._updateAfterDrag=!1;this.events=new g;this._tool=A.tool;this._view=A.view;this._opaqueMaterial=this._createMaterial();this._transparentMaterial=this._createMaterial(.5);null!=A.radius&&(this._radius=A.radius);this._createManipulators();this.forEachManipulator(D=>this._tool.manipulators.add(D))}set orthogonalAvailable(A){3<=
this._arrowManipulatorInfos.length&&(this._arrowManipulatorInfos[1].manipulator.available=A,this._arrowManipulatorInfos[3].manipulator.available=A)}destroy(){this._handles=r.destroyMaybe(this._handles);this.forEachManipulator(A=>{this._tool.manipulators.remove(A);A.destroy()});this._view=this._tool=null;this._arrowManipulatorInfos.length=0}forEachManipulator(A){for(const {manipulator:D}of this._arrowManipulatorInfos)A(D,n.ManipulatorType.TRANSLATE_XY)}createManipulatedObjectDragPipeline(A,D,E){if(!D.operations)return d.makeHandle();
const H=D.operations.data.spatialReference,J=D.graphic;return w.createManipulatedMoveDragPipeline(D,E,L=>this.createDragPipeline((N,M,K,P,U)=>{({steps:M,cancel:K}=A(N,M,K,P,U));return L(N,M,K)},D.elevationInfo,H,J))}createDragPipeline(A,D,E,H){return d.handlesGroup(this._arrowManipulatorInfos.map(({manipulator:J},L)=>B.createManipulatorDragEventPipeline(J,(N,M,K,P,U)=>{M=M.next(V=>({...V,manipulatorType:n.ManipulatorType.TRANSLATE_XY})).next(B.dragAtLocation(this._view,N.elevationAlignedLocation)).next(k.screenToMapXYAtLocation(this._view,
N.elevationAlignedLocation,D,E,H)).next(B.constrainToMapAxis(N.location,this.angle+(L+1)*Math.PI*.5)).next(B.addScreenDelta());A(N,M,K,P,U)})))}get angle(){return this._angle}set angle(A){this._angle=A;this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()}get displayScale(){return this._scale}set displayScale(A){this._scale=A;this._updateManipulatorTransform()}get radius(){return this._radius}set radius(A){this._radius!==A&&(this._radius=A,this._updateManipulators())}_updateManipulators(){for(let A=
0;A<this._arrowManipulatorInfos.length;A++)this._updateArrowManipulator(this._arrowManipulatorInfos[A],A);this._updateManipulatorTransform()}_updateArrowManipulator({manipulator:A,transform:D},E){var H=this._radius/C.discRadius,J=C.discTranslateArrowSize*H;const L=J*Math.sqrt(3)/2;J=F.createExtrudedTriangle(this._opaqueMaterial,L,J/2,J/2,C.discHeight);F.transformInPlace(J,t.fromTranslation(b.sm4d.get(),u.set(b.sv3d.get(),0,-L/3,0)));A.renderObjects=[new f.RenderObject(J,e.ManipulatorStateFlags.Focused),
new f.RenderObject(J.instantiate({material:this._transparentMaterial}),e.ManipulatorStateFlags.Unfocused)];A.radius=L/3*2.4;A=t.fromZRotation(b.sm4d.get(),E*Math.PI/2);H=t.fromTranslation(b.sm4d.get(),u.set(b.sv3d.get(),0,C.discTranslateArrowOffset*H,0));t.multiply(D,A,H)}_createManipulators(){for(let A=0;4>A;A++){const D=this._createArrowManipulator(A);this._arrowManipulatorInfos.push(D)}this._updateManipulatorTransform()}_updateManipulatorTransform(){var A=this.angle;A=t.fromRotation(b.sm4d.get(),
A,p.fromValues(0,0,1));if(null!=A){var D=t.fromScaling(b.sm4d.get(),u.set(b.sv3d.get(),this.displayScale,this.displayScale,this.displayScale));A=t.multiply(b.sm4d.get(),D,A);for(const E of this._arrowManipulatorInfos)D=t.multiply(b.sm4d.get(),A,E.transform),E.manipulator.modelTransform=D}}_createArrowManipulator(A){const D=new l.Manipulator3D({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:p.fromValues(0,0,1)}}),
E={manipulator:D,transform:z.create()};this._updateArrowManipulator(E,A);this._handles.add(D.events.on("drag",H=>{this._updateAfterDrag&&"end"===H.action&&!this.dragging&&(this._updateManipulatorTransform(),this._updateAfterDrag=!1)}));return E}_createMaterial(A=1){const D=new q.ColorMaterial({cullFace:y.CullFaceOptions.Back,renderOccluded:G.RenderOccludedFlag.Transparent,isDecoration:!0});this._handles.add(x.watch(()=>c.toUnitRGBA(this._view.effectiveTheme.accentColor),E=>{E[3]*=A;D.setParameters({color:E})},
x.initial));return D}get test(){}}a.MoveXYAxisManipulation=v;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/RenderObject":function(){define(["exports","../../interactive/interfaces"],function(a,c){class g{constructor(h,d=c.ManipulatorStateFlags.None){this.geometry=h;this.stateMask=d}}a.RenderObject=g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/dragEventPipeline3D":function(){define("exports ../../../../geometry ../../../../core/screenUtils ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../geometry/projection ../../../../geometry/support/plane ../../../../geometry/support/ray ../../../../geometry/support/vector ../../../../geometry/support/vectorStacks ../../../../support/elevationInfoUtils ../../support/geometryUtils/ray ../../webgl-engine/lib/Intersector ../../webgl-engine/lib/IntersectorInterfaces ../../webgl-engine/lib/verticalOffsetUtils ../../../interactive/dragEventPipeline ../../../../geometry/Point".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n){function C(A,D){return I(A,()=>D)}function I(A,D){const E=d.create(),H=d.create();let J=!1;return L=>{const N=D(L);if("start"===L.action){var M=g.screenPointObjectToArray(L.screenStart,g.castScreenPointArray(z.sv2d.get()));M=p.fromScreen(A.state.camera,M,v);null!=M&&(J=r.intersectRay(N,M,E))}if(!J)return null;M=g.screenPointObjectToArray(L.screenEnd,g.castScreenPointArray(z.sv2d.get()));M=p.fromScreen(A.state.camera,M,v);return null==M?null:r.intersectRay(N,
M,H)?{...L,renderStart:E,renderEnd:H,plane:N,ray:M}:null}}function w(A,D,E=0,H=null,J=null){let L=null;return N=>{if("start"===N.action&&(L=A.sceneIntersectionHelper.intersectElevationFromScreen(g.createScreenPointArray(N.screenStart.x,N.screenStart.y),D,E,J),null!=L&&null!=H&&!m.projectPoint(L,L,H))||null==L)return null;const M=A.sceneIntersectionHelper.intersectElevationFromScreen(g.createScreenPointArray(N.screenEnd.x,N.screenEnd.y),D,E,J);return null!=M?null==H||m.projectPoint(M,M,H)?{...N,mapStart:L,
mapEnd:M}:null:null}}function y(A,D,E,H=null,J=null){D=u.getZForElevationMode(D,A,E);return w(A,E,D,H,J)}function F(A,D){const E=B,H=e,J=r.create();A.renderCoordsHelper.worldUpAtPosition(D,E);A=h.cross(r.getNormal(J),E,h.subtract(H,D,A.state.camera.eye));h.cross(A,A,E);return r.fromPositionAndNormal(D,A,J)}function G(A,D){const E=d.create(),H=h.length(D);A.renderCoordsHelper.worldUpAtPosition(D,E);const J=d.create(),L=d.create(),N=M=>{h.subtract(M,M,D);t.projectPoint(E,M,M);"global"===A.viewingMode&&
h.length(M)*Math.sign(h.dot(E,M))<-H+.001&&h.subtract(M,h.scale(M,E,.001),D);h.add(M,M,D);return M};return M=>{M.renderStart=N(h.copy(J,M.renderStart));M.renderEnd=N(h.copy(L,M.renderEnd));return M}}function q(A,D){const E=A.renderCoordsHelper;return H=>{const J=E.fromRenderCoords(H.renderStart,new n({spatialReference:D})),L=E.fromRenderCoords(H.renderEnd,new n({spatialReference:D}));return null!=J&&null!=L?{...H,mapStart:J,mapEnd:L}:null}}a.SurfaceType=void 0;(function(A){A[A.GROUND=0]="GROUND";
A[A.OTHER=1]="OTHER"})(a.SurfaceType||(a.SurfaceType={}));const B=d.create(),e=d.create(),v=x.create();a.convertToMapCoordinates=q;a.hideManipulatorWhileDragging=function(A){let D=null;return E=>{switch(E.action){case "start":D=A.disableDisplay();break;case "end":case "cancel":null!=D&&(D.remove(),D=null)}return E}};a.projectToWorldUp=G;a.screenToMap3D=function(A,D=null){const E=b.newIntersector(A.state.viewingMode);E.options.selectionMode=!0;E.options.store=l.StoreResults.MIN;E.options.hud=!1;const H=
g.createScreenPointArray(),J={requiresGroundFeedback:!0,enableDraped:!0,exclude:new Set},L=d.create(),N=D??A.spatialReference,M=P=>{A.map.ground&&1>A.map.ground.opacity?J.exclude.add(f.terrainId):J.exclude.delete(f.terrainId);A.sceneIntersectionHelper.intersectIntersectorScreen(g.screenPointObjectToArray(P,H),E,J);P=E.results.min;if(P.getIntersectionPoint(L))P=P.intersector===l.IntersectorType.TERRAIN?a.SurfaceType.GROUND:a.SurfaceType.OTHER;else if(E.results.ground.getIntersectionPoint(L))P=a.SurfaceType.GROUND;
else return null;return{location:A.renderCoordsHelper.fromRenderCoords(L,new n({spatialReference:N})),surfaceType:P}};let K;return P=>{if("start"===P.action){var U=M(P.screenStart);K=null!=U?U.location:null}if(null==K)return null;U=M(P.screenEnd);return null!=U?.location?{...P,mapStart:K,mapEnd:U.location,surfaceType:U.surfaceType}:null}};a.screenToMapXYAtLocation=y;a.screenToMapXYForManipulatedObject=function(A,D,E,H){A=E.toMap(A.screenStart);return null!=A?y(D,A,E.elevationInfo,H):null};a.screenToRenderPlane=
C;a.screenToRenderPlaneFromEvent=function(A){return I(A,D=>D.plane)};a.screenToRenderRay=function(A,D){const E=H=>{H=g.screenPointObjectToArray(H,g.castScreenPointArray(z.sv2d.get()));H=p.fromScreen(A.state.camera,H,v);return null==H?null:x.closestPoints(D,H,B,e)[1]};return H=>{const J=E(H.screenStart);if(null==J)return null;const L=E(H.screenEnd);return null==L?null:{...H,renderStart:J,renderEnd:L}}};a.screenToZConstrained=function(A,D,E){let H=null;const J=new k.EventPipeline;J.next(C(A,F(A,D))).next(G(A,
D)).next(q(A,E)).next(L=>{L.mapEnd.x=L.mapStart.x;L.mapEnd.y=L.mapStart.y;H=L});return L=>{H=null;J.execute(L);return H}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/moveUtils":function(){define(["exports","../../../../interactive/dragEventPipeline"],function(a,c){a.axisConstrainedDragSign=function(g){if(null==g?.axis)return 1;const {mapStart:h,mapEnd:d,axis:m}=g;g=[d.x-h.x,d.y-h.y];return 0<g[0]*m[0]+g[1]*m[1]?1:-1};a.createManipulatedMoveDragPipeline=
function(g,h,d){const m=(r,x)=>{h({action:r,object:g,dxScreen:x.screenDeltaX,dyScreen:x.screenDeltaY})};return d((r,x,t)=>{x.next(z=>{"start"===z.action&&m("start",z);return z}).next(c.dragManipulatedObject(g)).next(z=>{switch(z.action){case "start":case "update":(z.translationX||z.translationY||z.translationZ)&&m("update",z);break;case "end":m("end",z)}return z});t=t.next(c.resetManipulatedObject(g)).next(z=>{m("end",{screenDeltaX:0,screenDeltaY:0});return z});return{steps:x,cancel:t}})};Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation":function(){define("exports ../../../../../Color ../../../../../core/Handles ../../../../../core/handleUtils ../../../../../core/has ../../../../../core/maybe ../../../../../core/reactiveUtils ../../../../../core/libs/gl-matrix-2/math/mat4 ../../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../geometry/support/vectorStacks ../../Manipulator3D ../../RenderObject ../dragEventPipeline3D ../ManipulatorType ./config ./Manipulation ./moveUtils ../snapping/SnapToScene ../../../webgl-engine/lib/basicInterfaces ../../../webgl-engine/lib/GeometryUtil ../../../webgl-engine/lib/Material ../../../webgl-engine/materials/ColorMaterial ../../../../interactive/dragEventPipeline ../../../../interactive/interfaces".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e){class v extends C.Manipulation{constructor(A){super();this._handles=new g;this._snapToScene=new w.SnapToScene;this._scale=1;this._radius=n.discRadius;this._view=A.view;this._tool=A.tool;this._discMaterial=this._createMaterial();this._discMaterialTransparent=this._createMaterial(.5);null!=A.snapToScene&&(this.snapToScene=A.snapToScene);null!=A.radius&&(this._radius=A.radius);this._createManipulator();this.forEachManipulator(D=>this._tool.manipulators.add(D))}destroy(){this._handles=
m.destroyMaybe(this._handles);this.forEachManipulator(A=>{this._tool.manipulators.remove(A);A.destroy()});this._manipulator=this._view=this._tool=null}forEachManipulator(A){A(this._manipulator,k.ManipulatorType.TRANSLATE_XY)}get displayScale(){return this._scale}set displayScale(A){this._scale=A;this._updateManipulatorTransform()}get snapToScene(){return this._snapToScene.enabled}set snapToScene(A){this._snapToScene.enabled=A}get radius(){return this._radius}set radius(A){A!==this._radius&&(this._radius=
A,this._updateManipulator())}get discManipulator(){return this._manipulator}createManipulatedObjectDragPipeline(A,D,E){if(!D.operations)return h.makeHandle();const H=D.graphic,J=D.elevationInfo,L=D.operations.data.spatialReference;return I.createManipulatedMoveDragPipeline(D,E,N=>this.createDragPipeline((M,K,P,U,V)=>{({steps:K,cancel:P}=A(M,K,P,U,V));return N(M,K,P)},J,L,H))}createDragPipeline(A,D,E,H){const J=this._view;return B.createManipulatorDragEventPipeline(this._manipulator,(L,N,M,K,P)=>{N=
N.next(B.dragAtLocation(J,L.elevationAlignedLocation)).next(f.screenToMapXYAtLocation(J,L.elevationAlignedLocation,D,E,H)).next(...this._snapToScene.createDragEventPipelineStep(J,D)).next(U=>({...U,manipulatorType:k.ManipulatorType.TRANSLATE_XY})).next(B.addScreenDelta());A(L,N,M,K,P)})}_updateManipulatorTransform(){const A=x.fromScaling(p.sm4d.get(),z.set(p.sv3d.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=A}_createManipulator(){this._manipulator=
new b.Manipulator3D({view:this._view,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:"disc",direction:u.fromValues(0,0,1)},worldOriented:!0});this._updateManipulator()}_updateManipulator(){const A=F.createCylinderGeometry(this._discMaterial,n.discHeight,1,n.geometrySegments,u.fromValues(0,0,1),u.fromValues(0,0,0));A.transformation=x.fromScaling(t.create(),u.fromValues(this._radius,this._radius,this._radius));this._manipulator.renderObjects=[new l.RenderObject(A,
e.ManipulatorStateFlags.Focused),new l.RenderObject(A.instantiate({material:this._discMaterialTransparent}),e.ManipulatorStateFlags.Unfocused)];this._manipulator.radius=this._radius/n.discRadius*n.discCollisionRadius}_createMaterial(A=1){const D=new q.ColorMaterial({cullFace:y.CullFaceOptions.Back,renderOccluded:G.RenderOccludedFlag.Transparent,isDecoration:!0});this._handles.add(r.watch(()=>c.toUnitRGBA(this._view.effectiveTheme.accentColor),E=>{E[3]*=A;D.setParameters({color:E})},r.initial));return D}get test(){}}
a.MoveXYDiscManipulation=v;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/snapping/SnapToScene":function(){define(["exports","../../../../../support/elevationInfoUtils","../../../../interactive/dragEventPipeline"],function(a,c,g){class h{constructor(){this._next=this._lastDragEvent=this._elevationInfo=this._view=null;this._enabled=!1}get enabled(){return this._enabled}set enabled(d){if(this._enabled!==d&&null!=this._lastDragEvent&&null!=this._next){const m=
this._lastDragEvent.mapEnd,r=this._snap(this._lastDragEvent.screenEnd);null!=r&&this._next.execute({action:"update",mapStart:this._lastDragEvent.mapStart,mapEnd:!0===d?r:m,screenStart:this._lastDragEvent.screenEnd,screenEnd:this._lastDragEvent.screenEnd})}this._enabled=d}_snap(d){d=null!=this._view?this._view.toMap(d,{exclude:[]}):null;null!=d&&null!=this._view&&(d.z=c.getZForElevationMode(d,this._view,this._elevationInfo));return d}createDragEventPipelineStep(d,m){this._view=d;this._elevationInfo=
m;this._lastDragEvent=null;this._next=d=new g.EventPipeline;return[r=>{this._lastDragEvent="end"!==r.action?{...r}:null;if(this._enabled){const x=this._snap(r.screenEnd);return null!=x?{action:r.action,mapStart:r.mapStart,mapEnd:x,screenStart:r.screenStart,screenEnd:r.screenEnd}:null}return{action:r.action,mapStart:r.mapStart,mapEnd:r.mapEnd,screenStart:r.screenStart,screenEnd:r.screenEnd}},d]}}a.SnapToScene=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/MoveZManipulation":function(){define("exports ../../../../../Color ../../../../../core/colorUtils ../../../../../core/Evented ../../../../../core/handleUtils ../../../../../core/has ../../../../../core/mathUtils ../../../../../core/maybe ../../../../../core/reactiveUtils ../../../../../core/libs/gl-matrix-2/math/mat4 ../../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../Manipulator3D ../../manipulatorUtils ../../RenderObject ../dragEventPipeline3D ../ManipulatorType ../settings ./config ./Manipulation ./moveUtils ../../../webgl-engine/lib/GeometryUtil ../../../webgl-engine/lib/Material ../../../../interactive/dragEventPipeline ../../../../interactive/interfaces".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e){function v(L,N,M){L=g.darken(L,M);L.a*=N;return c.toUnitRGBA(L)}class A extends y.Manipulation{constructor(L){super();this._radius=w.discRadius;this.events=new h;this._tool=L.tool;this._view=L.view;const N=new I.Settings({getTheme:()=>this._view.effectiveTheme});this._settings=N;null!=L.radius&&(this._radius=L.radius);L=this._view.effectiveTheme.accentColor;this._materials={materialUnfocused:f.createManipulatorMaterial(v(L,1,.25),q.RenderOccludedFlag.Occlude),
materialFocused:f.createManipulatorMaterial(v(L,1,0),q.RenderOccludedFlag.Occlude),materialOccludedUnfocused:f.createManipulatorMaterial(v(L,.7,0),N.zManipulator.renderOccluded),materialOccludedFocused:f.createManipulatorMaterial(v(L,.85,0),N.zManipulator.renderOccluded)};this._themeHandle=t.watch(()=>this._view.effectiveTheme.accentColor,M=>{const K=v(M,1,.25),P=v(M,1,0),U=v(M,.7,0);M=v(M,.85,0);const {materialUnfocused:V,materialFocused:ca,materialOccludedUnfocused:ja,materialOccludedFocused:la}=
this._materials;V.setParameters({color:K});ca.setParameters({color:P});ja.setParameters({color:U});la.setParameters({color:M})});this._createManipulator();this.forEachManipulator(M=>this._tool.manipulators.add(M))}destroy(){this._themeHandle=x.removeMaybe(this._themeHandle);this._manipulator.applyObjectTransform=J;this.forEachManipulator(L=>{this._tool.manipulators.remove(L);L.destroy()})}forEachManipulator(L){L(this._manipulator,C.ManipulatorType.TRANSLATE_Z)}createManipulatedObjectDragPipeline(L,
N,M){if(!N.operations)return d.makeHandle();const K=N.operations.data.spatialReference;return F.createManipulatedMoveDragPipeline(N,M,P=>this.createDragPipeline((U,V,ca,ja,la)=>{({steps:V,cancel:ca}=L(U,V,ca,ja,la));return P(U,V,ca)},K))}createDragPipeline(L,N){const M=this._view;return B.createManipulatorDragEventPipeline(this._manipulator,(K,P,U,V,ca)=>{P=P.next(ja=>({...ja,manipulatorType:C.ManipulatorType.TRANSLATE_Z})).next(n.screenToZConstrained(M,K.renderLocation,N)).next(B.addScreenDelta());
L(K,P,U,V,ca)})}get radius(){return this._radius}set radius(L){L!==this._radius&&(this._radius=L,this._updateManipulator())}_updateManipulator(){var L=this._settings,N=this._radius/w.discRadius,M=L.zManipulator.height*N,K=L.zManipulator.coneHeight*N;const P=L.zManipulator.coneWidth*N;L=L.zManipulator.width*N;const U=[b.fromValues(0,0,0),b.fromValues(0,0,M)];N=[b.fromValues(0,0,0),b.fromValues(0,0,M+K)];const V=u.create();z.translate(V,V,[0,0,M]);z.rotateX(V,V,Math.PI/2);const {materialUnfocused:ca,
materialFocused:ja,materialOccludedUnfocused:la,materialOccludedFocused:Q}=this._materials;M=G.createTubeGeometry(ca,U,L/2,16,!1);K=G.createConeGeometry(ca,K,P/2,16,!1);K.transformation=V;this._manipulator.renderObjects=[new k.RenderObject(K,e.ManipulatorStateFlags.Unfocused),new k.RenderObject(M,e.ManipulatorStateFlags.Unfocused),new k.RenderObject(K.instantiate({material:ja}),e.ManipulatorStateFlags.Focused),new k.RenderObject(M.instantiate({material:ja}),e.ManipulatorStateFlags.Focused),new k.RenderObject(K.instantiate({material:la}),
e.ManipulatorStateFlags.Unfocused),new k.RenderObject(M.instantiate({material:la}),e.ManipulatorStateFlags.Unfocused),new k.RenderObject(K.instantiate({material:Q}),e.ManipulatorStateFlags.Focused),new k.RenderObject(M.instantiate({material:Q}),e.ManipulatorStateFlags.Focused)];this._manipulator.radius=L/2+2;this._manipulator.collisionType={type:"line",paths:[N]}}_createManipulator(){const L=this._view,N=new l.Manipulator3D({view:L,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:"ns-resize",
elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});N.applyObjectTransform=M=>{var K=L.state.camera,P=D;L.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,P);const U=p.dist(K.eye,P),V=K.computeRenderPixelSizeAtDist(U);var ca=p.subtract(E,P,K.eye);p.normalize(ca,ca);var ja=H;L.renderCoordsHelper.worldUpAtPosition(D,ja);P=Math.abs(p.dot(ca,ja));ca=p.cross(E,ca,ja);ja=p.cross(E,ca,ja);P=r.clamp(P,.01,1);K=1-Math.sqrt(1-P*P)/P/K.fullWidth;P=this._radius/
w.discRadius*this._settings.zManipulator.width;p.scale(ja,p.normalize(ja,ja),(1/K-1)*U+V*P);M[12]-=E[0];M[13]-=E[1];M[14]-=E[2]};this._manipulator=N;this._updateManipulator()}get test(){}}const D=b.create(),E=b.create(),H=b.create(),J=()=>{};a.MoveZManipulation=A;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/manipulatorUtils":function(){define("exports ../../../core/colorUtils ../../../core/libs/gl-matrix-2/math/mat4 ../../../chunks/vec32 ../../../geometry/support/vectorStacks ../../../layers/graphics/hydratedFeatures ./editingTools/manipulatedObjectUtils ../layers/graphics/graphicUtils ../webgl-engine/lib/basicInterfaces ../webgl-engine/lib/Material ../webgl-engine/materials/ColorMaterial ../webgl-engine/materials/ShadedColorMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p){function b(k,n,C,I){k=h.normalize(d.sv3d.get(),k);n=h.normalize(d.sv3d.get(),n);const w=h.cross(d.sv3d.get(),k,n);I[0]=k[0];I[1]=k[1];I[2]=k[2];I[3]=0;I[4]=n[0];I[5]=n[1];I[6]=n[2];I[7]=0;I[8]=w[0];I[9]=w[1];I[10]=w[2];I[11]=0;I[12]=C[0];I[13]=C[1];I[14]=C[2];I[15]=1;return I}const l=Object.freeze({calloutLength:40,calloutWidth:1,discRadius:27,focusMultiplier:1.1}),f=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0});a.calculateInputRotationTransform=function(k,
n,C,I){k=h.subtract(d.sv3d.get(),k,C);I=h.cross(d.sv3d.get(),I,k);C=b(k,I,C,d.sm4d.get());g.invert(C,C);n=h.transformMat4(d.sv3d.get(),n,C);return Math.atan2(n[1],n[0])};a.calculateTranslateRotateFromBases=b;a.createManipulatorMaterial=function(k,n=z.RenderOccludedFlag.OccludeAndTransparent,C=!0){const I=c.colorVectorToColorAndOpacity(k);k=!(1>k[3]);return C?new p.ShadedColorMaterial({color:I,writeDepth:k,cullFace:t.CullFaceOptions.Back,renderOccluded:n,isDecoration:!0}):new u.ColorMaterial({color:I,
writeDepth:k,cullFace:t.CullFaceOptions.Back,renderOccluded:n,isDecoration:!0})};a.createManipulatorOutlineMaterial=function(k,n=z.RenderOccludedFlag.OccludeAndTransparent){k=c.colorVectorToColorAndOpacity(k);return new u.ColorMaterial({color:k,writeDepth:!0,cullFace:t.CullFaceOptions.Front,renderOccluded:n,isDecoration:!0})};a.getGraphicAttachmentOrigin=function(k,n){const C=k.getViewForGraphic(n);return null!=C&&"computeAttachmentOrigin"in C?C.computeAttachmentOrigin(n,k.spatialReference):null};
a.placeAtObject=function(k,n){const C=n.origin;null!=C?k.elevationAlignedLocation=C:(n=r.manipulatedObjectGeometry(n),null!=n&&(n="mesh"===n.type?n.anchor:x.computeCentroid(n),null!=n&&(k.location=m.hydrateGeometry(n))))};a.rotateManipulatorDefaults=l;a.worldScaledManipulatorSettings=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/manipulations/MoveXYObjectManipulation":function(){define("exports ../../../../../core/handleUtils ../dragEventPipeline3D ../ManipulatorType ./Manipulation ./moveUtils ../../../../interactive/dragEventPipeline".split(" "),
function(a,c,g,h,d,m,r){class x extends d.Manipulation{constructor(t){super();this._view=t.view;this._tool=t.tool;this._object=t.object;this._manipulator=this._object.createManipulator?.({selectable:!0,cursor:"move"});this.forEachManipulator(z=>this._tool.manipulators.add(z))}destroy(){this.forEachManipulator(t=>{this._tool.manipulators.remove(t);t.destroy()});this._manipulator=this._view=this._tool=null}forEachManipulator(t){this._manipulator&&t(this._manipulator,h.ManipulatorType.TRANSLATE_XY)}createManipulatedObjectDragPipeline(t){return m.createManipulatedMoveDragPipeline(this._object,
t,z=>this.createDragPipeline(z))}createDragPipeline(t){if(!this._manipulator)return c.makeHandle();const z=this._view;return r.createManipulatorDragEventPipeline(this._manipulator,(u,p,b,l,f)=>{const k=this._object.operations?.data.spatialReference;p=p.next(n=>k?n:null).next(g.screenToMapXYForManipulatedObject(f,z,this._object,k)).next(r.addMapDelta()).next(r.addScreenDelta());t(u,p,b,l,f)})}}a.MoveXYObjectManipulation=x;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/move/isSupportedObject":function(){define(["exports",
"../../../../../core/has","../../../../../support/elevationInfoUtils","../isSupportedObjectUtils"],function(a,c,g,h){a.isSupportedObject=function(d){if(d.graphic&&"graphics"!==d.graphic.layer?.type)return h.SupportedObjectResult.GRAPHICS_LAYER_MISSING;const m=d.operations?.data.type;if(!m)return h.SupportedObjectResult.GEOMETRY_TYPE_UNSUPPORTED;switch(m){case "polygon":case "point":case "polyline":case "mesh":break;default:return h.SupportedObjectResult.GEOMETRY_TYPE_UNSUPPORTED}return g.hasEffectiveFeatureExpressionInfo(d.elevationInfo)?
h.SupportedObjectResult.ELEVATION_MODE_UNSUPPORTED:h.SupportedObjectResult.SUPPORTED};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/MovePointTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),
function(a,c,g,h,d,m,r,x,t){a.MovePointTooltipInfo=class extends t.TooltipInfoWithCoordinates(x.SketchTooltipInfo){constructor(z){super(z);this.type="move-point";this.allFields.forEach(u=>{u.lockable=!1;u.setActual(null)})}get allFields(){return[this.longitude,this.latitude,this.x,this.y,this.elevation]}};c.__decorate([g.property()],a.MovePointTooltipInfo.prototype,"allFields",null);a.MovePointTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.MovePointTooltipInfo")],a.MovePointTooltipInfo);
Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TranslateTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),function(a,c,g,h,d,m,r,x,t){a.TranslateTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);
this.type="translate";this.distance=g.zeroMeters}clear(){this.distance=g.zeroMeters}};c.__decorate([h.property()],a.TranslateTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.TranslateTooltipInfo.prototype,"distance",void 0);a.TranslateTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.TranslateTooltipInfo")],a.TranslateTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TranslateXYTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t){a.TranslateXYTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);this.type="translate-xy";this.distance=g.zeroMeters}};c.__decorate([h.property()],a.TranslateXYTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.TranslateXYTooltipInfo.prototype,"distance",void 0);a.TranslateXYTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.TranslateXYTooltipInfo")],a.TranslateXYTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/interactive/tooltip/infos/TranslateZTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),function(a,c,g,h,d,m,r,x,t){a.TranslateZTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);this.type="translate-z";
this.distance=g.zeroMeters}clear(){this.distance=g.zeroMeters}};c.__decorate([h.property()],a.TranslateZTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.TranslateZTooltipInfo.prototype,"distance",void 0);a.TranslateZTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.TranslateZTooltipInfo")],a.TranslateZTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/reshape/ReshapeTool3D":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/Evented ../../../../../core/has ../../../../../core/maybe ../../../../../core/accessorSupport/decorators/property ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass ./ReshapeOperation ../../../../interactive/InteractiveToolBase ../../../../interactive/keybindings ../../../../interactive/sketch/SketchOptions ../../../../interactive/tooltip/tooltipCommonUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l){a.ReshapeTool3D=class extends u.InteractiveToolBase{constructor(f){super(f);this.events=new g;this.enableDeleteVertices=this.enableMoveObject=this.enableZVertex=this.enableZShape=!0;this.autoHideManipulators=!1;this.enableMidpoints=!0;this.enableEdgeOffset=!1;this.type="reshape-3d";this.sketchOptions=new b;this.snappingManager=null;this.automaticManipulatorSelection=!1}initialize(){const f=this._reshapeOperation=new z.ReshapeOperation({tool:this});this.addHandles([f.events.on("reshape",
k=>this.events.emit("reshape",k)),f.events.on("move",k=>this.events.emit("move",k)),f.events.on("vertex-add",k=>this.events.emit("vertex-add",k)),f.events.on("vertex-remove",k=>this.events.emit("vertex-remove",k)),f.events.on("immediate-click",k=>this.events.emit("immediate-click",{...k,object:this.object})),this.view.on("pointer-down",["Shift"],k=>k.stopPropagation())]);this.finishToolCreation()}destroy(){this._reshapeOperation=d.destroyMaybe(this._reshapeOperation)}get updating(){return((this.object.updating??
!1)||this._reshapeOperation?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){if(this._reshapeOperation)this._reshapeOperation.onManipulatorSelectionChanged()}get canUndo(){return this._reshapeOperation.canUndo??!1}undo(){null!=this.snappingManager&&this.snappingManager.doneSnapping();this._reshapeOperation.undo()}get canRedo(){return this._reshapeOperation.canRedo??
!1}redo(){null!=this.snappingManager&&this.snappingManager.doneSnapping();this._reshapeOperation.redo()}onInputEvent(f){const k=this._reshapeOperation;k&&!k.grabbingOrDragging&&l.enterInputModeIfAvailable(f,k.tooltip)||this.enableDeleteVertices&&"key-down"===f.type&&p.sketchKeys.delete.includes(f.key)&&0<this._reshapeOperation.removeSelectedVertices()&&f.stopPropagation()}reset(){}get test(){}};c.__decorate([m.property()],a.ReshapeTool3D.prototype,"_reshapeOperation",void 0);c.__decorate([m.property()],
a.ReshapeTool3D.prototype,"view",void 0);c.__decorate([m.property({constructOnly:!0})],a.ReshapeTool3D.prototype,"object",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"enableZShape",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"enableZVertex",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"enableMoveObject",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"enableDeleteVertices",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,
"autoHideManipulators",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"enableMidpoints",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"enableEdgeOffset",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"type",void 0);c.__decorate([m.property({type:b})],a.ReshapeTool3D.prototype,"sketchOptions",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"snappingManager",void 0);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"updating",null);c.__decorate([m.property()],
a.ReshapeTool3D.prototype,"activeTooltipInfo",null);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"tooltip",null);c.__decorate([m.property()],a.ReshapeTool3D.prototype,"automaticManipulatorSelection",void 0);a.ReshapeTool3D=c.__decorate([t.subclass("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],a.ReshapeTool3D);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/reshape/ReshapeOperation":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../geometry ../../../../../core/Accessor ../../../../../core/arrayUtils ../../../../../core/colorUtils ../../../../../core/has ../../../../../core/Evented ../../../../../core/Handles ../../../../../core/handleUtils ../../../../../core/maybe ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/Logger ../../../../../core/accessorSupport/decorators/subclass ../../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../core/support/UpdatingHandles ../../../../../geometry/Polyline ../../../../../layers/graphics/dehydratedPoint ../../../../../symbols/support/utils ../../Manipulator3D ../../manipulatorUtils ../../RenderObject ../../SegmentLabels3D ../../SnappingVisualizer3D ../dragEventPipeline3D ../geometryUtils ../ManipulatorType ../manipulatorUtils ../settings ../visualElementUtils ../manipulations/config ../manipulations/MoveManipulation ../manipulations/MoveXYObjectManipulation ./edgeOffsetUtils ./reshapeTooltipUtils ../../visualElements/OutlineVisualElement ../../../webgl-engine/lib/GeometryUtil ../../../../input/IViewEvents ../../../../interactive/dragEventPipeline ../../../../interactive/interfaces ../../../../interactive/editGeometry/interfaces ../../../../interactive/snapping/SnappingContext ../../../../interactive/snapping/SnappingDragPipelineStep ../../../../interactive/tooltip/Tooltip ../../../../../geometry/SpatialReference".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H,J,L,N,M,K,P,U,V,ca,ja,la,Q,aa,na,ha,da,ta){function qa(){return O=>{const {operation:W,mapEnd:X}=O;if(null==W||null==X)return O;"start"===O.action&&W.selectArrowFromStartPoint(X);return{...O,signedDistance:W.signedDistanceToPoint(X)}}}function fa(O){const W=O.size/2,X=W+O.collisionPadding;return{size:W/X,outlineSize:(W+O.outlineSize)/X}}const oa=Symbol();a.ReshapeOperation=class extends h{get grabbingOrDragging(){return 0<this._numGrabbing+
this._numDragging}get _operations(){return this.object.operations}constructor(O){super(O);this._selectedIndex=0;this._manipulatorHandles=new t;this._manipulatorInfos=[];this._numDragging=this._numGrabbing=0;this._reshapeEventState=ka.NONE;this._updatingHandles=new I.UpdatingHandles;this._recreatingManipulators=!1;this._settings=new J.Settings({getTheme:()=>this.view.effectiveTheme});this.events=new x;this._vertexLaserLineVisualElement=this.activeTooltipInfo=null}initialize(){const {view:O}=this;var W=
this._settings.manipulators,X=W.vertex;this.tooltipInfos=U.createTooltipInfos(this._sketchOptions,O);this._vertexManipulatorMaterial=q.createManipulatorMaterial(m.unitRGBAFromColor(X.color),X.renderOccluded);this._vertexManipulatorOutlineMaterial=q.createManipulatorOutlineMaterial(m.unitRGBAFromColor(X.outlineColor),X.renderOccluded);this._vertexManipulatorHoverOutlineMaterial=q.createManipulatorOutlineMaterial(m.unitRGBAFromColor(X.hoverOutlineColor),X.renderOccluded);X=W.edge;this._edgeManipulatorMaterial=
q.createManipulatorMaterial(m.unitRGBAFromColor(X.color),X.renderOccluded);this._edgeManipulatorOutlineMaterial=q.createManipulatorOutlineMaterial(m.unitRGBAFromColor(X.outlineColor),X.renderOccluded);X=W.edgeOffset;this._edgeOffsetManipulatorMaterial=q.createManipulatorMaterial(m.unitRGBAFromColor(X.color),X.renderOccluded,!1);this._edgeOffsetManipulatorHoverMaterial=q.createManipulatorMaterial(m.unitRGBAFromColor(X.hoverColor),X.renderOccluded,!1);W=W.selected;this._selectedManipulatorMaterial=
q.createManipulatorMaterial(m.unitRGBAFromColor(W.color),W.renderOccluded);this._selectedManipulatorOutlineMaterial=q.createManipulatorOutlineMaterial(m.unitRGBAFromColor(W.outlineColor),W.renderOccluded);this._selectedManipulatorHoverOutlineMaterial=q.createManipulatorOutlineMaterial(m.unitRGBAFromColor(W.hoverOutlineColor),W.renderOccluded);this.tooltip=new da.Tooltip({view:O});this.addHandles([p.watch(()=>{const Y=this._settings.manipulators;return{vertexSettings:Y.vertex,edgeSettings:Y.edge,edgeOffsetSettings:Y.edgeOffset,
selectedSettings:Y.selected}},({vertexSettings:Y,edgeSettings:ea,edgeOffsetSettings:ia,selectedSettings:pa})=>{Y.applyColor(this._vertexManipulatorMaterial);Y.applyOutline(this._vertexManipulatorOutlineMaterial);Y.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial);ea.applyColor(this._edgeManipulatorMaterial);ea.applyOutline(this._edgeManipulatorOutlineMaterial);ia.applyColor(this._edgeOffsetManipulatorMaterial);ia.applyHover(this._edgeOffsetManipulatorHoverMaterial);pa.applyColor(this._selectedManipulatorMaterial);
pa.applyOutline(this._selectedManipulatorOutlineMaterial);pa.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)}),p.watch(()=>this.object.visible,Y=>{for(const ea of this._manipulatorInfos)ea.manipulator.available=Y,"edge"===ea.type&&"edgeManipulator"in ea&&(ea.edgeManipulator.available=Y)}),p.watch(()=>0===this._numGrabbing+this._numDragging,Y=>this._toggleAutoHideManipulators(Y)),p.watch(()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),
({labels:Y,enabled:ea,edgeOffsetEnabled:ia})=>{null!=Y&&(Y.visible=ea,Y.edgeDistance=ia?"far":"default")},p.initial),U.connectTooltipToManipulatedObject(this.tooltip,this.object,()=>this._tooltipsContext),p.on(()=>this._operations,"vertex-update",Y=>{this._updateManipulatorPositions(Y.vertices)},{onListenerAdd:()=>this._recreateManipulators()}),p.on(()=>this._operations?.data,"change",Y=>{"undo"!==Y.operation&&"redo"!==Y.operation||this._recreateManipulators()})])}destroy(){this._segmentLabels=u.destroyMaybe(this._segmentLabels);
this.tooltip=u.destroyMaybe(this.tooltip);this._removeManipulators();this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}removeSelectedVertices(){const O=
this._manipulatorInfos.filter(W=>W.manipulator.selected&&"vertex"===W.type);this._removeVertices(O);return O.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll();this._moveManipulation=u.destroyMaybe(this._moveManipulation);this._objectMoveManipulation=u.destroyMaybe(this._objectMoveManipulation);this.manipulators.removeAll();this._manipulatorInfos=[];this._numDragging=this._numGrabbing=0}_createManipulators(O){if(null!=
this._operations){var W=this.object.elevationInfo;for(const X of this._operations.data.components){const Y=O?.byComponentIndex.get(X.index);for(const ea of X.vertices){const ia=Y?.has(ea.index);this._createVertexOrEdgeManipulator(ea,W,ia)}for(const ea of X.edges)this._createVertexOrEdgeManipulator(ea,W)}this._createObjectMoveManipulation();this._createMoveManipulation(W);this._createVisualElements()}}get canRedo(){return null!=this._operations&&this._operations.canRedo}get canUndo(){return null!=
this._operations&&this._operations.canUndo}redo(){return this._operations?.redo()}undo(){this.events.emit("undo");return this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){this._recreatingManipulators=!0;this._removeManipulators();this._resetTooltip();this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=u.destroyMaybe(this._segmentLabels));this._createManipulators();if(!this._segmentLabels&&this._operations){const O=
this._sketchOptions.labels;this._segmentLabels=new e.SegmentLabels3D({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:O},visible:O.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(O,W){if("end"===W.action)return W;let X=0;const Y=[],ea=this._manipulatorInfos.some(ia=>"vertex"===ia.type&&ia.manipulator.selected);O=O===ra.SELECTED_OR_ALL&&ea;for(const ia of this._manipulatorInfos)"vertex"===ia.type&&(ia.manipulator.grabbing||
O&&!ia.manipulator.selected||Y.push(ia),X++);this._moveVertices(Y,W);if(Y.length===X){this._updateEventState(ka.MOVING);if(this.destroyed)return W;this.events.emit("move",{type:"move",dx:W.screenDeltaX,dy:W.screenDeltaY,object:this.object})}else{this._updateEventState(ka.RESHAPING);if(this.destroyed)return W;this.events.emit("reshape",{type:"reshape",object:this.object})}return W}_toggleAutoHideManipulators(O){this.autoHideManipulators&&(O?this.removeHandles(oa):this.tool.manipulators.forEach(({manipulator:W})=>
{(W=W.disableDisplay?.())&&this.addHandles(W,oa)}))}_isMultiVertexSelection(){return 1<this._manipulatorInfos.reduce((O,W)=>"vertex"===W.type&&W.manipulator.selected?O+1:O,0)}_perVertexManipulatorDragAction(O){this._updateEventState(ka.RESHAPING);if(!this.destroyed){var {mapDeltaX:W,mapDeltaY:X,mapDeltaZ:Y}=O;if(W||X||Y){var ea=[];for(const ia of this._manipulatorInfos)"vertex"===ia.type&&(ia.manipulator.selected&&!ia.manipulator.grabbing||ia===O.info)&&ea.push(ia);this._moveVertices(ea,O,aa.AccumulationBehavior.ACCUMULATE_STEPS);
this.events.emit("reshape",{type:"reshape",object:this.object})}}}_updateEventState(O){if(O===this._reshapeEventState)return!1;switch(O){case ka.NONE:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case ka.MOVING:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case ka.RESHAPING:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case ka.MOVING:switch(this._reshapeEventState){case ka.NONE:this.events.emit("move",
{type:"move-start",dx:0,dy:0,object:this.object});break;case ka.RESHAPING:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case ka.RESHAPING:switch(this._reshapeEventState){case ka.NONE:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case ka.MOVING:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",
{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const W=this._reshapeEventState!==O;this._reshapeEventState=O;return W}_createObjectMoveManipulation(){const {tool:O,view:W,object:X,_operations:Y}=this;if(Y){this._objectMoveManipulation=new K.MoveXYObjectManipulation({tool:O,view:W,object:X});if(this.enableMoveObject){let ea=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((ia,pa,ua)=>{pa.next(va=>this._trackNumDragging(va)).next(va=>{"start"===
va.action&&(ea=Y.createUndoGroup());return va}).next(va=>this._perObjectManipulatorDragAction(ra.ALL,va)).next(va=>{this._updateTranslateObjectTooltip(M.ManipulationType.XY,va);return va}).next(va=>{"end"===va.action&&(this._resetTooltip(),ea=u.removeMaybe(ea))});ua.next(()=>this._onDragCancel(!0,()=>ea=u.removeMaybe(ea)))}));this._objectMoveManipulation.forEachManipulator(ia=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(ia,!1)))}else this._objectMoveManipulation.forEachManipulator(ea=>
{ea.grabbable=!1;ea.cursor=null});this._objectMoveManipulation.forEachManipulator(ea=>this._manipulatorHandles.add(ea.events.on("immediate-click",ia=>{this._manipulatorInfos.some(pa=>pa.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...ia,object:this.object});ia.stopPropagation()})))}}_createMoveManipulation(O){const {object:W,tool:X,view:Y,_operations:ea}=this;if(ea){this._moveManipulation=new M.MoveManipulation({tool:X,view:Y,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&
H.canMoveZOperations(W.operations,W.elevationInfo),snapToScene:!1,radius:M.MoveManipulation.radiusForSymbol(W.graphic?.symbol)});this._moveManipulation.forEachManipulator(pa=>this.addHandles([pa.events.on("immediate-click",ua=>{this._moveManipulation.zManipulation.hasManipulator(pa)||this._manipulatorInfos.some(va=>va.manipulator.selected)||this.events.emit("immediate-click",{...ua,object:this.object});ua.stopPropagation()}),this._watchAndUpdateGrabState(pa,!1)]));var ia=pa=>ua=>{this.addHandles(ua.events.on("focus-changed",
({action:va})=>{"focus"===va?this._updateTranslateTooltip(pa):this._resetTooltip()}))};this._moveManipulation.xyManipulation.forEachManipulator(ia(M.ManipulationType.XY));this._moveManipulation.xyAxisManipulation.forEachManipulator(ia(M.ManipulationType.XY_AXIS));this._moveManipulation.zManipulation.forEachManipulator(ia(M.ManipulationType.Z));this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};this.addHandles([this._moveManipulation.createDragPipeline((pa,ua,va,xa,za)=>{const {snappingStep:Ba,
cancelSnapping:S}=ha.createSnapDragEventPipelineStep({predicate:T=>!!T.info,snappingManager:X.snappingManager,snappingContext:new na.SnappingContext({editGeometryOperations:ea,elevationInfo:O,pointer:za,excludeFeature:W.graphic,visualizer:new v.SnappingVisualizer3D}),updatingHandles:this._updatingHandles,useZ:!1});xa=xa.next(T=>{this._onDragCancel();return T}).next(S);va=va.next(T=>this._trackNumDragging(T)).next(T=>{const ma=this._manipulatorInfos.filter(sa=>"vertex"===sa.type&&sa.manipulator.selected);
return T.manipulatorType===E.ManipulatorType.TRANSLATE_XY&&1===ma.length?{...T,info:ma[0],snapOrigin:ma[0].handle.pos}:T}).next(la.sceneSnappingAtLocation(this.view,O,W.graphic??void 0)).next(...Ba).next(la.addMapDelta()).next(T=>this._perObjectManipulatorDragAction(ra.SELECTED_OR_ALL,T)).next(T=>{this._updateTranslateTooltip(pa,T);return T});return{steps:va,cancel:xa}},O,ea.data.spatialReference,W.graphic),p.watch(()=>W.visible,()=>this._updateMoveManipulationPosition(),p.initial),W.on("committed",
()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),p.watch(()=>W.isDraped,pa=>{this._updateMoveManipulationPosition();pa?this.addHandles(this.view.elevationProvider.on("elevation-change",()=>this._updateMoveManipulationPosition()),"align-move-manipulation"):this.removeHandles("align-move-manipulation")},p.initial)])}}_createVisualElements(){const {object:O,view:W}=this,X=L.createVisualElements({view:W,object:O,forEachManipulator:ea=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(ea);
this._moveManipulation.forEachManipulator(ea);for(const ia of this._manipulatorInfos)ea(ia.manipulator,E.ManipulatorType.TRANSLATE_XY)}},onManipulatorsChanged:ea=>this.events.on("manipulators-changed",ea)});null!=X&&(this._outlineVisualElement=X.visualElement instanceof V.OutlineVisualElement?X.visualElement:null);const Y=this._outlineVisualElement;if(null!=Y){const ea=()=>{O.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(p.on(()=>Y.events,"attachment-origin-changed",
ea,{onListenerAdd:ea}))}this._manipulatorHandles.add(X)}_createEdgeOffsetManipulator(O,W=this.object.elevationInfo){const X=this._operations;if(2>=O.component.vertices.length||!X)return null;var Y=this._settings.manipulators.edgeOffset,ea=Y.size/2,ia=ea+Y.collisionPadding;ea/=ia;const pa=ea*Math.sqrt(3)/2;null==this._edgeOffsetManipulatorGeometryInside&&(this._edgeOffsetManipulatorGeometryInside=ca.createExtrudedTriangle(this._edgeOffsetManipulatorMaterial,pa,ea/2,ea/2,Y.height,Y.offset));null==this._edgeOffsetManipulatorGeometryOutside&&
(this._edgeOffsetManipulatorGeometryOutside=ca.createExtrudedTriangle(this._edgeOffsetManipulatorMaterial,-pa,ea/2,ea/2,Y.height,-Y.offset));ea=[new B.RenderObject(this._edgeOffsetManipulatorGeometryInside.instantiate(),Q.ManipulatorStateFlags.Unfocused),new B.RenderObject(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),Q.ManipulatorStateFlags.Focused),new B.RenderObject(this._edgeOffsetManipulatorGeometryOutside.instantiate(),Q.ManipulatorStateFlags.Unfocused),
new B.RenderObject(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),Q.ManipulatorStateFlags.Focused)];ia=new G.Manipulator3D({view:this.view,renderObjects:ea,elevationInfo:"on-the-ground"!==W.mode||F.isVolumetricSymbol(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:W,worldOriented:!1,focusMultiplier:1,radius:ia,available:this.object.visible,collisionType:{type:"disc",direction:C.fromValues(0,0,1)},collisionPriority:1,metadata:{deleting:!1}});
ea=new G.Manipulator3D({view:this.view,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1}});const ua={manipulator:ia,handle:O,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:ea,elevationInfo:W,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(ua,Y.minSquaredEdgeLength);this._updateEdgeOffsetManipulator(ua);Y=[];for(var va of[O.leftVertex,O.rightVertex])O=this._getManipulatorInfoFromHandle(va),
null!=O&&Y.push(O.manipulator.events.on("location-update",()=>this._updateEdgeOffsetManipulator(ua)));ua.locationUpdateHandle=z.handlesGroup(Y);this._manipulatorHandles.add(ua.locationUpdateHandle,ia);this._manipulatorHandles.add([this._watchAndUpdateGrabState(ia,!0),this._watchAndUpdateGrabState(ea,!0)],ia);this._manipulatorHandles.add(la.createManipulatorDragEventPipeline(ia,this._createEdgeOffsetPipeline(ua,W)),ia);this._manipulatorHandles.add(la.createManipulatorDragEventPipeline(ea,(xa,za,Ba,
S)=>{if("touch"===S)this._createEdgeOffsetPipeline(ua,W)(xa,za,Ba);else if(this.enableMoveObject){S=this.object.graphic;const T=X.data.spatialReference;za.next(ma=>this._trackNumDragging(ma)).next(la.dragAtLocation(this.view,xa.elevationAlignedLocation)).next(A.screenToMapXYAtLocation(this.view,xa.elevationAlignedLocation,W,T,S)).next(la.addScreenDelta()).next(la.addMapDelta()).next(ma=>this._perObjectManipulatorDragAction(ra.ALL,ma)).next(ma=>{this._updateTranslateObjectTooltip(M.ManipulationType.XY,
ma);return ma}).next(ma=>{"end"===ma.action&&this._resetTooltip()});Ba.next(()=>this._onDragCancel(!xa.metadata.deleting))}}),ia);va=xa=>{this._manipulatorInfos.some(za=>za.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...xa,object:this.object});xa.stopPropagation()};this._manipulatorHandles.add([ia.events.on("immediate-click",va),ea.events.on("immediate-click",va),ia.events.on("focus-changed",({action:xa})=>{"focus"===xa?this._updateEdgeOffsetTooltip(null):this._resetTooltip()})],
ia);this._manipulatorInfos.push(ua);this.manipulators.add(ia);this.manipulators.add(ea);this.events.emit("manipulators-changed");return ua}_autoHideEdgeOffsetManipulator(O,W){const X=O.manipulator,Y=O.edgeManipulator,ea=()=>{O.visibilityHandle=u.removeMaybe(O.visibilityHandle);var ia=this._getManipulatorInfoFromHandle(O.handle.leftVertex);const pa=this._getManipulatorInfoFromHandle(O.handle.rightVertex);ia=null!=ia&&null!=pa&&P.screenEdgeLengthSquared(ia.manipulator.renderLocation,pa.manipulator.renderLocation,
this.view.state.camera)<W;if(!X.focused&&!Y.focused||ia)X.grabbable=!ia,Y.grabbable=!ia,O.visibilityHandle=z.handlesGroup([X.disableDisplay(),z.makeHandle(()=>{X.grabbable=!0;Y.grabbable=this.enableMoveObject})])};this._manipulatorHandles.add([X.events.on("focus-changed",ea),Y.events.on("focus-changed",ea),z.makeHandle(()=>{u.removeMaybe(O.visibilityHandle);Y.metadata.deleting=!0;this.manipulators.remove(Y)})],X);ea()}_updateEdgeOffsetManipulator(O){if(this._operations){this._updateManipulatorPosition(O);
var {coordinateHelper:W}=this._operations.data;W=P.createEdgeOffsetIntersectionPlane(this.view,O.manipulator.elevationAlignedLocation,P.createEdgeOffsetOperation(W,O.handle,O.manipulator.elevationInfo));var X=this._getManipulatorInfoFromHandle(O.handle.leftVertex),Y=this._getManipulatorInfoFromHandle(O.handle.rightVertex);null!=X&&null!=Y&&(X=X.manipulator.renderLocation,Y=Y.manipulator.renderLocation,W=null!=W?P.edgeOffsetRotationMatrix(W,X,Y):k.IDENTITY,O.manipulator.modelTransform=W,O.edgeManipulator.elevationAlignedLocation=
O.manipulator.elevationAlignedLocation,O.edgeManipulator.modelTransform=W,W=n.length(n.subtract(R,X,Y))/2,O.edgeManipulator.collisionType={type:"line",paths:[[[-W,0,0],[W,0,0]]]})}}_createEdgeOffsetPipeline(O,W){return(X,Y,ea)=>{const ia=this._operations;if(ia){this._clearSelection();var {step:pa,cleanup:ua}=this._initializeEdgeOffset(O,W,ia);Y.next(va=>this._trackNumDragging(va)).next(la.dragAtLocation(this.view,X.elevationAlignedLocation)).next(pa).next(A.screenToRenderPlaneFromEvent(this.view)).next(A.convertToMapCoordinates(this.view,
ia.data.spatialReference)).next(la.addMapDelta()).next(qa()).next(this._applyEdgeOffsetStep(O)).next(this._showEdgeOffsetTooltip()).next(va=>{"end"===va.action&&ua()});ea.next(()=>{X.metadata.deleting||(ua(),this._onDragCancel())})}}}_initializeEdgeOffset(O,W,X){var {view:Y}=this;const ea=P.createEdgeOffsetOperation(X.data.coordinateHelper,O.handle,W);W=X.createUndoGroup();const ia=P.createEdgeOffsetIntersectionPlane(Y,O.manipulator.elevationAlignedLocation,ea);if(ea.requiresSplitEdgeLeft){var pa=
this._getManipulatorInfoFromHandle(O.handle.leftVertex.leftEdge);null!=pa&&this._splitEdgeManipulator(pa,1)}ea.requiresSplitEdgeRight&&(pa=this._getManipulatorInfoFromHandle(O.handle.rightVertex.rightEdge),null!=pa&&this._splitEdgeManipulator(pa,0));const ua=()=>new w({paths:[[O.handle.leftVertex.pos,O.handle.rightVertex.pos]],spatialReference:X.data.spatialReference});pa=this._settings;const va=new V.OutlineVisualElement({view:Y,isDraped:this.object.isDraped,geometry:ua(),elevationInfo:O.elevationInfo,
width:pa.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0});let xa;const za=()=>{this._cleanEdgeOffsetCollapsedEdges(O);xa=u.removeMaybe(xa)};Y=this.events.on("undo",za);xa=z.handlesGroup([p.watch(()=>m.unitRGBAFromColor(this._accentColor),Ba=>va.color=Ba,p.initial),z.destroyHandle(va),p.watch(()=>this.object.isDraped,Ba=>va.isDraped=Ba),this.object.on("committed",()=>va.geometry=ua()),W,Y]);va.attached=!0;return{step:Ba=>null==ea||null==ia?(za(),null):{...Ba,operation:ea,plane:ia},
cleanup:za}}_applyEdgeOffsetStep(O){return W=>{if(this.destroyed||null==W.operation)return W;this._updateEventState(ka.RESHAPING);const {mapDeltaX:X,mapDeltaY:Y,mapDeltaZ:ea}=W;if(X||Y||ea)this._offsetEdge(O,W),this.events.emit("reshape",{type:"reshape",object:this.object});return W}}_showEdgeOffsetTooltip(){return O=>{null!=O.signedDistance&&this.object.operations?this._updateEdgeOffsetTooltip(O):this._resetTooltip();return O}}_cleanEdgeOffsetCollapsedEdges(O){if(this._operations){var W=O.handle.leftVertex.leftEdge?.leftVertex,
X=O.handle.leftVertex,Y=O.handle.rightVertex.rightEdge?.rightVertex,ea=O.handle.rightVertex,ia=this._operations.data.coordinateHelper;O=[];W&&1E-6>ia.distance(W.pos,X.pos)&&(W=this._getManipulatorInfoFromHandle(X),null!=W&&O.push(W));if(1E-6>ia.distance(X.pos,ea.pos)||Y&&1E-6>ia.distance(Y.pos,ea.pos))X=this._getManipulatorInfoFromHandle(ea),null!=X&&O.push(X);O.length&&this._removeVertices(O)}}_createVertexOrEdgeManipulator(O,W=this.object.elevationInfo,X=!1){const {view:Y,_operations:ea}=this;if(!ea)return null;
var ia=this._settings;if("edge"===O.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(O,W);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const {size:va,outlineSize:xa}=fa(ia.manipulators.vertex);this._vertexManipulatorGeometry=ca.createSphereGeometry(this._vertexManipulatorMaterial,va,16,16);this._vertexManipulatorOutlineGeometry=ca.createSphereGeometry(this._vertexManipulatorOutlineMaterial,xa,16,
16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const {size:va,outlineSize:xa}=fa(ia.manipulators.edge);this._edgeManipulatorGeometry=ca.createSphereGeometry(this._edgeManipulatorMaterial,va,16,16);this._edgeManipulatorOutlineGeometry=ca.createSphereGeometry(this._edgeManipulatorOutlineMaterial,xa,16,16)}ia=this._operations?.data.type;ia="point"===ia||"mesh"===ia?[]:[new B.RenderObject(this._vertexManipulatorGeometry.instantiate(),Z.Vertex|Q.ManipulatorStateFlags.Unselected),
new B.RenderObject(this._vertexManipulatorOutlineGeometry.instantiate(),Z.Vertex|Q.ManipulatorStateFlags.Unfocused|Q.ManipulatorStateFlags.Unselected),new B.RenderObject(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Z.Vertex|Q.ManipulatorStateFlags.Focused|Q.ManipulatorStateFlags.Unselected),new B.RenderObject(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),Q.ManipulatorStateFlags.Selected),new B.RenderObject(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),
Q.ManipulatorStateFlags.Selected|Q.ManipulatorStateFlags.Unfocused),new B.RenderObject(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),Q.ManipulatorStateFlags.Selected|Q.ManipulatorStateFlags.Focused)];this.enableMidpoints&&ia.push(new B.RenderObject(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),Z.Edge|Q.ManipulatorStateFlags.Focused|Q.ManipulatorStateFlags.Unselected),new B.RenderObject(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),
Z.Edge|Q.ManipulatorStateFlags.Focused|Q.ManipulatorStateFlags.Unselected),new B.RenderObject(this._edgeManipulatorGeometry.instantiate(),Z.Edge|Q.ManipulatorStateFlags.Unfocused|Q.ManipulatorStateFlags.Unselected),new B.RenderObject(this._edgeManipulatorOutlineGeometry.instantiate(),Z.Edge|Q.ManipulatorStateFlags.Unfocused|Q.ManipulatorStateFlags.Unselected));ia=new G.Manipulator3D({view:Y,renderObjects:ia,elevationInfo:W,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1}});
ia.selected=X;this._setTypeSpecificManipulatorSettings(ia,O,W);const pa="edge"===O.type?{manipulator:ia,handle:O,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:ia,handle:O,type:"vertex",selectedIndex:0};this._manipulatorInfos.push(pa);this.manipulators.add(ia);this._updateManipulatorPosition(pa);if("edge"===pa.type){O=[];for(var ua of[pa.handle.leftVertex,pa.handle.rightVertex])X=this._getManipulatorInfoFromHandle(ua),null!=X&&O.push(X.manipulator.events.on("location-update",
()=>this._updateManipulatorPosition(pa)));pa.locationUpdateHandle=z.handlesGroup(O);this._manipulatorHandles.add(pa.locationUpdateHandle,ia)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(ia,!0),ia);ua=la.createManipulatorDragEventPipeline(ia,(va,xa,za,Ba)=>{let S=null;const {snappingStep:T,cancelSnapping:ma}=ha.createSnapDragEventPipelineStep({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new na.SnappingContext({editGeometryOperations:ea,
elevationInfo:W,pointer:Ba,excludeFeature:this.object.graphic,visualizer:new v.SnappingVisualizer3D}),updatingHandles:this._updatingHandles,useZ:!1});za=za.next(sa=>{this._onDragCancel(!va.metadata.deleting,()=>S=u.removeMaybe(S));return sa}).next(ma);xa.next(sa=>this._trackNumDragging(sa)).next(sa=>{"start"===sa.action&&this._operations&&(S=this._operations.createUndoGroup());if("edge"===pa.type){const wa=this._splitEdgeManipulator(pa);return{...sa,info:wa,snapOrigin:wa.handle.pos}}return{...sa,
info:pa,snapOrigin:pa.handle.pos}}).next(la.dragAtLocation(this.view,va.elevationAlignedLocation)).next(A.screenToMapXYAtLocation(this.view,va.elevationAlignedLocation,this.object.elevationInfo,va.location.spatialReference,this.object.graphic)).next(la.sceneSnappingAtLocation(this.view,W,this.object.graphic??void 0)).next(...T).next(la.addMapDelta()).next(sa=>{this._perVertexManipulatorDragAction(sa);"end"===sa.action&&(S=u.removeMaybe(S));this._resetTooltip()})});this._manipulatorHandles.add([ua,
ia.events.on("immediate-click",va=>this._manipulatorClickCallback(va,pa)),ia.events.on("select-changed",()=>{pa.selectedIndex=++this._selectedIndex;this._updateMoveManipulationPosition();this._resetTooltip()}),ia.events.on("focus-changed",()=>{this._resetTooltip()})],ia);this.events.emit("manipulators-changed");return pa}_trackNumDragging(O){switch(O.action){case "start":this._numDragging++;break;case "end":this._numDragging--}return O}_onDragCancel(O=!0,W){this._numDragging--;O&&this.undo();null!=
this.tool.snappingManager&&this.tool.snappingManager.doneSnapping();this._resetTooltip();switch(this._reshapeEventState){case ka.MOVING:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case ka.RESHAPING:this.events.emit("reshape",{type:"reshape",object:this.object})}W&&W();this.destroyed||this._updateEventState(ka.NONE)}_setTypeSpecificManipulatorSettings(O,W,X){const Y=this._settings;switch(W.type){case "vertex":O.state=Z.Vertex;O.selectable=!0;O.cursor="move";O.collisionPriority=
2;const {size:ea,collisionPadding:ia}=Y.manipulators.vertex;O.radius=ea/2+ia;O.elevationInfo=X;W=this._operations?.data.type;O.interactive=null!=W&&"point"!==W&&"mesh"!==W;break;case "edge":O.state=Z.Edge;O.selectable=!1;O.cursor="copy";O.collisionPriority=-1;const {size:pa,collisionPadding:ua}=Y.manipulators.edge;O.radius=pa/2+ua;O.elevationInfo="on-the-ground"!==X.mode||F.isVolumetricSymbol(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:X}}_watchAndUpdateGrabState(O,W){return O.events.on("grab-changed",
X=>this._onGrabStateChanged(O,W,X.action,X.pointerType))}_onGrabStateChanged(O,W,X,Y="mouse"){if(!this._recreatingManipulators){if("start"===X)W&&this._updateSelection(O),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(ka.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing;if("touch"!==Y||this.enableEdgeOffset)this._manipulatorInfos.forEach(ea=>{const {manipulator:ia}=ea,pa=this._operations?.data.type;ia.interactive=ia.grabbing||!this._numGrabbing&&
null!=pa&&"point"!==pa&&"mesh"!==pa;"edgeManipulator"in ea&&(ea.edgeManipulator.interactive=ea.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(ea=>{ea.interactive=ea.grabbing||!this._numGrabbing})}}_clearSelection(){for(const O of this._manipulatorInfos)O.manipulator.grabbing||(O.manipulator.selected=!1)}_updateSelection(O){O.grabbing&&!O.selected&&O.selectable&&(this._clearSelection(),O.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(O){null!=
O&&(O.manipulator.metadata.deleting=!0,this.manipulators.remove(O.manipulator),this._manipulatorHandles.remove(O.manipulator),d.removeUnordered(this._manipulatorInfos,O),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(O){if(O)for(const W of this._manipulatorInfos)if(O===W.handle)return W;return null}_updateManipulatorPositions(O){for(const W of O)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(W))}_updateManipulatorPosition(O){const W=
this._operations;if(null!=O&&W)if("vertex"===O.type)O.manipulator.location=W.data.coordinateHelper.vectorToDehydratedPoint(O.handle.pos,ba),O.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=O.manipulator.renderLocation);else if("edge"===O.type){var X=this._getManipulatorInfoFromHandle(O.handle.leftVertex),Y=this._getManipulatorInfoFromHandle(O.handle.rightVertex);null!=X&&null!=Y&&(X=X.manipulator,Y=Y.manipulator,
null!=O.manipulator.elevationInfo&&"on-the-ground"===O.manipulator.elevationInfo.mode?(X=X.location,Y=Y.location,O.manipulator.location=y.makeDehydratedPoint(X.x+.5*(Y.x-X.x),X.y+.5*(Y.y-X.y),X.hasZ&&Y.hasZ?0:void 0,W.data.spatialReference)):(n.lerp(R,X.renderLocation,Y.renderLocation,.5),O.manipulator.renderLocation=R))}}_splitEdgeManipulator(O,W=.5){var X=this._operations;W=X.splitEdge(O.handle,W).createdVertex;O.locationUpdateHandle=u.removeMaybe(O.locationUpdateHandle);var Y=this.object.elevationInfo;
let ea;this.enableEdgeOffset?(this._removeManipulator(O),ea=this._createVertexOrEdgeManipulator(W)):(ea=O,ea.handle=W,ea.type="vertex",this._setTypeSpecificManipulatorSettings(O.manipulator,O.handle,Y));W.leftEdge&&this._createVertexOrEdgeManipulator(W.leftEdge);W.rightEdge&&this._createVertexOrEdgeManipulator(W.rightEdge);this._updateManipulatorPosition(ea);this.enableEdgeOffset||this._resetTooltip();this._updateSelection(O.manipulator);O=this._updateEventState(ka.RESHAPING);Y=X.data.coordinateHelper.vectorToArray(ea.handle.pos);
X=X.data.components.indexOf(W.component);this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:Y,componentIndex:X,vertexIndex:W.index}],added:Y});O&&this._updateEventState(ka.NONE);return ea}_updateMoveManipulationPosition(){const O=n.set(R,0,0,0);let W=0,X=!1;var Y=null;let ea=null;for(var ia of this._manipulatorInfos)if("vertex"===ia.type)if(ia.manipulator.selected)if(W++,n.add(O,O,ia.manipulator.renderLocation),null==Y||ia.selectedIndex>Y.selectedIndex)ea=Y,
Y=ia;else{if(null==ea||ia.selectedIndex>ea.selectedIndex)ea=ia}else X=!0;ia=this.object;var pa=this._operations?.data.geometry;if(0===W)Y=ia.visible&&this.enableMoveObject,this._moveManipulation.xyManipulation.available=Y,this._moveManipulation.xyAxisManipulation.available=Y,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=Y,this._moveManipulation.zManipulation.available=Y&&this.enableZShape&&H.canMoveZOperations(this._operations,ia.elevationInfo),this._moveManipulation.angle=D.orientation(pa),
this._moveManipulation.radius=M.MoveManipulation.radiusForSymbol(ia.graphic?.symbol);else{ia=ia.visible;this._moveManipulation.xyManipulation.available=ia;this._moveManipulation.xyAxisManipulation.available=ia;this._moveManipulation.zManipulation.available=ia&&this.enableZVertex&&H.canMoveZOperations(this._operations,this.object.elevationInfo);this._moveManipulation.xyAxisManipulation.orthogonalAvailable=ia&&1!==W;ia=0;if(null!=Y){pa=Y.handle.pos;const ua=null!=ea?ea.handle.pos:Y.handle.leftEdge?.leftVertex?
Y.handle.leftEdge.leftVertex.pos:null;Y=null==ea&&Y.handle.rightEdge?.rightVertex?Y.handle.rightEdge.rightVertex.pos:null;ua&&Y?this._moveManipulation.xyAxisManipulation.available=!1:ua?ia=Math.atan2(pa[1]-ua[1],pa[0]-ua[0])+Math.PI/2:Y&&(ia=Math.atan2(Y[1]-pa[1],Y[0]-pa[0])+Math.PI/2)}this._moveManipulation.angle=ia;this._moveManipulation.radius=N.discRadiusSmall}0!==W&&X?(n.scale(O,O,1/W),ba.spatialReference=this._operations.data.spatialReference,ba.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(O,
ba),this._moveManipulation.elevationAlignedLocation=ba):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?q.placeAtObject(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(O){var W=[];const X=this._operations;if(X){for(var Y of O)if(O=Y.handle.component,"vertex"===Y.type&&X.canRemoveVertex(O)){W.push(Y.handle);this._removeManipulator(Y);this._removeManipulator(this._getManipulatorInfoFromHandle(Y.handle.leftEdge));
this._removeManipulator(this._getManipulatorInfoFromHandle(Y.handle.rightEdge));const ea=X.removeVertices([Y.handle]).removedVertices?.[0].createdEdge;ea?this._createVertexOrEdgeManipulator(ea):this.enableEdgeOffset&&2>=O.vertices.length&&this._removeManipulator(this._getManipulatorInfoFromHandle(O.edges[0]))}if(0<W.length&&(W=W.map(ea=>{const ia=X.data.components.indexOf(ea.component);return{coordinates:X.data.coordinateHelper.vectorToArray(ea.pos),componentIndex:ia,vertexIndex:ea.index}}),Y=this._updateEventState(ka.RESHAPING),
!this.destroyed&&(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:W.map(ea=>ea.coordinates),vertices:W}),!this.destroyed))){if(Y&&(this._updateEventState(ka.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(O,W,X="start"===W.action?aa.AccumulationBehavior.NEW_STEP:aa.AccumulationBehavior.ACCUMULATE_STEPS){const Y=this._operations;if(Y){0<O.length&&Y.moveVertices(O.map(ea=>ea.handle),W.mapDeltaX,W.mapDeltaY,W.mapDeltaZ,X);for(const ea of O)this._updateManipulatorPosition(ea)}}_offsetEdge(O,
W){if(null!=W.operation&&null!=W.signedDistance){var X=this._operations;if(X){var Y=W.operation.clone();Y.distance=W.signedDistance;X.updateVertices([O.handle.leftVertex,O.handle.rightVertex],Y);this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(O.handle.leftVertex));this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(O.handle.rightVertex))}}}_manipulatorClickCallback(O,W){O.shiftKey||this._clearSelection();"vertex"===W.type&&(W.manipulator.selected=!W.manipulator.selected,
this.enableDeleteVertices&&O.button===ja.MouseButton.Right&&this._removeVertices([W]));"edge"===W.type&&O.button===ja.MouseButton.Left&&this._splitEdgeManipulator(W);O.stopPropagation()}_updateTranslateTooltip(O,W){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(O,W)}_updateTranslateObjectTooltip(O,W){this.activeTooltipInfo=U.getUpdatedTranslateObjectTooltipInfo(O,W,this._tooltipsContext)}_updateEdgeOffsetTooltip(O){this.activeTooltipInfo=U.getUpdatedEdgeOffsetTooltipInfo(this.object,
O,this._tooltipsContext)}_resetTooltip(){this.activeTooltipInfo=this._defaultTooltipInfo}get _defaultTooltipInfo(){switch(this._operations?.data.type){case "polyline":case "polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case "point":case "mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const O=this._manipulatorInfos.filter(W=>"vertex"===W.type&&W.manipulator.selected);return 1===O.length?O[0]:null}get _tooltipsContext(){const {events:O}=
this;return{sketchOptions:this._sketchOptions,tooltipInfos:this.tooltipInfos,activeTooltipInfo:this.activeTooltipInfo,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:{onReshapeStart:()=>O.emit("reshape",{type:"reshape-start",object:this.object}),onReshape:()=>O.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>O.emit("reshape",{type:"reshape-stop",object:this.object}),onMoveStart:()=>O.emit("move",{type:"move-start",object:this.object,dx:0,dy:0}),onMove:()=>
O.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>O.emit("move",{type:"move-stop",object:this.object,dx:0,dy:0})}}}get test(){}};c.__decorate([b.property()],a.ReshapeOperation.prototype,"_numGrabbing",void 0);c.__decorate([b.property()],a.ReshapeOperation.prototype,"_numDragging",void 0);c.__decorate([b.property()],a.ReshapeOperation.prototype,"grabbingOrDragging",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"_operations",null);c.__decorate([b.property()],
a.ReshapeOperation.prototype,"_segmentLabels",void 0);c.__decorate([b.property({constructOnly:!0})],a.ReshapeOperation.prototype,"tool",void 0);c.__decorate([b.property()],a.ReshapeOperation.prototype,"tooltip",void 0);c.__decorate([b.property()],a.ReshapeOperation.prototype,"activeTooltipInfo",void 0);c.__decorate([b.property({readOnly:!0})],a.ReshapeOperation.prototype,"updating",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"manipulators",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,
"view",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"object",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"enableZShape",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"enableDeleteVertices",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"enableZVertex",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"autoHideManipulators",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"enableMoveObject",null);c.__decorate([b.property()],
a.ReshapeOperation.prototype,"enableMidpoints",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"enableEdgeOffset",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"_sketchOptions",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"_accentColor",null);c.__decorate([b.property()],a.ReshapeOperation.prototype,"_tooltipsContext",null);a.ReshapeOperation=c.__decorate([f.subclass("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],a.ReshapeOperation);
const ba=y.makeDehydratedPoint(0,0,void 0,ta.WGS84),R=C.create();var Z;(function(O){O.Vertex=Q.ManipulatorStateCustomFlags.Custom1;O.Edge=Q.ManipulatorStateCustomFlags.Custom2})(Z||={});var ka;(function(O){O[O.NONE=0]="NONE";O[O.MOVING=1]="MOVING";O[O.RESHAPING=2]="RESHAPING"})(ka||={});var ra;(function(O){O[O.ALL=0]="ALL";O[O.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"})(ra||={});Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/reshape/edgeOffsetUtils":function(){define("exports ../../../../../core/screenUtils ../../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../geometry/support/plane ../../../../../layers/graphics/dehydratedPoint ../../../../interactive/editGeometry/operations/OffsetEdgeVertex".split(" "),
function(a,c,g,h,d,m,r,x){function t(z,u,p){p=r.makeDehydratedPoint(u.x+p[0],u.y+p[1],u.z+p[2],u.spatialReference);const b=d.create(),l=d.create();return z.renderCoordsHelper.toRenderCoords(u,b)&&z.renderCoordsHelper.toRenderCoords(p,l)?h.direction(l,b,l):null}a.createEdgeOffsetIntersectionPlane=function(z,u,p){const b=d.create();if(!z.renderCoordsHelper.toRenderCoords(u,b))return null;var l=t(z,u,m.getNormal(p.plane));z=t(z,u,p.edgeDirection);if(null==l||null==z)return null;l=h.cross(d.create(),
l,z);return m.fromPositionAndNormal(b,l,m.create())};a.createEdgeOffsetOperation=function(z,u,p){return new x.OffsetEdgeVertex(z,"on-the-ground"===p.mode?x.PlaneType.XY:x.PlaneType.XYZ,u,0)};a.edgeOffsetRotationMatrix=function(z,u,p){z=m.getNormal(z);u=h.direction(d.create(),u,p);p=h.cross(d.create(),u,z);z=h.cross(d.create(),u,p);return g.fromValues(u[0],u[1],u[2],0,p[0],p[1],p[2],0,z[0],z[1],z[2],0,0,0,0,1)};a.screenEdgeLengthSquared=function(z,u,p){z=p.projectToRenderScreen(z,c.createRenderScreenPointArray3());
u=p.projectToRenderScreen(u,c.createRenderScreenPointArray3());return null!=z&&null!=u?h.squaredLength(h.subtract(z,z,u)):0};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils":function(){define("exports ../../../../../core/handleUtils ../../../../../core/quantityUtils ../../../../../core/reactiveUtils ../../../../../core/unitUtils ../../../../../geometry/support/plane ../../../../../geometry/support/vectorStacks ../manipulatedObjectUtils ../tooltipUtils3D ../manipulations/MoveManipulation ../manipulations/moveUtils ../../../../interactive/editGeometry/interfaces ../../../../interactive/tooltip/tooltipCommonUtils ../../../../interactive/tooltip/infos/MovePointTooltipInfo ../../../../interactive/tooltip/infos/ReshapeEdgeOffsetTooltipInfo ../../../../interactive/tooltip/infos/SelectedVertexTooltipInfo ../../../../interactive/tooltip/infos/TranslateTooltipInfo ../../../../interactive/tooltip/infos/TranslateXYTooltipInfo ../../../../interactive/tooltip/infos/TranslateZTooltipInfo ../../../../support/automaticAreaMeasurementUtils ../../../../support/automaticLengthMeasurementUtils ../../../../support/euclideanLengthMeasurementUtils ../../../../support/geodesicLengthMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G){function q(v,A,{selectedVertexManipulatorInfo:D,callbacks:E}){const H=x.manipulatedObjectGeometry(A);switch(H?.type){case "mesh":"move-point"===v.type&&t.updateXYZFromTooltipInfo(v,H.origin,A,E);break;case "point":"move-point"===v.type&&t.updateXYZFromTooltipInfo(v,H,A,E);break;case "polyline":case "polygon":if("selected-vertex"===v.type&&"vertex"===D?.type){var {dx:J,dy:L,dz:N}=b.getXYZDeltasFromTooltipInfo(v,D.manipulator.location);if(0!==
J||0!==L||0!==N)E.onReshapeStart?.(),A.operations?.moveVertices([D.handle],J,L,N,p.AccumulationBehavior.NEW_STEP),E.onReshape?.(),E.onReshapeStop?.()}}}function B(v,{activeTooltipInfo:A,selectedVertexManipulatorInfo:D,sketchOptions:E}){if(A)switch(A.sketchOptions=E,A?.type){case "move-point":t.updateTooltipInfoFromManipulatedObject(A,v);break;case "selected-vertex":if(A&&"selected-vertex"===A.type)switch(D=D?.manipulator.location,A.setLocationFromPoint(D),t.updateElevationFromPoint(A,D,v),v=v.operations?.data.geometry,
v?.type){case "polygon":A.geometryType="polygon";A.totalLength.visible=!1;A.area.actual=w.autoArea2D(v);break;case "polyline":A.geometryType="polyline",A.totalLength.actual=y.autoLength2D(v),A.area.visible=!1}}}function e(v,A,D){if(null!=A&&"end"!==A.action){const {mapStart:E,mapEnd:H}=A;A=D(E,H);v.distance=null!=A?A:g.zeroMeters}else v.distance=g.zeroMeters}a.connectTooltipToManipulatedObject=function(v,A,D){function E(){const L=D();return{...L,activeTooltipInfo:L.sketchOptions.tooltips.effectiveEnabled?
L.activeTooltipInfo:null}}function H(L){J=!0;B(A,L);v.info=L.activeTooltipInfo;J=!1}let J=!1;return c.handlesGroup([h.watch(E,H,h.syncAndInitial),h.watch(()=>{const L=E(),{activeTooltipInfo:N}=L;if(N&&"key"in N)return{context:L,activeTooltipInfo:N,key:N.key,geometry:x.manipulatedObjectGeometry(A)}},(L,N)=>{L&&!J&&N&&N.key!==L.key&&q(L.activeTooltipInfo,A,L.context)},h.sync),A.on("committed",()=>H(E())),b.connectPasteEvent(v)])};a.createTooltipInfos=function(v,A){A=A?.type;return{edgeOffset:new f.ReshapeEdgeOffsetTooltipInfo({sketchOptions:v,
viewType:A}),movePoint:new l.MovePointTooltipInfo({sketchOptions:v,viewType:A}),selectedVertex:new k.SelectedVertexTooltipInfo({sketchOptions:v,viewType:A}),translate:new n.TranslateTooltipInfo({sketchOptions:v,viewType:A}),translateXY:new C.TranslateXYTooltipInfo({sketchOptions:v,viewType:A}),translateZ:new I.TranslateZTooltipInfo({sketchOptions:v,viewType:A})}};a.getUpdatedEdgeOffsetTooltipInfo=function(v,A,{sketchOptions:D,tooltipInfos:E}){E=E.edgeOffset;E.distance=g.zeroMeters;if(null!=A&&"end"!==
A.action){var H=v.operations;const {mapEnd:N,signedDistance:M,operation:K}=A;if(null!=M&&null!=H){a:{A=M*K.selectedArrow;var J=N,L=K.plane;H=H.data.coordinateHelper;if(v.isDraped){const P=H.toXYZ(H.pointToVector(J));L=m.projectPoint(L,P,r.sv3d.get());L=G.geodesicDistance(L,P,H.spatialReference);if(null!=L){A=g.createLength(L.value*Math.sign(A),L.unit);break a}}A=g.createLength(A*d.getMetersPerUnitForSR(J.spatialReference),"meters")}E.distance=A}}v=v.operations?.data.geometry;E.area="polygon"===v?.type?
w.autoArea2D(v):null;E.totalLength="polyline"===v?.type?y.autoLength2D(v):null;E.sketchOptions=D;return E};a.getUpdatedTranslateObjectTooltipInfo=function(v,A,{sketchOptions:D,tooltipInfos:E}){let H=null;switch(v){case z.ManipulationType.XY:H=E.translate;e(H,A,(J,L)=>y.autoDistanceBetweenPoints2D(J,L));break;case z.ManipulationType.XY_AXIS:H=E.translateXY;e(H,A,(J,L)=>g.scale(y.autoDistanceBetweenPoints2D(J,L),u.axisConstrainedDragSign(A)));break;case z.ManipulationType.Z:H=E.translateZ,e(H,A,F.verticalSignedDistanceBetweenPoints)}H.sketchOptions=
D;return H};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/ReshapeEdgeOffsetTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),function(a,c,g,h,d,m,r,x,t){a.ReshapeEdgeOffsetTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);
this.type="reshape-edge-offset";this.distance=g.zeroMeters;this.totalLength=this.area=null}};c.__decorate([h.property()],a.ReshapeEdgeOffsetTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.ReshapeEdgeOffsetTooltipInfo.prototype,"distance",void 0);c.__decorate([h.property()],a.ReshapeEdgeOffsetTooltipInfo.prototype,"area",void 0);c.__decorate([h.property()],a.ReshapeEdgeOffsetTooltipInfo.prototype,"totalLength",void 0);a.ReshapeEdgeOffsetTooltipInfo=c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.ReshapeEdgeOffsetTooltipInfo")],
a.ReshapeEdgeOffsetTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/SelectedVertexTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../fields/fields ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),function(a,c,g,h,d,m,r,x,t,z){a.SelectedVertexTooltipInfo=
class extends z.TooltipInfoWithCoordinates(t.SketchTooltipInfo){constructor(u){super(u);this.type="selected-vertex";this.area=x.makeAreaField();this.totalLength=x.makeTotalLengthField();this.geometryType="polyline";this.allFields.forEach(p=>{p.lockable=!1;p.setActual(null)})}get allFields(){return[this.longitude,this.latitude,this.x,this.y,this.elevation,"polygon"===this.geometryType?this.area:this.totalLength]}};c.__decorate([g.property()],a.SelectedVertexTooltipInfo.prototype,"geometryType",void 0);
c.__decorate([g.property()],a.SelectedVertexTooltipInfo.prototype,"allFields",null);a.SelectedVertexTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.SelectedVertexTooltipInfo")],a.SelectedVertexTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/TransformTool3D":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/arrayUtils ../../../../../core/Evented ../../../../../core/handleUtils ../../../../../core/has ../../../../../core/maybe ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/Logger ../../../../../core/accessorSupport/decorators/subclass ../../../../../core/support/UpdatingHandles ../../../../../geometry/Point ../../../../ViewingMode ../../Manipulator3D ../../manipulatorUtils ../../SnappingVisualizer3D ../manipulatedObjectUtils ../manipulatorUtils ../meshFastUpdateUtils ../tooltipUtils3D ../visualElementUtils ../manipulations/config ../manipulations/MoveManipulation ./ScaleRotateMeshAdapter ./ScaleRotateObjectSymbol3DAdapter ./ScaleRotateTransform ../../../../interactive/dragEventPipeline ../../../../interactive/InteractiveToolBase ../../../../interactive/editGeometry/EditGeometryOperations ../../../../interactive/sketch/SketchOptions ../../../../interactive/snapping/SnappingContext ../../../../interactive/snapping/SnappingDragPipelineStep ../../../../interactive/tooltip/Tooltip ../../../../interactive/tooltip/tooltipCommonUtils ../../../../interactive/tooltip/infos/TransformMeshTooltipInfo ../../../../interactive/tooltip/infos/TransformPointTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H,J,L,N,M,K,P){a.TransformTool3D=class extends D.InteractiveToolBase{constructor(U){super(U);this.events=new h;this.enableScaling=this.enableRotation=this.enableZ=!0;this.sketchOptions=new H;this.type="transform-3d";this._updatingHandles=new p.UpdatingHandles;this._scaleRotate=null}initialize(){const {events:U,object:V,view:ca}=this;this.tooltip=new N.Tooltip({view:ca});this._moveManipulation=new q.MoveManipulation({tool:this,view:ca,
snapToScene:this.snapToScene,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZ&&I.canMoveZOperations(V.operations,V.elevationInfo),radius:q.MoveManipulation.radiusForSymbol(V.graphic?.symbol)});this._moveManipulation.forEachManipulator(ha=>this.addHandles(ha.events.on("immediate-click",da=>{U.emit("immediate-click",{...da,object:this.object});da.stopPropagation()})));const ja=V.elevationInfo;this._moveManipulation.elevationInfo=ja;this.addHandles(w.meshTransformFastUpdateHandles(V));this._moveManipulation.createManipulatedObjectDragPipeline((ha,
da,ta,qa,fa)=>{if(ha===q.ManipulationType.XY){const {snappingStep:oa,cancelSnapping:ba}=L.createSnapDragEventPipelineStep({snappingContext:new J.SnappingContext({elevationInfo:ja,pointer:fa,editGeometryOperations:E.EditGeometryOperations.fromGeometry(new b({spatialReference:V.operations?.data.spatialReference}),ca.state.viewingMode),visualizer:new n.SnappingVisualizer3D,excludeFeature:V.graphic}),snappingManager:this.snappingManager,updatingHandles:this._updatingHandles,useZ:!1});qa=qa.next(ba);ta=
ta.next(A.sceneSnappingAtProjectedLocation(this.view,ja)).next(...oa)}return{steps:ta,cancel:qa}},V,ha=>{const {action:da,object:ta,dxScreen:qa,dyScreen:fa}=ha;ha={object:ta,dxScreen:qa,dyScreen:fa};switch(da){case "start":this._emitRecordUndo();U.emit("translate-start",ha);break;case "update":U.emit("translate",ha);break;case "end":U.emit("translate-stop",ha)}});this._moveManipulation.angle=null!=this._scaleRotate?this._scaleRotate.angle:0;this._scaleRotateAdapter=this._createScaleRotateAdapter();
this.addHandles(x.watch(()=>this._scaleRotateAdapter.angle,()=>this._updateMoveAngle()));if(this.enableScaling||this.enableRotation)this._scaleRotate=new v.ScaleRotateTransform({tool:this,mode:this.enableScaling&&this.enableRotation?null:this.enableScaling?"scale":"rotate",adapter:this._scaleRotateAdapter,sketchOptions:this.sketchOptions,tooltipEnabled:"mesh"!==C.manipulatedObjectGeometry(V)?.type}),this.addHandles(this._scaleRotate.events.on("scale-changed",()=>this._onScaleChanged()));this.addHandles([F.createVisualElements({view:this.view,
object:V,forEachManipulator:ha=>this._forEachManipulator(ha),onManipulatorsChanged:()=>d.makeHandle()}),V.on("committed",()=>this._onGeometryChanged()),this._hideManipulatorsForObjectState(),x.watch(()=>ca.scale,()=>this._updateMoveAngle())].filter(g.isSome));this._onGeometryChanged();this._updateMoveAngle();this._forEachManipulator(ha=>{ha instanceof f.Manipulator3D&&this.addHandles(ha.events.on("grab-changed",()=>this._updateManipulatorsInteractive()))});const la=ca?.type,{sketchOptions:Q}=this;
this._meshTooltipInfo=new K.TransformMeshTooltipInfo({viewType:la,sketchOptions:Q});this._pointTooltipInfo=new P.TransformPointTooltipInfo({viewType:la,sketchOptions:Q});const aa={object:V,dxScreen:0,dyScreen:0},na={onMoveStart:()=>{this._emitRecordUndo();U.emit("translate-start",{...aa})},onMove:()=>U.emit("translate",{...aa}),onMoveStop:()=>U.emit("translate-stop",{...aa}),onRotateStart:ha=>{this._emitRecordUndo();U.emit("rotate-start",{object:V,angle:ha})},onRotate:ha=>U.emit("rotate",{object:V,
angle:ha}),onRotateStop:ha=>U.emit("rotate-stop",{object:V,angle:ha}),onScaleStart:(ha,da)=>{this._emitRecordUndo();U.emit("scale-start",{object:V,xScale:ha,yScale:da})},onScale:(ha,da)=>U.emit("scale",{object:V,xScale:ha,yScale:da}),onScaleStop:(ha,da)=>U.emit("scale-stop",{object:V,xScale:ha,yScale:da})};this.addHandles(y.connectTooltipToManipulatedObject(this.tooltip,this.object,()=>({sketchOptions:this.sketchOptions,activeTooltipInfo:this.activeTooltipInfo,callbacks:na})));this.finishToolCreation()}destroy(){this.tooltip.destroy();
this._moveManipulation.destroy();this._scaleRotate=r.destroyMaybe(this._scaleRotate);this._scaleRotateAdapter=r.destroyMaybe(this._scaleRotateAdapter);this._updatingHandles.destroy();this._set("view",null);this._set("object",null)}onInputEvent(U){if(!this.destroyed&&!M.enterInputModeIfAvailable(U,this.tooltip))return super.onInputEvent(U)}_updateManipulatorsInteractive(){null!=this._scaleRotate&&(this._scaleRotate.interactive=!this._moveManipulation.grabbing,this._moveManipulation.interactive=!this._scaleRotate.grabbing)}_createScaleRotateAdapter(){const U=
C.manipulatedObjectGeometry(this.object);return"mesh"===U?.type?new B.ScaleRotateMeshAdapter({object:this.object,geometry:U,viewingMode:this.view.state.viewingMode}):new e.ScaleRotateObjectSymbol3DAdapter({graphic:this.object.graphic,sizeFilter:V=>this._enforceNonZeroSize(V),findLayerView:()=>this.view.allLayerViews.find(V=>V.layer===this.object.graphic?.layer),sizeAxis:this.sketchOptions?.tooltips?.visualVariables?.size?.axis??null})}_forEachManipulator(U){this._moveManipulation?.forEachManipulator(U);
this._scaleRotate?.forEachManipulator(U)}_hideManipulatorsForObjectState(){return x.watch(()=>this.object.visible,U=>{this._forEachManipulator(V=>V.available=U);this._moveManipulation.zManipulation.available=U&&this.enableZ&&I.canMoveZOperations(this.object.operations,this.object.elevationInfo)})}_emitRecordUndo(){this.events.emit("record-undo",{updates:[this.object.createUndoRecord()]})}set snapToScene(U){this._moveManipulation&&(this._moveManipulation.snapToScene=U);this._set("snapToScene",U)}get updating(){return this._updatingHandles.updating||
!!this._scaleRotate?.updating}get activeTooltipInfo(){return null!=this._scaleRotate?.tooltip?.info?null:"mesh"===C.manipulatedObjectGeometry(this.object)?.type?this._meshTooltipInfo:this._pointTooltipInfo}set location(U){this._moveManipulation.location=U;this._scaleRotate&&(this._scaleRotate.location=U)}set elevationAlignedLocation(U){this._moveManipulation.elevationAlignedLocation=U;this._scaleRotate&&(this._scaleRotate.elevationAlignedLocation=U)}reset(){}onHide(){this._scaleRotate?.cancelActiveAnimation()}_onScaleChanged(){null!=
this._scaleRotate&&(this._moveManipulation.displayScale=this._scaleRotate.getScale())}_updateMoveAngle(){const {view:U}=this;this._moveManipulation.angle=U.state.viewingMode===l.ViewingMode.Local||U.scale<G.alignArrowsScaleThreshold?this._scaleRotateAdapter.angle:0}_onGeometryChanged(){k.placeAtObject(this,this.object)}_enforceNonZeroSize(U){return U||this.view.state.camera.computeRenderPixelSizeAt(this._moveManipulation.renderLocation)}get test(){}};c.__decorate([t.property({constructOnly:!0,nonNullable:!0})],
a.TransformTool3D.prototype,"view",void 0);c.__decorate([t.property({constructOnly:!0,nonNullable:!0})],a.TransformTool3D.prototype,"object",void 0);c.__decorate([t.property({constructOnly:!0,nonNullable:!0})],a.TransformTool3D.prototype,"enableZ",void 0);c.__decorate([t.property()],a.TransformTool3D.prototype,"enableRotation",void 0);c.__decorate([t.property()],a.TransformTool3D.prototype,"enableScaling",void 0);c.__decorate([t.property({constructOnly:!0,type:H})],a.TransformTool3D.prototype,"sketchOptions",
void 0);c.__decorate([t.property({value:!1})],a.TransformTool3D.prototype,"snapToScene",null);c.__decorate([t.property({constructOnly:!0})],a.TransformTool3D.prototype,"snappingManager",void 0);c.__decorate([t.property({readOnly:!0})],a.TransformTool3D.prototype,"type",void 0);c.__decorate([t.property({readOnly:!0})],a.TransformTool3D.prototype,"updating",null);c.__decorate([t.property()],a.TransformTool3D.prototype,"activeTooltipInfo",null);a.TransformTool3D=c.__decorate([u.subclass("esri.views.3d.interactive.editingTools.transform.TransformTool3D")],
a.TransformTool3D);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/Accessor ../../../../../core/mathUtils ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/has ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass ../../../../../geometry/support/axisAngleDegrees".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){a.ScaleRotateMeshAdapter=class extends g{constructor(b){super(b);this._interactionState=null}initialize(){this.addHandles([d.when(()=>{const b=this._interactionState;return b&&b.angle!==b.previousAngle?{interactionState:b,angle:b.state.angle}:null},({interactionState:b})=>{this._updateMeshRotation(b)},d.sync),d.when(()=>{const b=this._interactionState;return b&&b.scale!==b.previousScale?{interactionState:b,scale:b.state.scale}:null},({interactionState:b})=>{this._updateMeshSize(b)},
d.sync)])}get initialAngle(){return this._interactionState?.initialAngle??0}get angle(){const b=this.geometry.transform;if(null==b)return this._interactionState?.angle??0;const l=u.axis(b.rotation)[2];return.999999<Math.abs(l)?h.deg2rad(u.angle(b.rotation))*Math.sign(l):0}get angleClockwise(){return-this.angle}get relativeAngle(){return this.angle-this.initialAngle}get relativeAngleClockwise(){return-this.relativeAngle}get scale(){return this._interactionState?.scale??1}startInteraction(){const b=
new p({angle:this.angle});this._interactionState=b;const l=()=>{this._interactionState=null};return{state:b,done:l,cancel:()=>{b.cancel();l()}}}createUndoRecord(){return this.object.createUndoRecord()}_updateMeshRotation(b){const {angle:l,previousAngle:f}=b;b.previousAngle=l;b=h.rad2deg(l-f);this.geometry.rotate(0,0,b,{origin:this.geometry.anchor})}_updateMeshSize(b){const {scale:l,previousScale:f}=b;b.previousScale=l;this.geometry.scale(l/f,{origin:this.geometry.anchor})}};c.__decorate([m.property({constructOnly:!0})],
a.ScaleRotateMeshAdapter.prototype,"object",void 0);c.__decorate([m.property({constructOnly:!0})],a.ScaleRotateMeshAdapter.prototype,"geometry",void 0);c.__decorate([m.property({constructOnly:!0})],a.ScaleRotateMeshAdapter.prototype,"viewingMode",void 0);c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"initialAngle",null);c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"angle",null);c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"angleClockwise",null);
c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"relativeAngle",null);c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"relativeAngleClockwise",null);c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"scale",null);c.__decorate([m.property()],a.ScaleRotateMeshAdapter.prototype,"_interactionState",void 0);a.ScaleRotateMeshAdapter=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.transform.ScaleRotateMeshAdapter")],a.ScaleRotateMeshAdapter);let p=
class extends g{get state(){const {angle:b,scale:l}=this;return{angle:b,scale:l}}constructor(b){super(b);this.previousAngle=this.initialAngle=this.angle=0;this.scale=this.previousScale=1;this.previousAngle=this.initialAngle=b.angle}cancel(){this.angle=this.initialAngle;this.scale=1}};c.__decorate([m.property()],p.prototype,"angle",void 0);c.__decorate([m.property()],p.prototype,"initialAngle",void 0);c.__decorate([m.property()],p.prototype,"previousAngle",void 0);c.__decorate([m.property()],p.prototype,
"previousScale",void 0);c.__decorate([m.property()],p.prototype,"scale",void 0);c.__decorate([m.property()],p.prototype,"state",null);p=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.transform.ScaleRotateMeshAdapter.InteractionState")],p);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/ScaleRotateObjectSymbol3DAdapter":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/Accessor ../../../../../core/mathUtils ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/has ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass".split(" "),
function(a,c,g,h,d,m,r,x,t,z){function u(l){return-h.deg2rad(l)}a.ScaleRotateObjectSymbol3DAdapter=class extends g{constructor(l){super(l);this._interactionState=this.sizeAxis=null}initialize(){this.addHandles(d.when(()=>null!=this._interactionState?this._interactionState.state:null,l=>{this._updateSymbol(l)},d.sync))}get initialAngle(){return this._interactionState?.initialAngle??0}get angle(){return null!=this._interactionState?this._interactionState.angle:null!=this._orientationReferenceSymbolLayer?
u(this._orientationReferenceSymbolLayer.heading??0):0}get angleClockwise(){return-this.angle}get orientation(){return this.angle}get orientationClockwise(){return this.angleClockwise}get relativeAngle(){return this.angle-this.initialAngle}get relativeAngleClockwise(){return-this.relativeAngle}get scale(){return this._interactionState?.scale??1}get size(){const l=this._sizeReferenceSymbolLayer;if(null==l)return null;var f=this.findLayerView(),k=this._graphicSymbol;if(null==f||null==k||"point-3d"!==
k.type)return null;f=f.getSymbolLayerSize(k,l);if("size"in f&&null!=f.size)return f.size;k=this.sizeAxis;return"width"in f&&null!=f.width&&(null==k||"width"===k||"all"===k||"width-and-depth"===k)?f.width:"depth"in f&&null!=l.depth&&(null==k||"depth"===k||"all"===k||"width-and-depth"===k)?f.depth:"height"in f&&null!=l.height&&(null==k||"height"===k||"all"===k)?f.height:null}get _sizeReferenceSymbolLayer(){const l=this._graphicSymbol;return null==l||0===l.symbolLayers.length?null:l.symbolLayers.find(f=>
"object"===f.type)}get _orientationReferenceSymbolLayer(){const l=this._graphicSymbol;return null==l||0===l.symbolLayers.length?null:l.symbolLayers.find(f=>"object"===f.type&&null!=f.heading)}get _graphicSymbol(){return null!=this.graphic?.symbol&&"point-3d"===this.graphic.symbol.type?this.graphic.symbol:null}set _graphicSymbol(l){this.graphic.symbol=l}startInteraction(){const l=this._graphicSymbol,f=this.findLayerView();if(null!=this._interactionState||null==l||null==f)return p;var k=l.symbolLayers.map(I=>
"object"===I.type?f.getSymbolLayerSize(l,I):null).toArray();const n=l.clone();this._interactionState=k=new b({originalSymbol:n,angle:this.angle,initialSizes:k});const C=()=>{this._interactionState=null};return{state:k,done:C,cancel:()=>{this._graphicSymbol=n;C()}}}createUndoRecord(){let l=this.graphic.symbol,f=null;return{undo:k=>{f=k.symbol;k.symbol=l},redo:k=>{l=k.symbol;k.symbol=f}}}_updateSymbol({scale:l,angle:f,originalSymbol:k,initialSizes:n}){var C=this._graphicSymbol;if(null!=C&&"point-3d"===
C.type){C=C.clone();var I=-h.rad2deg(f-this.initialAngle),w=!1;this._forEachObjectSymbolLayerPair(k,C,(y,F,G)=>{y=(y.heading??0)+I;F.heading!==y&&(F.heading=y,w=!0);G=n[G];null!=G&&"width"in G&&(G.width=this.sizeFilter(G.width),G.height=this.sizeFilter(G.height),G.depth=this.sizeFilter(G.depth),y=G.width*l,F.width!==y&&(F.width=y,w=!0),y=G.depth*l,F.depth!==y&&(F.depth=y,w=!0),G=G.height*l,F.height!==G&&(F.height=G,w=!0))});w&&(this._graphicSymbol=C)}}_forEachObjectSymbolLayerPair(l,f,k){l.symbolLayers.forEach((n,
C)=>{const I=f.symbolLayers.at(C);"object"===n.type&&"object"===I.type&&k(n,I,C)})}};c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"initialAngle",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"angle",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"angleClockwise",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"orientation",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,
"orientationClockwise",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"relativeAngle",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"relativeAngleClockwise",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"scale",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"size",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"sizeAxis",void 0);c.__decorate([m.property({constructOnly:!0})],
a.ScaleRotateObjectSymbol3DAdapter.prototype,"graphic",void 0);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"_interactionState",void 0);c.__decorate([m.property({constructOnly:!0})],a.ScaleRotateObjectSymbol3DAdapter.prototype,"findLayerView",void 0);c.__decorate([m.property({constructOnly:!0})],a.ScaleRotateObjectSymbol3DAdapter.prototype,"sizeFilter",void 0);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"_sizeReferenceSymbolLayer",null);c.__decorate([m.property()],
a.ScaleRotateObjectSymbol3DAdapter.prototype,"_orientationReferenceSymbolLayer",null);c.__decorate([m.property()],a.ScaleRotateObjectSymbol3DAdapter.prototype,"_graphicSymbol",null);a.ScaleRotateObjectSymbol3DAdapter=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.transform.ScaleRotateObjectSymbol3DAdapter")],a.ScaleRotateObjectSymbol3DAdapter);const p={state:{angle:0,scale:0},done:()=>{},cancel:()=>{}};let b=class extends g{get state(){const {originalSymbol:l,angle:f,initialAngle:k,
scale:n,initialSizes:C}=this;return{originalSymbol:l,angle:f,initialAngle:k,scale:n,initialSizes:C}}constructor(l){super(l);this.initialAngle=this.angle=0;this.scale=1;this.initialAngle=l.angle}};c.__decorate([m.property()],b.prototype,"originalSymbol",void 0);c.__decorate([m.property()],b.prototype,"angle",void 0);c.__decorate([m.property()],b.prototype,"initialAngle",void 0);c.__decorate([m.property()],b.prototype,"initialSizes",void 0);c.__decorate([m.property()],b.prototype,"scale",void 0);c.__decorate([m.property()],
b.prototype,"state",null);b=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.transform.ScaleRotateObjectSymbol3DAdapter.InteractionState")],b);a.headingToAngle=u;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/ScaleRotateTransform":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/Accessor ../../../../../core/colorUtils ../../../../../core/Cyclical ../../../../../core/Evented ../../../../../core/has ../../../../../core/mathUtils ../../../../../core/maybe ../../../../../core/quantityUtils ../../../../../core/reactiveUtils ../../../../../core/scheduling ../../../../../core/screenUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass ../../../../../core/libs/gl-matrix-2/math/mat4 ../../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../../chunks/vec32 ../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../geometry/support/plane ../../../../../geometry/support/ray ../../../../../geometry/support/vectorStacks ../../Manipulator3D ../../manipulatorUtils ../../RenderObject ../dragEventPipeline3D ../ManipulatorType ../manipulations/config ../../../webgl-engine/lib/basicInterfaces ../../../webgl-engine/lib/GeometryUtil ../../../webgl-engine/lib/Material ../../../webgl-engine/materials/ColorMaterial ../../../../interactive/dragEventPipeline ../../../../interactive/interfaces ../../../../interactive/tooltip/Tooltip ../../../../interactive/tooltip/infos/TransformAbsoluteTooltipInfo ../../../../interactive/tooltip/infos/TransformRotateTooltipInfo ../../../../interactive/tooltip/infos/TransformScaleTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D,E,H,J,L,N,M,K,P,U,V,ca){function ja(fa,oa){var ba=w.subtract(q.sv3d.get(),oa.renderStart,fa.origin);fa=w.subtract(q.sv3d.get(),oa.renderEnd,fa.origin);ba=w.length(ba);fa=w.length(fa);return 0===ba?0:fa/ba}function la(fa,oa,ba,R){const {renderStart:Z,renderEnd:ka}=fa;var ra=Q(Z,R,q.sv3d.get());fa=Q(ka,R,q.sv3d.get());if(w.squaredDistance(ra,fa)<E.dragThresholdPx*E.dragThresholdPx)return null;const O=w.subtract(q.sv3d.get(),Z,ba);oa=
w.cross(q.sv3d.get(),O,F.getNormal(oa));oa=w.add(q.sv3d.get(),Z,oa);ba=Q(ba,R,q.sv3d.get());R=Q(oa,R,q.sv3d.get());oa=w.subtract(q.sv3d.get(),R,ra);R=w.subtract(q.sv3d.get(),ra,ba);ra=G.wrap(ra,oa);R=G.wrap(ba,R);return G.distance2(ra,fa)<G.distance2(R,fa)?"rotate":"scale"}function Q(fa,oa,ba){oa.projectToScreen(fa,qa);return w.set(ba,qa[0],qa[1],0)}function aa(fa,oa){let ba=null,R=1;const Z=()=>R;return{start:()=>{R=fa.getScale();ba=fa.getScale;fa.getScale=Z;oa()},update:ka=>{R+=((R+1)/2-R)*Math.min(ka*
E.ringResetAnimationSpeedFactor,1);oa();return.01>Math.abs(R-1)?ta.STOP:ta.CONTINUE},destroy:()=>{ba&&(fa.getScale=ba);oa()}}}function na(fa,oa,ba){let R=0,Z=null;const ka=()=>!1;return{start:()=>{Z=fa.getFocused;fa.getFocused=ka;R=0;oa()},update:ra=>{R+=ra;return!Z?.()||R>=ba.delayMs?ta.STOP:ta.CONTINUE},destroy:()=>{Z&&(fa.getFocused=Z);oa()}}}function ha(fa){switch(fa){case "integer":case "long":return 0;default:return null}}var da;(function(fa){fa.ScaleIn=K.ManipulatorStateCustomFlags.Custom2;
fa.ScaleOut=K.ManipulatorStateCustomFlags.Custom3;fa.RotateLeft=K.ManipulatorStateCustomFlags.Custom4;fa.RotateRight=K.ManipulatorStateCustomFlags.Custom5;fa.Unlocked=K.ManipulatorStateCustomFlags.Custom7;fa.DelayedFocused=K.ManipulatorStateCustomFlags.Custom8;fa.TouchInput=K.ManipulatorStateCustomFlags.Custom12})(da||={});a.ScaleRotateTransform=class extends g{get angle(){return this.adapter.angle}get scale(){return this.adapter.scale}set location(fa){this._ringManipulator.location=fa}set elevationAlignedLocation(fa){this._ringManipulator.elevationAlignedLocation=
fa}get grabbing(){return this._ringManipulator.grabbing}set interactive(fa){this._ringManipulator.interactive=fa}get updating(){return!!this._activeAnimation}get tooltipEffectiveEnabled(){return this.sketchOptions.tooltips.effectiveEnabled&&this.tooltipEnabled}constructor(fa){super(fa);this.mode=null;this.tooltipEnabled=!0;this._activeAnimation=this._scaleRotateDragData=null;this._ringIndicatorDelayMs=E.ringIndicatorDelayMs;this._rotateTooltipInfo=this._scaleTooltipInfo=this._absoluteTooltipInfo=
null;this.events=new m;this.getFocused=()=>this._ringManipulator.focused;this.getScale=()=>"scale"===this._scaleRotateDragData?.mode?this.adapter.scale:1}initialize(){this.tooltip=new P.Tooltip({view:this.tool.view});this._createManipulator();this._updateDragState();this._updateManipulatorTransform();this.addHandles([u.when(()=>!this.tooltipEffectiveEnabled,()=>this.tooltip.clear(),u.initial),u.watch(()=>{const {adapter:fa}=this,{info:oa}=this.tooltip;return oa===this._absoluteTooltipInfo&&this.getFocused()?
[oa,fa.size,fa.orientationClockwise]:[null]},([fa])=>{fa&&this._updateFocusTooltip()}),u.watch(()=>{const {adapter:fa}=this;return[fa.angle,fa.scale]},()=>this._updateManipulatorTransform())])}destroy(){this._activeAnimation?.frameTask.remove();this._activeAnimation=null;this.tool.manipulators.remove(this._ringManipulator);this._ringManipulator=null;this.tooltip=t.destroyMaybe(this.tooltip)}startAnimation(fa){this.cancelActiveAnimation();fa.start();const oa=p.addFrameTask({update:({deltaTime:ba})=>
{fa.update(ba)&&this.cancelActiveAnimation()}});this._activeAnimation={...fa,frameTask:oa}}cancelActiveAnimation(){this._activeAnimation?.frameTask.remove();this._activeAnimation=t.destroyMaybe(this._activeAnimation)}forEachManipulator(fa){fa(this._ringManipulator,D.ManipulatorType.SCALE_ROTATE)}_createManipulator(){const fa=this._createRingManipulator();this._ringManipulator=fa;this.tool.manipulators.add(fa);const oa=this.tool.object,ba=M.createManipulatorDragEventPipeline(fa,(R,Z,ka)=>{this._scaleRotateDragData=
null;const ra=this.adapter.startInteraction(),O={mode:"none",origin:y.clone(R.renderLocation),initialAngle:this.adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=O;this._updateDragState();const W=q.sv3d.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(R.renderLocation,W);Z.next(A.screenToRenderPlane(this.tool.view,F.fromPositionAndNormal(R.renderLocation,W,F.create()))).next(X=>{var Y=F.getNormal(X.plane);Y=e.calculateInputRotationTransform(X.renderStart,X.renderEnd,
O.origin,Y);var ea=d.cyclicalPI.shortestSignedDiff(O.angle,Y);O.angleDir=x.clamp(O.angleDir+ea,-E.rotateIndicatorDirectionBuffer,E.rotateIndicatorDirectionBuffer);O.angle=Y;ea=ja(O,X);O.scaleDir=x.clamp(O.scaleDir+(ea-this.adapter.scale),-E.scaleIndicatorDirectionBuffer,E.scaleIndicatorDirectionBuffer);this._onScaleChanged();if("none"===O.mode){const ia=this.mode||la(X,X.plane,O.origin,this.tool.view.state.camera);if(null!=ia){switch(ia){case "rotate":this.tool.events.emit("rotate-start",{object:oa,
angle:0});this.tool.events.emit("record-undo",{updates:[this.adapter.createUndoRecord()]});break;case "scale":this.tool.events.emit("scale-start",{object:oa,xScale:1,yScale:1}),this.tool.events.emit("record-undo",{updates:[this.adapter.createUndoRecord()]})}O.mode=ia}}switch(O.mode){case "rotate":ra.state.angle=O.initialAngle+Y;break;case "scale":ra.state.scale=ea,this._onScaleChanged()}this._updateDragState();this._updateManipulatorTransform();switch(X.action){case "start":case "update":switch(O.mode){case "rotate":this.tool.events.emit("rotate",
{object:oa,angle:x.rad2deg(O.angle)});break;case "scale":this.tool.events.emit("scale",{object:oa,xScale:ea,yScale:ea})}break;case "end":switch(O.mode){case "rotate":this.tool.events.emit("rotate-stop",{object:oa,angle:x.rad2deg(O.angle)});break;case "scale":this.tool.events.emit("scale-stop",{object:oa,xScale:ea,yScale:ea})}}"end"===X.action&&(this.startAnimation(aa(this,()=>this._onScaleChanged())),this._scaleRotateDragData=null,this._updateDragState(),ra.done());return X}).next(this._updateTooltipPipelineStep(O));
ka.next(()=>{ra.cancel();if(null!=this._scaleRotateDragData){switch(this._scaleRotateDragData.mode){case "rotate":this.tool.events.emit("rotate-stop",{object:oa,angle:0});break;case "scale":this.tool.events.emit("scale-stop",{object:oa,xScale:1,yScale:1})}this.startAnimation(aa(this,()=>this._onScaleChanged()));this._scaleRotateDragData=null;this._updateDragState()}this._updateFocusTooltip()})});this.addHandles([ba,fa.events.on("focus-changed",R=>{"focus"===R.action?this.startAnimation(na(this,()=>
this._updateDelayedFocusedState(),{delayMs:this._ringIndicatorDelayMs})):this._updateDelayedFocusedState()}),fa.events.on("immediate-click",R=>{R.stopPropagation()}),u.watch(()=>this.tool.object.visible,R=>this._ringManipulator.available=R,u.initial)])}_updateTooltipPipelineStep(fa){return oa=>{const {sketchOptions:ba}=this;var {visualVariables:R}=ba.tooltips;if(!this.tooltipEffectiveEnabled)return oa;if("end"===oa.action)return this._updateFocusTooltip(),oa;var {tooltip:Z}=this;switch(fa.mode){case "scale":Z.info=
this._scaleTooltipInfo??(this._scaleTooltipInfo=new ca.TransformScaleTooltipInfo({sketchOptions:ba}));const {size:ka,scale:ra}=this.adapter;R=R?.size;Z=Z.info;Z.sketchOptions=ba;Z.scale=z.createScalar(ra);Z.size=null!=ka?z.createLength(ka,"meters"):void 0;Z.sizePrecision=ha(R?.valueType);Z.sizeUnit=R?.unit;break;case "rotate":Z.info=this._rotateTooltipInfo??(this._rotateTooltipInfo=new V.TransformRotateTooltipInfo({sketchOptions:ba}));const {orientationClockwise:O,relativeAngleClockwise:W}=this.adapter;
R=R?.rotation;const X=ha(R?.valueType);Z=Z.info;Z.sketchOptions=ba;Z.rotation=null!=W?z.createAngle(W,"radians","geographic"):void 0;Z.rotationPrecision=X;Z.rotationType=R?.rotationType??"geographic";Z.orientation=null!=O?z.createAngle(O,"radians","geographic"):void 0;Z.orientationPrecision=X}return oa}}_updateFocusTooltip(){const {sketchOptions:fa,tooltip:oa}=this;var {visualVariables:ba}=fa.tooltips;if(this.tooltipEffectiveEnabled)if(this.getFocused()){const Z=ba?.rotation;ba=ba?.size;var R=this.mode;
const {size:ka,orientationClockwise:ra}=this.adapter,O=null!=ra&&(null==R||"rotate"===R);R=null!=ka&&(null==R||"scale"===R);oa.info=this._absoluteTooltipInfo??(this._absoluteTooltipInfo=new U.TransformAbsoluteTooltipInfo({sketchOptions:fa}));const W=oa.info;W.sketchOptions=fa;W.orientation=O?z.createAngle(ra,"radians","geographic"):void 0;W.orientationPrecision=ha(Z?.valueType);W.rotationType=Z?.rotationType??"geographic";W.size=R?z.createLength(ka,"meters"):void 0;W.sizeUnit=ba?.unit;W.sizePrecision=
ha(ba?.valueType)}else oa.clear()}_onScaleChanged(){this.events.emit("scale-changed");this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(da.DelayedFocused,this.getFocused());this._updateFocusTooltip()}_updateDragState(){this._ringManipulator.updateStateEnabled(da.Unlocked,!(null!=this._scaleRotateDragData&&"none"!==this._scaleRotateDragData?.mode));if(null!=this._scaleRotateDragData)switch(this._scaleRotateDragData.mode){case "rotate":this._ringManipulator.updateStateEnabled(da.ScaleIn|
da.ScaleOut,!1);this._ringManipulator.updateStateEnabled(da.RotateLeft,0>this._scaleRotateDragData.angleDir);this._ringManipulator.updateStateEnabled(da.RotateRight,0<=this._scaleRotateDragData.angleDir);break;case "scale":this._ringManipulator.updateStateEnabled(da.RotateLeft|da.RotateRight,!1),this._ringManipulator.updateStateEnabled(da.ScaleIn,0>this._scaleRotateDragData.scaleDir),this._ringManipulator.updateStateEnabled(da.ScaleOut,0<=this._scaleRotateDragData.scaleDir)}else this._ringManipulator.updateStateEnabled(da.ScaleIn|
da.ScaleOut|da.RotateLeft|da.RotateRight,!1)}_updateManipulatorTransform(){const fa=C.fromRotation(q.sm4d.get(),this.adapter.angle,y.fromValues(0,0,1));if(null!=fa){var oa=this.getScale();oa=C.fromScaling(q.sm4d.get(),w.set(q.sv3d.get(),oa,oa,oa));this._ringManipulator.modelTransform=C.multiply(q.sm4d.get(),oa,fa)}}_createRingManipulator(){var fa=(xa,za,Ba)=>{const S=[],T=Math.ceil(E.geometrySegments*(za-xa)/(2*Math.PI));for(let ma=0;ma<T+1;ma++){const sa=xa+ma*(za-xa)/T;S.push(y.fromValues(Ba*Math.cos(sa),
Ba*Math.sin(sa),0))}return S};const oa=this._createMaterial(1);var ba=(xa,za,Ba=oa)=>J.createPathExtrusionGeometry(Ba,[[-za/2,0],[za/2,0],[za/2,E.ringHeight/2],[-za/2,E.ringHeight/2]],xa,[],[],!1),R=fa(0,2*Math.PI,E.ringRadius),Z=ba(R,E.ringThickness),ka=[],ra=[];const O=[];for(var W=0;2>W;W++){var X=W*Math.PI-Math.PI/4,Y=Math.PI/2-E.rotateIndicatorArcLength,ea=X+Y;X=X+Math.PI/2-Y;Y=fa(ea,X,E.innerIndicatorRadius);var ia=ba(Y,E.indicatorThickness);O.push(Y);O.push(fa(ea,X,E.outerIndicatorRadius-E.ringThickness/
2));ka.push(ia);ra.push(ia.instantiate());for(ia=0;2>ia;ia++){var pa=0===ia,ua=I.create();if(pa){C.scale(ua,ua,[1,-1,1]);C.rotate(ua,ua,-ea,[0,0,1]);var va=Math.round(E.rotateIndicatorArrowPlacementPercentage*(Y.length-1));ua[12]=Y[va][0];ua[13]=Y[va][1];ua[14]=Y[va][2]}else C.rotate(ua,ua,X,[0,0,1]),va=Math.round((1-E.rotateIndicatorArrowPlacementPercentage)*(Y.length-1)),ua[12]=Y[va][0],ua[13]=Y[va][1],ua[14]=Y[va][2];va=J.createExtrudedTriangle(oa,E.rotateIndicatorArrowTipLength,0,E.rotateIndicatorArrowTipRadius,
E.ringHeight);J.transformInPlace(va,ua);(pa?ka:ra).push(va)}}W=[];for(ea=0;2>ea;ea++)X=ea*Math.PI-Math.PI/4,Y=Math.PI/2-E.scaleIndicatorArcLength,X=fa(X+Y,X+Math.PI/2-Y,E.outerIndicatorRadius),W.push(ba(X,E.indicatorThickness));pa=this._createMaterial(.66);ea=this._createMaterial(.5);Y=this._createMaterial(.33);X=fa(0,2*Math.PI,E.ringRadius+E.scaleIndicatorOffset1);ia=fa(0,2*Math.PI,E.ringRadius+E.scaleIndicatorOffset2);X=ba(X,E.indicatorThickness,pa);ia=ba(ia,E.indicatorThickness,Y);ua=fa(0,2*Math.PI,
E.ringRadius-E.scaleIndicatorOffset1);fa=fa(0,2*Math.PI,E.ringRadius-E.scaleIndicatorOffset2);pa=ba(ua,E.indicatorThickness,pa);ba=ba(fa,E.indicatorThickness,Y);Z=[new v.RenderObject(Z,da.DelayedFocused),new v.RenderObject(Z.instantiate({material:ea}),K.ManipulatorStateFlags.None)];this.mode&&"scale"!==this.mode||(Z=Z.concat([...W.map(xa=>new v.RenderObject(xa,da.DelayedFocused|da.Unlocked)),new v.RenderObject(X,da.DelayedFocused|da.ScaleIn),new v.RenderObject(ia,da.DelayedFocused|da.ScaleIn),new v.RenderObject(pa,
da.DelayedFocused|da.ScaleOut),new v.RenderObject(ba,da.DelayedFocused|da.ScaleOut)]));this.mode&&"rotate"!==this.mode||(Z=Z.concat([...ra.map(xa=>new v.RenderObject(xa.instantiate(),da.DelayedFocused|da.Unlocked)),...ka.map(xa=>new v.RenderObject(xa,da.DelayedFocused|da.RotateLeft)),...ra.map(xa=>new v.RenderObject(xa,da.DelayedFocused|da.RotateRight))]));R=[R,...O];return new B.Manipulator3D({view:this.tool.view,renderObjects:Z,autoScaleRenderObjects:!1,worldOriented:!0,radius:E.ringThickness,focusMultiplier:1,
touchMultiplier:1.5,elevationInfo:this.tool.object.elevationInfo,collisionType:{type:"ribbon",paths:R,direction:y.fromValues(0,0,1)}})}_createMaterial(fa){const oa=new N.ColorMaterial({cullFace:H.CullFaceOptions.Back,renderOccluded:L.RenderOccludedFlag.Transparent,isDecoration:!0});this.addHandles(u.watch(()=>({color:h.multiplyOpacityToUnitRGBA(this.tool.view.effectiveTheme.accentColor,fa)}),ba=>oa.setParameters(ba),u.initial));return oa}get test(){}};c.__decorate([l.property({constructOnly:!0})],
a.ScaleRotateTransform.prototype,"tool",void 0);c.__decorate([l.property({constructOnly:!0})],a.ScaleRotateTransform.prototype,"adapter",void 0);c.__decorate([l.property({constructOnly:!0})],a.ScaleRotateTransform.prototype,"sketchOptions",void 0);c.__decorate([l.property()],a.ScaleRotateTransform.prototype,"mode",void 0);c.__decorate([l.property()],a.ScaleRotateTransform.prototype,"tooltipEnabled",void 0);c.__decorate([l.property()],a.ScaleRotateTransform.prototype,"_activeAnimation",void 0);c.__decorate([l.property()],
a.ScaleRotateTransform.prototype,"updating",null);c.__decorate([l.property()],a.ScaleRotateTransform.prototype,"tooltipEffectiveEnabled",null);a.ScaleRotateTransform=c.__decorate([n.subclass("esri.views.3d.interactive.editingTools.transform.ScaleRotateTransform")],a.ScaleRotateTransform);var ta;(function(fa){fa[fa.CONTINUE=0]="CONTINUE";fa[fa.STOP=1]="STOP"})(ta||={});const qa=b.createScreenPointArray();Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TransformAbsoluteTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x){a.TransformAbsoluteTooltipInfo=class extends x.SketchTooltipInfo{constructor(t){super(t);this.type="transform-absolute";this.orientationPrecision=this.orientation=null;this.rotationType="geographic";this.sizeUnit=this.sizePrecision=this.size=null}};c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,"type",void 0);c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,"orientation",void 0);c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,
"orientationPrecision",void 0);c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,"rotationType",void 0);c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,"size",void 0);c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,"sizePrecision",void 0);c.__decorate([g.property()],a.TransformAbsoluteTooltipInfo.prototype,"sizeUnit",void 0);a.TransformAbsoluteTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.TransformAbsoluteTooltipInfo")],
a.TransformAbsoluteTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TransformRotateTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),function(a,c,g,h,d,m,r,x){a.TransformRotateTooltipInfo=class extends x.SketchTooltipInfo{constructor(t){super(t);
this.type="transform-rotate";this.orientationPrecision=this.orientation=this.rotationPrecision=this.rotation=null;this.rotationType="geographic"}};c.__decorate([g.property()],a.TransformRotateTooltipInfo.prototype,"type",void 0);c.__decorate([g.property()],a.TransformRotateTooltipInfo.prototype,"rotation",void 0);c.__decorate([g.property()],a.TransformRotateTooltipInfo.prototype,"rotationPrecision",void 0);c.__decorate([g.property()],a.TransformRotateTooltipInfo.prototype,"orientation",void 0);c.__decorate([g.property()],
a.TransformRotateTooltipInfo.prototype,"orientationPrecision",void 0);c.__decorate([g.property()],a.TransformRotateTooltipInfo.prototype,"rotationType",void 0);a.TransformRotateTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.TransformRotateTooltipInfo")],a.TransformRotateTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TransformScaleTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x){a.TransformScaleTooltipInfo=class extends x.SketchTooltipInfo{constructor(t){super(t);this.type="transform-scale";this.sizePrecision=this.sizeUnit=this.size=null}};c.__decorate([g.property()],a.TransformScaleTooltipInfo.prototype,"type",void 0);c.__decorate([g.property()],a.TransformScaleTooltipInfo.prototype,"scale",void 0);c.__decorate([g.property()],a.TransformScaleTooltipInfo.prototype,"size",void 0);c.__decorate([g.property()],a.TransformScaleTooltipInfo.prototype,"sizeUnit",
void 0);c.__decorate([g.property()],a.TransformScaleTooltipInfo.prototype,"sizePrecision",void 0);a.TransformScaleTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.TransformScaleTooltipInfo")],a.TransformScaleTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TransformMeshTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../fields/fields ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),
function(a,c,g,h,d,m,r,x,t,z){a.TransformMeshTooltipInfo=class extends z.TooltipInfoWithCoordinates(t.SketchTooltipInfo){constructor(u){super(u);this.type="transform-mesh";this.orientation=x.makeOrientationField({actual:null,lockable:!1});this.scale=x.makeScaleField({actual:null,lockable:!1});this.allFields.forEach(p=>{p.lockable=!1;p.setActual(null)})}get key(){return{longitude:this.longitude.actual,latitude:this.latitude.actual,x:this.x.actual,y:this.y.actual,elevation:this.elevation.actual,geographic:this.geographic,
orientation:this.orientation.actual,scale:this.scale.actual}}get allFields(){return[this.longitude,this.latitude,this.x,this.y,this.elevation,this.orientation,this.scale]}};c.__decorate([g.property()],a.TransformMeshTooltipInfo.prototype,"key",null);c.__decorate([g.property()],a.TransformMeshTooltipInfo.prototype,"allFields",null);a.TransformMeshTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.TransformMeshTooltipInfo")],a.TransformMeshTooltipInfo);Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/TransformPointTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo ./TooltipInfoWithCoordinates".split(" "),function(a,c,g,h,d,m,r,x,t){a.TransformPointTooltipInfo=class extends t.TooltipInfoWithCoordinates(x.SketchTooltipInfo){constructor(z){super(z);
this.type="transform-point";this.allFields.forEach(u=>{u.lockable=!1;u.setActual(null)})}get allFields(){return[this.longitude,this.latitude,this.x,this.y,this.elevation]}};c.__decorate([g.property()],a.TransformPointTooltipInfo.prototype,"allFields",null);a.TransformPointTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.TransformPointTooltipInfo")],a.TransformPointTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/ExtentTransformTool":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/Evented ../../../../../core/handleUtils ../../../../../core/has ../../../../../core/reactiveUtils ../../../../../core/accessorSupport/decorators/property ../../../../../core/Logger ../../../../../core/RandomLCG ../../../../../core/accessorSupport/decorators/subclass ../../../../../geometry/support/aaBoundingRect ../../../../../geometry/support/vectorStacks ../../../analysis/Slice/sliceToolUtils ../../Manipulator3D ../manipulatedObjectUtils ../ManipulatorType ../manipulatorUtils ../visualElementUtils ./extentTransform/ExtentMove ./extentTransform/ExtentRotate ./extentTransform/ExtentScale ./extentTransform/extentUtils ./extentTransform/PreserveAspectRatio ./extentTransform/SnapRotation ../../visualElements/OutlineVisualElement ../../../../interactive/InteractiveToolBase ../../../../interactive/sketch/SketchOptions ../../../../interactive/tooltip/Tooltip".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A){a.ExtentTransformTool=class extends e.InteractiveToolBase{get updating(){return!!this.object.updating}constructor(D){super(D);this.events=new g;this.enableRotation=this.enableScaling=this.enableZ=!0;this.sketchOptions=new v;this._preserveAspectRatio=new G.PreserveAspectRatio;this._snapRotation=new q.SnapRotation;this.grabbing=!1;this._attachmentOrigin=this.inputState=null;this.type="transform-3d";this._outlineVisualElement=null}initialize(){const {view:D,
object:E}=this,H=this._bounds=new F.TransformBounds(this,()=>this._updateManipulators());this._extentMove=new I.ExtentMove(this,H);this._extentScale=new y.ExtentScale(this,H,()=>this._preserveAspectRatio.createDragEventPipelineStep());this._extentRotate=new w.ExtentRotate(this,H,()=>this._snapRotation.createDragEventPipelineStep());this.addHandles([m.watch(()=>this.enableZ,()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,k.ManipulatorType.TRANSLATE_Z)),m.watch(()=>this.enableScaling,
()=>this._extentScale.forEachManipulator(L=>this._updateManipulatorAvailability(L,k.ManipulatorType.SCALE))),m.watch(()=>this.enableRotation,()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,k.ManipulatorType.ROTATE))]);this._updateManipulators();this._updateAllManipulatorAvailability();const J=C.createVisualElements({view:D,object:E,forEachManipulator:L=>this._forEachManipulator(L),onManipulatorsChanged:()=>h.makeHandle()});if(null!=J){const {visualElement:L}=J;L instanceof
B.OutlineVisualElement&&(this._outlineVisualElement=L,this.addHandles(L.events.on("attachment-origin-changed",()=>this._bounds.updateDisplayBounds())));this.addHandles(J)}this.addHandles([E.on("committed",()=>this._onGeometryChanged()),m.watch(()=>this.object.visible,()=>this._updateAllManipulatorAvailability()),m.watch(()=>this.object.isDraped,()=>this._graphicDrapedChanged(),m.initial),m.watch(()=>D.pointsOfInterest?.centerOnSurfaceFrequent.location,()=>H.updateDisplayBounds())]);this._forEachManipulator(L=>
{this.addHandles(L.events.on("grab-changed",()=>{this.grabbing=L.grabbing;this._updateAllManipulatorAvailability()}))});this._forEachManipulator((L,N)=>{this.addHandles(L.events.on("immediate-click",M=>{N===k.ManipulatorType.TRANSLATE_XY&&this.events.emit("immediate-click",{...M,object:E});M.stopPropagation()}))});this._initializeTooltip();this.finishToolCreation()}destroy(){this._extentMove.destroy();this._extentScale.destroy();this._extentRotate.destroy();this.tooltip.destroy();this._set("view",
null);this._set("object",null)}_initializeTooltip(){const {view:D}=this,E=this.tooltip=new A.Tooltip({view:D}),H=()=>{E.info=this._getUpdatedTooltipInfo()};this.addHandles([m.watch(()=>this.sketchOptions.tooltips.effectiveEnabled,H),this.events.on("translate-start",H),this.events.on("translate",H),this.events.on("translate-stop",()=>this.tooltip.clear()),this.events.on("rotate-start",H),this.events.on("rotate",H),this.events.on("rotate-stop",H),this.events.on("scale-start",H),this.events.on("scale",
H),this.events.on("scale-stop",H)]);this._forEachManipulator(J=>{this.addHandles([J.events.on("focus-changed",H),J.events.on("grab-changed",H),J.events.on("drag",L=>{"cancel"===L.action?this.tooltip.clear():H()})])})}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles("draped-elevation-changes");
this._bounds.updateDisplayBounds();this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",D=>{null!=this._attachmentOrigin&&u.containsXY(D.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()}),"draped-elevation-changes")}_updateManipulators(){if(this.visible){var D=this._bounds.displayBounds,E=b.calculateBoundedPlaneTranslateRotate(D,p.sm4d.get());this._extentMove.updateManipulators(E,D);this._extentScale.updateManipulators(E,
D);this._extentRotate.updateManipulators(E,D)}}_updateAllManipulatorAvailability(){this._forEachManipulator((D,E)=>this._updateManipulatorAvailability(D,E))}_updateManipulatorAvailability(D,E){const H=this.grabbing&&!D.grabbing;D.interactive=!H;if(D instanceof l.Manipulator3D){const J=this.object.visible,L=this.enableZ&&n.canMoveZOperations(this.object.operations,this.object.elevationInfo);switch(E){case k.ManipulatorType.ROTATE:D.available=J&&this.enableRotation;break;case k.ManipulatorType.SCALE:D.available=
J&&(this.enableScaling||this.enableRotation||L);D.interactive=!H&&this.enableScaling;D.state=this.enableScaling?b.resizeNormal:b.resizeOutlineOnly;break;case k.ManipulatorType.TRANSLATE_Z:D.available=J&&L;break;default:D.available=J}}}_forEachManipulator(D){this._extentMove.forEachManipulator(D);this._extentScale.forEachManipulator(D);this._extentRotate.forEachManipulator(D)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(D){this._preserveAspectRatio.enabled=
D;this._set("preserveAspectRatio",D)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(D){this._snapRotation.enabled=D;this._set("snapRotation",D)}get attachmentOrigin(){return this._attachmentOrigin=(this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin)??this.object.origin??f.manipulatedObjectGeometry(this.object)?.extent?.center}reset(){}cancel(){if(this.canUndo){const D=this.object.operations?.undo();D&&this._bounds.updateMapBoundsFromOperationInverse(D)}this.inputState=
null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const D=this.object.operations?.undo();D&&this._bounds.updateMapBoundsFromOperationInverse(D)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const D=this.object.operations?.redo();D&&this._bounds.updateMapBoundsFromOperation(D)}}get test(){}};c.__decorate([r.property()],a.ExtentTransformTool.prototype,"updating",null);c.__decorate([r.property({constructOnly:!0,
nonNullable:!0})],a.ExtentTransformTool.prototype,"view",void 0);c.__decorate([r.property({constructOnly:!0,nonNullable:!0})],a.ExtentTransformTool.prototype,"object",void 0);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"enableZ",void 0);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"enableScaling",void 0);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"enableRotation",void 0);c.__decorate([r.property({constructOnly:!0,type:v})],a.ExtentTransformTool.prototype,
"sketchOptions",void 0);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"preserveAspectRatio",null);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"snapRotation",null);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"grabbing",void 0);c.__decorate([r.property()],a.ExtentTransformTool.prototype,"inputState",void 0);c.__decorate([r.property({readOnly:!0})],a.ExtentTransformTool.prototype,"type",void 0);c.__decorate([r.property()],a.ExtentTransformTool.prototype,
"tooltip",void 0);a.ExtentTransformTool=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],a.ExtentTransformTool);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/Slice/sliceToolUtils":function(){define("exports ../../../../geometry ../../../../analysis/SlicePlane ../../../../core/has ../../../../core/Logger ../../../../core/mathUtils ../../../../core/screenUtils ../../../../core/libs/gl-matrix-2/math/mat4 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../geometry/projection ../../../../geometry/support/Axis ../../../../chunks/boundedPlane ../../../../geometry/support/plane ../../../../geometry/support/ray ../../../../geometry/support/vector ../../../../geometry/support/vectorStacks ./settings ./sliceToolConfig ../support/projectionUtils ../../interactive/manipulatorUtils ../../interactive/visualElements/LineVisualElement ../../interactive/visualElements/SlicePlaneVisualElement ../../support/RenderCoordsHelper ../../support/geometryUtils/ray ../../webgl-engine/lib/Material ../../../interactive/interfaces ../../../../geometry/Point ../../../../geometry/Extent".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y,F,G,q,B,e,v,A,D){function E(Q,aa,na,ha,da,ta){const qa=t.dot(Q,aa),fa=n.sv3d.get(),oa=n.sv3d.get();switch(ha===a.SliceOrientation.HORIZONTAL_OR_VERTICAL?Math.abs(qa)>I.verticalDotThreshold?a.SliceOrientation.HORIZONTAL:a.SliceOrientation.VERTICAL:ha){case a.SliceOrientation.VERTICAL:t.cross(fa,Math.abs(qa)<=I.smallAngleDotThreshold?Q:na.viewUp,aa);t.copy(oa,aa);break;case a.SliceOrientation.HORIZONTAL:t.cross(fa,na.viewUp,aa);t.cross(oa,aa,fa);break;
case a.SliceOrientation.TILTED:t.cross(fa,Math.abs(qa)<=I.smallAngleDotThreshold?aa:na.viewUp,Q),t.cross(oa,Q,fa)}Q=t.cross(n.sv3d.get(),fa,oa);0<t.dot(Q,na.viewForward)&&t.scale(oa,oa,-1);t.normalize(da,fa);t.normalize(ta,oa)}function H(Q,aa,na){var ha=aa.worldUpAtPosition(Q.origin,n.sv3d.get());aa=Q.basis1;ha=k.angleAroundAxis(ha,Q.basis2,Q.basis1)+la;return b.rotate(Q,Math.round(ha/la)*la-ha,aa,na)}function J(Q,aa){switch(aa){case V.POSITIVE_X:return{basis:Q.basis1,direction:1,position:t.add(n.sv3d.get(),
Q.origin,Q.basis1),edge:aa};case V.POSITIVE_Y:return{basis:Q.basis2,direction:1,position:t.add(n.sv3d.get(),Q.origin,Q.basis2),edge:aa};case V.NEGATIVE_X:return{basis:Q.basis1,direction:-1,position:t.subtract(n.sv3d.get(),Q.origin,Q.basis1),edge:aa};case V.NEGATIVE_Y:return{basis:Q.basis2,direction:-1,position:t.subtract(n.sv3d.get(),Q.origin,Q.basis2),edge:aa}}}function L(Q,aa,na){const ha=na.projectToRenderScreen(t.add(n.sv3d.get(),Q,aa),r.castRenderScreenPointArray3(n.sv3d.get()));Q=na.projectToRenderScreen(t.subtract(n.sv3d.get(),
Q,aa),r.castRenderScreenPointArray3(n.sv3d.get()));return t.squaredLength(t.subtract(ha,ha,Q))}function N(Q){const aa=t.length(Q.basis1);Q=t.length(Q.basis2);return I.resizeHandleEdgePaddingFrac*Math.min(aa,Q)}function M(Q){return 0!==Q.direction[0]&&0!==Q.direction[1]}function K(Q,aa,na,ha,da,ta,qa=b.create()){if(!ta.toRenderCoords(Q,qa.origin))return d.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${Q.spatialReference.wkid} is not supported`),
null;ta.worldBasisAtPosition(qa.origin,p.Axis.X,qa.basis1);ta.worldBasisAtPosition(qa.origin,p.Axis.Y,qa.basis2);l.fromVectorsAndPoint(qa.basis2,qa.basis1,qa.origin,qa.plane);b.rotate(qa,-m.deg2rad(aa),b.normal(qa),qa);b.rotate(qa,m.deg2rad(na),qa.basis1,qa);t.scale(qa.basis1,qa.basis1,ha/2);t.scale(qa.basis2,qa.basis2,da/2);b.updateUnboundedPlane(qa);return qa}function P(Q,aa){if(null==Q?.position)return null;const na=w.applyProjectionAndElevationAlignment(Q.position,aa.spatialReference,aa.elevationProvider);
if(null==na)return null;aa=q.RenderCoordsHelper.renderUnitScaleFactor(Q.position.spatialReference,aa.spatialReference);return{position:na,heading:Q.heading,tilt:Q.tilt,renderWidth:Q.width*aa,renderHeight:Q.height*aa}}function U(Q,aa,na,ha=b.create()){if(null==Q)return null;Q=K(Q.position,Q.heading,Q.tilt,Q.renderWidth,Q.renderHeight,aa.renderCoordsHelper,ha);na.tiltEnabled||null==Q||H(Q,aa.renderCoordsHelper,Q);return Q}var V;(function(Q){Q[Q.POSITIVE_X=0]="POSITIVE_X";Q[Q.POSITIVE_Y=1]="POSITIVE_Y";
Q[Q.NEGATIVE_X=2]="NEGATIVE_X";Q[Q.NEGATIVE_Y=3]="NEGATIVE_Y"})(V||={});c=v.ManipulatorStateCustomFlags.Custom1;a.RotationAxis=void 0;(function(Q){Q[Q.HEADING=1]="HEADING";Q[Q.TILT=2]="TILT"})(a.RotationAxis||(a.RotationAxis={}));a.SliceOrientation=void 0;(function(Q){Q[Q.HORIZONTAL_OR_VERTICAL=0]="HORIZONTAL_OR_VERTICAL";Q[Q.HORIZONTAL=1]="HORIZONTAL";Q[Q.VERTICAL=2]="VERTICAL";Q[Q.TILTED=3]="TILTED"})(a.SliceOrientation||(a.SliceOrientation={}));const ca=v.ManipulatorStateCustomFlags.Custom2,ja=
f.create(),la=Math.PI/2;f=v.ManipulatorStateCustomFlags.Custom1;v=v.ManipulatorStateCustomFlags.Custom2;a.DidPointerMoveRecentlyFlag=c;a.IsShiftEdgeOnScreenFlag=ca;a.calculateBoundedPlaneTranslateRotate=function(Q,aa){return y.calculateTranslateRotateFromBases(Q.basis1,Q.basis2,Q.origin,aa)};a.calculateDiagonalResizeHandleScale=function(Q){return N(Q)};a.calculatePlaneHalfSize=function(Q,aa){return I.initialPlaneHalfSizeViewProportion*Math.min(aa.width,aa.height)*aa.computeRenderPixelSizeAt(Q)};a.createGridVisualElement=
function(Q){return new G.SlicePlaneVisualElement({view:Q,attached:!1,backgroundColor:C.planeColor,gridColor:C.getGridColor(Q.effectiveTheme),gridWidth:4,renderOccluded:e.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0})};a.createOutlineVisualElement=function(Q){return new F.LineVisualElement({view:Q,attached:!1,color:C.getOutlineColor(Q.effectiveTheme),width:I.planeOutlineWidth,renderOccluded:e.RenderOccludedFlag.OccludeAndTransparent,geometry:[[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,
0]]],isDecoration:!0})};a.createPlane=function(Q,aa,na,ha,da,ta,qa,fa){qa=qa.worldUpAtPosition(Q,n.sv3d.get());E(aa,qa,da,ta,fa.basis1,fa.basis2);t.scale(fa.basis1,fa.basis1,na);t.scale(fa.basis2,fa.basis2,ha);t.copy(fa.origin,Q);l.fromVectorsAndPoint(fa.basis2,fa.basis1,fa.origin,fa.plane);return fa};a.createRotatePlane=function(Q,aa,na,ha){aa=aa.worldUpAtPosition(Q.origin,n.sv3d.get());const da=n.sv3d.get();switch(na){case a.RotationAxis.HEADING:t.copy(da,aa);break;case a.RotationAxis.TILT:t.copy(da,
Q.basis1)}return l.fromPositionAndNormal(Q.origin,da,ha)};a.createShiftPlane=function(Q,aa,na,ha){na=t.cross(n.sv3d.get(),aa,na);t.cross(na,na,aa);return l.fromPositionAndNormal(Q,na,ha)};a.forceHorizontalOrVertical=H;a.isDiagonalResizeHandle=M;a.isIBuildingSceneLayerView3D=function(Q){return null!=("building-scene-3d"===Q.type?Q:null)};a.normalToBases=E;a.planeToExtent=function(Q,aa,na){if(null==Q)return null;const ha=Q.origin,da=n.sv3d.get(),ta=n.sv3d.get(),qa=n.sv3d.get(),fa=n.sv3d.get();t.add(da,
ha,Q.basis1);t.add(da,da,Q.basis2);t.add(ta,ha,Q.basis1);t.sub(ta,ta,Q.basis2);t.sub(qa,ha,Q.basis1);t.sub(qa,qa,Q.basis2);t.sub(fa,ha,Q.basis1);t.add(fa,fa,Q.basis2);let oa,ba,R,Z,ka,ra;for(const O of[da,ta,qa,fa]){Q=aa.fromRenderCoords(O,O,na);if(null==Q)return null;oa=null==oa?Q[0]:Math.min(oa,Q[0]);ba=null==ba?Q[0]:Math.max(ba,Q[0]);R=null==R?Q[1]:Math.min(R,Q[1]);Z=null==Z?Q[1]:Math.max(Z,Q[1]);ka=null==ka?Q[2]:Math.min(ka,Q[2]);ra=null==ra?Q[2]:Math.max(ra,Q[2])}return new D({xmin:oa,xmax:ba,
ymin:R,ymax:Z,zmin:ka,zmax:ra,spatialReference:na})};a.planeToShape=function(Q,aa,na,ha=new g){if(null==Q)return null;const {renderCoordsHelper:da}=aa;var ta=da.fromRenderCoords(Q.origin,new A({spatialReference:aa.spatialReference}));if(null==ta)return null;ta=u.tryProjectWithZConversion(ta,na);if(null==ta)return null;ha.position=ta;ta=2*t.length(Q.basis1);const qa=2*t.length(Q.basis2);aa=q.RenderCoordsHelper.renderUnitScaleFactor(aa.spatialReference,na);ha.width=ta*aa;ha.height=qa*aa;aa=da.worldUpAtPosition(Q.origin,
n.sv3d.get());ha.tilt=m.rad2deg(k.angleAroundAxis(aa,Q.basis2,Q.basis1)+la);ha.heading=da.headingAtPosition(Q.origin,Q.basis1)-90;return ha};a.projectAndElevationAlignShape=P;a.projectedShapeToPlane=U;a.resizeNormal=f;a.resizeOutlineOnly=v;a.resizePlane=function(Q,aa,na,ha,da,ta){const qa=t.copy(n.sv3d.get(),da.origin);t.add(qa,qa,t.scale(n.sv3d.get(),da.basis1,0>Q.direction[0]?1:-1));t.add(qa,qa,t.scale(n.sv3d.get(),da.basis2,0>Q.direction[1]?1:-1));var fa=t.length(da.basis1);const oa=t.length(da.basis2);
na=t.subtract(n.sv3d.get(),na,qa);var ba=t.subtract(n.sv3d.get(),aa,qa);let R=0;aa=0;if(M(Q)){var Z=N(da);const ka=N(ta);R=fa-.5*Q.direction[0]*t.dot(da.basis1,ba)/fa;aa=oa-.5*Q.direction[1]*t.dot(da.basis2,ba)/oa;ba=ka/Z;R*=ba;aa*=ba}ba=.5*Q.direction[0]*t.dot(da.basis1,na)/fa;Z=.5*Q.direction[1]*t.dot(da.basis2,na)/oa;na=R+ba;aa+=Z;fa=t.scale(n.sv3d.get(),da.basis1,na/fa);da=t.scale(n.sv3d.get(),da.basis2,aa/oa);(0>=na||L(ta.origin,fa,ha)<=I.planeMinBasisScreenLen2)&&t.copy(fa,ta.basis1);(0>=aa||
L(ta.origin,da,ha)<=I.planeMinBasisScreenLen2)&&t.copy(da,ta.basis2);ha=t.copy(n.sv3d.get(),qa);t.add(ha,ha,t.scale(n.sv3d.get(),fa,0>Q.direction[0]?-1:1));t.add(ha,ha,t.scale(n.sv3d.get(),da,0>Q.direction[1]?-1:1));return b.fromValues(ha,fa,da,ta)};a.shapeToPlane=function(Q,aa,na,ha=b.create()){Q=P(Q,aa);return null==Q?null:U(Q,aa,na,ha)};a.updateResizeHandle=function(Q,aa,na,ha){var da=t.length(ha.basis1);const ta=t.length(ha.basis2),qa=N(ha),fa=N(ha),oa=t.set(n.sv3d.get(),0,0,0);t.add(oa,t.scale(n.sv3d.get(),
ha.basis1,aa.direction[0]),t.scale(n.sv3d.get(),ha.basis2,aa.direction[1]));t.add(oa,ha.origin,oa);ha=0;let ba=1;M(aa)?(1===aa.direction[0]&&-1===aa.direction[1]?ha=la:1===aa.direction[0]&&1===aa.direction[1]?ha=Math.PI:-1===aa.direction[0]&&1===aa.direction[1]&&(ha=3*Math.PI/2),ba=fa):(aa=0!==aa.direction[0]?1:2,ha=1===aa?la:0,ba=(1===aa?ta:da)-qa);da=x.fromZRotation(n.sm4d.get(),ha);x.scale(da,da,t.set(n.sv3d.get(),ba,ba,ba));x.multiply(da,na,da);da[12]=0;da[13]=0;da[14]=0;Q.modelTransform=da;Q.renderLocation=
oa};a.updateRotateHeadingHandle=function(Q,aa,na,ha){ha=ha.worldUpAtPosition(na.origin,n.sv3d.get());const da=J(na,V.POSITIVE_X),ta=x.fromZRotation(n.sm4d.get(),da.edge*Math.PI/2);x.rotateX(ta,ta,-(k.angleAroundAxis(ha,na.basis2,na.basis1)+la));x.multiply(ta,aa,ta);ta[12]=0;ta[13]=0;ta[14]=0;Q.modelTransform=ta;Q.renderLocation=da.position};a.updateRotateTiltHandle=function(Q,aa,na){na=J(na,V.POSITIVE_Y);const ha=x.fromZRotation(n.sm4d.get(),na.edge*Math.PI/2);x.rotateX(ha,ha,la);x.multiply(ha,aa,
ha);ha[12]=0;ha[13]=0;ha[14]=0;Q.modelTransform=ha;Q.renderLocation=na.position};a.updateShiftRestartHandle=function(Q,aa,na,ha){var da=J(na,V.NEGATIVE_X);const ta=n.sm4d.get();x.rotateZ(ta,aa,da.edge*Math.PI/2);aa=t.normalize(n.sv3d.get(),da.basis);aa=t.scale(n.sv3d.get(),aa,da.direction*ha.computeScreenPixelSizeAt(da.position)*I.shiftRestartOffsetDistance);t.add(aa,aa,da.position);da=ha.projectToRenderScreen(aa,r.castRenderScreenPointArray3(n.sv3d.get()));const [qa,fa,oa,ba]=ha.viewport;var R=Math.min(oa,
ba)/16;let Z=!0;da[0]<qa+R?(da[0]=qa+R,Z=!1):da[0]>qa+oa-R&&(da[0]=qa+oa-R,Z=!1);da[1]<fa+R?(da[1]=fa+R,Z=!1):da[1]>fa+ba-R&&(da[1]=fa+ba-R,Z=!1);R=Z;B.fromRender(ha,da,ja);t.normalize(ja.direction,ja.direction);ha=n.sv3d.get();!R&&b.intersectRay(na,ja,ha)&&(aa=ha);ta[12]=0;ta[13]=0;ta[14]=0;Q.modelTransform=ta;Q.renderLocation=z.clone(aa);Q.state=R?Q.state|ca:Q.state&~ca};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/analysis/SlicePlane":function(){define("../chunks/tslib.es6 ../geometry ../core/Clonable ../core/Cyclical ../core/JSONSupport ../core/maybe ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/subclass ../core/accessorSupport/ensureType ../core/accessorSupport/decorators/persistable ../geometry/Point".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l){c=class extends g.ClonableMixin(d.JSONSupport){constructor(f){super(f);this.type="plane";this.position=null;this.tilt=this.heading=0;this.height=this.width=10}equals(f){return this.heading===f.heading&&this.tilt===f.tilt&&m.equalsMaybe(this.position,f.position)&&this.width===f.width&&this.height===f.height}};a.__decorate([r.property({readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0);a.__decorate([r.property({type:l}),b.persistable()],c.prototype,
"position",void 0);a.__decorate([r.property({type:Number,nonNullable:!0,range:{min:0,max:360}}),b.persistable(),x.cast(f=>h.cyclicalDegrees.normalize(p.ensureNumber(f),0,!0))],c.prototype,"heading",void 0);a.__decorate([r.property({type:Number,nonNullable:!0,range:{min:0,max:360}}),b.persistable(),x.cast(f=>h.cyclicalDegrees.normalize(p.ensureNumber(f),0,!0))],c.prototype,"tilt",void 0);a.__decorate([r.property({type:Number,nonNullable:!0}),b.persistable()],c.prototype,"width",void 0);a.__decorate([r.property({type:Number,
nonNullable:!0}),b.persistable()],c.prototype,"height",void 0);return c=a.__decorate([u.subclass("esri.analysis.SlicePlane")],c)})},"esri/views/3d/analysis/Slice/settings":function(){define(["exports","../../../../core/colorUtils","../../../../core/libs/gl-matrix-2/factories/vec4f64"],function(a,c,g){g=g.fromValues(0,0,0,.04);a.getGridColor=function({accentColor:h}){return c.multiplyOpacityToUnitRGBA(h,.5)};a.getOutlineColor=function({accentColor:h}){return c.multiplyOpacityToUnitRGBA(h,.7)};a.planeColor=
g;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/Slice/sliceToolConfig":function(){define(["exports","../../../../core/has","../../../../core/mathUtils"],function(a,c,g){c=c("mac")?"Meta":"Control";const h=Math.cos(g.deg2rad(45));g=Math.cos(g.deg2rad(5));a.displayFocusMultiplier=2;a.forceHorizontalModifier=c;a.forceVerticalModifier="Shift";a.initialDepthOffsetFrac=.02;a.initialPlaneHalfSizeViewProportion=.4;a.planeMinBasisScreenLen2=1600;a.planeOutlineWidth=
1;a.planePreviewOutlineWidth=2;a.pointerMoveTimerMs=2500;a.previewFadeDotThreshold=.95;a.previewFadeDurationSeconds=.3;a.resizeHandleCornerInputRadius=6;a.resizeHandleCornerWidth=4;a.resizeHandleEdgeInputRadius=4;a.resizeHandleEdgePaddingFrac=.3;a.resizeHandleEdgeWidth=1;a.shiftRestartArrowLength=48;a.shiftRestartArrowOutlineWidth=2.25;a.shiftRestartOffsetDistance=40;a.shiftRestartTipFocusMultiplier=1.15;a.shiftRestartTipLength=22.5;a.shiftRestartTipRadius=11;a.shiftRestartTubeFocusMultiplier=1.15;
a.shiftRestartTubeRadius=3;a.smallAngleDotThreshold=g;a.verticalDotThreshold=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/support/projectionUtils":function(){define(["exports","../../../../geometry/projection","../../support/ElevationProvider"],function(a,c,g){a.applyProjectionAndElevationAlignment=function(h,d,m,r=!1){h=c.tryProjectWithZConversion(h,d);if(null==h)return null;h.hasZ&&!r||null==m||(h.z=g.getElevationAtPoint(m,h)??0);return h};a.logFailedGeometryProjectionError=
function(h,d,m){m.warnOnce(`Failed to project analysis geometry (id: '${h.id}'), projection from spatial reference `+`(wkid: '${d.wkid}') to view spatial reference is not supported. `+"Projection may be possible after calling projection.load().")};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/LineVisualElement":function(){define("exports ../../../../core/libs/gl-matrix-2/math/mat4 ../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../core/libs/gl-matrix-2/factories/vec4f64 ./Object3DVisualElement ../../support/engineContent/line ../../webgl-engine/lib/Material ../../webgl-engine/materials/RibbonLineMaterial".split(" "),
function(a,c,g,h,d,m,r,x,t,z){class u extends r.Object3DVisualElement{constructor(b,l){super(b);this._hasExternalMaterial=!1;this._hasExternalMaterial=null!=l;this._material=null!=l?l:new z.RibbonLineMaterial({width:1,color:m.fromValues(1,0,1,1),stippleOffColor:null,stipplePattern:null,stipplePreferContinuous:!0,isClosed:!1,falloff:0,innerColor:null,innerWidth:1,hasPolygonOffset:!1,renderOccluded:t.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!!b.isDecoration,writeDepth:!0});this.applyProperties(b)}setGeometryFromRenderSpacePoint(b,
l=1E3){this.geometry=[[[b[0]-l,b[1],b[2]],[b[0]+l,b[1],b[2]]],[[b[0],b[1]-l,b[2]],[b[0],b[1]+l,b[2]]],[[b[0],b[1],b[2]-l],[b[0],b[1],b[2]+l]]]}setGeometryFromExtent(b){const l=this.view.spatialReference,f=d.create(),k=d.create(),n=[];h.set(f,b[0],b[1],100);this.view.renderCoordsHelper.toRenderCoords(f,l,k);n.push([k[0],k[1],k[2]]);h.set(f,b[2],b[1],100);this.view.renderCoordsHelper.toRenderCoords(f,l,k);n.push([k[0],k[1],k[2]]);h.set(f,b[2],b[3],100);this.view.renderCoordsHelper.toRenderCoords(f,
l,k);n.push([k[0],k[1],k[2]]);h.set(f,b[0],b[3],100);this.view.renderCoordsHelper.toRenderCoords(f,l,k);n.push([k[0],k[1],k[2]]);h.set(f,b[0],b[1],100);this.view.renderCoordsHelper.toRenderCoords(f,l,k);n.push([k[0],k[1],k[2]]);h.set(f,b[0],b[1],100);this.view.renderCoordsHelper.toRenderCoords(f,l,k);n.push([k[0],k[1],k[2]]);this.geometry=[n]}setGeometryFromFrustum(b){const l=[];b.lines.forEach(f=>{l.push([f.origin[0],f.origin[1],f.origin[2]]);l.push([f.endpoint[0],f.endpoint[1],f.endpoint[2]])});
this.geometry=[l]}setGeometryFromBoundedPlane(b){const l=[],f=b.origin,k=b.basis1;b=b.basis2;const n=d.create(),C=d.create(),I=d.create(),w=d.create();n[0]=f[0]-.5*k[0]-.5*b[0];n[1]=f[1]-.5*k[1]-.5*b[1];n[2]=f[2]-.5*k[2]-.5*b[2];C[0]=f[0]-.5*k[0]+.5*b[0];C[1]=f[1]-.5*k[1]+.5*b[1];C[2]=f[2]-.5*k[2]+.5*b[2];I[0]=f[0]+.5*k[0]+.5*b[0];I[1]=f[1]+.5*k[1]+.5*b[1];I[2]=f[2]+.5*k[2]+.5*b[2];w[0]=f[0]+.5*k[0]-.5*b[0];w[1]=f[1]+.5*k[1]-.5*b[1];w[2]=f[2]+.5*k[2]-.5*b[2];l.push([n[0],n[1],n[2]]);l.push([C[0],
C[1],C[2]]);l.push([I[0],I[1],I[2]]);l.push([w[0],w[1],w[2]]);l.push([n[0],n[1],n[2]]);this.geometry=[l]}setGeometryFromSegment(b){const l=b.endRenderSpace;this.transform=c.fromTranslation(p,l);({points:b}=b.createRenderGeometry(l,this.view.renderCoordsHelper));this.geometry=[b]}setGeometryFromSegments(b,l=d.ZEROS){this.transform=c.fromTranslation(p,l);this.geometry=b.map(f=>f.createRenderGeometry(l,this.view.renderCoordsHelper).points)}getTransformedGeometry(){return null==this._geometry?null:this._geometry.map(b=>
b.map(l=>h.transformMat4(d.create(),l,this.transform)))}get renderOccluded(){return this._material.parameters.renderOccluded}set renderOccluded(b){this._material.setParameters({renderOccluded:b})}get geometry(){return this._geometry}set geometry(b){this._geometry=b;this.recreateGeometry()}get width(){return this._material.parameters.width}set width(b){this._material.setParameters({width:b})}get color(){return this._material.parameters.color}set color(b){const l=1===b[3];this._material.setParameters({color:m.clone(b),
writeDepth:l})}get innerWidth(){return this._material.parameters.innerWidth}set innerWidth(b){this._material.setParameters({innerWidth:b})}get innerColor(){return this._material.parameters.innerColor}set innerColor(b){this._material.setParameters({innerColor:null!=b?m.clone(b):null})}get stipplePattern(){return this._material.parameters.stipplePattern}set stipplePattern(b){null!=this._material&&this._material.setParameters({stipplePattern:b})}get stippleOffColor(){return this._material.parameters.stippleOffColor}set stippleOffColor(b){this._material.setParameters({stippleOffColor:null!=
b?m.clone(b):null})}get stipplePreferContinuous(){return this._material.parameters.stipplePreferContinuous}set stipplePreferContinuous(b){this._material.setParameters({stipplePreferContinuous:b})}get falloff(){return this._material.parameters.falloff}set falloff(b){this._material.setParameters({falloff:b})}get polygonOffset(){return this._material.parameters.hasPolygonOffset}set polygonOffset(b){this._material.setParameters({hasPolygonOffset:b})}createExternalResources(){}destroyExternalResources(){}createGeometries(b){for(const l of x.lineStripsToParameters(this.geometry)){const f=
x.createGeometry(this._material,l);b.addGeometry(f)}}forEachExternalMaterial(b){this._hasExternalMaterial||b(this._material)}}const p=g.create();a.LineVisualElement=u;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/visualElements/SlicePlaneVisualElement":function(){define("exports ../../../../chunks/vec42 ../../../../core/libs/gl-matrix-2/factories/vec4f64 ./Object3DVisualElement ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/materials/SlicePlaneMaterial".split(" "),
function(a,c,g,h,d,m,r){class x extends h.Object3DVisualElement{constructor(t){super(t);this._material=null;this._renderOccluded=m.RenderOccludedFlag.OccludeAndTransparent;this._gridWidth=1;this._gridColor=g.fromValues(1,0,0,1);this._backgroundColor=g.fromValues(1,0,0,1);this.applyProperties(t)}get renderOccluded(){return this._renderOccluded}set renderOccluded(t){t!==this._renderOccluded&&(this._renderOccluded=t,this._updateMaterial())}get gridWidth(){return this._gridWidth}set gridWidth(t){this._gridWidth!==
t&&(this._gridWidth=t,this._updateMaterial())}get gridColor(){return this._gridColor}set gridColor(t){c.copy(this._gridColor,t);this._updateMaterial()}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){c.copy(this._backgroundColor,t);this._updateMaterial()}createExternalResources(){this._material=new r.SlicePlaneMaterial(this._materialParameters)}destroyExternalResources(){this._material=null}forEachExternalMaterial(t){null!=this._material&&t(this._material)}createGeometries(t){if(null!=
this._material){const z=d.createSquareGeometry(this._material);t.addGeometry(z)}}get _materialParameters(){return{backgroundColor:this._backgroundColor,gridWidth:this._gridWidth,gridColor:this._gridColor,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){null!=this._material&&this._material.setParameters(this._materialParameters)}}a.SlicePlaneVisualElement=x;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/materials/SlicePlaneMaterial":function(){define("exports ../core/shaderLibrary/ShaderOutput ../core/shaderTechnique/ShaderTechniqueConfiguration ../lib/GLMaterial ../lib/Material ../lib/RenderSlot ./DefaultBufferWriter ./DefaultLayouts ./TriangleMaterial ../shaders/SlicePlaneMaterialTechnique".split(" "),
function(a,c,g,h,d,m,r,x,t,z){class u extends t.TriangleMaterial{constructor(l){super(l,new b);this.produces=new Map([[m.RenderSlot.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,f=>f===c.ShaderOutput.Color]]);this._configuration=new g.ShaderTechniqueConfiguration}createBufferWriter(){return new r.DefaultBufferWriter(x.PositionUVLayout)}createGLMaterial(l){return new p(l)}getConfiguration(){return this._configuration}}class p extends h{constructor(l){super(l);this.ensureTechnique(z.SlicePlaneMaterialTechnique,
null)}beginSlot(){return this.technique}}class b extends z.SlicePlaneMaterialPassParameters{constructor(){super(...arguments);this.renderOccluded=d.RenderOccludedFlag.Occlude;this.isDecoration=!1}}a.Parameters=b;a.SlicePlaneMaterial=u;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique":function(){define("require exports ../../../../core/libs/gl-matrix-2/factories/vec4f64 ../core/shaderModules/interfaces ../core/shaderTechnique/ReloadableShaderModule ../core/shaderTechnique/ShaderTechnique ../lib/DefaultVertexAttributeLocations ../lib/Program ../../../../chunks/SlicePlaneMaterial.glsl ../../../webgl/enums ../../../webgl/renderState".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u){class p extends h.NoParameters{constructor(){super(...arguments);this.backgroundColor=g.fromValues(1,0,0,.5);this.gridColor=g.fromValues(0,1,0,.5);this.gridWidth=4}}class b extends m.ShaderTechnique{initializeProgram(l){return new x.Program(l.rctx,b.shader.get().build(this.configuration),r.Default3D)}initializePipeline(){return u.makePipelineState({blending:u.separateBlendingParams(z.BlendFactor.ONE,z.BlendFactor.ONE,z.BlendFactor.ONE_MINUS_SRC_ALPHA,z.BlendFactor.ONE_MINUS_SRC_ALPHA),
depthTest:{func:z.CompareFunction.LESS},colorWrite:u.defaultColorWriteParams})}}b.shader=new d.ReloadableShaderModule(t.SlicePlaneMaterial,()=>new Promise((l,f)=>a(["./SlicePlaneMaterial.glsl"],l,f)));c.SlicePlaneMaterialPassParameters=p;c.SlicePlaneMaterialTechnique=b;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/chunks/SlicePlaneMaterial.glsl":function(){define("exports ../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl ../views/3d/webgl-engine/core/shaderModules/Float4PassUniform ../views/3d/webgl-engine/core/shaderModules/FloatPassUniform ../views/3d/webgl-engine/core/shaderModules/interfaces ../views/3d/webgl-engine/core/shaderModules/ShaderBuilder ../views/3d/webgl-engine/lib/VertexAttribute".split(" "),
function(a,c,g,h,d,m,r){function x(z){const u=new m.ShaderBuilder,{vertex:p,fragment:b,attributes:l,varyings:f}=u;c.addProjViewLocalOrigin(p,z);l.add(r.VertexAttribute.POSITION,"vec3");l.add(r.VertexAttribute.UV0,"vec2");f.add("vUV","vec2");p.code.add(d.glsl`void main(void) {
vUV = uv0;
gl_Position = proj * view * vec4(position, 1.0);
}`);b.uniforms.add(new g.Float4PassUniform("backgroundColor",k=>k.backgroundColor),new g.Float4PassUniform("gridColor",k=>k.gridColor),new h.FloatPassUniform("gridWidth",k=>k.gridWidth));b.code.add(d.glsl`void main() {
const float LINE_WIDTH = 1.0;
vec2 uvScaled = vUV * gridWidth;
vec2 gridUV = (fract(uvScaled + 0.5) - 0.5) / (LINE_WIDTH * fwidth(uvScaled));
vec2 grid = (1.0 - step(0.5, gridUV)) * step(-0.5, gridUV);
grid.x *= step(0.5, uvScaled.x) * step(uvScaled.x, gridWidth - 0.5);
grid.y *= step(0.5, uvScaled.y) * step(uvScaled.y, gridWidth - 0.5);
float gridFade = max(grid.x, grid.y);
float gridAlpha = gridColor.a * gridFade;
fragColor =
vec4(backgroundColor.rgb * backgroundColor.a, backgroundColor.a) * (1.0 - gridAlpha) +
vec4(gridColor.rgb, 1.0) * gridAlpha;
}`);return u}const t=Object.freeze(Object.defineProperty({__proto__:null,build:x},Symbol.toStringTag,{value:"Module"}));a.SlicePlaneMaterial=t;a.build=x})},"esri/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove":function(){define("exports ../../../../../../core/handleUtils ../../../../../../core/quantityUtils ../../../../../../core/libs/gl-matrix-2/math/mat4 ../../../../../../chunks/vec32 ../../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../../geometry/support/vectorStacks ../../../../analysis/Slice/ShiftManipulator ../../../../analysis/Slice/sliceToolUtils ../../dragEventPipeline3D ../../ManipulatorType ../../manipulations/MoveXYObjectManipulation ../../../../../interactive/dragEventPipeline ../../../../../interactive/editGeometry/interfaces ../../../../../interactive/tooltip/infos/TranslateTooltipInfo ../../../../../interactive/tooltip/infos/TranslateZTooltipInfo ../../../../../support/automaticLengthMeasurementUtils ../../../../../support/euclideanLengthMeasurementUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C){class I{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(w,y){this._tool=w;this._bounds=y;this._moveZTooltipInfo=this._moveXYTooltipInfo=null;w=this._tool;y=w.view;this.moveXYObjectManipulation=new p.MoveXYObjectManipulation({view:y,tool:w,object:this._object});w.addHandles(this._createMoveXYObjectDragPipeline());this.moveZManipulator=new x.ShiftManipulator(y,x.OffsetMode.CENTER_ON_CALLOUT);this.moveZManipulator.state|=
t.IsShiftEdgeOnScreenFlag;w.manipulators.add(this.moveZManipulator);w.addHandles([this._createMoveZDragPipeline()]);w.addHandles([w.events.on("translate-stop",()=>{this._moveZTooltipInfo=this._moveXYTooltipInfo=null})])}destroy(){this.moveXYObjectManipulation.destroy();this._tool.manipulators.remove(this.moveZManipulator);this.moveZManipulator.destroy()}forEachManipulator(w){this.moveXYObjectManipulation.forEachManipulator(w);w(this.moveZManipulator,u.ManipulatorType.TRANSLATE_Z)}updateManipulators(w,
y){const F=this.moveZManipulator;w=h.rotateZ(r.sm4d.get(),w,Math.PI);w[12]=0;w[13]=0;w[14]=0;F.modelTransform=w;F.renderLocation=d.subtract(r.sv3d.get(),y.origin,y.basis1)}getUpdatedTooltipInfo(){return this.moveXYObjectManipulation.grabbing||this.moveXYObjectManipulation.dragging?this._computeMoveXYTooltipInfo():this.moveZManipulator.focused?this._computeMoveZTooltipInfo():null}_computeMoveXYTooltipInfo(){var w=this._tool;const y=this._moveXYTooltipInfo??(this._moveXYTooltipInfo=new f.TranslateTooltipInfo({sketchOptions:w.sketchOptions}));
if(this.moveXYObjectManipulation.dragging){var F=this._bounds,G=F.mapBoundsStart.origin;F=F.mapBounds.origin;({renderSpatialReference:w}=w.view);if(!w)return null;G=n.autoDistance2D(G,F,w);if(null==G)return null;y.distance=G}else y.distance=g.zeroMeters;return y}_computeMoveZTooltipInfo(){var w=this._tool;const y=this._moveZTooltipInfo??(this._moveZTooltipInfo=new k.TranslateZTooltipInfo({sketchOptions:w.sketchOptions}));if(this.moveZManipulator.dragging){var F=this._bounds,G=F.mapBoundsStart.origin;
F=F.mapBounds.origin;({renderSpatialReference:w}=w.view);if(!w)return null;G=C.verticalSignedDistance(G,F,w);if(null==G)return null;y.distance=G}else y.distance=g.zeroMeters;return y}_createMoveXYObjectDragPipeline(){return this.moveXYObjectManipulation.createDragPipeline((w,y,F)=>this._applyObjectMoveSteps(y,F))}_createMoveZDragPipeline(){if(!this._operations)return c.makeHandle();const w=this._operations.data.spatialReference;return b.createManipulatorDragEventPipeline(this.moveZManipulator,(y,
F,G)=>{y=m.clone(y.renderLocation);F=F.next(z.screenToZConstrained(this._tool.view,y,w)).next(b.addScreenDelta());this._applyObjectMoveSteps(F,G)})}_applyObjectMoveSteps(w,y){const {_tool:F,_object:G}=this;w=w.next(q=>{"start"===q.action&&(F.inputState={type:"move"},this._bounds.backupMapBounds(),F.events.emit("translate-start",{object:G,dxScreen:q.screenDeltaX,dyScreen:q.screenDeltaY}));return q}).next(b.addMapDelta()).next(this._moveDragUpdateGeometry()).next(q=>{const B={object:G,dxScreen:q.screenDeltaX,
dyScreen:q.screenDeltaY};switch(q.action){case "start":case "update":(q.mapEnd.x-q.mapStart.x||q.mapEnd.y-q.mapStart.y||(q.mapEnd.z??0)-(q.mapStart.z??0))&&F.events.emit("translate",B);break;case "end":F.inputState=null,F.events.emit("translate-stop",B)}return q});y.next(()=>{null!=F.inputState&&F.events.emit("translate-stop",{object:G,dxScreen:0,dyScreen:0});F.cancel()});return w}_moveDragUpdateGeometry(){const w=this._tool;return y=>{if(null==w.inputState||"move"!==w.inputState.type)return y;var F=
"start"===y.action?l.AccumulationBehavior.NEW_STEP:l.AccumulationBehavior.ACCUMULATE_STEPS;this._operations&&(F=this._operations.move(y.mapDeltaX,y.mapDeltaY,y.mapDeltaZ,F),this._bounds.updateMapBoundsFromOperation(F));return y}}}a.ExtentMove=I;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/Slice/ShiftManipulator":function(){define("exports ../../../../Color ../../../../core/colorUtils ../../../../core/reactiveUtils ../../../../core/libs/gl-matrix-2/math/mat4 ../../../../core/libs/gl-matrix-2/factories/mat4f64 ../../../../core/libs/gl-matrix-2/math/quat ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../geometry/support/vectorStacks ./sliceToolConfig ./sliceToolUtils ../../interactive/Manipulator3D ../../interactive/RenderObject ../../webgl-engine/lib/basicInterfaces ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/materials/ColorMaterial ../../webgl-engine/materials/RibbonLineMaterial ../../../interactive/interfaces".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w){function y({offsetMode:B,tubeMaterial:e,tipMaterial:v,capMaterial:A,outlineMaterial:D,calloutMaterial:E}){const H=B===a.OffsetMode.CENTER_ON_CALLOUT?u.shiftRestartOffsetDistance:0,J=[t.fromValues(H,0,-u.shiftRestartArrowLength/2),t.fromValues(H,0,u.shiftRestartArrowLength/2)];B=G(J);e=F({vertices:J,padding:0,materials:{tube:e,tip:v,cap:A}});D=F({vertices:J,padding:u.shiftRestartArrowOutlineWidth,materials:{tube:D,tip:D,cap:D}});v=k.createPolylineGeometry(E,
[[H,0,0],[H-u.shiftRestartOffsetDistance,0,0]]);E=k.createPolylineGeometry(E,[[H,0,0],[H-u.shiftRestartOffsetDistance,0,0]]);return{renderObjects:[...e.normal.map(L=>new l.RenderObject(L,w.ManipulatorStateFlags.Unfocused|p.DidPointerMoveRecentlyFlag)),...D.normal.map(L=>new l.RenderObject(L,w.ManipulatorStateFlags.Unfocused|p.DidPointerMoveRecentlyFlag)),new l.RenderObject(v,w.ManipulatorStateFlags.Unfocused|p.DidPointerMoveRecentlyFlag|p.IsShiftEdgeOnScreenFlag),...e.focused.map(L=>new l.RenderObject(L,
w.ManipulatorStateFlags.Focused|p.DidPointerMoveRecentlyFlag)),...D.focused.map(L=>new l.RenderObject(L,w.ManipulatorStateFlags.Focused|p.DidPointerMoveRecentlyFlag)),new l.RenderObject(E,w.ManipulatorStateFlags.Focused|p.DidPointerMoveRecentlyFlag|p.IsShiftEdgeOnScreenFlag)],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[B]},collisionPriority:1,radius:u.shiftRestartTipRadius,state:p.DidPointerMoveRecentlyFlag}}function F({vertices:B,padding:e,materials:v}){const A=D=>{const E=B.slice(0);
var H=x.subtract(z.sv3d.get(),E[0],E[1]);x.normalize(H,H);var J=x.subtract(z.sv3d.get(),E[E.length-1],E[E.length-2]);x.normalize(J,J);if(0<e){var L=x.scale(t.create(),J,-e);E[E.length-1]=x.add(L,L,E[E.length-1]);L=x.scale(t.create(),H,-e);E[0]=x.add(L,L,E[0])}L=D?u.shiftRestartTipFocusMultiplier:1;var N=u.shiftRestartTipLength*L;const M=u.shiftRestartTipRadius*L;L=d.identity(z.sm4d.get());if(0<e){var K=N/4,P=x.set(z.sv3d.get(),0,K,0);K=1+e/K;d.translate(L,L,P);d.scale(L,L,x.set(z.sv3d.get(),K,K,K));
d.translate(L,L,x.scale(P,P,-1/K))}K=d.identity(m.create());P=t.fromValues(0,1,0);J=d.fromQuat(m.create(),r.rotationTo(z.sq4d.get(),P,J));J[12]=E[E.length-1][0];J[13]=E[E.length-1][1];J[14]=E[E.length-1][2];d.multiply(J,J,L);D=u.shiftRestartTubeRadius*(D?u.shiftRestartTubeFocusMultiplier:1)+e;var U=v.tube;const V=[];for(let ca=0;12>ca;ca++){const ja=ca/12*2*Math.PI;V.push([Math.cos(ja)*D,Math.sin(ja)*D])}D=k.createPathExtrusionGeometry(U,V,E,[],[],!1);D.transformation=K;D=[D];K=k.createConeGeometry(v.tip,
N,M,24,!1,!1,!0);K.transformation=J;D.push(K);N=k.createConeGeometry(v.cap,N,M,24,!1,!0,!1);N.transformation=J;D.push(N);H=d.fromQuat(m.create(),r.rotationTo(z.sq4d.get(),P,H));H[12]=E[0][0];H[13]=E[0][1];H[14]=E[0][2];d.multiply(H,H,L);D.push(K.instantiate({transformation:H}));D.push(N.instantiate({transformation:H}));return D};return{normal:A(!1),focused:A(!0)}}function G(B,e){e=x.subtract(t.create(),B[B.length-1],B[B.length-2]);x.normalize(e,e);x.scale(e,e,u.shiftRestartTipLength);x.add(e,e,B[B.length-
1]);const v=x.subtract(t.create(),B[0],B[1]);x.normalize(v,v);x.scale(v,v,u.shiftRestartTipLength);x.add(v,v,B[0]);return[v,...B,e]}a.OffsetMode=void 0;(function(B){B[B.CENTER_ON_CALLOUT=0]="CENTER_ON_CALLOUT";B[B.CENTER_ON_ARROW=1]="CENTER_ON_ARROW"})(a.OffsetMode||(a.OffsetMode={}));class q extends b.Manipulator3D{constructor(B,e){const v=new I.RibbonLineMaterial({width:1,renderOccluded:n.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0}),A=new C.ColorMaterial({cullFace:f.CullFaceOptions.Back,
renderOccluded:n.RenderOccludedFlag.Opaque,isDecoration:!0}),D=new C.ColorMaterial({cullFace:f.CullFaceOptions.Back,renderOccluded:n.RenderOccludedFlag.Opaque,isDecoration:!0}),E=new C.ColorMaterial({cullFace:f.CullFaceOptions.Back,renderOccluded:n.RenderOccludedFlag.Opaque,isDecoration:!0}),H=new C.ColorMaterial({writeDepth:!1,cullFace:f.CullFaceOptions.Front,renderOccluded:n.RenderOccludedFlag.Transparent,isDecoration:!0});super({view:B,...y({offsetMode:e,tubeMaterial:A,tipMaterial:D,capMaterial:E,
outlineMaterial:H,calloutMaterial:v})});this._themeHandle=h.watch(()=>B.effectiveTheme.accentColor,J=>{const L=g.getContrast(J),N=c.toUnitRGBA(J),M=c.toUnitRGBA(L),K=c.toUnitRGBA(c.blendColors(L,J,.4));J=c.toUnitRGBA(c.blendColors(L,J,.14));v.setParameters({color:N});A.setParameters({color:J});D.setParameters({color:M});E.setParameters({color:K});H.setParameters({color:N})},h.initial)}destroy(){this._themeHandle.remove();super.destroy()}}a.ShiftManipulator=q;Object.defineProperty(a,Symbol.toStringTag,
{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate":function(){define("exports ../../../../../../core/mathUtils ../../../../../../core/libs/gl-matrix-2/math/mat4 ../../../../../../chunks/vec32 ../../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../../chunks/boundedPlane ../../../../../../geometry/support/plane ../../../../../../geometry/support/vectorStacks ../../../../analysis/images/Factory ../../../../analysis/Slice/RotateManipulator ../../../../analysis/Slice/sliceToolUtils ../../../manipulatorUtils ../../dragEventPipeline3D ../../ManipulatorType ../../../../support/geometryUtils/ray ../../../../../interactive/dragEventPipeline ../../../../../interactive/editGeometry/interfaces ../../../../../interactive/editGeometry/operations/UpdateVertices ../../../../../interactive/tooltip/infos/ExtentRotateTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I){class w{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(y,F,G){this._tool=y;this._bounds=F;this._snapRotation=G;this._rotateTooltipInfo=null;this._endAngle=this._startAngle=0;y=this._tool;const q=y.view,B=!q._stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this.rotateManipulator=new z.RotateManipulator(q,(e,v)=>t.getRotateHeadingTexture(q.textures,{accentColor:e,contrastColor:v,
preMultiplyAlpha:B}));y.addHandles([this.rotateManipulator.events.on("grab-changed",e=>this._onRotateGrab(e)),this._createRotateDragPipeline(this.rotateManipulator)]);y.manipulators.add(this.rotateManipulator);y.addHandles([y.events.on("rotate-start",e=>this._startAngle=e.angle),y.events.on("rotate",e=>this._endAngle=e.angle),y.events.on("rotate-stop",()=>{this._endAngle=this._startAngle=0})])}destroy(){this._tool.manipulators.remove(this.rotateManipulator);this.rotateManipulator.destroy()}forEachManipulator(y){y(this.rotateManipulator,
l.ManipulatorType.ROTATE)}updateManipulators(y,F){const G=0>this._bounds.mapBounds.plane[2]?Math.PI:0;y=g.rotateX(x.sm4d.get(),y,G);y[12]=0;y[13]=0;y[14]=0;this.rotateManipulator.modelTransform=y;this.rotateManipulator.renderLocation=h.add(x.sv3d.get(),F.origin,F.basis1)}getUpdatedTooltipInfo(){return this.rotateManipulator.focused?this._computeRotateTooltipInfo():null}_computeRotateTooltipInfo(){const y=this._rotateTooltipInfo??(this._rotateTooltipInfo=new I.ExtentRotateTooltipInfo({sketchOptions:this._tool.sketchOptions}));
y.angle=this._startAngle-this._endAngle;return y}_onRotateGrab({action:y,screenPoint:F}){const G=this._tool,q=this._bounds;"start"===y&&F&&(y=u.createRotatePlane(q.displayBounds,G.view.renderCoordsHelper,u.RotationAxis.HEADING,r.create()),F=f.fromScreenNormalized(G.view.state.camera,F),r.intersectRay(y,F,x.sv3d.get())&&(q.backupMapBounds(),G.inputState={type:"rotate",rotatePlane:y}))}_createRotateDragPipeline(y){const {_tool:F,_object:G}=this;return k.createManipulatorDragEventPipeline(y,(q,B,e)=>
{q=F.inputState;null!=q&&(B.next(v=>{"start"===v.action&&F.events.emit("rotate-start",{object:G,angle:0});return v}).next(b.screenToRenderPlane(F.view,q.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(q)).next(...this._snapRotation()).next(this._rotateDragUpdateGeometry()).next(v=>{const A={object:G,angle:c.rad2deg(v.rotateAngle)};switch(v.action){case "start":case "update":F.events.emit("rotate",A);break;case "end":F.inputState=null,F.events.emit("rotate-stop",A)}return v}),e.next(()=>{null!=
F.inputState&&F.events.emit("rotate-stop",{object:G,angle:0});F.cancel()}))})}_rotateDragRenderPlaneToRotate(y){return F=>{const G=r.getNormal(y.rotatePlane),q=p.calculateInputRotationTransform(F.renderStart,F.renderEnd,this._bounds.displayBounds.origin,G);return{...F,rotateAxis:G,rotateAngle:q}}}_rotateDragUpdateGeometry(){const y=this._bounds;return F=>{var G=h.copy(d.create(),y.mapBoundsStart.origin);const q="start"===F.action?n.AccumulationBehavior.NEW_STEP:n.AccumulationBehavior.ACCUMULATE_STEPS;
this._operations&&(G=this._operations.rotate(G,F.rotateAngle,q,C.AccumulationType.REPLACE),m.copy(y.mapBoundsStart,y.mapBounds),y.updateMapBoundsFromOperation(G));return F}}}a.ExtentRotate=w;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/images/Factory":function(){define(["exports","./generateTextures","./heading-rotate-svg","./tilt-rotate-svg","../../webgl-engine/lib/Texture"],function(a,c,g,h,d){a.getRotateHeadingTexture=function(m,r){const {accentColor:x,
contrastColor:t,preMultiplyAlpha:z}=r;return m.fromData(`heading-rotate:[accent:${x},contrast:${t},size:${64}]`,()=>new d.Texture(c.generateStyledTexture(g,{accentColor:x,contrastColor:t,size:64}),{mipmap:!0,reloadable:!0,preMultiplyAlpha:z}))};a.getTiltRotateTexture=function(m,r){const {accentColor:x,contrastColor:t,preMultiplyAlpha:z}=r;return m.fromData(`tilt-rotate:[accent:${x},contrast:${t},size:${64}]`,()=>new d.Texture(c.generateStyledTexture(h,{accentColor:x,contrastColor:t,size:64}),{mipmap:!0,
reloadable:!0,preMultiplyAlpha:z}))};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/images/generateTextures":function(){define(["exports"],function(a){function c(g,{accentColor:h,contrastColor:d}){const m=h.toHex();h=h.a;const r=d.toHex();d=d.a;const x=g.getElementsByTagNameNS("http://www.w3.org/2000/svg","style").namedItem("theme-style");x&&(x.innerHTML=`\n .contrast-fill { fill: ${r}; fill-opacity: ${d}; }\n .contrast-stroke { stroke: ${r}; stroke-opacity: ${d}; }\n .accent-fill { fill: ${m}; fill-opacity: ${h}; }\n .accent-stroke { stroke: ${m}; stroke-opacity: ${h}; }`);
return g}a.generateStyledTexture=function(g,h){g=g.split(",")[1];g=atob(g);g=(new DOMParser).parseFromString(g,"image/svg+xml");g=c(g,h);g=(new XMLSerializer).serializeToString(g);g=`data:image/svg+xml;base64,${btoa(g)}`;h=h.size;h=new Image(h,h);h.src=g;return h};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/images/heading-rotate-svg":function(){define(function(){return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSI1NiIgZmlsbD0ibm9uZSIgdmVyc2lvbj0iMi4wIj48c3R5bGUgaWQ9InRoZW1lLXN0eWxlIj4uY29udHJhc3QtZmlsbHtmaWxsOiNmZmZ9LmNvbnRyYXN0LXN0cm9rZXtzdHJva2U6I2ZmZn0uYWNjZW50LWZpbGx7ZmlsbDojZmY3ZjAwO2ZpbGwtb3BhY2l0eTouNX08L3N0eWxlPjxwYXRoIGQ9Ik0yOCAwYTI4IDI4IDAgMSAxIDAgNTYgMjggMjggMCAwIDEgMC01NiIgY2xhc3M9ImFjY2VudC1maWxsIi8+PHBhdGggc3Ryb2tlLXdpZHRoPSI0Ljk5IiBkPSJNMjAuMDUgNDAuODZhMTUuMDUgMTUuMDUgMCAwIDAgMTcuMTQtMS41IDE1LjA1IDE1LjA1IDAgMCAwIDQuNDctMTYuNjUgMTUuMDUgMTUuMDUgMCAwIDAtMjIuNzItNy4xNSAxNS4wNSAxNS4wNSAwIDAgMC01LjUgNy4xNSIgY2xhc3M9ImNvbnRyYXN0LXN0cm9rZSIvPjxwYXRoIGQ9Im0xMC45NyAzNS41NyA1LjM4IDEyLjA3IDcuNzktMTMuNDd6IiBjbGFzcz0iY29udHJhc3QtZmlsbCIvPjwvc3ZnPg\x3d\x3d"})},
"esri/views/3d/analysis/images/tilt-rotate-svg":function(){define(function(){return"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSI1NiIgZmlsbD0ibm9uZSIgdmVyc2lvbj0iMi4wIj48c3R5bGUgaWQ9InRoZW1lLXN0eWxlIj4uY29udHJhc3QtZmlsbHtmaWxsOiNmZmZ9LmNvbnRyYXN0LXN0cm9rZXtzdHJva2U6I2ZmZn0uYWNjZW50LWZpbGx7ZmlsbDojZmY3ZjAwO2ZpbGwtb3BhY2l0eTouNX08L3N0eWxlPjxjaXJjbGUgY3g9IjM5LjQ3OCIgY3k9IjMuMDc4IiByPSIyOCIgY2xhc3M9ImFjY2VudC1maWxsIiB0cmFuc2Zvcm09InJvdGF0ZSg0MC41NDIpIi8+PHBhdGggc3Ryb2tlLXdpZHRoPSI1IiBkPSJtNy4wNzQgMzAuMDUzIDI5LjM5NyAxMS45ODUtMy42NzMtMzMuNDkzIiBjbGFzcz0iY29udHJhc3Qtc3Ryb2tlIi8+PHBhdGggc3Ryb2tlLXdpZHRoPSIyLjk5NiIgZD0iTTI0LjUwNCAyMy4yMDdhMTEuOTggMTEuOTggMCAwIDAtOS44IDcuNTA3IiBjbGFzcz0iY29udHJhc3Qtc3Ryb2tlIGNvbnRyYXN0LWZpbGwiLz48cGF0aCBkPSJtMjkuODE4IDIyLjgwOC02LjE4NCA0LjYtLjU0MS04LjM2NHoiIGNsYXNzPSJjb250cmFzdC1maWxsIi8+PC9zdmc+"})},
"esri/views/3d/analysis/Slice/RotateManipulator":function(){define("exports ../../../../Color ../../../../core/colorUtils ../../../../core/reactiveUtils ./sliceToolUtils ../../interactive/Manipulator3D ../../interactive/manipulatorUtils ../../interactive/RenderObject ../../webgl-engine/lib/Attribute ../../webgl-engine/lib/Geometry ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/lib/VertexAttribute ../../webgl-engine/materials/ImageMaterial ../../webgl-engine/materials/RibbonLineMaterial ../../../interactive/interfaces".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k){function n({imageMaterial:I,calloutMaterial:w}){const {focusMultiplier:y,calloutLength:F,discRadius:G}=r.rotateManipulatorDefaults,q=G*y,B=(A,D)=>{const E=[0,1,2,2,3,0];return new z.Geometry(D,[[b.VertexAttribute.POSITION,new t.Attribute([F-A,-A,0,F+A,-A,0,F+A,A,0,F-A,A,0],E,3,!0)],[b.VertexAttribute.UV0,new t.Attribute([0,0,1,0,1,1,0,1],E,2,!0)]])},e=u.createPolylineGeometry(w,[[0,0,0],[F-G,0,0]]);w=u.createPolylineGeometry(w,[[0,0,0],[F-q,0,0]]);const v=
d.DidPointerMoveRecentlyFlag;return{autoScaleRenderObjects:!1,collisionPriority:1,collisionType:{type:"disc",direction:[0,0,1],offset:[F,0,0]},focusMultiplier:y,radius:G,renderObjects:[new x.RenderObject(B(G,I),k.ManipulatorStateFlags.Unfocused|v),new x.RenderObject(e,k.ManipulatorStateFlags.Unfocused|v),new x.RenderObject(B(q,I),k.ManipulatorStateFlags.Focused|v),new x.RenderObject(w,k.ManipulatorStateFlags.Focused|v)],state:v}}class C extends m.Manipulator3D{constructor(I,w){const y=new l.ImageMaterial({transparent:!0,
writeDepth:!1,renderOccluded:p.RenderOccludedFlag.Opaque,isDecoration:!0}),F=new f.RibbonLineMaterial({width:r.rotateManipulatorDefaults.calloutWidth,renderOccluded:p.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0});super({view:I,...n({imageMaterial:y,calloutMaterial:F})});this._currentTexture=null;this._themeHandle=h.watch(()=>I.effectiveTheme.accentColor,G=>{var q=g.multiplyOpacity(G,.5);const B=g.getContrast(G),e=this._currentTexture;q=w(q,B);y.setParameters({textureId:q.texture.id});
F.setParameters({color:c.toUnitRGBA(G)});this._currentTexture=q;e?.release()},h.initial)}destroy(){this._themeHandle.remove();this._currentTexture?.release();super.destroy()}}a.RotateManipulator=C;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/materials/ImageMaterial":function(){define("exports ../../../../geometry/support/buffer/BufferView ../core/shaderLibrary/ShaderOutput ../lib/basicInterfaces ../lib/GLTextureMaterial ../lib/Material ../lib/OrderIndependentTransparency ../lib/RenderSlot ../lib/Util ../lib/VertexAttribute ./DefaultBufferWriter ./DefaultLayouts ./TriangleMaterial ./internal/bufferWriterUtils ../shaders/ImageMaterialTechnique".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f){class k extends b.TriangleMaterial{constructor(w){super(w,new I);this.supportsEdges=!0;this.produces=new Map([[x.RenderSlot.OPAQUE_MATERIAL,y=>g.isOIDorHighlight(y)||g.isColor(y)&&!this.parameters.transparent],[x.RenderSlot.TRANSPARENT_MATERIAL,y=>g.isColor(y)&&this.parameters.transparent&&this.parameters.writeDepth],[x.RenderSlot.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,y=>g.isColor(y)&&this.parameters.transparent&&!this.parameters.writeDepth],[x.RenderSlot.DRAPED_MATERIAL,
y=>g.isColor(y)||g.isOIDorHighlight(y)]]);this._vertexAttributeLocations=f.vertexAttributeLocations;this._configuration=new f.ImageMaterialTechniqueConfiguration}getConfiguration(w,y){this._configuration.output=w;this._configuration.cullFace=this.parameters.cullFace;this._configuration.hasSlicePlane=this.parameters.hasSlicePlane;this._configuration.transparent=this.parameters.transparent;this._configuration.writeDepth=this.parameters.writeDepth;this._configuration.hasOccludees=this.parameters.hasOccludees;
this._configuration.transparencyPassType=y.transparencyPassType;this._configuration.enableOffset=y.camera.relativeElevation<r.OITPolygonOffsetLimit;this._configuration.multipassEnabled=y.multipassEnabled;this._configuration.cullAboveGround=y.multipassTerrain.cullAboveGround;this._configuration.perspectiveInterpolation=this.parameters.perspectiveInterpolation;return this._configuration}createGLMaterial(w){return new n(w)}createBufferWriter(){const w=p.PositionUVLayout.clone();this.parameters.perspectiveInterpolation&&
w.f32(z.VertexAttribute.PERSPECTIVEDIVIDE);return new C(w)}}class n extends d.GLTextureMaterial{constructor(w){super({...w,...w.material.parameters})}_updateParameters(w){this.updateTexture(this._material.parameters.textureId);this._material.setParameters(this.textureBindParameters);return this.ensureTechnique(f.ImageMaterialTechnique,w)}_updateOccludeeState(w){w.hasOccludees!==this._material.parameters.hasOccludees&&(this._material.setParameters({hasOccludees:w.hasOccludees}),this._updateParameters(w))}beginSlot(w){this._output===
g.ShaderOutput.Color&&this._updateOccludeeState(w);return this._updateParameters(w)}}class C extends u.DefaultBufferWriter{write(w,y,F,G,q){for(const B of this.vertexBufferLayout.fields.keys()){const e=F.attributes.get(B);if(e)if(B===z.VertexAttribute.PERSPECTIVEDIVIDE){t.assert(1===e.size);const v=G.getField(B,c.BufferViewFloat);v&&l.writeBufferFloat(e,v,q)}else l.writeDefaultAttribute(B,e,w,y,G,q)}}}class I extends m.MaterialParameters{constructor(){super(...arguments);this.transparent=!1;this.writeDepth=
!0;this.hasSlicePlane=!1;this.cullFace=h.CullFaceOptions.None;this.hasOccludees=!1;this.opacity=1;this.textureId=null;this.initTextureTransparent=!0;this.perspectiveInterpolation=!1}}a.ImageMaterial=k;a.Parameters=I;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/shaders/ImageMaterialTechnique":function(){define("require exports ../../../../chunks/tslib.es6 ../core/shaderLibrary/ShaderOutput ../core/shaderModules/interfaces ../core/shaderTechnique/ReloadableShaderModule ../core/shaderTechnique/ShaderTechnique ../core/shaderTechnique/ShaderTechniqueConfiguration ../lib/basicInterfaces ../lib/OrderIndependentTransparency ../lib/Program ../lib/StencilUtils ../lib/TransparencyPassType ../lib/VertexAttribute ../materials/DefaultTechniqueConfiguration ../../../../chunks/ImageMaterial.glsl ../../../webgl/enums ../../../webgl/renderState".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C){class I extends d.NoParameters{}class w extends r.ShaderTechnique{initializeProgram(q){return new u.Program(q.rctx,w.shader.get().build(this.configuration),G)}_setPipelineState(q,B){const e=this.configuration,v=q===b.TransparencyPassType.NONE,A=q===b.TransparencyPassType.FrontFace;return C.makePipelineState({blending:e.output===h.ShaderOutput.Color&&e.transparent?v?y:z.oitBlending(q):null,culling:C.cullingParams(e.cullFace),depthTest:{func:z.oitDepthTest(q)},
depthWrite:v?e.writeDepth?C.defaultDepthWriteParams:null:z.oitDepthWrite(q),drawBuffers:z.oitDrawBuffers(q),colorWrite:C.defaultColorWriteParams,stencilWrite:e.hasOccludees?p.stencilWriteMaskOn:null,stencilTest:e.hasOccludees?B?p.stencilToolMaskBaseParams:p.stencilBaseAllZerosParams:null,polygonOffset:v||A?null:z.getOITPolygonOffset(e.enableOffset)})}initializePipeline(){this._occludeePipelineState=this._setPipelineState(this.configuration.transparencyPassType,!0);return this._setPipelineState(this.configuration.transparencyPassType,
!1)}getPipeline(q){return q?this._occludeePipelineState:super.getPipeline()}}w.shader=new m.ReloadableShaderModule(k.ImageMaterial,()=>new Promise((q,B)=>a(["./ImageMaterial.glsl"],q,B)));const y=C.simpleBlendingParams(n.BlendFactor.ONE,n.BlendFactor.ONE_MINUS_SRC_ALPHA);class F extends f.DefaultTechniqueConfiguration{constructor(){super(...arguments);this.output=h.ShaderOutput.Color;this.cullFace=t.CullFaceOptions.None;this.transparent=this.hasSlicePlane=!1;this.writeDepth=this.enableOffset=!0;this.hasOccludees=
!1;this.transparencyPassType=b.TransparencyPassType.NONE;this.cullAboveGround=this.multipassEnabled=!1;this.perspectiveInterpolation=!0}}g.__decorate([x.parameter({count:h.ShaderOutput.COUNT})],F.prototype,"output",void 0);g.__decorate([x.parameter({count:t.CullFaceOptions.COUNT})],F.prototype,"cullFace",void 0);g.__decorate([x.parameter()],F.prototype,"hasSlicePlane",void 0);g.__decorate([x.parameter()],F.prototype,"transparent",void 0);g.__decorate([x.parameter()],F.prototype,"enableOffset",void 0);
g.__decorate([x.parameter()],F.prototype,"writeDepth",void 0);g.__decorate([x.parameter()],F.prototype,"hasOccludees",void 0);g.__decorate([x.parameter({count:b.TransparencyPassType.COUNT})],F.prototype,"transparencyPassType",void 0);g.__decorate([x.parameter()],F.prototype,"multipassEnabled",void 0);g.__decorate([x.parameter()],F.prototype,"cullAboveGround",void 0);g.__decorate([x.parameter()],F.prototype,"perspectiveInterpolation",void 0);g.__decorate([x.parameter({constValue:!1})],F.prototype,
"occlusionPass",void 0);const G=new Map([[l.VertexAttribute.POSITION,0],[l.VertexAttribute.UV0,2],[l.VertexAttribute.PERSPECTIVEDIVIDE,3]]);c.ImageMaterialPassParameters=I;c.ImageMaterialTechnique=w;c.ImageMaterialTechniqueConfiguration=F;c.vertexAttributeLocations=G;Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})})},"esri/chunks/ImageMaterial.glsl":function(){define("exports ../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput ../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl ../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl ../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl ../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff ../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl ../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl ../views/3d/webgl-engine/core/shaderModules/FloatPassUniform ../views/3d/webgl-engine/core/shaderModules/interfaces ../views/3d/webgl-engine/core/shaderModules/ShaderBuilder ../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform ../views/3d/webgl-engine/lib/TransparencyPassType ../views/3d/webgl-engine/lib/VertexAttribute".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l){function f(n){const C=new u.ShaderBuilder,{vertex:I,fragment:w}=C;x.addProjViewLocalOrigin(I,n);C.include(h.Transform,n);C.attributes.add(l.VertexAttribute.POSITION,"vec3");C.attributes.add(l.VertexAttribute.UV0,"vec2");n.perspectiveInterpolation&&C.attributes.add(l.VertexAttribute.PERSPECTIVEDIVIDE,"float");C.varyings.add("vpos","vec3");n.multipassEnabled&&C.varyings.add("depth","float");I.code.add(z.glsl`
void main(void) {
vpos = position;
${n.multipassEnabled?"depth \x3d (view * vec4(vpos, 1.0)).z;":""}
vTexCoord = uv0;
gl_Position = transformPosition(proj, view, vpos);
${n.perspectiveInterpolation?"gl_Position *\x3d perspectiveDivide;":""}
}
`);C.include(g.SliceDraw,n);C.include(d.multipassTerrainTest,n);w.uniforms.add(new p.Texture2DPassUniform("tex",y=>y.texture),new t.FloatPassUniform("opacity",y=>y.opacity));C.varyings.add("vTexCoord","vec2");n.transparencyPassType===b.TransparencyPassType.ColorAlpha&&(C.outputs.add("fragColor","vec4",0),C.outputs.add("fragAlpha","float",1));w.include(r.ColorConversion);w.code.add(z.glsl`
void main() {
discardBySlice(vpos);
${n.multipassEnabled?"terrainDepthTest(depth);":""}
fragColor = texture(tex, vTexCoord) * opacity;
if (fragColor.a < ${z.glsl.float(m.defaultMaskAlphaCutoff)}) {
discard;
}
fragColor = highlightSlice(fragColor, vpos);
${n.transparencyPassType===b.TransparencyPassType.ColorAlpha?z.glsl`
fragColor = premultiplyAlpha(fragColor);
fragAlpha = fragColor.a;`:""}
${n.output===c.ShaderOutput.ObjectAndLayerIdColor?z.glsl`
fragColor = vec4(0,0,0,1);`:""}
}
`);return C}const k=Object.freeze(Object.defineProperty({__proto__:null,build:f},Symbol.toStringTag,{value:"Module"}));a.ImageMaterial=k;a.build=f})},"esri/views/interactive/tooltip/infos/ExtentRotateTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),function(a,c,g,h,d,
m,r,x){a.ExtentRotateTooltipInfo=class extends x.SketchTooltipInfo{constructor(t){super(t);this.type="extent-rotate";this.angle=0}};c.__decorate([g.property()],a.ExtentRotateTooltipInfo.prototype,"type",void 0);c.__decorate([g.property()],a.ExtentRotateTooltipInfo.prototype,"angle",void 0);a.ExtentRotateTooltipInfo=c.__decorate([r.subclass("esri.views.interactive.tooltip.infos.ExtentRotateTooltipInfo")],a.ExtentRotateTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale":function(){define("exports ../../../../../../core/libs/gl-matrix-2/math/vec2 ../../../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../../../chunks/vec32 ../../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../../chunks/boundedPlane ../../../../../../geometry/support/plane ../../../../../../geometry/support/vectorStacks ../../../../analysis/Slice/ResizeManipulator ../../../../analysis/Slice/sliceToolUtils ../../dragEventPipeline3D ../../ManipulatorType ./extentUtils ../../../../support/geometryUtils/ray ../../../../../interactive/dragEventPipeline ../../../../../interactive/editGeometry/interfaces ../../../../../interactive/editGeometry/operations/UpdateVertices ../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C){class I{get _object(){return this._tool.object}get _operations(){return this._object.operations}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;var w=this._operations.data;if(w.geometry.hasZ){const y=w.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const F of w.components)for(const G of F.vertices)w=y.getZ(G.pos)??0,this._zMax=Math.max(w,this._zMax)}else this._zMax=0;this._zMaxDirty=!1;return this._zMax}constructor(w,y,F){this._tool=
w;this._bounds=y;this._preserveAspectRatioStep=F;this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}];this._scaleTooltipInfo=null;this._displayBoundsStart=m.create();this._displayBoundsMarginStart=0;this._startScale=g.create();this._endScale=g.create();this._sizeStart=null;this._zMax=0;this._zMaxDirty=!0;const G=this._tool,q=G.view;this.resizeManipulators=this._resizeHandles.map(B=>
{const e=new t.ResizeManipulator(q,B);G.addHandles([e.events.on("grab-changed",v=>this._onResizeGrab(v)),this._createResizeDragPipeline(e,B)]);return e});G.manipulators.addMany(this.resizeManipulators);G.addHandles([G.events.on("scale-start",B=>{c.set(this._startScale,B.xScale,B.yScale);c.set(this._endScale,B.xScale,B.yScale)}),G.events.on("scale",B=>{c.set(this._endScale,B.xScale,B.yScale)}),G.events.on("scale-stop",()=>{c.set(this._startScale,0,0);c.set(this._endScale,0,0)})]);this._operations&&
G.addHandles(this._operations.data.on("change",()=>{"resize"!==G.inputState?.type&&(this._zMaxDirty=!0)}))}destroy(){this.forEachManipulator(w=>{this._tool.manipulators.remove(w);w.destroy()})}forEachManipulator(w){this.resizeManipulators.forEach(y=>w(y,p.ManipulatorType.SCALE))}updateManipulators(w,y){this.resizeManipulators.forEach((F,G)=>{z.updateResizeHandle(F,this._resizeHandles[G],w,y)})}getUpdatedTooltipInfo(){return this.resizeManipulators.some(w=>w.focused)?this._computeScaleTooltipInfo():
null}_computeScaleTooltipInfo(){var w=this._tool;w=this._scaleTooltipInfo??(this._scaleTooltipInfo=new C.ExtentScaleTooltipInfo({sketchOptions:w.sketchOptions}));const y=b.mapPlaneAutoSize2D(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference);if(null==y)return null;w.xSize=y.xSize;w.ySize=y.ySize;null!=this._sizeStart&&this.resizeManipulators.some(F=>F.dragging)?(w.xScale=y.xSize.value/this._sizeStart.xSize.value,w.yScale=y.ySize.value/this._sizeStart.ySize.value):(w.xScale=1,w.yScale=
1);return w}_onResizeGrab({action:w,screenPoint:y}){const F=this._tool,G=this._bounds;"start"===w&&y&&(w=l.fromScreenNormalized(F.view.state.camera,y),r.intersectRay(G.displayBounds.plane,w,x.sv3d.get())&&(G.backupMapBounds(),m.copy(G.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=G.displayBoundsMargin,this._sizeStart=b.mapPlaneAutoSize2D(G.mapBoundsStart,this.zMax,G.spatialReference),F.inputState={type:"resize"}))}_createResizeDragPipeline(w,y){const {_tool:F,_object:G}=this;
return f.createManipulatorDragEventPipeline(w,(q,B,e)=>{null!=F.inputState&&(B.next(v=>{"start"===v.action&&F.events.emit("scale-start",{object:G,xScale:1,yScale:1});return v}).next(u.screenToRenderPlane(F.view,this._displayBoundsStart.plane)).next(v=>({...v,handle:y})).next(this._resizeDragRenderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(this._resizeDragUpdateGeometry()).next(v=>{const A={object:G,xScale:v.factor1,yScale:v.factor2};switch(v.action){case "start":case "update":F.events.emit("scale",
A);break;case "end":F.inputState=null,F.events.emit("scale-stop",A)}return v}),e.next(()=>{null!=F.inputState&&F.events.emit("scale-stop",{object:G,xScale:1,yScale:1});F.cancel()}))})}_resizeDragRenderPlaneToFactors(){const w=this._bounds;return y=>{const F=this._displayBoundsStart,G=y.handle.direction,q=w.displayBoundsMargin,B=this._displayBoundsMarginStart;var e=h.copy(x.sv3d.get(),F.origin);h.scaleAndAdd(e,e,F.basis1,-G[0]);h.scaleAndAdd(e,e,F.basis2,-G[1]);const v=h.subtract(x.sv3d.get(),y.renderEnd,
e),A=h.subtract(x.sv3d.get(),y.renderStart,e),D=z.isDiagonalResizeHandle(y.handle);e=z.calculateDiagonalResizeHandleScale(F);const E=z.calculateDiagonalResizeHandleScale(w.displayBounds)/e;e=(H,J)=>{if(0===H)return 1;let L=h.length(J),N=.5*H*h.dot(J,v)/L;const M=0>N?-1:1;D&&(H=L-.5*H*h.dot(J,A)/L,N+=H*M*E);H=L<1.5*B?1:1E-6;L=Math.max(L-B,1E-6);0<M&&(N-=q);return M*Math.max(N/L*M,H)};return{...y,factor1:e(G[0],F.basis1),factor2:e(G[1],F.basis2)}}}_resizeDragUpdateGeometry(){const w=this._bounds;return y=>
{var F=h.copy(d.create(),w.mapBoundsStart.origin);h.scaleAndAdd(F,F,w.mapBoundsStart.basis1,-y.handle.direction[0]);h.scaleAndAdd(F,F,w.mapBoundsStart.basis2,-y.handle.direction[1]);const G=c.set(g.create(),w.mapBoundsStart.basis1[0],w.mapBoundsStart.basis1[1]);c.normalize(G,G);const q="start"===y.action?k.AccumulationBehavior.NEW_STEP:k.AccumulationBehavior.ACCUMULATE_STEPS;this._operations&&(F=this._operations.scale(F,G,y.factor1,y.factor2,q,n.AccumulationType.REPLACE),m.copy(w.mapBoundsStart,w.mapBounds),
w.updateMapBoundsFromOperation(F));return y}}}a.ExtentScale=I;a.scaleEpsilon=1E-6;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/analysis/Slice/ResizeManipulator":function(){define("exports ../../../../Color ../../../../core/reactiveUtils ../../../../core/libs/gl-matrix-2/factories/vec3f64 ./sliceToolConfig ./sliceToolUtils ../../interactive/Manipulator3D ../../interactive/manipulatorUtils ../../interactive/RenderObject ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/Material ../../webgl-engine/materials/RibbonLineMaterial ../../../interactive/interfaces".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b){function l({isCorner:k,unfocusedMaterial:n,focusedMaterial:C,outlineMaterial:I}){const w=k?[h.fromValues(1,0,0),h.fromValues(0,0,0),h.fromValues(0,1,0)]:[h.fromValues(1,0,0),h.fromValues(-1,0,0)];return{renderObjects:[new t.RenderObject(z.createPolylineGeometry(n,w),b.ManipulatorStateFlags.Unfocused|m.resizeNormal),new t.RenderObject(z.createPolylineGeometry(C,w),b.ManipulatorStateFlags.Focused|m.resizeNormal),new t.RenderObject(z.createPolylineGeometry(I,w),m.resizeOutlineOnly)],
collisionType:{type:"line",paths:[w]},radius:k?d.resizeHandleCornerInputRadius:d.resizeHandleEdgeInputRadius,state:m.resizeNormal}}class f extends r.Manipulator3D{constructor(k,n){const C=(n=m.isDiagonalResizeHandle(n))?d.resizeHandleCornerWidth:d.resizeHandleEdgeWidth,I=C*d.displayFocusMultiplier,w=d.resizeHandleEdgeWidth,y={renderOccluded:u.RenderOccludedFlag.OccludeAndTransparent,isDecoration:!0},F=new p.RibbonLineMaterial({...y,width:C}),G=new p.RibbonLineMaterial({...y,width:I}),q=new p.RibbonLineMaterial({...y,
width:w});super({view:k,...x.worldScaledManipulatorSettings,...l({isCorner:n,unfocusedMaterial:F,focusedMaterial:G,outlineMaterial:q})});this._themeHandle=g.watch(()=>k.effectiveTheme.accentColor,B=>{B=c.toUnitRGBA(B);F.setParameters({color:B});G.setParameters({color:B});q.setParameters({color:B})},g.initial)}destroy(){this._themeHandle.remove();super.destroy()}}a.ResizeManipulator=f;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/extentTransform/extentUtils":function(){define("exports ../../../../../../core/reactiveUtils ../../../../../../core/unitUtils ../../../../../../core/libs/gl-matrix-2/math/vec2 ../../../../../../chunks/vec32 ../../../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../../../chunks/boundedPlane ../../../../../../geometry/support/vectorStacks ../../geometryUtils ../../manipulatedObjectUtils ../../../../layers/graphics/elevationAlignmentUtils ../../../../layers/graphics/ElevationContext ../../../../../interactive/editGeometry/support/editPlaneUtils ../../../../../support/extentUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l){function f(y,F,G,q=0,B){B||=r.create();F.toRenderCoords(y.origin,G,B.origin);var e=x.sv3d.get();d.add(e,y.origin,y.basis1);d.add(e,e,y.basis2);F.toRenderCoords(e,G,e);var v=x.sv3d.get();d.add(v,y.origin,y.basis1);d.subtract(v,v,y.basis2);F.toRenderCoords(v,G,v);const A=x.sv3d.get();d.subtract(A,y.origin,y.basis1);d.subtract(A,A,y.basis2);F.toRenderCoords(A,G,A);const D=x.sv3d.get();d.subtract(D,y.origin,y.basis1);d.add(D,D,y.basis2);F.toRenderCoords(D,G,D);y=
d.lerp(x.sv3d.get(),e,v,.5);d.subtract(y,y,B.origin);F=d.lerp(x.sv3d.get(),A,D,.5);d.subtract(F,B.origin,F);d.lerp(B.basis1,y,F,.5);e=d.lerp(x.sv3d.get(),D,e,.5);d.subtract(e,e,B.origin);v=d.lerp(x.sv3d.get(),v,A,.5);d.subtract(v,B.origin,v);d.lerp(B.basis2,e,v,.5);v=d.cross(x.sv3d.get(),B.basis1,B.basis2);v=d.cross(v,v,B.basis1);d.normalize(v,v);d.scale(B.basis2,v,d.dot(B.basis2,v));d.scale(B.basis1,B.basis1,1+q/d.length(B.basis1));d.scale(B.basis2,B.basis2,1+q/d.length(B.basis2));r.updateUnboundedPlane(B);
return B}class k{constructor(y,F){this._tool=y;this.mapBounds=r.create();this.mapBoundsStart=r.create();this.displayBounds=r.create();y.addHandles(c.on(()=>y.object,"modified-externally",()=>this._resetMapBounds(),{onListenerAdd:()=>this._resetMapBounds()}));this._onDisplayBoundsChanged=F}get displayBoundsMargin(){const {view:y,object:F}=this._tool;var G=z.manipulatedObjectGeometry(F);return(G=y.pointsOfInterest?.centerOnSurfaceFrequent.location??G?.extent?.center)?10*y.pixelSizeAt(G):0}backupMapBounds(){r.copy(this.mapBounds,
this.mapBoundsStart)}updateDisplayBounds(){this._calculateDisplayBounds();this._onDisplayBoundsChanged?.()}updateMapBoundsFromOperation(y){b.apply(y,this.mapBounds);this.updateDisplayBounds()}updateMapBoundsFromOperationInverse(y){b.applyInverse(y,this.mapBounds);this.updateDisplayBounds()}_resetMapBounds(){this._calculateMapBounds();this.updateDisplayBounds()}_calculateMapBounds(){const {view:y,attachmentOrigin:F,object:G}=this._tool,q=G.operations?.data;if(q){var B=q.geometry;this.spatialReference=
B.spatialReference;var e=t.mainAxis(B);h.scale(e,e,-1);var v=y.spatialReference;B=B.spatialReference;v=F?y.pixelSizeAt(F)*g.getMetersPerCartesianUnitForSR(v)/g.getMetersPerUnitForSR(B):0;b.calculateOrientedBounds(e,q,80*v,this.mapBounds)}}_calculateDisplayBounds(){const {view:y,attachmentOrigin:F}=this._tool,G=F?.z??u.evaluateElevationAlignmentAtPoint(this.mapBounds.origin,y.elevationProvider,p.ElevationContext.fromElevationInfo(this._tool.object.elevationInfo),y.renderCoordsHelper),q=r.copy(this.mapBounds);
q.origin[2]=G??0;f(q,y.renderCoordsHelper,this.spatialReference,this.displayBoundsMargin,this.displayBounds)}}const n=m.create(),C=m.create(),I=m.create(),w=m.create();a.TransformBounds=k;a.mapPlaneAutoSize2D=function(y,F,G){d.subtract(w,d.subtract(w,y.origin,y.basis1),y.basis2);d.scaleAndAdd(I,w,y.basis1,2);d.scaleAndAdd(C,I,y.basis2,2);d.scaleAndAdd(n,w,y.basis2,2);w[2]=I[2]=C[2]=n[2]=F;return l.autoSize2D({topLeft:n,topRight:C,bottomRight:I,bottomLeft:w,spatialReference:G})};Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/editGeometry/support/editPlaneUtils":function(){define("exports ../../../../core/libs/gl-matrix-2/math/vec2 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../../chunks/boundedPlane ../../../../geometry/support/vectorStacks ../operations/MoveVertex ../operations/RotateVertex ../operations/ScaleVertex ../operations/UpdateVertices".split(" "),function(a,c,g,h,d,m,r,x,t,z){function u(f,k,n){if(f instanceof
z.UpdateVertices){if(f.operation instanceof r.MoveVertex)return p(f.operation,k,n),!0;if(f.operation instanceof x.RotateVertex)return b(f.operation,k,n),!0;if(f.operation instanceof t.ScaleVertex)return l(f.operation,k,n),!0}return!1}function p(f,k,n=!1){n=n?-1:1;f=h.fromValues(n*f.dx,n*f.dy,n*f.dz);g.add(k.origin,k.origin,f);d.updateUnboundedPlane(k)}function b(f,k,n=!1){f=n?-f.angle:f.angle;g.rotateZ(k.basis1,k.basis1,h.ZEROS,f);g.rotateZ(k.basis2,k.basis2,h.ZEROS,f);d.updateUnboundedPlane(k)}function l(f,
k,n=!1){const C=n?1/f.factor1:f.factor1;n=n?1/f.factor2:f.factor2;g.scale(k.basis1,k.basis1,C);g.scale(k.basis2,k.basis2,n);c.projectAndScale(k.origin,k.origin,f.origin,f.axis1,C);c.projectAndScale(k.origin,k.origin,f.origin,f.axis2,n);d.updateUnboundedPlane(k)}a.apply=function(f,k){return u(f,k,!1)};a.applyInverse=function(f,k){return u(f,k,!0)};a.calculateOrientedBounds=function(f,k,n,C){C||=d.create();const I=c.set(m.sv2d.get(),f[1],-f[0]),w=c.set(m.sv2d.get(),Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),
y=c.set(m.sv2d.get(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),F=m.sv2d.get();k.components.forEach(G=>G.vertices.forEach(({pos:q})=>{c.set(F,c.dot(f,q),c.dot(I,q));c.min(w,w,F);c.max(y,y,F)}));k=c.set(m.sv2d.get(),1E-6>y[0]-w[0]?n/2:0,1E-6>y[1]-w[1]?n/2:0);c.subtract(w,w,k);c.add(y,y,k);c.scale(C.basis1,f,(y[0]-w[0])/2);c.scale(C.basis2,I,(y[1]-w[1])/2);c.set(C.origin,w[0]*f[0]+w[1]*I[0],w[0]*f[1]+w[1]*I[1]);c.add(C.origin,C.origin,C.basis1);c.add(C.origin,C.origin,C.basis2);d.updateUnboundedPlane(C);
return C};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/extentUtils":function(){define(["exports","../../core/quantityUtils","./automaticLengthMeasurementUtils"],function(a,c,g){a.autoSize2D=function({topLeft:h,topRight:d,bottomRight:m,bottomLeft:r,spatialReference:x}){const t=c.max(g.autoDistance2D(r,m,x),g.autoDistance2D(h,d,x));if(null==t)return null;h=c.max(g.autoDistance2D(m,d,x),g.autoDistance2D(r,h,x));return null==h?null:{xSize:t,ySize:h}};Object.defineProperty(a,
Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/tooltip/infos/ExtentScaleTooltipInfo":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/quantityUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ./SketchTooltipInfo".split(" "),function(a,c,g,h,d,m,r,x,t){a.ExtentScaleTooltipInfo=class extends t.SketchTooltipInfo{constructor(z){super(z);
this.type="extent-scale";this.yScale=this.xScale=0;this.ySize=this.xSize=g.zeroMeters}};c.__decorate([h.property()],a.ExtentScaleTooltipInfo.prototype,"type",void 0);c.__decorate([h.property()],a.ExtentScaleTooltipInfo.prototype,"xScale",void 0);c.__decorate([h.property()],a.ExtentScaleTooltipInfo.prototype,"yScale",void 0);c.__decorate([h.property()],a.ExtentScaleTooltipInfo.prototype,"xSize",void 0);c.__decorate([h.property()],a.ExtentScaleTooltipInfo.prototype,"ySize",void 0);a.ExtentScaleTooltipInfo=
c.__decorate([x.subclass("esri.views.interactive.tooltip.infos.ExtentScaleTooltipInfo")],a.ExtentScaleTooltipInfo);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/extentTransform/PreserveAspectRatio":function(){define(["exports","../../../../../../core/has","../../../../analysis/Slice/sliceToolUtils","../../../../../interactive/dragEventPipeline"],function(a,c,g,h){function d(r){const x=g.isDiagonalResizeHandle(r.handle)?Math.max(Math.abs(r.factor1),
Math.abs(r.factor2)):0===r.handle.direction[0]?Math.abs(r.factor2):Math.abs(r.factor1);r.factor1=0>r.factor1?-x:x;r.factor2=0>r.factor2?-x:x}class m{constructor(){this._next=this._lastDragEvent=null;this._enabled=!1}get enabled(){return this._enabled}set enabled(r){if(this._enabled!==r&&null!=this._lastDragEvent&&null!=this._next){const x={...this._lastDragEvent,action:"update"};r&&d(x);this._next.execute(x)}this._enabled=r}createDragEventPipelineStep(){this._lastDragEvent=null;const r=new h.EventPipeline;
this._next=r;return[x=>{this._lastDragEvent="end"!==x.action?{...x}:null;this._enabled&&d(x);return x},r]}get test(){}}a.PreserveAspectRatio=m;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/transform/extentTransform/SnapRotation":function(){define(["exports","../../../../../../core/mathUtils","../../../../../interactive/dragEventPipeline"],function(a,c,g){class h{constructor(){this._next=this._lastDragEvent=null;this.incrementRadians=c.deg2rad(5);
this._enabled=!1}get enabled(){return this._enabled}set enabled(d){if(this._enabled!==d&&null!=this._lastDragEvent&&null!=this._next){const m={...this._lastDragEvent,action:"update"};d&&this._adjustRotation(m);this._next.execute(m)}this._enabled=d}createDragEventPipelineStep(){this._lastDragEvent=null;const d=new g.EventPipeline;this._next=d;return[m=>{this._lastDragEvent="end"!==m.action?{...m}:null;this._enabled&&this._adjustRotation(m);return m},d]}_adjustRotation(d){d.rotateAngle=Math.round(d.rotateAngle/
this.incrementRadians)*this.incrementRadians}}a.SnapRotation=h;Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/ManipulatedObject3DGraphic":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Evented ../../../../core/maybe ../../../../core/reactiveUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../core/support/UpdatingHandles ../../../../layers/graphics/sources/interfaces ../../../../support/elevationInfoUtils ../manipulatorUtils ./undoRecords ../../layers/graphics/GraphicState ../../../interactive/GraphicManipulator ../../../interactive/editGeometry/EditGeometryOperations".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C){const I=Symbol();a.ManipulatedObject3DGraphic=class extends g.EventedAccessor{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}get elevationInfo(){return b.getGraphicEffectiveElevationInfo(this.graphic)}get visible(){return this._graphicState.displaying}get isDraped(){return this._graphicState.isDraped}get origin(){return l.getGraphicAttachmentOrigin(this.view,this.graphic)}constructor(w){super(w);this._updatingHandles=
new u.UpdatingHandles}destroy(){this._operations=h.destroyMaybe(this._operations);this._updatingHandles.destroy()}initialize(){this._graphicState=new k.GraphicState({graphic:this.graphic});this._graphicState.on("changed",()=>this.emit("committed"));this.addHandles(this.view.trackGraphicState(this._graphicState));this.addHandles(this._updatingHandles.add(()=>this.graphic.geometry,w=>{if(w!==this._operations?.data.geometry)if(w&&"multipoint"!==w?.type&&"extent"!==w?.type)if(this._operations?.trySetGeometry(w))this.emit("modified-externally");
else{h.destroyMaybe(this._operations);this.removeHandles(I);const y=C.EditGeometryOperations.fromGeometry(w,this.view.state.viewingMode);this._operations=y;this.addHandles(y.data.on("change",()=>this.graphic.geometry=y.data.geometry),I)}else h.destroyMaybe(this._operations),this.removeHandles(I),this._operations=null},d.initial))}createManipulator(w){return new n.GraphicManipulator({view:this.view,graphic:this.graphic,...w})}maskOccludee(){return this.view.maskOccludee(this.graphic)}endInteraction(){"mesh"===
this.graphic.geometry?.type&&this.graphic.notifyMeshTransformChanged({action:p.MeshTransformUpdateAction.UpdateFastLocalOrigin})}toMap(w){return this.view.toMap(w,{include:[this.graphic]})}createUndoRecord(){const {graphic:{geometry:w}}=this;return f.createGraphicGeometryUndoRecord(w)}};c.__decorate([m.property({constructOnly:!0})],a.ManipulatedObject3DGraphic.prototype,"view",void 0);c.__decorate([m.property({constructOnly:!0})],a.ManipulatedObject3DGraphic.prototype,"graphic",void 0);c.__decorate([m.property()],
a.ManipulatedObject3DGraphic.prototype,"_operations",void 0);c.__decorate([m.property()],a.ManipulatedObject3DGraphic.prototype,"operations",null);c.__decorate([m.property()],a.ManipulatedObject3DGraphic.prototype,"updating",null);a.ManipulatedObject3DGraphic=c.__decorate([z.subclass("esri.views.3d.interactive.editingTools.ManipulatedObject3DGraphic")],a.ManipulatedObject3DGraphic);Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/interactive/editingTools/undoRecords":function(){define(["exports",
"../../../../core/libs/gl-matrix-2/factories/vec3f64","../../../../geometry/support/meshVertexSpaceUtils"],function(a,c,g){function h(r){let x=r,t=null;return{undo(z){t=z.geometry;z.geometry=x},redo(z){x=z.geometry;z.geometry=t}}}function d(r,x,t){let z=x?.clone(),u=c.clone(t.origin),p=null,b=null;return{undo:()=>{p=r.transform?.clone();b=c.clone(t.origin);r.transform=z;r.vertexSpace.origin=u},redo:()=>{z=r.transform?.clone();u=c.clone(t.origin);r.transform=p;r.vertexSpace.origin=b}}}function m(r){let x=
r.vertexAttributes.clonePositional(),t;return{undo:()=>{t=r.vertexAttributes.clonePositional();r.vertexAttributes=x},redo:()=>{x=r.vertexAttributes.clonePositional();r.vertexAttributes=t}}}a.createGraphicGeometryUndoRecord=function(r){return null!=r&&"mesh"===r.type?g.isRelativeVertexSpace(r.vertexSpace)?d(r,r.transform,r.vertexSpace):m(r):h(r)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/GraphicManipulator":function(){define("exports ../../chunks/tslib.es6 ../../core/Accessor ../../core/Evented ../../core/reactiveUtils ../../core/screenUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../core/libs/gl-matrix-2/math/vec2 ../../chunks/vec32 ../../core/libs/gl-matrix-2/factories/vec3f64 ../../geometry/projection ../../geometry/projection/projectPointToVector ../../support/elevationInfoUtils ../../symbols/support/defaults ../../symbols/support/ElevationInfo ./support/utils ../support/drapedUtils".split(" "),
function(a,c,g,h,d,m,r,x,t,z,u,p,b,l,f,k,n,C,I,w,y){a.GraphicManipulator=class extends g{set graphic(q){this._circleCollisionCache=null;this._originalSymbol=q.symbol;this._set("graphic",q);this.attachSymbolChanged()}get elevationInfo(){var {layer:q}=this.graphic;q=q&&"elevationInfo"in q?q.elevationInfo:null;const B=n.getGraphicEffectiveElevationMode(this.graphic);return new I({mode:B,offset:q?q.offset:0})}set focusedSymbol(q){q!==this._get("focusedSymbol")&&(this._set("focusedSymbol",q),this._updateGraphicSymbol(),
this._circleCollisionCache=null)}grabbableForEvent(){return!0}set grabbing(q){q!==this._get("grabbing")&&(this._set("grabbing",q),this._updateGraphicSymbol())}set hovering(q){q!==this._get("hovering")&&(this._set("hovering",q),this._updateGraphicSymbol())}set selected(q){q!==this._get("selected")&&(this._set("selected",q),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:q?"select":"deselect"}))}get _focused(){return this._get("hovering")||this._get("grabbing")}constructor(q){super(q);
this.layer=null;this.interactive=!0;this.selectable=!1;this.grabbable=!0;this.dragging=!1;this.cursor=null;this.consumesClicks=!0;this.events=new h.EventEmitter;this._originalSymbol=this._graphicSymbolChangedHandle=this._circleCollisionCache=null}destroy(){this.detachSymbolChanged();this._resetGraphicSymbol();this._set("view",null)}intersectionDistance(q){const B=this.graphic;if(!1===B.visible)return null;const e=B.geometry;if(null==e)return null;var v=this._get("focusedSymbol");v=null!=v?v:B.symbol;
return"2d"===this.view.type?this._intersectDistance2D(this.view,q,e,v):this._intersectDistance3D(this.view,q,B)}attach(){this.attachSymbolChanged();null!=this.layer&&this.layer.add(this.graphic)}detach(){this.detachSymbolChanged();this._resetGraphicSymbol();null!=this.layer&&this.layer.remove(this.graphic)}attachSymbolChanged(){this.detachSymbolChanged();this._graphicSymbolChangedHandle=d.watch(()=>this.graphic?.symbol,q=>{null!=q&&q!==this.focusedSymbol&&q!==this._originalSymbol&&(this._originalSymbol=
q,this._focused&&null!=this.focusedSymbol&&(this.graphic.symbol=this.focusedSymbol))},d.sync)}detachSymbolChanged(){null!=this._graphicSymbolChangedHandle&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)}onElevationChange(){}onViewChange(){}_updateGraphicSymbol(){this.graphic.symbol=this._focused&&null!=this.focusedSymbol?this.focusedSymbol:this._originalSymbol}_resetGraphicSymbol(){this.graphic.symbol=this._originalSymbol}_intersectDistance2D(q,B,e,v){v=v||C.getDefaultSymbol2D(e);
if(null==v)return null;var A=this._circleCollisionCache;if("point"===e.type&&"cim"===v.type&&"CIMPointSymbol"===v.data.symbol?.type&&v.data.symbol.symbolLayers){const {offsetX:D,offsetY:E,size:H}=w.getSymbolInfo(v);v=m.screenPointObjectToArray(B,G);A=H/2;q=q.toScreen(e);return p.squaredDistance(v,[q.x+D,q.y+E])<A*A?1:null}if("point"!==e.type||"simple-marker"!==v.type)return y.intersectsDrapedGeometry(B,e,q)?1:null;if(null==A||!A.originalPoint.equals(e)){const D=q.spatialReference;f.canProjectWithoutEngine(e.spatialReference,
D)&&(A=f.project(e,D),this._circleCollisionCache=A={originalPoint:e.clone(),mapPoint:A,radiusPx:m.pt2px(v.size)})}if(null!=A){e=m.screenPointObjectToArray(B,G);q=q.toScreen?.(A.mapPoint);if(!q)return null;A=A.radiusPx;B=q.x+m.pt2px(v.xoffset);v=q.y-m.pt2px(v.yoffset);return p.squaredDistance(e,[B,v])<A*A?1:null}return null}_intersectDistance3D(q,B,e){return(B=q.toMap(B,{include:[e]}))&&k.projectPointToVector(B,F,q.renderSpatialReference)?b.distance(F,q.state.camera.eye):null}};c.__decorate([r.property({constructOnly:!0,
nonNullable:!0})],a.GraphicManipulator.prototype,"graphic",null);c.__decorate([r.property()],a.GraphicManipulator.prototype,"elevationInfo",null);c.__decorate([r.property({constructOnly:!0,nonNullable:!0})],a.GraphicManipulator.prototype,"view",void 0);c.__decorate([r.property({value:null})],a.GraphicManipulator.prototype,"focusedSymbol",null);c.__decorate([r.property({constructOnly:!0})],a.GraphicManipulator.prototype,"layer",void 0);c.__decorate([r.property()],a.GraphicManipulator.prototype,"interactive",
void 0);c.__decorate([r.property()],a.GraphicManipulator.prototype,"selectable",void 0);c.__decorate([r.property()],a.GraphicManipulator.prototype,"grabbable",void 0);c.__decorate([r.property({value:!1})],a.GraphicManipulator.prototype,"grabbing",null);c.__decorate([r.property()],a.GraphicManipulator.prototype,"dragging",void 0);c.__decorate([r.property()],a.GraphicManipulator.prototype,"hovering",null);c.__decorate([r.property({value:!1})],a.GraphicManipulator.prototype,"selected",null);c.__decorate([r.property()],
a.GraphicManipulator.prototype,"cursor",void 0);a.GraphicManipulator=c.__decorate([u.subclass("esri.views.interactive.GraphicManipulator")],a.GraphicManipulator);const F=l.create(),G=m.createScreenPointArray();Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/interactive/support/utils":function(){define(["exports","../../../core/screenUtils"],function(a,c){a.getSymbolInfo=function(g){let h=0,d=0,m=0;if(!g)return{offsetX:h,offsetY:d,size:m};"cim"===g.type&&g.data.symbol&&
"symbolLayers"in g.data.symbol&&g.data.symbol.symbolLayers&&g.data.symbol.symbolLayers.map(r=>{"CIMVectorMarker"===r.type&&r.anchorPoint&&(Math.abs(r.anchorPoint.x)>h&&(h=r.anchorPoint.x),Math.abs(r.anchorPoint.y)>d&&(d=r.anchorPoint.y),null!=r.size&&r.size>m&&(m=r.size))});h=c.pt2px(h);d=c.pt2px(d);m=c.pt2px(m);return{offsetX:h,offsetY:d,size:m}};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/drapedUtils":function(){define(["exports","../../geometry","../../core/unitUtils",
"../../renderers/support/clickToleranceUtils","../../geometry/Extent"],function(a,c,g,h,d){function m(x,t,z,u=new d){let p=0;if("2d"===z.type)p=t*(z.resolution??0);else if("3d"===z.type){var b=z.overlayPixelSizeInMapUnits(x),l=z.basemapSpatialReference;p=null==l||l.equals(z.spatialReference)?t*b:g.getMetersPerUnitForSR(l)/g.getMetersPerUnitForSR(z.spatialReference)}t=x.x-p;b=x.y-p;l=x.x+p;x=x.y+p;({spatialReference:z}=z);u.xmin=Math.min(t,l);u.ymin=Math.min(b,x);u.xmax=Math.max(t,l);u.ymax=Math.max(b,
x);u.spatialReference=z;return u}const r=new d;a.createQueryGeometry=m;a.intersectsDrapedGeometry=function(x,t,z){x=z.toMap(x);if(null==x)return!1;const u=h.calculateTolerance();return m(x,u,z,r).intersects(t)};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/renderers/support/clickToleranceUtils":function(){define(["exports"],function(a){function c(d,m){return m?"xoffset"in m&&m.xoffset?Math.max(d,Math.abs(m.xoffset)):"yoffset"in m&&m.yoffset?Math.max(d,Math.abs(m.yoffset||0)):
d:d}function g(d,m){if("number"===typeof d)return d;if(d?.stops?.length){d=d.stops;let r=m=0;for(let x=0;x<d.length;x++){const t=d[x].size;"number"===typeof t&&(m+=t,r++)}return m/r}return m}function h(d,m){if(!m)return d;m=m.filter(t=>"size"===t.type).map(t=>{const {maxSize:z,minSize:u}=t;return(g(z,d)+g(u,d))/2});let r=0;const x=m.length;if(0===x)return d;for(let t=0;t<x;t++)r+=m[t];return Math.max(Math.floor(r/x),d)}a.calculateTolerance=function(d){const m=d?.renderer;d="touch"===d?.pointerType?
9:6;if(!m)return d;d="visualVariables"in m?h(d,m.visualVariables):d;if("simple"===m.type)return c(d,m.symbol);if("unique-value"===m.type){let r=d;m.uniqueValueInfos?.forEach(x=>{r=c(r,x.symbol)});return r}if("class-breaks"===m.type){let r=d;m.classBreakInfos.forEach(x=>{r=c(r,x.symbol)});return r}return d};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"*noref":1}});
define("exports ./editingTools/draw/DrawGraphicTool3D ./editingTools/move/MoveTool3D ./editingTools/reshape/ReshapeTool3D ./editingTools/transform/TransformTool3D ./editingTools/transform/ExtentTransformTool ./editingTools/ManipulatedObject3DGraphic".split(" "),function(a,c,g,h,d,m,r){Object.defineProperty(a,"DrawGraphicTool3D",{enumerable:!0,get:()=>c.DrawGraphicTool3D});Object.defineProperty(a,"MoveTool3D",{enumerable:!0,get:()=>g.MoveTool3D});Object.defineProperty(a,"ReshapeTool3D",{enumerable:!0,
get:()=>h.ReshapeTool3D});Object.defineProperty(a,"TransformTool3D",{enumerable:!0,get:()=>d.TransformTool3D});Object.defineProperty(a,"ExtentTransformTool",{enumerable:!0,get:()=>m.ExtentTransformTool});Object.defineProperty(a,"ManipulatedObject3DGraphic",{enumerable:!0,get:()=>r.ManipulatedObject3DGraphic});Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});