@arcgis/core 4.29.5 → 4.29.7

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.
Files changed (39) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{863d14c98737482f6788.js → 0700231efdaf7ce06d19.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2146f7e55911da806aec.js → 2ca0fc695c66640a57dd.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{90b36361651839b1e3f0.js → 326aa2951f7e4da6d6b0.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{1251638c842dcf895ffe.js → 37133cf60bc9039a7407.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{de6d54df7ae32694fd70.js → 534abb4408b15ac778dd.js} +1 -1
  7. package/assets/esri/core/workers/chunks/967812e66fef41febb98.js +1 -0
  8. package/assets/esri/core/workers/chunks/{2621b755fa5403bd8a4c.js → e232f6fca5629ae66dcc.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{0e56ff6978ba8d9cf0c0.js → f74eec62bcf3264e2d90.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{8a9387483b19a5ec5b86.js → fc5ac713872766571e07.js} +1 -1
  11. package/assets/esri/themes/base/widgets/_LayerList.scss +2 -0
  12. package/assets/esri/themes/dark/main.css +1 -1
  13. package/assets/esri/themes/light/main.css +1 -1
  14. package/assets/esri/themes/light/view.css +1 -1
  15. package/core/workers/InvokeHandler.js +1 -1
  16. package/core/workers/RemoteClient.js +1 -1
  17. package/core/workers/utils.js +1 -1
  18. package/interfaces.d.ts +53 -35
  19. package/kernel.js +1 -1
  20. package/networks/UtilityNetwork.js +1 -1
  21. package/package.json +1 -1
  22. package/support/revision.js +1 -1
  23. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  24. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  25. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  26. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
  27. package/views/2d/layers/features/FeatureContainer.js +1 -1
  28. package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
  29. package/views/2d/layers/features/RenderState.js +1 -1
  30. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  31. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  32. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  33. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  34. package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
  35. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  36. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  37. package/widgets/LayerList/support/layerListUtils.js +1 -1
  38. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  39. package/assets/esri/core/workers/chunks/5db9739e00f15613d1ea.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3688],{13452:(e,t,r)=>{r.d(t,{c:()=>p});var s=r(41948),i=r(3856),n=r(40504),o=r(94360),a=r(1580),l=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),c=r(4736);let d=class extends((0,i.q)(n.am)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.QJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,l.G)(c.e,{nonNullable:!0})],d.prototype,"unit",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,s._)([(0,u.c)("esri.TimeInterval")],d);const p=d},54792:(e,t,r)=>{r.d(t,{c:()=>n});var s=r(67432),i=r(9592);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.n,this._items=new Set}get length(){return(0,s.am)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.am)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.am)(this._observable),yield*this._items}}},44247:(e,t,r)=>{async function s(e,t){const{WhereClause:s}=await Promise.all([r.e(3220),r.e(988)]).then(r.bind(r,63220));return s.create(e,t)}function i(e,t){return null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{_:()=>i,u:()=>s})},75824:(e,t,r)=>{r.d(t,{Md:()=>n,m0:()=>o,qG:()=>i});var s=r(39452);class i{}function n(e){return e instanceof s.C?e===i.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?i.instance:e}i.instance=new s._C("Etc/UTC")},46448:(e,t,r)=>{r.d(t,{c:()=>u});var s=r(38912),i=r(10860),n=r(54792),o=r(13056),a=r(25512),l=r(38432);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.c}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let n=!0;const o=e=>{(0,i.wp)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.eW)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[n])),(()=>(o(s),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.Uh)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.S)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.qG)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.Y)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.Ip)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},13056:(e,t,r)=>{r.d(t,{S:()=>n,s:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},35268:(e,t,r)=>{r.d(t,{eU:()=>G});var s=r(20744),i=r(9456),n=r(10860),o=r(46448),a=r(13056),l=r(38432),u=r(66360),c=r(70680),d=r(2600),p=r(28176);const h={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,p.OO)(e.url)?.after?s:"array-buffer";const i=await(0,d.c)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var m=r(31056),f=r(24832),y=r(6220),g=(r(2016),r(47620));const w={};var v=r(52324);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new _,this._workerPostMessage({type:m.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.o)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,v.o)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,m.mO)(e);if(t&&t.type===m.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:m.MessageType.OPENED,jobId:r,data:i})}}}var q=r(89960),x=r(69880);const S=()=>u.c.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:F}=m.MessageType;let I,O;const E="Failed to create Worker. Fallback to execute module in main thread";async function T(e){return new Promise((t=>{function r(i){const n=(0,m.mO)(i);n&&n.type===F&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),S().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let R=0;const{ABORT:P,INVOKE:k,OPEN:N,OPENED:M,RESPONSE:j}=m.MessageType;class C{static async create(e){const t=await async function(){if(!(0,i.c)("esri-workers"))return T(new b);if(!I&&!O)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=y.default.default){const t={...y.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(y.default));e.assetsPath=(0,p.WM)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,p.WM)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,q.a8)(),e.has={"esri-csp-restrictions":(0,i.c)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.c)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.c)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.c)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.c)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.c)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.c)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.c)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.c)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.c)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.c)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.c)("esri-atomics"),"esri-shared-array-buffer":(0,i.c)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.c)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.c)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.c)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.WM)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.WM)(e.workers.workerPath):e.workers.workerPath=(0,p.WM)((0,f.O)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=y.default.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,q.a8)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:x.W,fullVersion:g.c1,revision:x.m};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);I=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){O=e||{}}let e;if(I)try{e=new Worker(I,{name:"esri-worker-"+R++})}catch(t){S().warn(E,O),e=new b}else S().warn(E,O),e=new b;return T(e)}();return new C(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.c.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,m.EH)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.Ij)(r,(()=>{this._outJobs.delete(s),this._post({type:P,jobId:s})}))};this._outJobs.set(s,o),this._post({type:N,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,m.mO)(e);if(t)switch(t.type){case M:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case P:this._onAbortMessage(t);break;case k:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=h[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:j,jobId:r,error:(0,m.O)(e)})}(0,n.eW)(u)?(a.set(r,{controller:o,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:j,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.mA)(e)||this._post({type:j,jobId:r,error:(0,m.O)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,c.oR)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,c.oR)(n.abortHandle),r?n.reject(s.c.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,m.E9)(this.worker,e,t,r)}}const U=(0,i.c)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.c)("workers-pool-size")):0;let A=(0,i.c)("esri-mobile")?Math.min(U,3):U;A||(A=(0,i.c)("safari")&&(0,i.c)("mac")?7:2);let L=0;const J=[];async function D(e,t){const r=new o.c,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.s)(s,r),r}async function G(e,t={}){if("string"!=typeof e)throw new s.c("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.c)("host-webworker")&&!(0,i.c)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,n.wp)(t.signal);const s=t.client||r;return D([l.default.connect(r)],{...t,client:s})}if(await async function(){if(z)return z;W=new AbortController;const e=[];for(let t=0;t<A;t++){const r=C.create(t).then((e=>(J[t]=e,e)));e.push(r)}return z=Promise.all(e),z}(),(0,n.wp)(t.signal),"dedicated"===r){const r=L++%A;return D([await J[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,A);if(r<A){const s=new Array(r);for(let i=0;i<r;++i){const r=L++%A;s[i]=J[r].open(e,t)}return D(s,t)}}return D(J.map((r=>r.open(e,t))),t)}let W,z=null},77048:(e,t,r)=>{r.d(t,{C6:()=>d,FZ:()=>m,K:()=>v,K8:()=>l,MZ:()=>a,Qv:()=>f,Su:()=>i,UN:()=>_,WK:()=>n,WO:()=>h,WU:()=>o,eC:()=>c,is:()=>g,mK:()=>p,qe:()=>u,qy:()=>y,yK:()=>w});var s=r(95247);function i(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,s,n,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=s,a[4]=n,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new s.c(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,s=t.length/3){let i=e[0],n=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)i=Math.min(i,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=n,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function p(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?h(e,v):i(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let s=0;s<e.length;s++)if(!r(e[s],t[s]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(83372);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];i()},53440:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var s=r(41948),i=(r(60708),r(82692)),n=(r(99704),r(73868),r(90200),r(12836),r(63718),r(2360),r(64624),r(24948),r(70236),r(37284)),o=r(26496),a=r(58820),l=r(28176),u=r(1580),c=r(53368),d=(r(72052),r(9456)),p=r(12552),h=r(18996),m=r(97492),f=r(81436),y=r(20744),g=r(95800),w=r(66360),v=r(10860),_=r(35268),b=r(17724),q=r(44808),x=r(59500),S=r(28484),F=r(95247);let I=class extends g.c{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=(0,b.G4)(!1,!1),this.type="wfs",this.refresh=(0,v.Cu)((async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:t}=await this._workerHandler.refresh(e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,t);return x.c.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._workerHandler.queryFeatures(e?e.toJSON():void 0,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,t)}async queryObjectIds(e,t={}){return await this.load(t),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._workerHandler.queryExtent(e?e.toJSON():void 0,t);return{count:r.count,extent:F.c.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._workerHandler.querySnapping(e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:s,namespaceUri:i,fields:n,geometryType:o,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,swapXY:c}=this.layer,d="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!t)throw new y.c("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,q.iO)(t,{customParameters:r,...e}));const p=["fields","geometryType","name","namespaceUri","swapXY"].some((e=>null==this.layer[e])),h=p?await(0,q.O8)(this.wfsCapabilities,s,i,{spatialReference:d,customParameters:r,signal:e?.signal}):{...(0,q.k1)(n??[]),geometryType:o,name:s,namespaceUri:i,spatialReference:d,swapXY:c},f=(0,q.oZ)(this.wfsCapabilities.readFeatureTypes(),h.name,h.namespaceUri),g=m.U.toJSON(h.geometryType),{operations:w}=this.wfsCapabilities,v=w.GetFeature.url,_=w.GetFeature.outputFormat;return{customParameters:r,featureType:f,fields:h.fields?.map((e=>e.toJSON()))??[],geometryField:h.geometryField,geometryType:g,getFeatureUrl:v,getFeatureOutputFormat:_,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,objectIdField:h.objectIdField,spatialReference:h.spatialReference?.toJSON(),swapXY:!!h.swapXY}}async _startWorker(e){const[t,r]=await(0,v.Dv)([this._createLoadOptions(e),(0,_.eU)("WFSSourceWorker",{...e,strategy:(0,d.c)("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),s=t.error||r.error||null,i=r.value||null;if(s)throw i&&i.close(),s;const n=t.value;this._connection=r.value,this._workerHandler=this._connection.createInvokeProxy();const o=await this._workerHandler.load(n,e);for(const e of o.warnings)w.c.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:S.Gw},extent:o.extent,fields:n.fields,geometryType:n.geometryType,objectIdField:n.objectIdField,geometryField:n.geometryField,drawingInfo:(0,b.w7)(n.geometryType),name:n.featureType.title,wfsInfo:{name:n.featureType.name,featureUrl:n.getFeatureUrl,maxFeatures:n.maxRecordCount,swapXY:n.swapXY,supportedSpatialReferences:n.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:n.featureType.namespaceUri}}}};(0,s._)([(0,u.qq)()],I.prototype,"capabilities",void 0),(0,s._)([(0,u.qq)({constructOnly:!0})],I.prototype,"layer",void 0),(0,s._)([(0,u.qq)()],I.prototype,"sourceJSON",void 0),(0,s._)([(0,u.qq)()],I.prototype,"type",void 0),(0,s._)([(0,u.qq)()],I.prototype,"wfsCapabilities",void 0),I=(0,s._)([(0,p.c)("esri.layers.graphics.sources.WFSSource")],I);var O,E=r(25216),T=r(28584),R=r(13116),P=r(66888),k=r(66576),N=r(30112),M=r(98768),j=r(26916),C=r(3116),U=r(19560),A=r(21488),L=r(600),J=r(81732),D=r(564),G=r(6168),W=r(34880),z=r(95776),H=r(65548),$=r(56156);const B=(0,J.l)();let Q=O=class extends((0,N.W)((0,T.G)((0,P.c)((0,R.w)((0,E.W)((0,U.u)((0,j.G)((0,C.I)((0,k.Y)((0,M.K)((0,o.U)(f.c)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:c,wfsCapabilities:d}=e;return new O({customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:c,wfsCapabilities:d})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new I({layer:this}),this.spatialReference=$.c.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,D.Gi)(this.renderer,this.fieldsIndex),(0,D.Wc)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const s=e.filter((e=>e.name!==q.Av));this.geometryField&&s.unshift(new L.c({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,a.qQ)(r,s.map((e=>e.toJSON())),t)}get parsedUrl(){return(0,l.as)(this.url)}set renderer(e){(0,D.Gi)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,H.Ap)(this,e)}createQuery(){const e=new z.c;e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(z.c.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(z.c.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(z.c.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(z.c.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh();return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"capabilities",null),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"copyright",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"createQueryVersion",null),(0,s._)([(0,u.qq)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],Q.prototype,"customParameters",void 0),(0,s._)([(0,u.qq)((0,S.SM)("dateFieldsTimeReference"))],Q.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.qq)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"displayField",void 0),(0,s._)([(0,u.qq)(A.Kg)],Q.prototype,"elevationInfo",void 0),(0,s._)([(0,u.qq)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"featureUrl",void 0),(0,s._)([(0,u.qq)({type:[L.c],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],Q.prototype,"fields",void 0),(0,s._)([(0,h.G)("fields")],Q.prototype,"writeFields",null),(0,s._)([(0,u.qq)(B.fieldsIndex)],Q.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.qq)({type:F.c,json:{name:"extent"}})],Q.prototype,"fullExtent",void 0),(0,s._)([(0,u.qq)()],Q.prototype,"geometryField",void 0),(0,s._)([(0,u.qq)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.U.read},write:{target:"layerDefinition.geometryType",writer:m.U.write,ignoreOrigin:!0},origins:{service:{read:m.U.read}}}})],Q.prototype,"geometryType",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"id",void 0),(0,s._)([(0,u.qq)(A.Wu)],Q.prototype,"labelsVisible",void 0),(0,s._)([(0,u.qq)({type:[G.c],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.E},write:!0}})],Q.prototype,"labelingInfo",void 0),(0,s._)([(0,u.qq)(A.Uj)],Q.prototype,"legendEnabled",void 0),(0,s._)([(0,u.qq)({type:["show","hide"]})],Q.prototype,"listMode",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"objectIdField",void 0),(0,s._)([(0,u.qq)({type:["WFS"]})],Q.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.qq)({type:c.Ab,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"maxRecordCount",void 0),(0,s._)([(0,u.qq)({type:c.Ab})],Q.prototype,"maxPageCount",void 0),(0,s._)([(0,u.qq)({type:c.Ab})],Q.prototype,"maxTotalRecordCount",void 0),(0,s._)([(0,u.qq)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],Q.prototype,"mode",void 0),(0,s._)([(0,u.qq)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,s._)([(0,u.qq)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"namespaceUri",void 0),(0,s._)([(0,u.qq)(A.ms)],Q.prototype,"opacity",void 0),(0,s._)([(0,u.qq)(B.outFields)],Q.prototype,"outFields",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"parsedUrl",null),(0,s._)([(0,u.qq)(A.Ou)],Q.prototype,"popupEnabled",void 0),(0,s._)([(0,u.qq)({type:i.c,json:{name:"popupInfo",write:!0}})],Q.prototype,"popupTemplate",void 0),(0,s._)([(0,u.qq)({types:n.U,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.Q,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],Q.prototype,"renderer",null),(0,s._)([(0,u.qq)(A.Q9)],Q.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"source",void 0),(0,s._)([(0,u.qq)({type:$.c,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],Q.prototype,"spatialReference",void 0),(0,s._)([(0,u.qq)({readOnly:!0,type:[c.Ab],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"spatialReferences",void 0),(0,s._)([(0,u.qq)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"swapXY",void 0),(0,s._)([(0,u.qq)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],Q.prototype,"title",void 0),(0,s._)([(0,u.qq)({json:{read:!1},readOnly:!0})],Q.prototype,"type",void 0),(0,s._)([(0,u.qq)(A.qW)],Q.prototype,"url",void 0),(0,s._)([(0,u.qq)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"version",void 0),(0,s._)([(0,u.qq)()],Q.prototype,"wfsCapabilities",null),Q=O=(0,s._)([(0,p.c)("esri.layers.WFSLayer")],Q);const Z=Q},34888:(e,t,r)=>{r.d(t,{ED:()=>i,_M:()=>s});class s{constructor(e=null,t={},r,s){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},85152:(e,t,r)=>{r.d(t,{c:()=>s});class s{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,i,n]=e,o=i-t,a=n-r;return new s([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new s(this.lengths,e,this.hasIndeterminateRingOrder)):new s(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},13136:(e,t,r)=>{r.d(t,{u:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>c,QD:()=>d,w7:()=>a});var s=r(9456),i=r(62088),n=r(13136),o=r(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,s.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},13116:(e,t,r)=>{r.d(t,{w:()=>O});var s,i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(20744),l=r(40504),u=r(58820),c=r(24676),d=r(60708),p=r(25228),h=r(14628),m=r(62088),f=r(95776);const y=new h.O({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.O({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=s=class extends l.am{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new f.c({geometry:(0,m.ct)(r),objectIds:(0,m.ct)(n),spatialRelationship:s,timeExtent:(0,m.ct)(i),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new s({geometry:(0,m.ct)(t),objectIds:(0,m.ct)(n),spatialRelationship:r,timeExtent:(0,m.ct)(i),where:e,units:o,distance:a})}};(0,i._)([(0,n.qq)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,i._)([(0,n.qq)({types:d.Su,json:{write:!0}})],w.prototype,"geometry",void 0),(0,i._)([(0,n.qq)({type:y.apiValues,json:{name:"spatialRel",read:{reader:y.read},write:{allowNull:!1,writer:y.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,i._)([(0,n.qq)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,i._)([(0,n.qq)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,i._)([(0,n.qq)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,i._)([(0,n.qq)({type:p.c,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=s=(0,i._)([(0,o.c)("esri.layers.support.FeatureFilter")],w);const v=w;var _;const b={read:{reader:c.gH},write:{writer:c.GA,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},q={read:{reader:c.gH},write:{writer:c.GA,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},x={name:"showExcludedLabels",default:!0};let S=_=class extends l.am{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.c("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.c("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,n.qq)({type:v,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.qQ)(r,i,t):(0,u.qQ)(r,null,t)}}}})],S.prototype,"filter",void 0),(0,i._)([(0,n.qq)({json:{write:!0,origins:{"web-map":b,"portal-item":b}}})],S.prototype,"includedEffect",void 0),(0,i._)([(0,n.qq)({json:{write:!0,origins:{"web-map":q,"portal-item":q}}})],S.prototype,"excludedEffect",void 0),(0,i._)([(0,n.qq)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":x,"portal-item":x}}})],S.prototype,"excludedLabelsVisible",void 0),S=_=(0,i._)([(0,o.c)("esri.layers.support.FeatureEffect")],S);const F=S,I={write:{allowNull:!0}},O=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,n.qq)({type:F,json:{origins:{"web-map":I,"portal-item":I}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.FeatureEffectLayer")],t),t}},30112:(e,t,r)=>{r.d(t,{W:()=>c});var s=r(41948),i=r(58820),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(35968);function l(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new a.c;return i.read(s,r),[i]}function u(e,t,r,s){const n=e.find((e=>!!e.field));n&&(0,i.qQ)(r,[n.toJSON()],t)}const c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.qq)({type:[a.c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l},write:{target:"layerDefinition.orderBy",writer:u}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.c)("esri.layers.mixins.OrderedLayer")],t),t}},19560:(e,t,r)=>{r.d(t,{u:()=>p});var s=r(41948),i=r(25228),n=r(13452),o=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),l=r(12552),u=r(564),c=r(99336),d=r(4736);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=d.e.fromJSON(r.timeOffsetUnits);return s&&i?new n.c({value:s,unit:i}):null}set timeInfo(e){(0,u.Wc)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,o.qq)({type:i.c,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,o.qq)({type:n.c})],t.prototype,"timeOffset",void 0),(0,s._)([(0,a.E)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,o.qq)({value:null,type:c.c,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,o.qq)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,l.c)("esri.layers.mixins.TemporalLayer")],t),t}},16424:(e,t,r)=>{r.d(t,{c:()=>p});var s=r(20744),i=r(40504),n=r(66360),o=r(86916),a=r(75824),l=r(564),u=r(28484),c=r(39452);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],y(e))}static fromLayerJSON(e){return new p(e.fields??[],y(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const i=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(s,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new s.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.Gw):f.has(t.type)?u.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.OI?a.qG.instance:t===u.Gw?c.Kq.utcInstance:(0,o.wJ)(d,t,(()=>c._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function m(e){return(0,l.gP)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:i}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",o=(s?"endField"in s?s.endField:s.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Mt)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,u.Mt)(i.dateFieldsTimeReference):a??u.Gw:null,c=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.timeReference?(0,u.Mt)(s.timeReference):a:null,d=new Map([[h(i?.creationDateField??""),l],[h(i?.editDateField??""),l],[h(n),c],[h(o),c]]);for(const{name:s,type:i}of e.fields)if(f.has(i))t.set(s,u.OI);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(s,null);else if(r)t.set(s,u.OI);else{const e=d.get(h(s??""))??a;t.set(s,e)}return t}},35968:(e,t,r)=>{r.d(t,{c:()=>d});var s,i=r(41948),n=r(14628),o=r(40504),a=r(1580),l=(r(9456),r(66360),r(72052),r(12552));const u=new n.O({asc:"ascending",desc:"descending"});let c=s=class extends o.am{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,i._)([(0,a.qq)({type:u.apiValues,json:{read:u.read,write:u.write}})],c.prototype,"order",void 0),c=s=(0,i._)([(0,l.c)("esri.layers.support.OrderByInfo")],c);const d=c},99336:(e,t,r)=>{r.d(t,{c:()=>f});var s=r(41948),i=r(25228),n=r(13452),o=r(3856),a=r(40504),l=r(1580),u=(r(9456),r(66360),r(72052),r(33600)),c=r(12552),d=r(18996),p=r(28484);function h(e,t){return n.c.fromJSON({value:e,unit:t})}let m=class extends((0,o.q)(a.am)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.c({start:r,end:s})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,s._)([(0,l.qq)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,s._)([(0,l.qq)({type:i.c,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.E)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,s._)([(0,d.G)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,s._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,s._)([(0,l.qq)({type:n.c,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,s._)([(0,u.E)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,s._)([(0,d.G)("interval")],m.prototype,"writeInterval",null),(0,s._)([(0,l.qq)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,s._)([(0,l.qq)((0,p.SM)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,s._)([(0,l.qq)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,s._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),m=(0,s._)([(0,c.c)("esri.layers.support.TimeInfo")],m);const f=m},36408:(e,t,r)=>{r.d(t,{M:()=>s});const s=new(r(14628).O)({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"})},4144:(e,t,r)=>{r.d(t,{GC:()=>x,I5:()=>f,Wi:()=>g,Y$:()=>m,cF:()=>y,wf:()=>w,y6:()=>h});var s=r(88264);const i="__begin__",n="__end__",o=new RegExp(i,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(n+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function y(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function w(e){let t;return e?(t=(0,s.qq)(e,(e=>i+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,q=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=q.exec(e),t?t[2]:null)}},4736:(e,t,r)=>{r.d(t,{e:()=>s});const s=(0,r(14628).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},59500:(e,t,r)=>{r.d(t,{c:()=>v});var s,i=r(41948),n=r(60708),o=r(6444),a=r(14628),l=r(40504),u=r(62088),c=r(1580),d=(r(9456),r(66360),r(33600)),p=r(12552),h=r(18996),m=r(56156),f=r(6704),y=r(600);const g=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=s=class extends l.am{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.c.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=o.c.fromJSON(i),a=i.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=i.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],s=l[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.h4)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=m.c.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.ct)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(a[0]),i=r(a[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Cs)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.Cs)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Cs)(e)?e.rings:e.paths;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,c.qq)({type:[o.c],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,d.E)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,c.qq)({type:[y.c],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,c.qq)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.G)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,c.qq)({types:n.Su,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,d.E)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,c.qq)({type:m.c,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.G)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,c.qq)({json:{write:!0}})],w.prototype,"transform",void 0),w=s=(0,i._)([(0,p.c)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},45704:(e,t,r)=>{r.d(t,{Sg:()=>c,Uj:()=>u,Uz:()=>l,YP:()=>d}),r(9456);var s=r(47472),i=r(7432),n=r(49736),o=r(28652),a=r(9504);const l=n.c.fromJSON(a.qe),u=i.c.fromJSON(a.MZ),c=s.c.fromJSON(a.yq),d=o.c.fromJSON(a.gF);n.c.fromJSON(a.gP),i.c.fromJSON(a.aV),s.c.fromJSON(a.wp)},9504:(e,t,r)=>{r.d(t,{MZ:()=>n,aV:()=>u,gF:()=>a,gP:()=>l,qe:()=>i,wp:()=>c,yq:()=>o});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3688],{13452:(e,t,r)=>{r.d(t,{c:()=>p});var s=r(41948),i=r(3856),n=r(40504),o=r(94360),a=r(1580),l=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),c=r(4736);let d=class extends((0,i.q)(n.am)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.QJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,l.G)(c.e,{nonNullable:!0})],d.prototype,"unit",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,s._)([(0,u.c)("esri.TimeInterval")],d);const p=d},54792:(e,t,r)=>{r.d(t,{c:()=>n});var s=r(67432),i=r(9592);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.n,this._items=new Set}get length(){return(0,s.am)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.am)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.am)(this._observable),yield*this._items}}},44247:(e,t,r)=>{async function s(e,t){const{WhereClause:s}=await Promise.all([r.e(3220),r.e(988)]).then(r.bind(r,63220));return s.create(e,t)}function i(e,t){return null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{_:()=>i,u:()=>s})},75824:(e,t,r)=>{r.d(t,{Md:()=>n,m0:()=>o,qG:()=>i});var s=r(39452);class i{}function n(e){return e instanceof s.C?e===i.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?i.instance:e}i.instance=new s._C("Etc/UTC")},46448:(e,t,r)=>{r.d(t,{c:()=>u});var s=r(38912),i=r(10860),n=r(54792),o=r(13056),a=r(25512),l=r(38432);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.c}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let n=!0;const o=e=>{(0,i.wp)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.eW)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[n])),(()=>(o(s),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.Uh)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.S)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,i.qG)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.Y)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.Ip)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},13056:(e,t,r)=>{r.d(t,{S:()=>n,s:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},35268:(e,t,r)=>{r.d(t,{eU:()=>G});var s=r(20744),i=r(9456),n=r(10860),o=r(46448),a=r(13056),l=r(38432),u=r(66360),c=r(70680),d=r(2600),p=r(28176);const h={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,p.OO)(e.url)?.after?s:"array-buffer";const i=await(0,d.c)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var m=r(31056),f=r(24832),y=r(6220),g=(r(2016),r(47620));const w={};var v=r(52324);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new _,this._workerPostMessage({type:m.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.o)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,v.o)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,m.mO)(e);if(t&&t.type===m.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const i=l.default.connect(s);this._workerPostMessage({type:m.MessageType.OPENED,jobId:r,data:i})}}}var q=r(89960),x=r(69880);const S=()=>u.c.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:F}=m.MessageType;let I,O;const E="Failed to create Worker. Fallback to execute module in main thread";async function T(e){return new Promise((t=>{function r(i){const n=(0,m.mO)(i);n&&n.type===F&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),S().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let R=0;const{ABORT:P,INVOKE:k,OPEN:N,OPENED:M,RESPONSE:j}=m.MessageType;class C{static async create(e){const t=await async function(){if(!(0,i.c)("esri-workers"))return T(new b);if(!I&&!O)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=y.default.default){const t={...y.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(y.default));e.assetsPath=(0,p.WM)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,p.WM)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,q.a8)(),e.has={"esri-csp-restrictions":(0,i.c)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.c)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.c)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.c)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.c)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.c)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.c)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.c)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.c)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.c)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.c)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.c)("esri-atomics"),"esri-shared-array-buffer":(0,i.c)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.c)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.c)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.c)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.WM)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.WM)(e.workers.workerPath):e.workers.workerPath=(0,p.WM)((0,f.O)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=y.default.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=w.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,q.a8)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:x.W,fullVersion:g.c1,revision:x.m};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);I=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){O=e||{}}let e;if(I)try{e=new Worker(I,{name:"esri-worker-"+R++})}catch(t){S().warn(E,O),e=new b}else S().warn(E,O),e=new b;return T(e)}();return new C(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.c.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,m.W4)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.Ij)(r,(()=>{this._outJobs.delete(s),this._post({type:P,jobId:s})}))};this._outJobs.set(s,o),this._post({type:N,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,m.mO)(e);if(t)switch(t.type){case M:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case P:this._onAbortMessage(t);break;case k:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=h[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:j,jobId:r,error:(0,m.O)(e)})}(0,n.eW)(u)?(a.set(r,{controller:o,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:j,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.mA)(e)||this._post({type:j,jobId:r,error:(0,m.O)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,c.oR)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,c.oR)(n.abortHandle),r?n.reject(s.c.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,m.E9)(this.worker,e,t,r)}}const U=(0,i.c)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.c)("workers-pool-size")):0;let A=(0,i.c)("esri-mobile")?Math.min(U,3):U;A||(A=(0,i.c)("safari")&&(0,i.c)("mac")?7:2);let L=0;const J=[];async function D(e,t){const r=new o.c,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,a.s)(s,r),r}async function G(e,t={}){if("string"!=typeof e)throw new s.c("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.c)("host-webworker")&&!(0,i.c)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,n.wp)(t.signal);const s=t.client||r;return D([l.default.connect(r)],{...t,client:s})}if(await async function(){if(z)return z;W=new AbortController;const e=[];for(let t=0;t<A;t++){const r=C.create(t).then((e=>(J[t]=e,e)));e.push(r)}return z=Promise.all(e),z}(),(0,n.wp)(t.signal),"dedicated"===r){const r=L++%A;return D([await J[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,A);if(r<A){const s=new Array(r);for(let i=0;i<r;++i){const r=L++%A;s[i]=J[r].open(e,t)}return D(s,t)}}return D(J.map((r=>r.open(e,t))),t)}let W,z=null},77048:(e,t,r)=>{r.d(t,{C6:()=>d,FZ:()=>m,K:()=>v,K8:()=>l,MZ:()=>a,Qv:()=>f,Su:()=>i,UN:()=>_,WK:()=>n,WO:()=>h,WU:()=>o,eC:()=>c,is:()=>g,mK:()=>p,qe:()=>u,qy:()=>y,yK:()=>w});var s=r(95247);function i(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,s,n,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=s,a[4]=n,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new s.c(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,s=t.length/3){let i=e[0],n=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)i=Math.min(i,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=n,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function p(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?h(e,v):i(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let s=0;s<e.length;s++)if(!r(e[s],t[s]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(83372);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];i()},53440:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var s=r(41948),i=(r(60708),r(82692)),n=(r(99704),r(73868),r(90200),r(12836),r(63718),r(2360),r(64624),r(24948),r(70236),r(37284)),o=r(26496),a=r(58820),l=r(28176),u=r(1580),c=r(53368),d=(r(72052),r(9456)),p=r(12552),h=r(18996),m=r(97492),f=r(81436),y=r(20744),g=r(95800),w=r(66360),v=r(10860),_=r(35268),b=r(17724),q=r(44808),x=r(59500),S=r(28484),F=r(95247);let I=class extends g.c{constructor(){super(...arguments),this._connection=null,this._workerHandler=null,this.capabilities=(0,b.G4)(!1,!1),this.type="wfs",this.refresh=(0,v.Cu)((async()=>{await this.load();const e={customParameters:this.layer.customParameters,maxRecordCount:this.layer.maxRecordCount,maxTotalRecordCount:this.layer.maxTotalRecordCount,maxPageCount:this.layer.maxPageCount},{extent:t}=await this._workerHandler.refresh(e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,t);return x.c.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._workerHandler.queryFeatures(e?e.toJSON():void 0,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._workerHandler.queryFeatureCount(e?e.toJSON():void 0,t)}async queryObjectIds(e,t={}){return await this.load(t),this._workerHandler.queryObjectIds(e?e.toJSON():void 0,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._workerHandler.queryExtent(e?e.toJSON():void 0,t);return{count:r.count,extent:F.c.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._workerHandler.querySnapping(e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:s,namespaceUri:i,fields:n,geometryType:o,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,swapXY:c}=this.layer,d="defaults"===this.layer.originOf("spatialReference")?void 0:this.layer.spatialReference;if(!t)throw new y.c("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,q.iO)(t,{customParameters:r,...e}));const p=["fields","geometryType","name","namespaceUri","swapXY"].some((e=>null==this.layer[e])),h=p?await(0,q.O8)(this.wfsCapabilities,s,i,{spatialReference:d,customParameters:r,signal:e?.signal}):{...(0,q.k1)(n??[]),geometryType:o,name:s,namespaceUri:i,spatialReference:d,swapXY:c},f=(0,q.oZ)(this.wfsCapabilities.readFeatureTypes(),h.name,h.namespaceUri),g=m.U.toJSON(h.geometryType),{operations:w}=this.wfsCapabilities,v=w.GetFeature.url,_=w.GetFeature.outputFormat;return{customParameters:r,featureType:f,fields:h.fields?.map((e=>e.toJSON()))??[],geometryField:h.geometryField,geometryType:g,getFeatureUrl:v,getFeatureOutputFormat:_,maxRecordCount:a,maxPageCount:l,maxTotalRecordCount:u,objectIdField:h.objectIdField,spatialReference:h.spatialReference?.toJSON(),swapXY:!!h.swapXY}}async _startWorker(e){const[t,r]=await(0,v.Dv)([this._createLoadOptions(e),(0,_.eU)("WFSSourceWorker",{...e,strategy:(0,d.c)("feature-layers-workers")?"dedicated":"local",registryTarget:this})]),s=t.error||r.error||null,i=r.value||null;if(s)throw i&&i.close(),s;const n=t.value;this._connection=r.value,this._workerHandler=this._connection.createInvokeProxy();const o=await this._workerHandler.load(n,e);for(const e of o.warnings)w.c.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});this.sourceJSON={dateFieldsTimeReference:{timeZoneIANA:S.Gw},extent:o.extent,fields:n.fields,geometryType:n.geometryType,objectIdField:n.objectIdField,geometryField:n.geometryField,drawingInfo:(0,b.w7)(n.geometryType),name:n.featureType.title,wfsInfo:{name:n.featureType.name,featureUrl:n.getFeatureUrl,maxFeatures:n.maxRecordCount,swapXY:n.swapXY,supportedSpatialReferences:n.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:n.featureType.namespaceUri}}}};(0,s._)([(0,u.qq)()],I.prototype,"capabilities",void 0),(0,s._)([(0,u.qq)({constructOnly:!0})],I.prototype,"layer",void 0),(0,s._)([(0,u.qq)()],I.prototype,"sourceJSON",void 0),(0,s._)([(0,u.qq)()],I.prototype,"type",void 0),(0,s._)([(0,u.qq)()],I.prototype,"wfsCapabilities",void 0),I=(0,s._)([(0,p.c)("esri.layers.graphics.sources.WFSSource")],I);var O,E=r(25216),T=r(28584),R=r(13116),P=r(66888),k=r(66576),N=r(30112),M=r(98768),j=r(26916),C=r(3116),U=r(19560),A=r(21488),L=r(600),J=r(81732),D=r(564),G=r(6168),W=r(34880),z=r(95776),H=r(65548),$=r(56156);const B=(0,J.l)();let Q=O=class extends((0,N.W)((0,T.G)((0,P.c)((0,R.w)((0,E.W)((0,U.u)((0,j.G)((0,C.I)((0,k.Y)((0,M.K)((0,o.U)(f.c)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:c,wfsCapabilities:d}=e;return new O({customParameters:t,fields:r,geometryField:s,geometryType:i,name:n,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:c,wfsCapabilities:d})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new I({layer:this}),this.spatialReference=$.c.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,D.Gi)(this.renderer,this.fieldsIndex),(0,D.Wc)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const s=e.filter((e=>e.name!==q.Av));this.geometryField&&s.unshift(new L.c({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,a.qQ)(r,s.map((e=>e.toJSON())),t)}get parsedUrl(){return(0,l.as)(this.url)}set renderer(e){(0,D.Gi)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,H.Ap)(this,e)}createQuery(){const e=new z.c;e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(z.c.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(z.c.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(z.c.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(z.c.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh();return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"capabilities",null),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"copyright",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"createQueryVersion",null),(0,s._)([(0,u.qq)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],Q.prototype,"customParameters",void 0),(0,s._)([(0,u.qq)((0,S.SM)("dateFieldsTimeReference"))],Q.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.qq)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"displayField",void 0),(0,s._)([(0,u.qq)(A.Kg)],Q.prototype,"elevationInfo",void 0),(0,s._)([(0,u.qq)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"featureUrl",void 0),(0,s._)([(0,u.qq)({type:[L.c],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],Q.prototype,"fields",void 0),(0,s._)([(0,h.G)("fields")],Q.prototype,"writeFields",null),(0,s._)([(0,u.qq)(B.fieldsIndex)],Q.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.qq)({type:F.c,json:{name:"extent"}})],Q.prototype,"fullExtent",void 0),(0,s._)([(0,u.qq)()],Q.prototype,"geometryField",void 0),(0,s._)([(0,u.qq)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:m.U.read},write:{target:"layerDefinition.geometryType",writer:m.U.write,ignoreOrigin:!0},origins:{service:{read:m.U.read}}}})],Q.prototype,"geometryType",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"id",void 0),(0,s._)([(0,u.qq)(A.Wu)],Q.prototype,"labelsVisible",void 0),(0,s._)([(0,u.qq)({type:[G.c],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.E},write:!0}})],Q.prototype,"labelingInfo",void 0),(0,s._)([(0,u.qq)(A.Uj)],Q.prototype,"legendEnabled",void 0),(0,s._)([(0,u.qq)({type:["show","hide"]})],Q.prototype,"listMode",void 0),(0,s._)([(0,u.qq)({type:String})],Q.prototype,"objectIdField",void 0),(0,s._)([(0,u.qq)({type:["WFS"]})],Q.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.qq)({type:c.Ab,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"maxRecordCount",void 0),(0,s._)([(0,u.qq)({type:c.Ab})],Q.prototype,"maxPageCount",void 0),(0,s._)([(0,u.qq)({type:c.Ab})],Q.prototype,"maxTotalRecordCount",void 0),(0,s._)([(0,u.qq)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],Q.prototype,"mode",void 0),(0,s._)([(0,u.qq)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,s._)([(0,u.qq)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"namespaceUri",void 0),(0,s._)([(0,u.qq)(A.ms)],Q.prototype,"opacity",void 0),(0,s._)([(0,u.qq)(B.outFields)],Q.prototype,"outFields",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"parsedUrl",null),(0,s._)([(0,u.qq)(A.Ou)],Q.prototype,"popupEnabled",void 0),(0,s._)([(0,u.qq)({type:i.c,json:{name:"popupInfo",write:!0}})],Q.prototype,"popupTemplate",void 0),(0,s._)([(0,u.qq)({types:n.U,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.Q,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],Q.prototype,"renderer",null),(0,s._)([(0,u.qq)(A.Q9)],Q.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],Q.prototype,"source",void 0),(0,s._)([(0,u.qq)({type:$.c,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],Q.prototype,"spatialReference",void 0),(0,s._)([(0,u.qq)({readOnly:!0,type:[c.Ab],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"spatialReferences",void 0),(0,s._)([(0,u.qq)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"swapXY",void 0),(0,s._)([(0,u.qq)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],Q.prototype,"title",void 0),(0,s._)([(0,u.qq)({json:{read:!1},readOnly:!0})],Q.prototype,"type",void 0),(0,s._)([(0,u.qq)(A.qW)],Q.prototype,"url",void 0),(0,s._)([(0,u.qq)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],Q.prototype,"version",void 0),(0,s._)([(0,u.qq)()],Q.prototype,"wfsCapabilities",null),Q=O=(0,s._)([(0,p.c)("esri.layers.WFSLayer")],Q);const Z=Q},34888:(e,t,r)=>{r.d(t,{ED:()=>i,_M:()=>s});class s{constructor(e=null,t={},r,s){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},85152:(e,t,r)=>{r.d(t,{c:()=>s});class s{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,i,n]=e,o=i-t,a=n-r;return new s([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new s(this.lengths,e,this.hasIndeterminateRingOrder)):new s(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},13136:(e,t,r)=>{r.d(t,{u:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>c,QD:()=>d,w7:()=>a});var s=r(9456),i=r(62088),n=r(13136),o=r(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,s.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},13116:(e,t,r)=>{r.d(t,{w:()=>O});var s,i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(20744),l=r(40504),u=r(58820),c=r(24676),d=r(60708),p=r(25228),h=r(14628),m=r(62088),f=r(95776);const y=new h.O({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.O({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=s=class extends l.am{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new f.c({geometry:(0,m.ct)(r),objectIds:(0,m.ct)(n),spatialRelationship:s,timeExtent:(0,m.ct)(i),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:o,distance:a}=this;return new s({geometry:(0,m.ct)(t),objectIds:(0,m.ct)(n),spatialRelationship:r,timeExtent:(0,m.ct)(i),where:e,units:o,distance:a})}};(0,i._)([(0,n.qq)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,i._)([(0,n.qq)({types:d.Su,json:{write:!0}})],w.prototype,"geometry",void 0),(0,i._)([(0,n.qq)({type:y.apiValues,json:{name:"spatialRel",read:{reader:y.read},write:{allowNull:!1,writer:y.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,i._)([(0,n.qq)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,i._)([(0,n.qq)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,i._)([(0,n.qq)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,i._)([(0,n.qq)({type:p.c,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=s=(0,i._)([(0,o.c)("esri.layers.support.FeatureFilter")],w);const v=w;var _;const b={read:{reader:c.gH},write:{writer:c.GA,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},q={read:{reader:c.gH},write:{writer:c.GA,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},x={name:"showExcludedLabels",default:!0};let S=_=class extends l.am{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.c("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.c("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,n.qq)({type:v,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.qQ)(r,i,t):(0,u.qQ)(r,null,t)}}}})],S.prototype,"filter",void 0),(0,i._)([(0,n.qq)({json:{write:!0,origins:{"web-map":b,"portal-item":b}}})],S.prototype,"includedEffect",void 0),(0,i._)([(0,n.qq)({json:{write:!0,origins:{"web-map":q,"portal-item":q}}})],S.prototype,"excludedEffect",void 0),(0,i._)([(0,n.qq)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":x,"portal-item":x}}})],S.prototype,"excludedLabelsVisible",void 0),S=_=(0,i._)([(0,o.c)("esri.layers.support.FeatureEffect")],S);const F=S,I={write:{allowNull:!0}},O=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,n.qq)({type:F,json:{origins:{"web-map":I,"portal-item":I}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.FeatureEffectLayer")],t),t}},30112:(e,t,r)=>{r.d(t,{W:()=>c});var s=r(41948),i=r(58820),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(35968);function l(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new a.c;return i.read(s,r),[i]}function u(e,t,r,s){const n=e.find((e=>!!e.field));n&&(0,i.qQ)(r,[n.toJSON()],t)}const c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.qq)({type:[a.c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l},write:{target:"layerDefinition.orderBy",writer:u}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.c)("esri.layers.mixins.OrderedLayer")],t),t}},19560:(e,t,r)=>{r.d(t,{u:()=>p});var s=r(41948),i=r(25228),n=r(13452),o=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),l=r(12552),u=r(564),c=r(99336),d=r(4736);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=d.e.fromJSON(r.timeOffsetUnits);return s&&i?new n.c({value:s,unit:i}):null}set timeInfo(e){(0,u.Wc)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,o.qq)({type:i.c,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,o.qq)({type:n.c})],t.prototype,"timeOffset",void 0),(0,s._)([(0,a.E)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,o.qq)({value:null,type:c.c,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,o.qq)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,l.c)("esri.layers.mixins.TemporalLayer")],t),t}},16424:(e,t,r)=>{r.d(t,{c:()=>p});var s=r(20744),i=r(40504),n=r(66360),o=r(86916),a=r(75824),l=r(564),u=r(28484),c=r(39452);const d=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],y(e))}static fromLayerJSON(e){return new p(e.fields??[],y(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const i=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(s,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new s.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.Gw):f.has(t.type)?u.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.OI?a.qG.instance:t===u.Gw?c.Kq.utcInstance:(0,o.wJ)(d,t,(()=>c._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function m(e){return(0,l.gP)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:i}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",o=(s?"endField"in s?s.endField:s.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Mt)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,u.Mt)(i.dateFieldsTimeReference):a??u.Gw:null,c=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.timeReference?(0,u.Mt)(s.timeReference):a:null,d=new Map([[h(i?.creationDateField??""),l],[h(i?.editDateField??""),l],[h(n),c],[h(o),c]]);for(const{name:s,type:i}of e.fields)if(f.has(i))t.set(s,u.OI);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(s,null);else if(r)t.set(s,u.OI);else{const e=d.get(h(s??""))??a;t.set(s,e)}return t}},35968:(e,t,r)=>{r.d(t,{c:()=>d});var s,i=r(41948),n=r(14628),o=r(40504),a=r(1580),l=(r(9456),r(66360),r(72052),r(12552));const u=new n.O({asc:"ascending",desc:"descending"});let c=s=class extends o.am{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,i._)([(0,a.qq)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,i._)([(0,a.qq)({type:u.apiValues,json:{read:u.read,write:u.write}})],c.prototype,"order",void 0),c=s=(0,i._)([(0,l.c)("esri.layers.support.OrderByInfo")],c);const d=c},99336:(e,t,r)=>{r.d(t,{c:()=>f});var s=r(41948),i=r(25228),n=r(13452),o=r(3856),a=r(40504),l=r(1580),u=(r(9456),r(66360),r(72052),r(33600)),c=r(12552),d=r(18996),p=r(28484);function h(e,t){return n.c.fromJSON({value:e,unit:t})}let m=class extends((0,o.q)(a.am)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.c({start:r,end:s})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,s._)([(0,l.qq)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,s._)([(0,l.qq)({type:i.c,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.E)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,s._)([(0,d.G)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,s._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,s._)([(0,l.qq)({type:n.c,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,s._)([(0,u.E)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,s._)([(0,d.G)("interval")],m.prototype,"writeInterval",null),(0,s._)([(0,l.qq)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,s._)([(0,l.qq)((0,p.SM)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,s._)([(0,l.qq)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,s._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),m=(0,s._)([(0,c.c)("esri.layers.support.TimeInfo")],m);const f=m},36408:(e,t,r)=>{r.d(t,{M:()=>s});const s=new(r(14628).O)({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"})},4144:(e,t,r)=>{r.d(t,{GC:()=>x,I5:()=>f,Wi:()=>g,Y$:()=>m,cF:()=>y,wf:()=>w,y6:()=>h});var s=r(88264);const i="__begin__",n="__end__",o=new RegExp(i,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(n+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function y(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function w(e){let t;return e?(t=(0,s.qq)(e,(e=>i+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,d).replaceAll(a,p)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,q=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=q.exec(e),t?t[2]:null)}},4736:(e,t,r)=>{r.d(t,{e:()=>s});const s=(0,r(14628).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},59500:(e,t,r)=>{r.d(t,{c:()=>v});var s,i=r(41948),n=r(60708),o=r(6444),a=r(14628),l=r(40504),u=r(62088),c=r(1580),d=(r(9456),r(66360),r(33600)),p=r(12552),h=r(18996),m=r(56156),f=r(6704),y=r(600);const g=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=s=class extends l.am{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.c.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=o.c.fromJSON(i),a=i.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=i.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],s=l[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.h4)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=m.c.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.ct)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(a[0]),i=r(a[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Cs)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.Cs)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Cs)(e)?e.rings:e.paths;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,c.qq)({type:[o.c],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,d.E)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,c.qq)({type:[y.c],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,c.qq)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.G)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,c.qq)({types:n.Su,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,d.E)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,c.qq)({type:m.c,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.G)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,c.qq)({json:{write:!0}})],w.prototype,"transform",void 0),w=s=(0,i._)([(0,p.c)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},45704:(e,t,r)=>{r.d(t,{Sg:()=>c,Uj:()=>u,Uz:()=>l,YP:()=>d}),r(9456);var s=r(47472),i=r(7432),n=r(49736),o=r(28652),a=r(9504);const l=n.c.fromJSON(a.qe),u=i.c.fromJSON(a.MZ),c=s.c.fromJSON(a.yq),d=o.c.fromJSON(a.gF);n.c.fromJSON(a.gP),i.c.fromJSON(a.aV),s.c.fromJSON(a.wp)},9504:(e,t,r)=>{r.d(t,{MZ:()=>n,aV:()=>u,gF:()=>a,gP:()=>l,qe:()=>i,wp:()=>c,yq:()=>o});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6192],{46192:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>O});var r=t(47620),i=t(17288),s=t(8736),a=t(82344),o=t(98412),c=t(96680),l=t(5752),u=t(19692),f=t(15424),d=t(24296),h=t(95247),w=t(50853),m=t(99643),g=t(53004),p=t(67776),y=t(7488),v=t(48516),b=t(6704),I=t(54872),P=t(2600);async function k(e,n,t){const i=r.id?.findCredential(e.restUrl);if(!i)return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;const s={responseType:"json",query:{f:"json"}};if(t&&(s.query.returnUserLicenseTypeExtensions=!0),""===n){const n=await(0,P.c)(e.restUrl+"/community/self",s);if(n.data){const e=n.data;if(e?.username)return e}return null}const a=await(0,P.c)(e.restUrl+"/community/users/"+n,s);if(a.data){const e=a.data;return e.error?null:e}return null}function _(e){return 0===r.WU.indexOf("4.")?y.c.fromExtent(e):new y.c({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function A(e,n,t){if((0,c.H)(e,2,2,n,t),e[0]instanceof w.c&&e[1]instanceof w.c);else if(e[0]instanceof w.c&&null===e[1]);else if(e[1]instanceof w.c&&null===e[0]);else if(null!==e[0]||null!==e[1])throw new a.w7(n,a.iU.InvalidParameter,t)}async function U(e,n){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let t=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(t=(0,u.gl)(e.spatialReference)/(0,d.k8)(e.spatialReference));let r=0;if("polyline"===e.type)for(const n of e.paths)for(let e=1;e<n.length;e++)r+=(0,u.M9)(n[e],n[e-1],t);else if("polygon"===e.type)for(const n of e.rings){for(let e=1;e<n.length;e++)r+=(0,u.M9)(n[e],n[e-1],t);(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||void 0!==n[0][2]&&n[0][2]!==n[n.length-1][2])&&(r+=(0,u.M9)(n[0],n[n.length-1],t))}else"extent"===e.type&&(r+=2*(0,u.M9)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],t),r+=2*(0,u.M9)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],t),r*=2,r+=4*Math.abs((0,c.K)(e.zmax,0)*t-(0,c.K)(e.zmin,0)*t));const i=new v.c({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return(0,m.sH)(i,n)}function O(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null===i[0]||null===i[1]||(0,m.O6)(i[0],i[1]))))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.K0)(i[0],i[1]))))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m._g)(i[0],i[1]))))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.iS)(i[0],i[1]))))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.Cu)(i[0],i[1]))))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.Y7)(i[0],i[1]))))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.q8)(i[0],i[1]))))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>((0,c.H)(i,2,2,n,t),i[0]===i[1]||(i[0]instanceof w.c&&i[1]instanceof w.c?(0,m.yK)(i[0],i[1]):((0,c.k)(i[0])&&(0,c.k)(i[1])||!!((0,c.n)(i[0])&&(0,c.n)(i[1])||(0,c.m)(i[0])&&(0,c.m)(i[1])))&&i[0].equals(i[1])))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,3,3,n,t),i[0]instanceof w.c&&i[1]instanceof w.c)return(0,m.qY)(i[0],i[1],(0,c.j)(i[2]));if(i[0]instanceof w.c&&null===i[1])return!1;if(i[1]instanceof w.c&&null===i[0])return!1;if(null===i[0]&&null===i[1])return!1;throw new a.w7(n,a.iU.InvalidParameter,t)}))},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null===i[0]||null===i[1]?null:(0,m.d)(i[0],i[1]))))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{const s=[];if(0===(i=(0,c.I)(i)).length)throw new a.w7(n,a.iU.WrongNumberOfParameters,t);if(1===i.length)if((0,c.o)(i[0])){const e=(0,c.I)(i[0]);for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s.push(e[r])}}else{if(!(0,c.q)(i[0])){if(i[0]instanceof w.c)return(0,c.x)((0,o.SW)(i[0]),n.spatialReference);if(null===i[0])return null;throw new a.w7(n,a.iU.InvalidParameter,t)}{const e=(0,c.I)(i[0].toArray());for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s.push(e[r])}}}else for(let e=0;e<i.length;e++)if(null!==i[e]){if(!(i[e]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s.push(i[e])}return 0===s.length?null:(0,m.SQ)(s)}))},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null===i[1]?(0,o.SW)(i[0]):null===i[0]?null:(0,m.o1)(i[0],i[1]))))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null===i[0]&&null===i[1]?null:null===i[0]?(0,o.SW)(i[1]):null===i[1]?(0,o.SW)(i[0]):(0,m.uR)(i[0],i[1]))))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[1]instanceof h.c)&&null!==i[1])throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return null===i[1]?null:(0,m.wR)(i[0],i[1])}))},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[1]instanceof v.c)&&null!==i[1])throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0])return[];if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return null===i[1]?[(0,o.SW)(i[0])]:(0,m.us)(i[0],i[1])}))},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumArea((0,o.Oo)((0,c.K)(i[1],-1)),!1,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.J)(i[0],n.spatialReference);return null===e?0:(0,m.i6)(e,(0,o.Oo)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.i6)(i[0],(0,o.Oo)((0,c.K)(i[1],-1)))}))},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumArea((0,o.Oo)((0,c.K)(i[1],-1)),!0,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.J)(i[0],n.spatialReference);return null===e?0:(0,m.O4)(e,(0,o.Oo)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.O4)(i[0],(0,o.Oo)((0,c.K)(i[1],-1)))}))},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumLength((0,o.ID)((0,c.K)(i[1],-1)),!1,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.L)(i[0],n.spatialReference);return null===e?0:(0,m.sH)(e,(0,o.ID)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.sH)(i[0],(0,o.ID)((0,c.K)(i[1],-1)))}))},e.functions.length3d=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.L)(i[0],n.spatialReference);return null===e?0:!0===e.hasZ?U(e,(0,o.ID)((0,c.K)(i[1],-1))):(0,m.sH)(e,(0,o.ID)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return!0===i[0].hasZ?U(i[0],(0,o.ID)((0,c.K)(i[1],-1))):(0,m.sH)(i[0],(0,o.ID)((0,c.K)(i[1],-1)))}))},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumLength((0,o.ID)((0,c.K)(i[1],-1)),!0,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.L)(i[0],n.spatialReference);return null===e?0:(0,m.mk)(e,(0,o.ID)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.mk)(i[0],(0,o.ID)((0,c.K)(i[1],-1)))}))},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,2,3,n,t);let s=i[0];((0,c.o)(i[0])||(0,c.q)(i[0]))&&(s=(0,c.M)(i[0],n.spatialReference));let l=i[1];if(((0,c.o)(i[1])||(0,c.q)(i[1]))&&(l=(0,c.M)(i[1],n.spatialReference)),!(s instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(l instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.qy)(s,l,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,2,3,n,t);const s=i[0],l=i[1];if(!(s instanceof p.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(l instanceof p.c))throw new a.w7(n,a.iU.InvalidParameter,t);const u=new v.c({paths:[],spatialReference:s.spatialReference});return u.addPath([s,l]),(0,m.mk)(u,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);if(s<=0)throw new a.w7(n,a.iU.InvalidParameter,t);return i[0]instanceof y.c||i[0]instanceof v.c?(0,m.CK)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]instanceof h.c?(0,m.CK)(_(i[0]),s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]}))},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);if(s<=0)throw new a.w7(n,a.iU.InvalidParameter,t);return i[0]instanceof y.c||i[0]instanceof v.c?(0,m.wx)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]instanceof h.c?(0,m.wx)(_(i[0]),s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]}))},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,4,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.EZ)(i[0],s,(0,c.h)((0,c.K)(i[2],!0)),(0,o.ID)((0,c.K)(i[3],-1)))}))},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);return 0===s?(0,o.SW)(i[0]):(0,m.cz)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);return 0===s?(0,o.SW)(i[0]):(0,m.uk)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,6,n,t),null===i[0])return null;if(!(i[0]instanceof y.c||i[0]instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,c.g)((0,c.K)(i[4],10));if(isNaN(l))throw new a.w7(n,a.iU.InvalidParameter,t);const u=(0,c.g)((0,c.K)(i[5],0));if(isNaN(u))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.E3)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1)),(0,c.j)((0,c.K)(i[3],"round")).toLowerCase(),l,u)}))},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,2,3,n,t);let s=i[0];if(null===s)return null;if(!(s instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s instanceof h.c&&(s=y.c.fromExtent(s));const o=(0,c.g)(i[1]);if(isNaN(o))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,c.K)(i[2],null);if(null===l)return(0,m.c9)(s,o);if(l instanceof p.c)return(0,m.c9)(s,o,l);throw new a.w7(n,a.iU.InvalidParameter,t)}))},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return null;let s=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(s=(0,c.M)(i[0],n.spatialReference)),null===s)return null;if(!(s instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return s instanceof p.c?(0,c.x)((0,o.SW)(i[0]),n.spatialReference):s instanceof y.c?s.centroid:s instanceof v.c?(0,u.i4)(s):s instanceof g.c?(0,u.kr)(s):s instanceof h.c?s.center:null}))},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),null===i[0])return null;let o=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(o=(0,c.L)(i[0],n.spatialReference)),null===o)return null;if(!(o instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(o instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);if((0,c.b)(!1===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,f.iq)(o,i[1]);return l?s.c.convertObjectToArcadeDictionary(l,(0,c.N)(n),!1,!0):null}))},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),null===i[0])return null;let o=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(o=(0,c.L)(i[0],n.spatialReference)),null===o)return null;if(!(o instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(o instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);const l=i[1];if(null===l)return null;if(!(l instanceof p.c))throw new a.w7(n,a.iU.InvalidParameter,t);if((0,c.b)(!1===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);const u=(0,f.mm)(o,l);return u?s.c.convertObjectToArcadeDictionary(u,(0,c.N)(n),!1,!0):null}))},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),null===i[0])return null;let o=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(o=(0,c.L)(i[0],n.spatialReference)),null===o)return null;if(!(o instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(o instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);if((0,c.b)(!1===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,f.qK)(o,i[1]);return l?s.c.convertObjectToArcadeDictionary(l,(0,c.N)(n),!1,!0):null}))},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,1,1,n,t);const s=[];if(null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(i[0]instanceof p.c)return[(0,c.x)((0,o.SW)(i[0]),n.spatialReference)];if(i[0]instanceof h.c)return[(0,c.x)((0,o.SW)(i[0]),n.spatialReference)];const l=await(0,m.OM)(i[0]);if(l instanceof y.c){const e=[],n=[];for(let t=0;t<l.rings.length;t++)if(l.isClockwise(l.rings[t])){const n=(0,b.h4)({rings:[l.rings[t]],hasZ:!0===l.hasZ,hazM:!0===l.hasM,spatialReference:l.spatialReference.toJSON()});e.push(n)}else n.push({ring:l.rings[t],pt:l.getPoint(t,0)});for(let t=0;t<n.length;t++)for(let r=0;r<e.length;r++)if(e[r].contains(n[t].pt)){e[r].addRing(n[t].ring);break}return e}if(l instanceof v.c){const e=[];for(let n=0;n<l.paths.length;n++){const t=(0,b.h4)({paths:[l.paths[n]],hasZ:!0===l.hasZ,hazM:!0===l.hasM,spatialReference:l.spatialReference.toJSON()});e.push(t)}return e}if(i[0]instanceof g.c){const e=(0,c.x)((0,o.SW)(i[0]),n.spatialReference);for(let n=0;n<e.points.length;n++)s.push(e.getPoint(n));return s}return null}))},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return!0;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.i2)(i[0])}))},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.OM)(i[0])}))},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.mq)(i[0])}))},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,o)=>{(0,c.H)(o,0,2,n,t);let u=(0,c.K)(o[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,c.j)(u),0===o.length||o[0]instanceof i.c){let e=null;e=n.services?.portal?n.services.portal:I.c.getDefault(),o.length>0&&(e=(0,l.q)(o[0],e));const t=await k(e,u,f);if(t){const e=JSON.parse(JSON.stringify(t));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return s.c.convertObjectToArcadeDictionary(e,(0,c.N)(n))}return null}let d=null;if((0,c.u)(o[0])&&(d=o[0]),d){if(f=!1,u)return null;await d.load();const e=await d.getOwningSystemUrl();if(!e){if(!u){const e=await d.getIdentityUser();return e?s.c.convertObjectToArcadeDictionary({username:e},(0,c.N)(n)):null}return null}let t=null;t=n.services?.portal?n.services.portal:I.c.getDefault(),t=(0,l.q)(new i.c(e),t);const r=await k(t,u,f);if(r){const e=JSON.parse(JSON.stringify(r));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return s.c.convertObjectToArcadeDictionary(e,(0,c.N)(n))}return null}throw new a.w7(n,a.iU.InvalidParameter,t)}))}),e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[0]instanceof w.c||null===i[0]))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(i[1]instanceof p.c||null===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const o=await(0,m.KU)(i[0],i[1]);return null===o?null:s.c.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance,sideOfLine:0===o.distance?"straddle":o.isRightSide?"right":"left"},(0,c.N)(n),!1,!0)}))},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[0]instanceof w.c||null===i[0]))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(i[1]instanceof p.c||null===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const o=await(0,m.wf)(i[0],i[1]);return null===o?null:s.c.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance,sideOfLine:0===o.distance?"straddle":o.isRightSide?"right":"left"},(0,c.N)(n),!1,!0)}))}}},5752:(e,n,t)=>{t.d(n,{q:()=>i});var r=t(54872);function i(e,n){return null===e?n:new r.c({url:e.field("url")})}},54792:(e,n,t)=>{t.d(n,{c:()=>s});var r=t(67432),i=t(9592);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.n,this._items=new Set}get length(){return(0,r.am)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.am)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const n=this.length;return this._items.forEach((n=>{e(n)||this._items.delete(n)})),n!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.am)(this._observable),yield*this._items}}},46448:(e,n,t)=>{t.d(n,{c:()=>l});var r=t(38912),i=t(10860),s=t(54792),a=t(13056),o=t(25512),c=t(38432);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.c}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,n){return new Promise(((t,r)=>{let s=!0;const a=e=>{(0,i.wp)(n.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,i.eW)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new c.default(e,n,this._ongoingJobsQueue),a(t),this._clients[s])),(()=>(a(r),null))):(this._clients[s]=new c.default(o,n,this._ongoingJobsQueue),this._clientPromises[s]=Promise.resolve(this._clients[s]),a(t))}}))}broadcast(e,n,t){const r=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const s=this._clientPromises[i];r[i]=s.then((r=>r?.invoke(e,n,t)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.Uh)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,a.S)(this)}invoke(e,n,t){return this.apply(e,[n],t)}apply(e,n,t){const r=(0,i.qG)();this._ongoingJobsQueue.push({methodName:e,data:n,invokeOptions:t,resolver:r});for(let e=0;e<this._clientPromises.length;e++){const n=this._clients[e];n?n.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return r.promise}createInvokeProxy(e){return(0,o.Y)(this,e)}on(e,n){return Promise.all(this._clientPromises).then((()=>(0,r.Ip)(this._clients.map((t=>t.on(e,n))))))}openPorts(){return new Promise((e=>{const n=new Array(this._clientPromises.length);let t=n.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((i=>{i&&(n[r]=i.openPort()),0==--t&&e(n)}))}))}get test(){return{numClients:this._clients.length}}}},13056:(e,n,t)=>{t.d(n,{S:()=>s,s:()=>i});const r=new FinalizationRegistry((e=>{e.close()}));function i(e,n){r.register(e,n,n)}function s(e){r.unregister(e)}},35268:(e,n,t)=>{t.d(n,{eU:()=>W});var r=t(20744),i=t(9456),s=t(10860),a=t(46448),o=t(13056),c=t(38432),l=t(66360),u=t(70680),f=t(2600),d=t(28176);const h={async request(e,n){const t=e.options,r=t.responseType;t.signal=n?.signal,t.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,d.OO)(e.url)?.after?r:"array-buffer";const i=await(0,f.c)(e.url,t),s={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=(new TextEncoder).encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=(new TextEncoder).encode(s.data).buffer}return{result:s,transferList:[s.data]}}};var w=t(31056),m=t(24832),g=t(6220),p=(t(2016),t(47620));const y={};var v=t(52324);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((n=>{this[n]=(...t)=>e[n](...t)}))}}class I{constructor(){this._dispatcher=new b,this._workerPostMessage({type:w.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.o)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,n,t){this._dispatcher.addEventListener(e,n,t)}removeEventListener(e,n,t){this._dispatcher.removeEventListener(e,n,t)}_workerPostMessage(e){(0,v.o)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const n=(0,w.mO)(e);if(n&&n.type===w.MessageType.OPEN){const{modulePath:e,jobId:t}=n;let r=await c.default.loadWorker(e);r||(r=await import(e));const i=c.default.connect(r);this._workerPostMessage({type:w.MessageType.OPENED,jobId:t,data:i})}}}var P=t(89960),k=t(69880);const _=()=>l.c.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:A}=w.MessageType;let U,O;const E="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((n=>{function t(i){const s=(0,w.mO)(i);s&&s.type===A&&(e.removeEventListener("message",t),e.removeEventListener("error",r),n(e))}function r(n){n.preventDefault(),e.removeEventListener("message",t),e.removeEventListener("error",r),_().warn("Failed to create Worker. Fallback to execute module in main thread",n),(e=new I).addEventListener("message",t),e.addEventListener("error",r)}e.addEventListener("message",t),e.addEventListener("error",r)}))}let S=0;const{ABORT:R,INVOKE:H,OPEN:M,OPENED:x,RESPONSE:D}=w.MessageType;class F{static async create(e){const n=await async function(){if(!(0,i.c)("esri-workers"))return N(new I);if(!U&&!O)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=g.default.default){const n={...g.default};delete n.default,e=JSON.parse(JSON.stringify(n))}else e=JSON.parse(JSON.stringify(g.default));e.assetsPath=(0,d.WM)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.WM)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,P.a8)(),e.has={"esri-csp-restrictions":(0,i.c)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.c)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.c)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.c)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.c)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.c)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.c)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.c)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.c)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.c)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.c)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.c)("esri-atomics"),"esri-shared-array-buffer":(0,i.c)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.c)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.c)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.c)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.WM)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.WM)(e.workers.workerPath):e.workers.workerPath=(0,d.WM)((0,m.O)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const n=g.default.workers.loaderConfig,t=function(e){const n={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(n.async=!0),e.hasOwnProperty("isDebug")||(n.isDebug=!1),e.baseUrl||(n.baseUrl=y.baseUrl),n}({baseUrl:n?.baseUrl,locale:(0,P.a8)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...n?.has},map:{...n?.map},paths:{...n?.paths},packages:n?.packages||[]}),r={buildDate:k.W,fullVersion:p.c1,revision:k.m};return JSON.stringify({esriConfig:e,loaderConfig:t,kernelInfo:r})}()}'`);U=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){O=e||{}}let e;if(U)try{e=new Worker(U,{name:"esri-worker-"+S++})}catch(n){_().warn(E,O),e=new I}else _().warn(E,O),e=new I;return N(e)}();return new F(n,e)}constructor(e,n){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=n,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),l.c.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,n={}){const{signal:t}=n,r=(0,w.EH)();return new Promise(((n,i)=>{const a={resolve:n,reject:i,abortHandle:(0,s.Ij)(t,(()=>{this._outJobs.delete(r),this._post({type:R,jobId:r})}))};this._outJobs.set(r,a),this._post({type:M,jobId:r,modulePath:e})}))}_onMessage(e){const n=(0,w.mO)(e);if(n)switch(n.type){case x:this._onOpenedMessage(n);break;case D:this._onResponseMessage(n);break;case R:this._onAbortMessage(n);break;case H:this._onInvokeMessage(n)}}_onAbortMessage(e){const n=this._inJobs,t=e.jobId,r=n.get(t);r&&(r.controller&&r.controller.abort(),n.delete(t))}_onInvokeMessage(e){const{methodName:n,jobId:t,data:r,abortable:i}=e,a=i?new AbortController:null,o=this._inJobs,c=h[n];let l;try{if("function"!=typeof c)throw new TypeError(`${n} is not a function`);l=c.call(null,r,{signal:a?a.signal:null})}catch(e){return void this._post({type:D,jobId:t,error:(0,w.O)(e)})}(0,s.eW)(l)?(o.set(t,{controller:a,promise:l}),l.then((e=>{o.has(t)&&(o.delete(t),this._post({type:D,jobId:t},e))}),(e=>{o.has(t)&&(o.delete(t),e||(e={message:"Error encountered at method"+n}),(0,s.mA)(e)||this._post({type:D,jobId:t,error:(0,w.O)(e||{message:`Error encountered at method ${n}`})}))}))):this._post({type:D,jobId:t},l)}_onOpenedMessage(e){const{jobId:n,data:t}=e,r=this._outJobs.get(n);r&&(this._outJobs.delete(n),(0,u.oR)(r.abortHandle),r.resolve(t))}_onResponseMessage(e){const{jobId:n,error:t,data:i}=e,s=this._outJobs.get(n);s&&(this._outJobs.delete(n),(0,u.oR)(s.abortHandle),t?s.reject(r.c.fromJSON(JSON.parse(t))):s.resolve(i))}_post(e,n,t){return(0,w.E9)(this.worker,e,n,t)}}const K=(0,i.c)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.c)("workers-pool-size")):0;let j=(0,i.c)("esri-mobile")?Math.min(K,3):K;j||(j=(0,i.c)("safari")&&(0,i.c)("mac")?7:2);let C=0;const q=[];async function L(e,n){const t=new a.c,{registryTarget:r,...i}=n;return await t.open(e,i),r&&(0,o.s)(r,t),t}async function W(e,n={}){if("string"!=typeof e)throw new r.c("workers:undefined-module","modulePath is missing");let t=n.strategy||"distributed";if((0,i.c)("host-webworker")&&!(0,i.c)("esri-workers")&&(t="local"),"local"===t){let t=await c.default.loadWorker(e);t||(t=await import(e)),(0,s.wp)(n.signal);const r=n.client||t;return L([c.default.connect(t)],{...n,client:r})}if(await async function(){if(T)return T;J=new AbortController;const e=[];for(let n=0;n<j;n++){const t=F.create(n).then((e=>(q[n]=e,e)));e.push(t)}return T=Promise.all(e),T}(),(0,s.wp)(n.signal),"dedicated"===t){const t=C++%j;return L([await q[t].open(e,n)],n)}if(n.maxNumWorkers&&n.maxNumWorkers>0){const t=Math.min(n.maxNumWorkers,j);if(t<j){const r=new Array(t);for(let i=0;i<t;++i){const t=C++%j;r[i]=q[t].open(e,n)}return L(r,n)}}return L(q.map((t=>t.open(e,n))),n)}let J,T=null},99643:(e,n,t)=>{t.d(n,{CK:()=>K,Cu:()=>v,E3:()=>S,EZ:()=>F,K0:()=>p,KU:()=>M,O4:()=>L,O6:()=>b,OM:()=>_,SQ:()=>N,Y7:()=>h,_g:()=>y,c9:()=>D,cz:()=>R,d:()=>E,i2:()=>k,i6:()=>C,iS:()=>w,mk:()=>W,mq:()=>A,o1:()=>U,q8:()=>I,qY:()=>P,qy:()=>m,sH:()=>q,uR:()=>O,uk:()=>H,us:()=>d,wR:()=>f,wf:()=>x,wx:()=>j,yK:()=>g}),t(60708);var r=t(35268),i=t(67776),s=t(6704);function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function o(e){return e?Array.isArray(e)?e.map(o):e.toJSON?e.toJSON():e:e}function c(e){return Array.isArray(e)?e.map((e=>(0,s.h4)(e))):(0,s.h4)(e)}let l;async function u(e,n){return(await async function(){return l||(l=(0,r.eU)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:o(n)})}async function f(e,n){return c(await u("clip",[a(e),e,n]))}async function d(e,n){return c(await u("cut",[a(e),e,n]))}function h(e,n){return u("contains",[a(e),e,n])}function w(e,n){return u("crosses",[a(e),e,n])}function m(e,n,t){return u("distance",[a(e),e,n,t])}function g(e,n){return u("equals",[a(e),e,n])}function p(e,n){return u("intersects",[a(e),e,n])}function y(e,n){return u("touches",[a(e),e,n])}function v(e,n){return u("within",[a(e),e,n])}function b(e,n){return u("disjoint",[a(e),e,n])}function I(e,n){return u("overlaps",[a(e),e,n])}function P(e,n,t){return u("relate",[a(e),e,n,t])}function k(e){return u("isSimple",[a(e),e])}async function _(e){return c(await u("simplify",[a(e),e]))}async function A(e,n=!1){return c(await u("convexHull",[a(e),e,n]))}async function U(e,n){return c(await u("difference",[a(e),e,n]))}async function O(e,n){return c(await u("symmetricDifference",[a(e),e,n]))}async function E(e,n){return c(await u("intersect",[a(e),e,n]))}async function N(e,n=null){const t=function(e,n){let t;return Array.isArray(e)?t=e:(t=[],t.push(e),null!=n&&t.push(n)),t}(e,n);return c(await u("union",[a(t),t]))}async function S(e,n,t,r,i,s){return c(await u("offset",[a(e),e,n,t,r,i,s]))}async function R(e,n,t,r=!1){const i=[a(e),e,n,t,r];return c(await u("buffer",i))}async function H(e,n,t,r,i,s){const o=[a(e),e,n,t,r,i,s];return c(await u("geodesicBuffer",o))}async function M(e,n,t=!0){const r=await u("nearestCoordinate",[a(e),e,n,t]);return{...r,coordinate:i.c.fromJSON(r.coordinate)}}async function x(e,n){const t=await u("nearestVertex",[a(e),e,n]);return{...t,coordinate:i.c.fromJSON(t.coordinate)}}async function D(e,n,t){if(null==e)throw new J;const r=e.spatialReference;if(null==(t=t??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new J;const i=e.constructor.fromJSON(await u("rotate",[r,e,n,t]));return i.spatialReference=r,i}async function F(e,n,t,r){return c(await u("generalize",[a(e),e,n,t,r]))}async function K(e,n,t){return c(await u("densify",[a(e),e,n,t]))}async function j(e,n,t,r=0){return c(await u("geodesicDensify",[a(e),e,n,t,r]))}function C(e,n){return u("planarArea",[a(e),e,n])}function q(e,n){return u("planarLength",[a(e),e,n])}function L(e,n,t){return u("geodesicArea",[a(e),e,n,t])}function W(e,n,t){return u("geodesicLength",[a(e),e,n,t])}class J extends Error{constructor(){super("Illegal Argument Exception")}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6192],{46192:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>O});var r=t(47620),i=t(17288),s=t(8736),a=t(82344),o=t(98412),c=t(96680),l=t(5752),u=t(19692),f=t(15424),d=t(24296),h=t(95247),w=t(50853),m=t(99643),g=t(53004),p=t(67776),y=t(7488),v=t(48516),b=t(6704),I=t(54872),P=t(2600);async function k(e,n,t){const i=r.id?.findCredential(e.restUrl);if(!i)return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;const s={responseType:"json",query:{f:"json"}};if(t&&(s.query.returnUserLicenseTypeExtensions=!0),""===n){const n=await(0,P.c)(e.restUrl+"/community/self",s);if(n.data){const e=n.data;if(e?.username)return e}return null}const a=await(0,P.c)(e.restUrl+"/community/users/"+n,s);if(a.data){const e=a.data;return e.error?null:e}return null}function _(e){return 0===r.WU.indexOf("4.")?y.c.fromExtent(e):new y.c({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function A(e,n,t){if((0,c.H)(e,2,2,n,t),e[0]instanceof w.c&&e[1]instanceof w.c);else if(e[0]instanceof w.c&&null===e[1]);else if(e[1]instanceof w.c&&null===e[0]);else if(null!==e[0]||null!==e[1])throw new a.w7(n,a.iU.InvalidParameter,t)}async function U(e,n){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let t=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(t=(0,u.gl)(e.spatialReference)/(0,d.k8)(e.spatialReference));let r=0;if("polyline"===e.type)for(const n of e.paths)for(let e=1;e<n.length;e++)r+=(0,u.M9)(n[e],n[e-1],t);else if("polygon"===e.type)for(const n of e.rings){for(let e=1;e<n.length;e++)r+=(0,u.M9)(n[e],n[e-1],t);(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||void 0!==n[0][2]&&n[0][2]!==n[n.length-1][2])&&(r+=(0,u.M9)(n[0],n[n.length-1],t))}else"extent"===e.type&&(r+=2*(0,u.M9)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],t),r+=2*(0,u.M9)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],t),r*=2,r+=4*Math.abs((0,c.K)(e.zmax,0)*t-(0,c.K)(e.zmin,0)*t));const i=new v.c({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return(0,m.sH)(i,n)}function O(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null===i[0]||null===i[1]||(0,m.O6)(i[0],i[1]))))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.K0)(i[0],i[1]))))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m._g)(i[0],i[1]))))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.iS)(i[0],i[1]))))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.Cu)(i[0],i[1]))))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.Y7)(i[0],i[1]))))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null!==i[1]&&(0,m.q8)(i[0],i[1]))))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>((0,c.H)(i,2,2,n,t),i[0]===i[1]||(i[0]instanceof w.c&&i[1]instanceof w.c?(0,m.yK)(i[0],i[1]):((0,c.k)(i[0])&&(0,c.k)(i[1])||!!((0,c.n)(i[0])&&(0,c.n)(i[1])||(0,c.m)(i[0])&&(0,c.m)(i[1])))&&i[0].equals(i[1])))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,3,3,n,t),i[0]instanceof w.c&&i[1]instanceof w.c)return(0,m.qY)(i[0],i[1],(0,c.j)(i[2]));if(i[0]instanceof w.c&&null===i[1])return!1;if(i[1]instanceof w.c&&null===i[0])return!1;if(null===i[0]&&null===i[1])return!1;throw new a.w7(n,a.iU.InvalidParameter,t)}))},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null===i[0]||null===i[1]?null:(0,m.d)(i[0],i[1]))))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{const s=[];if(0===(i=(0,c.I)(i)).length)throw new a.w7(n,a.iU.WrongNumberOfParameters,t);if(1===i.length)if((0,c.o)(i[0])){const e=(0,c.I)(i[0]);for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s.push(e[r])}}else{if(!(0,c.q)(i[0])){if(i[0]instanceof w.c)return(0,c.x)((0,o.SW)(i[0]),n.spatialReference);if(null===i[0])return null;throw new a.w7(n,a.iU.InvalidParameter,t)}{const e=(0,c.I)(i[0].toArray());for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s.push(e[r])}}}else for(let e=0;e<i.length;e++)if(null!==i[e]){if(!(i[e]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s.push(i[e])}return 0===s.length?null:(0,m.SQ)(s)}))},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null!==i[0]&&null===i[1]?(0,o.SW)(i[0]):null===i[0]?null:(0,m.o1)(i[0],i[1]))))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>(A(i=(0,c.I)(i),n,t),null===i[0]&&null===i[1]?null:null===i[0]?(0,o.SW)(i[1]):null===i[1]?(0,o.SW)(i[0]):(0,m.uR)(i[0],i[1]))))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[1]instanceof h.c)&&null!==i[1])throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return null===i[1]?null:(0,m.wR)(i[0],i[1])}))},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[1]instanceof v.c)&&null!==i[1])throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0])return[];if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return null===i[1]?[(0,o.SW)(i[0])]:(0,m.us)(i[0],i[1])}))},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumArea((0,o.Oo)((0,c.K)(i[1],-1)),!1,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.J)(i[0],n.spatialReference);return null===e?0:(0,m.i6)(e,(0,o.Oo)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.i6)(i[0],(0,o.Oo)((0,c.K)(i[1],-1)))}))},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumArea((0,o.Oo)((0,c.K)(i[1],-1)),!0,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.J)(i[0],n.spatialReference);return null===e?0:(0,m.O4)(e,(0,o.Oo)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.O4)(i[0],(0,o.Oo)((0,c.K)(i[1],-1)))}))},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumLength((0,o.ID)((0,c.K)(i[1],-1)),!1,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.L)(i[0],n.spatialReference);return null===e?0:(0,m.sH)(e,(0,o.ID)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.sH)(i[0],(0,o.ID)((0,c.K)(i[1],-1)))}))},e.functions.length3d=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.L)(i[0],n.spatialReference);return null===e?0:!0===e.hasZ?U(e,(0,o.ID)((0,c.K)(i[1],-1))):(0,m.sH)(e,(0,o.ID)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return!0===i[0].hasZ?U(i[0],(0,o.ID)((0,c.K)(i[1],-1))):(0,m.sH)(i[0],(0,o.ID)((0,c.K)(i[1],-1)))}))},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if((0,c.H)(i,1,2,n,t),null===(i=(0,c.I)(i))[0])return 0;if((0,c.u)(i[0])){const e=await i[0].sumLength((0,o.ID)((0,c.K)(i[1],-1)),!0,n.abortSignal);if(n.abortSignal.aborted)throw new a.w7(n,a.iU.Cancelled,t);return e}if((0,c.o)(i[0])||(0,c.q)(i[0])){const e=(0,c.L)(i[0],n.spatialReference);return null===e?0:(0,m.mk)(e,(0,o.ID)((0,c.K)(i[1],-1)))}if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.mk)(i[0],(0,o.ID)((0,c.K)(i[1],-1)))}))},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,2,3,n,t);let s=i[0];((0,c.o)(i[0])||(0,c.q)(i[0]))&&(s=(0,c.M)(i[0],n.spatialReference));let l=i[1];if(((0,c.o)(i[1])||(0,c.q)(i[1]))&&(l=(0,c.M)(i[1],n.spatialReference)),!(s instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(l instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.qy)(s,l,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,2,3,n,t);const s=i[0],l=i[1];if(!(s instanceof p.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(l instanceof p.c))throw new a.w7(n,a.iU.InvalidParameter,t);const u=new v.c({paths:[],spatialReference:s.spatialReference});return u.addPath([s,l]),(0,m.mk)(u,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);if(s<=0)throw new a.w7(n,a.iU.InvalidParameter,t);return i[0]instanceof y.c||i[0]instanceof v.c?(0,m.CK)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]instanceof h.c?(0,m.CK)(_(i[0]),s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]}))},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);if(s<=0)throw new a.w7(n,a.iU.InvalidParameter,t);return i[0]instanceof y.c||i[0]instanceof v.c?(0,m.wx)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]instanceof h.c?(0,m.wx)(_(i[0]),s,(0,o.ID)((0,c.K)(i[2],-1))):i[0]}))},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,4,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.EZ)(i[0],s,(0,c.h)((0,c.K)(i[2],!0)),(0,o.ID)((0,c.K)(i[3],-1)))}))},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);return 0===s?(0,o.SW)(i[0]):(0,m.cz)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,3,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);return 0===s?(0,o.SW)(i[0]):(0,m.uk)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1)))}))},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,6,n,t),null===i[0])return null;if(!(i[0]instanceof y.c||i[0]instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);const s=(0,c.g)(i[1]);if(isNaN(s))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,c.g)((0,c.K)(i[4],10));if(isNaN(l))throw new a.w7(n,a.iU.InvalidParameter,t);const u=(0,c.g)((0,c.K)(i[5],0));if(isNaN(u))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.E3)(i[0],s,(0,o.ID)((0,c.K)(i[2],-1)),(0,c.j)((0,c.K)(i[3],"round")).toLowerCase(),l,u)}))},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,2,3,n,t);let s=i[0];if(null===s)return null;if(!(s instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);s instanceof h.c&&(s=y.c.fromExtent(s));const o=(0,c.g)(i[1]);if(isNaN(o))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,c.K)(i[2],null);if(null===l)return(0,m.c9)(s,o);if(l instanceof p.c)return(0,m.c9)(s,o,l);throw new a.w7(n,a.iU.InvalidParameter,t)}))},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return null;let s=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(s=(0,c.M)(i[0],n.spatialReference)),null===s)return null;if(!(s instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return s instanceof p.c?(0,c.x)((0,o.SW)(i[0]),n.spatialReference):s instanceof y.c?s.centroid:s instanceof v.c?(0,u.i4)(s):s instanceof g.c?(0,u.kr)(s):s instanceof h.c?s.center:null}))},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),null===i[0])return null;let o=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(o=(0,c.L)(i[0],n.spatialReference)),null===o)return null;if(!(o instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(o instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);if((0,c.b)(!1===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,f.iq)(o,i[1]);return l?s.c.convertObjectToArcadeDictionary(l,(0,c.N)(n),!1,!0):null}))},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),null===i[0])return null;let o=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(o=(0,c.L)(i[0],n.spatialReference)),null===o)return null;if(!(o instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(o instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);const l=i[1];if(null===l)return null;if(!(l instanceof p.c))throw new a.w7(n,a.iU.InvalidParameter,t);if((0,c.b)(!1===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);const u=(0,f.mm)(o,l);return u?s.c.convertObjectToArcadeDictionary(u,(0,c.N)(n),!1,!0):null}))},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),null===i[0])return null;let o=i[0];if(((0,c.o)(i[0])||(0,c.q)(i[0]))&&(o=(0,c.L)(i[0],n.spatialReference)),null===o)return null;if(!(o instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(o instanceof v.c))throw new a.w7(n,a.iU.InvalidParameter,t);if((0,c.b)(!1===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);const l=(0,f.qK)(o,i[1]);return l?s.c.convertObjectToArcadeDictionary(l,(0,c.N)(n),!1,!0):null}))},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{i=(0,c.I)(i),(0,c.H)(i,1,1,n,t);const s=[];if(null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);if(i[0]instanceof p.c)return[(0,c.x)((0,o.SW)(i[0]),n.spatialReference)];if(i[0]instanceof h.c)return[(0,c.x)((0,o.SW)(i[0]),n.spatialReference)];const l=await(0,m.OM)(i[0]);if(l instanceof y.c){const e=[],n=[];for(let t=0;t<l.rings.length;t++)if(l.isClockwise(l.rings[t])){const n=(0,b.h4)({rings:[l.rings[t]],hasZ:!0===l.hasZ,hazM:!0===l.hasM,spatialReference:l.spatialReference.toJSON()});e.push(n)}else n.push({ring:l.rings[t],pt:l.getPoint(t,0)});for(let t=0;t<n.length;t++)for(let r=0;r<e.length;r++)if(e[r].contains(n[t].pt)){e[r].addRing(n[t].ring);break}return e}if(l instanceof v.c){const e=[];for(let n=0;n<l.paths.length;n++){const t=(0,b.h4)({paths:[l.paths[n]],hasZ:!0===l.hasZ,hazM:!0===l.hasM,spatialReference:l.spatialReference.toJSON()});e.push(t)}return e}if(i[0]instanceof g.c){const e=(0,c.x)((0,o.SW)(i[0]),n.spatialReference);for(let n=0;n<e.points.length;n++)s.push(e.getPoint(n));return s}return null}))},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return!0;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.i2)(i[0])}))},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.OM)(i[0])}))},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,((e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,1,1,n,t),null===i[0])return null;if(!(i[0]instanceof w.c))throw new a.w7(n,a.iU.InvalidParameter,t);return(0,m.mq)(i[0])}))},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,o)=>{(0,c.H)(o,0,2,n,t);let u=(0,c.K)(o[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,c.j)(u),0===o.length||o[0]instanceof i.c){let e=null;e=n.services?.portal?n.services.portal:I.c.getDefault(),o.length>0&&(e=(0,l.q)(o[0],e));const t=await k(e,u,f);if(t){const e=JSON.parse(JSON.stringify(t));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return s.c.convertObjectToArcadeDictionary(e,(0,c.N)(n))}return null}let d=null;if((0,c.u)(o[0])&&(d=o[0]),d){if(f=!1,u)return null;await d.load();const e=await d.getOwningSystemUrl();if(!e){if(!u){const e=await d.getIdentityUser();return e?s.c.convertObjectToArcadeDictionary({username:e},(0,c.N)(n)):null}return null}let t=null;t=n.services?.portal?n.services.portal:I.c.getDefault(),t=(0,l.q)(new i.c(e),t);const r=await k(t,u,f);if(r){const e=JSON.parse(JSON.stringify(r));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return s.c.convertObjectToArcadeDictionary(e,(0,c.N)(n))}return null}throw new a.w7(n,a.iU.InvalidParameter,t)}))}),e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[0]instanceof w.c||null===i[0]))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(i[1]instanceof p.c||null===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const o=await(0,m.KU)(i[0],i[1]);return null===o?null:s.c.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance,sideOfLine:0===o.distance?"straddle":o.isRightSide?"right":"left"},(0,c.N)(n),!1,!0)}))},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,c.I)(i),(0,c.H)(i,2,2,n,t),!(i[0]instanceof w.c||null===i[0]))throw new a.w7(n,a.iU.InvalidParameter,t);if(!(i[1]instanceof p.c||null===i[1]))throw new a.w7(n,a.iU.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const o=await(0,m.wf)(i[0],i[1]);return null===o?null:s.c.convertObjectToArcadeDictionary({coordinate:o.coordinate,distance:o.distance,sideOfLine:0===o.distance?"straddle":o.isRightSide?"right":"left"},(0,c.N)(n),!1,!0)}))}}},5752:(e,n,t)=>{t.d(n,{q:()=>i});var r=t(54872);function i(e,n){return null===e?n:new r.c({url:e.field("url")})}},54792:(e,n,t)=>{t.d(n,{c:()=>s});var r=t(67432),i=t(9592);class s{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.n,this._items=new Set}get length(){return(0,r.am)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.am)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const n=this.length;return this._items.forEach((n=>{e(n)||this._items.delete(n)})),n!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.am)(this._observable),yield*this._items}}},46448:(e,n,t)=>{t.d(n,{c:()=>l});var r=t(38912),i=t(10860),s=t(54792),a=t(13056),o=t(25512),c=t(38432);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.c}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,n){return new Promise(((t,r)=>{let s=!0;const a=e=>{(0,i.wp)(n.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let s=0;s<e.length;++s){const o=e[s];(0,i.eW)(o)?this._clientPromises[s]=o.then((e=>(this._clients[s]=new c.default(e,n,this._ongoingJobsQueue),a(t),this._clients[s])),(()=>(a(r),null))):(this._clients[s]=new c.default(o,n,this._ongoingJobsQueue),this._clientPromises[s]=Promise.resolve(this._clients[s]),a(t))}}))}broadcast(e,n,t){const r=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const s=this._clientPromises[i];r[i]=s.then((r=>r?.invoke(e,n,t)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.Uh)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,a.S)(this)}invoke(e,n,t){return this.apply(e,[n],t)}apply(e,n,t){const r=(0,i.qG)();this._ongoingJobsQueue.push({methodName:e,data:n,invokeOptions:t,resolver:r});for(let e=0;e<this._clientPromises.length;e++){const n=this._clients[e];n?n.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return r.promise}createInvokeProxy(e){return(0,o.Y)(this,e)}on(e,n){return Promise.all(this._clientPromises).then((()=>(0,r.Ip)(this._clients.map((t=>t.on(e,n))))))}openPorts(){return new Promise((e=>{const n=new Array(this._clientPromises.length);let t=n.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((i=>{i&&(n[r]=i.openPort()),0==--t&&e(n)}))}))}get test(){return{numClients:this._clients.length}}}},13056:(e,n,t)=>{t.d(n,{S:()=>s,s:()=>i});const r=new FinalizationRegistry((e=>{e.close()}));function i(e,n){r.register(e,n,n)}function s(e){r.unregister(e)}},35268:(e,n,t)=>{t.d(n,{eU:()=>W});var r=t(20744),i=t(9456),s=t(10860),a=t(46448),o=t(13056),c=t(38432),l=t(66360),u=t(70680),f=t(2600),d=t(28176);const h={async request(e,n){const t=e.options,r=t.responseType;t.signal=n?.signal,t.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,d.OO)(e.url)?.after?r:"array-buffer";const i=await(0,f.c)(e.url,t),s={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=(new TextEncoder).encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=(new TextEncoder).encode(s.data).buffer}return{result:s,transferList:[s.data]}}};var w=t(31056),m=t(24832),g=t(6220),p=(t(2016),t(47620));const y={};var v=t(52324);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((n=>{this[n]=(...t)=>e[n](...t)}))}}class I{constructor(){this._dispatcher=new b,this._workerPostMessage({type:w.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.o)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,n,t){this._dispatcher.addEventListener(e,n,t)}removeEventListener(e,n,t){this._dispatcher.removeEventListener(e,n,t)}_workerPostMessage(e){(0,v.o)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const n=(0,w.mO)(e);if(n&&n.type===w.MessageType.OPEN){const{modulePath:e,jobId:t}=n;let r=await c.default.loadWorker(e);r||(r=await import(e));const i=c.default.connect(r);this._workerPostMessage({type:w.MessageType.OPENED,jobId:t,data:i})}}}var P=t(89960),k=t(69880);const _=()=>l.c.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:A}=w.MessageType;let U,O;const N="Failed to create Worker. Fallback to execute module in main thread";async function E(e){return new Promise((n=>{function t(i){const s=(0,w.mO)(i);s&&s.type===A&&(e.removeEventListener("message",t),e.removeEventListener("error",r),n(e))}function r(n){n.preventDefault(),e.removeEventListener("message",t),e.removeEventListener("error",r),_().warn("Failed to create Worker. Fallback to execute module in main thread",n),(e=new I).addEventListener("message",t),e.addEventListener("error",r)}e.addEventListener("message",t),e.addEventListener("error",r)}))}let S=0;const{ABORT:R,INVOKE:H,OPEN:M,OPENED:x,RESPONSE:D}=w.MessageType;class F{static async create(e){const n=await async function(){if(!(0,i.c)("esri-workers"))return E(new I);if(!U&&!O)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=g.default.default){const n={...g.default};delete n.default,e=JSON.parse(JSON.stringify(n))}else e=JSON.parse(JSON.stringify(g.default));e.assetsPath=(0,d.WM)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.WM)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,P.a8)(),e.has={"esri-csp-restrictions":(0,i.c)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.c)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.c)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.c)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.c)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.c)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.c)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.c)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.c)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.c)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.c)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.c)("esri-atomics"),"esri-shared-array-buffer":(0,i.c)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.c)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.c)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.c)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.WM)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.WM)(e.workers.workerPath):e.workers.workerPath=(0,d.WM)((0,m.O)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const n=g.default.workers.loaderConfig,t=function(e){const n={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(n.async=!0),e.hasOwnProperty("isDebug")||(n.isDebug=!1),e.baseUrl||(n.baseUrl=y.baseUrl),n}({baseUrl:n?.baseUrl,locale:(0,P.a8)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...n?.has},map:{...n?.map},paths:{...n?.paths},packages:n?.packages||[]}),r={buildDate:k.W,fullVersion:p.c1,revision:k.m};return JSON.stringify({esriConfig:e,loaderConfig:t,kernelInfo:r})}()}'`);U=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){O=e||{}}let e;if(U)try{e=new Worker(U,{name:"esri-worker-"+S++})}catch(n){_().warn(N,O),e=new I}else _().warn(N,O),e=new I;return E(e)}();return new F(n,e)}constructor(e,n){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=n,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),l.c.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,n={}){const{signal:t}=n,r=(0,w.W4)();return new Promise(((n,i)=>{const a={resolve:n,reject:i,abortHandle:(0,s.Ij)(t,(()=>{this._outJobs.delete(r),this._post({type:R,jobId:r})}))};this._outJobs.set(r,a),this._post({type:M,jobId:r,modulePath:e})}))}_onMessage(e){const n=(0,w.mO)(e);if(n)switch(n.type){case x:this._onOpenedMessage(n);break;case D:this._onResponseMessage(n);break;case R:this._onAbortMessage(n);break;case H:this._onInvokeMessage(n)}}_onAbortMessage(e){const n=this._inJobs,t=e.jobId,r=n.get(t);r&&(r.controller&&r.controller.abort(),n.delete(t))}_onInvokeMessage(e){const{methodName:n,jobId:t,data:r,abortable:i}=e,a=i?new AbortController:null,o=this._inJobs,c=h[n];let l;try{if("function"!=typeof c)throw new TypeError(`${n} is not a function`);l=c.call(null,r,{signal:a?a.signal:null})}catch(e){return void this._post({type:D,jobId:t,error:(0,w.O)(e)})}(0,s.eW)(l)?(o.set(t,{controller:a,promise:l}),l.then((e=>{o.has(t)&&(o.delete(t),this._post({type:D,jobId:t},e))}),(e=>{o.has(t)&&(o.delete(t),e||(e={message:"Error encountered at method"+n}),(0,s.mA)(e)||this._post({type:D,jobId:t,error:(0,w.O)(e||{message:`Error encountered at method ${n}`})}))}))):this._post({type:D,jobId:t},l)}_onOpenedMessage(e){const{jobId:n,data:t}=e,r=this._outJobs.get(n);r&&(this._outJobs.delete(n),(0,u.oR)(r.abortHandle),r.resolve(t))}_onResponseMessage(e){const{jobId:n,error:t,data:i}=e,s=this._outJobs.get(n);s&&(this._outJobs.delete(n),(0,u.oR)(s.abortHandle),t?s.reject(r.c.fromJSON(JSON.parse(t))):s.resolve(i))}_post(e,n,t){return(0,w.E9)(this.worker,e,n,t)}}const K=(0,i.c)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.c)("workers-pool-size")):0;let j=(0,i.c)("esri-mobile")?Math.min(K,3):K;j||(j=(0,i.c)("safari")&&(0,i.c)("mac")?7:2);let C=0;const q=[];async function L(e,n){const t=new a.c,{registryTarget:r,...i}=n;return await t.open(e,i),r&&(0,o.s)(r,t),t}async function W(e,n={}){if("string"!=typeof e)throw new r.c("workers:undefined-module","modulePath is missing");let t=n.strategy||"distributed";if((0,i.c)("host-webworker")&&!(0,i.c)("esri-workers")&&(t="local"),"local"===t){let t=await c.default.loadWorker(e);t||(t=await import(e)),(0,s.wp)(n.signal);const r=n.client||t;return L([c.default.connect(t)],{...n,client:r})}if(await async function(){if(T)return T;J=new AbortController;const e=[];for(let n=0;n<j;n++){const t=F.create(n).then((e=>(q[n]=e,e)));e.push(t)}return T=Promise.all(e),T}(),(0,s.wp)(n.signal),"dedicated"===t){const t=C++%j;return L([await q[t].open(e,n)],n)}if(n.maxNumWorkers&&n.maxNumWorkers>0){const t=Math.min(n.maxNumWorkers,j);if(t<j){const r=new Array(t);for(let i=0;i<t;++i){const t=C++%j;r[i]=q[t].open(e,n)}return L(r,n)}}return L(q.map((t=>t.open(e,n))),n)}let J,T=null},99643:(e,n,t)=>{t.d(n,{CK:()=>K,Cu:()=>v,E3:()=>S,EZ:()=>F,K0:()=>p,KU:()=>M,O4:()=>L,O6:()=>b,OM:()=>_,SQ:()=>E,Y7:()=>h,_g:()=>y,c9:()=>D,cz:()=>R,d:()=>N,i2:()=>k,i6:()=>C,iS:()=>w,mk:()=>W,mq:()=>A,o1:()=>U,q8:()=>I,qY:()=>P,qy:()=>m,sH:()=>q,uR:()=>O,uk:()=>H,us:()=>d,wR:()=>f,wf:()=>x,wx:()=>j,yK:()=>g}),t(60708);var r=t(35268),i=t(67776),s=t(6704);function a(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function o(e){return e?Array.isArray(e)?e.map(o):e.toJSON?e.toJSON():e:e}function c(e){return Array.isArray(e)?e.map((e=>(0,s.h4)(e))):(0,s.h4)(e)}let l;async function u(e,n){return(await async function(){return l||(l=(0,r.eU)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:o(n)})}async function f(e,n){return c(await u("clip",[a(e),e,n]))}async function d(e,n){return c(await u("cut",[a(e),e,n]))}function h(e,n){return u("contains",[a(e),e,n])}function w(e,n){return u("crosses",[a(e),e,n])}function m(e,n,t){return u("distance",[a(e),e,n,t])}function g(e,n){return u("equals",[a(e),e,n])}function p(e,n){return u("intersects",[a(e),e,n])}function y(e,n){return u("touches",[a(e),e,n])}function v(e,n){return u("within",[a(e),e,n])}function b(e,n){return u("disjoint",[a(e),e,n])}function I(e,n){return u("overlaps",[a(e),e,n])}function P(e,n,t){return u("relate",[a(e),e,n,t])}function k(e){return u("isSimple",[a(e),e])}async function _(e){return c(await u("simplify",[a(e),e]))}async function A(e,n=!1){return c(await u("convexHull",[a(e),e,n]))}async function U(e,n){return c(await u("difference",[a(e),e,n]))}async function O(e,n){return c(await u("symmetricDifference",[a(e),e,n]))}async function N(e,n){return c(await u("intersect",[a(e),e,n]))}async function E(e,n=null){const t=function(e,n){let t;return Array.isArray(e)?t=e:(t=[],t.push(e),null!=n&&t.push(n)),t}(e,n);return c(await u("union",[a(t),t]))}async function S(e,n,t,r,i,s){return c(await u("offset",[a(e),e,n,t,r,i,s]))}async function R(e,n,t,r=!1){const i=[a(e),e,n,t,r];return c(await u("buffer",i))}async function H(e,n,t,r,i,s){const o=[a(e),e,n,t,r,i,s];return c(await u("geodesicBuffer",o))}async function M(e,n,t=!0){const r=await u("nearestCoordinate",[a(e),e,n,t]);return{...r,coordinate:i.c.fromJSON(r.coordinate)}}async function x(e,n){const t=await u("nearestVertex",[a(e),e,n]);return{...t,coordinate:i.c.fromJSON(t.coordinate)}}async function D(e,n,t){if(null==e)throw new J;const r=e.spatialReference;if(null==(t=t??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new J;const i=e.constructor.fromJSON(await u("rotate",[r,e,n,t]));return i.spatialReference=r,i}async function F(e,n,t,r){return c(await u("generalize",[a(e),e,n,t,r]))}async function K(e,n,t){return c(await u("densify",[a(e),e,n,t]))}async function j(e,n,t,r=0){return c(await u("geodesicDensify",[a(e),e,n,t,r]))}function C(e,n){return u("planarArea",[a(e),e,n])}function q(e,n){return u("planarLength",[a(e),e,n])}function L(e,n,t){return u("geodesicArea",[a(e),e,n,t])}function W(e,n,t){return u("geodesicLength",[a(e),e,n,t])}class J extends Error{constructor(){super("Illegal Argument Exception")}}}}]);