@arcgis/core 4.29.7 → 4.29.9
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/{a8ac511280f873960d46.js → 1dc474a28d5ddac1a4b7.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/{fc5ac713872766571e07.js → 31c065746e53f7518c17.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/{c556644bb0cf88770939.js → 413978b96c88d5ff01ee.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/{8225febaf0a412f4cee4.js → 5e4465448b2728cafab0.js} +1 -1
- package/assets/esri/core/workers/chunks/6301990e489d31596bc8.js +1 -0
- 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/{9a8ab968ebb18480481d.js → 8699eaadd3fb6709fd94.js} +1 -1
- package/assets/esri/core/workers/chunks/{b139cf91bc148aa84419.js → 96cb79adabfbbcc3e707.js} +1 -1
- package/assets/esri/core/workers/chunks/99ac2a6a5be0604ee4c2.js +1 -0
- package/assets/esri/core/workers/chunks/{2433b39624a7e274cb98.js → b4c41a8244b7371e864e.js} +1 -1
- 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/{b42a83db83851cb57d44.js → bed684a8d38fa7ac5eb7.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/{fe74ee642bc72fe18210.js → d576aa444ad7c9289617.js} +1 -1
- package/assets/esri/core/workers/chunks/{f60e5dd0e712cf32f782.js → f2e8b75ad3b574894ade.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9c55ff1f21db198ce03.js → ff96940be6a4c8489ebb.js} +1 -1
- 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 +5 -5
- 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/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/RouteLayerView2D.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/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.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/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/967812e66fef41febb98.js +0 -1
- package/assets/esri/core/workers/chunks/a28b7d868346e13468bb.js +0 -1
- package/assets/esri/core/workers/chunks/ccd53b81c2688dd11584.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3163,8528],{8528:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11004:(e,t,s)=>{s.d(t,{o:()=>n});var i=s(74452);class n{constructor(e,t){this._storage=new i.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,s)=>{s.d(t,{ML:()=>o,kB:()=>a});var i,n,r=s(24680);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},39180:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=s.ms??"0",c=h?+h.padEnd(3,"0").substring(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(i,n,r,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{H9:()=>i,_:()=>n,sn:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},3024:(e,t,s)=>{s.d(t,{U:()=>o});var i=s(92400),n=s(24680),r=s(85304);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),b.prune(),I.prune(),S.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):y(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||y(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new w([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(I.clear(),S.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=S.pop()??0,o=!0),s.leaf&&(t=(0,i.IP)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!y(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),S.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(b.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else b.pushArray(s.children);s=b.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new w(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const l=Math.ceil(n/r),u=l*Math.ceil(Math.sqrt(r));g(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);g(e,n,t,l,this._compareMinY);for(let s=n;s<=t;s+=l){const n=Math.min(s+l-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),l=p(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);I.clear();const r=this._chooseSubtree(n,this._data,t,I);for(r.children.push(e),u(r,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;this._adjustParentBBoxes(n,I,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new w(o):new B(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(s,l)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=m(t,a),h=d(t)+d(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.IP)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new w([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.c,b=new n.c,I=new n.c,S=new n.c({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.is}}class w extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},57896:(e,t,s)=>{s.d(t,{Eq:()=>d,KG:()=>_,_8:()=>y,_I:()=>u,aE:()=>l,du:()=>m,on:()=>c}),s(40196),s(2952);var i=s(60976),n=s(38912),r=s(70680),o=s(10860),a=s(37176);function l(e,t,s={}){return h(e,t,s,f)}function u(e,t,s={}){return h(e,t,s,p)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.oR)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.M9)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.oR)(h),s(e)}const f=l(e,((e,s)=>{c(),(0,i.sh)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.uU)((()=>{f.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.wv)(s))return Promise.reject((0,o.Uh)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.oR)(a)}return new Promise(((i,r)=>{a=(0,n.Ip)([(0,o.wD)(s,(()=>{l(),r((0,o.Uh)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}s(41168);const m={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},20480:(e,t,s)=>{s.d(t,{WW:()=>S});var i=s(6220),n=s(20744),r=s(66360),o=s(7488),a=s(48516),l=s(44048),u=s(60544),h=s(29120),c=(s(60708),s(2600)),d=s(6704),f=s(21980),p=s(28176),m=s(81976);const y=()=>r.c.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.c||e instanceof o.c)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.c(e)}const s=(0,l.iM)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/l,h=(o-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=h*i+n,a=u*i+r;s.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,i=h*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.c({rings:i,spatialReference:e.spatialReference}):new a.c({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.aq)(t,!0)}return s&&(e=(0,l.wb)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.yK)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.yK)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.yK)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.yK)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.iM)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.yK)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(_(e))for(const t of(0,l.iM)(r))e[n]=e[n].addRing(t);else if(g(e))for(const t of(0,l.iM)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,_,g,v,M,w,B,z,F=0;const R=[],E=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,_=(0,u.Nq)(r),g=r.isWebMercator,w=g?102100:4326,v=l.Hh[w].maxX,M=l.Hh[w].minX,B=l.Hh[w].plus180Line,z=l.Hh[w].minus180Line),_)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(b(t.clone(),v,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,v,M))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);E.push(e.rings?new o.c(e):e)}else if(t.extent){const e=t.extent,s=(0,l.yK)(e.xmin,M)*(2*v);let i=0===s?t.clone():(0,l.wb)(t.clone(),s);e.offset(s,0),e.intersects(B)&&e.xmax!==v?(F=e.xmax>F?e.xmax:F,i=x(i,g),R.push(i),E.push("cut")):e.intersects(z)&&e.xmin!==M?(F=e.xmax*(2*v)>F?e.xmax*(2*v):F,i=x(i,g,360),R.push(i),E.push("cut")):E.push(i)}else E.push(t.clone());else E.push(t);else E.push(t);let T=(0,l.yK)(F,v),A=-90;const j=T,q=new a.c;for(;T>0;){const e=360*T-180;q.addPath([[e,A],[e,-1*A]]),A*=-1,T--}if(R.length>0&&j>0){const t=I(R,await async function(e,t,s,i){const n=(0,f.UX)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.um)(r),target:JSON.stringify({geometryType:(0,d.Ce)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.c)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((e=>{const t=(0,d.h4)(e);return t.spatialReference=r,t}))}}(n,R,q,s)),i=[],r=[];for(let s=0;s<E.length;s++){const n=E[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,h.w7)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,p.as)(e):e,n=t[0].spatialReference,r=(0,d.Ce)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.um)(n),geometries:JSON.stringify((0,m.y)(t))}},{data:a}=await(0,c.c)(i.path+"/simplify",o);return(0,m.Q)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(g?(0,h.w7)(o.shift()):o.shift())}return a}const X=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)X.push(t);else{const e=R.shift();X.push(!0===g?(0,h.w7)(e):e)}}return X}},44048:(e,t,s)=>{s.d(t,{Hh:()=>o,iM:()=>u,wb:()=>l,yK:()=>a});var i=s(48516),n=s(56156),r=s(6704);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.c({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator}),minus180Line:new i.c({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.c({paths:[[[180,-180],[180,180]]],spatialReference:n.c.WGS84}),minus180Line:new i.c({paths:[[[-180,-180],[-180,180]]],spatialReference:n.c.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Cs)(e)?e.rings:e.paths}},6904:(e,t,s)=>{s.d(t,{c:()=>a});var i=s(9456),n=s(3024),r=s(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,i.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,s)=>{s.d(t,{c:()=>p});var i=s(92400),n=s(20744),r=s(77860),o=s(66360),a=s(77048),l=s(83372),u=s(97088),h=s(6904),c=s(83624),d=s(51752);const f=(0,a.Su)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Qv)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.C_)(null!=i?i:(0,l.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.C_)((0,l.Su)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},46019:(e,t,s)=>{s.d(t,{A:()=>n,q:()=>i});const i=1;function n(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},48784:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(20744),n=s(6704),r=s(60544),o=s(97088),a=s(46019),l=s(9107),u=s(7684),h=s(47302),c=s(17724),d=s(49372),f=s(16424),p=s(36408),m=s(564),y=s(28484);const _=r.UH,g={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.UH},x={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function b(e){return(0,n._x)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n._x)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,n=this._inferLayerProperties(s,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,d=null!=e.hasZ?e.hasZ:!!n.hasZ,b=!e.spatialReference&&!n.spatialReference,I=b?_:e.spatialReference||n.spatialReference,S=b?g:null,v=e.geometryType||n.geometryType,M=!v;let w=e.objectIdField||n.objectIdField,B=e.timeInfo;const z=new f.c(r);if(!M&&(b&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!v))throw new i.c("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!w)throw new i.c("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&w!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${w}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),w=n.objectIdField),w&&!n.objectIdField){const e=z.get(w);e?(w=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:w,name:w,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.c("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===w&&(e.type="esriFieldTypeOID"),!p.M.jsonValues.includes(e.type))throw new i.c("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,m.G0)(e))}const F={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,m.gB)(e);void 0!==t&&(F[e.name]=t)}if(B){if(B.startTimeField){const e=z.get(B.startTimeField);e?(B.startTimeField=e.name,e.type="esriFieldTypeDate"):B.startTimeField=null}if(B.endTimeField){const e=z.get(B.endTimeField);e?(B.endTimeField=e.name,e.type="esriFieldTypeDate"):B.endTimeField=null}if(B.trackIdField){const e=z.get(B.trackIdField);e?B.trackIdField=e.name:(B.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:B}}))}B.startTimeField||B.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:B}}),B=null)}const R=z.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.Gw}:null;this._createDefaultAttributes=(0,c.GA)(F,w);const E={warnings:t,featureErrors:[],layerDefinition:{...x,drawingInfo:(0,c.w7)(v),templates:(0,c.QD)(F),extent:S,geometryType:v,objectIdField:w,fields:r,hasZ:d,hasM:o,timeInfo:B,dateFieldsTimeReference:R},assignedObjectIds:{}};if(this._queryEngine=new h.U({fieldsIndex:f.c.fromLayerJSON({fields:r,timeInfo:B,dateFieldsTimeReference:R}),geometryType:v,hasM:o,hasZ:d,objectIdField:w,spatialReference:I,featureStore:new l.c({geometryType:v,hasM:o,hasZ:d}),timeInfo:B,cacheSpatialQueries:!0}),!s?.length)return this._nextObjectId=a.q,E;const T=(0,a.A)(w,s);return this._nextObjectId=T+1,await(0,u.Qv)(s,I),this._loadInitialFeatures(E,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,d.Oo)(t,s),(0,u.Qv)(e.adds,t),(0,u.Qv)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let s,i,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.Ce)(e)),o||(o=e.spatialReference),null==s&&(s=b(e)),null==i&&(i=I(e)),r&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some((t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i}))&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:i,hasZ:s}}async _loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:l,featureStore:h,fieldsIndex:c}=this._queryEngine,f=[];for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.Ce)(i.geometry)){e.featureErrors.push((0,d.or)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,d.uo)(c,t,i.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[a]),null!=i.geometry&&(i.geometry=(0,u.yU)(i.geometry,i.geometry.spatialReference,l)),f.push(i))}h.addMany((0,o.od)([],f,s,r,i,a));const{fullExtent:p,timeExtent:m}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,m){const{start:t,end:s}=m;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,d.GI)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:l,spatialReference:h,featureStore:c,fieldsIndex:f}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&i!==(0,n.Ce)(r.geometry)){s.push((0,d.or)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,d.uo)(f,t,r.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[l];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??h;r.geometry=(0,u.yU)((0,d.OM)(r.geometry,e),e,h)}p.push(r),s.push((0,d.GI)(r.attributes[l]))}}c.addMany((0,o.od)([],p,i,a,r,l))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:l,featureStore:h,fieldsIndex:c}=this._queryEngine;for(const f of t){const{attributes:t,geometry:p}=f,m=t?.[a];if(null==m){e.push((0,d.or)(`Identifier field ${a} missing`));continue}if(!h.has(m)){e.push((0,d.or)(`Feature with object id ${m} missing`));continue}const y=(0,o.G0)(h.getFeature(m),s,r,i);if(null!=p){if(s!==(0,n.Ce)(p)){e.push((0,d.or)("Incorrect geometry type."));continue}const t=p.spatialReference??l;y.geometry=(0,u.yU)((0,d.OM)(p,t),t,l)}if(t){const s=(0,d.uo)(c,y.attributes,t);if(s){e.push(s);continue}}h.add((0,o.ye)(y,s,r,i,a)),e.push((0,d.GI)(m))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},17724:(e,t,s)=>{s.d(t,{G4:()=>d,GA:()=>h,QD:()=>c,w7:()=>a});var i=s(9456),n=s(62088),r=s(13136),o=s(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,i.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.ct)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},49372:(e,t,s)=>{s.d(t,{GI:()=>h,OM:()=>m,Oo:()=>y,or:()=>l,uo:()=>d});var i=s(39180),n=s(60544),r=s(564);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.YT)(o,a);if(e)return l((0,r.Ke)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return l(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.iW)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.AZ)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.gp)(e)&&"string"==typeof t&&(s=(0,i.sn)(t)),(0,r.OJ)(s)}let p;function m(e,t){if(!e||!(0,n.U3)(t))return e;if("rings"in e||"paths"in e){if(null==p)throw new TypeError("geometry engine not loaded");return p.simplify(t,e)}return e}async function y(e,t){!(0,n.U3)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==p&&(p=await Promise.all([s.e(984),s.e(2704)]).then(s.bind(s,82704))),p}()}},81976:(e,t,s)=>{s.d(t,{Q:()=>r,y:()=>n});var i=s(6704);function n(e){return{geometryType:(0,i.Ce)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.uG)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},21980:(e,t,s)=>{s.d(t,{OW:()=>a,UX:()=>o,sR:()=>r}),s(6220),s(47620);var i=s(62088),n=s(28176);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.as)(e):(0,i.ct)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a({item:e},t,s).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(20572)},9504:(e,t,s)=>{s.d(t,{MZ:()=>r,aV:()=>u,gF:()=>a,gP:()=>l,qe:()=>n,wp:()=>h,yq:()=>o});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3163,8528],{8528:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11004:(e,t,s)=>{s.d(t,{o:()=>n});var i=s(74452);class n{constructor(e,t){this._storage=new i.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,s)=>{s.d(t,{ML:()=>o,kB:()=>a});var i,n,r=s(24680);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},39180:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=s.ms??"0",c=h?+h.padEnd(3,"0").substring(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(i,n,r,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{H9:()=>i,_:()=>n,sn:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},3024:(e,t,s)=>{s.d(t,{U:()=>o});var i=s(92400),n=s(24680),r=s(85304);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),b.prune(),I.prune(),S.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):y(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||y(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new w([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(I.clear(),S.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=S.pop()??0,o=!0),s.leaf&&(t=(0,i.IP)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!y(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),S.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(b.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else b.pushArray(s.children);s=b.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new w(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const l=Math.ceil(n/r),u=l*Math.ceil(Math.sqrt(r));g(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);g(e,n,t,l,this._compareMinY);for(let s=n;s<=t;s+=l){const n=Math.min(s+l-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),l=p(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);I.clear();const r=this._chooseSubtree(n,this._data,t,I);for(r.children.push(e),u(r,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;this._adjustParentBBoxes(n,I,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new w(o):new B(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(s,l)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=m(t,a),h=d(t)+d(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.IP)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new w([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.c,b=new n.c,I=new n.c,S=new n.c({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.is}}class w extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},57896:(e,t,s)=>{s.d(t,{Eq:()=>d,KG:()=>_,_8:()=>y,_I:()=>u,aE:()=>l,du:()=>m,on:()=>c}),s(40196),s(2952);var i=s(60976),n=s(38912),r=s(70680),o=s(10860),a=s(37176);function l(e,t,s={}){return h(e,t,s,f)}function u(e,t,s={}){return h(e,t,s,p)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.oR)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.M9)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.oR)(h),s(e)}const f=l(e,((e,s)=>{c(),(0,i.sh)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.uU)((()=>{f.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.wv)(s))return Promise.reject((0,o.Uh)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.oR)(a)}return new Promise(((i,r)=>{a=(0,n.Ip)([(0,o.wD)(s,(()=>{l(),r((0,o.Uh)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}s(41168);const m={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},20480:(e,t,s)=>{s.d(t,{WW:()=>S});var i=s(6220),n=s(20744),r=s(66360),o=s(7488),a=s(48516),l=s(44048),u=s(60544),h=s(29120),c=(s(60708),s(2600)),d=s(6704),f=s(21980),p=s(28176),m=s(81976);const y=()=>r.c.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.c||e instanceof o.c)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.c(e)}const s=(0,l.iM)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/l,h=(o-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=h*i+n,a=u*i+r;s.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,i=h*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.c({rings:i,spatialReference:e.spatialReference}):new a.c({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.aq)(t,!0)}return s&&(e=(0,l.wb)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.yK)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.yK)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.yK)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.yK)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.iM)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.yK)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(_(e))for(const t of(0,l.iM)(r))e[n]=e[n].addRing(t);else if(g(e))for(const t of(0,l.iM)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,_,g,v,M,w,B,z,F=0;const R=[],E=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,_=(0,u.Nq)(r),g=r.isWebMercator,w=g?102100:4326,v=l.Hh[w].maxX,M=l.Hh[w].minX,B=l.Hh[w].plus180Line,z=l.Hh[w].minus180Line),_)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(b(t.clone(),v,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,v,M))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);E.push(e.rings?new o.c(e):e)}else if(t.extent){const e=t.extent,s=(0,l.yK)(e.xmin,M)*(2*v);let i=0===s?t.clone():(0,l.wb)(t.clone(),s);e.offset(s,0),e.intersects(B)&&e.xmax!==v?(F=e.xmax>F?e.xmax:F,i=x(i,g),R.push(i),E.push("cut")):e.intersects(z)&&e.xmin!==M?(F=e.xmax*(2*v)>F?e.xmax*(2*v):F,i=x(i,g,360),R.push(i),E.push("cut")):E.push(i)}else E.push(t.clone());else E.push(t);else E.push(t);let T=(0,l.yK)(F,v),A=-90;const j=T,q=new a.c;for(;T>0;){const e=360*T-180;q.addPath([[e,A],[e,-1*A]]),A*=-1,T--}if(R.length>0&&j>0){const t=I(R,await async function(e,t,s,i){const n=(0,f.UX)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.um)(r),target:JSON.stringify({geometryType:(0,d.Ce)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.c)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((e=>{const t=(0,d.h4)(e);return t.spatialReference=r,t}))}}(n,R,q,s)),i=[],r=[];for(let s=0;s<E.length;s++){const n=E[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,h.w7)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,p.as)(e):e,n=t[0].spatialReference,r=(0,d.Ce)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.um)(n),geometries:JSON.stringify((0,m.y)(t))}},{data:a}=await(0,c.c)(i.path+"/simplify",o);return(0,m.Q)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(g?(0,h.w7)(o.shift()):o.shift())}return a}const X=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)X.push(t);else{const e=R.shift();X.push(!0===g?(0,h.w7)(e):e)}}return X}},44048:(e,t,s)=>{s.d(t,{Hh:()=>o,iM:()=>u,wb:()=>l,yK:()=>a});var i=s(48516),n=s(56156),r=s(6704);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.c({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator}),minus180Line:new i.c({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.c({paths:[[[180,-180],[180,180]]],spatialReference:n.c.WGS84}),minus180Line:new i.c({paths:[[[-180,-180],[-180,180]]],spatialReference:n.c.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Cs)(e)?e.rings:e.paths}},6904:(e,t,s)=>{s.d(t,{c:()=>a});var i=s(9456),n=s(3024),r=s(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,i.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,s)=>{s.d(t,{c:()=>p});var i=s(92400),n=s(20744),r=s(77860),o=s(66360),a=s(77048),l=s(83372),u=s(97088),h=s(6904),c=s(83624),d=s(16736);const f=(0,a.Su)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Qv)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.C_)(null!=i?i:(0,l.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.C_)((0,l.Su)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},46019:(e,t,s)=>{s.d(t,{A:()=>n,q:()=>i});const i=1;function n(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},48784:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(20744),n=s(6704),r=s(60544),o=s(97088),a=s(46019),l=s(9107),u=s(7684),h=s(47302),c=s(17724),d=s(49372),f=s(16424),p=s(36408),m=s(564),y=s(28484);const _=r.UH,g={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.UH},x={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function b(e){return(0,n._x)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n._x)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,n=this._inferLayerProperties(s,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,d=null!=e.hasZ?e.hasZ:!!n.hasZ,b=!e.spatialReference&&!n.spatialReference,I=b?_:e.spatialReference||n.spatialReference,S=b?g:null,v=e.geometryType||n.geometryType,M=!v;let w=e.objectIdField||n.objectIdField,B=e.timeInfo;const z=new f.c(r);if(!M&&(b&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!v))throw new i.c("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!w)throw new i.c("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&w!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${w}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),w=n.objectIdField),w&&!n.objectIdField){const e=z.get(w);e?(w=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:w,name:w,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.c("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===w&&(e.type="esriFieldTypeOID"),!p.M.jsonValues.includes(e.type))throw new i.c("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,m.G0)(e))}const F={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,m.gB)(e);void 0!==t&&(F[e.name]=t)}if(B){if(B.startTimeField){const e=z.get(B.startTimeField);e?(B.startTimeField=e.name,e.type="esriFieldTypeDate"):B.startTimeField=null}if(B.endTimeField){const e=z.get(B.endTimeField);e?(B.endTimeField=e.name,e.type="esriFieldTypeDate"):B.endTimeField=null}if(B.trackIdField){const e=z.get(B.trackIdField);e?B.trackIdField=e.name:(B.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:B}}))}B.startTimeField||B.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:B}}),B=null)}const R=z.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.Gw}:null;this._createDefaultAttributes=(0,c.GA)(F,w);const E={warnings:t,featureErrors:[],layerDefinition:{...x,drawingInfo:(0,c.w7)(v),templates:(0,c.QD)(F),extent:S,geometryType:v,objectIdField:w,fields:r,hasZ:d,hasM:o,timeInfo:B,dateFieldsTimeReference:R},assignedObjectIds:{}};if(this._queryEngine=new h.U({fieldsIndex:f.c.fromLayerJSON({fields:r,timeInfo:B,dateFieldsTimeReference:R}),geometryType:v,hasM:o,hasZ:d,objectIdField:w,spatialReference:I,featureStore:new l.c({geometryType:v,hasM:o,hasZ:d}),timeInfo:B,cacheSpatialQueries:!0}),!s?.length)return this._nextObjectId=a.q,E;const T=(0,a.A)(w,s);return this._nextObjectId=T+1,await(0,u.Qv)(s,I),this._loadInitialFeatures(E,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,d.Oo)(t,s),(0,u.Qv)(e.adds,t),(0,u.Qv)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let s,i,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.Ce)(e)),o||(o=e.spatialReference),null==s&&(s=b(e)),null==i&&(i=I(e)),r&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some((t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i}))&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:i,hasZ:s}}async _loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:l,featureStore:h,fieldsIndex:c}=this._queryEngine,f=[];for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.Ce)(i.geometry)){e.featureErrors.push((0,d.or)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,d.uo)(c,t,i.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[a]),null!=i.geometry&&(i.geometry=(0,u.yU)(i.geometry,i.geometry.spatialReference,l)),f.push(i))}h.addMany((0,o.od)([],f,s,r,i,a));const{fullExtent:p,timeExtent:m}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,m){const{start:t,end:s}=m;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,d.GI)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:l,spatialReference:h,featureStore:c,fieldsIndex:f}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&i!==(0,n.Ce)(r.geometry)){s.push((0,d.or)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,d.uo)(f,t,r.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[l];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??h;r.geometry=(0,u.yU)((0,d.OM)(r.geometry,e),e,h)}p.push(r),s.push((0,d.GI)(r.attributes[l]))}}c.addMany((0,o.od)([],p,i,a,r,l))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:l,featureStore:h,fieldsIndex:c}=this._queryEngine;for(const f of t){const{attributes:t,geometry:p}=f,m=t?.[a];if(null==m){e.push((0,d.or)(`Identifier field ${a} missing`));continue}if(!h.has(m)){e.push((0,d.or)(`Feature with object id ${m} missing`));continue}const y=(0,o.G0)(h.getFeature(m),s,r,i);if(null!=p){if(s!==(0,n.Ce)(p)){e.push((0,d.or)("Incorrect geometry type."));continue}const t=p.spatialReference??l;y.geometry=(0,u.yU)((0,d.OM)(p,t),t,l)}if(t){const s=(0,d.uo)(c,y.attributes,t);if(s){e.push(s);continue}}h.add((0,o.ye)(y,s,r,i,a)),e.push((0,d.GI)(m))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},17724:(e,t,s)=>{s.d(t,{G4:()=>d,GA:()=>h,QD:()=>c,w7:()=>a});var i=s(9456),n=s(62088),r=s(13136),o=s(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,i.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.ct)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},49372:(e,t,s)=>{s.d(t,{GI:()=>h,OM:()=>m,Oo:()=>y,or:()=>l,uo:()=>d});var i=s(39180),n=s(60544),r=s(564);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.YT)(o,a);if(e)return l((0,r.Ke)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return l(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.iW)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.AZ)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.gp)(e)&&"string"==typeof t&&(s=(0,i.sn)(t)),(0,r.OJ)(s)}let p;function m(e,t){if(!e||!(0,n.U3)(t))return e;if("rings"in e||"paths"in e){if(null==p)throw new TypeError("geometry engine not loaded");return p.simplify(t,e)}return e}async function y(e,t){!(0,n.U3)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==p&&(p=await Promise.all([s.e(984),s.e(2704)]).then(s.bind(s,82704))),p}()}},81976:(e,t,s)=>{s.d(t,{Q:()=>r,y:()=>n});var i=s(6704);function n(e){return{geometryType:(0,i.Ce)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.uG)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},21980:(e,t,s)=>{s.d(t,{OW:()=>a,UX:()=>o,sR:()=>r}),s(6220),s(47620);var i=s(62088),n=s(28176);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.as)(e):(0,i.ct)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a({item:e},t,s).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(20572)},9504:(e,t,s)=>{s.d(t,{MZ:()=>r,aV:()=>u,gF:()=>a,gP:()=>l,qe:()=>n,wp:()=>h,yq:()=>o});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5672,8528],{8528:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11004:(e,t,s)=>{s.d(t,{o:()=>n});var i=s(74452);class n{constructor(e,t){this._storage=new i.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,s)=>{s.d(t,{ML:()=>o,kB:()=>a});var i,n,r=s(24680);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=h+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let h=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},3024:(e,t,s)=>{s.d(t,{U:()=>o});var i=s(92400),n=s(24680),r=s(85304);class o{constructor(e=9,t){this._compareMinX=l,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),v.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(p(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;p(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!p(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(p(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),v.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=v.pop()??0,o=!0),s.leaf&&(t=(0,i.IP)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),v.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else w.pushArray(s.children);s=w.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new R(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const h=Math.ceil(n/r),u=h*Math.ceil(Math.sqrt(r));y(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);y(e,n,t,h,this._compareMinY);for(let s=n;s<=t;s+=h){const n=Math.min(s+h-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),h=m(e,o)-a;h<n?(n=h,i=a<i?a:i,s=o):h===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=this._chooseSubtree(n,this._data,t,S);for(r.children.push(e),u(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;this._adjustParentBBoxes(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),h=s.leaf?new R(o):new B(o);h.height=s.height,a(s,this._toBBox),a(h,this._toBBox),t?e.data[t-1].children.push(h):this._splitRoot(s,h)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),u=_(t,a),l=d(t)+d(a);u<i?(i=u,r=o,n=l<n?l:n):u===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:l,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.IP)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new R([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function l(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function p(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.c,w=new n.c,S=new n.c,v=new n.c({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class b extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.is}}class R extends b{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends b{constructor(e){super(),this.children=e,this.leaf=!1}}},57896:(e,t,s)=>{s.d(t,{Eq:()=>d,KG:()=>p,_8:()=>g,_I:()=>u,aE:()=>h,du:()=>_,on:()=>c}),s(40196),s(2952);var i=s(60976),n=s(38912),r=s(70680),o=s(10860),a=s(37176);function h(e,t,s={}){return l(e,t,s,f)}function u(e,t,s={}){return l(e,t,s,m)}function l(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.oR)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.M9)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,l=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.oR)(l),s(e)}const f=h(e,((e,s)=>{c(),(0,i.sh)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return l=(0,n.uU)((()=>{f.remove(),c()})),l}function d(e,t){return function(e,t,s){if((0,o.wv)(s))return Promise.reject((0,o.Uh)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.oR)(a)}return new Promise(((i,r)=>{a=(0,n.Ip)([(0,o.wD)(s,(()=>{h(),r((0,o.Uh)())})),l(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,m,t)}function f(e){return!0}function m(e){return!!e}s(41168);const _={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},20480:(e,t,s)=>{s.d(t,{WW:()=>v});var i=s(6220),n=s(20744),r=s(66360),o=s(7488),a=s(48516),h=s(44048),u=s(60544),l=s(29120),c=(s(60708),s(2600)),d=s(6704),f=s(21980),m=s(28176),_=s(81976);const g=()=>r.c.getLogger("esri.geometry.support.normalizeUtils");function p(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.c||e instanceof o.c)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.c(e)}const s=(0,h.iM)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/h,l=(o-n)/h,c=h/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=l*i+n,a=u*i+r;s.push([o,a])}const e=(h+Math.floor(c-1)*t)/2,i=l*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.c({rings:i,spatialReference:e.spatialReference}):new a.c({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,l.aq)(t,!0)}return s&&(e=(0,h.wb)(e,s)),e}function w(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,h.yK)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,h.yK)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,h.yK)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,h.yK)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,h.iM)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,h.yK)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(p(e))for(const t of(0,h.iM)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,h.iM)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,p,y,I,b,R,B,M,z=0;const C=[],F=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,p=(0,u.Nq)(r),y=r.isWebMercator,R=y?102100:4326,I=h.Hh[R].maxX,b=h.Hh[R].minX,B=h.Hh[R].plus180Line,M=h.Hh[R].minus180Line),p)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(w(t.clone(),I,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,I,b))),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,p);F.push(e.rings?new o.c(e):e)}else if(t.extent){const e=t.extent,s=(0,h.yK)(e.xmin,b)*(2*I);let i=0===s?t.clone():(0,h.wb)(t.clone(),s);e.offset(s,0),e.intersects(B)&&e.xmax!==I?(z=e.xmax>z?e.xmax:z,i=x(i,y),C.push(i),F.push("cut")):e.intersects(M)&&e.xmin!==b?(z=e.xmax*(2*I)>z?e.xmax*(2*I):z,i=x(i,y,360),C.push(i),F.push("cut")):F.push(i)}else F.push(t.clone());else F.push(t);else F.push(t);let E=(0,h.yK)(z,I),T=-90;const X=E,L=new a.c;for(;E>0;){const e=360*E-180;L.addPath([[e,T],[e,-1*T]]),T*=-1,E--}if(C.length>0&&X>0){const t=S(C,await async function(e,t,s,i){const n=(0,f.UX)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.um)(r),target:JSON.stringify({geometryType:(0,d.Ce)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.c)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,d.h4)(e);return t.spatialReference=r,t}))}}(n,C,L,s)),i=[],r=[];for(let s=0;s<F.length;s++){const n=F[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(y?(0,l.w7)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,m.as)(e):e,n=t[0].spatialReference,r=(0,d.Ce)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.um)(n),geometries:JSON.stringify((0,_.y)(t))}},{data:a}=await(0,c.c)(i.path+"/simplify",o);return(0,_.Q)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(y?(0,l.w7)(o.shift()):o.shift())}return a}const Y=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)Y.push(t);else{const e=C.shift();Y.push(!0===y?(0,l.w7)(e):e)}}return Y}},44048:(e,t,s)=>{s.d(t,{Hh:()=>o,iM:()=>u,wb:()=>h,yK:()=>a});var i=s(48516),n=s(56156),r=s(6704);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.c({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator}),minus180Line:new i.c({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.c({paths:[[[180,-180],[180,180]]],spatialReference:n.c.WGS84}),minus180Line:new i.c({paths:[[[-180,-180],[-180,180]]],spatialReference:n.c.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Cs)(e)?e.rings:e.paths}},6904:(e,t,s)=>{s.d(t,{c:()=>a});var i=s(9456),n=s(3024),r=s(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,i.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,s)=>{s.d(t,{c:()=>m});var i=s(92400),n=s(20744),r=s(77860),o=s(66360),a=s(77048),h=s(83372),u=s(97088),l=s(6904),c=s(83624),d=s(51752);const f=(0,a.Su)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new l.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Qv)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.C_)(null!=i?i:(0,h.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.C_)((0,h.Su)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},45160:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var i=s(40196),n=s(20744),r=s(66360),o=s(10860),a=s(69504),h=s(60544),u=s(97088),l=s(9107),c=s(7684),d=s(47302),f=s(35756),m=s(49372),_=s(44808),g=s(16424),p=s(28484);const y="esri.layers.WFSLayer";class x{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:s,getFeatureOutputFormat:i,fields:r,geometryType:a,featureType:h,maxRecordCount:u,maxTotalRecordCount:f,maxPageCount:m,objectIdField:y,customParameters:x}=e,{spatialReference:S,getFeatureSpatialReference:v}=(0,_.i4)(s,h,e.spatialReference);try{await(0,c.Qv)(v,S)}catch{throw new n.c("unsupported-projection","Projection not supported",{inSpatialReference:v,outSpatialReference:S})}(0,o.wp)(t),this._customParameters=x,this._featureType=h,this._fieldsIndex=g.c.fromLayerJSON({fields:r,dateFieldsTimeReference:r.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:p.Gw}:null}),this._geometryType=a,this._getFeatureUrl=s,this._getFeatureOutputFormat=i,this._getFeatureSpatialReference=v,this._maxRecordCount=u,this._maxTotalRecordCount=f,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=S;let I=await this._snapshotFeatures(t);if(I.errors.length>0&&(this._supportsPagination=!1,I=await this._snapshotFeatures(t),I.errors.length>0))throw I.errors[0];return this._queryEngine=new d.U({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:S,timeInfo:null,featureStore:new l.c({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(I.features),{warnings:w(I),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new n.c("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,i.kn)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of w(e))r.c.getLogger(y).warn(new a.c("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&r.c.getLogger(y).warn(new a.c("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,s=this._maxTotalRecordCount,i=this._maxPageCount,n=this._supportsPagination?await(0,_.gp)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let r=[];const a=[];if(null==n)try{r=await this._singleQuery(t)}catch(e){(0,o.mA)(e)||a.push(e)}else{const e=Math.min(n,s),h=function*(e,t,s){for(let i=0;i<t;i++)yield e._pageQuery(i,s)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),i)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,s){let i=e.next();for(;!i.done;){try{const e=await i.value;t.push(...e)}catch(e){(0,o.mA)(e)||s.push(e)}i=e.next()}}(h,r,a))))}return(0,o.wp)(t),{features:r,totalRecordCount:n,maxTotalRecordCount:s,maxPageCount:i,errors:a}}async _singleQuery(e){const t=await(0,_.Az)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,{signal:e})}async _pageQuery(e,t){const s=e*this._maxRecordCount,i=await(0,_.Az)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:s,count:this._maxRecordCount,signal:t});return this._processGeoJSON(i,{startIndex:s,signal:t})}_processGeoJSON(e,t){(0,f.ii)(e,this._getFeatureSpatialReference.wkid);const{startIndex:s,signal:i}=t;(0,o.wp)(i);const n=(0,f.MN)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,h.yK)(this._spatialReference,this._getFeatureSpatialReference))for(const e of n)null!=e.geometry&&(e.geometry=(0,u.C)((0,c.yU)((0,u.qw)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let r=s??1;for(const e of n){const t={};(0,m.uo)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=r++)}return n}}function w(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},49372:(e,t,s)=>{s.d(t,{GI:()=>l,OM:()=>_,Oo:()=>g,or:()=>h,uo:()=>d});var i=s(39180),n=s(60544),r=s(564);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function h(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function l(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.YT)(o,a);if(e)return h((0,r.Ke)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.iW)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.AZ)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.gp)(e)&&"string"==typeof t&&(s=(0,i.sn)(t)),(0,r.OJ)(s)}let m;function _(e,t){if(!e||!(0,n.U3)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function g(e,t){!(0,n.U3)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([s.e(984),s.e(2704)]).then(s.bind(s,82704))),m}()}},48212:(e,t,s)=>{s.d(t,{Ab:()=>x,Ej:()=>d,K0:()=>c,M9:()=>f,Wq:()=>_,YB:()=>l,_2:()=>p,oR:()=>g,q_:()=>m,wn:()=>y});var i=s(28176),n=s(91952);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function l(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.as)(e),s=t?.path.match(a)||t?.path.match(h);if(!s)return null;const[,n,o,u,l]=s,c=o.indexOf("/");return{title:f(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=l&&""!==l?parseInt(l,10):null,url:{path:n}}}function d(e){const t=(0,i.as)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=f(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.ai)((0,i.kN)(e,t)):e}function p(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.kN)(t,e.logger);const s=(0,i.as)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.ai)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.kn)(r.url,s,e.layerId.toString()))}function x(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},81976:(e,t,s)=>{s.d(t,{Q:()=>r,y:()=>n});var i=s(6704);function n(e){return{geometryType:(0,i.Ce)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.uG)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},21980:(e,t,s)=>{s.d(t,{OW:()=>a,UX:()=>o,sR:()=>r}),s(6220),s(47620);var i=s(62088),n=s(28176);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.as)(e):(0,i.ct)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a({item:e},t,s).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(20572)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5672,8528],{8528:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11004:(e,t,s)=>{s.d(t,{o:()=>n});var i=s(74452);class n{constructor(e,t){this._storage=new i.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,s)=>{s.d(t,{ML:()=>o,kB:()=>a});var i,n,r=s(24680);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=h+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let h=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},3024:(e,t,s)=>{s.d(t,{U:()=>o});var i=s(92400),n=s(24680),r=s(85304);class o{constructor(e=9,t){this._compareMinX=l,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),w.prune(),S.prune(),v.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(p(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;p(e,o)&&(s.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!p(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(p(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new R([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),v.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=v.pop()??0,o=!0),s.leaf&&(t=(0,i.IP)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),v.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else w.pushArray(s.children);s=w.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new R(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new B([]);o.height=i;const h=Math.ceil(n/r),u=h*Math.ceil(Math.sqrt(r));y(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);y(e,n,t,h,this._compareMinY);for(let s=n;s<=t;s+=h){const n=Math.min(s+h-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),h=m(e,o)-a;h<n?(n=h,i=a<i?a:i,s=o):h===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=this._chooseSubtree(n,this._data,t,S);for(r.children.push(e),u(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;this._adjustParentBBoxes(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),h=s.leaf?new R(o):new B(o);h.height=s.height,a(s,this._toBBox),a(h,this._toBBox),t?e.data[t-1].children.push(h):this._splitRoot(s,h)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),u=_(t,a),l=d(t)+d(a);u<i?(i=u,r=o,n=l<n?l:n):u===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:l,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.IP)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new R([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function l(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function p(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.c,w=new n.c,S=new n.c,v=new n.c({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class b extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.is}}class R extends b{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends b{constructor(e){super(),this.children=e,this.leaf=!1}}},57896:(e,t,s)=>{s.d(t,{Eq:()=>d,KG:()=>p,_8:()=>g,_I:()=>u,aE:()=>h,du:()=>_,on:()=>c}),s(40196),s(2952);var i=s(60976),n=s(38912),r=s(70680),o=s(10860),a=s(37176);function h(e,t,s={}){return l(e,t,s,f)}function u(e,t,s={}){return l(e,t,s,m)}function l(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.oR)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.M9)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,l=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.oR)(l),s(e)}const f=h(e,((e,s)=>{c(),(0,i.sh)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return l=(0,n.uU)((()=>{f.remove(),c()})),l}function d(e,t){return function(e,t,s){if((0,o.wv)(s))return Promise.reject((0,o.Uh)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.oR)(a)}return new Promise(((i,r)=>{a=(0,n.Ip)([(0,o.wD)(s,(()=>{h(),r((0,o.Uh)())})),l(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,m,t)}function f(e){return!0}function m(e){return!!e}s(41168);const _={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},20480:(e,t,s)=>{s.d(t,{WW:()=>v});var i=s(6220),n=s(20744),r=s(66360),o=s(7488),a=s(48516),h=s(44048),u=s(60544),l=s(29120),c=(s(60708),s(2600)),d=s(6704),f=s(21980),m=s(28176),_=s(81976);const g=()=>r.c.getLogger("esri.geometry.support.normalizeUtils");function p(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.c||e instanceof o.c)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.c(e)}const s=(0,h.iM)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/h,l=(o-n)/h,c=h/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=l*i+n,a=u*i+r;s.push([o,a])}const e=(h+Math.floor(c-1)*t)/2,i=l*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.c({rings:i,spatialReference:e.spatialReference}):new a.c({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,l.aq)(t,!0)}return s&&(e=(0,h.wb)(e,s)),e}function w(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,h.yK)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,h.yK)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,h.yK)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,h.yK)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,h.iM)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,h.yK)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(p(e))for(const t of(0,h.iM)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,h.iM)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,p,y,I,b,R,B,M,z=0;const C=[],F=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,p=(0,u.Nq)(r),y=r.isWebMercator,R=y?102100:4326,I=h.Hh[R].maxX,b=h.Hh[R].minX,B=h.Hh[R].plus180Line,M=h.Hh[R].minus180Line),p)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(w(t.clone(),I,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,I,b))),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,p);F.push(e.rings?new o.c(e):e)}else if(t.extent){const e=t.extent,s=(0,h.yK)(e.xmin,b)*(2*I);let i=0===s?t.clone():(0,h.wb)(t.clone(),s);e.offset(s,0),e.intersects(B)&&e.xmax!==I?(z=e.xmax>z?e.xmax:z,i=x(i,y),C.push(i),F.push("cut")):e.intersects(M)&&e.xmin!==b?(z=e.xmax*(2*I)>z?e.xmax*(2*I):z,i=x(i,y,360),C.push(i),F.push("cut")):F.push(i)}else F.push(t.clone());else F.push(t);else F.push(t);let E=(0,h.yK)(z,I),T=-90;const X=E,L=new a.c;for(;E>0;){const e=360*E-180;L.addPath([[e,T],[e,-1*T]]),T*=-1,E--}if(C.length>0&&X>0){const t=S(C,await async function(e,t,s,i){const n=(0,f.UX)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.um)(r),target:JSON.stringify({geometryType:(0,d.Ce)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.c)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,d.h4)(e);return t.spatialReference=r,t}))}}(n,C,L,s)),i=[],r=[];for(let s=0;s<F.length;s++){const n=F[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(y?(0,l.w7)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,m.as)(e):e,n=t[0].spatialReference,r=(0,d.Ce)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.um)(n),geometries:JSON.stringify((0,_.y)(t))}},{data:a}=await(0,c.c)(i.path+"/simplify",o);return(0,_.Q)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(y?(0,l.w7)(o.shift()):o.shift())}return a}const Y=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)Y.push(t);else{const e=C.shift();Y.push(!0===y?(0,l.w7)(e):e)}}return Y}},44048:(e,t,s)=>{s.d(t,{Hh:()=>o,iM:()=>u,wb:()=>h,yK:()=>a});var i=s(48516),n=s(56156),r=s(6704);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.c({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator}),minus180Line:new i.c({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.c({paths:[[[180,-180],[180,180]]],spatialReference:n.c.WGS84}),minus180Line:new i.c({paths:[[[-180,-180],[-180,180]]],spatialReference:n.c.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Cs)(e)?e.rings:e.paths}},6904:(e,t,s)=>{s.d(t,{c:()=>a});var i=s(9456),n=s(3024),r=s(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,i.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,s)=>{s.d(t,{c:()=>m});var i=s(92400),n=s(20744),r=s(77860),o=s(66360),a=s(77048),h=s(83372),u=s(97088),l=s(6904),c=s(83624),d=s(16736);const f=(0,a.Su)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new l.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Qv)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.C_)(null!=i?i:(0,h.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.C_)((0,h.Su)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},45160:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var i=s(40196),n=s(20744),r=s(66360),o=s(10860),a=s(69504),h=s(60544),u=s(97088),l=s(9107),c=s(7684),d=s(47302),f=s(35756),m=s(49372),_=s(44808),g=s(16424),p=s(28484);const y="esri.layers.WFSLayer";class x{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:s,getFeatureOutputFormat:i,fields:r,geometryType:a,featureType:h,maxRecordCount:u,maxTotalRecordCount:f,maxPageCount:m,objectIdField:y,customParameters:x}=e,{spatialReference:S,getFeatureSpatialReference:v}=(0,_.i4)(s,h,e.spatialReference);try{await(0,c.Qv)(v,S)}catch{throw new n.c("unsupported-projection","Projection not supported",{inSpatialReference:v,outSpatialReference:S})}(0,o.wp)(t),this._customParameters=x,this._featureType=h,this._fieldsIndex=g.c.fromLayerJSON({fields:r,dateFieldsTimeReference:r.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:p.Gw}:null}),this._geometryType=a,this._getFeatureUrl=s,this._getFeatureOutputFormat=i,this._getFeatureSpatialReference=v,this._maxRecordCount=u,this._maxTotalRecordCount=f,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=S;let I=await this._snapshotFeatures(t);if(I.errors.length>0&&(this._supportsPagination=!1,I=await this._snapshotFeatures(t),I.errors.length>0))throw I.errors[0];return this._queryEngine=new d.U({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:S,timeInfo:null,featureStore:new l.c({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(I.features),{warnings:w(I),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new n.c("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,i.kn)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of w(e))r.c.getLogger(y).warn(new a.c("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&r.c.getLogger(y).warn(new a.c("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,s=this._maxTotalRecordCount,i=this._maxPageCount,n=this._supportsPagination?await(0,_.gp)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let r=[];const a=[];if(null==n)try{r=await this._singleQuery(t)}catch(e){(0,o.mA)(e)||a.push(e)}else{const e=Math.min(n,s),h=function*(e,t,s){for(let i=0;i<t;i++)yield e._pageQuery(i,s)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),i)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,s){let i=e.next();for(;!i.done;){try{const e=await i.value;t.push(...e)}catch(e){(0,o.mA)(e)||s.push(e)}i=e.next()}}(h,r,a))))}return(0,o.wp)(t),{features:r,totalRecordCount:n,maxTotalRecordCount:s,maxPageCount:i,errors:a}}async _singleQuery(e){const t=await(0,_.Az)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,{signal:e})}async _pageQuery(e,t){const s=e*this._maxRecordCount,i=await(0,_.Az)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:s,count:this._maxRecordCount,signal:t});return this._processGeoJSON(i,{startIndex:s,signal:t})}_processGeoJSON(e,t){(0,f.ii)(e,this._getFeatureSpatialReference.wkid);const{startIndex:s,signal:i}=t;(0,o.wp)(i);const n=(0,f.MN)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,h.yK)(this._spatialReference,this._getFeatureSpatialReference))for(const e of n)null!=e.geometry&&(e.geometry=(0,u.C)((0,c.yU)((0,u.qw)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let r=s??1;for(const e of n){const t={};(0,m.uo)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=r++)}return n}}function w(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},49372:(e,t,s)=>{s.d(t,{GI:()=>l,OM:()=>_,Oo:()=>g,or:()=>h,uo:()=>d});var i=s(39180),n=s(60544),r=s(564);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function h(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function l(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.YT)(o,a);if(e)return h((0,r.Ke)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.iW)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.AZ)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.gp)(e)&&"string"==typeof t&&(s=(0,i.sn)(t)),(0,r.OJ)(s)}let m;function _(e,t){if(!e||!(0,n.U3)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function g(e,t){!(0,n.U3)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([s.e(984),s.e(2704)]).then(s.bind(s,82704))),m}()}},48212:(e,t,s)=>{s.d(t,{Ab:()=>x,Ej:()=>d,K0:()=>c,M9:()=>f,Wq:()=>_,YB:()=>l,_2:()=>p,oR:()=>g,q_:()=>m,wn:()=>y});var i=s(28176),n=s(91952);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function l(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.as)(e),s=t?.path.match(a)||t?.path.match(h);if(!s)return null;const[,n,o,u,l]=s,c=o.indexOf("/");return{title:f(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=l&&""!==l?parseInt(l,10):null,url:{path:n}}}function d(e){const t=(0,i.as)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=f(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.ai)((0,i.kN)(e,t)):e}function p(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.kN)(t,e.logger);const s=(0,i.as)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.ai)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.kn)(r.url,s,e.layerId.toString()))}function x(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},81976:(e,t,s)=>{s.d(t,{Q:()=>r,y:()=>n});var i=s(6704);function n(e){return{geometryType:(0,i.Ce)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.uG)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},21980:(e,t,s)=>{s.d(t,{OW:()=>a,UX:()=>o,sR:()=>r}),s(6220),s(47620);var i=s(62088),n=s(28176);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.as)(e):(0,i.ct)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a({item:e},t,s).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(20572)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8828,2259],{3615:(e,a,r)=>{r.d(a,{q:()=>n});var t=r(66668);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.S)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:r}=this;if(r.has(a))return r.get(a);const t=await e.fetchData();return r.set(a,t),t}async fetchCustomParameters(e,a){const r=await this.fetchItemData(e);return r&&"object"==typeof r&&(a?a(r):r.customParameters)||null}}},50420:(e,a,r)=>{r.d(a,{S:()=>o});var t=r(47620),n=r(2600),i=r(20744),s=r(10860),l=r(48212),c=r(54872),y=r(9764);async function o(e,a){const r=(0,l.K0)(e);if(!r)throw new i.c("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new y.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.c)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.CE)(e)}return null}(e);null!=i&&(r.portal=new c.c({url:i}));try{return r.load({signal:e.signal})}catch(e){return(0,s.CE)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const L=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new y.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.CE)(e),null}}(o);if(!L?.url)throw new i.c("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=L;const m=await d(L.url,o);return m.portalItem=L,m}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.c)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,l.K0)(e);if(!r)throw new i.c("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const c=u(a),y=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(y?.layers?.[0]||y?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.c)(t,r)},L=d("anonymous").catch((()=>d("no-prompt"))),[m,f]=await Promise.all([L,c]),p=f?.layers,S=m.data&&m.data.layers;if(!Array.isArray(S))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,S.length);e++)if(p[e].id===s)return{serverUrl:t,layerId:S[e].id}}else if(null!=s&&s<S.length)return{serverUrl:t,layerId:S[s].id};throw new Error("could not find matching associated sublayer")}},58828:(e,a,r)=>{r.d(a,{e:()=>T,populateOperationalLayers:()=>o});var t=r(2952),n=(r(9456),r(3615)),i=r(83928),s=r(9764);function l(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=r(12259),y=r(97824);async function o(e,a,r){if(!a)return;const t=a.map((e=>async function(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await T(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new s.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.q.FeatureLayer,n=await t(),s=a.featureCollection,l=s?.showLegend,c=s?.layers?.map(((t,i)=>{const s=new n;s.read(t,r);const c={...r,ignoreDefaults:!0};return G(s,e,a,i,c),null!=l&&s.read({showLegend:l},c),s}));e.layers.addMany(c??[])}(t,a,r.context)),await(0,y.M)(t,r.context),t}(await g(e,a),e,a)}(e,r))),n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",OGCFeatureLayer:"OGCFeatureLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",GeoJSON:"GeoJSONLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},L={ArcGISFeatureLayer:"FeatureLayer"},m={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},f={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"UnsupportedLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},p={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"UnsupportedLayer"},S={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},w={...f,LinkChartLayer:"LinkChartLayer"},h={...p},I={...S};async function g(e,a){const r=a.context,t=M(r);let y=e.layerType||e.type;!y&&a?.defaultLayerType&&(y=a.defaultLayerType);const o=t[y];let u=o?i.q[o]:i.q.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new s.default({id:e.itemId,portal:a});await r.load();const t=(await(0,c.q)(r,new n.q)).className||"UnknownLayer";u=i.q[t]}}else"ArcGISFeatureLayer"===y?function(e){return l(e,"notes")}(e)||function(e){return l(e,"markup")}(e)?u=i.q.MapNotesLayer:function(e){return l(e,"route")}(e)?u=i.q.RouteLayer:b(e)&&(u=i.q.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.q.WMTSLayer:"WFS"===y&&"2.0.0"!==e.wfsInfo?.version&&(u=i.q.UnsupportedLayer);return u()}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function M(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=m;break;case"ground":a=d;break;case"tables":a=L;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=I;break;case"tables":a=h;break;default:a=w}break;default:switch(e.layerContainerType){case"basemap":a=S;break;case"tables":a=p;break;default:a=f}}return a}async function T(e,a,r){const n=new t.c,i=o(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},83928:(e,a,r)=>{r.d(a,{q:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3912)]).then(r.bind(r,48388))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(8644),r.e(5928)]).then(r.bind(r,10948))).default,CatalogLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(2848),r.e(5468),r.e(572),r.e(2907)]).then(r.bind(r,20324))).default,CSVLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1744)]).then(r.bind(r,79468))).default,DimensionLayer:async()=>(await Promise.all([r.e(5612),r.e(7832)]).then(r.bind(r,28320))).default,ElevationLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(8380)]).then(r.bind(r,47104))).default,FeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(8348)]).then(r.bind(r,672))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(6528)]).then(r.bind(r,92768))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(7988),r.e(7148),r.e(2672)]).then(r.bind(r,43984))).default,GroupLayer:async()=>(await Promise.all([r.e(5612),r.e(7456)]).then(r.bind(r,44080))).default,ImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(2848),r.e(6128),r.e(9056),r.e(3291)]).then(r.bind(r,7896))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(6128),r.e(7048),r.e(9056),r.e(5496)]).then(r.bind(r,82744))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(5612),r.e(9644),r.e(7024)]).then(r.bind(r,96584))).default,KMLLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(9032)]).then(r.bind(r,53688))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(5612),r.e(3536)]).then(r.bind(r,91884))).default,LinkChartLayer:async()=>(await Promise.all([r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(9512),r.e(3220),r.e(1512),r.e(6680),r.e(8080)]).then(r.bind(r,54192))).default,MapImageLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(1248),r.e(3089)]).then(r.bind(r,3089))).default,MapNotesLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(9516)]).then(r.bind(r,37784))).default,MediaLayer:async()=>(await Promise.all([r.e(5612),r.e(2364)]).then(r.bind(r,66664))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3160),r.e(8224)]).then(r.bind(r,56288))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(1244)]).then(r.bind(r,1244))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1740)]).then(r.bind(r,75432))).default,PointCloudLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(2296)]).then(r.bind(r,21680))).default,RouteLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(6352)]).then(r.bind(r,40900))).default,SceneLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(8624),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(7424),r.e(9780),r.e(8644),r.e(712)]).then(r.bind(r,3688))).default,StreamLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3460)]).then(r.bind(r,18e3))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(6556),r.e(5368),r.e(2608)]).then(r.bind(r,8444))).default,TileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(2968),r.e(1248),r.e(0)]).then(r.bind(r,5e4))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(5612),r.e(7752)]).then(r.bind(r,71316))).default,UnknownLayer:async()=>(await r.e(6584).then(r.bind(r,56584))).default,UnsupportedLayer:async()=>(await r.e(2456).then(r.bind(r,12456))).default,VectorTileLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(3780),r.e(6055),r.e(7936)]).then(r.bind(r,65632))).default,VoxelLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(8256)]).then(r.bind(r,59496))).default,WFSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(4808),r.e(3688)]).then(r.bind(r,53440))).default,WMSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(280)]).then(r.bind(r,85024))).default,WMTSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(4832)]).then(r.bind(r,54832))).default,WebTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632)]).then(r.bind(r,32896))).default}},67632:(e,a,r)=>{r.d(a,{AX:()=>l,Ur:()=>u,cr:()=>s,eW:()=>i,k1:()=>y,mg:()=>c,oD:()=>d,qi:()=>n,wp:()=>o});var t=r(50420);function n(e){const a={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(a.layerType="OrientedImageryLayer"),a}async function i(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||t?.layers?.map(n),e.tables=e.tables||t?.tables?.map(n)}return e}function s(e){const{layers:a,tables:r}=e;return a?.length?a[0].id:r?.length?r[0].id:null}function l(e){if(!e)return null;const{layers:a,tables:r}=e;return a?.length?a[0]:r?.length?r[0]:null}function c(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function o(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}function u(e){return e?.layers?.filter((({layerType:e})=>"CatalogLayer"===e)).map((({id:e})=>e))}async function d(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(n)}const{serverUrl:i,portalItem:s}=await(0,t.S)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==i)return a.tables=[],a;if(!a.tables&&s){const e=await s.fetchData();if(e?.tables)a.tables=e.tables.map(n);else{const t=await r.fetchServiceMetadata(i,{customParameters:l(e)?.customParameters});a.tables=t?.tables?.map(n)}}if(a.tables)for(const e of a.tables)e.url=`${i}/${e.id}`;return a}},12259:(e,a,r)=>{r.d(a,{fromItem:()=>u,q:()=>d});var t=r(20744),n=r(50420),i=r(3615),s=r(71068),l=r(83928),c=r(9764),y=r(67632),o=r(46940);async function u(e){!e.portalItem||e.portalItem instanceof c.default||(e={...e,portalItem:new c.default(e.portalItem)});const a=await async function(e){await e.load();const a=new i.q;return async function(e){const a=e.className,r=l.q[a];return{constructor:await r(),properties:e.properties}}(await d(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,o._S)(e,"Map Notes"),r=(0,o._S)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,o._S)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,y.mg)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const r=await L(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),s=i.cacheType?.toLowerCase(),l=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===s||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const r=await L(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.S)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(s.Wr))if(e.typeKeywords.includes(a))return{className:s.Wr[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,y.AX)(e)?.customParameters))});return{className:s.Wr[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new t.c("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function L(e,a,r){const{url:t,type:n}=e,i="Feature Service"===n;if(!t)return{};if(/\/\d+$/.test(t)){if(i){const r=await a.fetchServiceMetadata(t,{customParameters:await a.fetchCustomParameters(e,(e=>(0,y.AX)(e)?.customParameters))});if("Oriented Imagery Layer"===r.type)return{id:r.id,className:"OrientedImageryLayer",sourceJSON:r}}return{}}await e.load();let s=await a.fetchItemData(e);if(i){const e=await(0,y.eW)(s,t,a),r=m(e);if("object"==typeof r){const a=(0,y.k1)(e),t=(0,y.wp)(e),n=(0,y.Ur)(e);r.className=null!=r.id&&a.includes(r.id)?"SubtypeGroupLayer":null!=r.id&&t?.includes(r.id)?"OrientedImageryLayer":null!=r.id&&n?.includes(r.id)?"CatalogLayer":"FeatureLayer"}return r}if("Scene Service"===n&&(s=await(0,y.oD)(e,s,a)),(0,y.mg)(s)>0)return m(s);const l=await a.fetchServiceMetadata(t);return r&&(l.tables=await r()),m(l)}function m(e){return 1===(0,y.mg)(e)&&{id:(0,y.cr)(e)}}},97824:(e,a,r)=>{r.d(a,{M:()=>s});var t=r(40196),n=r(10860),i=r(69504);async function s(e,a,r){const s=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(s&&"unique-value"===s.type&&s.styleOrigin){const l=await(0,t.aG)(s.populateFromStyle());if((0,n.wp)(r),!1===l.ok){const r=l.error;a?.messages&&a.messages.push(new i.c("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},66668:(e,a,r)=>{r.d(a,{S:()=>n});var t=r(2600);async function n(e,a){const{data:r}=await(0,t.c)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8828,2259],{3615:(e,a,r)=>{r.d(a,{q:()=>n});var t=r(66668);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.S)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:r}=this;if(r.has(a))return r.get(a);const t=await e.fetchData();return r.set(a,t),t}async fetchCustomParameters(e,a){const r=await this.fetchItemData(e);return r&&"object"==typeof r&&(a?a(r):r.customParameters)||null}}},50420:(e,a,r)=>{r.d(a,{S:()=>o});var t=r(47620),n=r(2600),i=r(20744),s=r(10860),l=r(48212),c=r(54872),y=r(9764);async function o(e,a){const r=(0,l.K0)(e);if(!r)throw new i.c("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new y.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.c)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.CE)(e)}return null}(e);null!=i&&(r.portal=new c.c({url:i}));try{return r.load({signal:e.signal})}catch(e){return(0,s.CE)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const L=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new y.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.CE)(e),null}}(o);if(!L?.url)throw new i.c("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=L;const m=await d(L.url,o);return m.portalItem=L,m}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.c)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,l.K0)(e);if(!r)throw new i.c("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const c=u(a),y=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(y?.layers?.[0]||y?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.c)(t,r)},L=d("anonymous").catch((()=>d("no-prompt"))),[m,f]=await Promise.all([L,c]),p=f?.layers,S=m.data&&m.data.layers;if(!Array.isArray(S))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,S.length);e++)if(p[e].id===s)return{serverUrl:t,layerId:S[e].id}}else if(null!=s&&s<S.length)return{serverUrl:t,layerId:S[s].id};throw new Error("could not find matching associated sublayer")}},58828:(e,a,r)=>{r.d(a,{e:()=>T,populateOperationalLayers:()=>o});var t=r(2952),n=(r(9456),r(3615)),i=r(83928),s=r(9764);function l(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=r(12259),y=r(97824);async function o(e,a,r){if(!a)return;const t=a.map((e=>async function(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await T(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new s.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.q.FeatureLayer,n=await t(),s=a.featureCollection,l=s?.showLegend,c=s?.layers?.map(((t,i)=>{const s=new n;s.read(t,r);const c={...r,ignoreDefaults:!0};return G(s,e,a,i,c),null!=l&&s.read({showLegend:l},c),s}));e.layers.addMany(c??[])}(t,a,r.context)),await(0,y.M)(t,r.context),t}(await g(e,a),e,a)}(e,r))),n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",OGCFeatureLayer:"OGCFeatureLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",GeoJSON:"GeoJSONLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},L={ArcGISFeatureLayer:"FeatureLayer"},m={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},f={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"UnsupportedLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},p={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"UnsupportedLayer"},S={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},w={...f,LinkChartLayer:"LinkChartLayer"},h={...p},I={...S};async function g(e,a){const r=a.context,t=M(r);let y=e.layerType||e.type;!y&&a?.defaultLayerType&&(y=a.defaultLayerType);const o=t[y];let u=o?i.q[o]:i.q.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new s.default({id:e.itemId,portal:a});await r.load();const t=(await(0,c.q)(r,new n.q)).className||"UnknownLayer";u=i.q[t]}}else"ArcGISFeatureLayer"===y?function(e){return l(e,"notes")}(e)||function(e){return l(e,"markup")}(e)?u=i.q.MapNotesLayer:function(e){return l(e,"route")}(e)?u=i.q.RouteLayer:b(e)&&(u=i.q.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.q.WMTSLayer:"WFS"===y&&"2.0.0"!==e.wfsInfo?.version&&(u=i.q.UnsupportedLayer);return u()}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function M(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=m;break;case"ground":a=d;break;case"tables":a=L;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=I;break;case"tables":a=h;break;default:a=w}break;default:switch(e.layerContainerType){case"basemap":a=S;break;case"tables":a=p;break;default:a=f}}return a}async function T(e,a,r){const n=new t.c,i=o(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},83928:(e,a,r)=>{r.d(a,{q:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3912)]).then(r.bind(r,48388))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(8644),r.e(5928)]).then(r.bind(r,10948))).default,CatalogLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(2848),r.e(5468),r.e(572),r.e(2907)]).then(r.bind(r,20324))).default,CSVLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1744)]).then(r.bind(r,79468))).default,DimensionLayer:async()=>(await Promise.all([r.e(5612),r.e(7832)]).then(r.bind(r,28320))).default,ElevationLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(8380)]).then(r.bind(r,47104))).default,FeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(8348)]).then(r.bind(r,672))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(6528)]).then(r.bind(r,92768))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(7988),r.e(7148),r.e(2672)]).then(r.bind(r,43984))).default,GroupLayer:async()=>(await Promise.all([r.e(5612),r.e(7456)]).then(r.bind(r,44080))).default,ImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(2848),r.e(6128),r.e(9056),r.e(3291)]).then(r.bind(r,7896))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(6128),r.e(7048),r.e(9056),r.e(5496)]).then(r.bind(r,82744))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(5612),r.e(9644),r.e(7024)]).then(r.bind(r,96584))).default,KMLLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(9032)]).then(r.bind(r,53688))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(5612),r.e(3536)]).then(r.bind(r,91884))).default,LinkChartLayer:async()=>(await Promise.all([r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(9512),r.e(3220),r.e(4608),r.e(6680),r.e(8080)]).then(r.bind(r,54192))).default,MapImageLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(1248),r.e(3089)]).then(r.bind(r,3089))).default,MapNotesLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(9516)]).then(r.bind(r,37784))).default,MediaLayer:async()=>(await Promise.all([r.e(5612),r.e(2364)]).then(r.bind(r,66664))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3160),r.e(8224)]).then(r.bind(r,56288))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(1244)]).then(r.bind(r,1244))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(2664),r.e(6556),r.e(672),r.e(1740)]).then(r.bind(r,75432))).default,PointCloudLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(2296)]).then(r.bind(r,21680))).default,RouteLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(236),r.e(6352)]).then(r.bind(r,40900))).default,SceneLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(8624),r.e(3180),r.e(9644),r.e(8344),r.e(9420),r.e(7424),r.e(9780),r.e(8644),r.e(712)]).then(r.bind(r,3688))).default,StreamLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(3460)]).then(r.bind(r,18e3))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2664),r.e(6556),r.e(5368),r.e(2608)]).then(r.bind(r,8444))).default,TileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(2848),r.e(5468),r.e(2968),r.e(1248),r.e(0)]).then(r.bind(r,5e4))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(5612),r.e(7752)]).then(r.bind(r,71316))).default,UnknownLayer:async()=>(await r.e(6584).then(r.bind(r,56584))).default,UnsupportedLayer:async()=>(await r.e(2456).then(r.bind(r,12456))).default,VectorTileLayer:async()=>(await Promise.all([r.e(5612),r.e(2968),r.e(3780),r.e(6055),r.e(7936)]).then(r.bind(r,65632))).default,VoxelLayer:async()=>(await Promise.all([r.e(5612),r.e(2692),r.e(9644),r.e(8256)]).then(r.bind(r,59496))).default,WFSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(9364),r.e(4984),r.e(5776),r.e(236),r.e(8976),r.e(9512),r.e(4808),r.e(3688)]).then(r.bind(r,53440))).default,WMSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(2692),r.e(7988),r.e(7148),r.e(280)]).then(r.bind(r,85024))).default,WMTSLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632),r.e(4832)]).then(r.bind(r,54832))).default,WebTileLayer:async()=>(await Promise.all([r.e(5612),r.e(5156),r.e(3632)]).then(r.bind(r,32896))).default}},67632:(e,a,r)=>{r.d(a,{AX:()=>l,Ur:()=>u,cr:()=>s,eW:()=>i,k1:()=>y,mg:()=>c,oD:()=>d,qi:()=>n,wp:()=>o});var t=r(50420);function n(e){const a={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(a.layerType="OrientedImageryLayer"),a}async function i(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||t?.layers?.map(n),e.tables=e.tables||t?.tables?.map(n)}return e}function s(e){const{layers:a,tables:r}=e;return a?.length?a[0].id:r?.length?r[0].id:null}function l(e){if(!e)return null;const{layers:a,tables:r}=e;return a?.length?a[0]:r?.length?r[0]:null}function c(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function o(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}function u(e){return e?.layers?.filter((({layerType:e})=>"CatalogLayer"===e)).map((({id:e})=>e))}async function d(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(n)}const{serverUrl:i,portalItem:s}=await(0,t.S)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==i)return a.tables=[],a;if(!a.tables&&s){const e=await s.fetchData();if(e?.tables)a.tables=e.tables.map(n);else{const t=await r.fetchServiceMetadata(i,{customParameters:l(e)?.customParameters});a.tables=t?.tables?.map(n)}}if(a.tables)for(const e of a.tables)e.url=`${i}/${e.id}`;return a}},12259:(e,a,r)=>{r.d(a,{fromItem:()=>u,q:()=>d});var t=r(20744),n=r(50420),i=r(3615),s=r(71068),l=r(83928),c=r(9764),y=r(67632),o=r(46940);async function u(e){!e.portalItem||e.portalItem instanceof c.default||(e={...e,portalItem:new c.default(e.portalItem)});const a=await async function(e){await e.load();const a=new i.q;return async function(e){const a=e.className,r=l.q[a];return{constructor:await r(),properties:e.properties}}(await d(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,o._S)(e,"Map Notes"),r=(0,o._S)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,o._S)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,y.mg)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const r=await L(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),s=i.cacheType?.toLowerCase(),l=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===s||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const r=await L(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.S)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(s.Wr))if(e.typeKeywords.includes(a))return{className:s.Wr[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,y.AX)(e)?.customParameters))});return{className:s.Wr[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new t.c("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function L(e,a,r){const{url:t,type:n}=e,i="Feature Service"===n;if(!t)return{};if(/\/\d+$/.test(t)){if(i){const r=await a.fetchServiceMetadata(t,{customParameters:await a.fetchCustomParameters(e,(e=>(0,y.AX)(e)?.customParameters))});if("Oriented Imagery Layer"===r.type)return{id:r.id,className:"OrientedImageryLayer",sourceJSON:r}}return{}}await e.load();let s=await a.fetchItemData(e);if(i){const e=await(0,y.eW)(s,t,a),r=m(e);if("object"==typeof r){const a=(0,y.k1)(e),t=(0,y.wp)(e),n=(0,y.Ur)(e);r.className=null!=r.id&&a.includes(r.id)?"SubtypeGroupLayer":null!=r.id&&t?.includes(r.id)?"OrientedImageryLayer":null!=r.id&&n?.includes(r.id)?"CatalogLayer":"FeatureLayer"}return r}if("Scene Service"===n&&(s=await(0,y.oD)(e,s,a)),(0,y.mg)(s)>0)return m(s);const l=await a.fetchServiceMetadata(t);return r&&(l.tables=await r()),m(l)}function m(e){return 1===(0,y.mg)(e)&&{id:(0,y.cr)(e)}}},97824:(e,a,r)=>{r.d(a,{M:()=>s});var t=r(40196),n=r(10860),i=r(69504);async function s(e,a,r){const s=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(s&&"unique-value"===s.type&&s.styleOrigin){const l=await(0,t.aG)(s.populateFromStyle());if((0,n.wp)(r),!1===l.ok){const r=l.error;a?.messages&&a.messages.push(new i.c("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},66668:(e,a,r)=>{r.d(a,{S:()=>n});var t=r(2600);async function n(e,a){const{data:r}=await(0,t.c)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
|
|
@@ -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};
|