@arcgis/core 4.28.4 → 4.28.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{80d9bb9f247ecdfa266f.js → 0695fcdc01f195c5ae8d.js} +1 -1
- package/assets/esri/core/workers/chunks/07cb7d142205f2eccc83.js +1 -0
- package/assets/esri/core/workers/chunks/0f6b766f08c648fd7b99.js +1 -0
- package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +1 -0
- package/assets/esri/core/workers/chunks/28c4a21cdddf2602ab97.js +1 -0
- package/assets/esri/core/workers/chunks/2cf2340ad817f3c27802.js +1 -0
- package/assets/esri/core/workers/chunks/319c222ce72254934060.js +1 -0
- package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +1 -0
- package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +1 -0
- package/assets/esri/core/workers/chunks/{7f3bc7a2de59e485f22f.js → 4f0412b52844aa9c7bd4.js} +1 -1
- package/assets/esri/core/workers/chunks/54867a094fb740a6f4d9.js +1 -0
- package/assets/esri/core/workers/chunks/5b17de91091fc17d9821.js +1 -0
- package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +1 -0
- package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +1 -0
- package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +1 -0
- package/assets/esri/core/workers/chunks/{9f0e8dd5c9bacfc0f03c.js → 908a5326b61843d6d2b3.js} +1 -1
- package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +1 -0
- package/assets/esri/core/workers/chunks/9ef3746c545296565ef6.js +1 -0
- package/assets/esri/core/workers/chunks/{77f557359a5033d7e429.js → a0a86383e69932a25e50.js} +1 -1
- package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +1 -0
- package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +1 -0
- package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +1 -0
- package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +1 -0
- package/assets/esri/core/workers/chunks/ca43955065012d4b22e9.js +1 -0
- package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +1 -0
- package/assets/esri/core/workers/chunks/{e3950975030412ff6e20.js → f343db8dad71f3840610.js} +1 -1
- package/assets/esri/core/workers/chunks/{46ddc52fe9cdd573a614.js → fa5c69a0cdd78aa34ad7.js} +1 -1
- package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +1 -0
- package/core/sql/WhereClause.js +1 -1
- package/kernel.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/32fbd4355a4a649623a7.js +0 -1
- package/assets/esri/core/workers/chunks/41306b698f78001dda55.js +0 -1
- package/assets/esri/core/workers/chunks/4747741429e8ff7112bb.js +0 -1
- package/assets/esri/core/workers/chunks/49faa024bab1ba6e2bf0.js +0 -1
- package/assets/esri/core/workers/chunks/534726130ef1698ec89e.js +0 -1
- package/assets/esri/core/workers/chunks/846e5e51dc278bc3f80f.js +0 -1
- package/assets/esri/core/workers/chunks/8b541cbf82a5ba0317ee.js +0 -1
- package/assets/esri/core/workers/chunks/8e91be2e38010391e351.js +0 -1
- package/assets/esri/core/workers/chunks/90f96a2ddfb25d851d4d.js +0 -1
- package/assets/esri/core/workers/chunks/91a3181071874525ed44.js +0 -1
- package/assets/esri/core/workers/chunks/9d97a20f69047d0c47cc.js +0 -1
- package/assets/esri/core/workers/chunks/ac4636e82a103e2c27ca.js +0 -1
- package/assets/esri/core/workers/chunks/ae7ba94af6d4fd97dd8b.js +0 -1
- package/assets/esri/core/workers/chunks/b0653f63745e756f55fe.js +0 -1
- package/assets/esri/core/workers/chunks/bab0aa000c65d5c256b7.js +0 -1
- package/assets/esri/core/workers/chunks/c2199fb8f7a54a0ef18a.js +0 -1
- package/assets/esri/core/workers/chunks/c3f462d11ed570482e7a.js +0 -1
- package/assets/esri/core/workers/chunks/c8cb5fe1d23145c4842b.js +0 -1
- package/assets/esri/core/workers/chunks/ce409944221a784ddb61.js +0 -1
- package/assets/esri/core/workers/chunks/e8b7d1c586aff229484c.js +0 -1
- package/assets/esri/core/workers/chunks/eb5213ffb83d83a4dd05.js +0 -1
- package/assets/esri/core/workers/chunks/f520f093aa81d8ee1790.js +0 -1
- package/assets/esri/core/workers/chunks/fab4ee57b7c5376c9ccd.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5129,5935],{64830:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(58971),i=r(10661);class o{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.s,this._items=new Set}get length(){return(0,n.it)(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,n.it)(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,n.it)(this._observable),yield*this._items}}},22862:(e,t,r)=>{r.d(t,{Hg:()=>y,V7:()=>h,uD:()=>c});var n=r(92036),i=r(46791),o=r(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.Z}function l(e){return e instanceof i.Z?Object.keys(e.items):a(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!n.includes(e))),c=n.filter((e=>!i.includes(e))),h=n.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(o,c).sort(),y=d(e);if(y&&s.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const n of h){const i=u(e,n),o=u(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&d(i)===d(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=f?f.diff[n]=s:f={type:"partial",diff:{[n]:s}})}}return f}function c(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}function h(e,t){for(const r of t)if(c(e,r))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},82960:(e,t,r)=>{r.d(t,{C:()=>n});const n=["operational-layers","basemap","ground"]},24133:(e,t,r)=>{r.d(t,{Q:()=>s});var n=r(67676),i=r(44553),o=r(88764);class s{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),_.prune(),v.prune(),x.prune()}all(e){this._all(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(g(e,r))for(b.clear();r;){for(let i=0,o=r.children.length;i<o;i++){const o=r.children[i],s=r.leaf?n(o):o;g(e,s)&&(r.leaf?t(o):m(e,s)?this._all(o,t):b.push(o))}r=b.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!g(e,t))return!1;for(b.clear();t;){for(let n=0,i=t.children.length;n<i;n++){const i=t.children[n],o=t.leaf?r(i):i;if(g(e,o)){if(t.leaf||m(e,o))return!0;b.push(i)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,r=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(v.clear(),x.clear();r||v.length>0;){if(r||(r=v.pop(),i=v.data[v.length-1],o=x.pop()??0,s=!0),r.leaf&&(t=(0,n.cq)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),v.push(r),this._condense(v),this;s||r.leaf||!m(r,a)?i?(o++,r=i.children[o],s=!1):r=null:(v.push(r),x.push(o),o=0,i=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let r=e;for(_.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else _.pushArray(r.children);r=_.pop()??null}}_build(e,t,r,n){const i=r-t+1;let o=this._maxEntries;if(i<=o){const n=new I(e.slice(t,r+1));return a(n,this._toBBox),n}n||(n=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(n-1)));const s=new T([]);s.height=n;const l=Math.ceil(i/o),u=l*Math.ceil(Math.sqrt(o));w(e,t,r,u,this._compareMinX);for(let i=t;i<=r;i+=u){const t=Math.min(i+u-1,r);w(e,i,t,l,this._compareMinY);for(let r=i;r<=t;r+=l){const i=Math.min(r+l-1,t);s.children.push(this._build(e,r,i,n-1))}}return a(s,this._toBBox),s}_chooseSubtree(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=c(s),l=y(e,s)-a;l<i?(i=l,n=a<n?a:n,r=s):l===i&&a<n&&(n=a,r=s)}t=r||t.children[0]}return t}_insert(e,t,r){const n=this._toBBox,i=r?e:n(e);v.clear();const o=this._chooseSubtree(i,this._data,t,v);for(o.children.push(e),u(o,i);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;this._adjustParentBBoxes(i,v,t)}_split(e,t){const r=e.data[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const o=this._chooseSplitIndex(r,i,n);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=r.children.splice(o,r.children.length-o),l=r.leaf?new I(s):new T(s);l.height=r.height,a(r,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(r,l)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,i,o;n=i=1/0;for(let s=t;s<=r-t;s++){const t=l(e,0,s,this._toBBox),a=l(e,s,r,this._toBBox),u=f(t,a),d=c(t)+c(a);u<n?(n=u,o=s,i=d<i?d:i):u===n&&d<i&&(i=d,o=s)}return o}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:d,i=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this._toBBox,o=l(e,0,t,i),s=l(e,r-t,r,i);let a=h(o)+h(s);for(let n=t;n<r-t;n++){const t=e.children[n];u(o,e.leaf?i(t):t),a+=h(o)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];u(s,e.leaf?i(t):t),a+=h(s)}return a}_adjustParentBBoxes(e,t,r){for(let n=r;n>=0;n--)u(t.data[n],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,n.cq)(o,r,o.length,i.indexHint),1)}else this.clear();else a(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,r,n,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<r;s++)o=e.children[s],u(i,e.leaf?n(o):o);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,r,n,i){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=n)continue;const a=r+Math.ceil((t-r)/n/2)*n;(0,o.q)(e,a,r,t,i),s.push(r,a,a,t)}}const b=new i.Z,_=new i.Z,v=new i.Z,x=new i.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new n.SO}}class I extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},42033:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await Promise.all([r.e(8968),r.e(8592)]).then(r.bind(r,8968));return n.create(e,t)}function i(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}r.d(t,{E:()=>n,_:()=>i})},80903:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(50758),i=r(92604),o=r(95330),s=r(64830),a=r(18948),l=r(728);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new s.Z}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,n)=>{let i=!0;const s=e=>{(0,o.k_)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,o.y8)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),s(r),this._clients[i])),(()=>(s(n),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),s(r))}}))}broadcast(e,t,r){const n=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const o=this._clientPromises[i];n[i]=o.then((n=>n?.invoke(e,t,r)))}return n}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,o.zE)(`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.E)(this)}invoke(e,t,r){let n;Array.isArray(r)?(i.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),n={transferList:r}):n=r;const s=(0,o.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,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}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,n.AL)(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 n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then((i=>{i&&(t[n]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},18948:(e,t,r)=>{r.d(t,{E:()=>o,z:()=>i});const n=new FinalizationRegistry((e=>{e.close()}));function i(e,t){n.register(e,t,t)}function o(e){n.unregister(e)}},56569:(e,t,r)=>{r.d(t,{bA:()=>q});var n=r(20102),i=r(80442),o=r(95330),s=r(80903),a=r(18948),l=r(728),u=r(92604),d=r(70586),p=r(3172),c=r(17452);const h={async request(e,t){const r=e.options,n=r.responseType;r.signal=t?.signal,r.responseType="native"===n||"native-request-init"===n?"native-request-init":n&&["blob","json","text"].includes(n)&&(0,c.oh)(e.url)?.after?n:"array-buffer";const i=await(0,p.Z)(e.url,r),o={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete o.data.signal,o;case"blob":o.data=await o.data.arrayBuffer();break;case"json":o.data=(new TextEncoder).encode(JSON.stringify(o.data)).buffer;break;case"text":o.data=(new TextEncoder).encode(o.data).buffer}return{result:o,transferList:[o.data]}}};var y=r(94362),f=r(99880),m=r(68773),g=(r(2587),r(40330));const w={};var b=r(41213);class _{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class v{constructor(){this._dispatcher=new _,this._workerPostMessage({type:y.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,b.Y)((()=>{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,b.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.QM)(e);if(t&&t.type===y.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let n=await l.default.loadWorker(e);n||(n=await import(e));const i=l.default.connect(n);this._workerPostMessage({type:y.MessageType.OPENED,jobId:r,data:i})}}}var x=r(70171),C=r(17202);const E=u.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:I}=y.MessageType;let T,M;const S="Failed to create Worker. Fallback to execute module in main thread";async function k(e){return new Promise((t=>{function r(i){const o=(0,y.QM)(i);o&&o.type===I&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),E.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let L=0;const{ABORT:N,INVOKE:j,OPEN:R,OPENED:P,RESPONSE:D}=y.MessageType;class O{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers"))return k(new v);if(!T&&!M)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!=m.default.default){const t={...m.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(m.default));e.assetsPath=(0,c.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,x.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.hF)(e.workers.workerPath):e.workers.workerPath=(0,c.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=m.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,x.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),n={buildDate:C.r,fullVersion:g.bR,revision:C.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}()}'`);T=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){M=e||{}}let e;if(T)try{e=new Worker(T,{name:"esri-worker-"+L++})}catch(t){E.warn(S,M),e=new v}else E.warn(S,M),e=new v;return k(e)}();return new O(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.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,y.jt)();return new Promise(((t,i)=>{const s={resolve:t,reject:i,abortHandle:(0,o.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:N,jobId:n})}))};this._outJobs.set(n,s),this._post({type:R,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,y.QM)(e);if(t)switch(t.type){case P:this._onOpenedMessage(t);break;case D:this._onResponseMessage(t);break;case N:this._onAbortMessage(t);break;case j:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:i}=e,s=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,n,{signal:s?s.signal:null})}catch(e){return void this._post({type:D,jobId:r,error:(0,y.AB)(e)})}(0,o.y8)(u)?(a.set(r,{controller:s,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:D,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,o.D_)(e)||this._post({type:D,jobId:r,error:(0,y.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:D,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),n.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,o=this._outJobs.get(t);o&&(this._outJobs.delete(t),(0,d.hw)(o.abortHandle),r?o.reject(n.Z.fromJSON(JSON.parse(r))):o.resolve(i))}_post(e,t,r){return(0,y.oi)(this.worker,e,t,r)}}const F=(0,i.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size")):0;let Z=(0,i.Z)("esri-mobile")?Math.min(F,3):F;Z||(Z=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let G=0;const A=[];async function B(e,t){const r=new s.Z,{registryTarget:n,...i}=t;return await r.open(e,i),n&&(0,a.z)(n,r),r}async function q(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,o.k_)(t.signal);const n=t.client||r;return B([l.default.connect(r)],{...t,client:n})}if(await async function(){if(U)return U;z=new AbortController;const e=[];for(let t=0;t<Z;t++){const r=O.create(t).then((e=>(A[t]=e,e)));e.push(r)}return U=Promise.all(e),U}(),(0,o.k_)(t.signal),"dedicated"===r){const r=G++%Z;return B([await A[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,Z);if(r<Z){const n=new Array(r);for(let i=0;i<r;++i){const r=G++%Z;n[i]=A[r].open(e,t)}return B(n,t)}}return B(A.map((r=>r.open(e,t))),t)}let z,U=null},84864:(e,t,r)=>{r.d(t,{bU:()=>d,fC:()=>h,tp:()=>c,v7:()=>p});const n=new Float64Array(2),i=new Float64Array(2),o="0123456789bcdefghjkmnpqrstuvwxyz";function s(e){return o[e]}function a(e){return(e[0]+e[1])/2}function l(e,t,r){return e[0]=t,e[1]=r,e}function u(e,t){const r=t>a(e);return function(e,t){const r=a(e),n=t,i=!t;e[0]=i*e[0]+n*r,e[1]=i*r+n*e[1]}(e,r),r}function d(e,t){let r=-90,n=90,i=-180,o=180;for(let s=0;s<t;s++){const t=Math.ceil((s+1)/2),a=Math.floor((s+1)/2),l=1-s%2,u=30-(3*t+2*a),d=30-(2*t+3*a),p=3*l+2*(1-l),c=2*l+3*(1-l),h=3*l+7*(1-l)<<d,y=(7*l+3*(1-l)<<u&e.geohashX)>>u,f=(h&e.geohashY)>>d;for(let e=p-1;e>=0;e--){const t=(i+o)/2,r=y&1<<e?1:0;i=(1-r)*i+r*t,o=(1-r)*t+r*o}for(let e=c-1;e>=0;e--){const t=(r+n)/2,i=f&1<<e?1:0;r=(1-i)*r+i*t,n=(1-i)*t+i*n}}return[i,r,o,n]}function p(e,t,r,n){n%2&&(n+=1);let i=0,o=0,s=-90,a=90,l=-180,u=180;for(let e=0;e<n/2;e++){for(let t=0;t<5;t++){const n=(l+u)/2,o=r>n?1:0;i|=o<<29-(t+5*e),l=(1-o)*l+o*n,u=(1-o)*n+o*u}for(let r=0;r<5;r++){const n=(s+a)/2,i=t>n?1:0;o|=i<<29-(r+5*e),s=(1-i)*s+i*n,a=(1-i)*n+i*a}}e.geohashX=i,e.geohashY=o}function c(e,t,r,n,i){i%2&&(i+=1);let o=0,s=0,a=-90,l=90,u=-180,d=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const r=(u+d)/2,i=n>r?1:0;o|=i<<29-(t+5*e),u=(1-i)*u+i*r,d=(1-i)*r+i*d}for(let t=0;t<5;t++){const n=(a+l)/2,i=r>n?1:0;s|=i<<29-(t+5*e),a=(1-i)*a+i*n,l=(1-i)*n+i*l}}e[2*t]=o,e[2*t+1]=s}function h(e,t,r){let o="";const a=l(n,-90,90),d=l(i,-180,180);for(let n=0;n<r;n++){let r=0;n%2?(r|=u(a,e)<<4,r|=u(d,t)<<3,r|=u(a,e)<<2,r|=u(d,t)<<1,r|=u(a,e)<<0):(r|=u(d,t)<<4,r|=u(a,e)<<3,r|=u(d,t)<<2,r|=u(a,e)<<1,r|=u(d,t)<<0),o+=s(r)}return o}},16306:(e,t,r)=>{r.d(t,{aX:()=>x});var n=r(68773),i=r(20102),o=r(92604),s=r(38913),a=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),h=r(11282),y=r(17452);async function f(e,t,r){const n="string"==typeof e?(0,y.mN)(e):e,i=t[0].spatialReference,o=(0,c.Ji)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,u.B9)(i),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,p.Z)(n.path+"/simplify",s);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(a.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const i=e[n][0],o=e[n][1],s=e[n+1][0],a=e[n+1][1],l=Math.sqrt((s-i)*(s-i)+(a-o)*(a-o)),u=(a-o)/l,d=(s-i)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,s=d*n+i,a=u*n+o;r.push([s,a])}const e=(l+Math.floor(p-1)*t)/2,n=d*e+i,s=u*e+o;r.push([n,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.Z({rings:n,spatialReference:e.spatialReference}):new a.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function _(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function v(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const i=t.cutIndexes[n],o=t.geometries[n],s=(0,l.x3)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(i===r){if(g(e))for(const t of(0,l.x3)(o))e[i]=e[i].addRing(t);else if(w(e))for(const t of(0,l.x3)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function x(e,t,r){if(!Array.isArray(e))return x([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let o,y,g,w,C,E,I,T,M=0;const S=[],k=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,y=(0,u.C5)(o),g=o.isWebMercator,E=g?102100:4326,w=l.UZ[E].maxX,C=l.UZ[E].minX,I=l.UZ[E].plus180Line,T=l.UZ[E].minus180Line),y)if("mesh"===t.type)k.push(t);else if("point"===t.type)k.push(_(t.clone(),w,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,w,C))),k.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);k.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,C)*(2*w);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==w?(M=e.xmax>M?e.xmax:M,n=b(n,g),S.push(n),k.push("cut")):e.intersects(T)&&e.xmin!==C?(M=e.xmax*(2*w)>M?e.xmax*(2*w):M,n=b(n,g,360),S.push(n),k.push("cut")):k.push(n)}else k.push(t.clone());else k.push(t);else k.push(t);let L=(0,l.XZ)(M,w),N=-90;const j=L,R=new a.Z;for(;L>0;){const e=360*L-180;R.addPath([[e,N],[e,-1*N]]),N*=-1,L--}if(S.length>0&&j>0){const t=v(S,await async function(e,t,r,n){const i=(0,h.en)(e),o=t[0].spatialReference,s={...n,responseType:"json",query:{...i.query,f:"json",sr:(0,u.B9)(o),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,p.Z)(i.path+"/cut",s),{cutIndexes:l,geometries:d=[]}=a.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=o,t}))}}(i,S,R,r)),n=[],o=[];for(let r=0;r<k.length;r++){const i=k[r];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(n.push(i),o.push("simplify")):o.push(g?(0,d.$)(i):i)}}if(!n.length)return o;const s=await f(i,n,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,d.$)(s.shift()):s.shift())}return a}const P=[];for(let e=0;e<k.length;e++){const t=k[e];if("cut"!==t)P.push(t);else{const e=S.shift();P.push(!0===g?(0,d.$)(e):e)}}return P}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>u});var n=r(58901),i=r(82971),o=r(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.oU)(e)?e.rings:e.paths}},19087:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ir});var n=r(43697),i=(r(66577),r(46791)),o=r(20102),s=r(92604),a=r(95330),l=r(5600),u=(r(75215),r(67676),r(80442)),d=r(52011),p=r(84864),c=r(87085),h=r(98732),y=r(5428),f=r(92036),m=r(30175),g=r(42033),w=r(38913),b=r(73615),_=r(8744),v=r(70272),x=r(33955);class C{constructor(){this._featureLookup=new Map}static getInstance(){return C.instance||(C.instance=new C),C.instance}static resetInstance(){C.instance&&(C.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const n=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let i,o=null;if(r&&e.properties[r]&&(o=(0,h.GH)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const n=this._featureLookup.get(e.id),s=JSON.parse(JSON.stringify(Object.assign(n.attributes,e.properties)));r&&e.properties[r]&&(s[r]=(0,x.im)(e.properties[r])),i=new v.u_(o?JSON.parse(JSON.stringify(o)):n?.geometry?JSON.parse(JSON.stringify(n.geometry)):null,s,null,e.properties[t])}else i=new v.u_(o?JSON.parse(JSON.stringify(o)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,i),n.push(i)})),n}}var E=r(40330),I=r(3172);let T=class extends f.Z{constructor(e){super(e),this.resultRows=[]}};(0,n._)([(0,l.Cb)()],T.prototype,"resultRows",void 0),T=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],T);const M=T;let S=class extends f.Z{constructor(e){super(e),this.resultRowsStream=new ReadableStream}};(0,n._)([(0,l.Cb)()],S.prototype,"resultRowsStream",void 0),S=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],S);const k=S;var L=r(96674),N=r(82971);let j=class extends L.wq{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"unique",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"ascending",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"description",void 0),(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],j.prototype,"fieldNames",void 0),j=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.FieldIndex")],j);const R=j;let P=class extends L.wq{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"fieldType",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"geometryType",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"hasM",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"hasZ",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"nullable",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"editable",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"required",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"defaultVisibility",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"systemMaintained",void 0),(0,n._)([(0,l.Cb)()],P.prototype,"role",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{type:String,write:{writer:(e,t)=>{t.defaultValue=null!=e?e.toString():null}}}})],P.prototype,"defaultValue",void 0),P=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphProperty")],P);const D=P;let O=class extends L.wq{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],O.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],O.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],O.prototype,"role",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],O.prototype,"strict",void 0),(0,n._)([(0,l.Cb)({type:[D],json:{write:!0}})],O.prototype,"properties",void 0),(0,n._)([(0,l.Cb)({type:[R],json:{write:!0}})],O.prototype,"fieldIndexes",void 0),O=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObjectType")],O);const F=O;let Z=class extends F{constructor(e){super(e)}};Z=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.EntityType")],Z);const G=Z;let A=class extends F{constructor(e){super(e),this.endPoints=[]}};(0,n._)([(0,l.Cb)()],A.prototype,"endPoints",void 0),A=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.RelationshipType")],A);const B=A;let q=class extends L.wq{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null}};(0,n._)([(0,l.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],q.prototype,"timestamp",void 0),(0,n._)([(0,l.Cb)({type:N.Z,json:{write:!0}})],q.prototype,"spatialReference",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"strict",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"objectIdField",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"globalIdField",void 0),(0,n._)([(0,l.Cb)()],q.prototype,"arcgisManaged",void 0),(0,n._)([(0,l.Cb)()],q.prototype,"identifierInfo",void 0),(0,n._)([(0,l.Cb)()],q.prototype,"searchIndexes",void 0),(0,n._)([(0,l.Cb)({type:[G],json:{write:!0}})],q.prototype,"entityTypes",void 0),(0,n._)([(0,l.Cb)({type:[B],json:{write:!0}})],q.prototype,"relationshipTypes",void 0),q=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.DataModel")],q);const z=q;let U=class extends L.wq{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1}};(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],U.prototype,"capabilities",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"supportsSearch",void 0),(0,n._)([(0,l.Cb)({type:[String],json:{write:!0}})],U.prototype,"supportedQueryFormats",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"allowGeometryUpdates",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],U.prototype,"searchMaxRecordCount",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],U.prototype,"serviceCapabilities",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],U.prototype,"maxRecordCount",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"description",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"copyrightText",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"units",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],U.prototype,"spatialReference",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],U.prototype,"currentVersion",void 0),(0,n._)([(0,l.Cb)({type:Object,json:{write:!0}})],U.prototype,"dateFieldsTimeReference",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"serviceItemId",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"supportsDocuments",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"dataEditingNotSupported",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],U.prototype,"schemaEditingNotSupported",void 0),U=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.ServiceDefinition")],U);const Y=U;let J=class extends L.wq{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],J.prototype,"url",void 0),(0,n._)([(0,l.Cb)({type:z,json:{write:!0}})],J.prototype,"dataModel",void 0),(0,n._)([(0,l.Cb)({type:Y,json:{write:!0}})],J.prototype,"serviceDefinition",void 0),J=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.KnowledgeGraph")],J);const V=J;var Q=r(99880);const H="esri/rest/knowledgeGraph/wasmInterface/";let $,X=null;async function W(){const e=X??$;if(e)return e;const t=(0,u.Z)("wasm-simd");return $=async function(e){if(e){const{default:e}=await r.e(5389).then(r.bind(r,35389)).then((e=>e.a));return e({locateFile:e=>(0,Q.V)(H+e)})}const{default:t}=await r.e(9931).then(r.bind(r,39931)).then((e=>e.a));return t({locateFile:e=>(0,Q.V)(H+e)})}(t),$}var K=r(65091),ee=r(94139),te=r(58901),re=r(9361);function ne(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(se(e,t))})),r}function ie(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,i]of Object.entries(e))r.set_key_value(n,se(i,t));return r}function oe(e,t){if(e instanceof K.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{n[o]=e,o++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof ee.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=1,n[0]=e.x,n[1]=e.y;let o=2;return e.hasZ&&(n[o]=e.z,o++),e.hasM&&(n[o]=e.m,o++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof te.Z||e instanceof w.Z)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];let o=[];e instanceof te.Z?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof w.Z&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[a]=e,a++}))})),i[s]=t,s++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);throw new o.Z("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function se(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof re.Z)return oe(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(se(e,t))})),r}return ie(e,t)}let ae=class extends L.wq{constructor(e){super(e),this.properties=null}};(0,n._)([(0,l.Cb)({json:{write:!0}})],ae.prototype,"properties",void 0),ae=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObject")],ae);const le=ae;let ue=class extends le{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],ue.prototype,"typeName",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],ue.prototype,"id",void 0),ue=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphNamedObject")],ue);const de=ue;let pe=class extends de{constructor(e){super(e),this.layoutGeometry=null}};(0,n._)([(0,l.Cb)({type:ee.Z,json:{write:!0}})],pe.prototype,"layoutGeometry",void 0),pe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.Entity")],pe);const ce=pe;let he=class extends de{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"originId",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"destinationId",void 0),(0,n._)([(0,l.Cb)({type:te.Z,json:{write:!0}})],he.prototype,"layoutGeometry",void 0),he=(0,n._)([(0,d.j)("esri.rest.Relationship.Relationship")],he);const ye=he;function fe(e,t){if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof ce){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,me(i,t));return e.id&&r.set_id(e.id),r}if(e instanceof ye){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,me(i,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new o.Z("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function me(e,t){return null==e?"":"object"!=typeof e||e instanceof Date?e:e instanceof re.Z?oe(e,t):""}let ge=class extends f.Z{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,n._)([(0,l.Cb)()],ge.prototype,"name",void 0),(0,n._)([(0,l.Cb)()],ge.prototype,"supportedCategory",void 0),(0,n._)([(0,l.Cb)()],ge.prototype,"analyzers",void 0),(0,n._)([(0,l.Cb)()],ge.prototype,"searchProperties",void 0),ge=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.SearchIndex")],ge);const we=ge;var be,_e,ve,xe,Ce,Ee,Ie;function Te(e){return e.deleteLater(),new G(Se(e))}function Me(e){return e.deleteLater(),new R({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:je(e.fields)})}function Se(e){return{name:e.name,alias:e.alias,role:be[e.role.value]?be[e.role.value]:null,strict:e.strict,properties:Re(e.properties),fieldIndexes:Pe(e.field_indexes)}}function ke(e){return e.deleteLater(),new D({alias:e.alias,name:e.name,fieldType:_e[e.field_type.value]?_e[e.field_type.value]:null,geometryType:ve[e.geometry_type.value]?ve[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ee[e.role.value],defaultValue:e.default_value})}function Le(e){e.deleteLater();const t=Se(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return new B(Object.assign({endPoints:r},t))}function Ne(e){const t=[];for(let r=0;r<e.size();r++)t.push(Te(e.get(r)));return t}function je(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return t}function Re(e){const t=[];for(let r=0;r<e.size();r++)t.push(ke(e.get(r)));return t}function Pe(e){const t=[];for(let r=0;r<e.size();r++)t.push(Me(e.get(r)));return t}function De(e){const t=[];for(let r=0;r<e.size();r++)t.push(Le(e.get(r)));return t}function Oe(e){const t=[];for(let r=0;r<e.size();r++){const r=new we,n=e.get(0);r.name=n.name,r.supportedCategory=Ce[n.supported_category.value];const i=n.analyzers.size();for(let e=0;e<i;e++)r.analyzers.push({name:n.analyzers.get(e).name});for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),i=n.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return t}!function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(be||(be={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(_e||(_e={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(ve||(ve={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(xe||(xe={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(Ce||(Ce={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(Ee||(Ee={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(Ie||(Ie={}));let Fe=class extends le{constructor(e){super(e)}};Fe=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.ObjectValue")],Fe);const Ze=Fe;let Ge=class extends L.wq{constructor(e){super(e),this.path=null}};(0,n._)([(0,l.Cb)({type:[le],json:{write:!0}})],Ge.prototype,"path",void 0),Ge=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.Path")],Ge);const Ae=Ge;var Be,qe,ze;function Ue(e){const t={},r=Ye(e,t),n=e.lengths,i=e.coords;let s="";if(e.geometry_type.value===Be.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==Be.ESRI_GEOMETRY_POLYLINE)throw new o.Z("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}t[s]=[];let a=0;return n.forEach((e=>{const n=[];for(let t=0;t<e;t++){const e=[];for(let t=0;t<r;t++)e[t]=i[a],a++;n.push(e)}t[s].push(n)})),t}function Ye(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Be||(Be={})),function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(qe||(qe={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(ze||(ze={}));const Je=s.Z.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),Ve={decodedWasmObjToQueryResponseObj:(e,t)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Be.ESRI_GEOMETRY_POINT:return function(e){const t={};let r=2;Ye(e,t);const n=e.coords;return t.x=n[0],t.y=n[1],e.has_z&&(t.z=n[r],r++),e.has_m&&(t.m=n[r]),new ee.Z(t)}(e);case Be.ESRI_GEOMETRY_MULTIPOINT:return function(e){const t={},r=Ye(e,t),n=e.lengths,i=e.coords,o=n[0];t.points=[];let s=0;for(let e=0;e<o;e++){const e=[];for(let t=0;t<r;t++)e[t]=i[s],s++;t.points.push(e)}return new K.Z(t)}(e);case Be.ESRI_GEOMETRY_POLYLINE:return r=e,new te.Z(Ue(r));case Be.ESRI_GEOMETRY_POLYGON:return function(e){return new w.Z(Ue(e))}(e);case Be.ESRI_GEOMETRY_ENVELOPE:case Be.ESRI_GEOMETRY_MULTI_PATCH:return Je.warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Be.ESRI_GEOMETRY_NULL:case Be.ESRI_GEOMETRY_ANY:default:return Je.warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Je.warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case qe.OBJECT:return function(e,t){return new Ze($e(e,t))}(e,t);case qe.ENTITY:return He(e,t);case qe.RELATIONSHIP:return Xe(e,t);case qe.PATH:return function(e,t){const r=e.entity_count(),n=e.relationship_count(),i=[];for(let o=0;o<r;o++)i.push(He(e.get_entity_at(o),t)),o<n&&i.push(Xe(e.get_relationship_at(o),t));return new Ae({path:i})}(e,t);case qe.ARRAY:return function(e,t){const r=[],n=e.count();for(let i=0;i<n;i++){const n=e.get_value_at(i);r.push(Qe(n,t))}return r}(e,t);default:return Je.warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}var r}};function Qe(e,t){return Ve.decodedWasmObjToQueryResponseObj(e,t)}function He(e,t){const r=e.type_name,n=$e(e,t),i=e.get_id();return new ce(Object.assign({typeName:r,id:i},n))}function $e(e,t){const r={},n=e.key_count();for(let i=0;i<n;i++)r[e.get_key_at(i)]=Qe(e.get_value_at(i),t);return{properties:r}}function Xe(e,t){const r=e.type_name,n=$e(e,t);return new ye(Object.assign({typeName:r,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}let We=class extends f.Z{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,n._)([(0,l.Cb)()],We.prototype,"hasError",void 0),(0,n._)([(0,l.Cb)()],We.prototype,"error",void 0),(0,n._)([(0,l.Cb)()],We.prototype,"editResults",void 0),We=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphApplyEdits")],We);const Ke=We,et={fetchKnowledgeGraph:async e=>{const t=new V({url:e}),r=[];return r.push(rt(t)),r.push(async function(e){return et.refreshServiceDefinition(e)}(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await dt(e)},refreshServiceDefinition:async e=>{const t=(await(0,I.Z)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new Y(t),e.serviceDefinition},executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await it(e);const i=await at(n,r);i.data.body=await async function(e,t){const r=await W(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))st(t,i,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await rt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.Z("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r);try{n.encode()}catch(e){throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=n.get_encoding_result();if(0!==i.error.error_code)throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return i.get_byte_buffer()}(t,e);const s=await nt(i.data.url,i.data);if(e.dataModel)return new k({resultRowsStream:await ut(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new o.Z("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await it(e);const i=await at(n,r);return i.data.body=await async function(e,t){if(t.dataModel||await rt(t),!t.dataModel)throw new o.Z("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await W(),n=!!e.options?.cascadeDelete,i=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(fe(e,r)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new o.Z("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(fe(e,r)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(fe(e,r)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(fe(e,r)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new o.Z("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=i.get_encoding_result();return ot(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),s.get_byte_buffer()}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await W()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=new Ke;t.hasError=e.has_error(),t.hasError&&(t.error={errorCode:e.error.error_code,errorMessage:e.error.error_message});const r=e.get_edit_results_count();for(let n=0;n<r;n++){const r=e.get_edit_results_at(n),i=e.get_edit_results_type_name_at(n),o=[],s=[],a=[],l=r.get_add_results_count(),u=r.get_update_results_count(),d=r.get_delete_results_count();for(let e=0;e<l;e++){const t=r.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<u;e++){const t=r.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=r.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}t.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return t}(r)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await nt(i.data.url,i.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,i=await(0,I.Z)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=i.getHeader?.("content-type"),a=i.data;if(s?.includes("application/x-protobuf")){const t=new((await W()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new M({resultRows:lt(t,a,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:i.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,i=`${e.url}/graph/search`,s=await(0,I.Z)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=s.getHeader?.("content-type"),l=s.data;if(a?.includes("application/x-protobuf")){const t=new((await W()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new M({resultRows:lt(t,l,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await it(e);const i=await at(n,r);i.data.body=await async function(e){const t=await W(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ne(e.idsFilter,t))}catch(e){throw new o.Z("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return n.get_byte_buffer()}(t);const s=await nt(i.data.url,i.data);if(e.dataModel)return new k({resultRowsStream:await ut(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function tt(e,t,r){return et.executeQueryStreaming(e,t,r)}async function rt(e){return et.refreshDataModel(e)}async function nt(e,t){return et._fetchWrapper(e,t)}async function it(e){const t=E.id?.findCredential(e.url);t||(e.dataModel?await dt(e):await rt(e))}function ot(e,t,r){if(0!==e.error_code)throw new o.Z(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function st(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof re.Z?r.set_param_key_value(e,oe(t,n)):t instanceof Array?r.set_param_key_value(e,ne(t,n)):r.set_param_key_value(e,ie(t,n))}async function at(e,t){return(0,I.Z)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function lt(e,t,r){e.push_buffer(new Uint8Array(t));const n=[];let i=0;for(;e.next_row();){i||(i=e.get_header_keys().size());const t=new Array(i);for(let n=0;n<i;n++){const i=e.get_value(n);t[n]=Qe(i,r)}n.push(t)}if(e.has_error())throw new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return n}async function ut(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await W()).GraphQueryDecoder);return n.deleteLater(),new ReadableStream({async start(e){try{return function i(){return r?.read().then((({done:s,value:a})=>{if(s){let t;if(n.has_error()&&(t=new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:n.error.error_code,errorMessage:n.error.error_message})),r.releaseLock(),t)throw e.error(t),t;return void e.close()}const l=lt(n,a,t);return l.length>0&&e.enqueue(l),i()}))}()}catch(t){r?.releaseLock(),e.error(new o.Z("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}})}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function dt(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,I.Z)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),i=r.data;if(n?.includes("application/x-protobuf")){const e=(await W()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new o.Z("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new z({timestamp:e.timestamp,spatialReference:new N.Z(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Ie[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:xe[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:Oe(e.search_indexes),entityTypes:Ne(e.entity_types),relationshipTypes:De(e.relationship_types)})}(e)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}let pt=class extends f.Z{constructor(e){super(e),this.openCypherQuery=""}};(0,n._)([(0,l.Cb)()],pt.prototype,"openCypherQuery",void 0),pt=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQuery")],pt);const ct=pt;let ht=class extends ct{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null}};(0,n._)([(0,l.Cb)()],ht.prototype,"bindParameters",void 0),(0,n._)([(0,l.Cb)()],ht.prototype,"bindGeometryQuantizationParameters",void 0),(0,n._)([(0,l.Cb)()],ht.prototype,"outputQuantizationParameters",void 0),ht=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryStreaming")],ht);const yt=ht;function ft(e){if(!e.spatialReference.isWGS84)throw new o.Z("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");let t;return t=e.xmax>180&&e.xmin<180?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[-180,e.ymin]]]:e.xmax>180&&e.xmin>180?[[[e.xmin-360,e.ymin],[e.xmin-360,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[e.xmin-360,e.ymin]]]:e.xmax>-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin+360,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[-180,e.ymin]]]:e.xmax<-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[e.xmax+360,e.ymax],[e.xmax+360,e.ymin],[e.xmin+360,e.ymin]]]:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],t}var mt=r(14165),gt=r(6570);const wt="ESRI__ID",bt="ESRI__ORIGIN_ID",_t="ESRI__DESTINATION_ID",vt="ESRI__LAYOUT_GEOMETRY",xt=12,Ct=s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager");let Et=class extends f.Z{constructor(e){super(e),this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.memberIdTypeLookup=new Map,this._processingCacheUpdatesLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return Ct.warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const i=new Map;r.members?.forEach((e=>{this.memberIdTypeLookup.set(e.id,n);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(n,i)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),this.memberIdTypeLookup.set(t,e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),this.memberIdTypeLookup.set(t,e)}}))}getById(e){return C.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new mt.Z({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=n.outFields,o=n.geometry;let s="",a="";o&&o.extent&&(s=(0,p.fC)(o.extent.ymin,o.extent.xmin,xt),a=(0,p.fC)(o.extent.ymax,o.extent.xmax,xt)),i&&1===i.length&&i[0]===wt&&"1=1"===n.where||await Promise.all(r??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],u=[];return l.forEach((r=>{if(r.geometry=e.linkChartDiagramLookup.get(r.attributes[t.objectIdField]),r.attributes[vt]=r.geometry,s&&a){const n=e.linkChartGeohashLookup.get(r.attributes[t.objectIdField]);n?n>=s&&n<=a&&u.push(r):u.push(r)}else u.push(r)})),u}return this.retrieveDataFromService(n,t,r)}async getConnectedRecordIds(e){const t=[],r=[],n=new Map;return e.forEach((e=>{if(this.memberIdTypeLookup.has(e)){const t=this.memberIdTypeLookup.get(e);if(!this.entityTypeNames.has(t))return;n.has(t)?n.get(t)?.push(e):n.set(t,[e])}})),n.forEach(((e,n)=>{const i=`MATCH (n:${n})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`,o=new Promise((r=>{(async()=>{const r=(await tt(this.knowledgeGraph,new yt({openCypherQuery:i,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:n}=await r.read();if(e)break;for(let e=0;e<n.length;e++){const r=n[e];t.push({id:r[0],typeName:r[1]}),t.push({id:r[2],typeName:r[3]})}}}catch(e){if("AbortError"!==e.name)throw e;Ct.info("Request aborted as expected")}})().then((()=>{r()}))}));r.push(o)})),await Promise.all(r),t}async refreshCacheContent(e,t,r,n=!0){const i=C.getInstance(),s=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e)){const t=this.memberIdTypeLookup.get(e);a.has(t)?a.get(t)?.push(e):a.set(t,[e])}})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,u]of a){const a=new Promise((s=>{(async()=>{const s=new Set,a=[];let d,p="",c=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&s.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&s.add(t)}if(this.entityTypeNames.has(e))p=`MATCH (n:${e}) ${u?"WHERE id(n) IN $ids ":""}return ID(n)`,s.forEach((e=>{p+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new o.Z("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,p=`MATCH ()-[n:${e}]->() ${u?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,s.forEach((e=>{p+=`, n.${e}`,a.push(e)}))}d=new yt(u?{openCypherQuery:p,bindParameters:{ids:u}}:{openCypherQuery:p});const h=(await tt(this.knowledgeGraph,d)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await h.read();if(t)break;const o=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,i=0;const s={properties:{}};for(s.id=t[n],n++,i++,c&&(s.originId=t[n],n++,i++,s.destinationId=t[n],n++,i++,(0,m.s1)(this.nodeConnectionsLookup,s.originId,(()=>new Set)).add(s.id),(0,m.s1)(this.nodeConnectionsLookup,s.destinationId,(()=>new Set)).add(s.id));n<t.length;n++)s.properties[a[n-i]]=t[n];o.push(s)}const s=i.writeToStore(o,wt,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach((t=>{l?.set(t.attributes[wt],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[wt])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[wt],{id:t.attributes[wt]}),this.memberIdTypeLookup.set(t.attributes[wt],e))}))}})().then((()=>{s(null)}))}));s.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(s)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),this.memberIdTypeLookup.delete(r.id),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,n)=>{r.has(n)&&this.sublayerCaches.get(e)?.delete(n)}))}))}async retrieveDataFromService(e,t,r){const n=C.getInstance(),i=new Set,s=[];let a,l="",u=[];const d="relationship"===t.graphType,p=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,c=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let h=!p&&c?Array.from(c).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(h=e.objectIds);else if(null!=e.objectIds&&h&&h.length>0){const t=e.objectIds;e.objectIds=h.filter((e=>t.includes(e)))}else if(null!=e.objectIds)h=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=h}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):r.forEach((e=>{e!==wt&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const r=e.geometry;let n;const u=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,p=u?.spatialReference,c=u?.serviceCapabilities?.geometryCapabilities;let h=c?.geometryMaxBoundingRectangleSizeX,y=c?.geometryMaxBoundingRectangleSizeY;if(r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,b.initializeProjection)(r.extent.spatialReference,_.Zn),n=(0,b.project)(r.extent,_.Zn)):n=r.extent,h&&y&&p){if(4326!==p.wkid){const e=new gt.Z({spatialReference:p,xmax:h,ymax:y}),t=(0,b.project)(e,_.Zn);h=t.xmax,y=t.ymax}if(n.xmax-n.xmin>h)throw new o.Z("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${h}° latitude, limit exceeded`);if(n.ymax-n.ymin>y)throw new o.Z("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${y}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,g.E)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}))}l=d?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{l+=`, n.${e}`,s.push(e)})),a=new yt({openCypherQuery:l,bindParameters:{param_filter_geom:new w.Z({rings:ft(n)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,g.E)(e.where,t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}));const o=new Set(["column-reference","string","number","binary-expression"]),s=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.has(e.left.type)&&o.has(e.right.type)&&s.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=l(n.parseTree),a&&(r="")}let n="";n=d?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;h&&(o=!0,n+=" WHERE ID(n) IN $ids"),r&&(n+=o?" AND":" WHERE",n+=` ${r}`),n+=" return ID(n)",d&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{n+=`, n.${e}`,s.push(e)})),a=new yt(h?{openCypherQuery:n,bindParameters:{ids:h}}:{openCypherQuery:n})}const y=(await tt(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await y.read();if(e)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let n=0,o=0;const a={properties:{}};for(a.id=t[n],n++,o++,d&&(a.originId=t[n],n++,o++,a.destinationId=t[n],n++,o++);n<t.length;n++)a.properties[s[n-o]]=t[n];i.push(a)}u=u.concat(n.writeToStore(i,wt,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return u}};(0,n._)([(0,l.Cb)()],Et.prototype,"knowledgeGraph",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"inclusionModeDefinition",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"entityTypeNames",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"relationshipTypeNames",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"geographicLookup",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"sublayerCaches",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"nodeConnectionsLookup",void 0),(0,n._)([(0,l.Cb)()],Et.prototype,"memberIdTypeLookup",void 0),Et=(0,n._)([(0,d.j)("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager")],Et);var It=r(51773),Tt=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),Mt=r(32400),St=(r(56569),r(28972)),kt=r(3489),Lt=r(25278);const Nt=(0,r(53518).v)(),jt=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n._)([(0,l.Cb)(Nt.fields)],t.prototype,"fields",void 0),(0,n._)([(0,l.Cb)(Nt.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,n._)([(0,d.j)("esri.layers.knowledgeGraphLayer.KnowledgeGraphSublayerBase")],t),t};var Rt=r(71612),Pt=r(6404),Dt=r(34760),Ot=r(72965),Ft=r(1231),Zt=r(69165),Gt=r(74889),At=r(32163),Bt=r(728),qt=r(86973);let zt=class extends((0,Pt.M)(jt((0,Rt.h)((0,Ot.M)((0,Dt.Q)(c.Z)))))){constructor(e){if(super(e),this.capabilities=(0,Lt.MS)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=wt,this.objectType=null,this.parentCompositeLayer=null,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Bt.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=mt.Z.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=vt;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?qt.M.fromJSON(t.geometryType):null;const r=t?.name,n=r?e.objectType.properties?.[r]:null;n?(this.hasM=n.hasM??!1,this.hasZ=n.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(Ft.Z.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(Ft.Z.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,Tt.i)((0,Lt.bU)(qt.M.toJSON("polyline")).renderer):this.renderer=(0,Tt.i)((0,Lt.bU)(qt.M.toJSON("point")).renderer):this.renderer=(0,Tt.i)((0,Lt.bU)(qt.M.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Zt.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,At.eZ)(this,e)}createQuery(){return new mt.Z({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];throw new Error("Field not found")}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e),i=Gt.Z.fromJSON(await n.executeQuery(r.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(r),o=await i.executeQueryForExtent(n.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new gt.Z(o.extent):new gt.Z,{count:o.count,extent:s}}async queryObjectIds(e,t){const r=mt.Z.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return n.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new St.Z({geometryType:qt.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new kt.q({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:qt.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new mt.Z({where:"1=1",outFields:[wt]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=mt.Z.from(e),n=r.geometry;let i;if(n&&!n.spatialReference?.isWGS84&&(await(0,b.initializeProjection)(n.spatialReference,_.Zn),r.geometry=(0,b.project)(n instanceof w.Z||n instanceof te.Z?n:n.extent,_.Zn)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:i}}};(0,n._)([(0,l.Cb)()],zt.prototype,"capabilities",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],zt.prototype,"defaultPopupTemplate",null),(0,n._)([(0,l.Cb)()],zt.prototype,"definitionExpression",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"displayField",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"elevationInfo",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"geometryType",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"geometryFieldName",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"graphType",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"hasM",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"hasZ",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"labelsVisible",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"labelingInfo",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"objectIdField",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"objectType",void 0),(0,n._)([(0,l.Cb)()],zt.prototype,"parentCompositeLayer",void 0),(0,n._)([(0,l.Cb)({type:It.Z,json:{name:"popupInfo",write:!0}})],zt.prototype,"popupTemplate",void 0),(0,n._)([(0,l.Cb)({types:Mt.A,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],zt.prototype,"renderer",null),(0,n._)([(0,l.Cb)()],zt.prototype,"source",void 0),(0,n._)([(0,l.Cb)({json:{read:!1}})],zt.prototype,"type",void 0),zt=(0,n._)([(0,d.j)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],zt);const Ut=zt;let Yt,Jt=null;var Vt,Qt,Ht,$t,Xt,Wt,Kt,er,tr;function rr(e,t,r,n,i,o){const s=r.length,a=i.length,l=Float64Array.BYTES_PER_ELEMENT,u=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,p=15+s*(d+2*l)+a*(2*u),c=Jt._malloc(p);try{const d=c+16-c%16,p=d+s*l,h=p+s*l,y=h+a*u,f=y+a*u,m=()=>[Jt.HEAPF64.subarray(d>>3,(d>>3)+s),Jt.HEAPF64.subarray(p>>3,(p>>3)+s),Jt.HEAPU32.subarray(h>>2,(h>>2)+a),Jt.HEAPU32.subarray(y>>2,(y>>2)+a),Jt.HEAPU8.subarray(f,f+s)],[g,w,b,_,v]=m();g.set(r),w.set(n),b.set(i),_.set(o),v.set(t);const x=e(s,f,d,p,a,h,y),[C,E,I,T,M]=m();return r.set(C),n.set(E),i.set(I),o.set(T),t.set(M),x}finally{Jt._free(c)}}!function(e){e[e.None=0]="None",e[e.IsMovable=1]="IsMovable",e[e.IsGeographic=2]="IsGeographic",e[e.IsRoot=4]="IsRoot"}(Vt||(Vt={})),function(e){e.getMinIdealEdgeLength=function(){return Jt.getMinIdealEdgeLength()},e.apply=function(e,t,r,n,i,o=2,s=1,a=-1){return rr(((e,t,r,n,i,l,u)=>Jt.applyForceDirectedLayout(e,t,r,n,i,l,u,o,s,a)),e,t,r,n,i)}}(Qt||(Qt={})),function(e){e.apply=function(e,t,r,n,i,o=2,s=1,a=-1){return rr(((e,t,r,n,i,l,u)=>Jt.applyCommunityLayout(e,t,r,n,i,l,u,o,s,a)),e,t,r,n,i)}}(Ht||(Ht={})),function(e){e.apply=function(e,t,r,n,i){return rr(Jt.applySimpleLayout,e,t,r,n,i)}}($t||($t={})),function(e){e.apply=function(e,t,r,n,i){return rr(Jt.applyHierarchicalLayout,e,t,r,n,i)}}(Xt||(Xt={})),function(e){e.apply=function(e,t,r,n,i){return rr(Jt.applyRadialTreeLayout,e,t,r,n,i)}}(Wt||(Wt={})),function(e){e.apply=function(e,t,r,n,i){return rr(Jt.applySmartTreeLayout,e,t,r,n,i)}}(Kt||(Kt={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(er||(er={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(tr||(tr={}));let nr=class extends((0,Rt.h)((0,Ot.M)(c.Z))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.knowledgeGraph=null,this.layers=new i.Z,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new gt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new i.Z,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.Z("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let r=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.Z("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(r=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,o)=>{if(!this._graphTypeLookup.get(o))return s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);this._graphTypeLookup.get(o)instanceof B||"strictOrigin"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),n.push(this._graphTypeLookup.get(o))):this._graphTypeLookup.get(o)instanceof G||"properties"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),r.push(this._graphTypeLookup.get(o))):(s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(r=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const i=new Et({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=r,this.memberRelationshipTypes=n,this.dataManager=i}load(e){return this.addResolvingPromise(new Promise((t=>{(async function(e){return et.fetchKnowledgeGraph(e)})(this.url).then((r=>{if(this._initializeLayerProperties({knowledgeGraph:r,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof y.Z?e.linkChartLocation:e.linkChartLocation?(0,h.GH)(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,p.fC)(t.coords[1],t.coords[0],xt)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.k_)(e);const t=[],r=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let r=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(r=await async function(e,t){const r=[],n=new Map,i=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);for(const[e,o]of n){if(o.length<1)continue;const n=new yt({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:o}});i.push(tt(t,n).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;for(const e of n)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(i),r}(e,this.dataManager.knowledgeGraph));const n=e.concat(r).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(n)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:r=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let n=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const r of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(r);for(const r of e)this.dataManager.memberIdTypeLookup.has(r)&&t.push({id:r,typeName:this.dataManager.memberIdTypeLookup.get(r)});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.linkChartDiagramLookup.delete(e.id);r&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor});const i=[];return this.layers.forEach((e=>{i.push(e.refreshCachedQueryEngine())})),await Promise.all(i),this._refreshNamedTypes(),n}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e),r=t.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(t),{records:r}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new Ut({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new Ut({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const r=((e,t,r)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(r.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof y.Z)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,p.fC)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],xt)):this.linkChartGeohashLookup.set(e.id,"");else{const t=(0,h.GH)(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,p.fC)(e.linkChartLocation.x,e.linkChartLocation.y,xt)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const n=[],i=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{n.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const a=new Map,l=new Map,u=new Map,d=new Map,c=new Uint8Array(n.length),y=new Float64Array(n.length),f=new Float64Array(n.length),m=new Uint32Array(i.length),g=new Uint32Array(i.length),w=[],b=t?.xScaleFactor??1,_=t?.yScaleFactor??1,v=new gt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let x,C="FORCE_DIRECTED",E=0,I=0;switch(C="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,C){case"FORCE_DIRECTED":x=Qt.apply;break;case"COMMUNITY":x=Ht.apply;break;case"HIERARCHICAL":x=Xt.apply;break;case"RADIAL_TREE":x=Wt.apply;break;case"SMART_TREE":x=Kt.apply;break;default:x=$t.apply}n.forEach((({typeName:r,feature:n})=>{if(t?.lockedNodeLocations?.has(n.attributes[wt])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(r)?c[E]=Vt.IsGeographic:c[E]=Vt.None;const i=t.lockedNodeLocations.get(n.attributes[wt]);y[E]=i.x,f[E]=i.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(r)){c[E]=Vt.IsGeographic;let e=null;const t=n.attributes[this.dataManager.geographicLookup.get(r).name],i=this.dataManager.geographicLookup.get(r)?.geometryType;switch(i){case"esriGeometryPoint":y[E]=t?.x,f[E]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[E]=e.x,f[E]=e.y):c[E]=Vt.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[E]=e.x,f[E]=e.y):c[E]=Vt.IsMovable;break;default:c[E]=Vt.IsMovable}(null==y[E]||null==f[E]||Number.isNaN(y[E])||Number.isNaN(f[E]))&&(c[E]=Vt.IsMovable,y[E]=0,f[E]=0)}else c[E]=Vt.IsMovable,y[E]=0,f[E]=0;d.set(n.attributes[wt],E),w[E]={feature:n,typeName:r},E++}));let T=!1;if(i.forEach((e=>{const t=d.get(e.feature.attributes[bt]),r=d.get(e.feature.attributes[_t]);void 0!==t&&void 0!==r?(m[I]=t,g[I]=r,I++):(T=!0,this.linkChartDiagramLookup.set(e.feature.attributes[bt],null),this.linkChartGeohashLookup.set(e.feature.attributes[bt],null))})),T&&s.Z.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(Yt||(Yt=r.e(6124).then(r.bind(r,36124)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,Q.V)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){Jt=e}(e)})),Yt)),!x(c,y,f,m,g))throw new o.Z("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<w.length;e++){if(c[e]===Vt.IsMovable&&(y[e]=y[e]*b,f[e]=f[e]*_),f[e]>84.9999&&(f[e]=84.9999),f[e]<-84.9999&&(f[e]=-84.9999),y[e]>179.9999&&(y[e]=179.9999),y[e]<-179.9999&&(y[e]=-179.9999),w[e].feature.attributes[vt]=new ee.Z(y[e],f[e]),a.has(w[e].typeName)){const t=a.get(w[e].typeName);t?.set(w[e].feature.attributes[wt],w[e].feature)}else{const t=new Map;t.set(w[e].feature.attributes[wt],w[e].feature),a.set(w[e].typeName,t)}u.set(w[e].feature.attributes[wt],w[e].feature);const t=(0,h.GH)(w[e].feature.attributes[vt]);this.linkChartDiagramLookup.set(w[e].feature.attributes[wt],w[e].feature.attributes[vt]?t:null),this.linkChartGeohashLookup.set(w[e].feature.attributes[wt],(0,p.fC)(w[e].feature.attributes[vt].y,w[e].feature.attributes[vt].x,xt)),w[e].feature.attributes[vt].x<v.xmin&&(v.xmin=w[e].feature.attributes[vt].x),w[e].feature.attributes[vt].x>v.xmax&&(v.xmax=w[e].feature.attributes[vt].x),w[e].feature.attributes[vt].y<v.ymin&&(v.ymin=w[e].feature.attributes[vt].y),w[e].feature.attributes[vt].y>v.ymax&&(v.ymax=w[e].feature.attributes[vt].y)}return this.linkChartExtent.xmin=v.xmin,this.linkChartExtent.xmax=v.xmax,this.linkChartExtent.ymin=v.ymin,this.linkChartExtent.ymax=v.ymax,i.forEach((e=>{const t=w[d.get(e.feature.attributes[bt])]?.feature.attributes[vt],r=w[d.get(e.feature.attributes[_t])]?.feature.attributes[vt];if(!t||!r)return;const n=new te.Z({paths:[[t.x,t.y],[r.x,r.y]]});if(e.feature.attributes[vt]=n,l.has(e.typeName)){const t=l.get(e.typeName);t?.set(e.feature.attributes[wt],e.feature)}else{const t=new Map;t.set(e.feature.attributes[wt],e.feature),l.set(e.typeName,t)}u.set(e.feature.attributes[wt],e.feature);const i=(0,h.GH)(e.feature.attributes[vt]);this.linkChartDiagramLookup.set(e.feature.attributes[wt],e.feature.attributes[vt]?i:null),this.linkChartGeohashLookup.set(e.feature.attributes[wt],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:b,yScaleFactor:_},{nodes:a,links:l,idMap:u}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const r=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{r.push(e.refreshCachedQueryEngine())})),await Promise.all(r),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const r=t.linkChartLocation;let n;const i=t.id;r&&(n="x"in r?{x:r.x,y:r.y}:{x:r.coords[0],y:r.coords[1]},e.set(i,new ee.Z({x:n.x,y:n.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const r=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!r.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const r of e)this.sublayerIdsCache.has(r.typeName)||(this.sublayerIdsCache.set(r.typeName,new Set),t.push(r.typeName)),this.sublayerIdsCache.get(r.typeName).add(r.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),r="endPoints"in t?"relationship":"entity",n=new Ut({objectType:t,parentCompositeLayer:this,graphType:r,title:e});"entity"===r?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),n.geometryType?this.layers.push(n):this.tables.push(n),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let r;const n=e.id;if(!t)return;r="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const i=(0,h.GH)(r);this.linkChartDiagramLookup.set(n,i),this.linkChartGeohashLookup.set(n,(0,p.fC)(r.x,r.y,xt)),this.linkChartExtent.xmin>r.x&&(this.linkChartExtent.xmin=r.x),this.linkChartExtent.xmax<r.x&&(this.linkChartExtent.xmax=r.x),this.linkChartExtent.ymin>r.y&&(this.linkChartExtent.ymin=r.y),this.linkChartExtent.ymax<r.y&&(this.linkChartExtent.ymax=r.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[bt]),r=this.linkChartDiagramLookup.get(e.attributes[_t]);if(t&&r){const n=(0,h.GH)(new te.Z({paths:[[t.coords[0],t.coords[1]],[r.coords[0],r.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[wt],n)}else this.linkChartDiagramLookup.set(e.attributes[wt],null);this.linkChartGeohashLookup.set(e.attributes[wt],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};(0,n._)([(0,l.Cb)()],nr.prototype,"dataPreloadedInLocalCache",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"defaultLinkChartConfig",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"dataManager",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"knowledgeGraph",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"layers",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"linkChartDiagramLookup",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"linkChartExtent",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"linkChartGeohashLookup",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"memberEntityTypes",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"memberRelationshipTypes",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"sublayerIdsCache",void 0),(0,n._)([(0,l.Cb)()],nr.prototype,"tables",void 0),(0,n._)([(0,l.Cb)({json:{read:!1}})],nr.prototype,"type",void 0),nr=(0,n._)([(0,d.j)("esri.layers.LinkChartLayer")],nr);const ir=nr},37549:(e,t,r)=>{r.d(t,{H:()=>a});var n=r(80442),i=r(24133),o=r(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,n.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,n)=>{e[t++]=n})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},28972:(e,t,r)=>{r.d(t,{Z:()=>E});var n=r(67676),i=r(20102),o=r(32448),s=r(92604),a=r(60437),l=r(24470),u=r(98732),d=r(37549),p=r(42712);function c(e,t){return e?t?4:3:t?3:2}function h(e,t,r,n,i){if(!t?.lengths.length)return null;const o="upperLeft"===i?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const s=e.coords,a=[],l=r?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:u,coords:d}=t,p=c(r,n);let h=0;for(const e of u){const t=y(l,d,h,e,r,n,o);t&&a.push(t),h+=e*p}if(a.sort(((e,t)=>{let n=o*e[2]-o*t[2];return 0===n&&r&&(n=e[4]-t[4]),n})),a.length){let e=6*a[0][2];s[0]=a[0][0]/e,s[1]=a[0][1]/e,r&&(e=6*a[0][4],s[2]=0!==e?a[0][3]/e:0),(s[0]<l[0]||s[0]>l[1]||s[1]<l[2]||s[1]>l[3]||r&&(s[2]<l[4]||s[2]>l[5]))&&(s.length=0)}if(!s.length){const e=t.lengths[0]?f(d,0,u[0],r,n):null;if(!e)return null;s[0]=e[0],s[1]=e[1],r&&e.length>2&&(s[2]=e[2])}return e}function y(e,t,r,n,i,o,s=1){const a=c(i,o);let l=r,u=r+a,d=0,p=0,h=0,y=0,f=0;for(let r=0,o=n-1;r<o;r++,l+=a,u+=a){const r=t[l],n=t[l+1],o=t[l+2],s=t[u],a=t[u+1],c=t[u+2];let m=r*a-s*n;y+=m,d+=(r+s)*m,p+=(n+a)*m,i&&(m=r*c-s*o,h+=(o+c)*m,f+=m),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),i&&(o<e[4]&&(e[4]=o),o>e[5]&&(e[5]=o))}if(y*s>0&&(y*=-1),f*s>0&&(f*=-1),!y)return null;const m=[d,p,.5*y];return i&&(m[3]=h,m[4]=.5*f),m}function f(e,t,r,n,i){const o=c(n,i);let s=t,a=t+o,l=0,u=0,d=0,p=0;for(let t=0,i=r-1;t<i;t++,s+=o,a+=o){const t=e[s],r=e[s+1],i=e[s+2],o=e[a],c=e[a+1],h=e[a+2],y=n?g(t,r,i,o,c,h):m(t,r,o,c);if(y)if(l+=y,n){const e=b(t,r,i,o,c,h);u+=y*e[0],d+=y*e[1],p+=y*e[2]}else{const e=w(t,r,o,c);u+=y*e[0],d+=y*e[1]}}return l>0?n?[u/l,d/l,p/l]:[u/l,d/l]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function m(e,t,r,n){const i=r-e,o=n-t;return Math.sqrt(i*i+o*o)}function g(e,t,r,n,i,o){const s=n-e,a=i-t,l=o-r;return Math.sqrt(s*s+a*a+l*l)}function w(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function b(e,t,r,n,i,o){return[e+.5*(n-e),t+.5*(i-t),r+.5*(o-r)]}var _=r(70272),v=r(5428);const x={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new _.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=h(new v.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)},C=(0,a.Ue)();class E{constructor(e){this.geometryInfo=e,this._boundsStore=new d.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new o.Z,this.featureAdapter=x}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,n,i]=this.fullBounds;return{xmin:t,ymin:r,xmax:n,ymax:i,spatialReference:(0,p.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(n.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.JR)(C,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void s.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let n;if(this._markedIds.add(t),r?(e.displayId=r.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,u.$)(null!=n?n:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return s.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;this._markedIds.add(t);const{geometry:n,attributes:o}=e;for(const e in o)r.attributes[e]=o[e];return n&&(r.geometry=n,this._boundsStore.set(t,(0,u.$)((0,l.Ue)(),n,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>a});var n=r(80442),i=r(22974),o=r(61159),s=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,n.Z)("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 n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(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:o.g,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}}}},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var n=r(43697),i=r(92604),o=r(95330),s=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),u=r(82960),d=r(46791),p=(r(66643),r(20102),r(26258),r(87538));const c=new d.Z,h=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function w(){const e=Date.now();let t=!1;for(const r of c){const n=r.deref();n?n.refreshInterval&&e-(h.get(n)??0)+5>=6e4*n.refreshInterval&&(h.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const n=r.deref();n&&(t=f(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?h.get(n)||h.set(n,e):h.delete(n))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(w,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var n,i=r(43697),o=r(35454),s=r(96674),a=r(5600),l=r(75215),u=(r(67676),r(80442),r(36030)),d=r(71715),p=r(52011),c=r(72729),h=r(86719);const y=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=n=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,i._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,i._)([(0,d.r)("description")],f.prototype,"readDescription",null),(0,i._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],f.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,i._)([(0,u.J)(h.v)],f.prototype,"type",void 0),(0,i._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,i._)([(0,d.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=n=(0,i._)([(0,p.j)("esri.layers.support.Field")],f);const m=f},54306:(e,t,r)=>{r.d(t,{Z:()=>T});var n,i=r(43697),o=r(9790),s=r(35454),a=r(96674),l=r(22974),u=r(62357),d=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556),y=(r(67676),r(80442),r(8813));let f=n=class extends a.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.dI)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,y.dI)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,i._)([(0,d.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,i._)([(0,p.r)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,i._)([(0,h.c)("expression")],f.prototype,"writeExpression",null),(0,i._)([(0,d.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=n=(0,i._)([(0,c.j)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var g,w=r(84230),b=r(28412),_=r(21878);const v=new s.X({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function x(e,t,r){return{enabled:!(0,w.A2)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function E(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=g=class extends a.wq{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),i=n[3],o=r(t[n[4]],n[5],n[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=b.Rz,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&C(n))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(n);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.hV)(this)}getLabelExpressionArcade(){return(0,y.YI)(this)}getLabelExpressionSingleField(){return(0,y.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new g({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:x}}}}})],I.prototype,"allowOverrun",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:x}}}}})],I.prototype,"deconflictionStrategy",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&E(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,i._)([(0,p.r)("labelExpression")],I.prototype,"readLabelExpression",null),(0,i._)([(0,h.c)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,i._)([(0,d.Cb)({type:m,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||E(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,i._)([(0,h.c)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,i._)([(0,d.Cb)({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],I.prototype,"labelPlacement",void 0),(0,i._)([(0,d.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,i._)([(0,d.Cb)({type:Number})],I.prototype,"maxScale",void 0),(0,i._)([(0,h.c)("maxScale")],I.prototype,"writeMaxScale",null),(0,i._)([(0,d.Cb)({type:Number})],I.prototype,"minScale",void 0),(0,i._)([(0,h.c)("minScale")],I.prototype,"writeMinScale",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],I.prototype,"repeatLabel",void 0),(0,i._)([(0,d.Cb)({type:Number,cast:u.t_,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:x}}}}})],I.prototype,"repeatLabelDistance",void 0),(0,i._)([(0,d.Cb)({types:o.yK,json:{origins:{"web-scene":{types:o.S6,write:_.vX,default:null}},write:_.vX,default:null}})],I.prototype,"symbol",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=g=(0,i._)([(0,c.j)("esri.layers.support.LabelClass")],I);const T=I},21506:(e,t,r)=>{r.d(t,{qG:()=>v,PV:()=>m,id:()=>C,iR:()=>h,rn:()=>f,rT:()=>T,u1:()=>I,rO:()=>E,Oh:()=>b,bT:()=>_,C_:()=>c,Lx:()=>g,vg:()=>x,YI:()=>p,HQ:()=>y});var n=r(92835),i=r(82960),o=r(6570),s=r(82971),a=r(25929),l=(r(67676),r(35463)),u=r(86787),d=r(65242);const p={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:i.C}}},c={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},h={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:i.C}}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a.w}}},f={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:i.C}}},m={value:null,type:u.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:i.C}}};function g(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const w={write:{enabled:!0,layerContainerTypes:i.C},read:!0},b={type:Number,json:{origins:{"web-document":w,"portal-item":{write:!0}}}},_={...b,json:{...b.json,origins:{"web-document":{...w,write:{enabled:!0,layerContainerTypes:i.C,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition?.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,d.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,d.b)(t.drawingInfo.transparency)}}},v={type:n.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:r}=this.layer,i=this.view?.timeExtent;let o=this.layer.timeExtent;e&&(o=function(e){if(!e)return e;const{start:t,end:r}=e;return new n.Z({start:null!=t?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=r?(0,l.Nm)(r,r.getTimezoneOffset(),"minutes"):r})}(o));let s=r?i&&o?i.intersection(o):i||o:o;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=function(e){if(!e)return e;const{start:t,end:r}=e;return new n.Z({start:null!=t?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=r?(0,l.Nm)(r,-r.getTimezoneOffset(),"minutes"):r})}(s));const a=this._get("timeExtent");return s.equals(a)?a:s}},x={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=o.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=s.Z.fromJSON(t.spatialReference)),r}}}},read:!1}},C={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},E={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:i.C}}},name:"layerDefinition.minScale",write:!0}},I={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:i.C}}},name:"layerDefinition.maxScale",write:!0}},T={json:{write:{ignoreOrigin:!0,layerContainerTypes:i.C},origins:{"web-map":{read:!1,write:!1}}}}},72729:(e,t,r)=>{r.d(t,{im:()=>E,V5:()=>C}),r(80442);var n,i=r(43697),o=r(22974),s=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(96674);r(67676);let d=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=n=(0,i._)([(0,l.j)("esri.layers.support.CodedValue")],d);const p=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,a.J)(p)],c.prototype,"type",void 0),c=(0,i._)([(0,l.j)("esri.layers.support.Domain")],c);const h=c;var y;let f=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,s.Cb)({type:[d],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,i._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,i._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;r(92604),r(20102);let w=g=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,a.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,i._)([(0,l.j)("esri.layers.support.InheritedDomain")],w);const b=w;var _;let v=_=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,i._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,i._)([(0,a.J)({range:"range"})],v.prototype,"type",void 0),v=_=(0,i._)([(0,l.j)("esri.layers.support.RangeDomain")],v);const x=v,C={key:"type",base:h,typeMap:{range:v,"coded-value":m,inherited:b}};function E(e){if(!e?.type)return null;switch(e.type){case"range":return x.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},45574:(e,t,r)=>{r.d(t,{JD:()=>b,Jj:()=>x,sX:()=>G,Ob:()=>B,rP:()=>R,FV:()=>E,nU:()=>Z,Ci:()=>I,Fr:()=>w,HW:()=>z,gG:()=>j,uA:()=>q,SU:()=>T,KE:()=>k,VG:()=>S,tD:()=>M,kp:()=>L,C9:()=>N,rk:()=>P,kZ:()=>D,JY:()=>O,Y5:()=>v,uj:()=>C});var n=r(40330),i=r(9790),o=r(66643),s=r(20102),a=r(35454),l=r(42033),u=r(63213),d=r(14165);async function p(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=c(e));const n=function(e){return c(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),i=e.capabilities.query.supportsPagination;t.start=0,t.num=n;let o=null;for(;;){const s=await e.source.queryFeaturesJSON(t,r);if(null==o?o=s:o.features=o.features.concat(s.features),o.exceededTransferLimit=s.exceededTransferLimit,!i||!s.exceededTransferLimit)break;t.start+=n}return o}function c(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.Z.MAX_MAX_RECORD_COUNT_FACTOR:1}var h=r(84230),y=r(84382),f=r(81571),m=r(56545),g=r(75935);const w=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function b(e,t,r,n){const i=await F(e);if(await _(e,t,n),!i.addAttachment)throw new s.Z(n,"Layer source does not support addAttachment capability");return i.addAttachment(t,r)}function _(e,t,r){const{attributes:n}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?n?i&&n[i]?Promise.resolve():Promise.reject(new s.Z(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new s.Z(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new s.Z(r,"A feature is required to add/delete/update attachments")):Promise.reject(new s.Z(r,"this layer doesn't support attachments"))}async function v(e,t,r,n,i){const o=await F(e);if(await _(e,t,i),!o.updateAttachment)throw new s.Z(i,"Layer source does not support updateAttachment capability");return o.updateAttachment(t,r,n)}async function x(e,t,n){const{applyEdits:i}=await r.e(4720).then(r.bind(r,14720)),o=await e.load(),{source:s,globalIdField:a}=o;let l=n;return("feature"===o.type?o.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await z(e,t.deleteFeatures,a)}),i(o,s,t,n)}async function C(e,t,n){const{uploadAssets:i}=await r.e(4720).then(r.bind(r,14720)),o=await e.load();return i(o,o.source,t,n)}async function E(e,t,r,n){const i=await F(e);if(await _(e,t,n),!i.deleteAttachments)throw new s.Z(n,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,r)}async function I(e,t,r){const n=(await e.load({signal:t?.signal})).source;if(!n.fetchRecomputedExtents)throw new s.Z(r,"Layer source does not support fetchUpdates capability");return n.fetchRecomputedExtents(t)}async function T(e,t,r,n){t=m.Z.from(t),await e.load();const i=e.source,o=e.capabilities;if(!o?.data?.supportsAttachment)throw new s.Z(n,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:d,size:p,start:c,where:h}=t;if(!o?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||p?.length>0||d||c||h))throw new s.Z(n,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||h))throw new s.Z(n,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!i.queryAttachments)throw new s.Z(n,"Layer source does not support queryAttachments capability",t);return i.queryAttachments(t)}async function M(e,t,r,n){const i=await F(e);if(!i.queryObjectIds)throw new s.Z(n,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(d.Z.from(t)??e.createQuery(),r)}async function S(e,t,r,n){const i=await F(e);if(!i.queryFeatureCount)throw new s.Z(n,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(d.Z.from(t)??e.createQuery(),r)}async function k(e,t,r,n){const i=await F(e);if(!i.queryExtent)throw new s.Z(n,"Layer source does not support queryExtent capability");return i.queryExtent(d.Z.from(t)??e.createQuery(),r)}async function L(e,t,r,n){const i=await F(e);if(!i.queryRelatedFeatures)throw new s.Z(n,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(g.default.from(t),r)}async function N(e,t,r,n){const i=await F(e);if(!i.queryRelatedFeaturesCount)throw new s.Z(n,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(g.default.from(t),r)}async function j(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function R(e){const t=new d.Z,r=e.capabilities?.data,n=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,n&&(t.compactGeometryEnabled=n.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:i,timeExtent:o}=e;return t.timeExtent=null!=i&&null!=o?o.offset(-i.value,i.unit):o||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function P(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function D(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function O(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function F(e){return(await e.load()).source}async function Z(e,t,r){const i=e.parsedUrl?.path;i&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!n.id)return;if(n.id.findCredential(e))return;let r;try{const i=await(0,h.oP)(e,t);i&&(r=await n.id.checkSignInStatus(`${i}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await n.id.getCredential(e,{signal:r})}catch(e){}}(i,r)}function G(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const A=(0,u.d)({types:i.QT});function B(e,t){if(e.defaultSymbol)return e.types?.length?new f.Z({defaultSymbol:A(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:A(e.symbol,e,t)})))}):new y.Z({symbol:A(e.defaultSymbol,e,t)})}function q(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function z(e,t,r){if(null==t)return null;const n=[],{objectIdField:i}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:n}=e;t={globalId:n[r],objectId:null!=n[i]&&-1!==n[i]?n[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||n.push(t.globalId))})),0===n.length)return null;const s=e.createQuery();s.where=n.map((e=>`${r}='${e}'`)).join(" OR "),s.returnGeometry=!1,s.outFields=[i,r],s.cacheHint=!1;const a=await(0,o.mt)(p(e,s));if(!a.ok)return null;const l=new Map,u=a.value.features;for(const e of u){const t=e.attributes[r],n=e.attributes[i];null!=t&&null!=n&&-1!==n&&l.set(t,n)}return l}},53518:(e,t,r)=>{r.d(t,{v:()=>l});var n=r(80442),i=r(92604),o=r(1231),s=r(99514),a=r(69165);function l(){return{fields:{type:[o.Z],value:null,set:function(e){if(e&&(0,n.Z)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");i.Z.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.Z.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.Q0)(this.fieldsIndex,e)}}}}},8813:(e,t,r)=>{r.d(t,{UO:()=>m,YI:()=>f,dI:()=>g,el:()=>x,hV:()=>y,z7:()=>h});var n=r(19153);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),d='"',p=d+" + ",c=" + "+d;function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(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=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function f(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function g(e){let t;return e?(t=(0,n.gx)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):d+t,t=u.test(t)?t.replace(u,""):t+d,t=t.replaceAll(s,p).replaceAll(a,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=b.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},99282:(e,t,r)=>{r.d(t,{a:()=>o});var n=r(67900),i=r(68441);const o={unknown:1,inches:(0,n.En)(1,"meters","inches"),feet:(0,n.En)(1,"meters","feet"),"us-feet":(0,n.En)(1,"meters","us-feet"),yards:(0,n.En)(1,"meters","yards"),miles:(0,n.En)(1,"meters","miles"),"nautical-miles":(0,n.En)(1,"meters","nautical-miles"),millimeters:(0,n.En)(1,"meters","millimeters"),centimeters:(0,n.En)(1,"meters","centimeters"),decimeters:(0,n.En)(1,"meters","decimeters"),meters:(0,n.En)(1,"meters","meters"),kilometers:(0,n.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,n.ty)(1,"meters",i.sv.radius)}},56545:(e,t,r)=>{r.d(t,{Z:()=>c});var n,i=r(43697),o=r(96674),s=r(22974),a=r(5600),l=r(75215),u=r(52011),d=r(30556);let p=n=class extends o.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,s.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,i._)([(0,d.c)("start"),(0,d.c)("num")],p.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=n=(0,i._)([(0,u.j)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.se)(p);const c=p},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var n,i=r(43697),o=r(66577),s=r(38171),a=r(35454),l=r(96674),u=r(22974),d=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556),y=r(82971),f=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{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=y.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.fromJSON(i),a=i.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=i.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],i=n?.spatialReference;null==t||i||(t.spatialReference=r)}n.push(o)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,f.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.Z.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({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 n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.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:[n,i],scale:[o,s]}=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*o+n),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}return o.length>0?o: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 n=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[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),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,p.r)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,p.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i._)([(0,c.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var n,i=r(43697),o=(r(66577),r(96674)),s=r(22974),a=r(5600),l=r(75215),u=r(52011),d=r(30556),p=r(10158),c=r(82971);let h=n=class extends o.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new n((0,s.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:p.n,json:{write:!0}})],h.prototype,"dynamicDataSource",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"gdbVersion",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"geometryPrecision",void 0),(0,i._)([(0,a.Cb)({type:Date})],h.prototype,"historicMoment",void 0),(0,i._)([(0,d.c)("historicMoment")],h.prototype,"_writeHistoricMoment",null),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"maxAllowableOffset",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],h.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],h.prototype,"orderByFields",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],h.prototype,"outFields",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],h.prototype,"outSpatialReference",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"relationshipId",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],h.prototype,"start",void 0),(0,i._)([(0,d.c)("start"),(0,d.c)("num")],h.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],h.prototype,"num",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"returnGeometry",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],h.prototype,"returnM",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],h.prototype,"returnZ",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],h.prototype,"where",void 0),h=n=(0,i._)([(0,u.j)("esri.rest.support.RelationshipQuery")],h),h.from=(0,l.se)(h);const y=h},11282:(e,t,r)=>{r.d(t,{cv:()=>a,en:()=>s,lA:()=>o}),r(68773),r(40330);var n=r(22974),i=r(17452);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,n.d9)(e)}function a(e,t,r){const n={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){n[i]=[];for(let e=0;e<o.length;e++)n[i][e]=a(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r?.[i]);n[i]=t?e:JSON.stringify(e)}else n[i]=t?o:JSON.stringify(o);else n[i]=o}return n}r(71058)},32163:(e,t,r)=>{r.d(t,{eZ:()=>u});var n=r(51773),i=r(69165),o=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(29986);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.Z({fieldName:t.name,isEditable:(0,i.Hp)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!f.length)return null;const m=function(e){const t=(0,i.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),g=[new s.Z,new o.Z];return new n.Z({title:m,content:g,fieldInfos:f})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,i.Fv)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"string":return(0,i.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},86787:(e,t,r)=>{r.d(t,{Z:()=>_});var n,i=r(43697),o=r(35454),s=r(96674),a=r(70586),l=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),p=r(30556),c=r(69165);let h=n=class extends s.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.io)(e,t,this.expression)}clone(){return new n({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),h=n=(0,i._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],h);const y=h;var f,m=r(12541);const g=(0,o.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new o.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let b=f=class extends s.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,n){t[r]=e.write({},n),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,i._)([(0,l.Cb)({type:y,json:{write:!0}})],b.prototype,"featureExpressionInfo",void 0),(0,i._)([(0,u.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],b.prototype,"readFeatureExpressionInfo",null),(0,i._)([(0,p.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],b.prototype,"writeFeatureExpressionInfo",null),(0,i._)([(0,l.Cb)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],b.prototype,"mode",null),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],b.prototype,"offset",void 0),(0,i._)([(0,l.Cb)({type:m.f9,json:{type:String,read:w.read,write:w.write}})],b.prototype,"unit",null),b=f=(0,i._)([(0,d.j)("esri.layers.support.ElevationInfo")],b);const _=b},28412:(e,t,r)=>{r.d(t,{CJ:()=>u,Rz:()=>p,xA:()=>l,z3:()=>d}),r(80442);var n=r(20256),i=r(4095),o=r(77987),s=r(78724),a=r(58333);const l=o.Z.fromJSON(a.I4),u=i.Z.fromJSON(a.ET),d=n.Z.fromJSON(a.lF),p=s.Z.fromJSON(a.qP);o.Z.fromJSON(a.eG),i.Z.fromJSON(a.wW),n.Z.fromJSON(a.lj)},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>s,lj:()=>d,qP:()=>a,wW:()=>u});const n=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},s={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},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},12541:(e,t,r)=>{r.d(t,{Z7:()=>i,f9:()=>o});var n=r(99282);function i(e){return 1/(n.a[e]||1)}const o=function(){const e=Object.keys(n.a);return e.sort(),e}()},65242:(e,t,r)=>{r.d(t,{a:()=>i,b:()=>o});var n=r(75215);function i(e){const t=(0,n.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function o(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2725,5732,7701],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>s});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(66643),r(20102),r(92604),r(26258),r(87538)),n=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],a.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,i._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},22862:(e,t,r)=>{r.d(t,{Hg:()=>h,V7:()=>c,uD:()=>y});var i=r(92036),s=r(46791),o=r(1153);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=s.filter((e=>!i.includes(e))),y=i.filter((e=>!s.includes(e))),c=i.filter((r=>s.includes(r)&&u(e,r)!==u(t,r))).concat(o,y).sort(),h=p(e);if(h&&n.has(h)&&c.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of c){const s=u(e,i),o=u(t,i);let n;if((m||"function"!=typeof s&&"function"!=typeof o)&&s!==o&&(null!=s||null!=o)){if(r&&r[i]&&"function"==typeof r[i])n=r[i]?.(s,o);else if(s instanceof Date&&o instanceof Date){if(s.getTime()===o.getTime())continue;n={type:"complete",oldValue:s,newValue:o}}else n="object"==typeof s&&"object"==typeof o&&p(s)===p(o)?d(s,o):{type:"complete",oldValue:s,newValue:o};null!=n&&(null!=f?f.diff[i]=n:f={type:"partial",diff:{[i]:n}})}}return f}function y(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function c(e,t){for(const r of t)if(y(e,r))return!0;return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>g,HH:()=>n,JR:()=>h,TC:()=>l,Tn:()=>d,Ue:()=>s,al:()=>o,bZ:()=>f,cS:()=>c,dp:()=>u,fS:()=>b,is:()=>m,op:()=>p,pp:()=>a,t8:()=>y});var i=r(6570);function s(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,n,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=o,l[5]=n,l}function n(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(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 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[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}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[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(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 p(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 d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function c(e){return e?y(e,g):s(g)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function b(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];s()},54295:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(43697),s=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},7944:(e,t,r)=>{r.d(t,{O:()=>g});var i=r(43697),s=r(3172),o=r(30175),n=r(95330),l=r(17452),a=r(23670),u=r(5600),p=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),y=r(31263),c=r(6570),h=r(82971),f=r(66677),m=r(21506),b=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),l=!!t.exportTilesAllowed,u=r.includes("tilemap"),p=r.includes("data"),d="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),c="tile"!==i,h=t.cimVersion&&a.G.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:l,supportsIdentify:o,supportsQuery:p,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:s,supportsSublayerVisibility:d,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:l?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.Fj)(this.portalItem)&&e.originIdOf("url")<y.s3.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,l.v_)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.Z)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.s3.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,f.Qc)(i)?.sublayer??r.mapLayerId;o=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),i=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.Z)((0,l.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),a=await i;if((0,n.k_)(t),"result"in a)return a.result;throw a.error}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,p.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:c.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)(m.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,d.j)("esri.layers.mixins.ArcGISMapService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(43697),s=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var i=r(43697),s=r(92604),o=r(95330),n=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),p=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const y=new p.Z,c=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,b=0;function g(){const e=Date.now();let t=!1;for(const r of y){const i=r.deref();i?i.refreshInterval&&e-(c.get(i)??0)+5>=6e4*i.refreshInterval&&(c.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const i=r.deref();i&&(t=f(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?c.get(i)||c.set(i,e):c.delete(i))}if(t!==b){if(b=t,clearInterval(m),0===b)return void(m=0);m=setInterval(g,b)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,i._)([(0,n.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var i=r(43697),s=r(46791),o=r(57435),n=r(20102),l=r(92604),a=r(17445),u=r(5600),p=(r(75215),r(67676),r(80442),r(1153)),d=r(52011),y=r(31263),c=r(49867),h=r(32073);const f=l.Z.getLogger("esri.layers.TileLayer"),m=s.Z.ofType(c.Z);function b(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&b(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.s3.SERVICE]:{},[y.s3.PORTAL_ITEM]:{},[y.s3.WEB_SCENE]:{},[y.s3.WEB_MAP]:{}},this.addHandles((0,a.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),a.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.M9)(t.origin);if(i<y.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,p.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new m(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.M9)("web-document"===e?"web-map":e);let r=y.s3.SERVICE,i=this.sublayersSourceJSON[y.s3.SERVICE].layers,s=this.sublayersSourceJSON[y.s3.SERVICE].context,o=null;const n=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const l=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e>r&&e<=t));let a=null;for(const e of l){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(a={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new c.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),p=new Map,d=new Set;if(a)for(const e of a.layers)p.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)d.add(e);return b(u,(e=>{a&&e.read(p.get(e.id),a.context),o&&e.read({defaultVisibility:d.has(e.id)},o.context)})),{origin:(0,y.x3)(r),sublayers:new m({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(c.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,d.j)("esri.layers.mixins.SublayersOwner")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(35454),n=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const d=p},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),d=r(70082);let y=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[d.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],y);const c=y},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var i,s=r(43697),o=r(35454),n=r(96674),l=r(5600),a=r(75215),u=(r(67676),r(80442),r(36030)),p=r(71715),d=r(52011),y=r(72729),c=r(86719);const h=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends n.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],f.prototype,"description",void 0),(0,s._)([(0,p.r)("description")],f.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:y.V5,json:{read:{reader:y.im},write:!0}})],f.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,s._)([(0,u.J)(c.v)],f.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],f.prototype,"valueType",void 0),(0,s._)([(0,p.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,s._)([(0,d.j)("esri.layers.support.Field")],f);const m=f},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(20102),s=r(96674),o=r(92604),n=r(69165),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],y(e))}static fromLayerJSON(e){return new a(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,i=p(t);if(t&&i){const s=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,n.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,n.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,n.Dl)(e)||(0,n.Se)(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,n.Dl)(e)||(0,n.Se)(e)||e.nullable||void 0!==(0,n.os)(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(u(e))??this._normalizedFieldsMap.get(p(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?(o.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):d.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,n.sX)(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,s.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function p(e){return(0,n.q6)(e)?.toLowerCase()??""}const d=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:i,editFieldsInfo:s}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",n=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,p=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,l.Jv)(s.dateFieldsTimeReference):a??l.pt:null,y=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,l.Jv)(i.timeReference):a:null,c=new Map([[u(s?.creationDateField??""),p],[u(s?.editDateField??""),p],[u(o),y],[u(n),y]]);for(const{name:i,type:s}of e.fields)if(d.has(s))t.set(i,l._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,l._4);else{const e=c.get(u(i??""))??a;t.set(i,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>p});var i,s=r(43697),o=r(46791),n=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let u=i=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],u);const p=u},49867:(e,t,r)=>{r.d(t,{Z:()=>$});var i,s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),l=r(3172),a=r(9790),u=r(46791),p=r(20102),d=r(80442),y=r(10699),c=r(22974),h=r(83379),f=r(92604),m=r(16453),b=r(42033),g=r(17452),v=r(5600),S=r(90578),w=r(71715),_=r(52011),I=r(30556),C=r(75215),F=r(31263),T=r(1153),x=r(49735),E=r(16451),O=r(1231),A=r(99514),L=r(54306),D=r(30707),M=r(56765),j=r(54275),R=r(10158),P=r(42843),V=r(56545),N=r(14165),Z=r(32163),q=r(6570),Q=r(86973);function z(e){return null!=e&&"esriSMS"===e.type}function k(e,t,r){const i=this.originIdOf(t)>=(0,F.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function B(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.M9)(r.origin)||this._isOverridden(t))}}function J(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function U(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.M9)(r.origin))}}let G=0;const H=new Set;H.add("layer"),H.add("parent"),H.add("loaded"),H.add("loadStatus"),H.add("loadError"),H.add("loadWarnings");let W=i=class extends((0,m.R)((0,y.IG)(h.Z))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new p.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,l.Z)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s},data:{supportsAttachment:o}}=(0,j.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:o},query:{supportsFormatPBF:s}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new A.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??G++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,C.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:i}=this,s=(0,d.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new x.Z({url:this.url,pbfSupported:s,fieldsIndex:i,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,a.dU)(t)){f.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new P.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,C.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,g.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,T.vw)(this),t=new i;return(0,T.vw)(t).store=e.clone(H),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,Z.eZ)(this,e)}createQuery(){return new N.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(6404),r.e(4680),r.e(9238)]).then(r.bind(r,19238))).default,{layer:t,url:i}=this;let s;if(i&&this.originIdOf("url")>F.s3.SERVICE)s=new e({url:i});else{if(!t?.parsedUrl)throw new p.Z("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;s=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(s.refreshInterval=t.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,c.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>F.s3.SERVICE&&(s.labelingInfo=(0,c.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.s3.DEFAULTS&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.s3.DEFAULTS&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.s3.DEFAULTS&&(s.visible=this.visible),this.originIdOf("minScale")>F.s3.DEFAULTS&&(s.minScale=this.minScale),this.originIdOf("maxScale")>F.s3.DEFAULTS&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>F.s3.DEFAULTS&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>F.s3.DEFAULTS&&(s.popupTemplate=(0,c.d9)(this.popupTemplate)),this.originIdOf("renderer")>F.s3.SERVICE&&(s.renderer=(0,c.d9)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.s3.DEFAULTS&&(s.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>F.s3.DEFAULTS&&(s.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>F.s3.DEFAULTS&&(s.customParameters=t.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=V.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new p.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:l,start:a,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||l?.length>0||n||a||u))throw new p.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new p.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,b._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>F.s3.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>F.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.s3.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&f.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,D.a)(this.labelingInfo,Q.M.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>F.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)z(e.symbol)&&t(e.symbol);"symbol"in e&&z(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&z(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const n=(0,T.vw)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(f.Z.getLogger(this).error(new p.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;f.Z.getLogger(i).error(new p.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===J||e===k,isTileImageLayerOverridePolicy:e=>e===B},(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,s._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),(0,s._)([(0,v.Cb)()],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,v.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:k}}})],W.prototype,"definitionExpression",null),(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,s._)([(0,w.r)("service","maxScaleRange",["minScale","maxScale"])],W.prototype,"readMaxScaleRange",null),(0,s._)([(0,v.Cb)({type:[O.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"fieldsIndex",null),(0,s._)([(0,v.Cb)({type:M.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:k},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),(0,s._)([(0,v.Cb)({type:q.Z,json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,v.Cb)({type:Q.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:Q.M.read}}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,v.Cb)({type:String})],W.prototype,"globalIdField",void 0),(0,s._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,v.Cb)({type:C.z8,json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),(0,s._)([(0,v.Cb)({value:null,type:[L.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:J}}})],W.prototype,"labelingInfo",null),(0,s._)([(0,I.c)("labelingInfo")],W.prototype,"writeLabelingInfo",null),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:J}}})],W.prototype,"labelsVisible",null),(0,s._)([(0,v.Cb)({value:null})],W.prototype,"layer",null),(0,s._)([(0,v.Cb)({type:String,json:{write:{overridePolicy:B}}})],W.prototype,"layerItemId",void 0),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:U}}})],W.prototype,"legendEnabled",void 0),(0,s._)([(0,v.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),(0,s._)([(0,v.Cb)({type:Number,value:0,json:{write:{overridePolicy:J}}})],W.prototype,"minScale",null),(0,s._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),(0,s._)([(0,v.Cb)({type:Number,value:0,json:{write:{overridePolicy:J}}})],W.prototype,"maxScale",null),(0,s._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),(0,s._)([(0,v.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,v.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:J}}})],W.prototype,"opacity",null),(0,s._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),(0,s._)([(0,I.c)("opacity")],W.prototype,"writeOpacity",null),(0,s._)([(0,v.Cb)({json:{type:C.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:J}}})],W.prototype,"parent",void 0),(0,s._)([(0,I.c)("parent")],W.prototype,"writeParent",null),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:U,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),(0,s._)([(0,v.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:U}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"queryTask",null),(0,s._)([(0,v.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:J},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:J}}}}})],W.prototype,"renderer",null),(0,s._)([(0,v.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":R.n,"map-layer":P.R}},cast(e){if(e){if("mapLayerId"in e)return(0,C.TJ)(P.R,e);if("dataSource"in e)return(0,C.TJ)(R.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:J}}})],W.prototype,"source",null),(0,s._)([(0,v.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,v.Cb)({value:null,json:{type:[C.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:J}}})],W.prototype,"sublayers",null),(0,s._)([(0,S.p)("sublayers")],W.prototype,"castSublayers",null),(0,s._)([(0,I.c)("sublayers")],W.prototype,"writeSublayers",null),(0,s._)([(0,v.Cb)({type:String,json:{name:"name",write:{overridePolicy:U}}})],W.prototype,"title",void 0),(0,s._)([(0,w.r)("service","title",["name","layerDefinition.name"])],W.prototype,"readTitle",null),(0,s._)([(0,v.Cb)({type:String})],W.prototype,"typeIdField",void 0),(0,s._)([(0,v.Cb)({json:{read:!1},readOnly:!0,value:"sublayer"})],W.prototype,"type",void 0),(0,s._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),(0,s._)([(0,v.Cb)({type:[E.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),(0,s._)([(0,v.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:B}}})],W.prototype,"url",null),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:J}}})],W.prototype,"visible",null),(0,s._)([(0,I.c)("visible")],W.prototype,"writeVisible",null),W=i=(0,s._)([(0,_.j)("esri.layers.support.Sublayer")],W);const $=W},72729:(e,t,r)=>{r.d(t,{im:()=>C,V5:()=>I}),r(80442);var i,s=r(43697),o=r(22974),n=r(5600),l=(r(75215),r(36030)),a=r(52011),u=r(96674);r(67676);let p=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,n.Cb)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],p);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,l.J)(d)],y.prototype,"type",void 0),y=(0,s._)([(0,a.j)("esri.layers.support.Domain")],y);const c=y;var h;let f=h=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,n.Cb)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=h=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var b;r(92604),r(20102);let g=b=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,s._)([(0,l.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=b=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],g);const v=g;var S;let w=S=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,n.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,n.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=S=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const _=w,I={key:"type",base:c,typeMap:{range:w,"coded-value":m,inherited:v}};function C(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var i=r(20102),s=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),o}async function n(e,t,r,o,n){let l;try{l=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.k_)(n),l}},54275:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),s=r(66677);function o(e,t,r){return!!l(e,t,r)}function n(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function p(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:f(e),operations:m(e.capabilities,e,t),query:b(e,t),queryRelated:g(e),queryTopFeatures:v(e),editing:S(e)}}function y(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:p(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,s.Qc)(r):null,l=i.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),a=i.includes("editing")&&!t.datesInUnknownTimezone;let u=a&&i.includes("create"),p=a&&i.includes("delete"),d=a&&i.includes("update");const y=i.includes("changetracking"),c=t.advancedQueryCapabilities;return a&&!(u||p||d)&&(u=p=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:a,supportsChangeTracking:y,supportsQuery:l,supportsQueryAnalytics:o(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function b(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,i.Z)("mapserver-pbf-version-support"),h=(0,s.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:u(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(l,"allowOthersToQuery",!0),supportsHistoricMoment:o(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||p(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function g(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:p(t,"queryRelated")}}function v(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryTopFilter")}}function S(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>s,ac:()=>l});var i=r(31263);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>i.s3.SERVICE||e.originIdOf("labelingInfo")>i.s3.SERVICE||e.originIdOf("opacity")>i.s3.SERVICE||e.originIdOf("labelsVisible")>i.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function l(e){return!!e&&e.some((e=>null!=e.minScale||null!=e.layerDefinition?.minScale))}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),o=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),d=(r(75215),r(71715)),y=r(52011),c=r(30556),h=r(82971),f=r(33955),m=r(1231);const b=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends a.wq{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=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}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 i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({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 i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.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:[i,s],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o: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 i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(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),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,d.r)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,c.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,d.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:h.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,c.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,y.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const v=g},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>a,lF:()=>n,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={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},a={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},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|