@arcgis/core 4.31.0-next.20240819 → 4.31.0-next.20240821
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d2fa4d2887692a1ec9b1.js → 0553357f4cdf4deb13d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b21db356f243d097ab3e.js → 122f3f294b8f95619f27.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc03a639c97a6f99dbc9.js → 1ac47b7a77818c372e1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{23a6700a3278d2cfcd75.js → 203cf58345df86caf4ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2c40517266fe420017c.js → 25fa59544c13db8cee30.js} +1 -1
- package/assets/esri/core/workers/chunks/29545cd255b763d393d0.js +1 -0
- package/assets/esri/core/workers/chunks/3f75b7ed24b440b4508a.js +1 -0
- package/assets/esri/core/workers/chunks/40e4224f700206c67053.js +1 -0
- package/assets/esri/core/workers/chunks/48ab5ce08a97e5dac709.js +1 -0
- package/assets/esri/core/workers/chunks/{56bb7b589a0c040263ff.js → 4f1d44ce2f68e2ec2b60.js} +1 -1
- package/assets/esri/core/workers/chunks/5429c2e1d2f159f332f9.js +1 -0
- package/assets/esri/core/workers/chunks/{d8f416440963b77595e3.js → 58c476c8f6c274d77c0c.js} +1 -1
- package/assets/esri/core/workers/chunks/5c4173205f885cd21422.js +1 -0
- package/assets/esri/core/workers/chunks/5cb07fa227b7fd06499f.js +1 -0
- package/assets/esri/core/workers/chunks/6f7c2d02fbd29870f6ee.js +1 -0
- package/assets/esri/core/workers/chunks/75ac4dfa3c8feeb82de2.js +1 -0
- package/assets/esri/core/workers/chunks/7fda3d3b211b6da5b0e5.js +1 -0
- package/assets/esri/core/workers/chunks/{1e7ce327435e0f4a4bec.js → 8224351edd777843180d.js} +1 -1
- package/assets/esri/core/workers/chunks/949cbb667531527e6918.js +1 -0
- package/assets/esri/core/workers/chunks/{6e966c885e2ac9dff46b.js → 991295637f51e8207efe.js} +1 -1
- package/assets/esri/core/workers/chunks/{252ff37bf5e12dae0b18.js → 9acc02df376d5bdfac87.js} +1 -1
- package/assets/esri/core/workers/chunks/9bbf7129579fe04ab268.js +1 -0
- package/assets/esri/core/workers/chunks/{492137ecf03ad2b2c2e3.js → a0fdb0fa96680ac758c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ab02b7660e751cffe1c.js → a4b0e6084971989c526b.js} +1 -1
- package/assets/esri/core/workers/chunks/a6834f66d8da628c3fb2.js +1 -0
- package/assets/esri/core/workers/chunks/{238936d241e76c4c0343.js → ace8b6351ed35b03499b.js} +1 -1
- package/assets/esri/core/workers/chunks/b08689e5b0d1449877f5.js +1 -0
- package/assets/esri/core/workers/chunks/b686d70586623f7bf9a6.js +1 -0
- package/assets/esri/core/workers/chunks/b6dffcacd8b02384d6e2.js +1 -0
- package/assets/esri/core/workers/chunks/{bf7253f7e5d6d63333c3.js → b765a72c9d4f092855f5.js} +1 -1
- package/assets/esri/core/workers/chunks/b9490d5cc65cce2f2948.js +1 -0
- package/assets/esri/core/workers/chunks/{4706798c58398447d79f.js → bbd5477944da39234c30.js} +1 -1
- package/assets/esri/core/workers/chunks/cd8d595d577b74817623.js +1 -0
- package/assets/esri/core/workers/chunks/{145592dc516b86fbda63.js → cfc93bbd35cc4bfde7c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{48aeb087a1b10a8f4c0b.js → d5d70b3ecc0aca2ac184.js} +1 -1
- package/assets/esri/core/workers/chunks/{a784222a7f9dc40ed67c.js → e2a6f77c05d0818e3f74.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ee365125c9fb9d9cafe.js → e5474bcde5b8fa037b56.js} +11 -11
- package/assets/esri/core/workers/chunks/{f7ab24d3dfc0ba9bf760.js → ea561b2460e634a643fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf7be98af841fadacf50.js → fc5129c825bc3c78b112.js} +1 -1
- package/chunks/BloomComposition.glsl.js +45 -0
- package/chunks/Centroid-DZi-eb9F.js +5 -0
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +5 -0
- package/chunks/OperatorProximity.js +5 -0
- package/chunks/OperatorShapePreservingDensify.js +1 -1
- package/chunks/Polyline.js +1 -1
- package/core/mathUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +5 -0
- package/geometry/operators/gx/operatorClip.js +1 -1
- package/geometry/operators/gx/operatorCut.js +1 -1
- package/geometry/operators/gx/operatorDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensifyByLength.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +5 -0
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +5 -0
- package/geometry/operators/gx/operatorOffset.js +5 -0
- package/geometry/operators/gx/operatorShapePreservingDensify.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/operatorAutoComplete.js +5 -0
- package/geometry/operators/operatorCentroid.js +5 -0
- package/geometry/operators/operatorContains.js +1 -1
- package/geometry/operators/operatorCrosses.js +1 -1
- package/geometry/operators/operatorCut.js +1 -1
- package/geometry/operators/operatorDensify.js +1 -1
- package/geometry/operators/operatorDifference.js +1 -1
- package/geometry/operators/operatorDisjoint.js +1 -1
- package/geometry/operators/operatorEquals.js +1 -1
- package/geometry/operators/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/operatorGeodeticDensifyByLength.js +1 -1
- package/geometry/operators/operatorGeodeticDistance.js +5 -0
- package/geometry/operators/operatorIntersection.js +1 -1
- package/geometry/operators/operatorIntersects.js +1 -1
- package/geometry/operators/operatorLabelPoint.js +5 -0
- package/geometry/operators/operatorOffset.js +5 -0
- package/geometry/operators/operatorOverlaps.js +1 -1
- package/geometry/operators/operatorProximity.js +5 -0
- package/geometry/operators/operatorRelate.js +1 -1
- package/geometry/operators/operatorReshape.js +5 -0
- package/geometry/operators/operatorShapePreservingDensify.js +1 -1
- package/geometry/operators/operatorTouches.js +1 -1
- package/geometry/operators/operatorWithin.js +1 -1
- package/geometry/operators/support/converterAPI.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/webMercatorUtils.js +1 -1
- package/interfaces.d.ts +34 -6
- package/layers/LinkChartLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/versionManagement/gdbVersion/differences.js +5 -0
- package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +5 -0
- package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +5 -0
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/support/highlightGroupUtils.js +1 -1
- package/views/2d/tiling/LODInfo.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomTechnique.js +5 -0
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/0c6411a08d8b40fc7f4c.js +0 -1
- package/assets/esri/core/workers/chunks/22128034bf3b5aa713fc.js +0 -1
- package/assets/esri/core/workers/chunks/2dddb8a989b9c96572fe.js +0 -1
- package/assets/esri/core/workers/chunks/31f931de94414f13bd13.js +0 -1
- package/assets/esri/core/workers/chunks/370dd36904acad113842.js +0 -1
- package/assets/esri/core/workers/chunks/5f93a59c92f464925f9c.js +0 -1
- package/assets/esri/core/workers/chunks/6a04b6c7a5ec2389a768.js +0 -1
- package/assets/esri/core/workers/chunks/6f1853ab502bebefd3c3.js +0 -1
- package/assets/esri/core/workers/chunks/8a37c5b110665c8ff5a7.js +0 -1
- package/assets/esri/core/workers/chunks/945a3cc2191606f3a917.js +0 -1
- package/assets/esri/core/workers/chunks/9661398ce832137461f6.js +0 -1
- package/assets/esri/core/workers/chunks/b09bc516b7a7bf5a44a8.js +0 -1
- package/assets/esri/core/workers/chunks/b370dae404d8ff733a54.js +0 -1
- package/assets/esri/core/workers/chunks/c2ba052733e8ccae82e1.js +0 -1
- package/assets/esri/core/workers/chunks/d7d2552ff3e2d44319c7.js +0 -1
- package/assets/esri/core/workers/chunks/f2c3b68f00f88700e698.js +0 -1
- package/assets/esri/core/workers/chunks/f4d9689194d8d2547bb1.js +0 -1
- package/assets/esri/core/workers/chunks/f91b811fa044a01b6bb3.js +0 -1
- package/chunks/SimpleGeometryCursor.js +0 -5
- package/geometry/operators/support/cursorUtils.js +0 -5
- package/views/2d/layers/features/support/tileUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../Camera.js";import{Cyclical as t}from"../../../core/Cyclical.js";import n from"../../../core/Logger.js";import{deg2rad as r,rad2deg as o}from"../../../core/mathUtils.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{j as a,g as c,F as l,c as s,p as u}from"../../../chunks/vec32.js";import{clone as f,create as m}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import d from"../../../geometry/Point.js";import{projectWithZConversion as h,project as y}from"../../../geometry/projection.js";import g from"../../../geometry/SpatialReference.js";import{projectPointToVector as v,projectPointToVectorAsync as w}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as R,projectVectorToPointAsync as x}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as j}from"../../../geometry/projection/projectVectorToVector.js";import{
|
|
5
|
+
import e from"../../../Camera.js";import{Cyclical as t}from"../../../core/Cyclical.js";import n from"../../../core/Logger.js";import{deg2rad as r,rad2deg as o}from"../../../core/mathUtils.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{j as a,g as c,F as l,c as s,p as u}from"../../../chunks/vec32.js";import{clone as f,create as m}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import d from"../../../geometry/Point.js";import{projectWithZConversion as h,project as y}from"../../../geometry/projection.js";import g from"../../../geometry/SpatialReference.js";import{projectPointToVector as v,projectPointToVectorAsync as w}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as R,projectVectorToPointAsync as x}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as j}from"../../../geometry/projection/projectVectorToVector.js";import{ViewingMode as T}from"../../ViewingMode.js";import{cameraOnContentAlongViewDirection as S}from"../camera/intersectionUtils.js";import{c as M}from"../../../chunks/cameraUtilsPlanar.js";import{c as z}from"../../../chunks/cameraUtilsSpherical.js";import{getGreatCircleSpanAt as C}from"./earthUtils.js";import{getElevationAtPoint as U}from"./ElevationProvider.js";import{isSpatialReferenceSupported as P}from"../../support/spatialReferenceSupport.js";const b=()=>n.getLogger("esri.views.3d.support.cameraUtils"),A=39.37,D=96,L=D*A,E=1,G=8,H=5,O=1,q={heading:0,tilt:0},I=m(),k=new t(-20037508.342788905,20037508.342788905),F=new t(-180,180);var J;function V(e){return e.spatialReference??g.WGS84}function X({state:e}){return e.isGlobal?z:M}function K(e,t,n,r,o){return X(e).headingTiltToDirectionUp(t,n,r,o)}function W(e,t){if(null==t)return null;const n=e.renderSpatialReference,o=X(e).headingTiltToDirectionUp,i=m();if(!v(t.position,i,n))return null;const l=o(i,t.heading,t.tilt);a(l.direction,l.direction,e.state.camera.distance),c(l.direction,l.direction,i);const s=S(e,i,l.direction,l.up);return s.fov=r(t.fov),s.row=t.layout.row,s.rows=t.layout.rows,s.column=t.layout.column,s.columns=t.layout.columns,s}!function(e){e[e.LOCKED=0]="LOCKED",e[e.ADJUST=1]="ADJUST"}(J||(J={}));const Y=m();function N(t,n,r){const i=t.renderSpatialReference,a=ee(t,n.eye,n.viewForward,n.up,q);let c=V(t);return j(n.eye,i,Y,c)||(c=g.WGS84,j(n.eye,i,Y,c)),null==r?r=new e(new d(Y,c),a.heading,a.tilt,o(n.fov)):(r.position.x=Y[0],r.position.y=Y[1],r.position.z=Y[2],r.position.spatialReference=c,r.heading=a.heading,r.tilt=a.tilt,r.fov=o(n.fov)),r.layout.row=n.row,r.layout.rows=n.rows,r.layout.column=n.column,r.layout.columns=n.columns,r}function Z(e,t){const n=e.state.camera,r=n.width/2/n.pixelRatio;t/=e.renderCoordsHelper.unitInMeters;return r/(D*A/t)/Math.tan(n.fovX/2)}function B(e,t){const{camera:n}=e.state,{unitInMeters:r}=e.renderCoordsHelper,o=t*Math.tan(n.fovX/2),i=n.width/2/n.pixelRatio;return L/(i/o)*r}async function Q(e,t,n,r,o,i){return _(e,t,Z(e,n),r,o,i)}function $(e,t,n,r,o,i){return ze(e,ie(e,r.heading,r.tilt,t,n,o),r.fov,i)}async function _(e,t,n,r,o,a){const c=await ae(e,r.heading,r.tilt,t,n,o,a);return i(a),Ce(e,c,r.fov,a)}function ee(e,t,n,r,o){return X(e).directionToHeadingTilt(t,n,r,o)}function te(e,t){return!!(e.basemapTerrain&&e.renderCoordsHelper.fromRenderCoords(t,I,e.spatialReference)&&e.elevationProvider&&(U(e.elevationProvider,I)??0)>I[2]-O)}async function ne(e,t,n){if(te(e,t))return!0;const{elevationProvider:r,spatialReference:o,renderCoordsHelper:a}=e;if(null==r||!a.fromRenderCoords(t,I,o))return!1;const[c,l,s]=I,u=await r.queryElevation(c,l,s,o,"ground",n)??0;return i(n),u>s-O}async function re(e,t,n){const r=m();if(null==t)return s(r,e.state.camera.center);if(t instanceof d){const{renderSpatialReference:o,basemapTerrain:a,elevationProvider:c}=e,l=t.spatialReference;if(await w(t,r,o,0,{signal:n}),i(n),null==t.z&&null!=a&&null!=c){const o=await c.queryElevation(t.x,t.y,t.z??0,l,"ground",n);i(n),null!=o&&e.renderCoordsHelper.setAltitude(r,o)}return r}return s(r,t)}function oe(e,t){const n=m();if(null==t)return s(n,e.state.camera.center);if(t instanceof d){if(!v(t,n,e.renderSpatialReference))return null;const{basemapTerrain:r,elevationProvider:o}=e;if(null==t.z&&null!=r&&null!=o){const r=U(o,t);null!=r&&e.renderCoordsHelper.setAltitude(n,r)}return n}return s(n,t)}function ie(e,t,n,r,o,i){return ce(e,t,n,r instanceof d?r:null,oe(e,r),o,i)}async function ae(e,t,n,r,o,a,c){const l=r instanceof d?r:null,s=await re(e,r,c);return i(c),le(e,t,n,l,s,o,a,c)}function ce(e,t,n,r,o,i,a){if(null==o)return null;if(!r&&(r=new d({spatialReference:V(e)}),!R(o,e.renderSpatialReference,r)))return null;const c=se(e,t,n,o,i,a);if(ue(e,n,a)&&te(e,c.eye)){const{tilt:a,mode:c}=fe(e,n,o,i);return ce(e,t,a,r,o,i,c)}return me(c,o)}async function le(e,t,n,r,o,a,c,l){r||(r=new d({spatialReference:V(e)}),await x(o,e.renderSpatialReference,r,{signal:l})||(r=null)),i(l);const s=se(e,t,n,o,a,c);if(ue(e,n,c)&&await ne(e,s.eye,l)){i(l);const{tilt:c,mode:s}=fe(e,n,o,a);return le(e,t,c,r,o,a,s,l)}return me(s,o)}function se(e,t,n,r,o,i){const a=Re(e,t,n,r,o=Math.max(o,e.state.constraints.minimumPoiDistance),i);return(0,X(e).eyeForCenterWithHeadingTilt)(r,o,a.heading,a.tilt)}function ue(e,t,n){const r=e.map.ground.navigationConstraint;return n===J.ADJUST&&e.state.isGlobal&&t>0&&(null==r||"stay-above"===r.type)}function fe(e,t,n,r){const o=Se(e,n,r,Te(e,r,t,n));return{tilt:o,mode:t-o<1?J.LOCKED:J.ADJUST}}function me(e,t){return{...e,center:f(t)}}function pe(e,t){const{state:n,spatialReference:r}=e,o=t.spatialReference;return n.isGlobal&&P(o,T.Global)||n.isLocal&&r.equals(o)}function de(e,t){let n,r,o;if(e.state.isGlobal){const e=new d(t.xmin,t.ymin,t.spatialReference),i=new d(t.xmax,t.ymax,t.spatialReference),a=t.spatialReference.isGeographic?F:k;n=new d({x:a.center(e.x,i.x),y:(i.y+e.y)/2,z:null!=t.zmax&&null!=t.zmin?(t.zmax+t.zmin)/2:void 0,spatialReference:t.spatialReference});const c=p(t.spatialReference),l=C(n,e,i);r=l.lon,o=l.lat,a.diff(e.x,i.x)>a.range/2&&(r+=c.halfCircumference),r=Math.min(r,c.halfCircumference),o=Math.min(o,c.halfCircumference)}else{const i=e.renderSpatialReference??t.spatialReference;i.equals(t.spatialReference)||(t=y(t,i)),r=t.xmax-t.xmin,o=t.ymax-t.ymin;const a=null!=t.zmax&&null!=t.zmin?(t.zmax+t.zmin)/2:void 0;n=new d({x:t.xmin+.5*r,y:t.ymin+.5*o,z:a,spatialReference:i})}const i=null!=t.zmax&&null!=t.zmin?t.zmax-t.zmin:0,a=e.state.camera,c=1/Math.tan(a.fovX/2),l=1/Math.tan(a.fovY/2),s=1/Math.tan(a.fov/2);return{center:n,distance:Math.max(.5*r*c,.5*o*l,.5*i*s)/E}}async function he(e,t,n,r,o,a){const c=pe(e,t)?t:await h(t,e.spatialReference,{signal:a});i(a);const{center:l,distance:s}=de(e,c),u=await ae(e,n,r,l,s,o,a);return i(a),Ce(e,u,e.camera.fov,a)}function ye(e,t,n,r,o,i){let a;try{a=pe(e,t)?t:y(t,e.spatialReference)}catch(u){return null}const{center:c,distance:l}=de(e,a),s=ie(e,n,r,c,l,o);return null==s?null:ze(e,s,e.camera.fov,i)}function ge(e,t,n){const r=e.renderSpatialReference,o=new d({spatialReference:V(e)});if(!R(n,r,o))return null;const i=Math.tan(t.fovX/2),a=Math.tan(t.fovY/2),c=l(t.eye,n),s=2*c*i*E,u=2*c*a*E;return X(e).toExtent(e,o,s,u)}function ve(e,t){return X(e).toArea(e,t)}function we(e,t,n){const r=e.pointsOfInterest.centerOnSurfaceFrequent.distance;if(Math.log(n/r)/Math.LN2>G)return!0;const o=t,i=e.pointsOfInterest.centerOnSurfaceFrequent.renderLocation;return u(o,i)/(Math.tan(.5*e.state.camera.fov)*r)>H}function Re(e,t,n,r,o,i){let a=0;return i===J.ADJUST&&we(e,r,o)?(t=0,a=je(e,o,n,r)):a=Me(e,r,o,n),a=e.state.constraints.clampTilt(o,a),{heading:t,tilt:n=Se(e,r,o,a)}}const xe=.7;function je(e,t,n,r){const o=Me(e,r,t,n);if(!e.state.constraints.tilt)return o;const i=e.state.constraints.tilt(t);i.max=Math.min(i.max,.5*Math.PI);const a=i.min*(1-xe)+i.max*xe;return Math.min(o,a)}function Te(e,t,n,r){let o=Me(e,r,t,n);if(!e.state.constraints.tilt)return o;const i=e.state.constraints.tilt(t);return o=Math.min(o,.5*Math.PI),i.min*(1-xe)+o*xe}function Se(e,t,n,r){return X(e).lookAtTiltToEyeTilt(r,t,n)}function Me(e,t,n,r){return X(e).eyeTiltToLookAtTilt(r,t,n)}function ze(t,n,r,o){if(null==n)return null;const i=t.renderSpatialReference,a=new d({spatialReference:V(t)});return R(n.eye,i,a)?(o??=new e,o.position=a,o.heading=n.heading,o.tilt=n.tilt,o.fov=r,o):null}async function Ce(t,n,r,o){const a=t.renderSpatialReference,c=new d({spatialReference:V(t)});return await x(n.eye,a,c,{signal:o}),i(o),new e(c,n.heading,n.tilt,r)}function Ue(e,t){const n=e.basemapTerrain?.tilingScheme;if(n)return n.levelAtScale(t);b().error("#scaleToZoom()","Cannot compute zoom from scale without a tiling scheme")}function Pe(e,t){const n=e.basemapTerrain?.tilingScheme;if(n)return n.scaleAtLevel(t);b().error("#zoomToScale()","Cannot compute scale from zoom without a tiling scheme")}export{J as OrientationMode,ee as directionToHeadingTilt,B as distanceToScale,W as externalToInternal,_ as fromCenterDistanceAsync,$ as fromCenterDistanceSync,Q as fromCenterScale,he as fromExtentAsync,ye as fromExtentSync,ae as getObserverForPointAtDistanceAsync,ie as getObserverForPointAtDistanceSync,V as getViewSR,K as headingTiltToDirectionUp,N as internalToExternal,Z as scaleToDistance,Ue as scaleToZoom,ve as toArea,ge as toExtent,Pe as zoomToScale};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{on as o}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{p as n,e as a,c as l}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import c from"../../../../geometry/Point.js";import{ViewingMode as d}from"../../../ViewingMode.js";import{distanceToScale as h}from"../cameraUtils.js";import{PointOfInterest as u}from"./PointOfInterest.js";import{PropertiesPool as m}from"../../../support/PropertiesPool.js";import{Yield as _}from"../../../support/Yield.js";const g=Array;let y=class extends u{constructor(t){super(t),this._dirty=!1,this._propertiesPool=new m({location:c,renderLocation:g},this),this._estimatedSurfaceAltitude=0,this._pendingElevationQueryController=null,this.renderLocation=p(),this._tmpPoint=new c}initialize(){if(this.scheduler&&this.addHandles(this.scheduler.registerTask(this.task,this)),this.runTask(),this.map){const t=()=>this._setDirty();this.addHandles(o((()=>this.map?.ground?.layers),"change",t,{onListenerAdd:t,onListenerRemove:t}))}this._updateRenderLocation()}destroy(){this._cancelPendingRequest(),this._propertiesPool=e(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t}get scale(){const t=this._camera,e=n(t.eye,this.renderLocation),r={renderCoordsHelper:this.renderCoordsHelper,state:{camera:t}};return h(r,e
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{on as o}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{p as n,e as a,c as l}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import c from"../../../../geometry/Point.js";import{ViewingMode as d}from"../../../ViewingMode.js";import{distanceToScale as h}from"../cameraUtils.js";import{PointOfInterest as u}from"./PointOfInterest.js";import{PropertiesPool as m}from"../../../support/PropertiesPool.js";import{Yield as _}from"../../../support/Yield.js";const g=Array;let y=class extends u{constructor(t){super(t),this._dirty=!1,this._propertiesPool=new m({location:c,renderLocation:g},this),this._estimatedSurfaceAltitude=0,this._pendingElevationQueryController=null,this.renderLocation=p(),this._tmpPoint=new c}initialize(){if(this.scheduler&&this.addHandles(this.scheduler.registerTask(this.task,this)),this.runTask(),this.map){const t=()=>this._setDirty();this.addHandles(o((()=>this.map?.ground?.layers),"change",t,{onListenerAdd:t,onListenerRemove:t}))}this._updateRenderLocation()}destroy(){this._cancelPendingRequest(),this._propertiesPool=e(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool.get("location");return t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t}get scale(){const t=this._camera,e=n(t.eye,this.renderLocation),r={renderCoordsHelper:this.renderCoordsHelper,state:{camera:t}};return h(r,e)}get updating(){return this._dirty||null!=this._pendingElevationQueryController}updateRenderLocation(){this._setDirty(),this._updateRenderLocation()}_setDirty(){this._dirty||(this._dirty=!0,this.notifyChange("updating"))}_cancelPendingRequest(){const t=this._pendingElevationQueryController;t&&(this._pendingElevationQueryController=null,t.abort(),this.notifyChange("updating"))}get running(){return!this._pendingElevationQueryController&&this._dirty}runTask(){if(this._cancelPendingRequest(),this._dirty=!1,this.notifyChange("updating"),!this.map?.ground)return this._updateSurfaceAltitude(0),_;const t=this.state.spatialReference;this._tmpPoint.spatialReference=t,this.renderCoordsHelper.fromRenderCoords(this._camera.eye,this._tmpPoint);const e=(this._tmpPoint.z??0)>C&&this.renderCoordsHelper.viewingMode===d.Global&&(t.isWGS84||t.isWebMercator);let o=new AbortController;return this.map.ground.queryElevation(this._tmpPoint,{signal:o.signal,cache:this.cache,minDemResolution:e?v:0}).then((t=>this._updateSurfaceAltitude(t.geometry.z??0))).catch((t=>{r(t)||this._updateSurfaceAltitude(0)})).catch((()=>{})).then((()=>{this._pendingElevationQueryController===o&&(this._pendingElevationQueryController=null,this.notifyChange("updating")),o=null})),this._pendingElevationQueryController=o,_}_updateSurfaceAltitude(t){this._estimatedSurfaceAltitude!==t&&(this._estimatedSurfaceAltitude=t,this._updateRenderLocation())}_updateRenderLocation(){this.renderCoordsHelper.setAltitude(f,this._estimatedSurfaceAltitude,this._camera.eye),a(this._get("renderLocation"),f)||(this._set("renderLocation",l(this._propertiesPool.get("renderLocation"),f)),this.notifyChange("renderLocation"))}};t([i({constructOnly:!0})],y.prototype,"scheduler",void 0),t([i({constructOnly:!0})],y.prototype,"cache",void 0),t([i({constructOnly:!0})],y.prototype,"task",void 0),t([i()],y.prototype,"location",null),t([i({constructOnly:!0})],y.prototype,"map",void 0),t([i()],y.prototype,"renderLocation",void 0),t([i()],y.prototype,"scale",null),t([i()],y.prototype,"updating",null),y=t([s("esri.views.3d.support.pointsOfInterest.CameraOnSurface")],y);const f=p(),C=1e5,v=1e6;export{y as CameraOnSurface};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../Camera.js";import"../../../geometry.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as u,g as f,p,c as g,f as y,s as h,t as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectWithZConversion as x,tryProjectWithZConversion as j}from"../../../geometry/projection.js";import{computeTranslationToOriginAndRotation as v}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as b}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as R}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as z}from"../../../geometry/projection/projectVectorToVector.js";import{create as G,center as S,toRect as B,isPoint as T,empty as M,expandWithVec3 as Z,expandWithAABB as A,width as E,height as F,depth as O}from"../../../geometry/support/aaBoundingBox.js";import{create as P,isPoint as D}from"../../../geometry/support/aaBoundingRect.js";import{intersectsPoint as U}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as V}from"../../../geometry/support/scaleUtils.js";import{cameraOnContentAlongViewDirection as C}from"../camera/intersectionUtils.js";import{getViewSR as k,fromExtentAsync as I,internalToExternal as J,OrientationMode as K,scaleToDistance as L,fromCenterDistanceAsync as N,fromExtentSync as W,fromCenterDistanceSync as Y,externalToInternal as q,distanceToScale as X,computeScale as _,fromCenterScale as H,directionToHeadingTilt as Q,zoomToScale as $}from"./cameraUtils.js";import{getElevationAtPoint as tt}from"./ElevationProvider.js";import et from"../../../geometry/Point.js";import nt from"../../../geometry/Extent.js";import at from"../../../geometry/SpatialReference.js";import rt from"../../../geometry/Geometry.js";import ot from"../../../geometry/Multipoint.js";const it=.66;function st(t){return 360-r.normalize(t)}function ct(t){return r.normalize(360-t)}function lt(t,e,n){const a=e.camera;if(null!=a)return ut(a,k(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=pt(t,e.rotation,n);if("point"===r.type)return gt(t,e,r,o,i);const s=r.extent;return null==s?null:W(t,s,o.heading,o.tilt,i)}async function mt(t,e,n,a){const r=e.camera;if(null!=r)return ft(r,k(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=pt(t,e.rotation,n);if("point"===o.type)return yt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return I(t,c,i.heading,i.tilt,s,a)}function ut(t,e){const n=t.position;let a;try{a=j(n,e)}catch(o){return null}if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ft(t,e,n){const a=t.position,r=await x(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function pt(t,e,n){const a=J(t,t.state.camera);let r=K.ADJUST;return null!=e&&(a.heading=st(e),r=K.LOCKED),null!=n&&(a.tilt=n),{camera:a,mode:r}}function gt(t,e,n,a,r){const o=t.spatialReference;let i;try{i=j(n.clone(),o)}catch(c){return null}if(!i)return null;const s=null!=e.scale?L(t,e.scale,i.latitude):t.state.camera.distance;return Y(t,i,s,a,r)}async function yt(t,e,n,a,r,o){const s=t.spatialReference,c=await x(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?L(t,e.scale,c.latitude):t.state.camera.distance;return N(t,c,l,a,r,o)}function ht(t,e,a=null){return null==a&&(a=new n),vt(t,null,e.clone(),a)}async function dt(e,a,r){const i=Ot(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Pt(await Gt(e,i.target,i,r,c))}if(i.target instanceof t)return Pt(await St(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof nt){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Pt(l||t?await Tt(e,i,i.target.center,s,r,c):await At(e,i,i.target,s,r,c))}const m=new Ut,u=l?xt(e,i):void 0;if(await zt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(S(m.boundingBox,Vt),Yt.x=Vt[0],Yt.y=Vt[1],Yt.z=Vt[2],Yt.spatialReference=e.spatialReference,isFinite(Yt.z)&&m.hasZ?t=T(m.boundingBox):(Yt.z=void 0,t=D(B(m.boundingBox,Jt))),l||t)return Pt(await Tt(e,i,Yt,s,r,c));const n=Dt(e,m.screenSpaceObjects);return Pt(await Ft(e,i,Yt,m.boundingBox,n,s,r,c))}return i.position?Pt(await Mt(e,i,s,c,r)):Pt(await Zt(e,i,s,r,c))}function wt(t,e){return null==e.scale&&null!=e.zoom?$(t,e.zoom):e.scale}function xt(t,e){const n=wt(t,e);return n?V(n):void 0}function jt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=st(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function vt(t,e,n,a){const r=t.spatialReference||at.WGS84;if(e??=q(t,n),null==e)return a;const o=new et({spatialReference:r});if(!R(e.center,t.renderSpatialReference,o))return a;a.targetGeometry=o;const{latitude:i}=o;return a.scale=null!=i?X(t,e.distance,i):_(t,e),a.rotation=ct(n.heading),a.camera=n,a}async function bt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":n=e.centroid}null!=n&&i&&t.elevationProvider?(n=await x(n,i,{signal:a}),Vt[2]=tt(t.elevationProvider,n)??0):Vt[2]=0}const s=qt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Vt),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await x(new ot({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Vt[0]=o,Vt[1]=f,Vt[2]=p,Z(n.boundingBox,Vt);else for(const[o,f]of u.points)Vt[0]=o,Vt[1]=f,Z(n.boundingBox,Vt)}async function Rt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await bt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await bt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;A(r.boundingBox,m),l&&l.forEach((t=>{r.screenSpaceObjects.push(t)})),isFinite(m[2])&&(r.hasZ=!0)}async function zt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Yt.x=e,Yt.y=a,Yt.z=void 0,Yt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:at.WGS84,void await bt(t,Yt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map((e=>zt(t,e,a,r,o)))):n instanceof rt?await bt(t,n,r,o):n instanceof e&&await Rt(t,n,a,r,o)}async function Gt(t,e,n,a,r){if(e.camera)return St(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=ct(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=wt(t,n);return null!=o&&(r.scale=o),r.camera=await mt(t,r,n.tilt,a),r}async function St(t,e,n,a){const r=t.spatialReference,o=await x(e.position,r,{signal:n}),i=e.clone();return i.position=o,vt(t,null,i,a)}async function Bt(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await b(e,Nt,s,0,{signal:i}),await b(n,Lt,s,0,{signal:i}),o.targetGeometry=new et(e),r.position=new et(n),y(Kt,Nt,Lt),Q(t,Lt,Kt,a.up,r),o.scale=X(t,p(Lt,Nt),o.targetGeometry.latitude),o.rotation=ct(r.heading),o.camera=r,o}async function Tt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=C(t);if(e.position)return Bt(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const a=i.distance/e.zoomFactor,r=u(Vt,i.viewForward,-a);i.eye=f(Vt,i.center,r),o.scale=X(t,a,n.latitude)}J(t,i,a);const s=jt(a,e)?K.LOCKED:K.ADJUST;if(!e.zoomFactor){const c=wt(t,e);null==c?(await b(n,Vt,t.renderSpatialReference,0,{signal:r}),U(i.frustum,Vt)?o.scale=X(t,p(i.eye,Vt),n.latitude):o.scale=_(t,i)):o.scale=c,o.camera=await H(t,o.targetGeometry,o.scale,a,s,r)}return o}async function Mt(t,e,n,a,r){const o=C(t);g(Kt,o.viewForward),Q(t,o.eye,Kt,o.up,Wt);const i=t.spatialReference,{position:s}=e;if(s){const t=await x(s,i,{signal:r});n.position=t}else n.position=new et;return n.heading=null!=e.heading?e.heading:Wt.heading,n.tilt=null!=e.tilt?e.tilt:Wt.tilt,vt(t,null,n,a)}async function Zt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=C(t),{spatialReference:i,renderSpatialReference:s}=t,c=new et({spatialReference:i});return R(o.center,s,c)?Tt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),jt(r.camera,e),r}async function At(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=C(t);J(t,i,a);const s=jt(a,e)?K.LOCKED:K.ADJUST;return o.camera=await I(t,n,a.heading,a.tilt,s,r),o}function Et(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=tt(t.elevationProvider,n)),h(Vt,n.x,n.y,o),v(t.spatialReference,Vt,Ct,t.renderSpatialReference),s(kt,Ct),c(kt,kt),M(It);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Vt,a[e[0]],a[e[1]],n),z(Vt,t.spatialReference,Vt,t.renderSpatialReference),Z(It,d(Vt,Vt,kt))}const l=E(It),m=F(It),u=O(It),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Ft(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=C(t),l=Et(t,c,n,a,r);J(t,c,o);const m=jt(o,e)?K.LOCKED:K.ADJUST;return s.scale=X(t,l,s.targetGeometry.latitude),s.camera=await H(t,s.targetGeometry,s.scale,o,m,i),s}function Ot(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Pt(t){return null!=t?.camera&&(t.rotation=ct(t.camera.heading)),t}function Dt(t,e){const n=it;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class Ut{constructor(){this.hasZ=!1,this.boundingBox=M(),this.screenSpaceObjects=new Array}}const Vt=w(),Ct=m(),kt=l(),It=G(),Jt=P(),Kt=w(),Lt=w(),Nt=w(),Wt={heading:0,tilt:0},Yt=new et,qt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{dt as create,ht as fromCamera,mt as toCameraAsync,lt as toCameraSync};
|
|
5
|
+
import t from"../../../Camera.js";import"../../../geometry.js";import e from"../../../Graphic.js";import n from"../../../Viewpoint.js";import{result as a}from"../../../core/asyncUtils.js";import"../../../core/has.js";import{cyclicalDegrees as r}from"../../../core/Cyclical.js";import o from"../../../core/Error.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{fromMat4 as s,transpose as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as u,g as f,p,c as g,f as y,s as h,t as d}from"../../../chunks/vec32.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectWithZConversion as x,tryProjectWithZConversion as j}from"../../../geometry/projection.js";import{computeTranslationToOriginAndRotation as v}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVectorAsync as b}from"../../../geometry/projection/projectPointToVector.js";import{projectVectorToPoint as R}from"../../../geometry/projection/projectVectorToPoint.js";import{projectVectorToVector as z}from"../../../geometry/projection/projectVectorToVector.js";import{create as G,center as S,toRect as B,isPoint as T,empty as M,expandWithVec3 as Z,expandWithAABB as A,width as E,height as F,depth as O}from"../../../geometry/support/aaBoundingBox.js";import{create as P,isPoint as D}from"../../../geometry/support/aaBoundingRect.js";import{intersectsPoint as U}from"../../../geometry/support/frustum.js";import{getResolutionInMetersForScale as V}from"../../../geometry/support/scaleUtils.js";import{cameraOnContentAlongViewDirection as C}from"../camera/intersectionUtils.js";import{getViewSR as k,fromExtentAsync as I,internalToExternal as J,OrientationMode as K,scaleToDistance as L,fromCenterDistanceAsync as N,fromExtentSync as W,fromCenterDistanceSync as Y,externalToInternal as q,distanceToScale as X,fromCenterScale as _,directionToHeadingTilt as H,zoomToScale as Q}from"./cameraUtils.js";import{getElevationAtPoint as $}from"./ElevationProvider.js";import tt from"../../../geometry/Point.js";import et from"../../../geometry/Extent.js";import nt from"../../../geometry/SpatialReference.js";import at from"../../../geometry/Geometry.js";import rt from"../../../geometry/Multipoint.js";const ot=.66;function it(t){return 360-r.normalize(t)}function st(t){return r.normalize(360-t)}function ct(t,e,n){const a=e.camera;if(null!=a)return mt(a,k(t));const{targetGeometry:r}=e;if(null==r)return null;const{camera:o,mode:i}=ft(t,e.rotation,n);if("point"===r.type)return pt(t,e,r,o,i);const s=r.extent;return null==s?null:W(t,s,o.heading,o.tilt,i)}async function lt(t,e,n,a){const r=e.camera;if(null!=r)return ut(r,k(t),a);const{targetGeometry:o}=e;if(null==o)throw new Error("Viewpoint has no targetGeometry!");const{camera:i,mode:s}=ft(t,e.rotation,n);if("point"===o.type)return gt(t,e,o,i,s,a);const c=o.extent;if(null==c)throw new Error("Target geometry has no extent!");return I(t,c,i.heading,i.tilt,s,a)}function mt(t,e){const n=t.position;let a;try{a=j(n,e)}catch(o){return null}if(!a)return null;const r=t.clone();return r.position=a.clone(),r}async function ut(t,e,n){const a=t.position,r=await x(a,e,{signal:n});i(n);const o=t.clone();return o.position=r.clone(),o}function ft(t,e,n){const a=J(t,t.state.camera);let r=K.ADJUST;return null!=e&&(a.heading=it(e),r=K.LOCKED),null!=n&&(a.tilt=n),{camera:a,mode:r}}function pt(t,e,n,a,r){const o=t.spatialReference;let i;try{i=j(n.clone(),o)}catch(c){return null}if(!i)return null;const s=null!=e.scale?L(t,e.scale):t.state.camera.distance;return Y(t,i,s,a,r)}async function gt(t,e,n,a,r,o){const s=t.spatialReference,c=await x(n.clone(),s,{signal:o});i(o);const l=null!=e.scale?L(t,e.scale):t.state.camera.distance;return N(t,c,l,a,r,o)}function yt(t,e,a=null){return null==a&&(a=new n),jt(t,null,e.clone(),a)}async function ht(e,a,r){const i=Ft(e,a);if(!i)throw new o("viewpointutils-create:no-target","Missing target for creating viewpoint");const s=new t({fov:e.camera.fov}),c=new n({camera:s});if(i.target instanceof n){return Ot(await zt(e,i.target,i,r,c))}if(i.target instanceof t)return Ot(await Gt(e,i.target,r,c));const l=null!=i.scale||null!=i.zoom;if(i.target instanceof et){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return Ot(l||t?await Bt(e,i,i.target.center,s,r,c):await Zt(e,i,i.target,s,r,c))}const m=new Dt,u=l?wt(e,i):void 0;if(await Rt(e,i.target,u,m,r),isFinite(m.boundingBox[0])){let t;if(S(m.boundingBox,Ut),Wt.x=Ut[0],Wt.y=Ut[1],Wt.z=Ut[2],Wt.spatialReference=e.spatialReference,isFinite(Wt.z)&&m.hasZ?t=T(m.boundingBox):(Wt.z=void 0,t=D(B(m.boundingBox,It))),l||t)return Ot(await Bt(e,i,Wt,s,r,c));const n=Pt(e,m.screenSpaceObjects);return Ot(await Et(e,i,Wt,m.boundingBox,n,s,r,c))}return i.position?Ot(await Tt(e,i,s,c,r)):Ot(await Mt(e,i,s,r,c))}function dt(t,e){return null==e.scale&&null!=e.zoom?Q(t,e.zoom):e.scale}function wt(t,e){const n=dt(t,e);return n?V(n):void 0}function xt(t,e){let n=!1;return null!=e.heading?(t.heading=e.heading,n=!0):null!=e.rotation&&(t.heading=it(e.rotation),n=!0),null!=e.tilt&&(t.tilt=e.tilt,n=!0),null!=e.fov&&(t.fov=e.fov),n}function jt(t,e,n,a){const r=t.spatialReference||nt.WGS84;if(e??=q(t,n),null==e)return a;const o=new tt({spatialReference:r});return R(e.center,t.renderSpatialReference,o)?(a.targetGeometry=o,a.scale=X(t,e.distance),a.rotation=st(n.heading),a.camera=n,a):a}async function vt(t,e,n,a){const r=()=>new o("viewpointutils:invalid-geometry","The target is missing a valid geometry");if(!e)throw r();"mesh"===e.type&&(e=e.extent);const i=t.basemapTerrain.spatialReference;if(!e.hasZ&&t.basemapTerrain){let n;switch(e.type){case"point":n=e;break;case"multipoint":case"polyline":n=e.extent?.center;break;case"extent":n=e.center;break;case"polygon":n=e.centroid}null!=n&&i&&t.elevationProvider?(n=await x(n,i,{signal:a}),Ut[2]=$(t.elevationProvider,n)??0):Ut[2]=0}const s=Yt[e.type],c=new Array;if(s(e,e.hasZ?t=>{c.push([t[0],t[1],t[2]])}:t=>{c.push([t[0],t[1]])},Ut),0===c.length)throw r();const l=e.spatialReference,m=t.spatialReference,u=await x(new rt({spatialReference:l,hasZ:e.hasZ,hasM:!1,points:c}),m,{signal:a});if(e.hasZ&&(n.hasZ=!0),e.hasZ)for(const[o,f,p]of u.points)Ut[0]=o,Ut[1]=f,Ut[2]=p,Z(n.boundingBox,Ut);else for(const[o,f]of u.points)Ut[0]=o,Ut[1]=f,Z(n.boundingBox,Ut)}async function bt(t,e,n,r,o){const i=await a(t.whenViewForGraphic(e));if(!1===i.ok||null==i.value||!("whenGraphicBounds"in i.value))return void await vt(t,e.geometry,r,o);const s=i.value,c=await a(s.whenGraphicBounds(e,{minDemResolution:n}));if(!1===c.ok||!c.value)return void await vt(t,e.geometry,r,o);const{screenSpaceObjects:l,boundingBox:m}=c.value;A(r.boundingBox,m),l&&l.forEach((t=>{r.screenSpaceObjects.push(t)})),isFinite(m[2])&&(r.hasZ=!0)}async function Rt(t,n,a,r,o){if(Array.isArray(n)&&2===n.length){const e=n[0],a=n[1];if("number"==typeof e&&"number"==typeof a)return Wt.x=e,Wt.y=a,Wt.z=void 0,Wt.spatialReference=t.spatialReference?.isGeographic?t.spatialReference:nt.WGS84,void await vt(t,Wt,r,o)}n&&"map"in n&&"function"==typeof n.map?await Promise.allSettled(n.map((e=>Rt(t,e,a,r,o)))):n instanceof at?await vt(t,n,r,o):n instanceof e&&await bt(t,n,a,r,o)}async function zt(t,e,n,a,r){if(e.camera)return Gt(t,e.camera,a,r);r.scale=e.scale,r.rotation=e.rotation,r.targetGeometry=null!=e.targetGeometry?e.targetGeometry.clone():null,r.camera=null,null!=n.heading?r.rotation=st(n.heading):null!=n.rotation&&(r.rotation=n.rotation);const o=dt(t,n);return null!=o&&(r.scale=o),r.camera=await lt(t,r,n.tilt,a),r}async function Gt(t,e,n,a){const r=t.spatialReference,o=await x(e.position,r,{signal:n}),i=e.clone();return i.position=o,jt(t,null,i,a)}async function St(t,e,n,a,r,o,i){const s=t.renderSpatialReference;return await b(e,Lt,s,0,{signal:i}),await b(n,Kt,s,0,{signal:i}),o.targetGeometry=new tt(e),r.position=new tt(n),y(Jt,Lt,Kt),H(t,Kt,Jt,a.up,r),o.scale=X(t,p(Kt,Lt)),o.rotation=st(r.heading),o.camera=r,o}async function Bt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=C(t);if(e.position)return St(t,o.targetGeometry,e.position,i,a,o,r);if(e.zoomFactor){const n=i.distance/e.zoomFactor,a=u(Ut,i.viewForward,-n);i.eye=f(Ut,i.center,a),o.scale=X(t,n)}J(t,i,a);const s=xt(a,e)?K.LOCKED:K.ADJUST;if(!e.zoomFactor){const c=dt(t,e);null==c?(await b(n,Ut,t.renderSpatialReference,0,{signal:r}),U(i.frustum,Ut)?o.scale=X(t,p(i.eye,Ut)):o.scale=X(t,i.distance)):o.scale=c,o.camera=await _(t,o.targetGeometry,o.scale,a,s,r)}return o}async function Tt(t,e,n,a,r){const o=C(t);g(Jt,o.viewForward),H(t,o.eye,Jt,o.up,Nt);const i=t.spatialReference,{position:s}=e;if(s){const t=await x(s,i,{signal:r});n.position=t}else n.position=new tt;return n.heading=null!=e.heading?e.heading:Nt.heading,n.tilt=null!=e.tilt?e.tilt:Nt.tilt,jt(t,null,n,a)}async function Mt(t,e,n,a,r){if(null!=e.heading||null!=e.rotation||null!=e.scale||null!=e.tilt||null!=e.zoom||null!=e.zoomFactor){const o=C(t),{spatialReference:i,renderSpatialReference:s}=t,c=new tt({spatialReference:i});return R(o.center,s,c)?Bt(t,e,c,n,a,r):r}return r.scale=t.scale,r.camera=t.camera.clone(),xt(r.camera,e),r}async function Zt(t,e,n,a,r,o){o.targetGeometry=n.clone();const i=C(t);J(t,i,a);const s=xt(a,e)?K.LOCKED:K.ADJUST;return o.camera=await I(t,n,a.heading,a.tilt,s,r),o}function At(t,e,n,a,r){let o=0;null!=n.z?o=n.z:t.basemapTerrain&&t.elevationProvider&&(o=$(t.elevationProvider,n)),h(Ut,n.x,n.y,o),v(t.spatialReference,Ut,Vt,t.renderSpatialReference),s(Ct,Vt),c(Ct,Ct),M(kt);const i=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let s=0;s<i.length;s++){const e=i[s];let n=a[e[2]];isFinite(n)||(n=o),h(Ut,a[e[0]],a[e[1]],n),z(Ut,t.spatialReference,Ut,t.renderSpatialReference),Z(kt,d(Ut,Ut,Ct))}const l=E(kt),m=F(kt),u=O(kt),f=1/Math.tan(e.fovX/2),p=1/Math.tan(e.fovY/2),g=.5*Math.sqrt(l*l+u*u)*Math.max(p,f)+.5*m,y=.5*m*p+.5*Math.max(l,u);return Math.max(g,y)/r}async function Et(t,e,n,a,r,o,i,s){s.targetGeometry=n.clone();const c=C(t),l=At(t,c,n,a,r);J(t,c,o);const m=xt(o,e)?K.LOCKED:K.ADJUST;return s.scale=X(t,l),s.camera=await _(t,s.targetGeometry,s.scale,o,m,i),s}function Ft(t,e){if(!e||!t.spatialReference)return null;const n={target:void 0};return"declaredClass"in e||Array.isArray(e)?n.target=e:(Object.assign(n,e),!n.target&&"center"in e&&e.center&&(n.target=e.center)),n}function Ot(t){return null!=t?.camera&&(t.rotation=st(t.camera.heading)),t}function Pt(t,e){const n=ot;if(!e.length)return n;let a=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){const t=e[r].screenSpaceBoundingRect;a=Math.max(a,Math.abs(t[0]),Math.abs(t[1]),Math.abs(t[2]),Math.abs(t[3]))}return n-a/Math.min(t.width,t.height)*2}class Dt{constructor(){this.hasZ=!1,this.boundingBox=M(),this.screenSpaceObjects=new Array}}const Ut=w(),Vt=m(),Ct=l(),kt=G(),It=P(),Jt=w(),Kt=w(),Lt=w(),Nt={heading:0,tilt:0},Wt=new tt,Yt={point(t,e,n){n[0]=t.x,n[1]=t.y,null!=t.z&&(n[2]=t.z),e(n)},polygon(t,e,n){const a=t.hasZ;for(let r=0;r<t.rings.length;r++){const o=t.rings[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},polyline(t,e,n){const a=t.hasZ;for(let r=0;r<t.paths.length;r++){const o=t.paths[r];for(let t=0;t<o.length;t++)n[0]=o[t][0],n[1]=o[t][1],a&&(n[2]=o[t][2]),e(n)}},multipoint(t,e,n){const a=t.points,r=t.hasZ;for(let o=0;o<a.length;o++)n[0]=a[o][0],n[1]=a[o][1],r&&(n[2]=a[o][2]),e(n)},extent(t,e,n){null!=t.zmin&&null!=t.zmax?(e(h(n,t.xmin,t.ymin,t.zmin)),e(h(n,t.xmax,t.ymin,t.zmin)),e(h(n,t.xmin,t.ymax,t.zmin)),e(h(n,t.xmax,t.ymax,t.zmin)),e(h(n,t.xmin,t.ymin,t.zmax)),e(h(n,t.xmax,t.ymin,t.zmax)),e(h(n,t.xmin,t.ymax,t.zmax)),e(h(n,t.xmax,t.ymax,t.zmax))):(e(h(n,t.xmin,t.ymin,n[2])),e(h(n,t.xmax,t.ymin,n[2])),e(h(n,t.xmin,t.ymax,n[2])),e(h(n,t.xmax,t.ymax,n[2])))}};export{ht as create,yt as fromCamera,lt as toCameraAsync,ct as toCameraSync};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ShaderOutput as e}from"../ShaderOutput.js";import{VertexTextureCoordinates as s}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as
|
|
5
|
+
import{ShaderOutput as e}from"../ShaderOutput.js";import{VertexTextureCoordinates as s}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as i}from"../../shaderModules/Float3PassUniform.js";import{glsl as r,If as t}from"../../shaderModules/interfaces.js";import{Texture2DDrawUniform as m}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as n}from"../../shaderModules/Texture2DPassUniform.js";import{BindType as a}from"../../shaderTechnique/BindType.js";import{GLEmissiveTexturePassParameters as u}from"../../../lib/GLTextureMaterial.js";var d;!function(e){e[e.None=0]="None",e[e.Value=1]="Value",e[e.Texture=2]="Texture",e[e.COUNT=3]="COUNT"}(d||(d={}));class f extends u{}function c(u,f){if(f.output!==e.ColorEmission&&f.output!==e.Color)return;const{emissionSource:c,hasEmissiveTextureTransform:l,bindType:x}=f,p=c===d.Texture;p&&(u.include(s,f),u.fragment.uniforms.add(x===a.Pass?new n("texEmission",(e=>e.textureEmissive)):new m("texEmission",(e=>e.textureEmissive))));const v=c===d.Value||p;v&&u.fragment.uniforms.add(x===a.Pass?new i("emissionFactor",(e=>e.emissiveFactor)):new o("emissionFactor",(e=>e.emissiveFactor))),u.fragment.code.add(r`
|
|
6
6
|
vec4 getEmissions() {
|
|
7
|
-
vec4 emissions = ${
|
|
8
|
-
${t(p,`emissions *= textureLookup(texEmission, ${l?"emissiveUV":"vuv0"})
|
|
7
|
+
vec4 emissions = ${v?"vec4(emissionFactor, 1.0)":"vec4(0.0)"};
|
|
8
|
+
${t(p,`emissions *= textureLookup(texEmission, ${l?"emissiveUV":"vuv0"});\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)};
|
|
9
9
|
return emissions;
|
|
10
10
|
}
|
|
11
11
|
`)}export{d as EmissionSource,c as Emissions,f as EmissionsParameters};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import"../../../../../core/mathUtils.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/interfaces.js";import"../../core/shaderModules/ShaderBuilder.js";import"../../core/shaderModules/Texture2DPassUniform.js";export{a as BloomBlurDirection,b as BloomCompositionPass,B as BloomCompositionPassParameters,d as build}from"../../../../../chunks/BloomComposition.glsl.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import r from"../../../webgl/RenderNode.js";import{B as s,a as i,b as l}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechniqueConfiguration as m,BloomCompositionTechnique as a}from"./BloomTechnique.js";import{RenderRequestType as u}from"../../lib/basicInterfaces.js";import{ColorAttachment as c,FramebufferBit as h}from"../../../../webgl/enums.js";let n=class extends r{constructor(e){super(e),this._bloomParameters=new s,this._blurScale=3.06,this._bloomResults=[]}initialize(){const e=new m;this._blurHorizontalTechnique??=this.techniques.acquire(a,e),e.direction=i.Vertical,this._blurVerticalTechnique??=this.techniques.acquire(a,e),e.bloomStage=l.Composite,this._compositeTechnique=this.techniques.acquire(a,e)}destroy(){}render(e){const t=e.find((({name:e})=>"composite-color:emissions"===e)),o=t.getAttachment(c.COLOR_ATTACHMENT1)?.attachment;if(!(this._blurHorizontalTechnique?.compiled&&this._blurVerticalTechnique?.compiled&&this._compositeTechnique?.compiled))return this.requestRender(u.UPDATE),t;if(!o)return t;const r=t.getTexture(),s=this.renderingContext,i=this.fboCache,l=this.bindParameters,{fullWidth:m,fullHeight:a}=this.bindParameters.camera,n=(e,t,o,r,i)=>{s.bindFramebuffer(e.fbo),s.setViewport(0,0,o,r),s.setClearColor(0,0,0,0),s.clear(h.COLOR),s.bindTechnique(t,l,i),s.screen.draw()};let b=m/2,_=a/2;const T=5,p=this._bloomParameters.blurRadius;let d=o;for(let u=0;u<T;u++){const e=i.acquire(b,_,"bloomHorizontal");this._bloomParameters.colorTexture=d,n(e,this._blurHorizontalTechnique,b,_,this._bloomParameters);const t=i.acquire(b,_,"bloomVertical");this._bloomParameters.colorTexture=e.getTexture(),n(t,this._blurVerticalTechnique,b,_,this._bloomParameters),e.release(),this._bloomResults[u]=t,b/=2,_/=2,d=this._bloomResults[u].getTexture(),this._bloomParameters.blurRadius*=this._blurScale}const f=this.acquireOutputFramebuffer();this._bloomParameters.colorTexture=r;for(let u=0;u<T;u++)this._bloomParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._bloomParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._bloomParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._bloomParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._bloomParameters.bloomTexture4=this._bloomResults[4].getTexture();return this._bloomParameters.blurRadius=p,n(f,this._compositeTechnique,m,a,this._bloomParameters),this._bloomResults.forEach((e=>e.release())),f.attachDepth(t.getAttachment(this.gl.DEPTH_STENCIL_ATTACHMENT)),f}};e([t({constructOnly:!0})],n.prototype,"techniques",void 0),n=e([o("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],n);export{n as BloomRenderNode};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as o}from"../../../../../chunks/tslib.es6.js";import{ReloadableShaderModule as e}from"../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{parameter as i,ShaderTechniqueConfiguration as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{b as s,c as n,a}from"../../../../../chunks/BloomComposition.glsl.js";import{Default3D as l}from"../../lib/DefaultVertexAttributeLocations.js";import{Program as m}from"../../lib/Program.js";import{makePipelineState as c,defaultColorWriteParams as u}from"../../../../webgl/renderState.js";class d extends r{initializeProgram(o){return new m(o.rctx,d.shader.get().build(this.configuration),l)}initializePipeline(){return c({colorWrite:u})}}d.shader=new e(n,(()=>import("./BloomComposition.glsl.js")));class h extends t{constructor(){super(...arguments),this.bloomStage=s.Blur,this.direction=a.Horizontal}}o([i({count:s.COUNT})],h.prototype,"bloomStage",void 0),o([i({count:s.COUNT})],h.prototype,"direction",void 0);export{d as BloomCompositionTechnique,h as BloomCompositionTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{releaseMaybe as t}from"../../../../core/maybe.js";import{c as e}from"../../../../chunks/vec42.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ColorFormat as
|
|
5
|
+
import{releaseMaybe as t}from"../../../../core/maybe.js";import{c as e}from"../../../../chunks/vec42.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ColorFormat as r,DepthFormat as o}from"../../webgl/formats.js";import{ViewportSize as h}from"./BindParameters.js";import{FramebufferBit as c,ColorAttachment as l}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as _}from"../../../webgl/FramebufferObject.js";class a{constructor(t){this._fbos=t,this._requiresEmission=!1,this._size=new h(0,0),this._clearColor=s()}dispose(){this._color=t(this._color),this.releaseDepth()}initialize(t,i,s,r){this._size.width=t,this._size.height=i,_(this._size,this._fbos.rctx.parameters.maxTextureSize);const o=this._color;return this._color=null,this.releaseDepth(),this._requiresEmission=r,e(this._clearColor,s),o}releaseDepth(){this._color?.detachDepth(),this._depth=t(this._depth)}update(t){const e=this._ensureColor();e.attachDepth(this.depth),this._color=t(e)}bind(){const t=null==this._color;if(this.color.attachDepth(this.depth),this._fbos.rctx.bindFramebuffer(this.color.fbo),t){const t=this._fbos.rctx;t.setClearStencil(0),t.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),t.clear(c.COLOR|c.DEPTH|c.STENCIL),this._requiresEmission&&t.gl.clearBufferfv(t.gl.COLOR,1,i)}}_acquireColor(){return this._requiresEmission?this._fbos.acquire(this._size.width,this._size.height,"acquired-color:emissions").acquireColor(l.COLOR_ATTACHMENT1,r.RGBA):this._fbos.acquire(this._size.width,this._size.height,"acquired-color")}_acquireDepth(){return this._fbos.acquireDepth(o.DEPTH_STENCIL_TEXTURE,this._size.width,this._size.height,"depth")}get size(){return this._size}get color(){return this._ensureColor()}get depth(){return this._depth??=this._acquireDepth(),this._depth}_ensureColor(){return this._color??=this._acquireColor(),this._color}}export{a as MainFramebuffer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{prefersReducedMotion as t}from"../core/a11yUtils.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{deg2rad as a}from"../core/mathUtils.js";import{watch as s,initial as r}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{rotatePixel as c}from"../layers/orientedImagery/transformations/utils.js";import d from"../layers/support/rasterDatasets/RasterFactory.js";import h from"./Widget.js";import{getAllArcPath as g}from"./OrientedImageryViewer/arcUtils.js";import{css as m,segmentArcs as p,sectorsRadii as u,featureCircleRadius as v,navigation as y,navigationToolDimensionLength as b,navigationToolRotationFrom as w,navigationToolRotationTo as _,root as C}from"./OrientedImageryViewer/constants.js";import f from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import M from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadCalciteComponents as I}from"./support/componentsUtils.js";import{globalCss as T}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as A}from"./support/decorators/messageBundle.js";import{tsx as E}from"./support/jsxFactory.js";import{substitute as V}from"../intl/substitute.js";let x=class extends h{constructor(e,t){super(e,t),this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.navigationToolActive=!1,this.viewModel=new f,this.messagesCommon=null,this.visibleElements=new M,this._navigationToolExpanded=!1,this._navigationTool=null,this._actionItems=new Map,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._toggleImageAttributes=()=>{this.viewModel.toggleImageAttributes()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this._renderViewerContainer=this._renderViewerContainer.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this)}initialize(){this.addHandles([s((()=>[this.viewModel?.bestFeatureAngle,this._navigationTool]),(([e,t])=>{t&&this._updateNavigationTool(t)}),r),s((()=>this.currentCoverageVisible),(e=>this._onCurrentCoverageVisibilityChange(e))),s((()=>this.isAdditionalCoverageVisible),(e=>this._onAdditionalCoverageVisibilityChange(e))),s((()=>this.isAdditionalPointSourcesVisible),(e=>this._onAdditionalCameraLocationsVisibility(e)))])}loadDependencies(){return I({tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js"),action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider.js")})}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect()}get activeLayer(){return i(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){i(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}set drawFootprint(e){this.viewModel.drawFootprint=e}get drawFootprint(){return this.viewModel.drawFootprint}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return"oriented-imagery-widget"}set icon(e){this._overrideIfSome("icon",e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.mapImageConversionToolState=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get popupEnabled(){const{popupEnabled:e,state:t}=this.viewModel;return"image-loaded"===t&&e}get referencePoint(){return this.viewModel.referencePoint??null}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}async _getThumbnailPixelBlockInternal(e,t){const{level:i,offset:a,size:s}=this._getMaxLevelRasterParameters(e);try{const{pixelBlock:o}=await e.fetchRawPixels(i,a,s,t);return o}catch(r){o.getLogger(this).warn("failed to create canvas with pixel data",r)}return null}_getMaxLevelRasterParameters(e){const{storageInfo:t,width:i,height:o}=e.rasterInfo,{maximumPyramidLevel:a,pyramidScalingFactor:s}=t,r=s??2;return{level:a,offset:{x:0,y:0},size:{width:Math.ceil(i/r**a),height:Math.ceil(o/r**a)}}}async _getThumbnailPixelBlock(e){const{signal:t}=this._galleryController;try{const{origin:i,pathname:o,searchParams:a}=new URL(e),s=await d.open({ioConfig:{customFetchParameters:Object.fromEntries(a),skipMapInfo:!0},url:`${i}${o}`,signal:t});return s?await this._getThumbnailPixelBlockInternal(s,{signal:t}):null}catch(i){o.getLogger(this).error("failed to create thumbnail",i)}return null}_handleBrightnessChange(e){this.viewModel.brightness=e.target.value??0}_handleContrastChange(e){this.viewModel.contrast=e.target.value??0}_handleSharpnessChange(e){this.viewModel.sharpness=e.target.value??0}_lazyLoadImage(e,t){e.forEach((async e=>{if(e.isIntersecting){const i=e.target,s=i.getAttribute("data-src"),r=i.getAttribute("data-rotation"),n=r?parseFloat(r)%360:null;if(!s)return;const l=await this._getThumbnailPixelBlock(s);if(!l)return;i.width=l.width,i.height=l.height;const d=i.getContext("2d");if(!d)return;const h=d.createImageData(i.width,i.height);if(h.data.set(l.getAsRGBA()),"number"==typeof n&&0!==n){const e=a(n),s=document.createElement("canvas"),r=s.getContext("2d");if(r){s.width=h.width,s.height=h.height,r.putImageData(h,0,0);const o=c(0,0,e),a=c(h.width,0,e),n=c(h.width,h.height,e),l=c(0,h.height,e),g=Math.max(o[0],a[0],n[0],l[0])-Math.min(o[0],a[0],n[0],l[0]),m=Math.max(o[1],a[1],n[1],l[1])-Math.min(o[1],a[1],n[1],l[1]),p=Math.min(i.width/g,i.height/m);return d.save(),d.clearRect(0,0,i.width,i.height),d.translate(i.width/2,i.height/2),d.rotate(e),d.scale(p,p),d.drawImage(s,-h.width/2,-h.height/2,h.width,h.height),d.restore(),t.unobserve(i)}o.getLogger(this).warn("oriented-imagery-viewer:image-gallery","failed to apply rotation on thumbnail")}d.putImageData(h,0,0),t.unobserve(i)}}))}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderActionTooltips(){return[...this._actionItems].map((([e,t])=>E("calcite-tooltip",{key:e,referenceElement:t},E("span",null,e))))}_renderBody(){return E("div",{class:m.body},this._renderViewerContainer(),this._renderImageGallery(),this._renderImageEnhancementTools(),this._renderNavigation())}_renderImageEnhancementTools(){const{imageEnhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:o}}=this;return e&&E("calcite-panel",{bind:this,class:m.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleImageEnhancementToolState},E("div",{class:m.imageEnhancementTools},E("div",{class:m.imageEnhancementToolContainer},E("calcite-label",null,this.messages.brightness,E("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:t,onCalciteSliderInput:this._handleBrightnessChange}))),E("div",{class:m.imageEnhancementToolContainer},E("calcite-label",null,this.messages.contrast,E("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:i,onCalciteSliderInput:this._handleContrastChange}))),E("div",{class:m.imageEnhancementToolContainer},E("calcite-label",null,this.messages.sharpness,E("calcite-slider",{bind:this,labelTicks:!0,max:1,min:0,step:.1,ticks:.5,value:o,onCalciteSliderInput:this._handleSharpnessChange})))),E("calcite-action",{bind:this,icon:"reset",onclick:this._resetImageTools,slot:"header-actions-end",text:this.messagesCommon.reset}))}_renderImageGallery(){const{container:e,galleryOpened:t,imageGalleryEnabled:i,viewModel:{thumbnails:o}}=this;return i&&t&&(e&&o)?E("calcite-panel",{bind:this,class:m.carousel,closable:!0,closed:!t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},E("div",{class:m.carouselContainer},this._renderThumbnails(o))):null}_renderMapImageConversionTool(){const{mapImageConversionToolState:e,viewModel:{state:t}}=this;return E("calcite-action",{active:e,afterCreate:this._storeActionElement,bind:this,disabled:"image-loaded"!==t,icon:"image-pin",onclick:this._toggleMapImageConversionToolState,text:this.messages.mapImageConversionTool})}_renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:i,currentBestFeature:o,state:a}}=this;if(!this.container||!o)return null;let s,r,n,l,c;if(i){const{x:e,y:t,direction:o}=i,[a,d,h,g]=p[o];s=`M ${e} ${t} L ${a} ${d} A ${u[2]} ${u[2]} 0 0 1 ${h} ${g} Z`,r=e,l=t,n=p[o][4],c=p[o][5]}const d=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},h=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:o}=t;i&&o&&this.viewModel.handleFeatureClick({sector:o,featureIndexInSector:+i})},w=e=>{e.removeEventListener("click",h)},_=o.attributes.objectId,C=e?.map((e=>e?.items)).filter(Boolean).flatMap((e=>e?.map((({x:e,y:t,objectID:i,featureIndexInSector:o,sector:a})=>E("circle",{afterRemoved:w,class:this.classes(m.feature,{selected:_===i}),cx:e,cy:t,"data-feature-index-in-sector":o,"data-sector":a,key:`${m.feature}-${i}`,onclick:h,r:v}))))),f=e=>{e.removeEventListener("click",d)},M=this.classes({[m.navigationWrapper]:!0,[m.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&"image-loaded"===a?E("div",{bind:this,class:M,key:this.messages.navigationTool},E("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:t()?y:m.rotateWithAnimation,focusable:"false",height:b,role:"img",width:b,xmlns:"http://www.w3.org/2000/svg"},E("defs",null,E("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:r,x2:n,y1:l,y2:c},E("stop",{class:m.navigationPathOffset0,offset:0}),E("stop",{class:m.navigationPathOffset1,offset:1}))),E("g",null,E("circle",{class:this.classes(m.sector,m.outerSector),cx:u[3],cy:u[3],onclick:this._scaleNavigationTool,r:u[3]}),E("circle",{class:m.sector,cx:u[3],cy:u[3],r:u[2]}),E("circle",{class:m.sector,cx:u[3],cy:u[3],r:u[1]}),E("circle",{class:m.sector,cx:u[3],cy:u[3],r:u[0]}),E("path",{class:m.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${m.pointer}-west`}),E("path",{class:this.classes(m.pointer,m.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${m.pointer}-north`}),E("path",{class:m.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${m.pointer}-east`}),E("path",{class:m.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${m.pointer}-south`}),E("path",{class:this.classes(m.sector,m.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:m.sectorSeparator}),g([u[2],u[1],u[0]],u[3],u[3]).map(((t,i)=>E("path",{afterRemoved:f,class:this.classes(m.sector,e?.[i]?.length?m.sectorEnabled:m.sectorDisabled),d:t,"data-sector":`${i}`,key:`${m.sector}-${i}`,onclick:d}))),E("path",{class:this.classes(m.sector,m.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:m.sectorCross}),C,o.attributes.cameraPitch>=5&&s?E("path",{class:m.selectedFeaturePath,d:s,fill:`url(#${this.id}-coverage-fill)`,key:m.selectedFeaturePath}):null))):null}_renderNavigationTool(){const{state:e}=this.viewModel;return E("calcite-action",{active:this.navigationToolActive,afterCreate:this._storeActionElement,bind:this,disabled:"image-loaded"!==e,icon:"explore",onclick:this._toggleNavigationTool,text:this.messages.navigationTool})}_renderImageEnhancementTool(){const{state:e,mode:t}=this.viewModel;return E("calcite-action",{active:this.imageEnhancementToolActive,afterCreate:this._storeActionElement,bind:this,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",onclick:this._toggleImageEnhancementToolState,text:this.messages.imageEnhancement})}_renderMenuBarContainer(){const{currentCoverageVisible:e,isAdditionalCoverageVisible:t,isAdditionalPointSourcesVisible:i,imageGalleryEnabled:o}=this;return E("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},E("calcite-action-group",{expanded:!0},E("calcite-action",{active:e,afterCreate:this._storeActionElement,bind:this,class:m.currentCoverage,icon:"trapezoid-area",onclick:this._toggleCurrentCoverage,text:this.messages.currentFootprint}),E("calcite-action",{active:t,afterCreate:this._storeActionElement,bind:this,class:m.addCoverage,icon:"trapezoid-area",onclick:this._toggleAdditionalCoverage,text:this.messages.additionalFootprints}),E("calcite-action",{active:i,afterCreate:this._storeActionElement,bind:this,class:m.addExpPoints,icon:"circle-area",onclick:this._toggleAdditionalCameraLocations,text:this.messages.additionalCameraLocations})),E("calcite-action-group",{layout:"horizontal"},this.visibleElements.mapImageConversionTool?this._renderMapImageConversionTool():null,this.visibleElements.navigationTool?this._renderNavigationTool():null,this.visibleElements.imageEnhancement?this._renderImageEnhancementTool():null),E("calcite-action-group",null,E("calcite-action",{active:this.galleryOpened,afterCreate:this._storeActionElement,bind:this,disabled:!o,icon:"images",onclick:this._toggleImageGallery,text:this.messages.imageGallery,textEnabled:!0}),this.visibleElements.showPopupsAction?this._renderPopupAction():null),this._renderActionTooltips())}_renderMessageBox(){const{messages:e,viewModel:{displayMessage:t}}=this;if(!t)return null;const{data:i,key:o,map:a}=t,s=`${a?V(e[o],a):e[o]}`;return E("span",{class:m.messageBox},i?`${s} ${i}`:s)}_renderPopupAction(){return E("calcite-action",{afterCreate:this._storeActionElement,bind:this,disabled:!this.popupEnabled,icon:"popup",onclick:this._toggleImageAttributes,text:this.messages.showPopups,textEnabled:!0})}_renderThumbnails(e){const{currentBestFeature:t}=this.viewModel;return t?E("div",{class:m.carouselContent},e.items.map((({url:e,objectId:i,rotation:o},a)=>E("div",{class:`${m.carouselItemWrapper}${t.attributes.objectId===i?"--selected":""}`,key:`${m.carouselItemWrapper}-${a}`},E("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:m.carouselItem,"data-objectid":`${i}`,"data-rotation":`${o}`,"data-src":e,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight}))))):null}_renderViewerContainer(){return E("div",{class:m.viewerContainer},this._renderImageViewer(),this._renderPanoramicViewer(),this._renderMessageBox())}_renderImageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i}=this.viewModel,o=`${m.viewer}${e||"default"!==i?"--hide":""}`;return E("calcite-panel",{afterCreate:t,bind:this,class:o})}_renderPanoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i}=this.viewModel,o=`${m.viewer}${e||"panoramic"!==i?"--hide":""}`;return E("calcite-panel",{afterCreate:t,bind:this,class:o})}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_storeActionElement(e){this._actionItems.set(e.text,e)}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleImageEnhancementToolState(e){e.stopPropagation(),this.imageEnhancementToolActive=!this.imageEnhancementToolActive,this.imageEnhancementToolActive&&(this.galleryOpened&&(this.galleryOpened=!1),this.navigationToolActive&&(this.navigationToolActive=!1))}_toggleImageGallery(e){e.stopPropagation(),this.galleryOpened=!!this.imageGalleryEnabled&&!this.galleryOpened,this.galleryOpened&&(this.imageEnhancementToolActive&&(this.imageEnhancementToolActive=!1),this.navigationToolActive&&(this.navigationToolActive=!1))}_toggleNavigationTool(){this.navigationToolActive=!this.navigationToolActive,this.navigationToolActive&&(this.galleryOpened&&(this.galleryOpened=!1),this.imageEnhancementToolActive&&(this.imageEnhancementToolActive=!1))}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,o=(i-t+540)%360-180;e.style.setProperty(w,`${t}deg`),e.style.setProperty(_,`${t+o}deg`)}async loadBestImage(e){return this.viewModel.loadBestImage(e)}loadImageFromSource(e,t){return this.viewModel.loadImageFromSource(e,t)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){const{viewModel:{state:e}}=this;return E("div",{class:this.classes(T.widget,C)},E("calcite-panel",{bind:this,heading:this.visibleElements.title?this.messages.title:void 0,loading:"image-loading"===e},this.visibleElements.coverageMenu?this._renderMenuBarContainer():null,this._renderBody()))}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([n()],x.prototype,"activeLayer",null),e([n()],x.prototype,"currentBestFeature",null),e([n()],x.prototype,"currentCoverageVisible",null),e([n()],x.prototype,"disabled",null),e([n()],x.prototype,"drawFootprint",null),e([n()],x.prototype,"features",null),e([n()],x.prototype,"imagePointsInView",null),e([n()],x.prototype,"galleryOpened",void 0),e([n()],x.prototype,"icon",null),e([n()],x.prototype,"imageEnhancementToolActive",void 0),e([n({readOnly:!0})],x.prototype,"imageGalleryEnabled",null),e([n()],x.prototype,"isAdditionalCoverageVisible",null),e([n()],x.prototype,"isAdditionalPointSourcesVisible",null),e([n()],x.prototype,"mapImageConversionToolState",null),e([n()],x.prototype,"layer",null),e([n()],x.prototype,"navigationToolActive",void 0),e([n({type:f})],x.prototype,"viewModel",void 0),e([n(),A("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],x.prototype,"messages",void 0),e([n(),A("esri/t9n/common")],x.prototype,"messagesCommon",void 0),e([n({readOnly:!0})],x.prototype,"popupEnabled",null),e([n()],x.prototype,"referencePoint",null),e([n()],x.prototype,"view",null),e([n({type:M,nonNullable:!0})],x.prototype,"visibleElements",void 0),e([n()],x.prototype,"determineWorkflowForFeature",null),e([n()],x.prototype,"updateFootprint",null),e([n()],x.prototype,"_navigationToolExpanded",void 0),e([n()],x.prototype,"_navigationTool",void 0),x=e([l("esri.widgets.OrientedImageryViewer")],x);const F=x;export{F as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{prefersReducedMotion as t}from"../core/a11yUtils.js";import{deprecatedProperty as i}from"../core/deprecate.js";import o from"../core/Logger.js";import{deg2rad as a}from"../core/mathUtils.js";import{watch as s,initial as r}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{rotatePixel as c}from"../layers/orientedImagery/transformations/utils.js";import d from"../layers/support/rasterDatasets/RasterFactory.js";import h from"./Widget.js";import{getAllArcPath as g}from"./OrientedImageryViewer/arcUtils.js";import{css as m,segmentArcs as p,sectorsRadii as u,featureCircleRadius as v,navigation as y,navigationToolDimensionLength as b,navigationToolRotationFrom as w,navigationToolRotationTo as _,root as C}from"./OrientedImageryViewer/constants.js";import f from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import M from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadCalciteComponents as I}from"./support/componentsUtils.js";import{globalCss as T}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as A}from"./support/decorators/messageBundle.js";import{tsx as E}from"./support/jsxFactory.js";import{substitute as V}from"../intl/substitute.js";let x=class extends h{constructor(e,t){super(e,t),this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.navigationToolActive=!1,this.viewModel=new f,this.messagesCommon=null,this.visibleElements=new M,this._navigationToolExpanded=!1,this._navigationTool=null,this._actionItems=new Map,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._toggleImageAttributes=()=>{this.viewModel.toggleImageAttributes()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this._renderViewerContainer=this._renderViewerContainer.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this)}initialize(){this.addHandles([s((()=>[this.viewModel?.bestFeatureAngle,this._navigationTool]),(([e,t])=>{t&&this._updateNavigationTool(t)}),r),s((()=>this.currentCoverageVisible),(e=>this._onCurrentCoverageVisibilityChange(e))),s((()=>this.isAdditionalCoverageVisible),(e=>this._onAdditionalCoverageVisibilityChange(e))),s((()=>this.isAdditionalPointSourcesVisible),(e=>this._onAdditionalCameraLocationsVisibility(e)))])}loadDependencies(){return I({tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js"),action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group.js"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar.js"),label:()=>import("@esri/calcite-components/dist/components/calcite-label.js"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel.js"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider.js")})}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect()}get activeLayer(){return i(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){i(o.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}set drawFootprint(e){this.viewModel.drawFootprint=e}get drawFootprint(){return this.viewModel.drawFootprint}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return"oriented-imagery-widget"}set icon(e){this._overrideIfSome("icon",e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.mapImageConversionToolState=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get popupEnabled(){const{popupEnabled:e,state:t}=this.viewModel;return"image-loaded"===t&&e}get referencePoint(){return this.viewModel.referencePoint??null}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}async _getThumbnailPixelBlockInternal(e,t){const{level:i,offset:a,size:s}=this._getMaxLevelRasterParameters(e);try{const{pixelBlock:o}=await e.fetchRawPixels(i,a,s,t);return o}catch(r){o.getLogger(this).warn("failed to create canvas with pixel data",r)}return null}_getMaxLevelRasterParameters(e){const{storageInfo:t,width:i,height:o}=e.rasterInfo,{maximumPyramidLevel:a,pyramidScalingFactor:s}=t,r=s??2;return{level:a,offset:{x:0,y:0},size:{width:Math.ceil(i/r**a),height:Math.ceil(o/r**a)}}}async _getThumbnailPixelBlock(e){const{signal:t}=this._galleryController;try{const{origin:i,pathname:o,searchParams:a}=new URL(e),s=await d.open({ioConfig:{customFetchParameters:Object.fromEntries(a),skipMapInfo:!0},url:`${i}${o}`,signal:t});return s?await this._getThumbnailPixelBlockInternal(s,{signal:t}):null}catch(i){o.getLogger(this).error("failed to create thumbnail",i)}return null}_handleBrightnessChange(e){this.viewModel.brightness=e.target.value??0}_handleContrastChange(e){this.viewModel.contrast=e.target.value??0}_handleSharpnessChange(e){this.viewModel.sharpness=e.target.value??0}_lazyLoadImage(e,t){e.forEach((async e=>{if(e.isIntersecting){const i=e.target,s=i.getAttribute("data-src"),r=i.getAttribute("data-rotation"),n=r?parseFloat(r)%360:null;if(!s)return;const l=await this._getThumbnailPixelBlock(s);if(!l)return;i.width=l.width,i.height=l.height;const d=i.getContext("2d");if(!d)return;const h=d.createImageData(i.width,i.height);if(h.data.set(l.getAsRGBA()),"number"==typeof n&&0!==n){const e=a(n),s=document.createElement("canvas"),r=s.getContext("2d");if(r){s.width=h.width,s.height=h.height,r.putImageData(h,0,0);const o=c(0,0,e),a=c(h.width,0,e),n=c(h.width,h.height,e),l=c(0,h.height,e),g=Math.max(o[0],a[0],n[0],l[0])-Math.min(o[0],a[0],n[0],l[0]),m=Math.max(o[1],a[1],n[1],l[1])-Math.min(o[1],a[1],n[1],l[1]),p=Math.min(i.width/g,i.height/m);return d.save(),d.clearRect(0,0,i.width,i.height),d.translate(i.width/2,i.height/2),d.rotate(e),d.scale(p,p),d.drawImage(s,-h.width/2,-h.height/2,h.width,h.height),d.restore(),t.unobserve(i)}o.getLogger(this).warn("oriented-imagery-viewer:image-gallery","failed to apply rotation on thumbnail")}d.putImageData(h,0,0),t.unobserve(i)}}))}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderActionTooltips(){return[...this._actionItems].map((([e,t])=>E("calcite-tooltip",{key:e,referenceElement:t},E("span",null,e))))}_renderBody(){return E("div",{class:m.body},this._renderViewerContainer(),this._renderImageGallery(),this._renderImageEnhancementTools(),this._renderNavigation())}_renderImageEnhancementTools(){const{imageEnhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:o,state:a}}=this;return e&&"image-loaded"===a?E("calcite-panel",{bind:this,class:m.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleImageEnhancementToolState},E("div",{class:m.imageEnhancementTools},E("div",{class:m.imageEnhancementToolContainer},E("calcite-label",null,this.messages.brightness,E("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:t,onCalciteSliderInput:this._handleBrightnessChange}))),E("div",{class:m.imageEnhancementToolContainer},E("calcite-label",null,this.messages.contrast,E("calcite-slider",{bind:this,labelTicks:!0,max:10,min:-10,ticks:5,value:i,onCalciteSliderInput:this._handleContrastChange}))),E("div",{class:m.imageEnhancementToolContainer},E("calcite-label",null,this.messages.sharpness,E("calcite-slider",{bind:this,labelTicks:!0,max:1,min:0,step:.1,ticks:.5,value:o,onCalciteSliderInput:this._handleSharpnessChange})))),E("calcite-action",{bind:this,icon:"reset",onclick:this._resetImageTools,slot:"header-actions-end",text:this.messagesCommon.reset})):null}_renderImageGallery(){const{container:e,galleryOpened:t,imageGalleryEnabled:i,viewModel:{thumbnails:o}}=this;return i&&t&&(e&&o)?E("calcite-panel",{bind:this,class:m.carousel,closable:!0,closed:!t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},E("div",{class:m.carouselContainer},this._renderThumbnails(o))):null}_renderMapImageConversionTool(){const{mapImageConversionToolState:e,viewModel:{state:t}}=this;return E("calcite-action",{active:e,afterCreate:this._storeActionElement,bind:this,disabled:"image-loaded"!==t,icon:"image-pin",onclick:this._toggleMapImageConversionToolState,text:this.messages.mapImageConversionTool})}_renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:i,currentBestFeature:o,state:a}}=this;if(!this.container||!o)return null;let s,r,n,l,c;if(i){const{x:e,y:t,direction:o}=i,[a,d,h,g]=p[o];s=`M ${e} ${t} L ${a} ${d} A ${u[2]} ${u[2]} 0 0 1 ${h} ${g} Z`,r=e,l=t,n=p[o][4],c=p[o][5]}const d=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},h=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:o}=t;i&&o&&this.viewModel.handleFeatureClick({sector:o,featureIndexInSector:+i})},w=e=>{e.removeEventListener("click",h)},_=o.attributes.objectId,C=e?.map((e=>e?.items)).filter(Boolean).flatMap((e=>e?.map((({x:e,y:t,objectID:i,featureIndexInSector:o,sector:a})=>E("circle",{afterRemoved:w,class:this.classes(m.feature,{selected:_===i}),cx:e,cy:t,"data-feature-index-in-sector":o,"data-sector":a,key:`${m.feature}-${i}`,onclick:h,r:v}))))),f=e=>{e.removeEventListener("click",d)},M=this.classes({[m.navigationWrapper]:!0,[m.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&"image-loaded"===a?E("div",{bind:this,class:M,key:this.messages.navigationTool},E("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:t()?y:m.rotateWithAnimation,focusable:"false",height:b,role:"img",width:b,xmlns:"http://www.w3.org/2000/svg"},E("defs",null,E("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:r,x2:n,y1:l,y2:c},E("stop",{class:m.navigationPathOffset0,offset:0}),E("stop",{class:m.navigationPathOffset1,offset:1}))),E("g",null,E("circle",{class:this.classes(m.sector,m.outerSector),cx:u[3],cy:u[3],onclick:this._scaleNavigationTool,r:u[3]}),E("circle",{class:m.sector,cx:u[3],cy:u[3],r:u[2]}),E("circle",{class:m.sector,cx:u[3],cy:u[3],r:u[1]}),E("circle",{class:m.sector,cx:u[3],cy:u[3],r:u[0]}),E("path",{class:m.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${m.pointer}-west`}),E("path",{class:this.classes(m.pointer,m.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${m.pointer}-north`}),E("path",{class:m.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${m.pointer}-east`}),E("path",{class:m.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${m.pointer}-south`}),E("path",{class:this.classes(m.sector,m.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:m.sectorSeparator}),g([u[2],u[1],u[0]],u[3],u[3]).map(((t,i)=>E("path",{afterRemoved:f,class:this.classes(m.sector,e?.[i]?.length?m.sectorEnabled:m.sectorDisabled),d:t,"data-sector":`${i}`,key:`${m.sector}-${i}`,onclick:d}))),E("path",{class:this.classes(m.sector,m.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:m.sectorCross}),C,o.attributes.cameraPitch>=5&&s?E("path",{class:m.selectedFeaturePath,d:s,fill:`url(#${this.id}-coverage-fill)`,key:m.selectedFeaturePath}):null))):null}_renderNavigationTool(){const{state:e}=this.viewModel;return E("calcite-action",{active:this.navigationToolActive,afterCreate:this._storeActionElement,bind:this,disabled:"image-loaded"!==e,icon:"explore",onclick:this._toggleNavigationTool,text:this.messages.navigationTool})}_renderImageEnhancementTool(){const{state:e,mode:t}=this.viewModel;return E("calcite-action",{active:this.imageEnhancementToolActive,afterCreate:this._storeActionElement,bind:this,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",onclick:this._toggleImageEnhancementToolState,text:this.messages.imageEnhancement})}_renderMenuBarContainer(){const{currentCoverageVisible:e,isAdditionalCoverageVisible:t,isAdditionalPointSourcesVisible:i,imageGalleryEnabled:o}=this;return E("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},E("calcite-action-group",{expanded:!0},E("calcite-action",{active:e,afterCreate:this._storeActionElement,bind:this,class:m.currentCoverage,icon:"trapezoid-area",onclick:this._toggleCurrentCoverage,text:this.messages.currentFootprint}),E("calcite-action",{active:t,afterCreate:this._storeActionElement,bind:this,class:m.addCoverage,icon:"trapezoid-area",onclick:this._toggleAdditionalCoverage,text:this.messages.additionalFootprints}),E("calcite-action",{active:i,afterCreate:this._storeActionElement,bind:this,class:m.addExpPoints,icon:"circle-area",onclick:this._toggleAdditionalCameraLocations,text:this.messages.additionalCameraLocations})),E("calcite-action-group",{layout:"horizontal"},this.visibleElements.mapImageConversionTool?this._renderMapImageConversionTool():null,this.visibleElements.navigationTool?this._renderNavigationTool():null,this.visibleElements.imageEnhancement?this._renderImageEnhancementTool():null),E("calcite-action-group",null,E("calcite-action",{active:this.galleryOpened,afterCreate:this._storeActionElement,bind:this,disabled:!o,icon:"images",onclick:this._toggleImageGallery,text:this.messages.imageGallery,textEnabled:!0}),this.visibleElements.showPopupsAction?this._renderPopupAction():null),this._renderActionTooltips())}_renderMessageBox(){const{messages:e,viewModel:{displayMessage:t}}=this;if(!t)return null;const{data:i,key:o,map:a}=t,s=`${a?V(e[o],a):e[o]}`;return E("span",{class:m.messageBox},i?`${s} ${i}`:s)}_renderPopupAction(){return E("calcite-action",{afterCreate:this._storeActionElement,bind:this,disabled:!this.popupEnabled,icon:"popup",onclick:this._toggleImageAttributes,text:this.messages.showPopups,textEnabled:!0})}_renderThumbnails(e){const{currentBestFeature:t}=this.viewModel;return t?E("div",{class:m.carouselContent},e.items.map((({url:e,objectId:i,rotation:o},a)=>E("div",{class:`${m.carouselItemWrapper}${t.attributes.objectId===i?"--selected":""}`,key:`${m.carouselItemWrapper}-${a}`},E("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:m.carouselItem,"data-objectid":`${i}`,"data-rotation":`${o}`,"data-src":e,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight}))))):null}_renderViewerContainer(){return E("div",{class:m.viewerContainer},this._renderImageViewer(),this._renderPanoramicViewer(),this._renderMessageBox())}_renderImageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i}=this.viewModel,o=`${m.viewer}${e||"default"!==i?"--hide":""}`;return E("calcite-panel",{afterCreate:t,bind:this,class:o})}_renderPanoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i}=this.viewModel,o=`${m.viewer}${e||"panoramic"!==i?"--hide":""}`;return E("calcite-panel",{afterCreate:t,bind:this,class:o})}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_storeActionElement(e){this._actionItems.set(e.text,e)}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleImageEnhancementToolState(e){e.stopPropagation(),this.imageEnhancementToolActive=!this.imageEnhancementToolActive,this.imageEnhancementToolActive&&(this.galleryOpened&&(this.galleryOpened=!1),this.navigationToolActive&&(this.navigationToolActive=!1))}_toggleImageGallery(e){e.stopPropagation(),this.galleryOpened=!!this.imageGalleryEnabled&&!this.galleryOpened,this.galleryOpened&&(this.imageEnhancementToolActive&&(this.imageEnhancementToolActive=!1),this.navigationToolActive&&(this.navigationToolActive=!1))}_toggleNavigationTool(){this.navigationToolActive=!this.navigationToolActive,this.navigationToolActive&&(this.galleryOpened&&(this.galleryOpened=!1),this.imageEnhancementToolActive&&(this.imageEnhancementToolActive=!1))}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,o=(i-t+540)%360-180;e.style.setProperty(w,`${t}deg`),e.style.setProperty(_,`${t+o}deg`)}async loadBestImage(e){return this.viewModel.loadBestImage(e)}loadImageFromSource(e,t){return this.viewModel.loadImageFromSource(e,t)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){const{viewModel:{state:e}}=this;return E("div",{class:this.classes(T.widget,C)},E("calcite-panel",{bind:this,heading:this.visibleElements.title?this.messages.title:void 0,loading:"image-loading"===e},this.visibleElements.coverageMenu?this._renderMenuBarContainer():null,this._renderBody()))}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([n()],x.prototype,"activeLayer",null),e([n()],x.prototype,"currentBestFeature",null),e([n()],x.prototype,"currentCoverageVisible",null),e([n()],x.prototype,"disabled",null),e([n()],x.prototype,"drawFootprint",null),e([n()],x.prototype,"features",null),e([n()],x.prototype,"imagePointsInView",null),e([n()],x.prototype,"galleryOpened",void 0),e([n()],x.prototype,"icon",null),e([n()],x.prototype,"imageEnhancementToolActive",void 0),e([n({readOnly:!0})],x.prototype,"imageGalleryEnabled",null),e([n()],x.prototype,"isAdditionalCoverageVisible",null),e([n()],x.prototype,"isAdditionalPointSourcesVisible",null),e([n()],x.prototype,"mapImageConversionToolState",null),e([n()],x.prototype,"layer",null),e([n()],x.prototype,"navigationToolActive",void 0),e([n({type:f})],x.prototype,"viewModel",void 0),e([n(),A("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],x.prototype,"messages",void 0),e([n(),A("esri/t9n/common")],x.prototype,"messagesCommon",void 0),e([n({readOnly:!0})],x.prototype,"popupEnabled",null),e([n()],x.prototype,"referencePoint",null),e([n()],x.prototype,"view",null),e([n({type:M,nonNullable:!0})],x.prototype,"visibleElements",void 0),e([n()],x.prototype,"determineWorkflowForFeature",null),e([n()],x.prototype,"updateFootprint",null),e([n()],x.prototype,"_navigationToolExpanded",void 0),e([n()],x.prototype,"_navigationTool",void 0),x=e([l("esri.widgets.OrientedImageryViewer")],x);const F=x;export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4761],{39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,t)}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>a,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function a(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>p,Hq:()=>d,Ie:()=>h,Jt:()=>m,Ne:()=>u,RF:()=>o,aI:()=>v,fA:()=>s,hZ:()=>y,iT:()=>l,is:()=>g,qv:()=>w,vI:()=>c,v_:()=>b,vt:()=>n,w1:()=>a});var i=r(5443);function n(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,a,o=n()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=s,o[5]=a,o}function a(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],a=e[2],o=e[3],l=e[4],d=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),a=Math.min(a,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),d=Math.max(d,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=d}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?y(e,w):n(w)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];n()},60683:(e,t,r)=>{r.r(t),r.d(t,{default:()=>X});var i,n=r(90237),s=(r(59456),r(13874)),a=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494)),o=r(15036),l=r(78888),d=r(69540),p=r(49186),u=r(36563),c=r(4718),y=r(53966),h=r(92071),m=r(74887),f=r(10107),g=r(56507),v=r(36005),w=r(40608),b=r(50498),I=r(4146),S=r(18768),_=r(63074),M=r(69208),T=r(87718),A=r(76294),F=r(16131),L=r(8303),x=r(54310),Z=r(25036),E=r(82935),O=r(10873),P=r(15426),R=r(20437),N=r(17036),G=r(30524),j=r(81457),D=r(39383),V=r(25482);r(44208),r(87811);let $=i=class extends V.oY{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new i({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],$.prototype,"age",void 0),(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],$.prototype,"ageReceived",void 0),(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],$.prototype,"displayCount",void 0),(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],$.prototype,"maxObservations",void 0),$=i=(0,n._)([(0,w.$)("esri.layers.support.PurgeOptions")],$);const C=$;var k=r(8947),U=r(61956),B=r(30291),J=r(88625),q=r(92935),H=r(16930),z=r(5443);const W=(0,N.p)();function K(e,t){return new p.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let Q=class extends((0,A.J)((0,T.F)((0,_.dM)((0,E.e)((0,Z.j)((0,x.J)((0,S.b)((0,F.q)((0,L.A)((0,h.P)((0,M.d)((0,d.O)(I.A))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new C,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=H.A.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=(0,m.sg)((async(e,t,i)=>{const{save:n,saveAs:s}=await r.e(7301).then(r.bind(r,87301));switch(e){case q.X.SAVE:return n(this,t);case q.X.SAVE_AS:return s(this,i,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new p.A("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(m.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){(0,G.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,a.L)(i,t,r)||void 0;return e||y.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,P.PD)(t,r)}async connect(e){const[{createConnection:t}]=await Promise.all([r.e(624).then(r.bind(r,30624)),this.load()]),i=this.geometryType?b.g.toJSON(this.geometryType):null,{customParameters:n=null,definitionExpression:s=null,geometryDefinition:a=null,maxReconnectionAttempts:o=0,maxReconnectionInterval:l=20,spatialReference:d=this.spatialReference}=e||this.createConnectionParameters(),p=t(this.parsedUrl,this.spatialReference,d,i,s,a,o,l,n??void 0),c=(0,u.vE)([this.on("send-message-to-socket",(e=>p.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>p.sendMessageToClient(e)))]);return p.once("destroy",c.remove),p}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return(0,B.tn)(this,e)}createQuery(){const e=new U.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some((t=>(t.name===e&&(r=t.domain),!!r))),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(q.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(q.X.SAVE_AS,t,e)}write(e,t){const r=t?.messages;return this.webSocketUrl?(r?.push(K(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(r?.push(K(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await(0,l.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new p.A("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new p.A("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new p.A("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new R.A({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new p.A("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),(0,G.yp)(this.renderer,this.fieldsIndex),(0,G.sv)(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),(0,k.L)(this,{origin:"service"})}};(0,n._)([(0,f.MZ)({type:String})],Q.prototype,"copyright",void 0),(0,n._)([(0,f.MZ)({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),(0,n._)([(0,f.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),(0,n._)([(0,f.MZ)({type:String})],Q.prototype,"displayField",void 0),(0,n._)([(0,f.MZ)({type:J.A})],Q.prototype,"elevationInfo",void 0),(0,n._)([(0,f.MZ)({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],Q.prototype,"featureReduction",null),(0,n._)([(0,f.MZ)(W.fields)],Q.prototype,"fields",void 0),(0,n._)([(0,f.MZ)(W.fieldsIndex)],Q.prototype,"fieldsIndex",void 0),(0,n._)([(0,f.MZ)({type:z.A,json:{name:"layerDefinition.definitionGeometry",write:!0}})],Q.prototype,"geometryDefinition",void 0),(0,n._)([(0,f.MZ)({type:b.g.apiValues,json:{read:{reader:b.g.read}}})],Q.prototype,"geometryType",void 0),(0,n._)([(0,f.MZ)(O.kF)],Q.prototype,"labelsVisible",void 0),(0,n._)([(0,f.MZ)({type:[j.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:D.w},write:!0}})],Q.prototype,"labelingInfo",void 0),(0,n._)([(0,f.MZ)(O.fV)],Q.prototype,"legendEnabled",void 0),(0,n._)([(0,f.MZ)({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Q.prototype,"listMode",void 0),(0,n._)([(0,f.MZ)({type:g.jz})],Q.prototype,"maxReconnectionAttempts",void 0),(0,n._)([(0,f.MZ)({type:g.jz})],Q.prototype,"maxReconnectionInterval",void 0),(0,n._)([(0,f.MZ)(O.hG)],Q.prototype,"maxScale",void 0),(0,n._)([(0,f.MZ)(O.hn)],Q.prototype,"minScale",void 0),(0,n._)([(0,f.MZ)({type:String})],Q.prototype,"objectIdField",void 0),(0,n._)([(0,f.MZ)({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],Q.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.MZ)({readOnly:!0})],Q.prototype,"outFields",void 0),(0,n._)([(0,f.MZ)(O.M6)],Q.prototype,"popupEnabled",void 0),(0,n._)([(0,f.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Q.prototype,"popupTemplate",void 0),(0,n._)([(0,f.MZ)({type:C})],Q.prototype,"purgeOptions",void 0),(0,n._)([(0,f.MZ)({json:{read:!1,write:!1}})],Q.prototype,"refreshInterval",void 0),(0,n._)([(0,f.MZ)({types:o.H,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:o.X,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],Q.prototype,"renderer",null),(0,n._)([(0,v.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,v.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Q.prototype,"readRenderer",null),(0,n._)([(0,f.MZ)((()=>{const e=(0,c.o8)(O.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Q.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,f.MZ)()],Q.prototype,"sourceJSON",void 0),(0,n._)([(0,f.MZ)({type:H.A,json:{origins:{service:{read:{source:"spatialReference"}}}}})],Q.prototype,"spatialReference",void 0),(0,n._)([(0,f.MZ)({json:{read:!1}})],Q.prototype,"type",void 0),(0,n._)([(0,f.MZ)(O.OZ)],Q.prototype,"url",void 0),(0,n._)([(0,f.MZ)({type:Number})],Q.prototype,"updateInterval",void 0),(0,n._)([(0,f.MZ)({json:{read:!1,write:!1}})],Q.prototype,"useViewTime",void 0),(0,n._)([(0,f.MZ)({type:String})],Q.prototype,"webSocketUrl",void 0),Q=(0,n._)([(0,w.$)("esri.layers.StreamLayer")],Q);const X=Q},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),n=r(53966),s=r(10107),a=(r(44208),r(87811),r(40608)),o=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,i._)([(0,s.MZ)()],t.prototype,"title",null),(0,i._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>a});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>b});var i=r(90237),n=r(49186),s=r(84952),a=r(10107),o=r(56507),l=(r(87811),r(44208),r(36005)),d=r(40608),p=r(43937),u=r(89317),c=r(45917),y=r(49422);const h={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":h,"web-map/basemap":m,"web-map/tables":f,"link-chart/operational-layers":{...h,LinkChartLayer:!0},"link-chart/basemap":m,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var v=r(10873),w=r(79677);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,y.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?w.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,c.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=g[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,a.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:u.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,p.K)("title"),(0,p.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,a.MZ)({type:w.A,json:{origins:{"web-scene":{write:{layerContainerTypes:u.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,p.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:u.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,d.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),d=r(53966),p=r(97768),u=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),b=r(41318),I=r(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,u.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,u.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,I.It)(r);let n,a;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,u.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.QP)(e)}const o=!0,l=!1,d=!1;if(!a)return{features:{edit:o,fullEdit:l},content:{updateItem:d}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,I.It)(r)}catch(e){(0,u.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(i))return n.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,p=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>w});var i=r(90237),n=(r(44208),r(53966)),s=r(74887),a=r(10107),o=r(79901),l=(r(87811),r(40608)),d=r(89317),p=r(5503),u=(r(60999),r(49186),r(14012),r(80559));const c=new p.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let f=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,u.fm)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=m(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(v,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,a.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:d.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,o.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,a.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),s=r(66552),a=r(25482),o=r(10107),l=r(56507),d=(r(87811),r(44208),r(93223)),p=r(36005),u=r(40608),c=r(72088),y=r(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends a.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,o.MZ)()],m.prototype,"description",void 0),(0,n._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,o.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,o.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,d.e)(y.m)],m.prototype,"type",void 0),(0,n._)([(0,o.MZ)()],m.prototype,"valueType",void 0),(0,n._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,o.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,u.$)("esri.layers.support.Field")],m);const f=m},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),n=r(25482),s=r(53966),a=r(91869),o=r(3330),l=r(30524),d=r(56400),p=r(96285);const u=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):m.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?o.GB.instance:t===d.n$?p.mQ.utcInstance:(0,a.tE)(u,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",a=(i?"endField"in i?i.endField:i.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.dateFieldsTimeReference?(0,d.ZS)(n.dateFieldsTimeReference):o??d.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??o:i.timeReference?(0,d.ZS)(i.timeReference):o:null,u=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(s),p],[y(a),p]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,d.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,d.L5);else{const e=u.get(y(i??""))??o;t.set(i,e)}return t}},72088:(e,t,r)=>{r.d(t,{rS:()=>M,gK:()=>_}),r(44208);var i,n=r(90237),s=r(4718),a=r(10107),o=(r(53966),r(93223)),l=r(40608),d=r(25482);r(87811);let p=i=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],p);const u=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,o.e)(u)],c.prototype,"type",void 0),c=(0,n._)([(0,l.$)("esri.layers.support.Domain")],c);const y=c;var h;let m=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,a.MZ)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,o.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(49186);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,o.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const w=v;var b;let I=b=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,a.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],I.prototype,"maxValue",void 0),(0,n._)([(0,a.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],I.prototype,"minValue",void 0),(0,n._)([(0,o.e)({range:"range"})],I.prototype,"type",void 0),I=b=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],I);const S=I,_={key:"type",base:y,typeMap:{range:I,"coded-value":f,inherited:w}};function M(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>y,mX:()=>v,rU:()=>g,tH:()=>_});var i=r(799);const n="__begin__",s="__end__",a=new RegExp(n,"ig"),o=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),d=new RegExp(s+"$","i"),p='"',u=p+" + ",c=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return _(t.expression)}return null}function v(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):p+t,t=d.test(t)?t.replace(d,""):t+p,t=t.replaceAll(a,u).replaceAll(o,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,I=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function _(e){if(!e)return null;let t=b.exec(e)||I.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},8947:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(60999),n=r(74887),s=r(67076);async function a(e,t,r){const a=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(a&&"unique-value"===a.type&&a.styleOrigin){const o=await(0,i.Ke)(a.populateFromStyle());if((0,n.Te)(r),!1===o.ok){const r=o.error;t?.messages&&t.messages.push(new s.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1528],{4902:(e,t,r)=>{r.d(t,{PH:()=>o,sA:()=>a});var i=r(90237),n=r(40608);let s=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,n.$)("esri.core.Identifiable")],t),t},o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(a(class{})){};l=(0,i._)([(0,n.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>w,L:()=>S});var i=r(90237),n=r(69622),s=r(76953),a=r(4718),o=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[o.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.o8)(e),o.Gr.DEFAULTS)}));for(let r=o.Gr.SERVICE;r<o.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,n)=>{e&&e.has(n)||t.set(n,(0,a.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=o.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=o.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),n=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),n!==i}originOf(e){return this._propertyOriginMap.get(e)||o.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(45917),u=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,p.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,o.aB)(t);if("string"==typeof e)return r.get(e,i);const n={};return e.forEach((e=>{n[e]=r.get(e,i)})),n}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,o.aB)(t),n=(0,u.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{n.invalidate(e),r.revert(e,i),n.commit(e)}))}};return t=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,u.oY)(e).store}let h=class extends(d(n.A)){};h=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var m=r(16649),f=r(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,o.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,o.aB)(r))}removeOrigin(e){const t=v(this),r=(0,o.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),o.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,o.aB)(t),n=(0,m.Jt)(this,e);for(let t=i+1;t<o.AU;++t)r.delete(e,t);r.set(e,n,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,u.oY)(e).store}const w=e=>{let t=class extends(g(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(w(n.A)){};S=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],S)},89317:(e,t,r)=>{r.d(t,{K:()=>i});const i=["operational-layers","basemap","ground"]},61528:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var i=r(90237),n=r(78888),s=r(49186),a=r(53966),o=r(34727),l=r(92071),p=r(74887),u=r(10107),c=(r(44208),r(87811),r(40608)),d=r(38954),y=r(51850),h=r(73941),m=r(5443),f=r(16930),g=r(9762),v=r(4146),w=r(52136),S=r(18768),b=r(69208),_=r(16131),I=r(8303),A=r(25036),M=r(10873),x=r(24212);let L=class extends((0,S.b)((0,_.q)((0,I.A)((0,A.j)((0,l.P)((0,b.d)((0,w.p)(v.A)))))))){constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.spatialReference=new f.A({wkid:4326,vcsWkid:115700}),this.fullExtent=new m.A(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}_verifyArray(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const t of e)if("number"!=typeof t)return!1;return!0}_initFullExtent(e){const t=e.root?.boundingVolume;if(!t)return;if(t.box){const e=t?.box;if(e[3]>7972671&&e[7]>7972671&&e[11]>7945940)return}const r=e.root?.transform,i=(0,y.vt)();if(t.region&&this._verifyArray(t.region,6)){const e=t.region,r=(0,o.KJ)(e[0]),i=(0,o.KJ)(e[1]),n=e[4],s=(0,o.KJ)(e[2]),a=(0,o.KJ)(e[3]),l=e[5];this.fullExtent=new m.A({xmin:r,ymin:i,zmin:n,xmax:s,ymax:a,zmax:l,spatialReference:this.spatialReference})}else if(t.sphere&&this._verifyArray(t.sphere,4)){const e=t.sphere,n=(0,y.fA)(e[0],e[1],e[2]),s=e[3]/Math.sqrt(3),a=(0,y.vt)();(0,d.f)(a,n,(0,y.fA)(s,s,s));const o=(0,y.vt)();if((0,d.g)(o,n,(0,y.fA)(s,s,s)),r&&this._verifyArray(r,16)){const e=r;(0,d.h)(i,a,e),(0,d.c)(a,i),(0,d.h)(i,o,e),(0,d.c)(o,i)}(0,g.projectBuffer)(a,h.Ro,0,a,f.A.WGS84,0,1),(0,g.projectBuffer)(o,h.Ro,0,o,f.A.WGS84,0,1);const l=(0,y.vt)(),p=(0,y.vt)();(0,d.y)(l,a,o),(0,d.C)(p,a,o),this.fullExtent=new m.A({xmin:l[0],ymin:l[1],zmin:l[2],xmax:p[0],ymax:p[1],zmax:p[2],spatialReference:this.spatialReference})}else if(t.box&&this._verifyArray(t.box,12)){const e=t.box,i=(0,y.fA)(e[0],e[1],e[2]),n=(0,y.fA)(e[3],e[4],e[5]),s=(0,y.fA)(e[6],e[7],e[8]),a=(0,y.fA)(e[9],e[10],e[11]),o=[];for(let e=0;e<8;++e)o.push((0,y.vt)());if((0,d.g)(o[0],i,n),(0,d.g)(o[0],o[0],s),(0,d.g)(o[0],o[0],a),(0,d.z)(o[1],i,n),(0,d.g)(o[1],o[1],s),(0,d.g)(o[1],o[1],a),(0,d.g)(o[2],i,n),(0,d.z)(o[2],o[2],s),(0,d.g)(o[2],o[2],a),(0,d.z)(o[3],i,n),(0,d.z)(o[3],o[3],s),(0,d.g)(o[3],o[3],a),(0,d.g)(o[4],i,n),(0,d.g)(o[4],o[4],s),(0,d.z)(o[4],o[4],a),(0,d.z)(o[5],i,n),(0,d.g)(o[5],o[5],s),(0,d.z)(o[5],o[5],a),(0,d.g)(o[6],i,n),(0,d.z)(o[6],o[6],s),(0,d.z)(o[6],o[6],a),(0,d.z)(o[7],i,n),(0,d.z)(o[7],o[7],s),(0,d.z)(o[7],o[7],a),r&&this._verifyArray(r,16)){const e=r;for(let t=0;t<8;++t)(0,d.h)(o[t],o[t],e)}const l=(0,y.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),p=(0,y.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let e=0;e<8;++e)(0,g.projectBuffer)(o[e],h.Ro,0,o[e],f.A.WGS84,0,1),(0,d.y)(p,p,o[e]),(0,d.C)(l,l,o[e]);this.fullExtent=new m.A({xmin:p[0],ymin:p[1],zmin:p[2],xmax:l[0],ymax:l[1],zmax:l[2],spatialReference:this.spatialReference})}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(e){(0,p.QP)(e)}if(this.url){const e=(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then((e=>{this._initFullExtent(e.data)}),(e=>{(0,p.QP)(e)}));await e}}async fetchAttributionData(){return this.load().then((()=>({})))}_validateElevationInfo(){const e=this.elevationInfo,t="Integrated mesh 3d tiles layers";(0,x.XF)(a.A.getLogger(this),(0,x.B)(t,"absolute-height",e)),(0,x.XF)(a.A.getLogger(this),(0,x.tW)(t,e))}};(0,i._)([(0,u.MZ)({type:["IntegratedMesh3DTilesLayer"]})],L.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.MZ)({type:f.A})],L.prototype,"spatialReference",void 0),(0,i._)([(0,u.MZ)({type:m.A})],L.prototype,"fullExtent",void 0),(0,i._)([(0,u.MZ)(M.Yj)],L.prototype,"elevationInfo",null),(0,i._)([(0,u.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,i._)([(0,u.MZ)(M.OZ)],L.prototype,"url",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],L.prototype,"type",void 0),(0,i._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],L.prototype,"path",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],L.prototype,"minScale",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],L.prototype,"maxScale",void 0),L=(0,i._)([(0,c.$)("esri.layers.IntegratedMesh3DTilesLayer")],L);const E=L},4146:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),n=(r(59456),r(78888)),s=r(49186),a=r(65529),o=r(4902),l=r(92474),p=r(53966),u=r(74887),c=r(84952),d=r(10107),y=(r(44208),r(87811),r(40608)),h=r(92602),m=r(79677),f=r(5443),g=r(16930);let v=0,w=class extends(a.A.EventedMixin((0,o.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||h.A.portalUrl;throw p.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||p.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:f.A})],w.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:g.A})],w.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],w.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:m.A})],w.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,y.$)("esri.layers.Layer")],w);const S=w},52136:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),n=r(53966),s=r(10107),a=(r(44208),r(87811),r(40608)),o=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,i._)([(0,s.MZ)()],t.prototype,"title",null),(0,i._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>a});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>S});var i=r(90237),n=r(49186),s=r(84952),a=r(10107),o=r(56507),l=(r(87811),r(44208),r(36005)),p=r(40608),u=r(43937),c=r(89317),d=r(45917),y=r(49422);const h={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":h,"web-map/basemap":m,"web-map/tables":f,"link-chart/operational-layers":{...h,LinkChartLayer:!0},"link-chart/basemap":m,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var v=r(10873),w=r(79677);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,y.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?w.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=g[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,a.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,u.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,u.K)("title"),(0,u.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,a.MZ)({type:w.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,u.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),p=r(53966),u=r(97768),c=r(74887),d=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),S=r(41318),b=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,b.It)(r);let n,a;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const o=!0,l=!1,p=!1;if(!a)return{features:{edit:o,fullEdit:l},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,b.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?S.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>a});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const a=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},10873:(e,t,r)=>{r.d(t,{C1:()=>I,Fm:()=>w,Ih:()=>v,M6:()=>u,OZ:()=>d,PY:()=>p,Qo:()=>m,Yj:()=>h,fV:()=>y,hG:()=>_,hn:()=>b,id:()=>S,kF:()=>c,ke:()=>g});var i=r(89317),n=r(5443),s=r(16930),a=r(97159),o=r(88625),l=r(78553);const p={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:i.K}}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},c={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:i.K}}},d={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a.w}}},y={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:i.K}}},h={value:null,type:o.A,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:i.K}}};function m(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const f={write:{enabled:!0,layerContainerTypes:i.K},read:!0},g={type:Number,json:{origins:{"web-document":f,"portal-item":{write:!0}}}},v={...g,json:{...g.json,origins:{"web-document":{...f,write:{enabled:!0,layerContainerTypes:i.K,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition?.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,l.D)(t.layerDefinition.drawingInfo.transparency):void 0:(0,l.D)(t.drawingInfo.transparency)}}},w={type:n.A,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=n.A.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=s.A.fromJSON(t.spatialReference)),r}}}},read:!1}},S={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},b={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:i.K}}},name:"layerDefinition.minScale",write:!0}},_={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:i.K}}},name:"layerDefinition.maxScale",write:!0}},I={json:{write:{ignoreOrigin:!0,layerContainerTypes:i.K},origins:{"web-map":{read:!1,write:!1}}}}},31756:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(83047),n=r(79258);const s={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},24212:(e,t,r)=>{function i(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:p}(e).mode}(null!=e&&e.hasZ,t)}function n(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function s(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function o(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>s,B:()=>n,XF:()=>o,tW:()=>a,w7:()=>i}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},p={mode:"on-the-ground",offset:null}},88625:(e,t,r)=>{r.d(t,{A:()=>S});var i,n=r(90237),s=r(66552),a=r(25482),o=r(97768),l=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),d=r(30524);let y=i=class extends a.oY{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),y=i=(0,n._)([(0,u.$)("esri.symbols.support.FeatureExpressionInfo")],y);const h=y;var m,f=r(16271);const g=(0,s.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),v=new s.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let w=m=class extends a.oY{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,i){t[r]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,o.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.MZ)({type:h,json:{write:!0}})],w.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,p.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],w.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,c.K)("featureExpressionInfo",{featureExpressionInfo:{type:h},"featureExpression.value":{type:[0]}})],w.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.MZ)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],w.prototype,"mode",null),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"offset",void 0),(0,n._)([(0,l.MZ)({type:f.KQ,json:{type:String,read:v.read,write:v.write}})],w.prototype,"unit",null),w=m=(0,n._)([(0,u.$)("esri.symbols.support.ElevationInfo")],w);const S=w},16271:(e,t,r)=>{r.d(t,{Ao:()=>s,KQ:()=>a});var i=r(4576),n=r(31756);function s(e){return 1/(n.j[e]||1)}const a=function(){const e=Object.keys(n.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},79677:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(90237),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),u=r(43937),c=r(56400);let d=i=class extends s.oY{static get allTime(){return h}static get empty(){return m}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let n=this.end;if(n){const r=(0,a.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,o;return n>=t&&n<=r?a=n:t>=n&&t<=s&&(a=t),r>=n&&r<=s?o=r:s>=t&&s<=r&&(o=s),null==a||null==o||isNaN(a)||isNaN(o)?i.empty:new i({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:o}=this;return null!=s&&(n.start=(0,a.S1)(s,e,t,r)),null!=o&&(n.end=(0,a.S1)(o,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,n._)([(0,u.K)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,n._)([(0,u.K)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,p.$)("esri.time.TimeExtent")],d);const y=d,h=new d,m=new d({start:void 0,end:void 0})},78553:(e,t,r)=>{r.d(t,{D:()=>s,p:()=>n});var i=r(56507);function n(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|