@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.3
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/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0610691a0c0d9fbbd6d2.js → 013de5c2955801b329b3.js} +1 -1
- package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +1 -0
- package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +1 -0
- package/assets/esri/core/workers/chunks/0e65e00173b66c7fec2e.js +1 -0
- package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
- package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +1 -0
- package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
- package/assets/esri/core/workers/chunks/{da57eba2fe25495ea217.js → 2faa8f08f2fdaac3f4af.js} +1 -1
- package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 3160af63b860b52db389.js} +1 -1
- package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
- package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
- package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → 50f910797c17c3028521.js} +1 -1
- package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
- package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
- package/assets/esri/core/workers/chunks/89001ee8d3f69fa03cc1.js +1 -0
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
- package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
- package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +1 -0
- package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
- package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +1 -0
- package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +1 -0
- package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
- package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
- package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
- package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
- package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
- package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
- package/assets/esri/core/workers/chunks/ff42585e1b1d0c5497af.js +1 -0
- package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
- package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/interfaces.d.ts +84 -0
- package/kernel.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/request.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/webmap/initialViewPropertiesUtils.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
- package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
- package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
- package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
- package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
- package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
- package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
- package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
- package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
- package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
- package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
- package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
- package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
- package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7589,5732,9880],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,r=s(43697),n=s(96674),o=s(70586),a=s(35463),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),c=s(30556);let d=i=class extends n.wq{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===i&&s===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),s=(0,o.yw)(this.end,(t=>{const s=(0,a.JE)(t,e);return t.getTime()===s.getTime()?s:(0,a.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(r>=t&&r<=s?o=r:t>=r&&t<=n&&(o=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:r,end:n}=this;return null!=r&&(s.start=(0,a.Nm)(r,e,t)),null!=n&&(s.end=(0,a.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,u.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,u.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=i=(0,r._)([(0,h.j)("esri.TimeExtent")],d);const p=new d,_=new d({start:void 0,end:void 0}),f=d},99880:(e,t,s)=>{s.d(t,{V:()=>l});var i=s(68773),r=(s(3172),s(20102)),n=s(92604),o=s(81271);const a=n.Z.getLogger("esri.assets");function l(e){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new r.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,e)}},5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>r});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},25929:(e,t,s)=>{s.d(t,{M:()=>_,a:()=>g,e:()=>d,f:()=>r,i:()=>h,p:()=>c,r:()=>o,t:()=>n,w:()=>a});var i=s(81271);function r(e,t){const s=t&&t.url&&t.url.path;if(e&&s&&(e=(0,i.hF)(e,s,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const s=(0,i.PF)(e,t.portalItem.itemUrl);null!=s&&u.test(s)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(s).path)}return p(e,t&&t.portal)}function n(e,t,s=_.YES){if(null==e)return e;!(0,i.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let r=(0,i.hF)(e);if(t){const s=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(s){const n=p(s,t.portal),o=p(r,t.portal);r=(0,i.PF)(o,n,n),null!=r&&r!==o&&r!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(r)}}return r=d(r,t?.portal),(0,i.YP)(r)&&(r=(0,i.Fv)(r)),t?.resources&&t?.portalItem&&!(0,i.YP)(r)&&!(0,i.HK)(r)&&s===_.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r),compress:!1}),r}function o(e,t,s){return r(e,s)}function a(e,t,s,i){const r=n(e,i);void 0!==r&&(t[s]=r)}const l=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function h(e){const t=e?.match(l)??null;return t?.[1]??null}function c(e){const t=e?.match(l)??null;if(null==t)return null;const s=t[2],r=s.lastIndexOf("/");if(-1===r){const{path:e,extension:t}=(0,i.fZ)(s);return{prefix:null,filename:e,extension:t}}const{path:n,extension:o}=(0,i.fZ)(s.slice(r+1));return{prefix:s.slice(0,r),filename:n,extension:o}}function d(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const s=`${t.urlKey}.${t.customBaseUrl}`,r=(0,i.TI)();return(0,i.D6)(r,`${r.scheme}://${s}`)?(0,i.Ie)(e,t.portalHostname,s):(0,i.Ie)(e,s,t.portalHostname)}var _,f;(f=_||(_={}))[f.YES=0]="YES",f[f.NO=1]="NO";const g=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return _},ensureMainOnlineDomain:d,fromJSON:r,itemIdFromResourceUrl:h,prefixAndFilenameFromResourceUrl:c,read:o,toJSON:n,write:a},Symbol.toStringTag,{value:"Module"}))},91303:(e,t,s)=>{var i;s.d(t,{Y:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},2368:(e,t,s)=>{s.d(t,{J:()=>h,j:()=>c});var i=s(43697),r=s(92036),n=(s(80442),s(22974)),o=(s(92604),s(70586)),a=s(31263),l=s(1153),u=s(52011);const h=e=>{let t=class extends e{clone(){const e=(0,o.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,s=e.store,i={},r=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const h=this[e];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,n.Vo)(h),null!=h&&null==c||(l===a.s3.DEFAULTS?r.set(e,c):i[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(r.size){const e=(0,l.vw)(u)?.store;if(e)for(const[t,s]of r)e.set(t,s,a.s3.DEFAULTS)}return u}};return t=(0,i._)([(0,u.j)("esri.core.Clonable")],t),t};let c=class extends(h(r.Z)){};c=(0,i._)([(0,u.j)("esri.core.Clonable")],c)},32448:(e,t,s)=>{s.d(t,{Z:()=>l});var i=s(43697),r=s(92036),n=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),e.EventedAccessor=s}(a||(a={}));const l=a},3920:(e,t,s)=>{s.d(t,{p:()=>u,r:()=>h});var i=s(43697),r=s(92036),n=s(61247),o=s(5600),a=s(52011),l=s(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new n.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,a.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(r.Z)){};h=(0,i._)([(0,a.j)("esri.core.HandleOwner")],h)},13867:(e,t,s)=>{s.d(t,{z:()=>r});var i=s(69801);class r{constructor(e,t){this._storage=new i.WJ,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(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,r,n=s(44553);(r=i||(i={}))[r.ALL=0]="ALL",r[r.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,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 sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}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 n.Z,this._users=new n.Z}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,0),this._checkSizeLimits()}put(e,t,s,r,n){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,i.ALL)),r>this._maxSize)return void this._notifyRemove(t,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return void console.warn("Refusing to cache entry with invalid size "+r);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:s,size:r,lifetime:a,lives:a}),this._size+=r,e.size+=r,this._checkSizeLimits()}updateSize(e,t,s,r){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===s){for(this._size-=n.size,e.size-=n.size;r>this._maxSize;){const e=this._notifyRemove(t,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}n.size=r,this._size+=r,e.size+=r,this._checkSizeLimits()}}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}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 r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forAll((s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=t[n]||0;t[n]=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 r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const r=Object.keys(t);r.sort(((e,s)=>t[s]-t[e])),r.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,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.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 r=this._notifyRemove(e,t.entry,i.SOME);null!=r&&r>0&&(this._size+=r,s&&(s.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},10661:(e,t,s)=>{s.d(t,{s:()=>r});var i=s(42100);class r extends i.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66643:(e,t,s)=>{s.d(t,{Ed:()=>u,UI:()=>h,mt:()=>_,q6:()=>p,vr:()=>f});var i=s(43697),r=s(92036),n=s(70586),o=s(95330),a=s(5600),l=s(52011);function u(e,t,s){return(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))}async function h(e,t,s){return(await(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function _(e){try{return c(await e)}catch(e){return(0,o.r9)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends r.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],g.prototype,"value",null),(0,i._)([(0,a.Cb)()],g.prototype,"error",null),(0,i._)([(0,a.Cb)()],g.prototype,"finished",null),(0,i._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},43090:(e,t,s)=>{function i(e){return 32+e.length}function r(e){if(!e)return 0;let t=l;for(const s in e)if(e.hasOwnProperty(s)){const r=e[s];switch(typeof r){case"string":t+=i(r);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function n(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let s=u;for(let i=0;i<t;i++)s+=o(e[i]);return s}(e);let t=l;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e){switch(typeof e){case"object":return n(e);case"string":return i(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return u+e.length*t}s.d(t,{Ul:()=>n,do:()=>a,f2:()=>r});const l=32,u=32},24133:(e,t,s)=>{s.d(t,{Q:()=>a});var i=s(67676),r=s(70586),n=s(44553),o=s(88764);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,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(),b.prune(),w.prune(),E.prune(),x.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(b.clear();s;){for(let r=0,n=s.children.length;r<n;r++){const n=s.children[r],o=s.leaf?i(n):n;y(e,o)&&(s.leaf?t(n):m(e,o)?this._all(n,t):b.push(n))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(b.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],n=t.leaf?s(r):r;if(y(e,n)){if(t.leaf||m(e,n))return!0;b.push(r)}}t=b.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 T([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(E.clear(),x.clear();s||E.length>0;){if(s||(s=(0,r.j0)(E.pop()),n=E.data[E.length-1],o=x.pop()??0,a=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),E.push(s),this._condense(E),this;a||s.leaf||!m(s,l)?n?(o++,s=n.children[o],a=!1):s=null:(E.push(s),x.push(o),o=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 r=s-t+1;let n=this._maxEntries;if(r<=n){const i=new T(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(i-1)));const o=new F([]);o.height=i;const a=Math.ceil(r/n),u=a*Math.ceil(Math.sqrt(n));v(e,t,s,u,this._compareMinX);for(let r=t;r<=s;r+=u){const t=Math.min(r+u-1,s);v(e,r,t,a,this._compareMinY);for(let s=r;s<=t;s+=a){const r=Math.min(s+a-1,t);o.children.push(this._build(e,s,r,i-1))}}return l(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,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=f(e,o)-a;l<r?(r=l,i=a<i?a:i,s=o):l===r&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,r=s?e:i(e);E.clear();const n=this._chooseSubtree(r,this._data,t,E);for(n.children.push(e),h(n,r);t>=0&&E.data[t].children.length>this._maxEntries;)this._split(E,t),t--;this._adjustParentBBoxes(r,E,t)}_split(e,t){const s=e.data[t],i=s.children.length,r=this._minEntries;this._chooseSplitAxis(s,r,i);const n=this._chooseSplitIndex(s,r,i);if(!n)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(n,s.children.length-n),a=s.leaf?new T(o):new F(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,r,n;i=r=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,n=o,r=h<r?h:r):l===i&&h<r&&(r=h,n=o)}return n}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,r)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const r=this._toBBox,n=u(e,0,t,r),o=u(e,s-t,s,r);let a=_(n)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(n,e.leaf?r(t):t),a+=_(n)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?r(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)h(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 r=e.data[t-1],n=r.children;n.splice((0,i.cq)(n,s,n.length,r.indexHint),1)}else this.clear();else l(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 l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,r){r||(r=new T([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<s;o++)n=e.children[o],h(r,e.leaf?i(n):n);return r}function h(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 c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(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 g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-s)*Math.max(0,n-i)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,n){const a=[t,s];for(;a.length;){const t=(0,r.j0)(a.pop()),s=(0,r.j0)(a.pop());if(t-s<=i)continue;const l=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,l,s,t,n),a.push(s,l,l,t)}}const b=new n.Z,w=new n.Z,E=new n.Z,x=new n.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>g,on:()=>c,tX:()=>m});var i=s(91460),r=s(50758),n=s(70586),o=s(95330),a=s(26258);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,_)}function h(e,t,s={},i){let r=null;const o=s.once?(e,s)=>{i(e)&&((0,n.hw)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return r}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,n.hw)(h),s(e)}const p=l(e,((e,s)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,r.kB)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((i,n)=>{a=(0,r.AL)([(0,o.fu)(s,(()=>{l(),n((0,o.zE)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(87538);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},72762:(e,t,s)=>{s.d(t,{t:()=>c});var i=s(43697),r=s(92036),n=s(61247),o=s(50758),a=s(17445),l=s(1654),u=s(5600),h=s(52011);let c=class extends r.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new n.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,s={}){return this._installWatch(e,t,s,a.YP)}addWhen(e,t,s={}){return this._installWatch(e,t,s,a.gx)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const r=++this._handleId;return this._handles.add([(0,a.on)(e,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],r),(0,o.kB)((()=>this._handles.remove(r)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this._handles.remove(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,s={},i){const r=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,r);const n=i(e,t,s);return this._handles.add(n,r),(0,o.kB)((()=>this._handles.remove(r)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,a.YP)(e,s,{sync:!0,equals:()=>!1});return this._handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,i._)([(0,u.Cb)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,i._)([(0,h.j)("esri.core.support.WatchUpdatingTracking")],c);const d=-42},35463:(e,t,s)=>{s.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=r[s],{getter:n,setter:o,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[n]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),r=s(24133),n=s(24470);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 r.Q(9,(0,i.Z)("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,n.cS)();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()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>g});var i=s(20102),r=s(32448),n=s(92604),o=s(60437),a=s(24470),l=s(98732),u=s(37549),h=s(29730),c=s(70272),d=s(5428);const p={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,h.Y)(new d.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var _=s(11490);const f=(0,o.Ue)();class g{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=p}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,r]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:r,spatialReference:(0,_.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}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,o.JR)(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 n.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let r;if(this._markedIds.add(t),s?(e.displayId=s.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,l.$)(null!=r?r:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_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}}},1231:(e,t,s)=>{s.d(t,{Z:()=>g});var i,r=s(43697),n=s(35454),o=s(96674),a=s(5600),l=s(75215),u=(s(67676),s(80442),s(36030)),h=s(71715),c=s(52011),d=s(72729),p=s(86719);const _=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,r._)([(0,h.r)("description")],f.prototype,"readDescription",null),(0,r._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],f.prototype,"domain",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r._)([(0,u.J)(p.v)],f.prototype,"type",void 0),(0,r._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,r._)([(0,h.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,r._)([(0,c.j)("esri.layers.support.Field")],f);const g=f},39450:(e,t,s)=>{s.d(t,{Z:()=>h});var i,r=s(43697),n=s(96674),o=s(5600),a=s(75215),l=(s(67676),s(80442),s(52011));let u=i=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,r._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,s)=>{s.d(t,{Z:()=>C});var i,r=s(43697),n=s(35454),o=s(96674),a=s(67900),l=s(5600),u=s(75215),h=(s(67676),s(80442),s(71715)),c=s(52011),d=s(30556),p=s(94139),_=s(82971),f=s(24470),g=s(8744),m=s(40488),y=s(39450),v=s(43077);const b=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=i=class extends o.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=_.Z.WebMercator,numLODs:o=24}=e;if(!(0,g.JY)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.Z(0,0,n),size:[r,r],spatialReference:n})}const l=(0,g.C5)(n),u=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new p.Z(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),h=1/(39.37*(0,a.c9)(n)*96),c=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;c.push(new y.Z({level:e,scale:t,resolution:i}))}else{let e=(0,g.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(o/t);c.push(new y.Z({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,r=s*h;c.push(new y.Z({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:c,origin:u,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e}))),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=s;else if((0,g.fS)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,i=s;else{const e=(0,m.iV)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,i=s}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return i||(i=new v.f(null,0,0,0,(0,f.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const r=e.level-s.level,n=s.resolution*this.size[0]/2**r,o=s.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],r=this.lods.length;for(let e=0;e<r;e++){const i=this.lods[e],r=i.resolution*t;s.push(new y.Z({level:i.level,scale:i.scale,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var E,x;(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r._)([(0,l.Cb)({type:p.Z,json:{write:!0}})],w.prototype,"origin",void 0),(0,r._)([(0,h.r)("origin")],w.prototype,"readOrigin",null),(0,r._)([(0,l.Cb)({type:[y.Z],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r._)([(0,l.Cb)({readOnly:!0})],w.prototype,"scales",void 0),(0,r._)([(0,l.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r._)([(0,h.r)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r._)([(0,d.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],w.prototype,"writeSize",null),(0,r._)([(0,l.Cb)({type:_.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=i=(0,r._)([(0,c.j)("esri.layers.support.TileInfo")],w),E=w||(w={}),(x=E.ExtrapolateOptions||(E.ExtrapolateOptions={}))[x.NONE=0]="NONE",x[x.POWER_OF_TWO=1]="POWER_OF_TWO";const C=w},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,r=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=r}}},66677:(e,t,s)=>{s.d(t,{B5:()=>h,DR:()=>d,G:()=>v,M8:()=>f,Nm:()=>g,Qc:()=>c,XG:()=>m,a7:()=>_,ld:()=>p,wH:()=>y});var i=s(81271),r=s(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(n),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),s=t.path.match(a)||t.path.match(l);if(!s)return null;const[,r,o,u,h]=s,c=o.indexOf("/");return{title:p(-1!==c?o.slice(c+1):o),serverType:n[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:r}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function _(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(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 f(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.Qj)((0,i.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),r=c(s.path);let n;if(null!=r)null!=r.sublayer&&null==e.layer.layerId&&(n=r.sublayer),t=r.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:n}}function y(e,t,s,n,o){(0,r.w)(t,n,"url",o),n.url&&null!=e.layerId&&(n.url=(0,i.v_)(n.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),r=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return s&&(i||r||n)}},72729:(e,t,s)=>{s.d(t,{im:()=>C,V5:()=>x}),s(80442);var i,r=s(43697),n=s(22974),o=s(5600),a=(s(75215),s(36030)),l=s(52011),u=s(96674);s(67676);let h=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,r._)([(0,l.j)("esri.layers.support.CodedValue")],h);const c=new(s(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.J)(c)],d.prototype,"type",void 0),d=(0,r._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,r._)([(0,o.Cb)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,r._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,r._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(92604),s(20102);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,r._)([(0,a.J)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,r._)([(0,l.j)("esri.layers.support.InheritedDomain")],y);const v=y;var b;let w=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,r._)([(0,a.J)({range:"range"})],w.prototype,"type",void 0),w=b=(0,r._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const E=w,x={key:"type",base:p,typeMap:{range:w,"coded-value":g,inherited:v}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return E.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,s)=>{s.d(t,{v:()=>i});const i=new(s(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99282:(e,t,s)=>{s.d(t,{a:()=>n});var i=s(67900),r=s(68441);const n={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",r.sv.radius)}},28694:(e,t,s)=>{s.d(t,{p:()=>r});var i=s(69285);function r(e,t,s){if(!s||!s.features||!s.hasZ)return;const r=(0,i.k)(s.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of s.features)r(e.geometry)}},86787:(e,t,s)=>{s.d(t,{Z:()=>b});var i,r=s(43697),n=s(35454),o=s(96674),a=s(70586),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),c=s(30556),d=s(35671);let p=i=class extends o.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,r._)([(0,h.j)("esri.layers.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(12541);const m=(0,n.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new n.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r._)([(0,l.Cb)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,u.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,c.c)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.Cb)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,r._)([(0,l.Cb)({type:g.f9,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,r._)([(0,h.j)("esri.layers.support.ElevationInfo")],v);const b=v},12541:(e,t,s)=>{s.d(t,{Z7:()=>r,f9:()=>n});var i=s(99282);function r(e){return 1/(i.a[e]||1)}const n=function(){const e=Object.keys(i.a);return e.sort(),e}()},65967:(e,t,s)=>{s.r(t),s.d(t,{default:()=>we});var i=s(43697),r=s(32448),n=s(61247),o=s(95330),a=s(17445),l=s(5600),u=(s(75215),s(67676)),h=(s(80442),s(52011)),c=s(72762),d=s(82971),p=s(57191),_=s(66202),f=s(11145),g=s(14165),m=s(86787),y=s(13867),v=s(30175),b=s(67900),w=s(12541);function E(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s,spatialReference:i}=t;return new C(e,s,i)}return new x}class x{async alignCandidates(e,t){return e}notifyElevationSourceChange(){}}class C{constructor(e,t,s){this._elevationInfo=e,this._alignPointsInFeatures=t,this.spatialReference=s,this._alignmentsCache=new y.z(1024),this._cacheVersion=0,this._metersPerVerticalUnit=(0,b._R)(s)}async alignCandidates(e,t){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t):(this._alignAbsoluteElevationCandidates(e,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t){const{offset:s,unit:i}=t;if(null==s)return;const r=s*((0,w.Z7)(i??"meters")/this._metersPerVerticalUnit);for(const t of e)switch(t.type){case"edge":t.start.z+=r,t.end.z+=r;continue;case"vertex":t.target.z+=r;continue}}async _alignComputedElevationCandidates(e,t){const s=new Map;for(const t of e)(0,v.s1)(s,t.objectId,F).push(t);const[i,r,n]=this._prepareQuery(s),a=await this._alignPointsInFeatures(i,t);if((0,o.k_)(t),n!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t);this._applyCacheAndResponse(i,a,r);const{drapedObjectIds:l,failedObjectIds:u}=a,h=[];for(const t of e){const{objectId:e}=t;l.has(e)&&"edge"===t.type&&(t.draped=!0),u.has(e)||h.push(t)}return h}_prepareQuery(e){const t=[],s=[];for(const[i,r]of e){const e=[];for(const t of r)this._addToQueriesOrCachedResult(i,t.target,e,s),"edge"===t.type&&(this._addToQueriesOrCachedResult(i,t.start,e,s),this._addToQueriesOrCachedResult(i,t.end,e,s));0!==e.length&&t.push({objectId:i,points:e})}return[t,s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=T(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new S(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=T(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function T(e,{x:t,y:s,z:i}){return`${e}-${t}-${s}-${i??0}}`}function F(){return[]}class I{filter(e,t){return t}notifyElevationSourceChange(){}}class O{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(M);return o.sort(B),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":R(i,t,s);continue;case"vertex":A(i,t,s);continue}return e}}function M(e){return e.distance<=1}function z(e=!1){return e?new O:new I}function R(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+r*u,c=s.y+n*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function A(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function B(e,t){return e.distance-t.distance}var j=s(22974),P=s(19153);function D(e=!1,t){return e?new H(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class H{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.z(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=k(t),n=r.get(e);if(n)for(const e of n)i.push((0,j.d9)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const n=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,o.k_)(t),n!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=k(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,j.d9)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function k(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,P.hP)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,P.hP)(r).toString()}default:return""}}var U=s(92036);let Y=class extends U.Z{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,l.Cb)()],Y.prototype,"updating",void 0),Y=(0,i._)([(0,h.j)("esri.core.AsyncSequence")],Y);var Z,L=s(66643),V=s(3920),X=s(50758),q=s(92604),J=s(6570),G=s(24470),W=s(98732),$=s(66677),Q=s(78760),K=s(34599);class ee{constructor(e,t){this.data=e,this.resolution=t,this.state={type:Z.CREATED},this.alive=!0}process(e){switch(this.state.type){case Z.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Z.FETCH_COUNT:break;case Z.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Z.FETCH_FEATURES:break;case Z.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case Z.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case Z.CREATED:case Z.FETCH_COUNT:return 0;case Z.FETCHED_COUNT:return this.state.featureCount;case Z.FETCH_FEATURES:return this.state.previous.featureCount;case Z.FETCHED_FEATURES:return this.state.features.length;case Z.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case Z.CREATED:return"created";case Z.FETCH_COUNT:return"fetch-count";case Z.FETCHED_COUNT:return"fetched-count";case Z.FETCH_FEATURES:return"fetch-features";case Z.FETCHED_FEATURES:return"fetched-features";case Z.DONE:return"done"}}_gotoFetchCount(e,t){return{type:Z.FETCH_COUNT,previous:e,task:(0,L.vr)((async e=>{const s=await(0,L.mt)(t.fetchCount(this,e));this.state.type===Z.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:Z.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:Z.FETCH_FEATURES,previous:e,task:(0,L.vr)((async s=>{const i=await(0,L.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===Z.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:Z.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:Z.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:Z.CREATED},e.type){case Z.CREATED:case Z.FETCHED_COUNT:case Z.FETCHED_FEATURES:case Z.DONE:break;case Z.FETCH_COUNT:case Z.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,G.oJ)(e,te),(0,G.kK)(this.data.extent,te))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(Z||(Z={}));const te=(0,G.Ue)();let se=class extends V.r{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this.updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._pendingEdits=new Y,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,u.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),a.Z_)}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.M8)(this.url))return;const e=(0,L.vr)((async e=>{try{const t=await(0,K.Vr)(this.url,new g.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=J.Z.fromJSON(t.data?.extent)}catch(e){(0,o.r9)(e),q.Z.getLogger(this).warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,X.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)));null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<ne}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(oe/(s*s))<ae}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<Z.FETCHED_COUNT&&this.updatingHandles.addPromise(s.process(e)),s.state.type<=Z.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new ee(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:re,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((r=>{e===r.attributes[t]&&(i=r.objectId??r.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.qp)(this.url,e,new Q.J({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:re,signal:t});return(0,W.lM)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.JT)(this.url,e,s,{query:this._configuration.customParameters,timeout:re,signal:t});return(0,W.h_)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.Z({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,G.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?g.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||ie);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"url",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"globalIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"store",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,l.Cb)()],se.prototype,"filter",null),(0,i._)([(0,l.Cb)()],se.prototype,"customParameters",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_configuration",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileInfo",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileSize",null),(0,i._)([(0,l.Cb)()],se.prototype,"tilesOfInterest",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"availability",void 0),(0,i._)([(0,l.Cb)()],se.prototype,"hasZ",null),se=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],se);const ie=2e3,re=6e5,ne=1e6,oe=25,ae=1;var le=s(43090),ue=s(91303),he=s(37549),ce=s(43077);class de{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let pe=class extends U.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*ue.Y.MEGABYTES,this._tileBounds=new he.H,this._tiles=new de,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,G.Ue)()}add(e,t){const s=[];for(const e of t)this._referenceFeature(e.objectId)===ve.ADDED&&s.push(e);this._addTileStorage(e,new Set(t.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,le.do)(e.lengths,4);return 32+(0,le.do)(e.coords,8)+t}(e.geometry)+(0,le.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(s),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new _e(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ve.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of i){const t=(0,W.$)(this._tmpBoundingRect,e.geometry,r,n);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0)){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,G.kK)((0,G.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new ge(e);if(this._tiles.has(e.id))return new ge(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,K.hH)(t,s,i);return this._tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,f.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const r=this._tiles.get(i)?.data;r&&this._tilesAreRelated(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new fe(e.level+1,n,o);s.updateTileInfo(r,f.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<ye&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s=0;this._forEachLeaf(e,(e=>{const i=this._tiles.get(e.id);if(i){s+=i.byteSize;for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,s),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s){const i=new me(s,e,this.extent);return this._collectMissingTilesRecurse(t,i,1),i.info}_collectMissingTilesRecurse(e,t,s){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,s);const i=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),i):this._collectMissingTilesRecurse(r,t,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ve.ADDED:ve.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ve.REMOVED):(t>0&&this._refCounts.set(e,t),ve.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,l.Cb)({constructOnly:!0})],pe.prototype,"featureStore",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"tileInfo",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"extent",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"maximumByteSize",void 0),pe=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],pe);class _e{constructor(e,t,s){this.data=e,this.objectIds=t,this.byteSize=s}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class ge{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,G.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class me{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new ge(t),null!=s&&(this._extent=(0,G.oJ)(s))}addMissing(e,t,s,i){const r=new ce.f(null,e,t,s);this._tileInfo.updateTileInfo(r,f.Z.ExtrapolateOptions.POWER_OF_TWO),null==r.extent||null!=this._extent&&!(0,G.kK)(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,G.SO)(r.extent))}}const ye=.18751;var ve;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ve||(ve={}));let be=class extends r.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,o.hh)(),this._elevationAligner=E(),this._elevationFilter=z(),this._symbologyCandidatesFetcher=D(),this._handles=new n.Z,this._updatingHandles=new c.t,this._editsUpdatingHandles=new c.t,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={points:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,o.k_)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,o.k_)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear(),this._handles?.destroy()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fields:r}=e.serviceInfo,{hasZ:n}=e,o=d.Z.fromJSON(e.spatialReference);this._spatialReference=o,this._featureStore=new p.Z({...e.serviceInfo,hasZ:n,hasM:!1}),this._queryEngine=new _.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:r,hasZ:n,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new se({store:new pe({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:o,sourceSpatialReference:d.Z.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=E(l,{elevationInfo:null!=e.elevationInfo?m.Z.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures,spatialReference:o}),this._elevationFilter=z(l),this._handles.add([(0,a.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),a.Z_),(0,a.YP)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){await this._whenSetup.promise,(0,o.k_)(t);const s=function(e){return{point:e.point,mode:e.mode,distance:e.distance,returnEdge:e.returnEdge,returnVertex:e.returnVertex,query:null!=e.filter?e.filter:{where:"1=1"}}}(e),i=null!=t?t.signal:null,r=await this._queryEngine.executeQueryForSnapping(s,i);(0,o.k_)(i);const n=await this._elevationAligner.alignCandidates(r.candidates,i);(0,o.k_)(i);const a=await this._symbologyCandidatesFetcher.fetch(n,i);(0,o.k_)(i);const l=0===a.length?n:n.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.Z.fromJSON(e.tileInfo):null,Ee}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.refresh(),Ee}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),await(0,a.N1)((()=>!this.updatingExcludingEdits),t),(0,o.k_)(t),Ee}async getDebugInfo(e,t){return(0,o.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t);const s=(0,o.hh)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),Ee}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,o.k_)(t),Ee}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Ee}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Ee}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Ee}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)()],be.prototype,"_isInitializing",void 0),be=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],be);const we=be,Ee={result:{}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1412,3172,9880],{99880:(t,e,n)=>{n.d(e,{V:()=>u});var r=n(68773),o=(n(3172),n(20102)),a=n(92604),s=n(81271);const i=a.Z.getLogger("esri.assets");function u(t){if(!r.default.assetsPath)throw i.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,s.v_)(r.default.assetsPath,t)}},46851:(t,e,n)=>{n.d(e,{R:()=>a,a:()=>c,g:()=>o,t:()=>u});let r=1e-6;function o(){return r}const a=Math.random,s=Math.PI/180,i=180/Math.PI;function u(t){return t*s}function c(t){return t*i}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:a,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:c,toRadian:u},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,s,i,u){return[t,e,n,r,o,a,s,i,u]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},52138:(t,e,n)=>{n.d(e,{A:()=>M,a:()=>u,d:()=>m,e:()=>h,f:()=>d,g:()=>p,h:()=>w,i:()=>s,j:()=>_,k:()=>l,m:()=>c,s:()=>a,t:()=>i,w:()=>f,y:()=>E,z:()=>S});var r=n(65617),o=n(46851);function a(t,e,n,r,o,a,s,i,u,c,f,l,h,d,m,M,b){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t[6]=i,t[7]=u,t[8]=c,t[9]=f,t[10]=l,t[11]=h,t[12]=d,t[13]=m,t[14]=M,t[15]=b,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function i(t,e){if(t===e){const n=e[1],r=e[2],o=e[3],a=e[6],s=e[7],i=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=o,t[13]=s,t[14]=i}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],i=e[5],u=e[6],c=e[7],f=e[8],l=e[9],h=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15],p=n*i-r*s,y=n*u-o*s,w=n*c-a*s,_=r*u-o*i,S=r*c-a*i,E=o*c-a*u,T=f*M-l*m,P=f*b-h*m,q=f*g-d*m,v=l*b-h*M,O=l*g-d*M,x=h*g-d*b;let I=p*x-y*O+w*v+_*q-S*P+E*T;return I?(I=1/I,t[0]=(i*x-u*O+c*v)*I,t[1]=(o*O-r*x-a*v)*I,t[2]=(M*E-b*S+g*_)*I,t[3]=(h*S-l*E-d*_)*I,t[4]=(u*q-s*x-c*P)*I,t[5]=(n*x-o*q+a*P)*I,t[6]=(b*w-m*E-g*y)*I,t[7]=(f*E-h*w+d*y)*I,t[8]=(s*O-i*q+c*T)*I,t[9]=(r*q-n*O-a*T)*I,t[10]=(m*S-M*w+g*p)*I,t[11]=(l*w-f*S-d*p)*I,t[12]=(i*P-s*v-u*T)*I,t[13]=(n*v-r*P+o*T)*I,t[14]=(M*y-m*_-b*p)*I,t[15]=(f*_-l*y+h*p)*I,t):null}function c(t,e,n){const r=e[0],o=e[1],a=e[2],s=e[3],i=e[4],u=e[5],c=e[6],f=e[7],l=e[8],h=e[9],d=e[10],m=e[11],M=e[12],b=e[13],g=e[14],p=e[15];let y=n[0],w=n[1],_=n[2],S=n[3];return t[0]=y*r+w*i+_*l+S*M,t[1]=y*o+w*u+_*h+S*b,t[2]=y*a+w*c+_*d+S*g,t[3]=y*s+w*f+_*m+S*p,y=n[4],w=n[5],_=n[6],S=n[7],t[4]=y*r+w*i+_*l+S*M,t[5]=y*o+w*u+_*h+S*b,t[6]=y*a+w*c+_*d+S*g,t[7]=y*s+w*f+_*m+S*p,y=n[8],w=n[9],_=n[10],S=n[11],t[8]=y*r+w*i+_*l+S*M,t[9]=y*o+w*u+_*h+S*b,t[10]=y*a+w*c+_*d+S*g,t[11]=y*s+w*f+_*m+S*p,y=n[12],w=n[13],_=n[14],S=n[15],t[12]=y*r+w*i+_*l+S*M,t[13]=y*o+w*u+_*h+S*b,t[14]=y*a+w*c+_*d+S*g,t[15]=y*s+w*f+_*m+S*p,t}function f(t,e,n){const r=n[0],o=n[1],a=n[2];if(e===t)t[12]=e[0]*r+e[4]*o+e[8]*a+e[12],t[13]=e[1]*r+e[5]*o+e[9]*a+e[13],t[14]=e[2]*r+e[6]*o+e[10]*a+e[14],t[15]=e[3]*r+e[7]*o+e[11]*a+e[15];else{const n=e[0],s=e[1],i=e[2],u=e[3],c=e[4],f=e[5],l=e[6],h=e[7],d=e[8],m=e[9],M=e[10],b=e[11];t[0]=n,t[1]=s,t[2]=i,t[3]=u,t[4]=c,t[5]=f,t[6]=l,t[7]=h,t[8]=d,t[9]=m,t[10]=M,t[11]=b,t[12]=n*r+c*o+d*a+e[12],t[13]=s*r+f*o+m*a+e[13],t[14]=i*r+l*o+M*a+e[14],t[15]=u*r+h*o+b*a+e[15]}return t}function l(t,e,n){const r=n[0],o=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function h(t,e,n,r){let a,s,i,u,c,f,l,h,d,m,M,b,g,p,y,w,_,S,E,T,P,q,v,O,x=r[0],I=r[1],A=r[2],L=Math.sqrt(x*x+I*I+A*A);return L<(0,o.g)()?null:(L=1/L,x*=L,I*=L,A*=L,a=Math.sin(n),s=Math.cos(n),i=1-s,u=e[0],c=e[1],f=e[2],l=e[3],h=e[4],d=e[5],m=e[6],M=e[7],b=e[8],g=e[9],p=e[10],y=e[11],w=x*x*i+s,_=I*x*i+A*a,S=A*x*i-I*a,E=x*I*i-A*a,T=I*I*i+s,P=A*I*i+x*a,q=x*A*i+I*a,v=I*A*i-x*a,O=A*A*i+s,t[0]=u*w+h*_+b*S,t[1]=c*w+d*_+g*S,t[2]=f*w+m*_+p*S,t[3]=l*w+M*_+y*S,t[4]=u*E+h*T+b*P,t[5]=c*E+d*T+g*P,t[6]=f*E+m*T+p*P,t[7]=l*E+M*T+y*P,t[8]=u*q+h*v+b*O,t[9]=c*q+d*v+g*O,t[10]=f*q+m*v+p*O,t[11]=l*q+M*v+y*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function d(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,n){if(0===e)return s(t);let r,a,i,u=n[0],c=n[1],f=n[2],l=Math.sqrt(u*u+c*c+f*f);return l<(0,o.g)()?null:(l=1/l,u*=l,c*=l,f*=l,r=Math.sin(e),a=Math.cos(e),i=1-a,t[0]=u*u*i+a,t[1]=c*u*i+f*r,t[2]=f*u*i-c*r,t[3]=0,t[4]=u*c*i-f*r,t[5]=c*c*i+a,t[6]=f*c*i+u*r,t[7]=0,t[8]=u*f*i+c*r,t[9]=c*f*i-u*r,t[10]=f*f*i+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,e,n){const r=e[0],o=e[1],a=e[2],s=e[3],i=r+r,u=o+o,c=a+a,f=r*i,l=r*u,h=r*c,d=o*u,m=o*c,M=a*c,b=s*i,g=s*u,p=s*c;return t[0]=1-(d+M),t[1]=l+p,t[2]=h-g,t[3]=0,t[4]=l-p,t[5]=1-(f+M),t[6]=m+b,t[7]=0,t[8]=h+g,t[9]=m-b,t[10]=1-(f+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const g=(0,r.c)();function p(t,e,n,r){const o=e[0],a=e[1],s=e[2],i=e[3],u=o+o,c=a+a,f=s+s,l=o*u,h=o*c,d=o*f,m=a*c,M=a*f,b=s*f,g=i*u,p=i*c,y=i*f,w=r[0],_=r[1],S=r[2];return t[0]=(1-(m+b))*w,t[1]=(h+y)*w,t[2]=(d-p)*w,t[3]=0,t[4]=(h-y)*_,t[5]=(1-(l+b))*_,t[6]=(M+g)*_,t[7]=0,t[8]=(d+p)*S,t[9]=(M-g)*S,t[10]=(1-(l+m))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function y(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function w(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function _(t,e){if(t===e)return!0;const n=t[0],r=t[1],a=t[2],s=t[3],i=t[4],u=t[5],c=t[6],f=t[7],l=t[8],h=t[9],d=t[10],m=t[11],M=t[12],b=t[13],g=t[14],p=t[15],y=e[0],w=e[1],_=e[2],S=e[3],E=e[4],T=e[5],P=e[6],q=e[7],v=e[8],O=e[9],x=e[10],I=e[11],A=e[12],L=e[13],C=e[14],k=e[15],R=(0,o.g)();return Math.abs(n-y)<=R*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-w)<=R*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(a-_)<=R*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-S)<=R*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(i-E)<=R*Math.max(1,Math.abs(i),Math.abs(E))&&Math.abs(u-T)<=R*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(c-P)<=R*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(f-q)<=R*Math.max(1,Math.abs(f),Math.abs(q))&&Math.abs(l-v)<=R*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(h-O)<=R*Math.max(1,Math.abs(h),Math.abs(O))&&Math.abs(d-x)<=R*Math.max(1,Math.abs(d),Math.abs(x))&&Math.abs(m-I)<=R*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(M-A)<=R*Math.max(1,Math.abs(M),Math.abs(A))&&Math.abs(b-L)<=R*Math.max(1,Math.abs(b),Math.abs(L))&&Math.abs(g-C)<=R*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(p-k)<=R*Math.max(1,Math.abs(p),Math.abs(k))}function S(t){const e=(0,o.g)(),n=t[0],r=t[1],a=t[2],s=t[4],i=t[5],u=t[6],c=t[8],f=t[9],l=t[10];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(r*r+i*i+f*f))<=e&&Math.abs(1-(a*a+u*u+l*l))<=e}function E(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const T=c,P=y;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],i=e[5],u=e[6],c=e[7],f=e[8],l=e[9],h=e[10],d=e[11],m=e[12],M=e[13],b=e[14],g=e[15];return t[0]=i*(h*g-d*b)-l*(u*g-c*b)+M*(u*d-c*h),t[1]=-(r*(h*g-d*b)-l*(o*g-a*b)+M*(o*d-a*h)),t[2]=r*(u*g-c*b)-i*(o*g-a*b)+M*(o*c-a*u),t[3]=-(r*(u*d-c*h)-i*(o*d-a*h)+l*(o*c-a*u)),t[4]=-(s*(h*g-d*b)-f*(u*g-c*b)+m*(u*d-c*h)),t[5]=n*(h*g-d*b)-f*(o*g-a*b)+m*(o*d-a*h),t[6]=-(n*(u*g-c*b)-s*(o*g-a*b)+m*(o*c-a*u)),t[7]=n*(u*d-c*h)-s*(o*d-a*h)+f*(o*c-a*u),t[8]=s*(l*g-d*M)-f*(i*g-c*M)+m*(i*d-c*l),t[9]=-(n*(l*g-d*M)-f*(r*g-a*M)+m*(r*d-a*l)),t[10]=n*(i*g-c*M)-s*(r*g-a*M)+m*(r*c-a*i),t[11]=-(n*(i*d-c*l)-s*(r*d-a*l)+f*(r*c-a*i)),t[12]=-(s*(l*b-h*M)-f*(i*b-u*M)+m*(i*h-u*l)),t[13]=n*(l*b-h*M)-f*(r*b-o*M)+m*(r*h-o*l),t[14]=-(n*(i*b-u*M)-s*(r*b-o*M)+m*(r*u-o*i)),t[15]=n*(i*h-u*l)-s*(r*h-o*l)+f*(r*u-o*i),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],i=t[6],u=t[7],c=t[8],f=t[9],l=t[10],h=t[11],d=t[12],m=t[13],M=t[14],b=t[15];return(e*s-n*a)*(l*b-h*M)-(e*i-r*a)*(f*b-h*m)+(e*u-o*a)*(f*M-l*m)+(n*i-r*s)*(c*b-h*d)-(n*u-o*s)*(c*M-l*d)+(r*u-o*i)*(c*m-f*d)},equals:_,exactEquals:w,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],s=n+n,i=r+r,u=o+o,c=n*s,f=r*s,l=r*i,h=o*s,d=o*i,m=o*u,M=a*s,b=a*i,g=a*u;return t[0]=1-l-m,t[1]=f+g,t[2]=h-b,t[3]=0,t[4]=f-g,t[5]=1-c-m,t[6]=d+M,t[7]=0,t[8]=h+b,t[9]=d-M,t[10]=1-c-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=g,r=-e[0],o=-e[1],a=-e[2],s=e[3],i=e[4],u=e[5],c=e[6],f=e[7],l=r*r+o*o+a*a+s*s;return l>0?(n[0]=2*(i*s+f*r+u*a-c*o)/l,n[1]=2*(u*s+f*o+c*r-i*a)/l,n[2]=2*(c*s+f*a+i*o-u*r)/l):(n[0]=2*(i*s+f*r+u*a-c*o),n[1]=2*(u*s+f*o+c*r-i*a),n[2]=2*(c*s+f*a+i*o-u*r)),b(t,e,n),t},fromRotation:m,fromRotationTranslation:b,fromRotationTranslationScale:p,fromRotationTranslationScaleOrigin:function(t,e,n,r,o){const a=e[0],s=e[1],i=e[2],u=e[3],c=a+a,f=s+s,l=i+i,h=a*c,d=a*f,m=a*l,M=s*f,b=s*l,g=i*l,p=u*c,y=u*f,w=u*l,_=r[0],S=r[1],E=r[2],T=o[0],P=o[1],q=o[2],v=(1-(M+g))*_,O=(d+w)*_,x=(m-y)*_,I=(d-w)*S,A=(1-(h+g))*S,L=(b+p)*S,C=(m+y)*E,k=(b-p)*E,R=(1-(h+M))*E;return t[0]=v,t[1]=O,t[2]=x,t[3]=0,t[4]=I,t[5]=A,t[6]=L,t[7]=0,t[8]=C,t[9]=k,t[10]=R,t[11]=0,t[12]=n[0]+T-(v*T+I*P+C*q),t[13]=n[1]+P-(O*T+A*P+k*q),t[14]=n[2]+q-(x*T+L*P+R*q),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:d,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,r,o,a,s){const i=1/(n-e),u=1/(o-r),c=1/(a-s);return t[0]=2*a*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*u,t[6]=0,t[7]=0,t[8]=(n+e)*i,t[9]=(o+r)*u,t[10]=(s+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*a*2*c,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],s=e[5],i=e[6],u=e[8],c=e[9],f=e[10];return t[0]=Math.sqrt(n*n+r*r+o*o),t[1]=Math.sqrt(a*a+s*s+i*i),t[2]=Math.sqrt(u*u+c*c+f*f),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:E,identity:s,invert:u,invertOrIdentity:function(t,e){return u(t,e)||s(t),t},isOrthoNormal:S,lookAt:function(t,e,n,r){const a=e[0],i=e[1],u=e[2];let c=a-n[0],f=i-n[1],l=u-n[2];const h=(0,o.g)();if(Math.abs(c)<h&&Math.abs(f)<h&&Math.abs(l)<h)return void s(t);let d=1/Math.sqrt(c*c+f*f+l*l);c*=d,f*=d,l*=d;const m=r[0],M=r[1],b=r[2];let g=M*l-b*f,p=b*c-m*l,y=m*f-M*c;d=Math.sqrt(g*g+p*p+y*y),d?(d=1/d,g*=d,p*=d,y*=d):(g=0,p=0,y=0);let w=f*y-l*p,_=l*g-c*y,S=c*p-f*g;d=Math.sqrt(w*w+_*_+S*S),d?(d=1/d,w*=d,_*=d,S*=d):(w=0,_=0,S=0),t[0]=g,t[1]=w,t[2]=c,t[3]=0,t[4]=p,t[5]=_,t[6]=f,t[7]=0,t[8]=y,t[9]=S,t[10]=l,t[11]=0,t[12]=-(g*a+p*i+y*u),t[13]=-(w*a+_*i+S*u),t[14]=-(c*a+f*i+l*u),t[15]=1},mul:T,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,o,a,s){const i=1/(e-n),u=1/(r-o),c=1/(a-s);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*i,t[13]=(o+r)*u,t[14]=(s+a)*c,t[15]=1,t},perspective:function(t,e,n,r,o){const a=1/Math.tan(e/2);let s;return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(s=1/(r-o),t[10]=(o+r)*s,t[14]=2*o*r*s):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const o=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),i=Math.tan(e.rightDegrees*Math.PI/180),u=2/(s+i),c=2/(o+a);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-i)*u*.5,t[9]=(o-a)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:h,rotateX:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),a=e[4],s=e[5],i=e[6],u=e[7],c=e[8],f=e[9],l=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*o+c*r,t[5]=s*o+f*r,t[6]=i*o+l*r,t[7]=u*o+h*r,t[8]=c*o-a*r,t[9]=f*o-s*r,t[10]=l*o-i*r,t[11]=h*o-u*r,t},rotateY:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),a=e[0],s=e[1],i=e[2],u=e[3],c=e[8],f=e[9],l=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*o-c*r,t[1]=s*o-f*r,t[2]=i*o-l*r,t[3]=u*o-h*r,t[8]=a*r+c*o,t[9]=s*r+f*o,t[10]=i*r+l*o,t[11]=u*r+h*o,t},rotateZ:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),a=e[0],s=e[1],i=e[2],u=e[3],c=e[4],f=e[5],l=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*o+c*r,t[1]=s*o+f*r,t[2]=i*o+l*r,t[3]=u*o+h*r,t[4]=c*o-a*r,t[5]=f*o-s*r,t[6]=l*o-i*r,t[7]=h*o-u*r,t},scale:l,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:P,subtract:y,targetTo:function(t,e,n,r){const o=e[0],a=e[1],s=e[2],i=r[0],u=r[1],c=r[2];let f=o-n[0],l=a-n[1],h=s-n[2],d=f*f+l*l+h*h;d>0&&(d=1/Math.sqrt(d),f*=d,l*=d,h*=d);let m=u*h-c*l,M=c*f-i*h,b=i*l-u*f;return d=m*m+M*M+b*b,d>0&&(d=1/Math.sqrt(d),m*=d,M*=d,b*=d),t[0]=m,t[1]=M,t[2]=b,t[3]=0,t[4]=l*b-h*M,t[5]=h*m-f*b,t[6]=f*M-l*m,t[7]=0,t[8]=f,t[9]=l,t[10]=h,t[11]=0,t[12]=o,t[13]=a,t[14]=s,t[15]=1,t},translate:f,transpose:i},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>s,a:()=>a,b:()=>o,c:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:r,createView:a,fromValues:function(t,e,n,r,o,a,s,i,u,c,f,l,h,d,m,M){return[t,e,n,r,o,a,s,i,u,c,f,l,h,d,m,M]}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>s,a:()=>r,b:()=>o,c:()=>a});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},29268:(t,e,n)=>{n.d(e,{a:()=>p,c:()=>b,g:()=>y,h:()=>g,j:()=>S,l:()=>x}),n(80442);var r,o,a=n(92604),s=n(22021),i=n(52138),u=n(17896),c=n(65617),f=n(98766),l=n(88669);(o=r||(r={}))[o.X=0]="X",o[o.Y=1]="Y",o[o.Z=2]="Z";var h=n(78341),d=n(61277),m=n(12981);const M=b();function b(){return(0,l.c)()}function g(t,e=b()){return(0,f.c)(e,t)}function p(t){return t[3]}function y(t){return t}function w(t,e,n){if(null==e)return!1;const{origin:r,direction:o}=e,a=_;a[0]=r[0]-t[0],a[1]=r[1]-t[1],a[2]=r[2]-t[2];const s=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===s)return!1;const i=2*(o[0]*a[0]+o[1]*a[1]+o[2]*a[2]),u=i*i-4*s*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-t[3]*t[3]);if(u<0)return!1;const c=Math.sqrt(u);let f=(-i-c)/(2*s);const l=(-i+c)/(2*s);return(f<0||l<f&&l>0)&&(f=l),!(f<0||(n&&(n[0]=r[0]+o[0]*f,n[1]=r[1]+o[1]*f,n[2]=r[2]+o[2]*f),0))}const _=(0,c.c)();function S(t,e){return w(t,e,null)}function E(t,e,n){const r=m.WM.get(),o=m.MP.get();(0,u.f)(r,e.origin,e.direction);const a=p(t);(0,u.f)(n,r,e.origin),(0,u.g)(n,n,1/(0,u.l)(n)*a);const s=P(t,e.origin),c=(0,d.EU)(e.origin,n);return(0,i.d)(o,c+s,r),(0,u.m)(n,n,o),n}function T(t,e,n){const r=(0,u.b)(m.WM.get(),e,t),o=(0,u.g)(m.WM.get(),r,t[3]/(0,u.l)(r));return(0,u.a)(n,o,t)}function P(t,e){const n=(0,u.b)(m.WM.get(),e,t),r=(0,u.l)(n),o=p(t),a=o+Math.abs(o-r);return(0,s.ZF)(o/a)}const q=(0,c.c)();function v(t,e,n,o){const a=(0,u.b)(q,e,t);switch(n){case r.X:{const t=(0,s.jE)(a,q)[2];return(0,u.s)(o,-Math.sin(t),Math.cos(t),0)}case r.Y:{const t=(0,s.jE)(a,q),e=t[1],n=t[2],r=Math.sin(e);return(0,u.s)(o,-r*Math.cos(n),-r*Math.sin(n),Math.cos(e))}case r.Z:return(0,u.n)(o,a);default:return}}function O(t,e){const n=(0,u.b)(I,e,t);return(0,u.l)(n)-t[3]}function x(t,e){const n=(0,u.d)(t,e),r=p(t);return n<=r*r}const I=(0,c.c)(),A=b();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:M,altitudeAt:O,angleToSilhouette:P,axisAt:v,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return w(t,e,n)?n:((0,h.JI)(e,t,n),T(t,n,n))},closestPointOnSilhouette:E,containsPoint:x,copy:g,create:b,distanceToSilhouette:function(t,e){const n=(0,u.b)(m.WM.get(),e,t),r=(0,u.p)(n),o=t[3]*t[3];return Math.sqrt(Math.abs(r-o))},elevate:function(t,e,n){return t!==n&&(0,u.c)(n,t),n[3]=t[3]+e,n},fromCenterAndRadius:function(t,e){return(0,l.f)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:function(t,e,n,r){return(0,l.f)(t,e,n,r)},getCenter:y,getRadius:p,intersectRay:w,intersectRayClosestSilhouette:function(t,e,n){if(w(t,e,n))return n;const r=E(t,e,m.WM.get());return(0,u.a)(n,e.origin,(0,u.g)(m.WM.get(),e.direction,(0,u.i)(e.origin,r)/(0,u.l)(e.direction))),n},intersectsRay:S,projectPoint:T,setAltitudeAt:function(t,e,n,o){const a=O(t,e),s=v(t,e,r.Z,I),i=(0,u.g)(I,s,n-a);return(0,u.a)(o,e,i)},setExtent:function(t,e,n){return a.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t===n?n:g(t,n)},tmpSphere:A,union:function(t,e,n=b()){const r=(0,u.i)(t,e),o=t[3],a=e[3];return r+a<o?((0,f.c)(n,t),n):r+o<a?((0,f.c)(n,e),n):((0,u.h)(n,t,e,(r+a-o)/(2*r)),n[3]=(r+o+a)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))},97323:(t,e,n)=>{function r(){return[0,0]}function o(t,e){return[t,e]}function a(t,e){return new Float64Array(t,e,2)}function s(){return o(1,1)}function i(){return o(1,0)}function u(){return o(0,1)}n.d(e,{a:()=>r,c:()=>a,f:()=>o});const c=s(),f=i(),l=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:f,UNIT_Y:l,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,createView:a,fromArray:function(t){const e=[0,0],n=Math.min(2,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:o,ones:s,unitX:i,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},17896:(t,e,n)=>{n.d(e,{A:()=>d,C:()=>f,D:()=>l,a:()=>u,b:()=>c,c:()=>s,d:()=>M,e:()=>p,f:()=>y,g:()=>h,h:()=>w,i:()=>m,j:()=>A,k:()=>q,l:()=>a,m:()=>_,n:()=>g,p:()=>b,q:()=>E,r:()=>v,s:()=>i,t:()=>S,u:()=>C});var r=n(65617),o=n(46851);function a(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function l(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function d(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function m(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(n*n+r*r+o*o)}function M(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o}function b(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function g(t,e){const n=e[0],r=e[1],o=e[2];let a=n*n+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function y(t,e,n){const r=e[0],o=e[1],a=e[2],s=n[0],i=n[1],u=n[2];return t[0]=o*u-a*i,t[1]=a*s-r*u,t[2]=r*i-o*s,t}function w(t,e,n,r){const o=e[0],a=e[1],s=e[2];return t[0]=o+r*(n[0]-o),t[1]=a+r*(n[1]-a),t[2]=s+r*(n[2]-s),t}function _(t,e,n){const r=e[0],o=e[1],a=e[2];return t[0]=n[0]*r+n[4]*o+n[8]*a+n[12],t[1]=n[1]*r+n[5]*o+n[9]*a+n[13],t[2]=n[2]*r+n[6]*o+n[10]*a+n[14],t}function S(t,e,n){const r=e[0],o=e[1],a=e[2];return t[0]=r*n[0]+o*n[3]+a*n[6],t[1]=r*n[1]+o*n[4]+a*n[7],t[2]=r*n[2]+o*n[5]+a*n[8],t}function E(t,e,n){const r=n[0],o=n[1],a=n[2],s=n[3],i=e[0],u=e[1],c=e[2];let f=o*c-a*u,l=a*i-r*c,h=r*u-o*i,d=o*h-a*l,m=a*f-r*h,M=r*l-o*f;const b=2*s;return f*=b,l*=b,h*=b,d*=2,m*=2,M*=2,t[0]=i+f+d,t[1]=u+l+m,t[2]=c+h+M,t}const T=(0,r.c)(),P=(0,r.c)();function q(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function v(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],a=n[2]-e[2];let s=r*r+o*o+a*a;return s>0?(s=1/Math.sqrt(s),t[0]=r*s,t[1]=o*s,t[2]=a*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const O=c,x=f,I=l,A=m,L=M,C=a,k=b;Object.freeze(Object.defineProperty({__proto__:null,abs:function(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t},add:u,angle:function(t,e){s(T,t),s(P,e),g(T,T),g(P,P);const n=p(T,P);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,o,a){const s=1-a,i=s*s,u=a*a,c=i*s,f=3*a*i,l=3*u*s,h=u*a;return t[0]=e[0]*c+n[0]*f+r[0]*l+o[0]*h,t[1]=e[1]*c+n[1]*f+r[1]*l+o[1]*h,t[2]=e[2]*c+n[2]*f+r[2]*l+o[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},copy:s,cross:y,direction:v,dist:A,distance:m,div:I,divide:l,dot:p,equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],a=t[2],s=e[0],i=e[1],u=e[2],c=(0,o.g)();return Math.abs(n-s)<=c*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-i)<=c*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(a-u)<=c*Math.max(1,Math.abs(a),Math.abs(u))},exactEquals:q,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,o,a){const s=a*a,i=s*(2*a-3)+1,u=s*(a-2)+a,c=s*(a-1),f=s*(3-2*a);return t[0]=e[0]*i+n[0]*u+r[0]*c+o[0]*f,t[1]=e[1]*i+n[1]*u+r[1]*c+o[1]*f,t[2]=e[2]*i+n[2]*u+r[2]*c+o[2]*f,t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},len:C,length:a,lerp:w,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},mul:x,multiply:f,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},normalize:g,random:function(t,e){e=e||1;const n=o.R,r=2*n()*Math.PI,a=2*n()-1,s=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(r)*s,t[1]=Math.sin(r)*s,t[2]=a*e,t},rotateX:function(t,e,n,r){const o=[],a=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],a[0]=o[0],a[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),a[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},rotateY:function(t,e,n,r){const o=[],a=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],a[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),a[1]=o[1],a[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},rotateZ:function(t,e,n,r){const o=[],a=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],a[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),a[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),a[2]=o[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:h,scaleAndAdd:d,set:i,sign:function(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t},sqrDist:L,sqrLen:k,squaredDistance:M,squaredLength:b,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:O,subtract:c,transformMat3:S,transformMat4:_,transformQuat:E},Symbol.toStringTag,{value:"Module"}))},65617:(t,e,n)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function a(t,e,n){return[t,e,n]}function s(t){const e=[0,0,0],n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function i(t,e){return new Float64Array(t,e,3)}function u(){return a(1,1,1)}function c(){return a(1,0,0)}function f(){return a(0,1,0)}function l(){return a(0,0,1)}n.d(e,{O:()=>d,U:()=>b,Z:()=>h,a:()=>o,b:()=>i,c:()=>r,d:()=>m,e:()=>M,f:()=>a,g:()=>s});const h=[0,0,0],d=u(),m=c(),M=f(),b=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:m,UNIT_Y:M,UNIT_Z:b,ZEROS:h,clone:o,create:r,createView:i,fromArray:s,fromValues:a,ones:u,unitX:c,unitY:f,unitZ:l,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},98766:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>f,c:()=>o,d:()=>b,e:()=>d,f:()=>m,g:()=>p,h:()=>y,l:()=>g,n:()=>M,s:()=>a});var r=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,n,r,o){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function i(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function l(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(n*n+r*r+o*o+a*a)}function h(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+o*o+a*a}function d(t){const e=t[0],n=t[1],r=t[2],o=t[3];return Math.sqrt(e*e+n*n+r*r+o*o)}function m(t){const e=t[0],n=t[1],r=t[2],o=t[3];return e*e+n*n+r*r+o*o}function M(t,e){const n=e[0],r=e[1],o=e[2],a=e[3];let s=n*n+r*r+o*o+a*a;return s>0&&(s=1/Math.sqrt(s),t[0]=n*s,t[1]=r*s,t[2]=o*s,t[3]=a*s),t}function b(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function g(t,e,n,r){const o=e[0],a=e[1],s=e[2],i=e[3];return t[0]=o+r*(n[0]-o),t[1]=a+r*(n[1]-a),t[2]=s+r*(n[2]-s),t[3]=i+r*(n[3]-i),t}function p(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function y(t,e){const n=t[0],o=t[1],a=t[2],s=t[3],i=e[0],u=e[1],c=e[2],f=e[3],l=(0,r.g)();return Math.abs(n-i)<=l*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(o-u)<=l*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(a-c)<=l*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(s-f)<=l*Math.max(1,Math.abs(s),Math.abs(f))}const w=i,_=u,S=c,E=l,T=h,P=d,q=m;Object.freeze(Object.defineProperty({__proto__:null,add:s,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},copy:o,dist:E,distance:l,div:S,divide:c,dot:b,equals:y,exactEquals:p,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},len:P,length:d,lerp:g,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},mul:_,multiply:u,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},normalize:M,random:function(t,e){const n=r.R;let o,a,s,i,u,c;e=e||1;do{o=2*n()-1,a=2*n()-1,u=o*o+a*a}while(u>=1);do{s=2*n()-1,i=2*n()-1,c=s*s+i*i}while(c>=1);const f=Math.sqrt((1-u)/c);return t[0]=e*o,t[1]=e*a,t[2]=e*s*f,t[3]=e*i*f,t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:f,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t},set:a,sqrDist:T,sqrLen:q,squaredDistance:h,squaredLength:m,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:w,subtract:i,transformMat4:function(t,e,n){const r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=n[0]*r+n[4]*o+n[8]*a+n[12]*s,t[1]=n[1]*r+n[5]*o+n[9]*a+n[13]*s,t[2]=n[2]*r+n[6]*o+n[10]*a+n[14]*s,t[3]=n[3]*r+n[7]*o+n[11]*a+n[15]*s,t},transformQuat:function(t,e,n){const r=e[0],o=e[1],a=e[2],s=n[0],i=n[1],u=n[2],c=n[3],f=c*r+i*a-u*o,l=c*o+u*r-s*a,h=c*a+s*o-i*r,d=-s*r-i*o-u*a;return t[0]=f*c+d*-s+l*-u-h*-i,t[1]=l*c+d*-i+h*-s-f*-u,t[2]=h*c+d*-u+f*-i-l*-s,t[3]=e[3],t}},Symbol.toStringTag,{value:"Module"}))},88669:(t,e,n)=>{function r(){return[0,0,0,0]}function o(t,e,n,r){return[t,e,n,r]}function a(t,e){return new Float64Array(t,e,4)}function s(){return o(1,1,1,1)}function i(){return o(1,0,0,0)}function u(){return o(0,1,0,0)}function c(){return o(0,0,1,0)}function f(){return o(0,0,0,1)}n.d(e,{a:()=>a,c:()=>r,f:()=>o});const l=s(),h=i(),d=u(),m=c(),M=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_W:M,UNIT_X:h,UNIT_Y:d,UNIT_Z:m,ZEROS:[0,0,0,0],clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,createView:a,fromArray:function(t){const e=[0,0,0,0],n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:o,ones:s,unitW:f,unitX:i,unitY:u,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},91303:(t,e,n)=>{var r;n.d(e,{Y:()=>r}),function(t){t[t.KILOBYTES=1024]="KILOBYTES",t[t.MEGABYTES=1048576]="MEGABYTES",t[t.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},22807:(t,e,n)=>{n.d(e,{x:()=>o});var r=n(41213);class o{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.Y)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,a));t++)this._items.push(this._allocator())}}const a=1024},22021:(t,e,n)=>{n.d(e,{BV:()=>f,Kt:()=>h,Sf:()=>a,Vl:()=>c,ZF:()=>l,_3:()=>w,jE:()=>p,oK:()=>b,oc:()=>y,t7:()=>u,uZ:()=>s,wt:()=>i});var r=n(17896);n(98766);const o=new Float32Array(1);function a(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function s(t,e,n){return Math.min(Math.max(t,e),n)}function i(t){return 0==(t&t-1)}function u(t,e,n){return t+(e-t)*n}function c(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function l(t){return Math.acos(s(t,-1,1))}function h(t){return Math.asin(s(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}const m=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const M=BigInt("1000000");function b(t){return g(Math.max(-w,Math.min(t,w)))}function g(t){return o[0]=t,o[0]}function p(t,e){const n=(0,r.l)(t),o=h(t[2]/n),a=Math.atan2(t[1]/n,t[0]/n);return(0,r.s)(e,n,o,a),e}function y(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(r,1))}!function(t){const e=function(t){return m.setFloat64(0,t),m.getBigInt64(0)}(t=Math.abs(t)),n=function(t){return m.setBigInt64(0,t),m.getFloat64(0)}(e<=M?M:e-M);Math.abs(t-n)}(1);const w=g(34028234663852886e22)},41213:(t,e,n)=>{n.d(e,{Y:()=>o});const r=[];function o(t){r.push(t),1===r.length&&queueMicrotask((()=>{const t=r.slice();r.length=0;for(const e of t)e()}))}},78341:(t,e,n)=>{n.d(e,{JI:()=>c,Ue:()=>s,re:()=>u}),n(67676);var r=n(22807),o=n(17896),a=n(65617);function s(t){return t?i((0,a.a)(t.origin),(0,a.a)(t.direction)):i((0,a.c)(),(0,a.c)())}function i(t,e){return{origin:t,direction:e}}function u(t,e){const n=f.get();return n.origin=t,n.direction=e,n}function c(t,e,n){const r=(0,o.e)(t.direction,(0,o.b)(n,e,t.origin));return(0,o.a)(n,t.origin,(0,o.g)(n,t.direction,r)),n}n(12981);const f=new r.x((()=>s()))},61277:(t,e,n)=>{n.d(e,{EU:()=>s});var r=n(22021),o=n(17896),a=n(65617);function s(t,e){const n=(0,o.e)(t,e)/((0,o.l)(t)*(0,o.l)(e));return-(0,r.ZF)(n)}(0,a.c)(),(0,a.c)()},12981:(t,e,n)=>{n.d(e,{MP:()=>m,WM:()=>d});var r=n(91303),o=n(41213),a=n(46521),s=n(13598),i=n(94961),u=n(97323),c=n(65617),f=n(88669);class l{constructor(t,e,n){this._itemByteSize=t,this._itemCreate=e,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(n/this._itemByteSize)}get(){0===this._itemsPtr&&(0,o.Y)((()=>this._reset()));const t=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=t;){const t=new ArrayBuffer(this._itemsPerBuffer*this._itemByteSize);for(let e=0;e<this._itemsPerBuffer;++e)this._items.push(this._itemCreate(t,e*this._itemByteSize));this._buffers.push(t)}return this._items[this._itemsPtr++]}_reset(){const t=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>t;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(t=h){return new l(16,u.c,t)}static createVec3f64(t=h){return new l(24,c.b,t)}static createVec4f64(t=h){return new l(32,f.a,t)}static createMat3f64(t=h){return new l(72,a.a,t)}static createMat4f64(t=h){return new l(128,s.a,t)}static createQuatf64(t=h){return new l(32,i.c,t)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this._itemByteSize}}}const h=4*r.Y.KILOBYTES,d=(l.createVec2f64(),l.createVec3f64()),m=(l.createVec4f64(),l.createMat3f64(),l.createMat4f64());l.createQuatf64()},3172:(t,e,n)=>{n.r(e),n.d(e,{default:()=>d});var r=n(68773),o=n(40330),a=n(20102),s=n(80442),i=n(22974),u=n(95330),c=n(81271),f=n(19745),l=n(71058),h=n(85958);async function d(t,e){t instanceof URL&&(t=t.toString()),e?.query instanceof URLSearchParams&&(e.query=(0,c.u0)(e.query.toString().replaceAll("+"," ")));const i=(0,c.HK)(t),f=(0,c.jc)(t);f||i||(t=(0,c.Fv)(t));const g={url:t,requestOptions:{...e}};let p=(0,c.oh)(t);if(p){const t=await async function(t,e){if(null!=t.responseData)return t.responseData;if(t.headers&&(e.requestOptions.headers={...e.requestOptions.headers,...t.headers}),t.query&&(e.requestOptions.query={...e.requestOptions.query,...t.query}),t.before){let n,r;try{r=await t.before(e)}catch(t){n=E("request:interceptor",t,e)}if((r instanceof Error||r instanceof a.Z)&&(n=E("request:interceptor",r,e)),n)throw t.error&&t.error(n),n;return r}}(p,g);if(null!=t)return{data:t,getHeader:w,httpStatus:200,requestOptions:g.requestOptions,url:g.url};p.after||p.error||(p=null)}if(t=g.url,"image"===(e=g.requestOptions).responseType&&((0,s.Z)("host-webworker")||(0,s.Z)("host-node")))throw E("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g);if("head"===e.method){if(e.body)throw E("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(i||f)throw E("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,s.Z)("host-webworker")?m||(m=await n.e(9884).then(n.bind(n,29884))):d._abortableFetch||(d._abortableFetch=globalThis.fetch.bind(globalThis))}(),m)return m.execute(t,e);const y=new AbortController;(0,u.fu)(e,(()=>y.abort()));const _={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:p,params:g,redoRequest:!1,useIdentity:M.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=await async function(t){let e,n;await async function(t){const e=t.params.url,n=t.params.requestOptions,a=t.controller.signal,s=n.body;let i=null,c=null;if(b&&"HTMLFormElement"in globalThis&&(s instanceof FormData?i=s:s instanceof HTMLFormElement&&(i=new FormData(s))),"string"==typeof s&&(c=s),t.fetchOptions={cache:n.cacheBust&&!("polyfill"in d._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:n.headers||{},method:"head"===n.method?"HEAD":"GET",mode:"cors",priority:M.priority,redirect:"follow",signal:a},(i||c)&&(t.fetchOptions.body=i||c),"anonymous"===n.authMode&&(t.useIdentity=!1),t.hasToken=!!(/token=/i.test(e)||n.query?.token||i?.get("token")),!t.hasToken&&r.default.apiKey&&(0,l.r)(e)&&(n.query||(n.query={}),n.query.token=r.default.apiKey,t.hasToken=!0),t.useIdentity&&!t.hasToken&&!t.credentialToken&&!P(e)&&!(0,u.Hc)(a)){let r;"immediate"===n.authMode?(await T(),r=await o.id.getCredential(e,{signal:a}),t.credential=r):"no-prompt"===n.authMode?(await T(),r=await o.id.getCredential(e,{prompt:!1,signal:a}).catch((()=>{})),t.credential=r):o.id&&(r=o.id.findCredential(e)),r&&(t.credentialToken=r.token,t.useSSL=!!r.ssl)}}(t);try{do{[e,n]=await q(t)}while(!await O(t,e,n))}catch(n){const r=E("request:server",n,t.params,e);throw r.details.ssl=t.useSSL,t.interceptor?.error&&t.interceptor.error(r),r}const a=t.params.url;if(n&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!t.hasToken&&!t.credentialToken&&n.user?.username&&!(0,c.kl)(a)){const t=(0,c.P$)(a,!0);t&&M.trustedServers.push(t)}Array.isArray(n.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(n.authorizedCrossOriginNoCorsDomains)}const s=t.credential;if(s&&o.id){const t=o.id.findServerInfo(s.server);let e=t?.owningSystemUrl;if(e){e=e.replace(/\/?$/,"/sharing");const t=o.id.findCredential(e,s.userId);t&&-1===o.id._getIdenticalSvcIdx(e,t)&&t.resources.unshift(e)}}return{data:n,getHeader:e?t=>e?.headers.get(t):w,httpStatus:e?.status??200,requestOptions:t.params.requestOptions,ssl:t.useSSL,url:t.params.url}}(_);return p?.after?.(S),S}let m;const M=r.default.request,b="FormData"in globalThis,g=[499,498,403,401],p=["COM_0056","COM_0057","SB_0008"],y=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],w=()=>null,_=Symbol();function S(t){const e=(0,c.P$)(t);return!e||e.endsWith(".arcgis.com")||d._corsServers.includes(e)||(0,c.kl)(e)}function E(t,e,n,r){let o="Error";const s={url:n.url,requestOptions:n.requestOptions,getHeader:w,ssl:!1};if(e instanceof a.Z)return e.details?(e.details=(0,i.d9)(e.details),e.details.url=n.url,e.details.requestOptions=n.requestOptions):e.details=s,e;if(e){const t=r&&(t=>r.headers.get(t)),n=r?.status,a=e.message;a&&(o=a),t&&(s.getHeader=t),s.httpStatus=(null!=e.httpCode?e.httpCode:e.code)||n||0,s.subCode=e.subcode,s.messageCode=e.messageCode,"string"==typeof e.details?s.messages=[e.details]:s.messages=e.details,s.raw=_ in e?e[_]:e}return(0,u.D_)(e)?(0,u.zE)():new a.Z(t,o,s)}async function T(){o.id||await Promise.all([n.e(7126),n.e(6261),n.e(9255),n.e(1400),n.e(450)]).then(n.bind(n,73660))}function P(t){return y.some((e=>e.test(t)))}async function q(t){let e=t.params.url;const n=t.params.requestOptions,r=t.fetchOptions??{},a=(0,c.jc)(e)||(0,c.HK)(e),i=n.responseType||"json",l=a?0:null!=n.timeout?n.timeout:M.timeout;let m=!1;if(!a){t.useSSL&&(e=(0,c.hO)(e)),n.cacheBust&&"default"===r.cache&&(e=(0,c.ZN)(e,"request.preventCache",Date.now()));let a={...n.query};t.credentialToken&&(a.token=t.credentialToken);let i=(0,c.B7)(a);(0,s.Z)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const u=e.length+1+i.length;let l;m="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||u>M.maxUrlLength;const d=n.useProxy||!!(0,c.ed)(e);if(d){const t=(0,c.b7)(e);l=t.path,!m&&l.length+1+u>M.maxUrlLength&&(m=!0),t.query&&(a={...t.query,...a})}if("HEAD"===r.method&&(m||d)){if(m){if(u>M.maxUrlLength)throw E("request:invalid-parameters",new Error("URL exceeds maximum length"),t.params);throw E("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),t.params)}if(d)throw E("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),t.params)}if(m?(r.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?e=(0,c.fl)(e,a):(r.body=(0,c.B7)(a),r.headers||(r.headers={}),r.headers["Content-Type"]="application/x-www-form-urlencoded")):e=(0,c.fl)(e,a),d&&(t.useProxy=!0,e=`${l}?${e}`),a.token&&b&&r.body instanceof FormData&&!(0,f.P)(e)&&r.body.set("token",a.token),n.hasOwnProperty("withCredentials"))t.withCredentials=n.withCredentials;else if(!(0,c.D6)(e,(0,c.TI)()))if((0,c.kl)(e))t.withCredentials=!0;else if(o.id){const n=o.id.findServerInfo(e);n?.webTierAuth&&(t.withCredentials=!0)}t.withCredentials&&(r.credentials="include",(0,h.jH)(e)&&await(0,h.jz)(m?(0,c.fl)(e,a):e))}let g,p,y=0,w=!1;l>0&&(y=setTimeout((()=>{w=!0,t.controller.abort()}),l));try{if("native-request-init"===n.responseType)p=r,p.url=e;else if("image"!==n.responseType||"default"!==r.cache||"GET"!==r.method||m||function(t){if(t)for(const e of Object.getOwnPropertyNames(t))if(t[e])return!0;return!1}(n.headers)||!a&&!t.useProxy&&M.proxyUrl&&!S(e)){if(g=await d._abortableFetch(e,r),t.useProxy||function(t){const e=(0,c.P$)(t);e&&!d._corsServers.includes(e)&&d._corsServers.push(e)}(e),"native"===n.responseType)p=g;else if("HEAD"!==r.method)if(g.ok){switch(i){case"array-buffer":p=await g.arrayBuffer();break;case"blob":case"image":p=await g.blob();break;default:p=await g.text()}if(y&&(clearTimeout(y),y=0),"json"===i||"xml"===i||"document"===i)if(p)switch(i){case"json":p=JSON.parse(p);break;case"xml":p=v(p,"application/xml");break;case"document":p=v(p,"text/html")}else p=null;if(p){if("array-buffer"===i||"blob"===i){const t=g.headers.get("Content-Type");if(t&&/application\/json|text\/plain/i.test(t)&&p["blob"===i?"size":"byteLength"]<=750)try{const t=await new Response(p).json();t.error&&(p=t)}catch{}}"image"===i&&p instanceof Blob&&(p=await x(URL.createObjectURL(p),t,!0))}}else{p=await g.text();try{p=JSON.parse(p)}catch{}}}else p=await x(e,t)}catch(r){if("AbortError"===r.name){if(w)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!g&&r instanceof TypeError&&M.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||t.useProxy||S(e))throw r;t.redoRequest=!0,(0,c.tD)({proxyUrl:M.proxyUrl,urlPrefix:(0,c.P$)(e)??""})}finally{y&&clearTimeout(y)}return[g,p]}function v(t,e){let n;try{n=(new DOMParser).parseFromString(t,e)}catch{}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}async function O(t,e,n){if(t.redoRequest)return t.redoRequest=!1,!1;const r=t.params.requestOptions;if(!e||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let a,s;if(n&&(n.error?a=n.error:"error"===n.status&&Array.isArray(n.messages)&&(a={...n},a[_]=n,a.details=n.messages)),!a&&!e.ok)throw a=new Error(`Unable to load ${e.url} status: ${e.status}`),a[_]=n,a;let i,u=null;a&&(s=Number(a.code),u=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const c=r.authMode;if(403===s&&(4===u||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!t.useSSL)return t.useSSL=!0,!1}else if(!t.hasToken&&t.useIdentity&&("no-prompt"!==c||498===s)&&void 0!==s&&g.includes(s)&&!P(t.params.url)&&(403!==s||i&&!p.includes(i)&&(null==u||2===u&&t.credentialToken))){await T();try{const e=await o.id.getCredential(t.params.url,{error:E("request:server",a,t.params),prompt:"no-prompt"!==c,signal:t.controller.signal,token:t.credentialToken});return t.credential=e,t.credentialToken=e.token,t.useSSL=t.useSSL||e.ssl,!1}catch(e){if("no-prompt"===c)return t.credential=void 0,t.credentialToken=void 0,!1;a=e}}if(a)throw a;return!0}function x(t,e,n=!1){const r=e.controller.signal,o=new Image;return e.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=M.priority,o.src=t,(0,h.fY)(o,t,n,r)}d._abortableFetch=null,d._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(t,e,n)=>{n.d(e,{r:()=>a});var r=n(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function a(t){const e=(0,r.P$)(t,!0);return!!e&&e.endsWith(".arcgis.com")&&!o.includes(e)&&!t.endsWith("/sharing/rest/generateToken")}},85958:(t,e,n)=>{n.d(e,{Hu:()=>c,fY:()=>i,jH:()=>f,jz:()=>l});var r=n(68773),o=n(80442),a=n(95330),s=n(81271);function i(t,e,n=!1,r){return new Promise(((s,i)=>{if((0,a.Hc)(r))return void i(u());let c=()=>{h(),i(new Error(`Unable to load ${e}`))},f=()=>{const e=t;h(),s(e)},l=()=>{if(!t)return;const e=t;h(),e.src="",i(u())};const h=()=>{(0,o.Z)("esri-image-decode")||(t.removeEventListener("error",c),t.removeEventListener("load",f)),c=null,f=null,t=null,null!=r&&r.removeEventListener("abort",l),l=null,n&&URL.revokeObjectURL(e)};null!=r&&r.addEventListener("abort",l),(0,o.Z)("esri-image-decode")?t.decode().then(f,c):(t.addEventListener("error",c),t.addEventListener("load",f))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const t=new Error;return t.name="AbortError",t}}function c(t){r.default.request.crossOriginNoCorsDomains||(r.default.request.crossOriginNoCorsDomains={});const e=r.default.request.crossOriginNoCorsDomains;for(let n of t)n=n.toLowerCase(),/^https?:\/\//.test(n)?e[(0,s.P$)(n)??""]=0:(e[(0,s.P$)("http://"+n)??""]=0,e[(0,s.P$)("https://"+n)??""]=0)}function f(t){const e=r.default.request.crossOriginNoCorsDomains;if(e){let n=(0,s.P$)(t);if(n)return n=n.toLowerCase(),!(0,s.D6)(n,(0,s.TI)())&&e[n]<Date.now()-36e5}return!1}async function l(t){const e=r.default.request.crossOriginNoCorsDomains,n=(0,s.P$)(t);e&&n&&(e[n.toLowerCase()]=Date.now());const o=(0,s.mN)(t);t=o.path,"json"===o.query?.f&&(t+="?f=json");try{await fetch(t,{mode:"no-cors",credentials:"include"})}catch{}}},31412:(t,e,n)=>{var r,o;n.r(e),n.d(e,{destroyContext:()=>y,dracoDecompressPointCloudData:()=>M,filterObbsForModifications:()=>b,filterObbsForModificationsSync:()=>P,initialize:()=>O,interpretObbModificationResults:()=>T,process:()=>m,setLegacySchema:()=>p,setModifications:()=>g,setModificationsSync:()=>S,test:()=>x}),function(t){t[t.None=0]="None",t[t.Int16=1]="Int16",t[t.Int32=2]="Int32"}(r||(r={})),function(t){t[t.Replace=0]="Replace",t[t.Outside=1]="Outside",t[t.Inside=2]="Inside",t[t.Finished=3]="Finished"}(o||(o={}));var a=n(99880);function s(t){return(0,a.V)(`esri/libs/i3s/${t}`)}let i;var u,c,f,l,h,d;async function m(t){await O();const e=[t.geometryBuffer];return{result:E(t,e),transferList:e}}async function M(t){await O();const e=[t.geometryBuffer],{geometryBuffer:n}=t,r=n.byteLength,o=_._malloc(r),a=new Uint8Array(_.HEAPU8.buffer,o,r);a.set(new Uint8Array(n));const s=_.dracoDecompressPointCloudData(o,a.byteLength);if(_._free(o),s.error.length>0)throw new Error(`i3s.wasm: ${s.error}`);const i=s.featureIds?.length>0?s.featureIds.slice():null,u=s.positions.slice();return i&&e.push(i.buffer),e.push(u.buffer),{result:{positions:u,featureIds:i},transferList:e}}async function b(t){await O(),P(t);const e={buffer:t.buffer};return{result:e,transferList:[e.buffer]}}async function g(t){await O(),S(t)}async function p(t){await O(),_.setLegacySchema(t.context,t.jsonSchema)}function y(t){q(t)}let w,_;function S(t){const e=t.modifications,n=_._malloc(8*e.length),r=new Float64Array(_.HEAPU8.buffer,n,e.length);for(let t=0;t<e.length;++t)r[t]=e[t];_.setModifications(t.context,n,e.length,t.isGeodetic),_._free(n)}function E(t,e){if(!_)return null;const{context:n,localOrigin:o,globalTrafo:a,mbs:s,obb:i,elevationOffset:u,geometryBuffer:c,geometryDescriptor:f,indexToVertexProjector:l,vertexToRenderProjector:h}=t,d=_._malloc(c.byteLength),m=_._malloc(33*Float64Array.BYTES_PER_ELEMENT),M=new Uint8Array(_.HEAPU8.buffer,d,c.byteLength);M.set(new Uint8Array(c));const b=new Float64Array(_.HEAPU8.buffer,m,33);v(b,o);let g=b.byteOffset+3*b.BYTES_PER_ELEMENT,p=new Float64Array(b.buffer,g);v(p,a),g+=16*b.BYTES_PER_ELEMENT,p=new Float64Array(b.buffer,g),v(p,s),g+=4*b.BYTES_PER_ELEMENT,null!=i&&(p=new Float64Array(b.buffer,g),v(p,i.center),g+=3*b.BYTES_PER_ELEMENT,p=new Float64Array(b.buffer,g),v(p,i.halfSize),g+=3*b.BYTES_PER_ELEMENT,p=new Float64Array(b.buffer,g),v(p,i.quaternion));const y=f,w={isDraco:!1,isLegacy:!1,color:t.layouts.some((t=>t.some((t=>"color"===t.name)))),normal:t.needNormals&&t.layouts.some((t=>t.some((t=>"normalCompressed"===t.name)))),uv0:t.layouts.some((t=>t.some((t=>"uv0"===t.name)))),uvRegion:t.layouts.some((t=>t.some((t=>"uvRegion"===t.name)))),featureIndex:y.featureIndex},S=_.process(n,!!t.obb,d,M.byteLength,y,w,m,u,l,h,t.normalReferenceFrame);if(_._free(m),_._free(d),S.error.length>0)throw new Error(`i3s.wasm: ${S.error}`);if(S.discarded)return null;const E=S.componentOffsets.length>0?S.componentOffsets.slice():null,T=S.featureIds.length>0?S.featureIds.slice():null,P=S.anchorIds.length>0?Array.from(S.anchorIds):null,q=S.anchors.length>0?Array.from(S.anchors):null,O=S.interleavedVertedData.slice().buffer,x=S.indicesType===r.Int16?new Uint16Array(S.indices.buffer,S.indices.byteOffset,S.indices.byteLength/2).slice():new Uint32Array(S.indices.buffer,S.indices.byteOffset,S.indices.byteLength/4).slice(),I=S.positions.slice(),A=S.positionIndicesType===r.Int16?new Uint16Array(S.positionIndices.buffer,S.positionIndices.byteOffset,S.positionIndices.byteLength/2).slice():new Uint32Array(S.positionIndices.buffer,S.positionIndices.byteOffset,S.positionIndices.byteLength/4).slice(),L={layout:t.layouts[0],interleavedVertexData:O,indices:x,hasColors:S.hasColors,hasModifications:S.hasModifications,positionData:{data:I,indices:A}};return T&&e.push(T.buffer),E&&e.push(E.buffer),e.push(O),e.push(x.buffer),e.push(I.buffer),e.push(A.buffer),{componentOffsets:E,featureIds:T,anchorIds:P,anchors:q,transformedGeometry:L,obb:S.obb}}function T(t){return 0===t?c.Unmodified:1===t?c.PotentiallyModified:2===t?c.Culled:c.Unknown}function P(t){const{context:e,buffer:n}=t,r=_._malloc(n.byteLength),o=n.byteLength/Float64Array.BYTES_PER_ELEMENT,a=new Float64Array(_.HEAPU8.buffer,r,o),s=new Float64Array(n);a.set(s),_.filterOBBs(e,r,o),s.set(a),_._free(r)}function q(t){_&&(_.destroy(t),_=null)}function v(t,e){for(let n=0;n<e.length;++n)t[n]=e[n]}function O(){return _?Promise.resolve():(w||(w=(i||(i=new Promise((t=>n.e(6710).then(n.bind(n,26710)).then((t=>t.i)).then((({default:e})=>{const n=e({locateFile:s,onRuntimeInitialized:()=>t(n)});delete n.then})))).catch((t=>{throw t}))),i).then((t=>{_=t,w=null}))),w)}n(29268),(d=u||(u={}))[d.Unmodified=0]="Unmodified",d[d.Culled=1]="Culled",d[d.NotChecked=2]="NotChecked",function(t){t[t.Unmodified=0]="Unmodified",t[t.PotentiallyModified=1]="PotentiallyModified",t[t.Culled=2]="Culled",t[t.Unknown=3]="Unknown",t[t.NotChecked=4]="NotChecked"}(c||(c={})),function(t){t[t.Unknown=0]="Unknown",t[t.Uncached=1]="Uncached",t[t.Cached=2]="Cached"}(f||(f={})),function(t){t[t.None=0]="None",t[t.MaxScreenThreshold=1]="MaxScreenThreshold",t[t.ScreenSpaceRelative=2]="ScreenSpaceRelative",t[t.RemovedFeatureDiameter=3]="RemovedFeatureDiameter",t[t.DistanceRangeFromDefaultCamera=4]="DistanceRangeFromDefaultCamera"}(l||(l={})),function(t){t[t.Hole=0]="Hole",t[t.Leaf=1]="Leaf"}(h||(h={}));const x={transform:E,destroy:q}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[24,8008,8062],{25929:(e,r,a)=>{a.d(r,{M:()=>f,a:()=>m,e:()=>p,f:()=>n,i:()=>u,p:()=>y,r:()=>l,t:()=>i,w:()=>s});var t=a(81271);function n(e,r){const a=r&&r.url&&r.url.path;if(e&&a&&(e=(0,t.hF)(e,a,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const a=(0,t.PF)(e,r.portalItem.itemUrl);null!=a&&c.test(a)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(a).path)}return d(e,r&&r.portal)}function i(e,r,a=f.YES){if(null==e)return e;!(0,t.YP)(e)&&r&&r.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let n=(0,t.hF)(e);if(r){const a=r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.rootPath||r.url&&r.url.path;if(a){const i=d(a,r.portal),l=d(n,r.portal);n=(0,t.PF)(l,i,i),null!=n&&n!==l&&n!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=p(n,r?.portal),(0,t.YP)(n)&&(n=(0,t.Fv)(n)),r?.resources&&r?.portalItem&&!(0,t.YP)(n)&&!(0,t.HK)(n)&&a===f.YES&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(n),compress:!1}),n}function l(e,r,a){return n(e,a)}function s(e,r,a,t){const n=i(e,t);void 0!==n&&(r[a]=n)}const o=/\/items\/([^\/]+)\/resources\/(.*)/,c=/^\.\/resources\//;function u(e){const r=e?.match(o)??null;return r?.[1]??null}function y(e){const r=e?.match(o)??null;if(null==r)return null;const a=r[2],n=a.lastIndexOf("/");if(-1===n){const{path:e,extension:r}=(0,t.fZ)(a);return{prefix:null,filename:e,extension:r}}const{path:i,extension:l}=(0,t.fZ)(a.slice(n+1));return{prefix:a.slice(0,n),filename:i,extension:l}}function p(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,t.Ie)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function d(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const a=`${r.urlKey}.${r.customBaseUrl}`,n=(0,t.TI)();return(0,t.D6)(n,`${n.scheme}://${a}`)?(0,t.Ie)(e,r.portalHostname,a):(0,t.Ie)(e,a,r.portalHostname)}var f,L;(L=f||(f={}))[L.YES=0]="YES",L[L.NO=1]="NO";const m=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return f},ensureMainOnlineDomain:p,fromJSON:n,itemIdFromResourceUrl:u,prefixAndFilenameFromResourceUrl:y,read:l,toJSON:i,write:s},Symbol.toStringTag,{value:"Module"}))},10699:(e,r,a)=>{a.d(r,{IG:()=>l,iv:()=>s});var t=a(43697),n=a(52011);let i=0;const l=e=>{let r=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return r=(0,t._)([(0,n.j)("esri.core.Identifiable")],r),r},s=e=>{let r=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:i++})}};return r=(0,t._)([(0,n.j)("esri.core.NumericIdentifiable")],r),r};let o=class extends(l(class{})){};o=(0,t._)([(0,n.j)("esri.core.Identifiable")],o)},87085:(e,r,a)=>{a.d(r,{Z:()=>h});var t=a(43697),n=(a(66577),a(3172)),i=a(20102),l=a(32448),s=a(10699),o=a(83379),c=a(92604),u=a(95330),y=a(81271),p=a(5600),d=(a(75215),a(67676),a(80442),a(52011)),f=a(68773),L=a(6570),m=a(82971);let S=0,b=class extends(l.Z.EventedMixin((0,s.IG)(o.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new L.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+S++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const r="string"==typeof e?{url:e}:e;return(await a.e(3529).then(a.bind(a,63529))).fromUrl(r)}static fromPortalItem(e){return async function(e){const r="portalItem"in e?e:{portalItem:e},{fromItem:t}=await a.e(8008).then(a.bind(a,28008));try{return await t(r)}catch(e){const a=r&&r.portalItem,t=a&&a.id||"unset",n=a&&a.portal&&a.portal.url||f.default.portalUrl;throw c.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+t+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||c.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,r=this.parent;"layers"in r&&r.layers.includes(e)?r.layers.remove(e):"tables"in r&&r.tables.includes(e)?r.tables.remove(e):"baseLayers"in r&&r.baseLayers.includes(e)?r.baseLayers.remove(e):"baseLayers"in r&&r.referenceLayers.includes(e)&&r.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,y.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,t._)([(0,p.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,t._)([(0,p.Cb)({type:L.Z})],b.prototype,"fullExtent",void 0),(0,t._)([(0,p.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,t._)([(0,p.Cb)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,t._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,t._)([(0,p.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,t._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,t._)([(0,p.Cb)({clonable:!1})],b.prototype,"parent",void 0),(0,t._)([(0,p.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,t._)([(0,p.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,t._)([(0,p.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,t._)([(0,p.Cb)({type:m.Z})],b.prototype,"spatialReference",void 0),(0,t._)([(0,p.Cb)({type:String})],b.prototype,"title",void 0),(0,t._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,t._)([(0,p.Cb)()],b.prototype,"url",void 0),(0,t._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,t._)([(0,d.j)("esri.layers.Layer")],b);const h=b},66677:(e,r,a)=>{a.d(r,{B5:()=>u,DR:()=>p,G:()=>h,M8:()=>L,Nm:()=>m,Qc:()=>y,XG:()=>S,a7:()=>f,ld:()=>d,wH:()=>b});var t=a(81271),n=a(25929);const i={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(i),s=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return!!s.test(e)}function y(e){if(null==e)return null;const r=(0,t.mN)(e),a=r.path.match(s)||r.path.match(o);if(!a)return null;const[,n,l,c,u]=a,y=l.indexOf("/");return{title:d(-1!==y?l.slice(y+1):l),serverType:i[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function p(e){const r=(0,t.mN)(e).path.match(c);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,r){const a=[];if(e){const r=y(e);null!=r&&r.title&&a.push(r.title)}if(r){const e=d(r);a.push(e)}if(2===a.length){if(a[0].toLowerCase().includes(a[1].toLowerCase()))return a[0];if(a[1].toLowerCase().includes(a[0].toLowerCase()))return a[1]}return a.join(" - ")}function L(e){if(!e)return!1;const r=(e=e.toLowerCase()).includes(".arcgis.com/"),a=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return r&&a}function m(e,r){return e?(0,t.Qj)((0,t.Hu)(e,r)):e}function S(e){let{url:r}=e;if(!r)return{url:r};r=(0,t.Hu)(r,e.logger);const a=(0,t.mN)(r),n=y(a.path);let i;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(i=n.sublayer),r=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(a.path);null!=e&&(r=e.serviceUrl,i=e.sublayerId)}return{url:(0,t.Qj)(r),layerId:i}}function b(e,r,a,i,l){(0,n.w)(r,i,"url",l),i.url&&null!=e.layerId&&(i.url=(0,t.v_)(i.url,a,e.layerId.toString()))}function h(e){if(!e)return!1;const r=e.toLowerCase(),a=r.includes("/services/"),t=r.includes("/mapserver/wmsserver"),n=r.includes("/imageserver/wmsserver"),i=r.includes("/wmsserver");return a&&(t||n||i)}},52104:(e,r,a)=>{a.d(r,{V:()=>n});var t=a(96187);async function n(e,r){const a=await(0,t.T)(e,r);a.layers=a.layers.filter(i);const n={serviceJSON:a};if((a.currentVersion??0)<10.5)return n;const l=await(0,t.T)(e+"/layers",r);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type}},70024:(e,r,a)=>{a.d(r,{populateOperationalLayers:()=>u});var t=a(46791),n=(a(80442),a(95330)),i=a(87344),l=a(15235);function s(e,r){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===r}var o=a(28008),c=a(40555);async function u(e,r,a){if(!r)return;const t=[];for(const e of r){const r=w(e,a);"GroupLayer"===e.layerType?t.push(T(r,e,a)):t.push(r)}const i=await(0,n.as)(t);for(const r of i)r.value&&e.add(r.value)}const y={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",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},p={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},d={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",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},L={ArcGISFeatureLayer:"FeatureLayer"},m={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"},S={...f,LinkChartLayer:"LinkChartLayer"},b={...L},h={...m};async function w(e,r){return async function(e,r,a){const t=new e;return t.read(r,a.context),"group"===t.type&&I(r)&&await async function(e,r,a){const t=i.T.FeatureLayer,n=await t(),l=r.featureCollection,s=l?.showLegend,o=l?.layers?.map(((t,i)=>{const l=new n;l.read(t,a);const o={...a,ignoreDefaults:!0};return l.read({id:`${e.id}-sublayer-${i}`,visibility:r.visibleLayers?.includes(i)??!0},o),null!=s&&l.read({showLegend:s},o),l}));e.layers.addMany(o??[])}(t,r,a.context),await(0,c.y)(t,a.context),t}(await async function(e,r){const a=r.context,t=g(a);let n=e.layerType||e.type;!n&&r&&r.defaultLayerType&&(n=r.defaultLayerType);const c=t[n];let u=c?i.T[c]:i.T.UnknownLayer;if(v(e)){const r=a?.portal;if(e.itemId){const a=new l.default({id:e.itemId,portal:r});await a.load();const t=(await(0,o.v)(a)).className||"UnknownLayer";u=i.T[t]}}else"ArcGISFeatureLayer"===n?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?u=i.T.MapNotesLayer:function(e){return s(e,"route")}(e)?u=i.T.RouteLayer:I(e)&&(u=i.T.GroupLayer):e.wmtsInfo&&e.wmtsInfo.url&&e.wmtsInfo.layerIdentifier?u=i.T.WMTSLayer:"WFS"===n&&"2.0.0"!==e.wfsInfo?.version&&(u=i.T.UnsupportedLayer);return u()}(e,r),e,r)}function I(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function g(e){let r;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":r=d;break;case"ground":r=p;break;default:r=y}break;case"link-chart":switch(e.layerContainerType){case"basemap":r=h;break;case"tables":r=b;break;default:r=S}break;default:switch(e.layerContainerType){case"basemap":r=m;break;case"tables":r=L;break;default:r=f}}return r}async function T(e,r,a){const n=new t.Z,i=u(n,Array.isArray(r.layers)?r.layers:[],a);try{const r=await e;try{if(await i,"group"===r.type)return r.layers.addMany(n),r}catch(e){r.destroy();for(const e of n)e.destroy();throw e}}catch(e){throw e}}},87344:(e,r,a)=>{a.d(r,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(8153)]).then(a.bind(a,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(6017),a.e(773),a.e(9238),a.e(5590),a.e(7537),a.e(5825),a.e(223)]).then(a.bind(a,30223))).default,CSVLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(6017),a.e(773),a.e(9238),a.e(9689)]).then(a.bind(a,45425))).default,DimensionLayer:async()=>(await Promise.all([a.e(163),a.e(9037),a.e(81)]).then(a.bind(a,40081))).default,ElevationLayer:async()=>(await Promise.all([a.e(163),a.e(8346),a.e(6486),a.e(1596)]).then(a.bind(a,65665))).default,FeatureLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(6017),a.e(773),a.e(9238),a.e(2442)]).then(a.bind(a,19238))).default,GeoJSONLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(3477)]).then(a.bind(a,23477))).default,GeoRSSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(8024)]).then(a.bind(a,3723))).default,GroupLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9059)]).then(a.bind(a,40504))).default,ImageryLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(4165),a.e(4599),a.e(6610),a.e(6885),a.e(1194)]).then(a.bind(a,90444))).default,ImageryTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(6610),a.e(8681),a.e(6885),a.e(5913)]).then(a.bind(a,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([a.e(163),a.e(7537),a.e(1537)]).then(a.bind(a,9310))).default,KMLLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(2756)]).then(a.bind(a,42756))).default,LineOfSightLayer:async()=>(await Promise.all([a.e(163),a.e(7316)]).then(a.bind(a,30690))).default,LinkChartLayer:async()=>(await Promise.all([a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(1534),a.e(5261),a.e(4493)]).then(a.bind(a,28552))).default,MapImageLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(4165),a.e(3887),a.e(6017),a.e(4599),a.e(6256),a.e(7374)]).then(a.bind(a,27374))).default,MapNotesLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(6017),a.e(773),a.e(9238),a.e(5151)]).then(a.bind(a,62128))).default,MediaLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(4828)]).then(a.bind(a,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(8068)]).then(a.bind(a,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971),a.e(6237)]).then(a.bind(a,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(6017),a.e(773),a.e(9238),a.e(7741)]).then(a.bind(a,52781))).default,PointCloudLayer:async()=>(await Promise.all([a.e(163),a.e(1773),a.e(4266),a.e(237)]).then(a.bind(a,10608))).default,RouteLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(153)]).then(a.bind(a,40153))).default,SceneLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(6017),a.e(773),a.e(9238),a.e(5590),a.e(7537),a.e(5825),a.e(7476)]).then(a.bind(a,57476))).default,StreamLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(1724)]).then(a.bind(a,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(4165),a.e(3887),a.e(6017),a.e(773),a.e(8518),a.e(1231)]).then(a.bind(a,30359))).default,TileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(1423),a.e(4165),a.e(3887),a.e(6017),a.e(4599),a.e(6486),a.e(6256),a.e(8636)]).then(a.bind(a,98636))).default,UnknownLayer:async()=>(await a.e(4166).then(a.bind(a,44166))).default,UnsupportedLayer:async()=>(await a.e(9296).then(a.bind(a,39296))).default,VectorTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(6486),a.e(4325),a.e(9805),a.e(5481)]).then(a.bind(a,94756))).default,VoxelLayer:async()=>(await Promise.all([a.e(163),a.e(1773),a.e(9037),a.e(8865)]).then(a.bind(a,28865))).default,WFSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(9469),a.e(6082),a.e(8346),a.e(1423),a.e(4165),a.e(3887),a.e(7215),a.e(2653)]).then(a.bind(a,12653))).default,WMSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9790),a.e(1773),a.e(2462)]).then(a.bind(a,25906))).default,WMTSLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971),a.e(2594)]).then(a.bind(a,72594))).default,WebTileLayer:async()=>(await Promise.all([a.e(163),a.e(4609),a.e(9971)]).then(a.bind(a,16199))).default}},33516:(e,r,a)=>{a.d(r,{Y:()=>l,h:()=>i});var t=a(81271),n=a(48522);function i(e){return{origin:"portal-item",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,t.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},18062:(e,r,a)=>{a.d(r,{$O:()=>b,Ok:()=>h,Q4:()=>w,XX:()=>I,load:()=>d});var t=a(20102),n=a(87085),i=a(66677),l=a(52104),s=a(48522),o=a(15235),c=a(33516),u=a(14661),y=a(40555),p=a(96187);async function d(e,r){const a=e.instance.portalItem;if(a&&a.id)return await a.load(r),function(e){const r=e.instance.portalItem;if(!r?.type||!e.supportedTypes.includes(r.type))throw new t.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:r?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,r){const a=e.instance,n=a.portalItem;if(!n)return;const{url:i,title:s}=n,o=(0,c.h)(n);if("group"===a.type)return a.read({title:s},o),async function(e,r){let a;const{portalItem:n}=e;if(!n)return;const i=n.type,s=r.layerModuleTypeMap,o=(0,u._$)(n,"Oriented Imagery Layer")??!1;switch(i){case"Feature Service":a=o?s.OrientedImageryLayer:s.FeatureLayer;break;case"Stream Service":a=s.StreamLayer;break;case"Scene Service":a=s.SceneLayer;break;case"Feature Collection":a=s.FeatureLayer;break;default:throw new t.Z("portal:unsupported-item-type-as-group",`The item type '${i}' is not supported as a 'IGroupLayer'`)}let[c,y]=await Promise.all([a(),S(r)]),d=()=>c;if("Feature Service"===i){if(y=n.url?await b(y,n.url):{},I(y).length){const e=s.SubtypeGroupLayer,r=await e();d=e=>"SubtypeGroupLayer"===e.layerType?r:c}return L(e,d,y,await async function(e){const{layersJSON:r}=await(0,l.V)(e);if(!r)return null;const a=[...r.layers,...r.tables];return e=>a.find((r=>r.id===e.id))}(n.url))}return w(y)>0?L(e,d,y):async function(e,r){const{portalItem:a}=e;if(!a?.url)return;const t=await(0,p.T)(a.url);t&&L(e,r,{layers:t.layers?.map(f),tables:t.tables?.map(f)})}(e,d)}(a,e);i&&a.read({url:i},o);const d=await S(e,r);return d&&a.read(d,o),a.resourceReferences={portalItem:n,paths:o.readResourcePaths??[]},"subtype-group"!==a.type&&a.read({title:s},o),(0,y.y)(a,o)}(e,r)}function f(e){return{id:e.id,name:e.name}}function L(e,r,a,l){let s=a.layers||[];const c=a.tables||[];if("Feature Collection"===e.portalItem?.type&&(s.forEach((e=>{"Table"===e?.layerDefinition?.type&&c.push(e)})),s=s.filter((e=>"Table"!==e?.layerDefinition?.type))),"coverage"in a){const r=function(e){const{coverage:r}=e;if(!r)return null;const a=new URL(r);if(r.toLowerCase().includes("item.html")){const e=a.searchParams.get("id"),r=a.origin;return n.Z.fromPortalItem({portalItem:new o.default({id:e,url:r})})}if((0,i.B5)(r))return n.Z.fromArcGISServerUrl({url:r});throw new t.Z("portal:oriented-imagery-layer-coverage","the provided coverage url couldn't be loaded as a layer")}(a);r&&e.add(r)}s.reverse().forEach((t=>{const n=l?.(t);if(n||!l){const i=m(e,r(t),a,t,n);e.add(i)}})),c.reverse().forEach((t=>{const n=l?.(t);if(n||!l){const i=m(e,r(t),a,t,n);e.tables.add(i)}}))}function m(e,r,a,t,n){const i=e.portalItem,l=new r({portalItem:i.clone(),layerId:t.id});if("sourceJSON"in l&&(l.sourceJSON=n),"subtype-group"!==l.type&&(l.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||s.Z.getDefault()};l.read(t,e);const r=a.showLegend;null!=r&&l.read({showLegend:r},e)}return l}async function S(e,r){if(!1===e.supportsData)return;const a=e.instance,t=a.portalItem;if(!t)return;let n=null;try{n=await t.fetchData("json",r)}catch(e){}if(function(e){return"stream"!==e.type&&"oriented-imagery"!==e.type&&"layerId"in e}(a)){let e=null,r=!0;if(n&&w(n)>0){if(null==a.layerId){const e=I(n);a.layerId="subtype-group"===a.type?e?.[0]:h(n)}e=function(e,r){const{layerId:a}=r,t=e.layers?.find((e=>e.id===a))||e.tables?.find((e=>e.id===a));return t&&function(e,r){return!("feature"===r.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===r.type&&!("layerType"in e))}(t,r)?t:null}(n,a),e&&(1===w(n)&&(r=!1),null!=n.showLegend&&(e.showLegend=n.showLegend))}return r&&"sublayerTitleMode"in a&&"service-name"!==a.sublayerTitleMode&&(a.sublayerTitleMode="item-title-and-service-name"),e}return n}async function b(e,r){if(null==e?.layers||null==e?.tables){const a=await(0,p.T)(r);(e=e||{}).layers=e.layers||a?.layers,e.tables=e.tables||a?.tables}return e}function h(e){const r=e.layers;if(r&&r.length)return r[0].id;const a=e.tables;return a&&a.length?a[0].id:null}function w(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function I(e){const r=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&r.push(e.id)})),r}},14661:(e,r,a)=>{a.d(r,{$o:()=>u,Fj:()=>o,Kz:()=>y,Ss:()=>p,_$:()=>s,ck:()=>c,qj:()=>l});var t=a(44547),n=a(82971),i=a(40488);function l(e,r){if(!s(e,r)){const a=e.typeKeywords;a?a.push(r):e.typeKeywords=[r]}}function s(e,r){return!!e.typeKeywords?.includes(r)}function o(e){return s(e,y.HOSTED_SERVICE)}function c(e,r){const a=e.typeKeywords;if(a){const e=a.indexOf(r);e>-1&&a.splice(e,1)}}async function u(e){const r=e.clone().normalize();let a;if(r.length>1)for(const e of r)a?e.width>a.width&&(a=e):a=e;else a=r[0];return async function(e){const r=e.spatialReference;if(r.isWGS84)return e.clone();if(r.isWebMercator)return(0,i.Sx)(e);const a=n.Z.WGS84;return await(0,t.iQ)(r,a),(0,t.iV)(e,a)}(a)}const y={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function p(e){const{portal:r,isOrgItem:a,itemControl:t}=e,n=r.user?.privileges;let i=!n||n.includes("features:user:edit"),l=!!a&&!!n?.includes("features:user:fullEdit");const s="update"===t||"admin"===t;return s?l=i=!0:l&&(i=!0),{features:{edit:i,fullEdit:l},content:{updateItem:s}}}},28008:(e,r,a)=>{a.d(r,{fromItem:()=>u,v:()=>y});var t=a(20102),n=a(84230),i=a(87344),l=a(15235),s=a(18062),o=a(14661),c=a(96187);async function u(e){!e.portalItem||e.portalItem instanceof l.default||(e={...e,portalItem:new l.default(e.portalItem)});const r=await async function(e){return await e.load(),async function(e){const r=e.className,a=i.T[r];return{constructor:await a(),properties:e.properties}}(await y(e))}(e.portalItem);return new(0,r.constructor)({portalItem:e.portalItem,...r.properties})}async function y(e){switch(e.type){case"Map Service":return async function(e){return await async function(e){return(await(0,c.T)(e.url)).tileInfo}(e)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e);case"Feature Service":return async function(e){if((0,o._$)(e,"Oriented Imagery Layer"))return async function(e){return await e.load(),{className:"OrientedImageryLayer",properties:await e.fetchData()}}(e);const r=await p(e);if("object"==typeof r){const e={};return null!=r.id&&(e.layerId=r.id),{className:r.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e);case"Feature Collection":return async function(e){await e.load();const r=(0,o._$)(e,"Map Notes"),a=(0,o._$)(e,"Markup");if(r||a)return{className:"MapNotesLayer"};if((0,o._$)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,s.Q4)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e){const r=await p(e);if("object"==typeof r){const a={};let t;if(null!=r.id?(a.layerId=r.id,t=`${e.url}/layers/${r.id}`):t=e.url,e.typeKeywords?.length)for(const r of Object.keys(n.fb))if(e.typeKeywords.includes(r))return{className:n.fb[r]};const i=await(0,c.T)(t);return{className:n.fb[i?.layerType]||"SceneLayer",properties:a}}if(!1===r){const r=await(0,c.T)(e.url);return"Voxel"===r?.layerType?{className:"VoxelLayer"}:{className:"GroupLayer"}}return{className:"GroupLayer"}}(e);case"Image Service":return async function(e){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 a=await e.fetchData(),t=a?.layerType;if("ArcGISTiledImageServiceLayer"===t)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===t)return{className:"ImageryLayer"};const n=await(0,c.T)(e.url),i=n.cacheType?.toLowerCase(),l=n.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};default:throw new t.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e){const r=e.url;if(!r||/\/\d+$/.test(r))return{};await e.load();const a=await e.fetchData();if("Feature Service"===e.type){const e=d(await(0,s.$O)(a,r));if("object"==typeof e){const r=(0,s.XX)(a);e.className=null!=e.id&&r.includes(e.id)?"SubtypeGroupLayer":"FeatureLayer"}return e}return(0,s.Q4)(a)>0?d(a):d(await(0,c.T)(r))}function d(e){return 1===(0,s.Q4)(e)&&{id:(0,s.Ok)(e)}}},40555:(e,r,a)=>{a.d(r,{y:()=>l});var t=a(66643),n=a(95330),i=a(20941);async function l(e,r,a){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",r.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,t.q6)(l.populateFromStyle());if((0,n.k_)(a),!1===s.ok){const a=s.error;r&&r.messages&&r.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${a.message}`,{error:a,context:r})),e.clear("renderer",r?.origin)}}}},96187:(e,r,a)=>{a.d(r,{T:()=>n});var t=a(3172);async function n(e,r){const{data:a}=await(0,t.default)(e,{responseType:"json",query:{f:"json",...r?.customParameters,token:r?.apiKey}});return a}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5245,9880],{53073:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(75148),a=n(59987),s=n(91136),i=n(90961),l=n(90658),u=n(8667);class o extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e);return this._checkCancelled(e),this._wset=new i.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===l.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?l.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}async executeSpatialRelationTest(e){if(null===e.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":return(0,u.kK)((0,l.SV)(this._relationGeom),(0,l.SV)(e.geometry));case"esriSpatialRelIntersects":return(0,u.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,u.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,u.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,u.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,u.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,u.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,u.LV)(this._relationGeom,e.geometry,this._relationString??"")}}async _fetchAndRefineFeatures(e,t,n){const r=new i.Z([],e,!1,null),a=Math.min(t,e.length);await(this._parent?._getFeatures(r,-1,a,n)),this._checkCancelled(n);const s=[];for(let t=0;t<a;t++){const n=this._parent._featureFromCache(e[t]);s.push(await this.executeSpatialRelationTest(n))}for(let n=0;n<t;n++)!0===s[n]?this._idstates[e[n]]=l.dj.InFeatureSet:this._idstates[e[n]]=l.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,n,r,a){await this._ensureLoaded();const s=await this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,a);let l;return this._checkCancelled(a),l=null!==t?new i.Z(s._candidates.slice(0).concat(s._known.slice(0)),[],s._ordered,this._clonePageDefinition(s.pagesDefinition)):new i.Z(s._candidates.slice(0),s._known.slice(0),s._ordered,this._clonePageDefinition(s.pagesDefinition)),l}async _stat(e,t,n,r,a,s,i){if(""!==n)return{calculated:!1};const l=await this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}async _canDoAggregates(e,t,n,r,a){return""===n&&null===r&&null!==this._parent&&this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,s,i,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,i,l)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new o({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(59987),a=n(91136),s=n(90961),i=n(90658);class l extends a.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=i.Bj.Standardised}async _getSet(){return this._wset}optimisePagingFeatureQueries(){}_isInFeatureSet(){return i.dj.NotInFeatureSet}async _getFeature(){throw new r.EN(r.H9.NeverReach)}async queryAttachments(){return[]}async _getFeatures(){return"success"}_featureFromCache(){return null}async _fetchAndRefineFeatures(){throw new r.EN(r.H9.NeverReach)}async _getFilteredSet(){return new s.Z([],[],!1,null)}_stat(e,t,n,r,a,s,i){return this._manualStat(e,t,s,i)}async _canDoAggregates(){return!1}}},91136:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(85839),a=n(48039),s=n(59987),i=n(70586);class l{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=new Promise(((r,a)=>{this._parent._getSet(this._progress).then((s=>{const l=(0,i.s3)(s._known,"known");let u=l.length-1;if("GETPAGES"===l[l.length-1]&&(u-=1),this._lastId+e>u&&l.length>0&&"GETPAGES"===l[l.length-1])return void this._parent._expandPagedSet(s,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}));const o=(0,i.s3)(s._candidates,"candidates");if(u>=this._lastId+e||0===o.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=l.length)break;n[t]=l[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}this._parent._refineSetBlock(s,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,a)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,a(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=new Promise(((t,n)=>{this._parent._getSet(this._progress).then((r=>{const a=(0,i.s3)(r._known,"known");this._lastId<a.length-1?"GETPAGES"===a[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,a[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):(0,i.s3)(r._candidates,"candidates").length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}async count(){if(-1!==this._parent._totalCount)return this._parent._totalCount;const e=await this._parent._getSet(this._progress),t=await this._refineAllSets(e);return this._parent._totalCount=t._known.length,this._parent._totalCount}async _refineAllSets(e){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress),this._refineAllSets(e);if(e._candidates.length>0){if("GETPAGES"===e._known[e._candidates.length-1])return await this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress),this._refineAllSets(e);const t=await this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress);return t._candidates.length>0?this._refineAllSets(t):t}return e}}var u=n(90961),o=n(90658),c=n(95002),h=n(95330),d=n(41534),f=n(8667),_=n(82971),p=n(99514);class g{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=o.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.typeIdField=null,this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,this._dateFieldIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return!0===this._parent?.loaded?(this._initialiseFeatureSet(),this):(await(this._parent?.load()),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new _.Z({wkid:4326}),this.geometryType=o.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new p.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!=e&&e.aborted)throw new s.EN(s.H9.Cancelled)}nativeCapabilities(){return this._parent.nativeCapabilities()}async _canDoAggregates(e,t,n,r,a){return null!==this._parent&&this._parent._canDoAggregates(e,t,n,r,a)}async _getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAggregatePagesDataSourceDefinition(e,t,n,r,a,i,l)}async _getAgregagtePhysicalPage(e,t,n){if(null===this._parent)throw new s.EN(s.H9.NeverReach);return this._parent._getAgregagtePhysicalPage(e,t,n)}async databaseType(){if(this._databaseType===o.Bj.NotEvaluated){if(null!==a.Z.applicationCache){const e=a.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.Z.applicationCache&&a.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.Z.applicationCache&&a.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{thetype:o.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:o.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:o.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.testwhere))return t.thetype;return o.Bj.StandardisedNoInterval}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new s.EN(s.H9.NotImplemented)}isTable(){return this._parent?.isTable()??!1}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return o.dj.Unknown}_getSet(e){throw new s.EN(s.H9.NotImplemented)}async _getFeature(e,t,n){if(this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);if(await this._getFeatures(e,t,this._maxProcessingRate(),n),this._checkCancelled(n),void 0!==this._featureFromCache(t))return this._featureFromCache(t);throw new s.EN(s.H9.MissingFeatures)}async _getFeatureBatch(e,t){this._checkCancelled(t);const n=new u.Z([],e,!1,null),r=[];await this._getFeatures(n,-1,e.length,t),this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}async _getFeatures(e,t,n,r){return"success"}_getFilteredSet(e,t,n,r,a){throw new s.EN(s.H9.NotImplemented)}async _refineSetBlock(e,t,n){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return await this._expandPagedSet(e,this._maxQueryRate(),0,0,n),this._refineSetBlock(e,t,n);this._checkCancelled(n);const r=e._candidates.length;this._refineKnowns(e,t);let a=r-e._candidates.length;if(0===e._candidates.length)return e;if(a>=t)return e;if(await this._refineIfParentKnown(e,t-a,n),this._checkCancelled(n),this._refineKnowns(e,t-a),a=r-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return await this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n),this._checkCancelled(n),this._refineKnowns(e,t-a),e}return e}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const a=[];t=this._maxQueryRate();for(let s=0;s<e._candidates.length&&"GETPAGES"!==e._candidates[s];s++){let i=!1;const l=this._candidateIdTransform(e._candidates[s]);l!==e._candidates[s]&&(i=!0);const u=this._isInFeatureSet(l);if(u===o.dj.InFeatureSet)!0===i?e._known.includes(l)||(e._known.push(l),n+=1):(e._known.push(e._candidates[s]),n+=1),null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s});else if(u===o.dj.NotInFeatureSet)null===r?r={start:s,end:s}:r.end===s-1?r.end=s:(a.push(r),r={start:s,end:s}),n+=1;else if(u===o.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&a.push(r);for(let t=a.length-1;t>=0;t--)e._candidates.splice(a[t].start,a[t].end-a[t].start+1)}_refineIfParentKnown(e,t,n){const r=new u.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}async _expandPagedSet(e,t,n,r,a){if(null===this._parent)throw new s.EN(s.H9.NotImplemented);return this._parent._expandPagedSet(e,t,n,r,a)}async _expandPagedSetFeatureSet(e,t,n,r,a){if(e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(r=1),0===r&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(r=2),0===r)return"finished";const s=await this._getPage(e,r,a);return n+s<t?this._expandPagedSet(e,t,n+s,0,a):"success"}async _getPage(e,t,n){const r=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){r.length=r.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)r[r.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&r.push("GETPAGES"),t}return await this._getPhysicalPage(e,t,n),this._getPage(e,t,n)}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}async calculateStatistic(e,t,n,r){await this._ensureLoaded();let a=await this._stat(e,t,"",null,null,n,r);return!1===a.calculated&&(a=await this._manualStat(e,t,n,r)),a.result}async _manualStat(e,t,n,r){let a=null;switch(e.toLowerCase()){case"count":return a=await(0,c.QX)(this,r),{calculated:!0,result:a};case"distinct":return a=await(0,c.EB)(this,t,n,r),{calculated:!0,result:a};case"avg":case"mean":return a=await(0,c.J6)(this,t,r),{calculated:!0,result:a};case"stdev":return a=await(0,c.m)(this,t,r),{calculated:!0,result:a};case"variance":return a=await(0,c.CA)(this,t,r),{calculated:!0,result:a};case"sum":return a=await(0,c.Sm)(this,t,r),{calculated:!0,result:a};case"min":return a=await(0,c.VV)(this,t,r),{calculated:!0,result:a};case"max":return a=await(0,c.Fp)(this,t,r),{calculated:!0,result:a};default:return{calculated:!0,result:0}}}async _stat(e,t,n,r,a,s,i){const l=await this._parent._stat(e,t,n,r,a,s,i);return!1===l.calculated?null===a&&""===n&&null===r?this._manualStat(e,t,s,i):{calculated:!1}:l}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return new Promise(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return new Promise(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((a=>{try{null!==a&&null!==a.geometry&&e.push(a.geometry),e.length>30||null===a&&e.length>1?(0,f.G0)(e).then((s=>{try{null===a?n(s):(e=[s],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===a?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new l(this,e)}intersection(e,t=!1){return g._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return g._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return g._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return g._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return g._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return g._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return g._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return g._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return g._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return g._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return g._featuresetFunctions.relate.bind(this)(e,t)}within(e){return g._featuresetFunctions.within.bind(this)(e)}touches(e){return g._featuresetFunctions.touches.bind(this)(e)}top(e){return g._featuresetFunctions.top.bind(this)(e)}crosses(e){return g._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return g._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return g._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return g._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return g._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return g._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return new Promise(((r,a)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,a,0)}))}_reduceImpl(e,t,n,r,a,s,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._reduceImpl(e,t,n,r,a,s,i)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,r,this);(0,h.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,r+1,a,s,i)}),s):this._reduceImpl(e,t,u,r+1,a,s,i)}}catch(e){s(e)}}),s)}catch(e){s(e)}}removeField(e){return g._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return g._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,o.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,f.Y4)(n.geometry,r).then((t=>e+t)):(0,f.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,o.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,f.kQ)(n.geometry,r).then((t=>e+t)):(0,f.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}async distinct(e,t=1e3,n=null,r){await this.load();const a=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(a,n),this.calculateStatistic("distinct",a,t,this._defaultTracker(r))}async min(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}async max(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}async avg(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}async sum(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}async stdev(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}async variance(e,t=null,n){await this.load();const r=d.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}async count(e){return await this.load(),this.calculateStatistic("count",d.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))}_defaultTracker(e){return e??{aborted:!1}}forEach(e,t){return new Promise(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,r,a,s){try{if(++s>1e3)return void setTimeout((()=>{s=0,this._forEachImpl(e,t,n,r,a,s)}),0);e.next().then((i=>{try{if(null===i)r(n);else{const l=t(i);null==l?this._forEachImpl(e,t,n,r,a,s):(0,h.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,r,a,s)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,r,a,s)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,o.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,n,r,a){return this._parent.queryAttachments(e,t,n,r,a)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,o.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===o.q2[this.geometryType]?"esriGeometryNull":o.q2[this.geometryType],fields:e}}async convertToText(e,t){if("schema"===e)return await this._ensureLoaded(),JSON.stringify(this.schema());if("featureset"===e){await this._ensureLoaded();const e=[];await this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t);const n=this.schema();return n.features=e,n.spatialReference=this.spatialReference.toJSON(),JSON.stringify(n)}return this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===e?.featureset?this:"none"===e?.featureset?null:{type:"FeatureSet"}}async castAsJsonAsync(e=null,t=null){if("keeptype"===t?.featureset)return this;if("schema"===t?.featureset)return await this._ensureLoaded(),JSON.parse(JSON.stringify(this.schema()));if("none"===t?.featureset)return null;await this._ensureLoaded();const n=[];await this.reduce(((e,r)=>{const a={geometry:r.geometry?!0===t?.keepGeometryType?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==a.geometry&&a.geometry.spatialReference&&!0!==t?.keepGeometryType&&delete a.geometry.spatialReference,n.push(a),1}),0,e);const r=this.schema();return r.features=n,r.spatialReference=!0===t?.keepGeometryType?this.spatialReference:this.spatialReference?.toJSON(),r}get dateTimeReferenceFieldIndex(){return null===this._dateFieldIndex&&(this._dateFieldIndex=r.nu.create(this.getFieldsIndex(),this)),this._dateFieldIndex}fieldTimeZone(e){return this.dateTimeReferenceFieldIndex.fieldTimeZone(e)}get preferredTimeReference(){return this._parent?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._parent?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}}g._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>h,DT:()=>m,TE:()=>E,XF:()=>o,bB:()=>c,fz:()=>f,hq:()=>I,mA:()=>_,oX:()=>p,vR:()=>g,y5:()=>T,zR:()=>u});var r=n(48853),a=n(90658),s=n(41534),i=n(59987),l=(n(85839),n(17126));function u(e,t){return d(e?.parseTree,t,e?.parameters)}function o(e,t,n){return d(e,t,n)}function c(e,t,n,r){return s.WhereClause.create(d(e.parseTree,a.Bj.Standardised,e.parameters,t,n),r)}function h(e,t,n="AND"){return s.WhereClause.create("(("+u(e,a.Bj.Standardised)+")"+n+"("+u(t,a.Bj.Standardised)+"))",e.fieldsIndex)}function d(e,t,n,r=null,s=null,l=null){let u,o,c,h;switch(e.type){case"interval":return E(d(e.value,t,n,r,s,l),e.qualifier,e.op);case"case-expression":{let a=" CASE ";"simple"===e.format&&(a+=d(e.operand,t,n,r,s,l));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+d(e.clauses[i].operand,t,n,r,s,l)+" THEN "+d(e.clauses[i].value,t,n,r,s,l);return null!==e.else&&(a+=" ELSE "+d(e.else,t,n,r,s,l)),a+=" END ",a}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replaceAll("'","''")+"'";if((0,a.J_)(r))return p(r,t,l);if((0,a.NP)(r))return _(r,t,l);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replaceAll("'","''")+"'"):(0,a.J_)(r[n])?e.push(p(r[n],t,l)):(0,a.NP)(r[n])?e.push(_(r[n],t,l)):e.push(r[n].toString());return e}return r.toString()}case"expression-list":o=[];for(const a of e.value)o.push(d(a,t,n,r,s,l));return o;case"unary-expression":return" ( NOT "+d(e.expr,t,n,r,s,l)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+d(e.left,t,n,r,s,l)+" AND "+d(e.right,t,n,r,s,l)+") ";case"OR":return" ("+d(e.left,t,n,r,s,l)+" OR "+d(e.right,t,n,r,s,l)+") ";case"IS":if("null"!==e.right.type)throw new i.eS(i.f.UnsupportedIsRhs);return" ("+d(e.left,t,n,r,s,l)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new i.eS(i.f.UnsupportedIsRhs);return" ("+d(e.left,t,n,r,s,l)+" IS NOT NULL )";case"IN":return u=[],"expression-list"===e.right.type?(u=d(e.right,t,n,r,s)," ("+d(e.left,t,n,r,s,l)+" IN ("+u.join(",")+")) "):(h=d(e.right,t,n,r,s,l),h instanceof Array?" ("+d(e.left,t,n,r,s,l)+" IN ("+h.join(",")+")) ":" ("+d(e.left,t,n,r,s,l)+" IN ("+h+")) ");case"NOT IN":return u=[],"expression-list"===e.right.type?(u=d(e.right,t,n,r,s)," ("+d(e.left,t,n,r,s,l)+" NOT IN ("+u.join(",")+")) "):(h=d(e.right,t,n,r,s,l),h instanceof Array?" ("+d(e.left,t,n,r,s,l)+" NOT IN ("+h.join(",")+")) ":" ("+d(e.left,t,n,r,s,l)+" NOT IN ("+h+")) ");case"BETWEEN":return c=d(e.right,t,n,r,s,l)," ("+d(e.left,t,n,r,s,l)+" BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"NOTBETWEEN":return c=d(e.right,t,n,r,s,l)," ("+d(e.left,t,n,r,s,l)+" NOT BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"LIKE":return""!==e.escape?" ("+d(e.left,t,n,r,s,l)+" LIKE "+d(e.right,t,n,r,s,l)+" ESCAPE '"+e.escape+"') ":" ("+d(e.left,t,n,r,s,l)+" LIKE "+d(e.right,t,n,r,s,l)+") ";case"NOT LIKE":return""!==e.escape?" ("+d(e.left,t,n,r,s,l)+" NOT LIKE "+d(e.right,t,n,r,s,l)+" ESCAPE '"+e.escape+"') ":" ("+d(e.left,t,n,r,s,l)+" NOT LIKE "+d(e.right,t,n,r,s,l)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+d(e.left,t,n,r,s,l)+" "+e.operator+" "+d(e.right,t,n,r,s,l)+") ";case"||":return" ("+d(e.left,t,n,r,s,l)+" "+(t===a.Bj.SqlServer?"+":e.operator)+" "+d(e.right,t,n,r,s,l)+") "}throw new i.eS(i.f.UnsupportedOperator,{operator:e.operator});case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return p(e.value,t,l);case"number":return e.value.toString();case"current-time":return g("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"data-type":return e.value;case"function":{const a=d(e.args,t,n,r,s,l);return f(e.name,a,t)}}throw new i.eS(i.f.UnsupportedSyntax,{node:e.type})}function f(e,t,n){switch(e.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]})`;case"ceiling":case"ceil":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"ceiling"});switch(n){case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"mod":case"power":case"nullif":if(2!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]},${t[1]})`;case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new i.eS(i.f.InvalidFunctionParameters,{function:"round"});case"truncate":if(t.length<1||t.length>2)throw new i.eS(i.f.InvalidFunctionParameters,{function:"truncate"});return n===a.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"char_length"});switch(n){case a.Bj.SqlServer:return"LEN("+t[0]+")";case a.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"coalesce":case"concat":{if(t.length<1)throw new i.eS(i.f.InvalidFunctionParameters,{function:e.toLowerCase()});let n=e.toUpperCase().trim()+"(";for(let e=0;e<t.length;e++)0!==e&&(n+=","),n+=t[e];return n+=")",n}case"lower":case"lcase":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"lower"});return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new i.eS(i.f.InvalidFunctionParameters,{function:"upper"});return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case a.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case a.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replaceAll("'","")+" FROM "+t[1]+")";case"cast":{let e="";switch(n){case a.Bj.Oracle:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case a.Bj.Postgres:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE PRECISION";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case a.Bj.SqlServer:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="DATETIME";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;default:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`}}}throw new i.eS(i.f.InvalidFunctionParameters,{function:e})}function _(e,t,n,s){n?.outputTimeReference&&(e=r.iG.arcadeDateAndZoneToArcadeDate(e,n?.outputTimeReference));const i=e.toDateTime(),l=0===i.hour&&0===i.minute&&0===i.second&&0===i.millisecond;switch(t){case a.Bj.FILEGDB:case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:return l?`date '${i.toFormat("yyyy-LL-dd")}'`:`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.Oracle:return l?`TO_DATE('${i.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${i.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case a.Bj.SqlServer:return`'${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.PGDB:return`#${i.toFormat(l?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case a.Bj.Postgres:return`TIMESTAMP '${i.toFormat(l?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${i.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function p(e,t,n,r){let s=(0,a.J_)(e)?l.ou.fromJSDate(e):l.ou.fromSQL(e);const i=0===s.hour&&0===s.minute&&0===s.second&&0===s.millisecond;switch(n?.inputTimeReference&&(s=l.ou.fromObject({day:s.day,year:s.year,month:s.month,hour:s.hour,minute:s.minute,second:s.second,millisecond:s.millisecond},{zone:n.inputTimeReference})),n?.outputTimeReference&&(s=s.setZone(n.outputTimeReference)),t){case a.Bj.FILEGDB:case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:return i?`date '${s.toFormat("yyyy-LL-dd")}'`:`date '${s.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.Oracle:return i?`TO_DATE('${s.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${s.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case a.Bj.SqlServer:return`'${s.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case a.Bj.PGDB:return`#${s.toFormat(i?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case a.Bj.Postgres:return`TIMESTAMP '${s.toFormat(i?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${s.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function g(e,t){switch(t){case a.Bj.FILEGDB:case a.Bj.Standardised:case a.Bj.StandardisedNoInterval:case a.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case a.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case a.Bj.PGDB:case a.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function m(e,t,n={}){const r={},a={},s={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"guid",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",guid:"guid",globalid:"guid",string:"string"};for(const e of t){const t=e.type?s[e.type]:void 0;r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=s[n[e]];a[e.toLowerCase()]=void 0===t?"":t}switch(y(r,e.parseTree,e.parameters,a)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string";case"global-id":case"guid":return"guid"}return""}function y(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case-expression":{const a=[];if("simple"===t.format){for(let s=0;s<t.clauses.length;s++)a.push(y(e,t.clauses[s].value,n,r));null!==t.else&&a.push(y(e,t.else,n,r))}else{for(let s=0;s<t.clauses.length;s++)a.push(y(e,t.else,n,r));null!==t.else&&a.push(y(e,t.else,n,r))}return w(a)}case"parameter":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if((0,a.J_)(e))return"date";if((0,a.NP)(e))return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const a=[];for(const s of t.value)a.push(y(e,s,n,r));return a}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new i.eS(i.f.UnsupportedIsRhs);return"boolean";case"*":case"-":case"+":case"/":return w([y(e,t.left,n,r),y(e,t.right,n,r)]);case"||":return"string";default:throw new i.eS(i.f.UnsupportedOperator,{operator:t.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current-time":return"date";case"column-reference":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"cast":switch(t.args?.value[1]?.value.type??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return"date";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(s=y(e,t.args,n,r),s instanceof Array){if(s.length<=0)return"double";s=s[0]}return s;case"sign":return"integer";case"ceiling":case"floor":case"abs":return s=y(e,t.args,n,r),s instanceof Array&&(s=w(s)),"integer"===s||"double"===s?s:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return s=y(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s}return""}throw new i.eS(i.f.UnsupportedSyntax,{node:t.type})}const S={boolean:1,string:2,integer:3,double:4,date:5};function w(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||S[t]<S[n]?n:t);return t}return""}function I(e,t){return b(e.parseTree,t)}function T(e){return"column-reference"===e?.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return b(e.operand,t)||b(e.value,t);case"case-expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"string":case"number":return!1;case"expression-list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary-expression":return b(e.expr,t);case"binary-expression":return b(e.left,t)||b(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function F(e){let t="";return t+=e.period.toUpperCase(),t}function E(e,t,n){let r="";return r="interval-period"===t.type?F(t):F(t.start)+" TO "+F(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{CA:()=>p,EB:()=>w,Fp:()=>f,J6:()=>_,QX:()=>y,Sm:()=>m,VV:()=>d,g3:()=>c,m:()=>g,tj:()=>h});var r=n(59987),a=n(90658),s=n(36515);function i(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=i(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function c(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function h(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},s=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,a.hj)(t)||(0,a.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<s.length;n++)!0===(0,a.tt)(s[n],t)&&(e=!0);!1===e&&(s.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return i(t);case"min":return Math.min.apply(Math,t);case"sum":return o(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}async function d(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.min.apply(Math,r)}async function f(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.max.apply(Math,r)}async function _(e,t,n){let r="";t&&!(0,s.y5)(t)&&(r=(0,s.DT)(t,e.fields));const a=await S(e,t,n,!0);if(0===a.length)return null;const l=i(a);return null===l?l:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(l):l}async function p(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:u(r)}async function g(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:Math.sqrt(u(r))}async function m(e,t,n){const r=await S(e,t,n,!0);return 0===r.length?null:o(r)}async function y(e,t){return e.iterator(t).count()}async function S(e,t,n,a=!1){const s=e.iterator(n),i=[],l={ticker:0};let u=await s.next();for(;null!==u;){if(l.ticker++,n.aborted)throw new r.EN(r.H9.Cancelled);l.ticker%100==0&&(l.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(u);null===e?!1===a&&(i[i.length]=e):i[i.length]=e,u=await s.next()}return i}async function w(e,t,n=1e3,a=null){const s=e.iterator(a),i=[],l={},u={ticker:0};let o=await s.next();for(;null!==o;){if(u.ticker++,a&&a.aborted)throw new r.EN(r.H9.Cancelled);u.ticker%100==0&&(u.ticker=0,await new Promise((e=>{setTimeout(e,0)})));const e=t?.calculateValue(o);if(null!=e&&void 0===l[e]&&(i.push(e),l[e]=1),i.length>=n&&-1!==n)return i;o=await s.next()}return i}},99880:(e,t,n)=>{n.d(t,{V:()=>u});var r=n(68773),a=(n(3172),n(20102)),s=n(92604),i=n(81271);const l=s.Z.getLogger("esri.assets");function u(e){if(!r.default.assetsPath)throw l.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new a.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.default.assetsPath,e)}},10661:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(42100);class a extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},8667:(e,t,n)=>{n.d(t,{CJ:()=>j,Cz:()=>O,D$:()=>B,ED:()=>w,FH:()=>x,G0:()=>D,Gg:()=>b,JI:()=>E,LV:()=>T,Nm:()=>I,Sp:()=>A,TE:()=>p,U1:()=>P,W4:()=>y,Y4:()=>U,_L:()=>k,cv:()=>N,e5:()=>v,f3:()=>L,fS:()=>g,j2:()=>G,jU:()=>_,kK:()=>m,kQ:()=>H,og:()=>F,oq:()=>h,r3:()=>f,rd:()=>C,sz:()=>M,uh:()=>S,wf:()=>R,z7:()=>d}),n(66577);var r=n(78346),a=n(94139),s=n(33955);function i(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function l(e){return e?Array.isArray(e)?e.map(l):e.toJSON?e.toJSON():e:e}function u(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let o;async function c(e,t){return(await async function(){return o||(o=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),o}()).invoke("executeGEOperation",{operation:e,parameters:l(t)})}async function h(e,t){return u(await c("clip",[i(e),e,t]))}async function d(e,t){return u(await c("cut",[i(e),e,t]))}function f(e,t){return c("contains",[i(e),e,t])}function _(e,t){return c("crosses",[i(e),e,t])}function p(e,t,n){return c("distance",[i(e),e,t,n])}function g(e,t){return c("equals",[i(e),e,t])}function m(e,t){return c("intersects",[i(e),e,t])}function y(e,t){return c("touches",[i(e),e,t])}function S(e,t){return c("within",[i(e),e,t])}function w(e,t){return c("disjoint",[i(e),e,t])}function I(e,t){return c("overlaps",[i(e),e,t])}function T(e,t,n){return c("relate",[i(e),e,t,n])}function b(e){return c("isSimple",[i(e),e])}async function F(e){return u(await c("simplify",[i(e),e]))}async function E(e,t=!1){return u(await c("convexHull",[i(e),e,t]))}async function v(e,t){return u(await c("difference",[i(e),e,t]))}async function A(e,t){return u(await c("symmetricDifference",[i(e),e,t]))}async function R(e,t){return u(await c("intersect",[i(e),e,t]))}async function D(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return u(await c("union",[i(n),n]))}async function N(e,t,n,r,a,s){return u(await c("offset",[i(e),e,t,n,r,a,s]))}async function L(e,t,n,r=!1){const a=[i(e),e,t,n,r];return u(await c("buffer",a))}async function C(e,t,n,r,a,s){const l=[i(e),e,t,n,r,a,s];return u(await c("geodesicBuffer",l))}async function x(e,t,n=!0){const r=await c("nearestCoordinate",[i(e),e,t,n]);return{...r,coordinate:a.Z.fromJSON(r.coordinate)}}async function k(e,t){const n=await c("nearestVertex",[i(e),e,t]);return{...n,coordinate:a.Z.fromJSON(n.coordinate)}}async function P(e,t,n){if(null==e)throw new Z;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new Z;const a=e.constructor.fromJSON(await c("rotate",[r,e,t,n]));return a.spatialReference=r,a}async function B(e,t,n,r){return u(await c("generalize",[i(e),e,t,n,r]))}async function O(e,t,n){return u(await c("densify",[i(e),e,t,n]))}async function G(e,t,n,r=0){return u(await c("geodesicDensify",[i(e),e,t,n,r]))}function j(e,t){return c("planarArea",[i(e),e,t])}function M(e,t){return c("planarLength",[i(e),e,t])}function U(e,t,n){return c("geodesicArea",[i(e),e,t,n])}function H(e,t,n){return c("geodesicLength",[i(e),e,t,n])}class Z extends Error{constructor(){super("Illegal Argument Exception")}}},94443:(e,t,n)=>{n.d(t,{ME:()=>f,Su:()=>_,tz:()=>d});var r=n(20102),a=n(95330),s=n(70171);const i=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function u(e){return e in l}Object.keys(l);const o=[],c=new Map;function h(e){for(const t of c.keys())p(e.pattern,t)&&c.delete(t)}function d(e){return o.includes(e)||(h(e),o.unshift(e)),{remove(){const t=o.indexOf(e);t>-1&&(o.splice(t,1),h(e))}}}async function f(e){const t=(0,s.Kd)();c.has(e)||c.set(e,async function(e,t){const n=[];for(const r of o)if(p(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=c.get(e);return n&&await g.add(n),n}function _(e){if(!i.test(e))return null;const t=i.exec(e);if(null===t)return null;const[,n,r]=t,a=n+(r?"-"+r.toUpperCase():"");return u(a)?a:u(n)?n:null}function p(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{c.clear()}));const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,a.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}}}]);
|