@arcgis/core 4.29.6 → 4.29.8
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/{4984e2b79d862114d6a6.js → 1a8d56e01ddfec2257c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{3afb525a131b6841276b.js → 1e4d779a884f13762601.js} +1 -1
- package/assets/esri/core/workers/chunks/{2447a4d5886aeb0ff72a.js → 205597cd91cb7ff3d2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c50daccd84ba5545bfe.js → 22ebdec0867e44d8d58c.js} +1 -1
- package/assets/esri/core/workers/chunks/{da4616b02dd0c3dd3d5d.js → 321547d796a2ecd72ab4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c3ae96ec90e9ed7dd50.js → 32be478638e9e643ea32.js} +1 -1
- package/assets/esri/core/workers/chunks/{a61f337802ae963d7f65.js → 59f03847a9eb96e5f65c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a98d2e026f63a581b1e.js → 5b08309b184f5d8345a0.js} +1 -1
- package/assets/esri/core/workers/chunks/631bda7b99a27f4453c1.js +1 -0
- package/assets/esri/core/workers/chunks/{c527692694688a5b3b07.js → 658a8ee9a4f24bc03f7f.js} +1 -1
- package/assets/esri/core/workers/chunks/99ac2a6a5be0604ee4c2.js +1 -0
- package/assets/esri/core/workers/chunks/{48db6e0bbb1a9c043193.js → b7a78246d25dc07f173d.js} +1 -1
- package/assets/esri/core/workers/chunks/{60ab18c6a04d4b2f1d4c.js → bb05528d2ca12c57a031.js} +1 -1
- package/assets/esri/core/workers/chunks/{5227f9eea6988aadad7f.js → cf0dc0ccbeaf9458de6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f59b5ea05caca8a1a398.js → d40408be9bbcb0021d18.js} +1 -1
- package/assets/esri/core/workers/chunks/df6fbabbc74a408575fc.js +1 -0
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +8 -2
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/makeScheduleFunction.js +5 -0
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/assets/esri/core/workers/chunks/a068f0c8c1c632e8b2cb.js +0 -1
- package/assets/esri/core/workers/chunks/a28b7d868346e13468bb.js +0 -1
- package/assets/esri/core/workers/chunks/ccd53b81c2688dd11584.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deg2rad as e}from"../core/mathUtils.js";import{set as i}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{f as n,n as a,l as o,q as r,e as l,c as s,b as c,g as d}from"./vec32.js";import{create as f}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as p}from"./vec42.js";import{create as h}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{pointAt as g}from"../geometry/support/lineSegment.js";import{create as m,fromPositionAndNormal as u}from"../geometry/support/plane.js";import{g as x,
|
|
5
|
+
import{deg2rad as e}from"../core/mathUtils.js";import{set as i}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{f as n,n as a,l as o,q as r,e as l,c as s,b as c,g as d}from"./vec32.js";import{create as f}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as p}from"./vec42.js";import{create as h}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{pointAt as g}from"../geometry/support/lineSegment.js";import{create as m,fromPositionAndNormal as u}from"../geometry/support/plane.js";import{g as x,c as w}from"./sphere.js";import{Laserline as P}from"../views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js";import{ScreenSpacePass as b}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Float2PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as M}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as L}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as C}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";const A=e(6);function V(e){const i=new C;i.include(b),i.include(P,e);const t=i.fragment;if(e.lineVerticalPlaneEnabled||e.heightManifoldEnabled)if(t.uniforms.add(new S("maxPixelDistance",((i,t)=>e.heightManifoldEnabled?2*t.camera.computeScreenPixelSizeAt(i.heightManifoldTarget):2*t.camera.computeScreenPixelSizeAt(i.lineVerticalPlaneSegment.origin)))),t.code.add(L`float planeDistancePixels(vec4 plane, vec3 pos) {
|
|
6
6
|
float dist = dot(plane.xyz, pos) + plane.w;
|
|
7
7
|
float width = fwidth(dist);
|
|
8
8
|
dist /= min(width, maxPixelDistance);
|
package/chunks/sphere.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/has.js";import t from"../core/Logger.js";import{acosClamped as r,cartesianToSpherical as n}from"../core/mathUtils.js";import{fromRotation as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{g as o,h as s,q as i,l as a,b as c,e as u,f,p as m,n as l,s as g,a as p,m as h,r as d}from"./vec32.js";import{create as j}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{e as y,c as b}from"./vec42.js";import{create as M,fromValues as x}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{getEpsilon as v}from"../core/libs/gl-matrix-2/math/common.js";import{Axis as S}from"../geometry/support/Axis.js";import{fromPoints as A,closestPoint as q}from"../geometry/support/ray.js";import{angle as P}from"../geometry/support/vector.js";import{sv3d as R,sm4d as C}from"../geometry/support/vectorStacks.js";const _=w();function w(){return M()}const E=y,L=y;function O(t,r){return b(r,t)}function T(t,r){return x(t[0],t[1],t[2],r)}function k(t){return t}function z(t){t[0]=t[1]=t[2]=t[3]=0}function N(t,r){return t[0]=t[1]=t[2]=0,t[3]=r,t}function V(t){return t[3]}function Z(t){return t}function B(t,r,n,e){return x(t,r,n,e)}function U(t,r,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+r,n}function X(r,n,e){return t.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),r!==e&&O(r,e),e}function Y(t,r,n){if(null==r)return!1;if(!G(t,r,F))return!1;let{t0:e,t1:o}=F;if((e<0||o<e&&o>0)&&(e=o),e<0)return!1;if(n){const{origin:t,direction:o}=r;n[0]=t[0]+o[0]*e,n[1]=t[1]+o[1]*e,n[2]=t[2]+o[2]*e}return!0}function D(t,r,n){const e=A(r,n);if(!G(t,e,F))return[];const{origin:o,direction:s}=e,{t0:i,t1:a}=F,c=r=>{const n=j();return d(n,o,s,r),W(t,n,n)};return Math.abs(i-a)<v()?[c(i)]:[c(i),c(a)]}const F={t0:0,t1:0};function G(t,r,n){const{origin:e,direction:o}=r,s=H;s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2];const i=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===i)return!1;const a=2*(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]),c=a*a-4*i*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-t[3]*t[3]);if(c<0)return!1;const u=Math.sqrt(c);return n.t0=(-a-u)/(2*i),n.t1=(-a+u)/(2*i),!0}const H=j();function I(t,r){return Y(t,r,null)}function J(t,r,n){if(Y(t,r,n))return n;const e=K(t,r,R.get());return o(n,r.origin,s(R.get(),r.direction,i(r.origin,e)/a(r.direction))),n}function K(t,r,n){const o=R.get(),i=C.get();c(o,r.origin,r.direction);const f=V(t);c(n,o,r.origin),s(n,n,1/a(n)*f);const m=tt(t,r.origin),l=P(r.origin,n);return e(i,l+m,o),u(n,n,i),n}function Q(t,r,n){return Y(t,r,n)?n:(q(r,Z(t),n),W(t,n,n))}function W(t,r,n){const e=f(R.get(),r,Z(t)),i=s(R.get(),e,t[3]/a(e));return o(n,i,Z(t))}function $(t,r){const n=f(R.get(),r,Z(t)),e=m(n),o=t[3]*t[3];return Math.sqrt(Math.abs(e-o))}function tt(t,n){const e=f(R.get(),n,Z(t)),o=a(e),s=V(t),i=s+Math.abs(s-o);return r(s/i)}const rt=j();function nt(t,r,e,o){const s=f(rt,r,Z(t));switch(e){case S.X:{const t=n(s,rt)[2];return g(o,-Math.sin(t),Math.cos(t),0)}case S.Y:{const t=n(s,rt),r=t[1],e=t[2],i=Math.sin(r);return g(o,-i*Math.cos(e),-i*Math.sin(e),Math.cos(r))}case S.Z:return l(o,s);default:return}}function et(t,r){const n=f(at,r,Z(t));return a(n)-t[3]}function ot(t,r,n,e){const i=et(t,r),a=nt(t,r,S.Z,at),c=s(at,a,n-i);return o(e,r,c)}function st(t,r){const n=p(Z(t),r),e=V(t);return n<=e*e}function it(t,r,n=M()){const e=i(Z(t),Z(r)),o=t[3],s=r[3];return e+s<o?(b(n,t),n):e+o<s?(b(n,r),n):(h(n,Z(t),Z(r),(e+s-o)/(2*e)),n[3]=(e+o+s)/2,n)}const at=j(),ct=w(),ut=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:_,altitudeAt:et,angleToSilhouette:tt,axisAt:nt,clear:z,closestPoint:Q,closestPointOnSilhouette:K,containsPoint:st,copy:O,create:w,distanceToSilhouette:$,elevate:U,equals:L,exactEquals:E,fromCenterAndRadius:T,fromRadius:N,fromValues:B,getCenter:Z,getRadius:V,intersectLine:D,intersectRay:Y,intersectRayClosestSilhouette:J,intersectsRay:I,projectPoint:W,setAltitudeAt:ot,setExtent:X,tmpSphere:ct,union:it,wrap:k},Symbol.toStringTag,{value:"Module"}));export{nt as A,et as B,ot as C,_ as N,
|
|
5
|
+
import"../core/has.js";import t from"../core/Logger.js";import{acosClamped as r,cartesianToSpherical as n}from"../core/mathUtils.js";import{fromRotation as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{g as o,h as s,q as i,l as a,b as c,e as u,f,p as m,n as l,s as g,a as p,m as h,r as d}from"./vec32.js";import{create as j}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{e as y,c as b}from"./vec42.js";import{create as M,fromValues as x}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{getEpsilon as v}from"../core/libs/gl-matrix-2/math/common.js";import{Axis as S}from"../geometry/support/Axis.js";import{fromPoints as A,closestPoint as q}from"../geometry/support/ray.js";import{angle as P}from"../geometry/support/vector.js";import{sv3d as R,sm4d as C}from"../geometry/support/vectorStacks.js";const _=w();function w(){return M()}const E=y,L=y;function O(t,r){return b(r,t)}function T(t,r){return x(t[0],t[1],t[2],r)}function k(t){return t}function z(t){t[0]=t[1]=t[2]=t[3]=0}function N(t,r){return t[0]=t[1]=t[2]=0,t[3]=r,t}function V(t){return t[3]}function Z(t){return t}function B(t,r,n,e){return x(t,r,n,e)}function U(t,r,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+r,n}function X(r,n,e){return t.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),r!==e&&O(r,e),e}function Y(t,r,n){if(null==r)return!1;if(!G(t,r,F))return!1;let{t0:e,t1:o}=F;if((e<0||o<e&&o>0)&&(e=o),e<0)return!1;if(n){const{origin:t,direction:o}=r;n[0]=t[0]+o[0]*e,n[1]=t[1]+o[1]*e,n[2]=t[2]+o[2]*e}return!0}function D(t,r,n){const e=A(r,n);if(!G(t,e,F))return[];const{origin:o,direction:s}=e,{t0:i,t1:a}=F,c=r=>{const n=j();return d(n,o,s,r),W(t,n,n)};return Math.abs(i-a)<v()?[c(i)]:[c(i),c(a)]}const F={t0:0,t1:0};function G(t,r,n){const{origin:e,direction:o}=r,s=H;s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2];const i=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===i)return!1;const a=2*(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]),c=a*a-4*i*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-t[3]*t[3]);if(c<0)return!1;const u=Math.sqrt(c);return n.t0=(-a-u)/(2*i),n.t1=(-a+u)/(2*i),!0}const H=j();function I(t,r){return Y(t,r,null)}function J(t,r,n){if(Y(t,r,n))return n;const e=K(t,r,R.get());return o(n,r.origin,s(R.get(),r.direction,i(r.origin,e)/a(r.direction))),n}function K(t,r,n){const o=R.get(),i=C.get();c(o,r.origin,r.direction);const f=V(t);c(n,o,r.origin),s(n,n,1/a(n)*f);const m=tt(t,r.origin),l=P(r.origin,n);return e(i,l+m,o),u(n,n,i),n}function Q(t,r,n){return Y(t,r,n)?n:(q(r,Z(t),n),W(t,n,n))}function W(t,r,n){const e=f(R.get(),r,Z(t)),i=s(R.get(),e,t[3]/a(e));return o(n,i,Z(t))}function $(t,r){const n=f(R.get(),r,Z(t)),e=m(n),o=t[3]*t[3];return Math.sqrt(Math.abs(e-o))}function tt(t,n){const e=f(R.get(),n,Z(t)),o=a(e),s=V(t),i=s+Math.abs(s-o);return r(s/i)}const rt=j();function nt(t,r,e,o){const s=f(rt,r,Z(t));switch(e){case S.X:{const t=n(s,rt)[2];return g(o,-Math.sin(t),Math.cos(t),0)}case S.Y:{const t=n(s,rt),r=t[1],e=t[2],i=Math.sin(r);return g(o,-i*Math.cos(e),-i*Math.sin(e),Math.cos(r))}case S.Z:return l(o,s);default:return}}function et(t,r){const n=f(at,r,Z(t));return a(n)-t[3]}function ot(t,r,n,e){const i=et(t,r),a=nt(t,r,S.Z,at),c=s(at,a,n-i);return o(e,r,c)}function st(t,r){const n=p(Z(t),r),e=V(t);return n<=e*e}function it(t,r,n=M()){const e=i(Z(t),Z(r)),o=t[3],s=r[3];return e+s<o?(b(n,t),n):e+o<s?(b(n,r),n):(h(n,Z(t),Z(r),(e+s-o)/(2*e)),n[3]=(e+o+s)/2,n)}const at=j(),ct=w(),ut=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:_,altitudeAt:et,angleToSilhouette:tt,axisAt:nt,clear:z,closestPoint:Q,closestPointOnSilhouette:K,containsPoint:st,copy:O,create:w,distanceToSilhouette:$,elevate:U,equals:L,exactEquals:E,fromCenterAndRadius:T,fromRadius:N,fromValues:B,getCenter:Z,getRadius:V,intersectLine:D,intersectRay:Y,intersectRayClosestSilhouette:J,intersectsRay:I,projectPoint:W,setAltitudeAt:ot,setExtent:X,tmpSphere:ct,union:it,wrap:k},Symbol.toStringTag,{value:"Module"}));export{nt as A,et as B,ot as C,_ as N,O as a,V as b,w as c,$ as d,K as e,B as f,Z as g,N as h,Y as i,I as j,T as k,E as l,D as m,st as n,L as o,W as p,z as q,U as r,ut as s,ct as t,it as u,X as v,k as w,J as x,Q as y,tt as z};
|
package/chunks/vec32.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function s(t){const n=t[0],a=t[1],s=t[2];return Math.sqrt(n*n+a*a+s*s)}function r(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,s){return t[0]=n,t[1]=a,t[2]=s,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function e(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function c(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function b(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function d(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,s){return t[0]=n[0]+a[0]*s,t[1]=n[1]+a[1]*s,t[2]=n[2]+a[2]*s,t}function x(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return Math.sqrt(a*a+s*s+r*r)}function p(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return a*a+s*s+r*r}function v(t){const n=t[0],a=t[1],s=t[2];return n*n+a*a+s*s}function j(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function z(t,n){const a=n[0],s=n[1],r=n[2];let o=a*a+s*s+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const s=n[0],r=n[1],o=n[2],u=a[0],e=a[1],c=a[2];return t[0]=r*c-o*e,t[1]=o*u-s*c,t[2]=s*e-r*u,t}function A(t,n,a,s){const r=n[0],o=n[1],u=n[2];return t[0]=r+s*(a[0]-r),t[1]=o+s*(a[1]-o),t[2]=u+s*(a[2]-u),t}function D(t,n,a,s,r,o){const u=o*o,e=u*(2*o-3)+1,c=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*e+a[0]*c+s[0]*i+r[0]*h,t[1]=n[1]*e+a[1]*c+s[1]*i+r[1]*h,t[2]=n[2]*e+a[2]*c+s[2]*i+r[2]*h,t}function I(t,n,a,s,r,o){const u=1-o,e=u*u,c=o*o,i=e*u,h=3*o*e,M=3*c*u,f=c*o;return t[0]=n[0]*i+a[0]*h+s[0]*M+r[0]*f,t[1]=n[1]*i+a[1]*h+s[1]*M+r[1]*f,t[2]=n[2]*i+a[2]*h+s[2]*M+r[2]*f,t}function L(t,n){n=n||1;const s=a,r=2*s()*Math.PI,o=2*s()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=o*n,t}function O(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=a[0]*s+a[4]*r+a[8]*o+a[12],t[1]=a[1]*s+a[5]*r+a[9]*o+a[13],t[2]=a[2]*s+a[6]*r+a[10]*o+a[14],t}function S(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=s*a[0]+r*a[3]+o*a[6],t[1]=s*a[1]+r*a[4]+o*a[7],t[2]=s*a[2]+r*a[5]+o*a[8],t}function E(t,n,a){const s=a[0],r=a[1],o=a[2],u=a[3],e=n[0],c=n[1],i=n[2],h=r*i-o*c,M=o*e-s*i,f=s*c-r*e,l=r*f-o*M,m=o*h-s*f,b=s*M-r*h,d=2*u;return t[0]=e+h*d+2*l,t[1]=c+M*d+2*m,t[2]=i+f*d+2*b,t}function Q(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0],o[1]=r[1]*Math.cos(s)-r[2]*Math.sin(s),o[2]=r[1]*Math.sin(s)+r[2]*Math.cos(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function T(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[2]*Math.sin(s)+r[0]*Math.cos(s),o[1]=r[1],o[2]=r[2]*Math.cos(s)-r[0]*Math.sin(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0]*Math.cos(s)-r[1]*Math.sin(s),o[1]=r[0]*Math.sin(s)+r[1]*Math.cos(s),o[2]=r[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n){z(B,t),z(C,n);const a=P(B,C);return a>1?0:a<-1?Math.PI:Math.acos(a)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,a){if(t===a)return!0;const s=t[0],r=t[1],o=t[2],u=a[0],e=a[1],c=a[2],i=n();return Math.abs(s-u)<=i*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(r-e)<=i*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))}function J(t,n,a){const s=a[0]-n[0],r=a[1]-n[1],o=a[2]-n[2];let u=s*s+r*r+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=s*u,t[1]=r*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=e,N=c,R=i,U=x,X=p,Y=s,Z=v,V=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:w,bezier:I,ceil:h,copy:r,cross:_,direction:J,dist:U,distance:x,div:R,divide:i,dot:P,equals:H,exactEquals:G,floor:M,hermite:D,inverse:y,len:Y,length:s,lerp:A,max:b,min:m,mul:N,multiply:c,negate:j,normalize:z,random:L,rotateX:Q,rotateY:T,rotateZ:k,round:d,scale:g,scaleAndAdd:q,set:o,sign:l,sqrDist:X,sqrLen:Z,squaredDistance:p,squaredLength:v,str:F,sub:K,subtract:e,transformMat3:S,transformMat4:O,transformQuat:E},Symbol.toStringTag,{value:"Module"}));export{l as A,c as B,b as C,
|
|
5
|
+
import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function s(t){const n=t[0],a=t[1],s=t[2];return Math.sqrt(n*n+a*a+s*s)}function r(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,s){return t[0]=n,t[1]=a,t[2]=s,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function e(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function c(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function b(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function d(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,s){return t[0]=n[0]+a[0]*s,t[1]=n[1]+a[1]*s,t[2]=n[2]+a[2]*s,t}function x(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return Math.sqrt(a*a+s*s+r*r)}function p(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return a*a+s*s+r*r}function v(t){const n=t[0],a=t[1],s=t[2];return n*n+a*a+s*s}function j(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function z(t,n){const a=n[0],s=n[1],r=n[2];let o=a*a+s*s+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const s=n[0],r=n[1],o=n[2],u=a[0],e=a[1],c=a[2];return t[0]=r*c-o*e,t[1]=o*u-s*c,t[2]=s*e-r*u,t}function A(t,n,a,s){const r=n[0],o=n[1],u=n[2];return t[0]=r+s*(a[0]-r),t[1]=o+s*(a[1]-o),t[2]=u+s*(a[2]-u),t}function D(t,n,a,s,r,o){const u=o*o,e=u*(2*o-3)+1,c=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*e+a[0]*c+s[0]*i+r[0]*h,t[1]=n[1]*e+a[1]*c+s[1]*i+r[1]*h,t[2]=n[2]*e+a[2]*c+s[2]*i+r[2]*h,t}function I(t,n,a,s,r,o){const u=1-o,e=u*u,c=o*o,i=e*u,h=3*o*e,M=3*c*u,f=c*o;return t[0]=n[0]*i+a[0]*h+s[0]*M+r[0]*f,t[1]=n[1]*i+a[1]*h+s[1]*M+r[1]*f,t[2]=n[2]*i+a[2]*h+s[2]*M+r[2]*f,t}function L(t,n){n=n||1;const s=a,r=2*s()*Math.PI,o=2*s()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=o*n,t}function O(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=a[0]*s+a[4]*r+a[8]*o+a[12],t[1]=a[1]*s+a[5]*r+a[9]*o+a[13],t[2]=a[2]*s+a[6]*r+a[10]*o+a[14],t}function S(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=s*a[0]+r*a[3]+o*a[6],t[1]=s*a[1]+r*a[4]+o*a[7],t[2]=s*a[2]+r*a[5]+o*a[8],t}function E(t,n,a){const s=a[0],r=a[1],o=a[2],u=a[3],e=n[0],c=n[1],i=n[2],h=r*i-o*c,M=o*e-s*i,f=s*c-r*e,l=r*f-o*M,m=o*h-s*f,b=s*M-r*h,d=2*u;return t[0]=e+h*d+2*l,t[1]=c+M*d+2*m,t[2]=i+f*d+2*b,t}function Q(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0],o[1]=r[1]*Math.cos(s)-r[2]*Math.sin(s),o[2]=r[1]*Math.sin(s)+r[2]*Math.cos(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function T(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[2]*Math.sin(s)+r[0]*Math.cos(s),o[1]=r[1],o[2]=r[2]*Math.cos(s)-r[0]*Math.sin(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0]*Math.cos(s)-r[1]*Math.sin(s),o[1]=r[0]*Math.sin(s)+r[1]*Math.cos(s),o[2]=r[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n){z(B,t),z(C,n);const a=P(B,C);return a>1?0:a<-1?Math.PI:Math.acos(a)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,a){if(t===a)return!0;const s=t[0],r=t[1],o=t[2],u=a[0],e=a[1],c=a[2],i=n();return Math.abs(s-u)<=i*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(r-e)<=i*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))}function J(t,n,a){const s=a[0]-n[0],r=a[1]-n[1],o=a[2]-n[2];let u=s*s+r*r+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=s*u,t[1]=r*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=e,N=c,R=i,U=x,X=p,Y=s,Z=v,V=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:w,bezier:I,ceil:h,copy:r,cross:_,direction:J,dist:U,distance:x,div:R,divide:i,dot:P,equals:H,exactEquals:G,floor:M,hermite:D,inverse:y,len:Y,length:s,lerp:A,max:b,min:m,mul:N,multiply:c,negate:j,normalize:z,random:L,rotateX:Q,rotateY:T,rotateZ:k,round:d,scale:g,scaleAndAdd:q,set:o,sign:l,sqrDist:X,sqrLen:Z,squaredDistance:p,squaredLength:v,str:F,sub:K,subtract:e,transformMat3:S,transformMat4:O,transformQuat:E},Symbol.toStringTag,{value:"Module"}));export{l as A,c as B,b as C,i as D,J as E,j as F,H as G,Y as H,V as I,M as J,k as K,h as L,d as M,D as N,I as O,L as P,Q,T as R,F as S,N as T,R as U,p as a,_ as b,r as c,w as d,O as e,e as f,u as g,g as h,y as i,G as j,P as k,s as l,A as m,z as n,U as o,v as p,x as q,q as r,o as s,S as t,E as u,f as v,X as w,Z as x,m as y,K as z};
|
package/chunks/vec42.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getEpsilon as t,RANDOM as n}from"../core/libs/gl-matrix-2/math/common.js";function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function r(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,a,r,s){return t[0]=n,t[1]=a,t[2]=r,t[3]=s,t}function o(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t}function u(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}function e(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t[3]=n[3]*a[3],t}function c(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t[3]=n[3]/a[3],t}function i(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t}function h(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t}function M(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t[3]=Math.min(n[3],a[3]),t}function f(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t[3]=Math.max(n[3],a[3]),t}function l(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function m(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t}function d(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t}function b(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2],o=n[3]-t[3];return Math.sqrt(a*a+r*r+s*s+o*o)}function x(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2],o=n[3]-t[3];return a*a+r*r+s*s+o*o}function q(t){const n=t[0],a=t[1],r=t[2],s=t[3];return Math.sqrt(n*n+a*a+r*r+s*s)}function p(t){const n=t[0],a=t[1],r=t[2],s=t[3];return n*n+a*a+r*r+s*s}function g(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}function v(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}function y(t,n){const a=n[0],r=n[1],s=n[2],o=n[3];let u=a*a+r*r+s*s+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=a*u,t[1]=r*u,t[2]=s*u,t[3]=o*u),t}function j(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function _(t,n,a,r){const s=n[0],o=n[1],u=n[2],e=n[3];return t[0]=s+r*(a[0]-s),t[1]=o+r*(a[1]-o),t[2]=u+r*(a[2]-u),t[3]=e+r*(a[3]-e),t}function w(t,a){const r=n;let s,o,u,e,c,i;a=a||1;do{s=2*r()-1,o=2*r()-1,c=s*s+o*o}while(c>=1);do{u=2*r()-1,e=2*r()-1,i=u*u+e*e}while(i>=1);const h=Math.sqrt((1-c)/i);return t[0]=a*s,t[1]=a*o,t[2]=a*u*h,t[3]=a*e*h,t}function z(t,n,a){const r=n[0],s=n[1],o=n[2],u=n[3];return t[0]=a[0]*r+a[4]*s+a[8]*o+a[12]*u,t[1]=a[1]*r+a[5]*s+a[9]*o+a[13]*u,t[2]=a[2]*r+a[6]*s+a[10]*o+a[14]*u,t[3]=a[3]*r+a[7]*s+a[11]*o+a[15]*u,t}function A(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],e=a[1],c=a[2],i=a[3],h=i*r+e*o-c*s,M=i*s+c*r-u*o,f=i*o+u*s-e*r,l=-u*r-e*s-c*o;return t[0]=h*i+l*-u+M*-c-f*-e,t[1]=M*i+l*-e+f*-u-h*-c,t[2]=f*i+l*-c+h*-e-M*-u,t[3]=n[3],t}function D(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function L(n,a){const r=n[0],s=n[1],o=n[2],u=n[3],e=a[0],c=a[1],i=a[2],h=a[3],M=t();return Math.abs(r-e)<=M*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(s-c)<=M*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(o-i)<=M*Math.max(1,Math.abs(o),Math.abs(i))&&Math.abs(u-h)<=M*Math.max(1,Math.abs(u),Math.abs(h))}const O=u,S=e,k=c,B=b,C=x,F=q,G=p,H=Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:i,copy:a,copyVec3:r,dist:B,distance:b,div:k,divide:c,dot:j,equals:L,exactEquals:E,floor:h,inverse:v,len:F,length:q,lerp:_,max:f,min:M,mul:S,multiply:e,negate:g,normalize:y,random:w,round:l,scale:m,scaleAndAdd:d,set:s,sqrDist:C,sqrLen:G,squaredDistance:x,squaredLength:p,str:D,sub:O,subtract:u,transformMat4:z,transformQuat:A},Symbol.toStringTag,{value:"Module"}));export{v as A,w as B,A as C,D,O as E,S as F,k as G,B as H,C as I,F as J,G as K,E as a,
|
|
5
|
+
import{getEpsilon as t,RANDOM as n}from"../core/libs/gl-matrix-2/math/common.js";function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function r(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,a,r,s){return t[0]=n,t[1]=a,t[2]=r,t[3]=s,t}function o(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t[3]=n[3]+a[3],t}function u(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t[3]=n[3]-a[3],t}function e(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t[3]=n[3]*a[3],t}function c(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t[3]=n[3]/a[3],t}function i(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t}function h(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t}function M(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t[3]=Math.min(n[3],a[3]),t}function f(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t[3]=Math.max(n[3],a[3]),t}function l(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function m(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t}function d(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t[3]=n[3]+a[3]*r,t}function b(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2],o=n[3]-t[3];return Math.sqrt(a*a+r*r+s*s+o*o)}function x(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2],o=n[3]-t[3];return a*a+r*r+s*s+o*o}function q(t){const n=t[0],a=t[1],r=t[2],s=t[3];return Math.sqrt(n*n+a*a+r*r+s*s)}function p(t){const n=t[0],a=t[1],r=t[2],s=t[3];return n*n+a*a+r*r+s*s}function g(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}function v(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}function y(t,n){const a=n[0],r=n[1],s=n[2],o=n[3];let u=a*a+r*r+s*s+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=a*u,t[1]=r*u,t[2]=s*u,t[3]=o*u),t}function j(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function _(t,n,a,r){const s=n[0],o=n[1],u=n[2],e=n[3];return t[0]=s+r*(a[0]-s),t[1]=o+r*(a[1]-o),t[2]=u+r*(a[2]-u),t[3]=e+r*(a[3]-e),t}function w(t,a){const r=n;let s,o,u,e,c,i;a=a||1;do{s=2*r()-1,o=2*r()-1,c=s*s+o*o}while(c>=1);do{u=2*r()-1,e=2*r()-1,i=u*u+e*e}while(i>=1);const h=Math.sqrt((1-c)/i);return t[0]=a*s,t[1]=a*o,t[2]=a*u*h,t[3]=a*e*h,t}function z(t,n,a){const r=n[0],s=n[1],o=n[2],u=n[3];return t[0]=a[0]*r+a[4]*s+a[8]*o+a[12]*u,t[1]=a[1]*r+a[5]*s+a[9]*o+a[13]*u,t[2]=a[2]*r+a[6]*s+a[10]*o+a[14]*u,t[3]=a[3]*r+a[7]*s+a[11]*o+a[15]*u,t}function A(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],e=a[1],c=a[2],i=a[3],h=i*r+e*o-c*s,M=i*s+c*r-u*o,f=i*o+u*s-e*r,l=-u*r-e*s-c*o;return t[0]=h*i+l*-u+M*-c-f*-e,t[1]=M*i+l*-e+f*-u-h*-c,t[2]=f*i+l*-c+h*-e-M*-u,t[3]=n[3],t}function D(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function L(n,a){const r=n[0],s=n[1],o=n[2],u=n[3],e=a[0],c=a[1],i=a[2],h=a[3],M=t();return Math.abs(r-e)<=M*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(s-c)<=M*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(o-i)<=M*Math.max(1,Math.abs(o),Math.abs(i))&&Math.abs(u-h)<=M*Math.max(1,Math.abs(u),Math.abs(h))}const O=u,S=e,k=c,B=b,C=x,F=q,G=p,H=Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:i,copy:a,copyVec3:r,dist:B,distance:b,div:k,divide:c,dot:j,equals:L,exactEquals:E,floor:h,inverse:v,len:F,length:q,lerp:_,max:f,min:M,mul:S,multiply:e,negate:g,normalize:y,random:w,round:l,scale:m,scaleAndAdd:d,set:s,sqrDist:C,sqrLen:G,squaredDistance:x,squaredLength:p,str:D,sub:O,subtract:u,transformMat4:z,transformQuat:A},Symbol.toStringTag,{value:"Module"}));export{v as A,w as B,A as C,D,O as E,S as F,k as G,B as H,C as I,F as J,G as K,E as a,m as b,a as c,x as d,L as e,o as f,j as g,r as h,q as i,p as j,u as k,_ as l,e as m,y as n,c as o,i as p,h as q,M as r,s,z as t,f as u,H as v,l as w,d as x,b as y,g as z};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as t}from"../factories/mat3f64.js";import{create as n}from"../factories/quatf64.js";import{create as s,fromValues as o}from"../factories/vec3f64.js";import{getEpsilon as a,RANDOM as r}from"./common.js";import{k as e,b as c,
|
|
5
|
+
import{create as t}from"../factories/mat3f64.js";import{create as n}from"../factories/quatf64.js";import{create as s,fromValues as o}from"../factories/vec3f64.js";import{getEpsilon as a,RANDOM as r}from"./common.js";import{k as e,b as c,H as i,n as u}from"../../../../chunks/vec32.js";import{c as h,s as M,f,b as l,g as m,l as p,i as q,j,n as g,a as d,e as P}from"../../../../chunks/vec42.js";function b(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function I(t,n,s){s*=.5;const o=Math.sin(s);return t[0]=o*n[0],t[1]=o*n[1],t[2]=o*n[2],t[3]=Math.cos(s),t}function v(t,n){const s=2*Math.acos(n[3]),o=Math.sin(s/2);return o>a()?(t[0]=n[0]/o,t[1]=n[1]/o,t[2]=n[2]/o):(t[0]=1,t[1]=0,t[2]=0),s}function x(t,n,s){const o=n[0],a=n[1],r=n[2],e=n[3],c=s[0],i=s[1],u=s[2],h=s[3];return t[0]=o*h+e*c+a*u-r*i,t[1]=a*h+e*i+r*c-o*u,t[2]=r*h+e*u+o*i-a*c,t[3]=e*h-o*c-a*i-r*u,t}function y(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i+e*c,t[1]=a*i+r*c,t[2]=r*i-a*c,t[3]=e*i-o*c,t}function A(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i-r*c,t[1]=a*i+e*c,t[2]=r*i+o*c,t[3]=e*i-a*c,t}function _(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i+a*c,t[1]=a*i-o*c,t[2]=r*i+e*c,t[3]=e*i-r*c,t}function k(t,n){const s=n[0],o=n[1],a=n[2];return t[0]=s,t[1]=o,t[2]=a,t[3]=Math.sqrt(Math.abs(1-s*s-o*o-a*a)),t}function z(t,n,s,o){const r=n[0],e=n[1],c=n[2],i=n[3];let u,h,M,f,l,m=s[0],p=s[1],q=s[2],j=s[3];return h=r*m+e*p+c*q+i*j,h<0&&(h=-h,m=-m,p=-p,q=-q,j=-j),1-h>a()?(u=Math.acos(h),M=Math.sin(u),f=Math.sin((1-o)*u)/M,l=Math.sin(o*u)/M):(f=1-o,l=o),t[0]=f*r+l*m,t[1]=f*e+l*p,t[2]=f*c+l*q,t[3]=f*i+l*j,t}function E(t){const n=r,s=n(),o=n(),a=n(),e=Math.sqrt(1-s),c=Math.sqrt(s);return t[0]=e*Math.sin(2*Math.PI*o),t[1]=e*Math.cos(2*Math.PI*o),t[2]=c*Math.sin(2*Math.PI*a),t[3]=c*Math.cos(2*Math.PI*a),t}function L(t,n){const s=n[0],o=n[1],a=n[2],r=n[3],e=s*s+o*o+a*a+r*r,c=e?1/e:0;return t[0]=-s*c,t[1]=-o*c,t[2]=-a*c,t[3]=r*c,t}function O(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function S(t,n){const s=n[0]+n[4]+n[8];let o;if(s>0)o=Math.sqrt(s+1),t[3]=.5*o,o=.5/o,t[0]=(n[5]-n[7])*o,t[1]=(n[6]-n[2])*o,t[2]=(n[1]-n[3])*o;else{let s=0;n[4]>n[0]&&(s=1),n[8]>n[3*s+s]&&(s=2);const a=(s+1)%3,r=(s+2)%3;o=Math.sqrt(n[3*s+s]-n[3*a+a]-n[3*r+r]+1),t[s]=.5*o,o=.5/o,t[3]=(n[3*a+r]-n[3*r+a])*o,t[a]=(n[3*a+s]+n[3*s+a])*o,t[r]=(n[3*r+s]+n[3*s+r])*o}return t}function T(t,n,s,o){const a=.5*Math.PI/180;n*=a,s*=a,o*=a;const r=Math.sin(n),e=Math.cos(n),c=Math.sin(s),i=Math.cos(s),u=Math.sin(o),h=Math.cos(o);return t[0]=r*i*h-e*c*u,t[1]=e*c*h+r*i*u,t[2]=e*i*u-r*c*h,t[3]=e*i*h+r*c*u,t}function H(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}const W=h,X=M,Y=f,Z=x,w=l,B=m,C=p,D=q,F=D,G=j,J=G,K=g,N=d,Q=P;function R(t,n,s){const o=e(n,s);return o<-.999999?(c(U,V,n),i(U)<1e-6&&c(U,$,n),u(U,U),I(t,U,Math.PI),t):o>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(c(U,n,s),t[0]=U[0],t[1]=U[1],t[2]=U[2],t[3]=1+o,K(t,t))}const U=s(),V=o(1,0,0),$=o(0,1,0);function tt(t,n,s,o,a,r){return z(nt,n,a,r),z(st,s,o,r),z(t,nt,st,2*r*(1-r)),t}const nt=n(),st=n();function ot(t,n,s,o){const a=at;return a[0]=s[0],a[3]=s[1],a[6]=s[2],a[1]=o[0],a[4]=o[1],a[7]=o[2],a[2]=-n[0],a[5]=-n[1],a[8]=-n[2],K(t,S(t,a))}const at=t(),rt=Object.freeze(Object.defineProperty({__proto__:null,add:Y,calculateW:k,conjugate:O,copy:W,dot:B,equals:Q,exactEquals:N,fromEuler:T,fromMat3:S,getAxisAngle:v,identity:b,invert:L,len:F,length:D,lerp:C,mul:Z,multiply:x,normalize:K,random:E,rotateX:y,rotateY:A,rotateZ:_,rotationTo:R,scale:w,set:X,setAxes:ot,setAxisAngle:I,slerp:z,sqlerp:tt,sqrLen:J,squaredLength:G,str:H},Symbol.toStringTag,{value:"Module"}));export{Y as add,k as calculateW,O as conjugate,W as copy,B as dot,Q as equals,N as exactEquals,T as fromEuler,S as fromMat3,v as getAxisAngle,b as identity,L as invert,F as len,D as length,C as lerp,Z as mul,x as multiply,K as normalize,rt as q,E as random,y as rotateX,A as rotateY,_ as rotateZ,R as rotationTo,w as scale,X as set,ot as setAxes,I as setAxisAngle,z as slerp,tt as sqlerp,J as sqrLen,G as squaredLength,H as str};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../factories/vec3f64.js";import"./common.js";export{v as abs,g as add,d as angle,O as bezier,L as ceil,c as copy,b as cross,E as direction,o as dist,q as distance,U as div,
|
|
5
|
+
import"../factories/vec3f64.js";import"./common.js";export{v as abs,g as add,d as angle,O as bezier,L as ceil,c as copy,b as cross,E as direction,o as dist,q as distance,U as div,D as divide,k as dot,G as equals,j as exactEquals,J as floor,N as hermite,i as inverse,H as len,l as length,m as lerp,C as max,y as min,T as mul,B as multiply,F as negate,n as normalize,P as random,Q as rotateX,R as rotateY,K as rotateZ,M as round,h as scale,r as scaleAndAdd,s as set,A as sign,w as sqrDist,x as sqrLen,a as squaredDistance,p as squaredLength,S as str,z as sub,f as subtract,t as transformMat3,e as transformMat4,u as transformQuat}from"../../../../chunks/vec32.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./common.js";export{
|
|
5
|
+
import"./common.js";export{f as add,p as ceil,c as copy,h as copyVec3,H as dist,y as distance,G as div,o as divide,g as dot,e as equals,a as exactEquals,q as floor,A as inverse,J as len,i as length,l as lerp,u as max,r as min,F as mul,m as multiply,z as negate,n as normalize,B as random,w as round,b as scale,x as scaleAndAdd,s as set,I as sqrDist,K as sqrLen,d as squaredDistance,j as squaredLength,D as str,E as sub,k as subtract,t as transformMat4,C as transformQuat}from"../../../../chunks/vec42.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../chunks/vec32.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../chunks/vec42.js";import"../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../core/libs/gl-matrix-2/math/common.js";import"./Axis.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{N as NullSphere,B as altitudeAt,z as angleToSilhouette,A as axisAt,q as clear,y as closestPoint,
|
|
5
|
+
import"../../core/has.js";import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../chunks/vec32.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../chunks/vec42.js";import"../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../core/libs/gl-matrix-2/math/common.js";import"./Axis.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{N as NullSphere,B as altitudeAt,z as angleToSilhouette,A as axisAt,q as clear,y as closestPoint,e as closestPointOnSilhouette,n as containsPoint,a as copy,c as create,d as distanceToSilhouette,r as elevate,o as equals,l as exactEquals,k as fromCenterAndRadius,h as fromRadius,f as fromValues,g as getCenter,b as getRadius,m as intersectLine,i as intersectRay,x as intersectRayClosestSilhouette,j as intersectsRay,p as projectPoint,C as setAltitudeAt,v as setExtent,t as tmpSphere,u as union,w as wrap}from"../../chunks/sphere.js";
|
package/interfaces.d.ts
CHANGED
|
@@ -38051,13 +38051,13 @@ declare namespace __esri {
|
|
|
38051
38051
|
*
|
|
38052
38052
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#generateAddAssociations)
|
|
38053
38053
|
*/
|
|
38054
|
-
generateAddAssociations(association: Association[]):
|
|
38054
|
+
generateAddAssociations(association: Association[]): ServiceEdits;
|
|
38055
38055
|
/**
|
|
38056
38056
|
* Returns [ServiceEdits](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#ServiceEdits) which are used to delete an [Association](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-networks-support-Association.html) via the `applyEdits` method on the [FeatureService](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-FeatureService.html) class.
|
|
38057
38057
|
*
|
|
38058
38058
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-UtilityNetwork.html#generateDeleteAssociations)
|
|
38059
38059
|
*/
|
|
38060
|
-
generateDeleteAssociations(association: Association[]):
|
|
38060
|
+
generateDeleteAssociations(association: Association[]): ServiceEdits;
|
|
38061
38061
|
/**
|
|
38062
38062
|
* All devices features have terminal configurations (default single terminal).
|
|
38063
38063
|
*
|
|
@@ -119257,6 +119257,12 @@ declare namespace __esri {
|
|
|
119257
119257
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-VersionManagement-VersionManagementViewModel.html#userLookup)
|
|
119258
119258
|
*/
|
|
119259
119259
|
readonly userLookup: globalThis.Map<string, string>;
|
|
119260
|
+
/**
|
|
119261
|
+
* A Map of current version identifiers keyed on the map service url.
|
|
119262
|
+
*
|
|
119263
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-VersionManagement-VersionManagementViewModel.html#versionIdentifierLookup)
|
|
119264
|
+
*/
|
|
119265
|
+
readonly versionIdentifierLookup: globalThis.Map<string, VersionIdentifier>;
|
|
119260
119266
|
/**
|
|
119261
119267
|
* Contains information about the versions in the versionmanagementservice such as name, guid, etc
|
|
119262
119268
|
*
|
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.29";let t,i=r;i="4.29.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as e}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const r="4.29";let t,i=r;i="4.29.8";function n(o){t=o}function m(s){const e=t?.findCredential(s);return e?.token?o(s,"token",e.token):s}has("host-webworker");export{m as addTokenParameter,s as buildDate,i as fullVersion,t as id,e as revision,n as setId,r as version};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import i from"../core/Accessor.js";import r from"../core/Logger.js";import{isAbortError as s}from"../core/promiseUtils.js";import{watch as n}from"../core/reactiveUtils.js";import{addFrameTask as a}from"../core/scheduling.js";import{property as o}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{wasmFailedToInit as d,Lyr3DWasmWorkerOutputStatus as h,invalidLayerView as u}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as _}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as y}from"../libs/lyr3d/Lyr3DModule.js";import{getMetersPerUnit as c}from"../symbols/support/unitConversionUtils.js";import{makeScheduleFunction as g}from"../views/3d/layers/I3SMeshView3D.js";var m,b;!function(e){e[e.Lifetime=0]="Lifetime",e[e.Jobs=1]="Jobs",e[e.Renderables=2]="Renderables"}(m||(m={})),function(e){e[e.Critical=0]="Critical",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info"}(b||(b={}));let f=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._debugFlags=new Set,this._debugLevel=b.Critical,this._pulseTaskHandle=null,this._session=null,this._debugFlags.add(m.Lifetime),this._debugFlags.add(m.Jobs),this._debugFlags.add(m.Renderables)}_debugLog(e,t,i,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=s?`[js] ${i}`:`${i}`;t===b.Critical||t===b.Error?r.getLogger(this).error(e):t===b.Warning&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>b.Warning&&(r.getLogger(this).level="info"),this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([n((()=>this.view.state?.contentCamera),(()=>this._updateWasmCamera()))]),this._pulseTaskHandle=a({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach((e=>{e.abortController.abort()})),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._worker;e&&e.destroyWasm().then((()=>{this._worker?.destroy(),this._worker=null})),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}add3DTilesLayerView(e){return this._lyr3DMain?this._add3DTilesLayerView(e):(this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),d)}remove3DTilesLayerView(e){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() called when WASM wasn't loaded!"),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setEnabled() called when WASM wasn't loaded!");const i=this._layers.get(e.wasmLayerId);i&&(this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0)}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setLayerOffset() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.getAttributionText() called when WASM wasn't loaded!"),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.onRenderableEvicted() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0)}initializeWasm(){return this._lyr3DMain?Promise.resolve():(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=y().then((e=>{this._lyr3DMain=e,this._lyr3DMainPromise=null;const t=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),i=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),r=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),s=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),n=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),a="global"===this.view.viewingMode,o=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1,l=this.view.heightModelInfo?.heightModel,d=!l||"gravity-related-height"===l;return this._lyr3DMain.initialize_lyr3d_wasm(n,t,i,r,s,a,d,o,this._debugLevel)?(this._worker=new _(g(this.view.resourceController)),this._worker.promise?this._worker.promise:void 0):(this._lyr3DMain=null,void this._debugLog(m.Lifetime,b.Critical,"Lyr3d Main WASM failed to initialize",!1))})).catch((e=>{this._debugLog(m.Lifetime,b.Critical,`Lyr3d WASM failed to download error = ${e}`,!1)}))),this._lyr3DMainPromise)}_pulseTask(){if(this._lyr3DMain){let e=0;this._layers.forEach((t=>{e+=t.layerView.usedMemory})),e/=1048576;const t=this.view.resourceController.memoryController,i=t.usedMemory*t.maxMemory-e,r=t.maxMemory-i+t.additionalCacheMemory;this._lyr3DMain.frame_pulse(r,e,i,t.maxMemory)}}_incrementJobCount(e){e.outstandingJobCount+=1,1===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_decrementJobCount(e){e.outstandingJobCount-=1,0===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){e.outstandingRenderableCount+=1,e.outstandingJobCount<1&&1===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){e.outstandingRenderableCount-=1,e.outstandingJobCount<1&&0===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(m.Jobs,b.Error,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){const e=t.data.byteLength,r=this._lyr3DMain._malloc(e);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,e).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,e),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i){const r=[];for(const s of e){const e=new URL(s),n=e.searchParams.get("session");n?this._session=n:this._session&&e.searchParams.append("session",this._session),r.push(t(e.toString(),i).then((e=>e.data)))}return r}_onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,r={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey}},n={inputs:[],jobDescJson:e.desc,isMissingResourceCase:!1},a=this._getRequestPromises(e.urls,r);Promise.all(a).then((e=>(n.inputs=e,this._worker.invoke(n,i)))).then((e=>e)).catch((t=>(s(t)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error ${t}.`),{status:h.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}))).then((a=>{if(a.status===h.Failed)this._onJobFailed(t,a,e);else if(a.status===h.Succeeded)this._onJobSucceeded(t,a,e);else if(a.status===h.MissingInputs){const o=this._getRequestPromises(a.missingInputUrls,r);Promise.all(o).then((e=>{n.jobDescJson=a.jobDescJson,a.originalInputs?n.inputs=a.originalInputs:n.inputs=[],n.isMissingResourceCase=!0;for(const t of e)n.inputs.push(t);return this._worker.invoke(n,i)})).then((i=>{i.status===h.Failed?this._onJobFailed(t,i,e):i.status===h.Succeeded&&this._onJobSucceeded(t,i,e)})).catch((i=>{this._decrementJobCount(t),s(i)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)}))}}))}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),t=e.meshData;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then((t=>{this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)})).catch((t=>{s(t)||this._debugLog(m.Renderables,b.Error,`createRenderable failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)})))}_freeRenderables(e,t,i){if(i<1)return;const r=this._layers.get(e);if(!r)return;const s=r.layerView,n=[],a=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)n.push(a[o]);for(let o=0;o<i;++o)s.freeRenderable(n[o])}_setRenderableVisibility(e,t,i,r){if(r<1)return;const s=this._layers.get(e);if(!s)return;const n=s.layerView,a=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,r),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,r);for(let h=0;h<r;++h)a.push(l[h]),o.push(1===d[h]);n.setRenderableVisibility(a,o,r)}_onWasmError(e,t,i,r){this._lyr3DMain&&this._debugLog(i,r,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_add3DTilesLayerView(e){const t=e.layer;if(!t.url)return u;const i=this._lyr3DMain.get_next_layer_id(),r=new AbortController;this._layers.set(i,{layerView:e,abortController:r,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey});const s=t.elevationInfo?.offset??0,n=t.elevationInfo?.unit?c(t.elevationInfo?.unit):1;return this._lyr3DMain.add_layer(t.url,i,s*n)?(this._updateWasmCamera(),i):(this._layers.delete(i),u)}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:r,near:s,far:n,fovY:a}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:r,near:s,far:n,fov:a,aspectRatio:l,viewport:o})}};e([o({constructOnly:!0})],f.prototype,"view",void 0),f=e([l("esri.layers.Lyr3DWasmPerSceneView")],f);const w=f;export{w as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import i from"../core/Accessor.js";import r from"../core/Logger.js";import{isAbortError as s}from"../core/promiseUtils.js";import{watch as n}from"../core/reactiveUtils.js";import{addFrameTask as a}from"../core/scheduling.js";import{property as o}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{wasmFailedToInit as d,Lyr3DWasmWorkerOutputStatus as h,invalidLayerView as u}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as _}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as y}from"../libs/lyr3d/Lyr3DModule.js";import{getMetersPerUnit as c}from"../symbols/support/unitConversionUtils.js";import{makeScheduleFunction as g}from"../views/3d/layers/support/makeScheduleFunction.js";var m,b;!function(e){e[e.Lifetime=0]="Lifetime",e[e.Jobs=1]="Jobs",e[e.Renderables=2]="Renderables"}(m||(m={})),function(e){e[e.Critical=0]="Critical",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info"}(b||(b={}));let f=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._debugFlags=new Set,this._debugLevel=b.Critical,this._pulseTaskHandle=null,this._session=null,this._debugFlags.add(m.Lifetime),this._debugFlags.add(m.Jobs),this._debugFlags.add(m.Renderables)}_debugLog(e,t,i,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=s?`[js] ${i}`:`${i}`;t===b.Critical||t===b.Error?r.getLogger(this).error(e):t===b.Warning&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>b.Warning&&(r.getLogger(this).level="info"),this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([n((()=>this.view.state?.contentCamera),(()=>this._updateWasmCamera()))]),this._pulseTaskHandle=a({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach((e=>{e.abortController.abort()})),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._worker;e&&e.destroyWasm().then((()=>{this._worker?.destroy(),this._worker=null})),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}add3DTilesLayerView(e){return this._lyr3DMain?this._add3DTilesLayerView(e):(this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),d)}remove3DTilesLayerView(e){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() called when WASM wasn't loaded!"),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setEnabled() called when WASM wasn't loaded!");const i=this._layers.get(e.wasmLayerId);i&&(this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0)}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.setLayerOffset() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.getAttributionText() called when WASM wasn't loaded!"),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(m.Lifetime,b.Error,"Lyr3DWasmPerSceneView.onRenderableEvicted() called when WASM wasn't loaded!");this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0)}initializeWasm(){return this._lyr3DMain?Promise.resolve():(this._debugLog(m.Lifetime,b.Info,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=y().then((e=>{this._lyr3DMain=e,this._lyr3DMainPromise=null;const t=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),i=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),r=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),s=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),n=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),a="global"===this.view.viewingMode,o=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1,l=this.view.heightModelInfo?.heightModel,d=!l||"gravity-related-height"===l;return this._lyr3DMain.initialize_lyr3d_wasm(n,t,i,r,s,a,d,o,this._debugLevel)?(this._worker=new _(g(this.view.resourceController)),this._worker.promise?this._worker.promise:void 0):(this._lyr3DMain=null,void this._debugLog(m.Lifetime,b.Critical,"Lyr3d Main WASM failed to initialize",!1))})).catch((e=>{this._debugLog(m.Lifetime,b.Critical,`Lyr3d WASM failed to download error = ${e}`,!1)}))),this._lyr3DMainPromise)}_pulseTask(){if(this._lyr3DMain){let e=0;this._layers.forEach((t=>{e+=t.layerView.usedMemory})),e/=1048576;const t=this.view.resourceController.memoryController,i=t.usedMemory*t.maxMemory-e,r=t.maxMemory-i+t.additionalCacheMemory;this._lyr3DMain.frame_pulse(r,e,i,t.maxMemory)}}_incrementJobCount(e){e.outstandingJobCount+=1,1===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_decrementJobCount(e){e.outstandingJobCount-=1,0===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){e.outstandingRenderableCount+=1,e.outstandingJobCount<1&&1===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){e.outstandingRenderableCount-=1,e.outstandingJobCount<1&&0===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(m.Jobs,b.Error,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){const e=t.data.byteLength,r=this._lyr3DMain._malloc(e);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,e).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,e),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i){const r=[];for(const s of e){const e=new URL(s),n=e.searchParams.get("session");n?this._session=n:this._session&&e.searchParams.append("session",this._session),r.push(t(e.toString(),i).then((e=>e.data)))}return r}_onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,r={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey}},n={inputs:[],jobDescJson:e.desc,isMissingResourceCase:!1},a=this._getRequestPromises(e.urls,r);Promise.all(a).then((e=>(n.inputs=e,this._worker.invoke(n,i)))).then((e=>e)).catch((t=>(s(t)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error ${t}.`),{status:h.Failed,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}))).then((a=>{if(a.status===h.Failed)this._onJobFailed(t,a,e);else if(a.status===h.Succeeded)this._onJobSucceeded(t,a,e);else if(a.status===h.MissingInputs){const o=this._getRequestPromises(a.missingInputUrls,r);Promise.all(o).then((e=>{n.jobDescJson=a.jobDescJson,a.originalInputs?n.inputs=a.originalInputs:n.inputs=[],n.isMissingResourceCase=!0;for(const t of e)n.inputs.push(t);return this._worker.invoke(n,i)})).then((i=>{i.status===h.Failed?this._onJobFailed(t,i,e):i.status===h.Succeeded&&this._onJobSucceeded(t,i,e)})).catch((i=>{this._decrementJobCount(t),s(i)?this._debugLog(m.Jobs,b.Warning,`job ${e.jobId} was cancelled.`):this._debugLog(m.Jobs,b.Error,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)}))}}))}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),t=e.meshData;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then((t=>{this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)})).catch((t=>{s(t)||this._debugLog(m.Renderables,b.Error,`createRenderable failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)})))}_freeRenderables(e,t,i){if(i<1)return;const r=this._layers.get(e);if(!r)return;const s=r.layerView,n=[],a=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)n.push(a[o]);for(let o=0;o<i;++o)s.freeRenderable(n[o])}_setRenderableVisibility(e,t,i,r){if(r<1)return;const s=this._layers.get(e);if(!s)return;const n=s.layerView,a=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,r),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,r);for(let h=0;h<r;++h)a.push(l[h]),o.push(1===d[h]);n.setRenderableVisibility(a,o,r)}_onWasmError(e,t,i,r){this._lyr3DMain&&this._debugLog(i,r,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_add3DTilesLayerView(e){const t=e.layer;if(!t.url)return u;const i=this._lyr3DMain.get_next_layer_id(),r=new AbortController;this._layers.set(i,{layerView:e,abortController:r,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey});const s=t.elevationInfo?.offset??0,n=t.elevationInfo?.unit?c(t.elevationInfo?.unit):1;return this._lyr3DMain.add_layer(t.url,i,s*n)?(this._updateWasmCamera(),i):(this._layers.delete(i),u)}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:r,near:s,far:n,fovY:a}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:r,near:s,far:n,fov:a,aspectRatio:l,viewport:o})}};e([o({constructOnly:!0})],f.prototype,"view",void 0),f=e([l("esri.layers.Lyr3DWasmPerSceneView")],f);const w=f;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import a from"../../geometry/Extent.js";import d from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as c,writeUrlWithLayerId as y}from"../support/arcgisLayerUrl.js";import{elevationInfo as m,maxScale as h,minScale as v,url as f}from"../support/commonProperties.js";import g from"../support/EditFieldsInfo.js";import{FeatureIndex as I}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as S,isLayerCacheStale as F,readGlobalIdField as b,readObjectIdField as j,readVersion as x}from"../support/featureLayerUtils.js";import E from"../support/GeometryFieldsInfo.js";import O from"../support/LayerFloorInfo.js";import U from"../support/Relationship.js";import{getFeatureLayerCapabilities as w}from"../support/serviceCapabilitiesUtils.js";import T from"../support/Subtype.js";import{timeZoneProperty as M}from"../../time/timeZoneUtils.js";const D=D=>{let R=class extends D{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(I)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:r,editing:i}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(r.supportsEditing&&!(i.supportsUpdateByOthers&&i.supportsUpdateByAnonymous&&i.supportsDeleteByOthers&&i.supportsDeleteByAnonymous))return"load"}return this.userHasUpdateItemPrivileges?F(this)?"load":this.hasUpdateItemRestrictions?e.operations.supportsQuery?"editing":"load":null:this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions?"editing":null}readCapabilitiesFromService(e,t){return w(t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=r(e),{operations:i,editing:o}=t;return this.sourceJSON?.isMultiServicesView?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=o.supportsGeometryUpdate=!0),t)}readGlobalIdFieldFromService(e,t){return b(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||this.sourceJSON?.isMultiServicesView)return!1;const{operations:t,editing:r}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&r.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:r}=e;return this.sourceJSON?.isMultiServicesView?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&r.supportsDeleteByOthers&&r.supportsGeometryUpdate&&r.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return j(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){const t=c({layer:this,url:e,nonStandardUrlAllowed:!0,logger:i.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){y(this,e,null,t,i)}readVersion(e,t){return x(t)}};return e([o({readOnly:!0})],R.prototype,"authenticationTriggerEvent",null),e([o({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],R.prototype,"copyright",void 0),e([o({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],R.prototype,"capabilities",void 0),e([s("service","capabilities")],R.prototype,"readCapabilitiesFromService",null),e([o(M("dateFieldsTimeReference"))],R.prototype,"dateFieldsTimeZone",void 0),e([o({type:Boolean})],R.prototype,"datesInUnknownTimezone",void 0),e([o({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],R.prototype,"definitionExpression",void 0),e([o({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],R.prototype,"displayField",void 0),e([o({readOnly:!0,type:g})],R.prototype,"editFieldsInfo",void 0),e([o({readOnly:!0})],R.prototype,"editingInfo",void 0),e([s("editingInfo")],R.prototype,"readEditingInfo",null),e([o({readOnly:!0})],R.prototype,"effectiveCapabilities",null),e([o((()=>{const e=r(m),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],R.prototype,"elevationInfo",void 0),e([o({type:O,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:l}}}}})],R.prototype,"floorInfo",void 0),e([o({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],R.prototype,"fullExtent",void 0),e([o()],R.prototype,"gdbVersion",void 0),e([o({readOnly:!0,type:E,json:{read:{source:"geometryProperties"}}})],R.prototype,"geometryFieldsInfo",void 0),e([o({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:S.read}}}})],R.prototype,"geometryType",void 0),e([o({type:String})],R.prototype,"globalIdField",void 0),e([s("service","globalIdField",["globalIdField","fields"])],R.prototype,"readGlobalIdFieldFromService",null),e([o({readOnly:!0})],R.prototype,"hasFullEditingRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],R.prototype,"hasM",void 0),e([o({readOnly:!0})],R.prototype,"hasUpdateItemRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],R.prototype,"hasZ",void 0),e([o({readOnly:!0,type:d})],R.prototype,"heightModelInfo",void 0),e([o({type:Date})],R.prototype,"historicMoment",void 0),e([o({type:t.ofType(I),readOnly:!0})],R.prototype,"indexes",void 0),e([o({readOnly:!0})],R.prototype,"isTable",void 0),e([s("service","isTable",["type"])],R.prototype,"readIsTableFromService",null),e([o({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],R.prototype,"layerId",void 0),e([o(h)],R.prototype,"maxScale",void 0),e([s("service","maxScale",["maxScale","effectiveMaxScale"])],R.prototype,"readMaxScale",null),e([o(v)],R.prototype,"minScale",void 0),e([s("service","minScale",["minScale","effectiveMinScale"])],R.prototype,"readMinScale",null),e([o({type:String})],R.prototype,"objectIdField",void 0),e([s("service","objectIdField",["objectIdField","fields"])],R.prototype,"readObjectIdFieldFromService",null),e([o(M("preferredTimeReference"))],R.prototype,"preferredTimeZone",void 0),e([o({type:[U],readOnly:!0})],R.prototype,"relationships",void 0),e([o({type:Boolean})],R.prototype,"returnM",void 0),e([o({type:Boolean})],R.prototype,"returnZ",void 0),e([o({readOnly:!0,json:{write:!1}})],R.prototype,"serverGens",void 0),e([o({readOnly:!0})],R.prototype,"serviceDefinitionExpression",void 0),e([s("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],R.prototype,"readServiceDefinitionExpression",null),e([o({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],R.prototype,"serviceItemId",void 0),e([o()],R.prototype,"sourceJSON",void 0),e([o({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],R.prototype,"spatialReference",void 0),e([o({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],R.prototype,"subtypeField",void 0),e([o({type:[T],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],R.prototype,"subtypes",void 0),e([o({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],R.prototype,"trackIdField",void 0),e([o(f)],R.prototype,"url",null),e([n("url")],R.prototype,"writeUrl",null),e([o({json:{origins:{service:{read:!0}},read:!1}})],R.prototype,"version",void 0),e([s("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],R.prototype,"readVersion",null),R=e([p("esri.layers.mixins.FeatureLayerBase")],R),R};export{D as FeatureLayerBase};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import a from"../../geometry/Extent.js";import d from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as c,writeUrlWithLayerId as y}from"../support/arcgisLayerUrl.js";import{elevationInfo as m,maxScale as h,minScale as f,url as v}from"../support/commonProperties.js";import g from"../support/EditFieldsInfo.js";import{FeatureIndex as I}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as F,isLayerCacheStale as S,readGlobalIdField as b,readObjectIdField as j,readVersion as x}from"../support/featureLayerUtils.js";import E from"../support/GeometryFieldsInfo.js";import O from"../support/LayerFloorInfo.js";import U from"../support/Relationship.js";import{getFeatureLayerCapabilities as w}from"../support/serviceCapabilitiesUtils.js";import T from"../support/Subtype.js";import{timeZoneProperty as M}from"../../time/timeZoneUtils.js";const D=D=>{let R=class extends D{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(I)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:r,editing:i}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(r.supportsEditing&&!(i.supportsUpdateByOthers&&i.supportsUpdateByAnonymous&&i.supportsDeleteByOthers&&i.supportsDeleteByAnonymous))return"load"}if(this.userHasUpdateItemPrivileges){if(S(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return w(t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=r(e),{operations:i,editing:o}=t;return this.sourceJSON?.isMultiServicesView?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=o.supportsGeometryUpdate=!0),t)}readGlobalIdFieldFromService(e,t){return b(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||this.sourceJSON?.isMultiServicesView)return!1;const{operations:t,editing:r}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&r.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:r}=e;return this.sourceJSON?.isMultiServicesView?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&r.supportsDeleteByOthers&&r.supportsGeometryUpdate&&r.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return j(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){const t=c({layer:this,url:e,nonStandardUrlAllowed:!0,logger:i.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){y(this,e,null,t,i)}readVersion(e,t){return x(t)}};return e([o({readOnly:!0})],R.prototype,"authenticationTriggerEvent",null),e([o({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],R.prototype,"copyright",void 0),e([o({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],R.prototype,"capabilities",void 0),e([s("service","capabilities")],R.prototype,"readCapabilitiesFromService",null),e([o(M("dateFieldsTimeReference"))],R.prototype,"dateFieldsTimeZone",void 0),e([o({type:Boolean})],R.prototype,"datesInUnknownTimezone",void 0),e([o({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],R.prototype,"definitionExpression",void 0),e([o({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],R.prototype,"displayField",void 0),e([o({readOnly:!0,type:g})],R.prototype,"editFieldsInfo",void 0),e([o({readOnly:!0})],R.prototype,"editingInfo",void 0),e([s("editingInfo")],R.prototype,"readEditingInfo",null),e([o({readOnly:!0})],R.prototype,"effectiveCapabilities",null),e([o((()=>{const e=r(m),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],R.prototype,"elevationInfo",void 0),e([o({type:O,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:l}}}}})],R.prototype,"floorInfo",void 0),e([o({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],R.prototype,"fullExtent",void 0),e([o()],R.prototype,"gdbVersion",void 0),e([o({readOnly:!0,type:E,json:{read:{source:"geometryProperties"}}})],R.prototype,"geometryFieldsInfo",void 0),e([o({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:F.read}}}})],R.prototype,"geometryType",void 0),e([o({type:String})],R.prototype,"globalIdField",void 0),e([s("service","globalIdField",["globalIdField","fields"])],R.prototype,"readGlobalIdFieldFromService",null),e([o({readOnly:!0})],R.prototype,"hasFullEditingRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],R.prototype,"hasM",void 0),e([o({readOnly:!0})],R.prototype,"hasUpdateItemRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],R.prototype,"hasZ",void 0),e([o({readOnly:!0,type:d})],R.prototype,"heightModelInfo",void 0),e([o({type:Date})],R.prototype,"historicMoment",void 0),e([o({type:t.ofType(I),readOnly:!0})],R.prototype,"indexes",void 0),e([o({readOnly:!0})],R.prototype,"isTable",void 0),e([s("service","isTable",["type"])],R.prototype,"readIsTableFromService",null),e([o({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],R.prototype,"layerId",void 0),e([o(h)],R.prototype,"maxScale",void 0),e([s("service","maxScale",["maxScale","effectiveMaxScale"])],R.prototype,"readMaxScale",null),e([o(f)],R.prototype,"minScale",void 0),e([s("service","minScale",["minScale","effectiveMinScale"])],R.prototype,"readMinScale",null),e([o({type:String})],R.prototype,"objectIdField",void 0),e([s("service","objectIdField",["objectIdField","fields"])],R.prototype,"readObjectIdFieldFromService",null),e([o(M("preferredTimeReference"))],R.prototype,"preferredTimeZone",void 0),e([o({type:[U],readOnly:!0})],R.prototype,"relationships",void 0),e([o({type:Boolean})],R.prototype,"returnM",void 0),e([o({type:Boolean})],R.prototype,"returnZ",void 0),e([o({readOnly:!0,json:{write:!1}})],R.prototype,"serverGens",void 0),e([o({readOnly:!0})],R.prototype,"serviceDefinitionExpression",void 0),e([s("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],R.prototype,"readServiceDefinitionExpression",null),e([o({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],R.prototype,"serviceItemId",void 0),e([o()],R.prototype,"sourceJSON",void 0),e([o({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],R.prototype,"spatialReference",void 0),e([o({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],R.prototype,"subtypeField",void 0),e([o({type:[T],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],R.prototype,"subtypes",void 0),e([o({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],R.prototype,"trackIdField",void 0),e([o(v)],R.prototype,"url",null),e([n("url")],R.prototype,"writeUrl",null),e([o({json:{origins:{service:{read:!0}},read:!1}})],R.prototype,"version",void 0),e([s("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],R.prototype,"readVersion",null),R=e([p("esri.layers.mixins.FeatureLayerBase")],R),R};export{D as FeatureLayerBase};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../geometry.js";import{deg2rad as e}from"../../../core/mathUtils.js";import{zeros as t,create as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{z as r,g as i}from"../../../chunks/vec32.js";import n from"../../../geometry/Point.js";import{initializeProjection as s,project as o}from"../../../geometry/projection.js";import{fromPoints as c,fromValues as f}from"../../../geometry/support/ray.js";import{
|
|
5
|
+
import"../../../geometry.js";import{deg2rad as e}from"../../../core/mathUtils.js";import{zeros as t,create as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{z as r,g as i}from"../../../chunks/vec32.js";import n from"../../../geometry/Point.js";import{initializeProjection as s,project as o}from"../../../geometry/projection.js";import{fromPoints as c,fromValues as f}from"../../../geometry/support/ray.js";import{k as y,i as l}from"../../../chunks/sphere.js";import{geographicToWebMercator as x,webMercatorToGeographic as p}from"../../../geometry/support/webMercatorUtils.js";import{createCoveragePolygon as z}from"../core/coverageUtils.js";import m from"../core/ExposurePoint.js";import{transformPoints as u,updateElevation as h}from"./groundToImageUtils.js";import{getWebMercatorScalingFactor as w,convertPixelToHeadingPitch as R,convertHeadingPitchToSphereVertex as g,scaleAndAddWithFactor as d,ltpToGeographic as b,computeHFOVAndVFOV as P,projectiveTransform2 as M,scaleWithFactor as j,calculateRotationMatrix as O,transformMat3 as v,projectiveTransform as H,getPlaneLineIntersectionPoint as S}from"./utils.js";import{defaultImageSphereCenter as E}from"../../../widgets/PanoramicViewer/constants.js";import{isNumber as V}from"../../../widgets/support/dataUtils.js";import k from"../../../geometry/SpatialReference.js";import F from"../../../geometry/Polygon.js";function U(e,t){if(!e)return Promise.resolve([]);const a=t.feature;let r=a.attributes;return r instanceof m||(r=m.fromJSON(a),r&&(a.attributes=r)),D(e,t)}function D(e,t){const{attributes:a}=t.feature;if(a.isSpherical||360===a.horizontalFieldOfView){const{location:r,cameraOrientation:i,farDistance:n,cameraHeading:s,cameraHeight:o}=a;return G(e,r,n,[t.imageProperties.width,t.imageProperties.height],s,o,i)}return W(e,t)}async function G(e,t,r,i,s,o,p){let z=new n(t);const m=w(z);z.spatialReference.isGeographic&&z.spatialReference.isWGS84&&4!==p?.type&&(z=x(z));const u=new Array,[h,b,P]=z.toArray(),M=y([h,b,P??0],r/m),j=E.toArray();for(const y of e){let e,t;if(V(y.heading)&&V(y.pitch))e=y.heading,t=y.pitch;else{const a=R({x:y.x,y:y.y},i[0],i[1]);e=a.heading,t=a.pitch}e=(e+s)%360;const r=c([j[0],j[1],j[2]],g(e,t)),x=f([h,b,P??0],r.direction),p=a();l(M,x,p);const w=(z.z??0)-o;if(p[2]<w){const e=Math.abs((z.z-w)/-r.direction[2])*m;d([z.x,z.y,z.z],r.direction,e,m,p)}else p[2]=w;u.push(new n(p,z.spatialReference))}return u}async function W(e,t){const{feature:a}=t,{attributes:r}=a;let i=new n(r.location);if(4===r.cameraOrientation?.type){const e=r.cameraOrientation;i=new n(b(i,[e.latitude,e.longitude,e.ellipsoidRadius,e.squaredEccentricity]))}let c=!1;i.spatialReference.isWGS84&&(c=!0,i=x(i));const f=i.spatialReference.isWebMercator?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*i.y/6378137))):1,y=A(t,i,f),l=4===r.cameraOrientation?.type?y.map((e=>p(new n(e)))):y,z=await u(l,t,!0),m=await Promise.all(z);m.forEach((e=>{e.z=1}));const w=P(r.horizontalFieldOfView,r.verticalFieldOfView,r.cameraRoll??0).vfov;return Promise.all(e.map((async e=>{e.z=1;let a,y=M(e,m,l);if(a=4===r.cameraOrientation?.type?(await u([p(new n({...y,spatialReference:i.spatialReference}))],t,!0))[0]:(await u([new n({...y,spatialReference:i.spatialReference})],t,!0))[0],!a)return null;let x,z=Math.abs(e.x-a.x)+Math.abs(e.y-a.y);if(z>1){const r=await N(e,a,m,l,i,y,t);y=r.point,z=r.error}if(r.elevationSource){await s(i.spatialReference,t.footprintExtent.spatialReference,null,t.options);let a=await I(t);if(a?.extent){let s=Z(a,i,y);if(!s)return null;const l={x:s.x,y:s.y,z:s.z,hasZ:!0,spatialReference:i.spatialReference},z=new n(l);if(s){const l=o(z,t.footprintExtent.spatialReference),m=h([l],t,!1);let R;R=m instanceof Promise?await m:m,z.z=s.z=R[0].z;const g=await u([4===r.cameraOrientation?.type?p(z):z],t);if(!g[0])return null;let d=Math.abs(e.x-g[0].x)+Math.abs(e.y-g[0].y);if(x=s.z,d>1){let l=0;const z=async m=>{if(d>1){const R=m.width/10,g=m.height/10;if(!m||R<1||g<1)return y=q(y,i,f,x,r.cameraPitch,w,c),y;const b=[{x:s.x-R,y:s.y-g,spatialReference:i.spatialReference},{x:s.x+R,y:s.y-g,spatialReference:i.spatialReference},{x:s.x+R,y:s.y+g,spatialReference:i.spatialReference},{x:s.x-R,y:s.y+g,spatialReference:i.spatialReference}].map((e=>new n(e))),P=await h(b,t,!1);if(a=new F({rings:[[[P[0].x,P[0].y,P[0].z],[P[1].x,P[1].y,P[1].z],[P[2].x,P[2].y,P[2].z],[P[3].x,P[3].y,P[3].z],[P[0].x,P[0].y,P[0].z]]],spatialReference:i.spatialReference}),s=Z(a,i,y),s){const m=o(new n({x:s.x,y:s.y,z:s.z,spatialReference:i.spatialReference}),t.footprintExtent.spatialReference),h=await u([4===r.cameraOrientation?.type?p(m):m],t);if(h[0])return d=Math.abs(e.x-h[0].x)+Math.abs(e.y-h[0].y),x=s.z,d<=1||8===l?q(y,i,f,x,r.cameraPitch,w,c):(l+=1,z(a.extent))}return q(y,i,f,i.z-r.cameraHeight,r.cameraPitch,w,c)}return q(y,i,f,i.z-r.cameraHeight,r.cameraPitch,w,c)};return z(a.extent)}return q(y,i,f,i.z-r.cameraHeight,r.cameraPitch,w,c)}return q(y,i,f,i.z-r.cameraHeight,r.cameraPitch,w,c)}}return q(y,i,f,i.z-r.cameraHeight,r.cameraPitch,w,c)})))}function q(e,a,i,s,o,c,f){const y=Math.sqrt((e.z-a.z)**2+(Math.sqrt((e.x-a.x)**2+(e.y-a.y)**2)/i)**2)*i,l=j(r(t(),[e.x,e.y,e.z],[a.x,a.y,a.z]),1/y,1/i);if(e.z<s||o+c/2<90){const t=Math.abs((a.z-s)/-l[2])*i,r=d([a.x,a.y,a.z],l,t,i);e={x:r[0],y:r[1],z:r[2]}}else e.z=s;return e.spatialReference=a.spatialReference,e=new n(e),f&&(e=p(e)),e}function A(a,s,o){const{feature:c}=a,{attributes:f}=c,y=2*Math.tan(e(f.verticalFieldOfView)/2)*f.farDistance*o,l=2*Math.tan(e(f.horizontalFieldOfView)/2)*f.farDistance*o,x=O("HPR",[f.cameraHeading,f.cameraPitch,f.cameraRoll??0]),p=v([0,0,-1],x),z=d([s.x,s.y,s.z],p,f.farDistance*o,o),m=v([0,1,0],x),u=v([1,0,0],x),h=j(m,y/2,o),w=j(u,l/2,o),R=r(t(),h,w),g=i(t(),h,w);return[i(t(),z,R),i(t(),z,g),r(t(),z,R),r(t(),z,g)].map((e=>{const[t,a,r]=e;return new n({x:t,y:a,z:r,spatialReference:s.spatialReference})}))}function I(e){const{feature:t}=e,{polygon:a}=z(e.feature);if(!a.extent)return Promise.resolve(null);const r=J(a.extent),i=t.attributes.location.spatialReference.isWGS84?new k({wkid:102100}):t.attributes.location.spatialReference;return h(r,e,!1).then((e=>{const t=e.map((e=>o(e,i)));return new F({hasZ:!0,rings:[t.map((e=>[e.x,e.y,e.z]))],spatialReference:i})}))}function J(e){const{xmin:t,xmax:a,ymin:r,ymax:i,spatialReference:s}=e;return[new n({x:t,y:i,spatialReference:s}),new n({x:a,y:i,spatialReference:s}),new n({x:a,y:r,spatialReference:s}),new n({x:t,y:r,spatialReference:s})]}async function N(e,t,a,r,i,s,o){const{feature:{attributes:c}}=o;let f=Math.abs(e.x-t.x)+Math.abs(e.y-t.y);if(f>1)for(let y=0;y<9;y++)if(f>1){let t,l={x:e.x-f,y:e.y-f,z:1},x={x:e.x+f,y:e.y-f,z:1},z={x:e.x+f,y:e.y+f,z:1},m={x:e.x-f,y:e.y+f,z:1};l=H(l,a[0],a[1],a[2],a[3],{x:r[0].x,y:r[0].y,z:r[0].z},{x:r[1].x,y:r[1].y,z:r[1].z},{x:r[2].x,y:r[2].y,z:r[2].z},{x:r[3].x,y:r[3].y,z:r[3].z}),x=H(x,a[0],a[1],a[2],a[3],{x:r[0].x,y:r[0].y,z:r[0].z},{x:r[1].x,y:r[1].y,z:r[1].z},{x:r[2].x,y:r[2].y,z:r[2].z},{x:r[3].x,y:r[3].y,z:r[3].z}),z=H(z,a[0],a[1],a[2],a[3],{x:r[0].x,y:r[0].y,z:r[0].z},{x:r[1].x,y:r[1].y,z:r[1].z},{x:r[2].x,y:r[2].y,z:r[2].z},{x:r[3].x,y:r[3].y,z:r[3].z}),m=H(m,a[0],a[1],a[2],a[3],{x:r[0].x,y:r[0].y,z:r[0].z},{x:r[1].x,y:r[1].y,z:r[1].z},{x:r[2].x,y:r[2].y,z:r[2].z},{x:r[3].x,y:r[3].y,z:r[3].z}),l.spatialReference=i.spatialReference,x.spatialReference=i.spatialReference,z.spatialReference=i.spatialReference,m.spatialReference=i.spatialReference,t=4===c.cameraOrientation?.type?await u([p(new n(l)),p(new n(x)),p(new n(z)),p(new n(m))],o,!0):await u([new n(l),new n(x),new n(z),new n(m)],o,!0);const h=await Promise.all(t);h.forEach((e=>{e.z=0}));const w=H(e,h[0],h[1],h[2],h[3],l,x,z,m);let R;if(R=4===c.cameraOrientation?.type?(await u([p(new n({x:w.x,y:w.y,z:w.z,spatialReference:i.spatialReference}))],o,!0))[0]:(await u([new n({x:w.x,y:w.y,z:w.z,spatialReference:i.spatialReference})],o,!0))[0],f=Math.abs(e.x-R.x)+Math.abs(e.y-R.y),f<=1||8===y){s=w;break}}return{error:f,point:s}}function Z(e,t,a){const r={x:e.rings[0][0][0],y:e.rings[0][0][1],z:e.rings[0][0][2]},i={x:e.rings[0][1][0],y:e.rings[0][1][1],z:e.rings[0][1][2]},n={x:e.rings[0][1][0],y:e.rings[0][1][1],z:e.rings[0][1][2]},s={x:e.rings[0][2][0],y:e.rings[0][2][1],z:e.rings[0][2][2]},o=(s.z-n.z)*(i.y-r.y)-(s.y-n.y)*(i.z-r.z),c=-((s.z-n.z)*(i.x-r.x)-(i.z-r.z)*(s.x-n.x)),f=(s.y-n.y)*(i.x-r.x)-(i.y-r.y)*(s.x-n.x),y=-(o*r.x+c*r.y+f*r.z);return S(t.toJSON(),a,o,c,f,y)}export{U as transformPoints};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import r from"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import i from"../../renderers/Renderer.js";import o from"../../renderers/SimpleRenderer.js";import n from"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import s from"../../core/Logger.js";import{ClonableMixin as l}from"../../core/Clonable.js";import"../../core/has.js";import a from"../../core/Error.js";import{IdentifiableMixin as p}from"../../core/Identifiable.js";import{clone as d}from"../../core/lang.js";import u from"../../core/Loadable.js";import{MultiOriginJSONMixin as y}from"../../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../../core/object.js";import{sqlAnd as m}from"../../core/sql.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import{reader as b}from"../../core/accessorSupport/decorators/reader.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{writer as g}from"../../core/accessorSupport/decorators/writer.js";import{createTypeReader as v}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import j from"../../form/FormTemplate.js";import{labelsVisible as w,legendEnabled as O,minScale as F,maxScale as I,popupEnabled as S}from"./commonProperties.js";import{createQuery as T}from"./featureLayerUtils.js";import E from"./FeatureTemplate.js";import{defineFieldProperties as C}from"./fieldProperties.js";import{fixRendererFields as A}from"./fieldUtils.js";import x from"./LabelClass.js";import{reader as R}from"./labelingInfo.js";import P from"../../rest/support/Query.js";import{createPopupTemplate as D}from"../../support/popupUtils.js";import{defaultPolygonSymbol2D as L,defaultPolylineSymbol2D as q,defaultPointSymbol2D as V}from"../../symbols/support/defaults.js";const G={key:"type",base:i,errorContext:"renderer",typeMap:{simple:o,"unique-value":n,"class-breaks":r}},N=C(),U=v({types:G});let $=0;function k(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function M(e){return new o({symbol:_(e)})}function _(e){switch(e){case"point":case"multipoint":return V.clone();case"polyline":return q.clone();case"polygon":case"multipatch":return L.clone();default:return null}}function B(e,t){return!!t&&("unique-value"===e?.type&&"string"==typeof e.field&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression)}function H(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function Q(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},o=H(e,t);if(null!=o){const{defaultValues:e}=o;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new E({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}const z="esri.layers.support.SubtypeSublayer";let J=class extends(y(l(p(u)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${$++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:i,parent:o}=this;let n;if(i){n=[];let e=0;i.forEach((({name:t,alias:r,editable:i,visible:s})=>{if(!s)return;const l=o?.fields?.find((e=>e.name===t));if(!l)return;const a={name:t};let p=!1;r!==l.alias&&(a.alias=r,p=!0),i!==l.editable&&(a.editable=i,p=!0),n.push(a),p&&e++})),0===e&&n.length===i.length&&(n=null)}else n=d(e);n?.length&&c(r,n,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:o,subtypeField:n}=e,s=o?.find((e=>e.code===r)),l=s?.defaultValues,a=s?.domains,p=[];for(const d of i){const e=d.clone(),{name:i}=e,o=t?.find((e=>e.name===i));if(e.visible=!t||!!o,o){const{alias:t,editable:r}=o;t&&(e.alias=t),!1===r&&(e.editable=!1)}const s=l?.[i]??null;e.defaultValue=i===n?r:s;const u=a?.[i]??null;e.domain=i===n?null:u?"inherited"===u.type?e.domain:u.clone():null,p.push(e)}return p}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||s.getLogger(z).error(W("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){A(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?M(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,n=U(i,t,r);let s;const{subtypeCode:l}=this;if(null!=l&&B(n,t.subtypeField)){const e=n.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(l)));e&&(s=new o({symbol:e.symbol}))}else"simple"!==n?.type||n.visualVariables?.length||(s=n);return s}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(!i)return;const o=i.visualVariables?.some((e=>"rotationInfo"!==e.type));return o?void 0:U(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[Q(this.subtypeCode,t)]}readTitleFromService(e,t){const r=H(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw W("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new a("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw W("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new a("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw W("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new a("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw W("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:o}=this;if(r){const{displayField:e,editFieldsInfo:n,objectIdField:s}=r;t={displayField:e,editFieldsInfo:n,fields:i,objectIdField:s,title:o}}return D(t,e)}createQuery(){if(!this.parent)throw W("createQuery");const e=T(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=m(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw W("queryAttachments");const i=e.clone();return i.where=K(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw W("queryFeatures");const i=P.from(e)??r.createQuery();return null!=e&&(i.where=K(i.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(i,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};e([f({readOnly:!0,json:{read:!1}})],J.prototype,"capabilities",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"effectiveCapabilities",null),e([f({json:{write:{ignoreOrigin:!0}}})],J.prototype,"charts",void 0),e([f({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],J.prototype,"editingEnabled",void 0),e([f({type:Boolean,readOnly:!0})],J.prototype,"effectiveEditingEnabled",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"elevationInfo",null),e([f({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],J.prototype,"fieldOverrides",void 0),e([g("fieldOverrides")],J.prototype,"writeFieldOverrides",null),e([f({...N.fields,readOnly:!0,json:{read:!1}})],J.prototype,"fields",null),e([f(N.fieldsIndex)],J.prototype,"fieldsIndex",void 0),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"floorInfo",null),e([f({type:j,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],J.prototype,"formTemplate",void 0),e([f({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],J.prototype,"id",void 0),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"geometryType",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"type",void 0),e([f(k(d(w)))],J.prototype,"labelsVisible",void 0),e([f({type:[x],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:R},write:{ignoreOrigin:!0}}})],J.prototype,"labelingInfo",void 0),e([f({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],J.prototype,"layerType",void 0),e([f(k(d(O)))],J.prototype,"legendEnabled",void 0),e([f({type:["show","hide"]})],J.prototype,"listMode",void 0),e([f((()=>{const e=d(F);return e.json.origins.service.read=!1,k(e)})())],J.prototype,"minScale",void 0),e([f((()=>{const e=d(I);return e.json.origins.service.read=!1,k(e)})())],J.prototype,"maxScale",void 0),e([f({readOnly:!0})],J.prototype,"effectiveScaleRange",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"objectIdField",null),e([f({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],J.prototype,"opacity",void 0),e([f({clonable:!1})],J.prototype,"parent",void 0),e([f(k(d(S)))],J.prototype,"popupEnabled",void 0),e([f({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],J.prototype,"popupTemplate",void 0),e([f({readOnly:!0})],J.prototype,"defaultPopupTemplate",null),e([f({types:G,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],J.prototype,"renderer",null),e([b("service","renderer",["drawingInfo.renderer","subtypeField","type"])],J.prototype,"readRendererFromService",null),e([b("renderer",["layerDefinition.drawingInfo.renderer"])],J.prototype,"readRenderer",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"spatialReference",null),e([f({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],J.prototype,"subtypeCode",void 0),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"subtypeField",null),e([f({type:[E],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],J.prototype,"templates",void 0),e([b("service","templates",["geometryType","subtypeField","subtypes","type"])],J.prototype,"readTemplatesFromService",null),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),e([b("service","title",["subtypes"])],J.prototype,"readTitleFromService",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"url",null),e([f({readOnly:!0})],J.prototype,"userHasUpdateItemPrivileges",null),e([f({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],J.prototype,"visible",void 0),J=e([h(z)],J);const K=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),o=`${t}=${r}`,n=e??"";return i.test(n)?n.replace(i,o):m(o,n)},W=e=>new a(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),X=J;export{X as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import r from"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/PieChartRenderer.js";import i from"../../renderers/Renderer.js";import o from"../../renderers/SimpleRenderer.js";import n from"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import s from"../../core/Logger.js";import{ClonableMixin as l}from"../../core/Clonable.js";import"../../core/has.js";import a from"../../core/Error.js";import{IdentifiableMixin as p}from"../../core/Identifiable.js";import{clone as d}from"../../core/lang.js";import u from"../../core/Loadable.js";import{MultiOriginJSONMixin as y}from"../../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../../core/object.js";import{sqlAnd as m}from"../../core/sql.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import{reader as h}from"../../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../../core/accessorSupport/decorators/subclass.js";import{writer as g}from"../../core/accessorSupport/decorators/writer.js";import{createTypeReader as v}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import j from"../../form/FormTemplate.js";import{labelsVisible as w,legendEnabled as O,minScale as F,maxScale as I,popupEnabled as S}from"./commonProperties.js";import{createQuery as T}from"./featureLayerUtils.js";import E from"./FeatureTemplate.js";import{defineFieldProperties as C}from"./fieldProperties.js";import{fixRendererFields as A}from"./fieldUtils.js";import x from"./LabelClass.js";import{reader as R}from"./labelingInfo.js";import P from"../../rest/support/Query.js";import{createPopupTemplate as D}from"../../support/popupUtils.js";import{defaultPolygonSymbol2D as L,defaultPolylineSymbol2D as q,defaultPointSymbol2D as V}from"../../symbols/support/defaults.js";const G={key:"type",base:i,errorContext:"renderer",typeMap:{simple:o,"unique-value":n,"class-breaks":r}},N=C(),U=v({types:G});let $=0;function k(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function M(e){return new o({symbol:_(e)})}function _(e){switch(e){case"point":case"multipoint":return V.clone();case"polyline":return q.clone();case"polygon":case"multipatch":return L.clone();default:return null}}function B(e,t){return!!t&&("unique-value"===e?.type&&"string"==typeof e.field&&e.field.toLowerCase()===t.toLowerCase()&&!e.field2&&!e.field3&&!e.valueExpression)}function H(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function Q(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},o=H(e,t);if(null!=o){const{defaultValues:e}=o;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new E({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}const z="esri.layers.support.SubtypeSublayer";let J=class extends(y(l(p(u)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${$++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return A(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:i,parent:o}=this;let n;if(i){n=[];let e=0;i.forEach((({name:t,alias:r,editable:i,visible:s})=>{if(!s)return;const l=o?.fields?.find((e=>e.name===t));if(!l)return;const a={name:t};let p=!1;r!==l.alias&&(a.alias=r,p=!0),i!==l.editable&&(a.editable=i,p=!0),n.push(a),p&&e++})),0===e&&n.length===i.length&&(n=null)}else n=d(e);n?.length&&c(r,n,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:o,subtypeField:n}=e,s=o?.find((e=>e.code===r)),l=s?.defaultValues,a=s?.domains,p=[];for(const d of i){const e=d.clone(),{name:i}=e,o=t?.find((e=>e.name===i));if(e.visible=!t||!!o,o){const{alias:t,editable:r}=o;t&&(e.alias=t),!1===r&&(e.editable=!1)}const s=l?.[i]??null;e.defaultValue=i===n?r:s;const u=a?.[i]??null;e.domain=i===n?null:u?"inherited"===u.type?e.domain:u.clone():null,p.push(e)}return p}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||s.getLogger(z).error(W("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){A(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?M(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,n=U(i,t,r);let s;const{subtypeCode:l}=this;if(null!=l&&B(n,t.subtypeField)){const e=n.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(l)));e&&(s=new o({symbol:e.symbol}))}else"simple"!==n?.type||n.visualVariables?.length||(s=n);return s}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(!i)return;const o=i.visualVariables?.some((e=>"rotationInfo"!==e.type));return o?void 0:U(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[Q(this.subtypeCode,t)]}readTitleFromService(e,t){const r=H(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw W("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new a("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw W("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new a("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw W("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new a("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw W("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:o}=this;if(r){const{displayField:e,editFieldsInfo:n,objectIdField:s}=r;t={displayField:e,editFieldsInfo:n,fields:i,objectIdField:s,title:o}}return D(t,e)}createQuery(){if(!this.parent)throw W("createQuery");const e=T(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=m(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw W("queryAttachments");const i=e.clone();return i.where=K(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw W("queryFeatures");const i=P.from(e)??r.createQuery();return null!=e&&(i.where=K(i.where,r.parent.subtypeField,r.subtypeCode)),r.parent.queryFeatures(i,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};e([f({readOnly:!0,json:{read:!1}})],J.prototype,"capabilities",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"effectiveCapabilities",null),e([f({json:{write:{ignoreOrigin:!0}}})],J.prototype,"charts",void 0),e([f({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],J.prototype,"editingEnabled",void 0),e([f({type:Boolean,readOnly:!0})],J.prototype,"effectiveEditingEnabled",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"elevationInfo",null),e([f({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],J.prototype,"fieldOverrides",void 0),e([g("fieldOverrides")],J.prototype,"writeFieldOverrides",null),e([f({...N.fields,readOnly:!0,json:{read:!1}})],J.prototype,"fields",null),e([f(N.fieldsIndex)],J.prototype,"fieldsIndex",void 0),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"floorInfo",null),e([f({type:j,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],J.prototype,"formTemplate",void 0),e([f({type:String,clonable:!1,readOnly:!0,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],J.prototype,"id",void 0),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"geometryType",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"type",void 0),e([f(k(d(w)))],J.prototype,"labelsVisible",void 0),e([f({type:[x],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:R},write:{ignoreOrigin:!0}}})],J.prototype,"labelingInfo",void 0),e([f({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],J.prototype,"layerType",void 0),e([f(k(d(O)))],J.prototype,"legendEnabled",void 0),e([f({type:["show","hide"]})],J.prototype,"listMode",void 0),e([f((()=>{const e=d(F);return e.json.origins.service.read=!1,k(e)})())],J.prototype,"minScale",void 0),e([f((()=>{const e=d(I);return e.json.origins.service.read=!1,k(e)})())],J.prototype,"maxScale",void 0),e([f({readOnly:!0})],J.prototype,"effectiveScaleRange",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"objectIdField",null),e([f({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],J.prototype,"opacity",void 0),e([f({clonable:!1})],J.prototype,"parent",void 0),e([f(k(d(S)))],J.prototype,"popupEnabled",void 0),e([f({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],J.prototype,"popupTemplate",void 0),e([f({readOnly:!0})],J.prototype,"defaultPopupTemplate",null),e([f({types:G,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],J.prototype,"renderer",null),e([h("service","renderer",["drawingInfo.renderer","subtypeField","type"])],J.prototype,"readRendererFromService",null),e([h("renderer",["layerDefinition.drawingInfo.renderer"])],J.prototype,"readRenderer",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"spatialReference",null),e([f({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],J.prototype,"subtypeCode",void 0),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"subtypeField",null),e([f({type:[E],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],J.prototype,"templates",void 0),e([h("service","templates",["geometryType","subtypeField","subtypes","type"])],J.prototype,"readTemplatesFromService",null),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),e([h("service","title",["subtypes"])],J.prototype,"readTitleFromService",null),e([f({readOnly:!0,json:{read:!1}})],J.prototype,"url",null),e([f({readOnly:!0})],J.prototype,"userHasUpdateItemPrivileges",null),e([f({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],J.prototype,"visible",void 0),J=e([b(z)],J);const K=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),o=`${t}=${r}`,n=e??"";return i.test(n)?n.replace(i,o):m(o,n)},W=e=>new a(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),X=J;export{X as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import s from"../../core/Logger.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import{f as n,
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import s from"../../core/Logger.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import{f as n,D as o,B as a,g as l}from"../../chunks/vec32.js";import{fromValues as p,fromArray as u}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";import{equals as h}from"../../geometry/support/spatialReferenceUtils.js";import g from"./VoxelDimension.js";let d=class extends i{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=c.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!!this.dimensions&&(!!Array.isArray(this.dimensions)&&(4===this.dimensions.length&&(!(this.dimensions[0].size<1||this.dimensions[1].size<1)&&!(-1===this.zDimension||this.dimensions[this.zDimension].size<1))))}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),i=this.dimensions[1].getRange(),s=this.dimensions[2],r=s.isRegular?s.getRange():[0,s.size];return[e[0],i[0],r[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),i=this.dimensions[1].getRange(),s=this.dimensions[2],r=s.isRegular?s.getRange():[0,s.size],t=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let n=0;n<3;++n)t[n]<2?t[n]=1:t[n]-=1;return s.isRegular&&!s.isPositiveUp&&(t[2]*=-1),[(e[1]-e[0])/t[0],(i[1]-i[0])/t[1],(r[1]-r[0])/t[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,i=this.dimensions[3].size>0;if(!e&&i)return"xyt";if(e&&i)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return s.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!h(this.spatialReference,e.spatialReference))return s.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const i=p(e.x,e.y,e.z??0);n(i,i,this.originInLayerSpace3D),o(i,i,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const s=e.z??0,t=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,o=t.reduce(((e,i)=>Math.abs(n*i-s)<Math.abs(n*e-s)?i:e));for(let e=0;e<t.length;++e)if(t[e]===o){i[2]=e;break}}return[i[0],i[1],i[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new m({x:0,y:0,spatialReference:this.spatialReference});const i=u(e);if(a(i,i,this.voxelSizeInLayerSpaceSigned),l(i,i,this.originInLayerSpace3D),"xyt"===this.volumeType)return new m({x:i[0],y:i[1],spatialReference:this.spatialReference});const s=this.dimensions[this.zDimension];return s.isRegular||Array.isArray(s.irregularSpacing?.values)&&(e[2]<0?i[2]=s.irregularSpacing.values[0]:e[2]<s.irregularSpacing.values.length?i[2]=s.irregularSpacing.values[e[2]]:i[2]=s.irregularSpacing.values[s.irregularSpacing.values.length-1],s.isPositiveUp||(i[2]*=-1)),new m({x:i[0],y:i[1],z:i[2],spatialReference:this.spatialReference})}};e([r({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"id",void 0),e([r({type:[g],json:{write:{enabled:!0,isRequired:!0}}})],d.prototype,"dimensions",void 0),e([r({type:c,json:{read:{enabled:!1}}})],d.prototype,"spatialReference",void 0),e([r({type:Number,json:{read:!1}})],d.prototype,"zDimension",null),e([r({type:[Boolean],json:{read:!1}})],d.prototype,"isValid",null),e([r({type:[Number],json:{read:!1}})],d.prototype,"originInLayerSpace3D",null),e([r({type:[Number],json:{read:!1}})],d.prototype,"voxelSizeInLayerSpaceSigned",null),e([r({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],d.prototype,"volumeType",null),e([r({type:[Number],json:{read:!1}})],d.prototype,"sizeInVoxels",null),d=e([t("esri.layers.voxel.VoxelVolume")],d);const y=d;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import{property as r}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 s from"../layers/FeatureLayer.js";import{queryAllJSON as a}from"../layers/support/featureQueryAll.js";import i from"./Network.js";import n from"./RulesTable.js";import l from"./support/NamedTraceConfiguration.js";import u from"./support/NetworkSystemLayers.js";import m from"./support/TerminalConfiguration.js";import d from"./support/TraceJobInfo.js";import{AssociationTypeEnum as c,RuleType as p}from"./support/typeUtils.js";import y from"../rest/support/Query.js";let f=class extends i{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility"}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new u({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map((e=>m.fromJSON(e)))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map((e=>e.domainNetworkName))||[]}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map((t=>{t.edgeSources.map((t=>{e.add(t.layerId)})),t.junctionSources.map((t=>{e.add(t.layerId)}))})),e}async load(e){return this.addResolvingPromise(super.load(e)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(e)),this}getTerminalConfiguration(e){let t=null,r=null;const o=e.layer;let s=null;if("feature"===o?.type){if(s=o.layerId,null===s)return null}else{if("subtype-sublayer"!==o?.type)return null;if(s=o?.parent?.layerId??null,null===s)return null}const a=e.attributes;if(null==a)return null;for(const l of Object.keys(a))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let i=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find((e=>e.layerId===s));if(e){const o=e.assetGroups?.find((e=>e.assetGroupCode===t));if(o){const e=o.assetTypes?.find((e=>e.assetTypeCode===r));if(e){i=e.terminalConfigurationId;break}}}}if(null!=i){const e=this.dataElement.terminalConfigurations,t=e?.find((e=>e.terminalConfigurationId===i));return t?m.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e));return t?.tiers.map((e=>e.name))||[]}async getRulesTable(){return this._sharedRulesTable||(this._sharedRulesTable=this._createRulesTable()),await this._sharedRulesTable}isUtilityLayer(e){return this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1)}async queryAssociations(e){const[{queryAssociations:t},{default:r}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=r.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await t(this.networkServiceUrl,o)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),o=r.from(e);return o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment,t(this.networkServiceUrl,o)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),o=r.from(e);return o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment,t(this.networkServiceUrl,o)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),o=r.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;const s=await t(this.networkServiceUrl,o);return new d({statusUrl:s})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;await t.load();const r=(e,t)=>e?1===e.terminalId?!t?.terminalId||t?.terminalId===e.terminalId:e.terminalId===t?.terminalId:!t?.terminalId,o=(e,t)=>e.fromNetworkSource?.sourceId===t.fromNetworkElement?.networkSourceId&&e.toNetworkSource?.sourceId===t.toNetworkElement?.networkSourceId&&e.fromAssetGroup?.assetGroupCode===t.fromNetworkElement?.assetGroupCode&&e.fromAssetType?.assetTypeCode===t.fromNetworkElement?.assetTypeCode&&e.toAssetGroup?.assetGroupCode===t.toNetworkElement?.assetGroupCode&&e.toAssetType?.assetTypeCode===t.toNetworkElement?.assetTypeCode&&r(e.fromTerminal,t.fromNetworkElement)&&r(e.toTerminal,t.toNetworkElement);if("containment"===e.associationType){return t.rulesCategorized.containment.some((t=>o(t,e)))}if("attachment"===e.associationType){return t.rulesCategorized.attachment.some((t=>o(t,e)))}return t.rulesCategorized.connectivity.some((t=>t.viaNetworkSource?t.fromNetworkSource?.sourceId===e.fromNetworkElement?.networkSourceId&&t.viaNetworkSource?.sourceId===e.toNetworkElement?.networkSourceId&&t.fromAssetGroup?.assetGroupCode===e.fromNetworkElement?.assetGroupCode&&t.fromAssetType?.assetTypeCode===e.fromNetworkElement?.assetTypeCode&&t.viaAssetGroup?.assetGroupCode===e.toNetworkElement?.assetGroupCode&&t.viaAssetType?.assetTypeCode===e.toNetworkElement?.assetTypeCode&&r(t.fromTerminal,e.fromNetworkElement)&&r(t.viaTerminal,e.toNetworkElement)||t.viaNetworkSource?.sourceId===e.fromNetworkElement?.networkSourceId&&t.toNetworkSource?.sourceId===e.toNetworkElement?.networkSourceId&&t.viaAssetGroup?.assetGroupCode===e.fromNetworkElement?.assetGroupCode&&t.viaAssetType?.assetTypeCode===e.fromNetworkElement?.assetTypeCode&&t.toAssetGroup?.assetGroupCode===e.toNetworkElement?.assetGroupCode&&t.toAssetType?.assetTypeCode===e.toNetworkElement?.assetTypeCode&&r(t.viaTerminal,e.fromNetworkElement)&&r(t.toTerminal,e.toNetworkElement):o(t,e)))}async generateAddAssociations(e){return{addFeatures:await Promise.all(e.map((e=>new t({attributes:{fromnetworksourceid:e.fromNetworkElement?.networkSourceId,fromglobalid:e.fromNetworkElement?.globalId,fromterminalid:e.fromNetworkElement?.terminalId,tonetworksourceid:e.toNetworkElement?.networkSourceId,toglobalid:e.toNetworkElement?.globalId,toterminalid:e.toNetworkElement?.terminalId,associationtype:c[e.associationType],iscontentvisible:e.isContentVisible?1:0,percentalong:e.percentAlong,globalid:e.globalId}})))),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:"globalid",objectIdField:"objectid"}}}generateDeleteAssociations(e){return{deleteFeatures:e.map((e=>({globalId:e.globalId}))),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:"globalid",objectIdField:"objectid"}}}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map((e=>e.globalId)),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const o of this.sharedNamedTraceConfigurations){const e=r?.find((e=>e.globalId===o.globalId));if(e){const t=e.write({},{origin:"service"});o.read(t,{origin:"service"})}}}async _createRulesTable(){const e=this.networkSystemLayers.rulesTableUrl,t=new s({url:e});await t.load();const r=this.dataElement?.domainNetworks;if(!r)return null;const o=r.flatMap((e=>[...e.edgeSources||[],...e.junctionSources||[]])),a=(await this._queryRulesTable(t)).map((e=>this._hydrateRuleInfo(t,o,e)));return new n({layer:t,rules:a})}async _queryRulesTable(e){const t=new y({where:"1=1",outFields:["*"]});return(await a(e,t)).features}_hydrateRuleInfo(e,t,r){const o=e.fieldsIndex,s=o.get("RULETYPE"),a=o.get("CREATIONDATE"),i=o.get("FROMNETWORKSOURCEID"),n=o.get("FROMASSETGROUP"),l=o.get("FROMASSETTYPE"),u=o.get("FROMTERMINALID"),m=o.get("TONETWORKSOURCEID"),d=o.get("TOASSETGROUP"),c=o.get("TOASSETTYPE"),y=o.get("TOTERMINALID"),f=o.get("VIANETWORKSOURCEID"),w=o.get("VIAASSETGROUP"),T=o.get("VIAASSETTYPE"),I=o.get("VIATERMINALID"),g=r.attributes[s.name],k=new Date(r.attributes[a.name]),b=[{networkSourceId:r.attributes[i.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[m.name],assetGroupId:r.attributes[d.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[f.name],assetGroupId:r.attributes[w.name],assetTypeId:r.attributes[T.name],terminalId:r.attributes[I.name]}];let h;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(h||(h={}));const N={ruleType:g,creationDate:k};for(const S of[h.from,h.to,h.via]){if(g!==p.RTEdgeJunctionEdgeConnectivity&&S===h.via)continue;const e=b[S],r=t.find((t=>t.sourceId===e.networkSourceId)),o=r?.assetGroups.find((t=>t.assetGroupCode===e.assetGroupId)),s=o?.assetTypes.find((t=>t.assetTypeCode===e.assetTypeId)),a=this._getTerminal(s,e);let i="";switch(S){case h.from:i="from";break;case h.to:i="to";break;case h.via:i="via"}N[`${i}NetworkSource`]=r,N[`${i}AssetGroup`]=o,N[`${i}AssetType`]=s,N[`${i}Terminal`]=a?.toJSON()}return N}_getTerminal(e,t){const r=e?.terminalConfigurationId,o=this.terminalConfigurations?.find((e=>e.id===r));return o?.terminals?.find((e=>e.id===t.terminalId))??null}};e([r({type:[l],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],f.prototype,"sharedNamedTraceConfigurations",void 0),e([r({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],f.prototype,"type",void 0),e([r({readOnly:!0})],f.prototype,"serviceTerritoryFeatureLayerId",null),e([r({readOnly:!0})],f.prototype,"networkSystemLayers",null),e([r({readOnly:!0})],f.prototype,"terminalConfigurations",null),e([r({readOnly:!0})],f.prototype,"domainNetworkNames",null),f=e([o("esri.networks.UtilityNetwork")],f);const w=f;export{w as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import{property as r}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 s from"../layers/FeatureLayer.js";import{queryAllJSON as a}from"../layers/support/featureQueryAll.js";import i from"./Network.js";import n from"./RulesTable.js";import l from"./support/NamedTraceConfiguration.js";import u from"./support/NetworkSystemLayers.js";import m from"./support/TerminalConfiguration.js";import d from"./support/TraceJobInfo.js";import{AssociationTypeEnum as c,RuleType as p}from"./support/typeUtils.js";import y from"../rest/support/Query.js";let f=class extends i{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility"}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new u({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map((e=>m.fromJSON(e)))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map((e=>e.domainNetworkName))||[]}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map((t=>{t.edgeSources.map((t=>{e.add(t.layerId)})),t.junctionSources.map((t=>{e.add(t.layerId)}))})),e}async load(e){return this.addResolvingPromise(super.load(e)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(e)),this}getTerminalConfiguration(e){let t=null,r=null;const o=e.layer;let s=null;if("feature"===o?.type){if(s=o.layerId,null===s)return null}else{if("subtype-sublayer"!==o?.type)return null;if(s=o?.parent?.layerId??null,null===s)return null}const a=e.attributes;if(null==a)return null;for(const l of Object.keys(a))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let i=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find((e=>e.layerId===s));if(e){const o=e.assetGroups?.find((e=>e.assetGroupCode===t));if(o){const e=o.assetTypes?.find((e=>e.assetTypeCode===r));if(e){i=e.terminalConfigurationId;break}}}}if(null!=i){const e=this.dataElement.terminalConfigurations,t=e?.find((e=>e.terminalConfigurationId===i));return t?m.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e));return t?.tiers.map((e=>e.name))||[]}async getRulesTable(){return this._sharedRulesTable||(this._sharedRulesTable=this._createRulesTable()),await this._sharedRulesTable}isUtilityLayer(e){return this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1)}async queryAssociations(e){const[{queryAssociations:t},{default:r}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=r.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await t(this.networkServiceUrl,o)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),o=r.from(e);return o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment,t(this.networkServiceUrl,o)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),o=r.from(e);return o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment,t(this.networkServiceUrl,o)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),o=r.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;const s=await t(this.networkServiceUrl,o);return new d({statusUrl:s})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;await t.load();const r=(e,t)=>e?1===e.terminalId?!t?.terminalId||t?.terminalId===e.terminalId:e.terminalId===t?.terminalId:!t?.terminalId,o=(e,t)=>e.fromNetworkSource?.sourceId===t.fromNetworkElement?.networkSourceId&&e.toNetworkSource?.sourceId===t.toNetworkElement?.networkSourceId&&e.fromAssetGroup?.assetGroupCode===t.fromNetworkElement?.assetGroupCode&&e.fromAssetType?.assetTypeCode===t.fromNetworkElement?.assetTypeCode&&e.toAssetGroup?.assetGroupCode===t.toNetworkElement?.assetGroupCode&&e.toAssetType?.assetTypeCode===t.toNetworkElement?.assetTypeCode&&r(e.fromTerminal,t.fromNetworkElement)&&r(e.toTerminal,t.toNetworkElement);if("containment"===e.associationType){return t.rulesCategorized.containment.some((t=>o(t,e)))}if("attachment"===e.associationType){return t.rulesCategorized.attachment.some((t=>o(t,e)))}return t.rulesCategorized.connectivity.some((t=>t.viaNetworkSource?t.fromNetworkSource?.sourceId===e.fromNetworkElement?.networkSourceId&&t.viaNetworkSource?.sourceId===e.toNetworkElement?.networkSourceId&&t.fromAssetGroup?.assetGroupCode===e.fromNetworkElement?.assetGroupCode&&t.fromAssetType?.assetTypeCode===e.fromNetworkElement?.assetTypeCode&&t.viaAssetGroup?.assetGroupCode===e.toNetworkElement?.assetGroupCode&&t.viaAssetType?.assetTypeCode===e.toNetworkElement?.assetTypeCode&&r(t.fromTerminal,e.fromNetworkElement)&&r(t.viaTerminal,e.toNetworkElement)||t.viaNetworkSource?.sourceId===e.fromNetworkElement?.networkSourceId&&t.toNetworkSource?.sourceId===e.toNetworkElement?.networkSourceId&&t.viaAssetGroup?.assetGroupCode===e.fromNetworkElement?.assetGroupCode&&t.viaAssetType?.assetTypeCode===e.fromNetworkElement?.assetTypeCode&&t.toAssetGroup?.assetGroupCode===e.toNetworkElement?.assetGroupCode&&t.toAssetType?.assetTypeCode===e.toNetworkElement?.assetTypeCode&&r(t.viaTerminal,e.fromNetworkElement)&&r(t.toTerminal,e.toNetworkElement):o(t,e)))}generateAddAssociations(e){return{addFeatures:e.map((e=>new t({attributes:{fromnetworksourceid:e.fromNetworkElement?.networkSourceId,fromglobalid:e.fromNetworkElement?.globalId,fromterminalid:e.fromNetworkElement?.terminalId,tonetworksourceid:e.toNetworkElement?.networkSourceId,toglobalid:e.toNetworkElement?.globalId,toterminalid:e.toNetworkElement?.terminalId,associationtype:c[e.associationType],iscontentvisible:e.isContentVisible?1:0,percentalong:e.percentAlong,globalid:e.globalId}}))),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:"globalid",objectIdField:"objectid"}}}generateDeleteAssociations(e){return{deleteFeatures:e.map((e=>({globalId:e.globalId}))),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:"globalid",objectIdField:"objectid"}}}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map((e=>e.globalId)),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const o of this.sharedNamedTraceConfigurations){const e=r?.find((e=>e.globalId===o.globalId));if(e){const t=e.write({},{origin:"service"});o.read(t,{origin:"service"})}}}async _createRulesTable(){const e=this.networkSystemLayers.rulesTableUrl,t=new s({url:e});await t.load();const r=this.dataElement?.domainNetworks;if(!r)return null;const o=r.flatMap((e=>[...e.edgeSources||[],...e.junctionSources||[]])),a=(await this._queryRulesTable(t)).map((e=>this._hydrateRuleInfo(t,o,e)));return new n({layer:t,rules:a})}async _queryRulesTable(e){const t=new y({where:"1=1",outFields:["*"]});return(await a(e,t)).features}_hydrateRuleInfo(e,t,r){const o=e.fieldsIndex,s=o.get("RULETYPE"),a=o.get("CREATIONDATE"),i=o.get("FROMNETWORKSOURCEID"),n=o.get("FROMASSETGROUP"),l=o.get("FROMASSETTYPE"),u=o.get("FROMTERMINALID"),m=o.get("TONETWORKSOURCEID"),d=o.get("TOASSETGROUP"),c=o.get("TOASSETTYPE"),y=o.get("TOTERMINALID"),f=o.get("VIANETWORKSOURCEID"),w=o.get("VIAASSETGROUP"),T=o.get("VIAASSETTYPE"),I=o.get("VIATERMINALID"),g=r.attributes[s.name],k=new Date(r.attributes[a.name]),b=[{networkSourceId:r.attributes[i.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[m.name],assetGroupId:r.attributes[d.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[f.name],assetGroupId:r.attributes[w.name],assetTypeId:r.attributes[T.name],terminalId:r.attributes[I.name]}];let h;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(h||(h={}));const N={ruleType:g,creationDate:k};for(const S of[h.from,h.to,h.via]){if(g!==p.RTEdgeJunctionEdgeConnectivity&&S===h.via)continue;const e=b[S],r=t.find((t=>t.sourceId===e.networkSourceId)),o=r?.assetGroups.find((t=>t.assetGroupCode===e.assetGroupId)),s=o?.assetTypes.find((t=>t.assetTypeCode===e.assetTypeId)),a=this._getTerminal(s,e);let i="";switch(S){case h.from:i="from";break;case h.to:i="to";break;case h.via:i="via"}N[`${i}NetworkSource`]=r,N[`${i}AssetGroup`]=o,N[`${i}AssetType`]=s,N[`${i}Terminal`]=a?.toJSON()}return N}_getTerminal(e,t){const r=e?.terminalConfigurationId,o=this.terminalConfigurations?.find((e=>e.id===r));return o?.terminals?.find((e=>e.id===t.terminalId))??null}};e([r({type:[l],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],f.prototype,"sharedNamedTraceConfigurations",void 0),e([r({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],f.prototype,"type",void 0),e([r({readOnly:!0})],f.prototype,"serviceTerritoryFeatureLayerId",null),e([r({readOnly:!0})],f.prototype,"networkSystemLayers",null),e([r({readOnly:!0})],f.prototype,"terminalConfigurations",null),e([r({readOnly:!0})],f.prototype,"domainNetworkNames",null),f=e([o("esri.networks.UtilityNetwork")],f);const w=f;export{w as default};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const e="20240318",b="6c85f629d5c708a35517b034e8b6e44e31ebc4b2";export{e as buildDate,b as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../DisplayEntity.js";import e from"../DisplayRecord.js";import{VertexDataWriter as r}from"./VertexDataWriter.js";import i from"../util/Writer.js";class n{constructor(e,r=0){this._id=e,this._sizeHint=r,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._instanceIdToVertexData=new Map,this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._entities=new i(Uint32Array,this._sizeHint*t.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],r=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:r},transferList:t}}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,r,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t}metricEnd(){const t=this._current.writer;this._current.metric.bounds.length&&t.writeMetric(this._current.metric)}metricBoxWrite(t){this._current.metric.bounds.push(t)}entityStart(t,e=t){this._entityIdIndex=this._entities.push(t),this._entitySortKeyIndex=this._entities.writeF32(e),this._entityRecordCountOffset=this._entities.push(0)}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){0===this.entityRecordCount()?this._entities.seek(this._entityIdIndex):this._entities.incr(this._entityCountOffset)}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(t,e,r=0){this._current.writer=this._getVertexWriter(t,e),this._current.indexStart=this._current.writer.indexCount,this._current.vertexStart=this._current.writer.vertexCount,this._current.instanceId=t,this._current.layoutHash=e.hash,this._current.textureKey=r}recordEnd(t=0){const r=this._current.vertexStart,i=this._current.writer.vertexCount-r;if(!i)return!1;const n=this._current.indexStart,s=this._current.writer.indexCount-n;return this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,n,s,r,i,t),!0}copyLastFrom(t,e,r){const i=t._entities.getValue(t._entityIdIndex);if(i!==this._entities.getValue(this._entityIdIndex)){const e=t._entities.getValueF32(t._entitySortKeyIndex);this.entityStart(i,e)}this.recordStart(t._current.instanceId,t._current.writer.layout,t._current.textureKey);const n=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,s=this._current.vertexStart,
|
|
5
|
+
import t from"../DisplayEntity.js";import e from"../DisplayRecord.js";import{VertexDataWriter as r}from"./VertexDataWriter.js";import i from"../util/Writer.js";class n{constructor(e,r=0){this._id=e,this._sizeHint=r,this._entityRecordCountOffset=0,this._entityCountOffset=0,this._entityIdIndex=0,this._entitySortKeyIndex=0,this._instanceIdToVertexData=new Map,this._recordIndexStart=0,this._recordIndexCount=0,this._recordVertexStart=0,this._recordVertexCount=0,this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0},this._entities=new i(Uint32Array,this._sizeHint*t.byteSizeHint),this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const t=new Array,e=[],r=this._entities.buffer();for(const i of this._instanceIdToVertexData.values())e.push(i.serialize(t));return{message:{data:e,entities:r},transferList:t}}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteRegion(t){this._current.writer.writeVertexRegion(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}recordBounds(t,e,r,i){}indexWrite(t){this._current.writer.writeIndex(t)}metricStart(t){this._current.metric=t}metricEnd(){const t=this._current.writer;this._current.metric.bounds.length&&t.writeMetric(this._current.metric)}metricBoxWrite(t){this._current.metric.bounds.push(t)}entityStart(t,e=t){this._entityIdIndex=this._entities.push(t),this._entitySortKeyIndex=this._entities.writeF32(e),this._entityRecordCountOffset=this._entities.push(0)}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){0===this.entityRecordCount()?this._entities.seek(this._entityIdIndex):this._entities.incr(this._entityCountOffset)}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(t,e,r=0){this._current.writer=this._getVertexWriter(t,e),this._current.indexStart=this._current.writer.indexCount,this._current.vertexStart=this._current.writer.vertexCount,this._current.instanceId=t,this._current.layoutHash=e.hash,this._current.textureKey=r}recordEnd(t=0){const r=this._current.vertexStart,i=this._current.writer.vertexCount-r;if(!i)return!1;const n=this._current.indexStart,s=this._current.writer.indexCount-n;return this._recordIndexStart=n,this._recordIndexCount=s,this._recordVertexStart=r,this._recordVertexCount=i,this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,n,s,r,i,t),!0}copyLast(t,r){const i=this._recordVertexStart+this._recordVertexCount;this._entities.incr(this._entityRecordCountOffset),e.write(this._entities,this._current.instanceId,this._current.textureKey,this._recordIndexStart+this._recordIndexCount,this._recordIndexCount,i,this._recordVertexCount,0);const n=this._current.writer.indexWriter,s=this._current.writer.vertexWriter,o=this._recordIndexStart+this._recordIndexCount,c=this._recordVertexCount;for(let e=this._recordIndexStart;e!==o;e++){const t=n.getValue(e);n.push(t+c)}const u=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,h=this._recordVertexStart*u,_=(this._recordVertexStart+this._recordVertexCount)*u;for(let e=h;e!==_;e++){const t=s.getValue(e);s.push(t)}const d=this._current.writer.layout.position,a=d.packPrecisionFactor??1,x=d.offset/Uint32Array.BYTES_PER_ELEMENT,y=t*a,f=r*a;for(let e=i*u;e<=s.length;e+=u)s.i1616Add(e+x,y,f);this.recordEnd()}copyLastFrom(t,e,r){const i=t._entities.getValue(t._entityIdIndex);if(i!==this._entities.getValue(this._entityIdIndex)){const e=t._entities.getValueF32(t._entitySortKeyIndex);this.entityStart(i,e)}this.recordStart(t._current.instanceId,t._current.writer.layout,t._current.textureKey);const n=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT,s=this._current.vertexStart,o=t._current.vertexStart-s,c=this._current.writer.indexWriter,u=this._current.writer.vertexWriter,h=t._current.writer.indexWriter,_=t._current.writer.vertexWriter;for(let l=t._current.indexStart;l!==h.length;l++){const t=h.getValue(l);c.push(t-o)}for(let l=t._current.vertexStart*n;l!==_.length;l++){const t=_.getValue(l);u.push(t)}const d=this._current.writer.layout.position,a=d.packPrecisionFactor??1,x=d.offset/Uint32Array.BYTES_PER_ELEMENT,y=e*a,f=r*a;for(let l=s*n;l<=u.length;l+=n)u.i1616Add(l+x,y,f);this.recordEnd()}_getVertexWriter(t,e){const{stride:i}=e,n=this._instanceIdToVertexData;return n.has(t)||n.set(t,new r(t,e,i,this._sizeHint)),n.get(t)}}export{n as MeshData};
|