@arcgis/core 4.24.0-next.20220410 → 4.24.0-next.20220411

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.
@@ -1 +1 @@
1
- var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i}),r(80442);var n,o=r(78286),s=r(17202);const i={apiKey:void 0,applicationUrl:null==(n=globalThis.location)?void 0:n.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,o.RH)(i,globalThis.esriConfig,!0),delete i.has),!i.assetsPath){const e="4.24.0";i.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}i.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(i,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),i.request.corsEnabledServers=[],i.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof o&&(this.message=t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(function(e,r){if(""===r)return"$";const o=(0,n.hS)(r,t),s=null==o?"":o;if(void 0===s)throw new Error(`could not find key "${r}" in template`);return s.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*n._m:e}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>m,Od:()=>y,SO:()=>d,Vx:()=>i,a9:()=>u,cq:()=>p,e$:()=>b,e5:()=>a,fS:()=>s,w6:()=>f,zG:()=>c});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){let r=e.length!==t.length;e.length=t.length;for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function a(e,t,r){let n,o;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),o=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),o=e.filter((e=>!t.includes(e)))),{added:n,removed:o}}function c(e){return e&&"number"==typeof e.length}const l=!!Array.prototype.fill;function u(e,t){if(l)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function f(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function b(e,t,r,n){const o=null==r?e.length:r,s=p(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const g=new Set;function m(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);o=o||h;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function y(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{IH:()=>s,on:()=>o,vT:()=>n})},80442:(e,t,r)=>{"use strict";var n,o;let s;var i,a;function c(e){return"function"==typeof s[e]?s[e]=s[e](globalThis):s[e]}r.d(t,{Z:()=>c}),s=null!=(n=globalThis.dojoConfig)&&n.has||null!=(o=globalThis.esriConfig)&&o.has?{...null==(i=globalThis.dojoConfig)?void 0:i.has,...null==(a=globalThis.esriConfig)?void 0:a.has}:{},c.add=(e,t,r,n)=>((n||void 0===s[e])&&(s[e]=t),r&&c(e)),c.cache=s,c.add("esri-deprecation-warnings",!0),(()=>{var e;c.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(c.add("host-browser",t),c.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),c.add("dom",t),c("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(c.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),c.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),c.add("khtml",r.includes("Konqueror")?n:void 0),c.add("edge",parseFloat(t.split("Edge/")[1])||void 0),c.add("opr",parseFloat(t.split("OPR/")[1])||void 0),c.add("webkit",!c("wp")&&!c("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),c.add("chrome",!c("edge")&&!c("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),c.add("android",!c("wp")&&parseFloat(t.split("Android ")[1])||void 0),c.add("safari",!r.includes("Safari")||c("wp")||c("chrome")||c("android")||c("edge")||c("opr")?void 0:parseFloat(r.split("Version/")[1])),c.add("mac",r.includes("Macintosh")),!c("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));c.add(e,n),c.add("ios",n)}c.add("trident",parseFloat(r.split("Trident/")[1])||void 0),c("webkit")||(!t.includes("Gecko")||c("wp")||c("khtml")||c("trident")||c("edge")||c.add("mozilla",n),c("mozilla")&&c.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&c.add("esri-mobile",t),r&&c.add("esri-iPhone",r),c.add("esri-geolocation",!!navigator.geolocation)}c.add("esri-canvas-svg-support",!c("trident")),c.add("esri-wasm","WebAssembly"in globalThis),c.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),c.add("esri-atomics","Atomics"in globalThis),c.add("esri-workers","Worker"in globalThis),c.add("web-feat:cache","caches"in globalThis),c.add("esri-workers-arraybuffer-transfer",!c("safari")||Number(c("safari"))>=12),c.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),c.add("featurelayer-simplify-payload-size-factors",[1,1,4]),c.add("featurelayer-snapshot-enabled",!0),c.add("featurelayer-snapshot-point-min-threshold",8e4),c.add("featurelayer-snapshot-point-max-threshold",4e5),c.add("featurelayer-snapshot-point-coverage",.1),c.add("featurelayer-advanced-symbols",!1),c.add("featurelayer-pbf",!0),c.add("featurelayer-pbf-statistics",!1),c.add("feature-layers-workers",!0),c.add("feature-polyline-generalization-factor",1),c.add("mapview-transitions-duration",200),c.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),c.add("mapserver-pbf-enabled",!1),c.add("mapimagelayer-popup-identify",!0),c.add("mapimagelayer-popup-identify-max-tolerance",20),c("host-webworker")||c("host-browser")&&(c.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),c.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{c.add("esri-image-decode",!0,!0,!0)})).catch((()=>{c.add("esri-image-decode",!1,!0,!0)}))}return!1})),c.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>d,yd:()=>s}),r(67676),r(80442);var n=r(70586),o=r(1533);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=a(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if((0,o.W0)(e)||(0,o.lq)(e)||(0,o.KZ)(e)||(0,o.z3)(e)||(0,o.Uc)(e)||(0,o.Hx)(e)||(0,o.ZY)(e)||(0,o.xZ)(e)||(0,o.fS)(e))return(0,o.tP)(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;return e.forEach(((e,r)=>{t.set(r,i(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(i(e))})),t}return null}function d(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e){return void 0===e}function i(e,t){return n(e)?t(e):null}function a(e){return e}function c(e,t){if(o(e))throw new Error(t);return e}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.release(),null}function b(e){return null}function g(e,t){const r=new Array;for(const n of e)r.push(y(n,null,t));return r}function m(e,t){for(const r of e)i(r,t)}function y(e,t,r){return n(e)?r(e):t}function v(e){return e.filter((e=>n(e)))}function w(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function _(e){return e}r.d(t,{Bd:()=>b,Fd:()=>g,JR:()=>m,O3:()=>d,Pt:()=>l,R2:()=>y,RY:()=>p,SC:()=>f,U2:()=>w,Wg:()=>a,Wi:()=>o,hw:()=>h,j0:()=>_,lV:()=>v,o8:()=>s,pC:()=>n,s3:()=>c,yl:()=>u,yw:()=>i})},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>o,hS:()=>s});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce((function(e,o){let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{s.includes(e)||s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>C,$6:()=>c,Ue:()=>l,zE:()=>u,dD:()=>_,hh:()=>x,vr:()=>T,Ds:()=>j,as:()=>O,WW:()=>k,R8:()=>w,D_:()=>v,Hc:()=>h,y8:()=>E,fu:()=>g,$F:()=>m,d1:()=>P,DB:()=>S,r9:()=>p,k_:()=>f,H9:()=>b,Yn:()=>M,gx:()=>A,Hl:()=>y});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o,s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e){return Promise.all(e)}function l(e){return new Promise(((t,r)=>{try{e(t,r)}catch(e){Promise.resolve().then((()=>r(e)))}}))}function u(e="Aborted"){return new s.Z("AbortError",e)}function f(e,t="Aborted"){if(h(e))throw u(t)}function d(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function h(e){const t=d(e);return(0,a.pC)(t)&&t.aborted}function p(e){if(v(e))throw e}function b(e){if(!v(e))throw e}function g(e,t){const r=d(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function m(e,t){const r=d(e);if(!(0,a.Wi)(r))return f(r),(0,i.IH)(r,"abort",(()=>t(u())))}function y(e,t){const r=d(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=g(t,(()=>n(u())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function v(e){return e&&"AbortError"===e.name}function w(e){return e.catch((e=>{if(!v(e))throw e}))}function _(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}function O(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return O(t.map((t=>e[t]))).then((e=>{const r={};return t.forEach(((t,n)=>r[t]=e[n])),r}))}const t=e;return l((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}function k(e){return O(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function P(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function C(e,t,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);g(n,(()=>{s&&(clearTimeout(s),o(u()))}))}))}function E(e){return e&&"function"==typeof e.then}function A(e){return E(e)?e:Promise.resolve(e)}function j(e,t=-1){let r,n,o,s,i=null;const c=(...l)=>{if(r){n=l,s&&s.reject(u()),s=_();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||_(),s=null,t>0){const n=new AbortController;r=A(e(...l,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=A(e(...l));const f=()=>{const e=n;n=o=r=i=null,null!=e&&c(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return c}function x(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function T(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,a.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=g(t,(()=>{(0,a.pC)(s)&&s.abort()})),s}function M(e){return Promise.resolve().then((()=>{f(e)}))}},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return null==e?"":e}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function o(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const n=Math.max(0,r-t),o=new(0,e.constructor)(n);for(let r=0;r<n;r++)o[r]=e[t+r];return o}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function i(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function a(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function c(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function l(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function u(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function f(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function d(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function h(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function p(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,Hx:()=>f,KZ:()=>c,Uc:()=>u,W0:()=>i,ZY:()=>d,eP:()=>s,fS:()=>p,lq:()=>a,tP:()=>o,xZ:()=>h,z3:()=>l})},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ne,AH:()=>Q,B7:()=>E,D6:()=>U,Fv:()=>Z,HK:()=>K,Hu:()=>de,Ie:()=>ue,L:()=>k,Ml:()=>be,P$:()=>D,PF:()=>F,Qj:()=>le,R9:()=>y,TI:()=>O,YP:()=>H,Yd:()=>ae,ZN:()=>he,_l:()=>X,b7:()=>A,ed:()=>I,fl:()=>pe,hF:()=>q,hO:()=>oe,io:()=>ee,jc:()=>z,kl:()=>L,mN:()=>P,oC:()=>te,oh:()=>W,qg:()=>j,rS:()=>V,sJ:()=>Y,tD:()=>$,tm:()=>N,u0:()=>S,v_:()=>B,vt:()=>ce});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const v={};let w=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(w.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${w.scheme}://${w.host}${null!=w.port?`:${w.port}`:""}${t}`}();const O=()=>w,k=()=>_;function P(e){const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function E(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function A(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=I(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),P(r)}function j(e){const t=I(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=P(e);e=r+"?"+t.path;const o=E({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function T(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function I(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function N(e,t){return e=R(e),t=R(t),ie(e)===ie(t)}function R(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function W(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function U(e,t,r=!1){const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function L(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(U(e,w))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(U(e,n[t]))return!0}return!1}function J(e){return v[e]||(re(e)||te(e)?v[e]=[new y(q(e))]:v[e]=[new y(`http://${e}`),new y(`https://${e}`)]),v[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===w.scheme&&w.authority===D(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(B("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=_,r){if(!H(e))return e;const n=Z(e),o=n.toLowerCase(),s=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function Z(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===w.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===w.scheme&&n===w.authority&&!b.test(e)||(se()&&n===w.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!I(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=T(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function B(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function D(e,t=!1){if(z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return"data:"===e.slice(0,5)}function Q(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function V(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function re(e){return u.test(e)}function ne(e){return d.test(e)||"https"===w.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===w.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=P(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(null==t||!t.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=w.scheme),e)}function de(e,t){const r=P(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=P(e),o=n.query||{};return o[t]=String(r),`${n.path}?${E(o)}`}function pe(e,t){const r=P(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=E(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(ge);return t?t[1]:null}const ge=/.*?\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5406),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(4478)]).then(r.bind(r,14478)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6481),r.e(6459),r.e(7996)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(6208)]).then(r.bind(r,2255)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(4325),r.e(1684)]).then(r.bind(r,70299)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6347)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(176),r.e(2398),r.e(7282)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,c.jt)();return new Promise(((r,o)=>{const c=(0,a.$F)(n,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),this._processWork(),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),o((0,a.zE)()))})),l={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(i,l),this._post({type:h,jobId:i,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,deferred:o}=e;this.invoke(t,r,n).then((e=>o.resolve(e))).catch((e=>o.reject(e)))}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e).type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:r,error:n,data:s}=e,i=this._outJobs;if(!i.has(r))return;const a=i.get(r);this._processWork(),i.delete(r),null==(t=a.abortHandle)||t.remove(),n?a.reject(o.Z.fromJSON(JSON.parse(n))):a.resolve(s)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>c,Cs:()=>n,QM:()=>u,jt:()=>a,oi:()=>l});var n,o,s=r(80442);(o=n||(n={}))[o.HANDSHAKE=0]="HANDSHAKE",o[o.OPEN=1]="OPEN",o[o.OPENED=2]="OPENED",o[o.RESPONSE=3]="RESPONSE",o[o.INVOKE=4]="INVOKE",o[o.ABORT=5]="ABORT",o[o.CLOSE=6]="CLOSE",o[o.OPEN_PORT=7]="OPEN_PORT",o[o.ON=8]="ON";let i=0;function a(){return i++}function c(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function l(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let s;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(s=f(o),t.data=r):(s=f(r.transferList),t.data=r.result),s?e.postMessage(t,s):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function f(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,Nv:()=>i,i8:()=>s,id:()=>a,qh:()=>c});var n=r(80442),o=r(17452);const s="4.24",i={async request(e,t){var n;const{default:s}=await r.e(3172).then(r.bind(r,3172)),i=e.options,a=i.responseType;i.signal=null==t?void 0:t.signal,i.responseType="native"===a||"native-request-init"===a?"native-request-init":["blob","json","text"].includes(a)&&null!=(n=(0,o.oh)(e.url))&&n.after?a:"array-buffer";const c=await s(e.url,i),l={data:c.data,ssl:c.ssl};switch(c.requestOptions.responseType){case"native-request-init":return delete l.data.signal,l;case"blob":l.data=await l.data.arrayBuffer();break;case"json":l.data=(new TextEncoder).encode(JSON.stringify(l.data)).buffer;break;case"text":l.data=(new TextEncoder).encode(l.data).buffer}return{result:l,transferList:[l.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>n});const n="20220410",o="bc67d603609a81fad35c33dfd01d933fceb781c7"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{24:"5e6d62f93d5678aae0d6",86:"b03f88c6b7665c6e9ba4",176:"3f0579470ee59fa1d3e3",214:"3fce331c4b3f8ed9d26a",223:"2b3549adc1acd27b09e6",247:"b24a76738482ebfc626f",280:"714d5c5731cdeef11995",368:"8ac516a4bc47987e186c",565:"0018053ac16a09feba70",576:"812a5abfadd747a09b6f",609:"ea86de5ea29a106afcc7",635:"2d42711a629384144625",639:"4312902ab6e42fbe119b",678:"9225a7a6729fea8c652c",819:"5d3e774ce7b006c8cba8",999:"ad37a1b91137e095e624",1188:"cf2ce08bf9fe46336971",1197:"390bacc25c779d46b0bf",1298:"a97497d38f836a20f7d6",1400:"b1188ca77b975c6a7d92",1412:"c59b0b58e24e6a60cf3e",1421:"770cf0a66102100abe74",1433:"52489e2f7748dc610263",1489:"49b327523a43232b3b18",1534:"6ef8de3aa9a8d9c22161",1562:"d0ce6c04628c831ac431",1684:"f5ae00ace83606201d02",1773:"bd50ec30688463b821d1",1785:"86ad6b020c01850d9095",1916:"5b237dd947ae4c4b0c51",2133:"528033aa0d663b4d41bf",2134:"a3db91d04fe1fca0fe4f",2279:"5d8afa7f2bd3df0027e1",2304:"102f427e95e18efd3ecb",2397:"f4b37a1b00ef2d4b47f6",2398:"72bf2d65c688fa38f1bf",2399:"467b5faa1c90d9821609",2460:"5687474e19f99225f48e",2515:"d4a2f4faee1e92303dce",2664:"0e5412d8474b41e06914",3003:"bc8c7132745724e513b2",3027:"9c4d41f20c1a94147344",3121:"032d776643a95b9d2d72",3127:"586ede983ab00d69fd1f",3172:"d6e32ca237ad9309c76a",3230:"8afd344871a8aff78f22",3388:"c7cee13a962396b23a5e",3529:"1493d8d60615ae31a5c7",3668:"bf06b8cf6c7785ff6a58",3852:"f60bbd47e9376e8b10f6",4166:"863cfe35ee640bac103f",4325:"cfbb332d144e65a4a55d",4358:"5c334b4a40c2c5f7e5ad",4369:"72483a52f82861441832",4475:"8c50af01668496e1fec2",4478:"4bce446391176a9d4588",4499:"4df9dfa80dbbae9b743d",4547:"718073d13d3de67b629b",4695:"515c1c055666ff4740f3",4720:"794b47764ebb0257ed41",4889:"28a5878cbe5880476855",4959:"2c285c0da046f8436228",5235:"dc5b6b7f9a61f8d4d216",5257:"44e95e87bd9e820aeb53",5307:"c151bff7f6db1e4abdfd",5313:"8e4dd5f46c5279bb5ba9",5329:"6a4fc1bea4ae5f09072a",5406:"79ec28b3e3c57fe026aa",5410:"0c9682de35631389e3bc",5511:"cfff8dea41436c9f82b9",5517:"4b643f501819a7df2f69",5823:"ad8dc611db5884d5dd04",5837:"49baead4baf2766a2ae7",5853:"6f01905936396fe87865",5886:"411b7777bb5e943c156f",5974:"cc3fc0b8147bdadc6bdc",6088:"8494eab169cde7056950",6101:"ccb626429247093dfc7d",6208:"742163eeb9e820fb2145",6233:"9c4c721d890b49697132",6237:"c544df83e86a9d36b68c",6347:"c7bd5a4d318299388645",6459:"e9f786d4ba3143ed9644",6481:"9bc14d9f91895ce17d15",6550:"1dd48efcec782172d704",6619:"46ad3255bb3f5be60cd4",6690:"091c60750f75d52d07b6",6710:"b577ec80647cf2ece397",6748:"a33dec821eb0ee6242e0",6774:"af3766a2d27419c7766c",6785:"4810edf605838d07e5c5",6810:"747faba8ce2b7a0be50c",6841:"b426f7b4c3dc60a366f6",6968:"f490b203dad4f2eef552",7039:"d121fa4dbc49f39d78bf",7054:"404f1d7bce014c7e6965",7055:"b36068341e0cd79e7a75",7277:"125b14c2ccd96d7c20c2",7282:"cee7ce362860717713bf",7319:"4617fd92937246069544",7572:"b055ae7c54796751b64c",7604:"b34ba22c7a5adce8a7a2",7612:"eb204e6e22bda3d1a4cf",7682:"fde6e26af42911e49e58",7693:"f22616ef2a94990a049e",7845:"1036121e7939e134ce38",7873:"93eb468381bfcf0e47d7",7913:"4e1e997a5a31875e7af5",7923:"8a5ff16ace69c6d89608",7996:"87458fbf395338511662",8008:"8bea684786e0f3de54b1",8014:"8958cd555f4887526e8b",8062:"d3b6efcb520c649796fa",8096:"d84ef157eae5e206dcf3",8163:"31c1ae0532dd991da63d",8227:"76b424b6d2c1ef089324",8234:"03ee49f9c0d3c7c696a2",8297:"e8ccbee7080cd0b026f8",8326:"3b5c7c2ceb441ad06499",8422:"27216e60b82b657fc157",8758:"88193e61072d7bf957f5",8828:"13b04d5bf348ab5054c2",8927:"d5fd12ea541c1a6b7fce",8936:"9b9821772b6cbe189fe0",9032:"9df2f9f7c28b31866be8",9070:"417ee7a88575cb8f9aaf",9127:"43ae1086de9a0c30e6a1",9151:"d076627bb7dadea89e89",9153:"9c6be39f1f21ab8b1c2d",9169:"cda2b237cbef22f688fa",9254:"3ae2827e8d55d6713d20",9291:"7a375432552c47964ecc",9296:"3273b6be43eeb49ee842",9490:"8fcabb9332d1d425e64f",9662:"b26bd8fde2fc65bb67fb",9754:"40d36e4d293811cf52d5",9870:"2530e8ccf6e12787ce76",9884:"356db8b8297282c77291",9932:"8b133f733997b04aa447",9941:"5d5e7f42b93b5415b3a2",9989:"7fa38b706bce6c45f5ea"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
1
+ var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i}),r(80442);var n,o=r(78286),s=r(17202);const i={apiKey:void 0,applicationUrl:null==(n=globalThis.location)?void 0:n.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,o.RH)(i,globalThis.esriConfig,!0),delete i.has),!i.assetsPath){const e="4.24.0";i.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}i.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(i,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),i.request.corsEnabledServers=[],i.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof o&&(this.message=t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(function(e,r){if(""===r)return"$";const o=(0,n.hS)(r,t),s=null==o?"":o;if(void 0===s)throw new Error(`could not find key "${r}" in template`);return s.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*n._m:e}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>m,Od:()=>y,SO:()=>d,Vx:()=>i,a9:()=>u,cq:()=>p,e$:()=>b,e5:()=>a,fS:()=>s,w6:()=>f,zG:()=>c});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){let r=e.length!==t.length;e.length=t.length;for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function a(e,t,r){let n,o;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),o=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),o=e.filter((e=>!t.includes(e)))),{added:n,removed:o}}function c(e){return e&&"number"==typeof e.length}const l=!!Array.prototype.fill;function u(e,t){if(l)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function f(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function b(e,t,r,n){const o=null==r?e.length:r,s=p(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const g=new Set;function m(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);o=o||h;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function y(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{IH:()=>s,on:()=>o,vT:()=>n})},80442:(e,t,r)=>{"use strict";var n,o;let s;var i,a;function c(e){return"function"==typeof s[e]?s[e]=s[e](globalThis):s[e]}r.d(t,{Z:()=>c}),s=null!=(n=globalThis.dojoConfig)&&n.has||null!=(o=globalThis.esriConfig)&&o.has?{...null==(i=globalThis.dojoConfig)?void 0:i.has,...null==(a=globalThis.esriConfig)?void 0:a.has}:{},c.add=(e,t,r,n)=>((n||void 0===s[e])&&(s[e]=t),r&&c(e)),c.cache=s,c.add("esri-deprecation-warnings",!0),(()=>{var e;c.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(c.add("host-browser",t),c.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),c.add("dom",t),c("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(c.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),c.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),c.add("khtml",r.includes("Konqueror")?n:void 0),c.add("edge",parseFloat(t.split("Edge/")[1])||void 0),c.add("opr",parseFloat(t.split("OPR/")[1])||void 0),c.add("webkit",!c("wp")&&!c("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),c.add("chrome",!c("edge")&&!c("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),c.add("android",!c("wp")&&parseFloat(t.split("Android ")[1])||void 0),c.add("safari",!r.includes("Safari")||c("wp")||c("chrome")||c("android")||c("edge")||c("opr")?void 0:parseFloat(r.split("Version/")[1])),c.add("mac",r.includes("Macintosh")),!c("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));c.add(e,n),c.add("ios",n)}c.add("trident",parseFloat(r.split("Trident/")[1])||void 0),c("webkit")||(!t.includes("Gecko")||c("wp")||c("khtml")||c("trident")||c("edge")||c.add("mozilla",n),c("mozilla")&&c.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&c.add("esri-mobile",t),r&&c.add("esri-iPhone",r),c.add("esri-geolocation",!!navigator.geolocation)}c.add("esri-canvas-svg-support",!c("trident")),c.add("esri-wasm","WebAssembly"in globalThis),c.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),c.add("esri-atomics","Atomics"in globalThis),c.add("esri-workers","Worker"in globalThis),c.add("web-feat:cache","caches"in globalThis),c.add("esri-workers-arraybuffer-transfer",!c("safari")||Number(c("safari"))>=12),c.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),c.add("featurelayer-simplify-payload-size-factors",[1,1,4]),c.add("featurelayer-snapshot-enabled",!0),c.add("featurelayer-snapshot-point-min-threshold",8e4),c.add("featurelayer-snapshot-point-max-threshold",4e5),c.add("featurelayer-snapshot-point-coverage",.1),c.add("featurelayer-advanced-symbols",!1),c.add("featurelayer-pbf",!0),c.add("featurelayer-pbf-statistics",!1),c.add("feature-layers-workers",!0),c.add("feature-polyline-generalization-factor",1),c.add("mapview-transitions-duration",200),c.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),c.add("mapserver-pbf-enabled",!1),c.add("mapimagelayer-popup-identify",!0),c.add("mapimagelayer-popup-identify-max-tolerance",20),c("host-webworker")||c("host-browser")&&(c.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),c.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{c.add("esri-image-decode",!0,!0,!0)})).catch((()=>{c.add("esri-image-decode",!1,!0,!0)}))}return!1})),c.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>a,d9:()=>i,fS:()=>d,yd:()=>s}),r(67676),r(80442);var n=r(70586),o=r(1533);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=a(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if((0,o.W0)(e)||(0,o.lq)(e)||(0,o.KZ)(e)||(0,o.z3)(e)||(0,o.Uc)(e)||(0,o.Hx)(e)||(0,o.ZY)(e)||(0,o.xZ)(e)||(0,o.fS)(e))return(0,o.tP)(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;return e.forEach(((e,r)=>{t.set(r,i(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(i(e))})),t}return null}function d(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e){return void 0===e}function i(e,t){return n(e)?t(e):null}function a(e){return e}function c(e,t){if(o(e))throw new Error(t);return e}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.release(),null}function b(e){return null}function g(e,t){const r=new Array;for(const n of e)r.push(y(n,null,t));return r}function m(e,t){for(const r of e)i(r,t)}function y(e,t,r){return n(e)?r(e):t}function v(e){return e.filter((e=>n(e)))}function w(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function _(e){return e}r.d(t,{Bd:()=>b,Fd:()=>g,JR:()=>m,O3:()=>d,Pt:()=>l,R2:()=>y,RY:()=>p,SC:()=>f,U2:()=>w,Wg:()=>a,Wi:()=>o,hw:()=>h,j0:()=>_,lV:()=>v,o8:()=>s,pC:()=>n,s3:()=>c,yl:()=>u,yw:()=>i})},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>o,hS:()=>s});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce((function(e,o){let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{s.includes(e)||s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>C,$6:()=>c,Ue:()=>l,zE:()=>u,dD:()=>_,hh:()=>x,vr:()=>T,Ds:()=>j,as:()=>O,WW:()=>k,R8:()=>w,D_:()=>v,Hc:()=>h,y8:()=>E,fu:()=>g,$F:()=>m,d1:()=>P,DB:()=>S,r9:()=>p,k_:()=>f,H9:()=>b,Yn:()=>M,gx:()=>A,Hl:()=>y});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o,s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e){return Promise.all(e)}function l(e){return new Promise(((t,r)=>{try{e(t,r)}catch(e){Promise.resolve().then((()=>r(e)))}}))}function u(e="Aborted"){return new s.Z("AbortError",e)}function f(e,t="Aborted"){if(h(e))throw u(t)}function d(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function h(e){const t=d(e);return(0,a.pC)(t)&&t.aborted}function p(e){if(v(e))throw e}function b(e){if(!v(e))throw e}function g(e,t){const r=d(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function m(e,t){const r=d(e);if(!(0,a.Wi)(r))return f(r),(0,i.IH)(r,"abort",(()=>t(u())))}function y(e,t){const r=d(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=g(t,(()=>n(u())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function v(e){return e&&"AbortError"===e.name}function w(e){return e.catch((e=>{if(!v(e))throw e}))}function _(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}function O(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return O(t.map((t=>e[t]))).then((e=>{const r={};return t.forEach(((t,n)=>r[t]=e[n])),r}))}const t=e;return l((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}function k(e){return O(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function P(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function C(e,t,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);g(n,(()=>{s&&(clearTimeout(s),o(u()))}))}))}function E(e){return e&&"function"==typeof e.then}function A(e){return E(e)?e:Promise.resolve(e)}function j(e,t=-1){let r,n,o,s,i=null;const c=(...l)=>{if(r){n=l,s&&s.reject(u()),s=_();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||_(),s=null,t>0){const n=new AbortController;r=A(e(...l,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=A(e(...l));const f=()=>{const e=n;n=o=r=i=null,null!=e&&c(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return c}function x(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function T(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,a.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=g(t,(()=>{(0,a.pC)(s)&&s.abort()})),s}function M(e){return Promise.resolve().then((()=>{f(e)}))}},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return null==e?"":e}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function o(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const n=Math.max(0,r-t),o=new(0,e.constructor)(n);for(let r=0;r<n;r++)o[r]=e[t+r];return o}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function i(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function a(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function c(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function l(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function u(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function f(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function d(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function h(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function p(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,Hx:()=>f,KZ:()=>c,Uc:()=>u,W0:()=>i,ZY:()=>d,eP:()=>s,fS:()=>p,lq:()=>a,tP:()=>o,xZ:()=>h,z3:()=>l})},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ne,AH:()=>Q,B7:()=>E,D6:()=>U,Fv:()=>Z,HK:()=>K,Hu:()=>de,Ie:()=>ue,L:()=>k,Ml:()=>be,P$:()=>D,PF:()=>F,Qj:()=>le,R9:()=>y,TI:()=>O,YP:()=>H,Yd:()=>ae,ZN:()=>he,_l:()=>X,b7:()=>A,ed:()=>I,fl:()=>pe,hF:()=>q,hO:()=>oe,io:()=>ee,jc:()=>z,kl:()=>L,mN:()=>P,oC:()=>te,oh:()=>W,qg:()=>j,rS:()=>V,sJ:()=>Y,tD:()=>$,tm:()=>N,u0:()=>S,v_:()=>B,vt:()=>ce});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const v={};let w=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(w.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${w.scheme}://${w.host}${null!=w.port?`:${w.port}`:""}${t}`}();const O=()=>w,k=()=>_;function P(e){const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function E(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function A(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=I(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),P(r)}function j(e){const t=I(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=P(e);e=r+"?"+t.path;const o=E({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function T(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function I(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function N(e,t){return e=R(e),t=R(t),ie(e)===ie(t)}function R(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function W(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function U(e,t,r=!1){const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function L(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(U(e,w))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(U(e,n[t]))return!0}return!1}function J(e){return v[e]||(re(e)||te(e)?v[e]=[new y(q(e))]:v[e]=[new y(`http://${e}`),new y(`https://${e}`)]),v[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===w.scheme&&w.authority===D(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(B("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=_,r){if(!H(e))return e;const n=Z(e),o=n.toLowerCase(),s=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function Z(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===w.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===w.scheme&&n===w.authority&&!b.test(e)||(se()&&n===w.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!I(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=T(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function B(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function D(e,t=!1){if(z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return"data:"===e.slice(0,5)}function Q(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function V(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function re(e){return u.test(e)}function ne(e){return d.test(e)||"https"===w.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===w.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=P(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(null==t||!t.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=w.scheme),e)}function de(e,t){const r=P(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=P(e),o=n.query||{};return o[t]=String(r),`${n.path}?${E(o)}`}function pe(e,t){const r=P(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=E(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(ge);return t?t[1]:null}const ge=/.*?\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5406),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(4478)]).then(r.bind(r,14478)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6481),r.e(6459),r.e(7996)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(6208)]).then(r.bind(r,2255)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(4325),r.e(1684)]).then(r.bind(r,70299)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6347)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(176),r.e(2398),r.e(7282)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,c.jt)();return new Promise(((r,o)=>{const c=(0,a.$F)(n,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),this._processWork(),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),o((0,a.zE)()))})),l={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(i,l),this._post({type:h,jobId:i,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,deferred:o}=e;this.invoke(t,r,n).then((e=>o.resolve(e))).catch((e=>o.reject(e)))}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e).type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:r,error:n,data:s}=e,i=this._outJobs;if(!i.has(r))return;const a=i.get(r);this._processWork(),i.delete(r),null==(t=a.abortHandle)||t.remove(),n?a.reject(o.Z.fromJSON(JSON.parse(n))):a.resolve(s)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>c,Cs:()=>n,QM:()=>u,jt:()=>a,oi:()=>l});var n,o,s=r(80442);(o=n||(n={}))[o.HANDSHAKE=0]="HANDSHAKE",o[o.OPEN=1]="OPEN",o[o.OPENED=2]="OPENED",o[o.RESPONSE=3]="RESPONSE",o[o.INVOKE=4]="INVOKE",o[o.ABORT=5]="ABORT",o[o.CLOSE=6]="CLOSE",o[o.OPEN_PORT=7]="OPEN_PORT",o[o.ON=8]="ON";let i=0;function a(){return i++}function c(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function l(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let s;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(s=f(o),t.data=r):(s=f(r.transferList),t.data=r.result),s?e.postMessage(t,s):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function f(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,Nv:()=>i,i8:()=>s,id:()=>a,qh:()=>c});var n=r(80442),o=r(17452);const s="4.24",i={async request(e,t){var n;const{default:s}=await r.e(3172).then(r.bind(r,3172)),i=e.options,a=i.responseType;i.signal=null==t?void 0:t.signal,i.responseType="native"===a||"native-request-init"===a?"native-request-init":["blob","json","text"].includes(a)&&null!=(n=(0,o.oh)(e.url))&&n.after?a:"array-buffer";const c=await s(e.url,i),l={data:c.data,ssl:c.ssl};switch(c.requestOptions.responseType){case"native-request-init":return delete l.data.signal,l;case"blob":l.data=await l.data.arrayBuffer();break;case"json":l.data=(new TextEncoder).encode(JSON.stringify(l.data)).buffer;break;case"text":l.data=(new TextEncoder).encode(l.data).buffer}return{result:l,transferList:[l.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>n});const n="20220411",o="1d845bc5e776cbb6e41006e1b216be92da4a166d"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{24:"5e6d62f93d5678aae0d6",86:"b03f88c6b7665c6e9ba4",176:"3f0579470ee59fa1d3e3",214:"3fce331c4b3f8ed9d26a",223:"2b3549adc1acd27b09e6",247:"b24a76738482ebfc626f",280:"714d5c5731cdeef11995",368:"8ac516a4bc47987e186c",565:"0018053ac16a09feba70",576:"812a5abfadd747a09b6f",609:"ea86de5ea29a106afcc7",635:"2d42711a629384144625",639:"4312902ab6e42fbe119b",678:"9225a7a6729fea8c652c",819:"5d3e774ce7b006c8cba8",999:"ad37a1b91137e095e624",1188:"cf2ce08bf9fe46336971",1197:"390bacc25c779d46b0bf",1298:"a97497d38f836a20f7d6",1400:"b1188ca77b975c6a7d92",1412:"c59b0b58e24e6a60cf3e",1421:"770cf0a66102100abe74",1433:"52489e2f7748dc610263",1489:"49b327523a43232b3b18",1534:"6ef8de3aa9a8d9c22161",1562:"d0ce6c04628c831ac431",1684:"f5ae00ace83606201d02",1773:"bd50ec30688463b821d1",1785:"86ad6b020c01850d9095",1916:"5b237dd947ae4c4b0c51",2133:"528033aa0d663b4d41bf",2134:"a3db91d04fe1fca0fe4f",2279:"5d8afa7f2bd3df0027e1",2304:"102f427e95e18efd3ecb",2397:"f4b37a1b00ef2d4b47f6",2398:"72bf2d65c688fa38f1bf",2399:"467b5faa1c90d9821609",2460:"5687474e19f99225f48e",2515:"d4a2f4faee1e92303dce",2664:"0e5412d8474b41e06914",3003:"bc8c7132745724e513b2",3027:"9c4d41f20c1a94147344",3121:"032d776643a95b9d2d72",3127:"586ede983ab00d69fd1f",3172:"d6e32ca237ad9309c76a",3230:"8afd344871a8aff78f22",3388:"c7cee13a962396b23a5e",3529:"1493d8d60615ae31a5c7",3668:"bf06b8cf6c7785ff6a58",3852:"f60bbd47e9376e8b10f6",4166:"863cfe35ee640bac103f",4325:"cfbb332d144e65a4a55d",4358:"5c334b4a40c2c5f7e5ad",4369:"72483a52f82861441832",4475:"8c50af01668496e1fec2",4478:"4bce446391176a9d4588",4499:"4df9dfa80dbbae9b743d",4547:"718073d13d3de67b629b",4695:"515c1c055666ff4740f3",4720:"794b47764ebb0257ed41",4889:"28a5878cbe5880476855",4959:"2c285c0da046f8436228",5235:"dc5b6b7f9a61f8d4d216",5257:"44e95e87bd9e820aeb53",5307:"c151bff7f6db1e4abdfd",5313:"8e4dd5f46c5279bb5ba9",5329:"6a4fc1bea4ae5f09072a",5406:"79ec28b3e3c57fe026aa",5410:"0c9682de35631389e3bc",5511:"cfff8dea41436c9f82b9",5517:"4b643f501819a7df2f69",5823:"ad8dc611db5884d5dd04",5837:"49baead4baf2766a2ae7",5853:"6f01905936396fe87865",5886:"411b7777bb5e943c156f",5974:"cc3fc0b8147bdadc6bdc",6088:"8494eab169cde7056950",6101:"ccb626429247093dfc7d",6208:"742163eeb9e820fb2145",6233:"9c4c721d890b49697132",6237:"c544df83e86a9d36b68c",6347:"c7bd5a4d318299388645",6459:"e9f786d4ba3143ed9644",6481:"9bc14d9f91895ce17d15",6550:"1dd48efcec782172d704",6619:"46ad3255bb3f5be60cd4",6690:"091c60750f75d52d07b6",6710:"b577ec80647cf2ece397",6748:"a33dec821eb0ee6242e0",6774:"af3766a2d27419c7766c",6785:"4810edf605838d07e5c5",6810:"747faba8ce2b7a0be50c",6841:"b426f7b4c3dc60a366f6",6968:"f490b203dad4f2eef552",7039:"d121fa4dbc49f39d78bf",7054:"404f1d7bce014c7e6965",7055:"b36068341e0cd79e7a75",7277:"125b14c2ccd96d7c20c2",7282:"cee7ce362860717713bf",7319:"4617fd92937246069544",7572:"b055ae7c54796751b64c",7604:"b34ba22c7a5adce8a7a2",7612:"eb204e6e22bda3d1a4cf",7682:"fde6e26af42911e49e58",7693:"f22616ef2a94990a049e",7845:"1036121e7939e134ce38",7873:"93eb468381bfcf0e47d7",7913:"4e1e997a5a31875e7af5",7923:"8a5ff16ace69c6d89608",7996:"87458fbf395338511662",8008:"8bea684786e0f3de54b1",8014:"8958cd555f4887526e8b",8062:"d3b6efcb520c649796fa",8096:"d84ef157eae5e206dcf3",8163:"31c1ae0532dd991da63d",8227:"76b424b6d2c1ef089324",8234:"03ee49f9c0d3c7c696a2",8297:"e8ccbee7080cd0b026f8",8326:"3b5c7c2ceb441ad06499",8422:"27216e60b82b657fc157",8758:"88193e61072d7bf957f5",8828:"13b04d5bf348ab5054c2",8927:"d5fd12ea541c1a6b7fce",8936:"9b9821772b6cbe189fe0",9032:"9df2f9f7c28b31866be8",9070:"417ee7a88575cb8f9aaf",9127:"43ae1086de9a0c30e6a1",9151:"d076627bb7dadea89e89",9153:"9c6be39f1f21ab8b1c2d",9169:"cda2b237cbef22f688fa",9254:"3ae2827e8d55d6713d20",9291:"7a375432552c47964ecc",9296:"3273b6be43eeb49ee842",9490:"8fcabb9332d1d425e64f",9662:"b26bd8fde2fc65bb67fb",9754:"40d36e4d293811cf52d5",9870:"2530e8ccf6e12787ce76",9884:"356db8b8297282c77291",9932:"8b133f733997b04aa447",9941:"5d5e7f42b93b5415b3a2",9989:"7fa38b706bce6c45f5ea"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import a from"../../../core/Logger.js";import{isSome as r,isNone as d}from"../../../core/maybe.js";import o from"../../../core/PooledArray.js";import{EsriPromiseMixin as n}from"../../../core/Promise.js";import{isAbortError as h}from"../../../core/promiseUtils.js";import{watch as l,initial as u,sync as _}from"../../../core/reactiveUtils.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{projectBoundingRect as g}from"../../../geometry/projection.js";import{create as m,intersectsSphere as y}from"../../../geometry/support/aaBoundingRect.js";import{makeDehydratedPoint as x}from"../dehydratedFeatures.js";import{PromiseQueue as f}from"../../support/PromiseQueue.js";import{addTask as b}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as w}from"../../../views/3d/layers/i3s/I3SIndex.js";import N from"../../../views/3d/layers/i3s/I3SLodHandling.js";import{NodeState as v,CacheState as C}from"../../../views/3d/layers/i3s/I3SNode.js";import D from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{I3SStreamDataController as L}from"../../../views/3d/layers/i3s/I3SStreamDataController.js";import{getVertexCrs as S,getIndexCrs as V,findIntersectingNodes as I}from"../../../views/3d/layers/i3s/I3SUtil.js";import A from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{FadeDirection as F}from"../../../views/3d/layers/support/I3SLayerView.js";import{toBoundingRect as U}from"../../../views/3d/support/extentUtils.js";import{ClientType as O,maxDownloadSlots as P}from"../../../views/3d/support/index.js";import{extractSafeScaleBounds as M,scaleBoundsPredicate as q}from"../../../views/support/layerViewUtils.js";import{noBudget as j}from"../../../views/support/Scheduler.js";const G=a.getLogger("esri.layers.graphics.controllers.I3SOnDemandController"),Q=100,T=2,E=1e4,B=1e-4,H=1.2,k=500,R=1.5;let z=class extends(n(t)){constructor(e){super(e),this.screenSizeFactor=0,this.featureTarget=5e4,this.fixedFeatureTarget=!1,this.updating=!0,this.updatingProgress=1,this.leavesReached=!1,this.scaleVisibilityEnabled=!0,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._newLoadingNodes=new o({deallocator:null}),this._loadedNodeScales=new Map,this._modificationsNodeFilteringArray=new o,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._handles=new i,this._idleQueue=new f,this._elevationUpdateNodes=new o({deallocator:null}),this._errorCount=0}get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(this.layer.version.major<2||!s("enable-feature:point-base-layer"))}get indexStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(O.I3S_INDEX);return new L(e,this.layer.apiKey)}get dataStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(O.I3S_DATA);return new L(e,this.layer.apiKey)}get crsVertex(){return S(this.layer)}get crsIndex(){return V(this.layer)}get rootNodeVisible(){if(r(this._index)){const e=this._index.rootNode;if(r(e))return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0}get index(){return this._index}initialize(){this._disableMemCache=!this.layerView.loadCachedGPUData||!this.layerView.addCachedGPUData,this._lodHandling=new N(this.layerView);const e=this.layerView.i3slayer;this.layer=e,this._defaultGeometrySchema=e.store.defaultGeometrySchema,this.disableIDBCache=s("disable-feature:idb-cache"),"fields"in e&&(this._fields=e.fields,this._attributeStorageInfo=e.attributeStorageInfo),this.addResolvingPromise(Promise.all([this.layer.indexInfo,this.layer.when(),this.layerView.when()]).then((([t])=>{var i;if(this.destroyed||!this.layerView||this.layerView.destroyed)return;const s=this.layerView.view;this._setClippingArea(s.clippingArea);const a=this.layerView.view.resourceController;this._handles.add([l((()=>{var e,t;return null==s||null==(e=s.pointsOfInterest)||null==(t=e.focus)?void 0:t.renderLocation}),(e=>this._pointOfInterestChanged(e)),u),l((()=>a.memoryController.memoryFactor),(()=>this._setCameraDirty()),_),l((()=>{var e;return null==(e=this.layerView)?void 0:e.suspended}),(e=>{const t=e?()=>this._updateViewData():()=>this._updateIdleState(!0),i=e?()=>{}:()=>this._updateIdleState(!1);this._idleStateCallbacks?(e&&this.cancelNodeLoading(),this.restartNodeLoading(),this._idleStateCallbacks.idleBegin=t,this._idleStateCallbacks.idleEnd=i):this._idleStateCallbacks=a.scheduler.registerIdleStateCallbacks(t,i)}),u),b(this.layerView.view.resourceController.scheduler,{update:(e,t)=>this._frame(e,t),needsUpdate:()=>this.updating}),this.watch("uncompressedTextureDownsamplingEnabled",(()=>this.restartNodeLoading())),this.watch(["featureTarget","fixedFeatureTarget"],(()=>{this._setCameraDirty(),this._stableFeatureLOD=!1})),s.state.watch("contentCamera",(()=>this._setCameraDirty())),this.layer.watch("elevationInfo",(()=>this._elevationInfoChanged())),this.layer.watch("effectiveScaleRange",(()=>this._scaleBoundsChanged())),this.layerView.watch("lodFactor",(()=>this._setCameraDirty())),this.layerView.watch("availableFields?",(()=>this._requiredFieldsChange())),this.layerView.watch("holeFilling",(e=>r(this._index)&&(this._index.holeFilling=e)))]),this._updateScaleHandles(),this._viewportQueries=new A(this.crsIndex,s.renderCoordsHelper,s.state.contentCamera,!s.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,s.elevationProvider,this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this.lod,angleDependentLoD:this.lod<.5}),this._index=new w(e,t,this.indexStreamController,this._viewportQueries,G,this.layerView.holeFilling,(e=>this.layerView.isNodeLoaded(e)),(e=>this.layerView.isNodeReloading(e)),(e=>this._shouldLoadNode(e)),(e=>this._enableFromGPUCache(e,v.Leaf)),(e=>this._needsUpdate(e)),(()=>!this.indexStreamController.busy),(e=>this.layerView.computeVisibilityObb?this.layerView.computeVisibilityObb(e):null),null!=(i=this.layerView)&&i.computeNodeFiltering?e=>this.layerView.computeNodeFiltering(e):void 0),this._index.imModificationsChanged(!!this.layerView.hasModifications),this._startNodeLoading()}))),this._tmpPoint=x(0,0,0,this.crsIndex)}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;r(t)&&null!=i&&i.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll((e=>{const i=t.getNode(e);r(i)&&this._modificationsNodeFilteringArray.push(i)})),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._idleStateCallbacks&&(this._isIdle=!1,this._idleStateCallbacks.remove(),this._idleStateCallbacks=null),this._handles.destroy(),this._nodeLoader=null,K.prune(),r(X)&&(X.hide(),X=null)}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map((i=>{const s=J(e,i),a=J(t,i);return s>=0&&a>=0?{index:s,name:t[a].name,field:t[a],attributeStorageInfo:e[s]}:null})).filter((e=>null!=e&&e.name!==i))}_requiredFieldsChange(){const e=this._getRequiredAttributes();$(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=m();U(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){r(this._viewportQueries)&&(this._viewportQueries.setPointOfInterest(e),r(this._index)&&(this._index.progressiveLoadPenalty=W.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate()))}updateClippingArea(e){this._setClippingArea(e),r(this._viewportQueries)&&r(this._index)&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this.notifyChange("rootNodeVisible"),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateElevationChanged(e,t){const i=this._index;if(d(i))return;const s=i.rootNode;if(d(s))return;const a=this._elevationUpdateNodes;a.clear(),I(e,t,s,this.crsIndex,i,(e=>a.push(e.index))),a.forAll((e=>{i.invalidateBoundingVolumeCache(e),e===s.index&&this.notifyChange("rootNodeVisible")})),a.length&&this.restartNodeLoading()}getParentIndex(e){return r(this._index)&&this._index.getParentIndex(e)}_elevationInfoChanged(){r(this._index)&&this._index.updateElevationInfo(this.layer.elevationInfo),this._setCameraDirty()}_updateScaleHandles(){const e="scale-bounds";this._handles.remove(e),this.areScaleBoundsActive&&this._handles.add(this.layerView.view.basemapTerrain.on("scale-change",(e=>this._scaleUpdateHandler(e))),e)}_scaleBoundsChanged(){this.areScaleBoundsActive||this._loadedNodeScales.clear(),this._updateScaleHandles(),this._setCameraDirty()}_scaleUpdateHandler(e){this._updateScaleInBoundingRect(e.extent,e.spatialReference),this._setCameraDirty()}_updateScaleInBoundingRect(e,t){const i=this._index;if(d(i))return;const s=i.rootNode;!d(s)&&g(e,t,Y,this.crsIndex)&&this._loadedNodeScales.forEach(((e,t)=>{const s=i.getNode(t);r(s)&&y(Y,s.mbs)&&this._loadedNodeScales.set(t,this._computeScale(s))}))}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateUpdating()}schedule(e,t){return this._idleQueue.push(e,t)}reschedule(e,t){return this._idleQueue.unshift(e,t)}get isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get areScaleBoundsActive(){const{minScale:e,maxScale:t}=M(this.layer);return this.scaleVisibilityEnabled&&(e>0||t>0)}get unloadedMemoryEstimate(){return d(this._index)||this.layerView.suspended?0:this._index.getUnloadedMemoryEstimate()*this.lodDropFactor}get indexDepth(){return r(this._index)?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData||(this._disableMemCache=!0),this._disableMemCache=e}_frame(e,t){return this.layerView.suspended?(this._updateViewData(),this._evaluateUpdating(),-1/0):!this.layerView.visible||d(this._index)?-1/0:(this._processLogError(e,t),this._index.getPriority())}_processLogError(e,t){try{this._process(e,t)}catch(i){this._errorCount<50?G.error("Error during processing: "+i):50===this._errorCount&&G.error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null==this._nodeLoader||d(this._index)||(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this.isIntegratedMesh&&(e.enabled=!1),e.run((()=>this._processIndex(e))),this._updateFeatureLOD(),e.run((()=>this._processCache(e))),this.isIntegratedMesh&&(e.enabled=!0),e.run((()=>this._processNodes(e,t))),this._idleQueue.runTask(e),e.run((()=>this._prefetchIndex())),t.numIndexLoading+=this._index.getIndexLoading(),t.numNodesLoading+=this._downloadingCount,e.run((()=>this._lodHandling.lodGlobalHandling(e))),this._evaluateUpdating())}_processIndex(e){if(d(this._index))return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update([...this._loadingNodes.keys()],e,(e=>this.updateNodeModificationStatus(e))),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushArray(this._index.updates.missing.data,this._index.updates.missing.length));const t=this._index.featureEstimate.leavesReached;this._index.isLoading()||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(d(this._index)||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||d(this._index)||d(this._viewportQueries))return;const e=!this._index.isLoading(),t=this.featureTarget*this.baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.getIndexMissing()>k){if(this._featureLOD<=B)return;this._featureLOD/=R,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=E||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this.lod,a=this._index.checkFeatureTarget(t,s);a!==s&&(this._featureLOD=a/this.baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*H||e&&i.estimate>t))return;if(this._featureLOD<=B)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(E,Math.max(B,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this.lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(d(t))return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);r(s)&&(!this.layerView.isNodeLoaded(s.index)&&this._isNodeInScaleBounds(s));s=t.getParent(s.index))if(this._enableFromGPUCache(s,v.Hole)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(d(this._index))return!1;let i=(this._isIdle?Q:T)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());r(t)&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const a=this._index.getNode(s.add.back());if(d(a)||a.cacheState!==C.Cached&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(a),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach((e=>e.abort())),this._loadingNodes.clear(),this._updatingNodes.forEach((e=>e.abort())),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=T)&&(this._downloadingCount<P&&!this.dataStreamController.busy)}_evaluateUpdating(){let e=!1,t=0;if(this.layerView.suspended)e=this._cameraDirty,t=e?0:1;else{const i=(r(this._index)?this._index.getIndexMissing():0)+3*(r(this._index)?this._index.updates.add.length:0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.running||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}this.updating=e,this.updatingProgress=t}_updateViewData(){if(!this._cameraDirty||d(this._index)||d(this._viewportQueries))return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this.screenSizeFactor=1/(t.perScreenPixelRatio/2),this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this.lod),this._index.invalidateVisibilityCache(),this._index.progressiveLoadPenalty=W.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.resourceController.memoryController.memoryFactor<1?1:this.layerView.progressiveLoadFactor}get lod(){return this._featureLOD*this.baseLOD}get baseLOD(){const e=this.layerView.lodFactor,t=this.layerView.view.resourceController.memoryController.memoryFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*t}get lodDropFactor(){if(this.fixedFeatureTarget)return 1;const e=this.layerView.view.resourceController.memoryController;return(Math.min(e.memoryFactor,.5)-e.minQuality)/(.5-e.minQuality)}isGeometryVisible(e){return r(this._index)&&this._index.isGeometryVisible(e.index)}updateVisibility(e){r(this._index)&&this._index.invalidateNodeVisibilityCache(e)}updateBoundingVolume(e){r(this._index)&&this._index.invalidateBoundingVolumeCache(e)}invalidateGeometryVisibility(e){r(this._index)&&this._index.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){r(this._index)&&this._index.invalidateVisibilityObbs()}modificationsChanged(){r(this._index)&&this._index.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&(!(d(this._index)||!this._index.isGeometryVisible(e.index))&&this._isNodeInScaleBounds(e))}_shouldDropNode(e){if(d(this._viewportQueries))return!1;const t=this.lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenter(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||d(e)||d(this._viewportQueries))return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,uncompressedTextureDownsamplingEnabled:this.layerView.uncompressedTextureDownsamplingEnabled,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new D(this.layer,this.dataStreamController,G,this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading((e=>this._isNodeInScaleBounds(e)),((e,t)=>this._removeNodes(e,t,Z.fadeout)),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateUpdating()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexStreamController.cancelAll(),this.dataStreamController.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateUpdating())}_removeInvisibleNodes(e){const t=this._index;if(d(t)||d(this._viewportQueries))return!1;K.clear(),this.layerView.getLoadedNodeIndices(K);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return K.filterInPlace((e=>{const i=t.getNode(e);return d(i)||!t.isGeometryVisible(e)||s(i)||!this._isNodeInScaleBounds(i)})),K.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(K,e,Z.pop),!(i&&this.lodDropFactor<1)&&(0===K.length||(K.clear(),!1))}markNodeToRemove(e){K.push(e)}removeMarkedNodes(){this._removeNodes(K,j,Z.pop)}_removeNodes(e,t,i){const s=e.length;if(0!==s&&!t.done){for(r(this._index)&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),a=this._index;i===Z.fadeout&&this.layerView.nodeFadeoutEnabled&&r(a)&&a.isGeometryVisible(s)?this.layerView.fadeNode(s,F.FadeOut,!0):this.layerView.removeNode(s),t.madeProgress()}if(this._loadedNodeScales.size>0)for(let t=e.length;t<s;t++){const i=e.data[t];this._loadedNodeScales.delete(i)}}}_needsUpdate(e){if(!e.resources.hasFeatureData||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}_updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t);($(this.layerView.getLoadedAttributes(e.index),this._requiredAttributes)?Promise.resolve(this.layerView.getAttributeData(e.index)):this._nodeLoader.loadAttributes(e,this._requiredAttributes,t.signal)).then((i=>this.schedule((()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:i},t.signal)),t.signal))).catch((i=>{if(!h(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)})).catch((()=>{})).then((()=>{this._updatingNodes.delete(e.index),this._evaluateUpdating()})),this._evaluateUpdating()}_loadNode(e){if(this._loadingNodes.has(e.index))return void G.error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateUpdating(),this._loadAndAddNode(e,t.signal).then((i=>{i&&r(this._index)&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())})).catch((e=>{if(!h(e))throw e})).finally((()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateUpdating()}))}_loadAndAddNode(e,t){return e.cacheState===C.Uncached?this._loadUncached(e,t).then((()=>!1)):this._loadCached(e,t).then((t=>!t&&(e.cacheState=C.Uncached,!0))).catch((t=>!h(t)&&(e.cacheState=C.Uncached,!0)))}_enableFromGPUCache(e,t){if(this._disableMemCache||d(this._index))return!1;if(t===v.Hole&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e);return r(t)&&r(t.attributeInfo)&&$(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){r(this._index)&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}_loadCached(e,t){if(this._enableFromGPUCache(e,v.Leaf))return Promise.resolve(!0);const i=this.layerView;return!this.disableIDBCache&&i.loadCachedNodeData&&i.addCachedNodeData?this.schedule((()=>i.loadCachedNodeData(e,t,((t,i)=>this._nodeLoader.loadTextures(e,t,i)))),t).then((s=>{if(d(s))return!1;const a=this._requiredAttributes;return this.reschedule((()=>this._nodeLoader.loadAttributes(e,a,t)),t).then((r=>this.reschedule((()=>i.addCachedNodeData(e,s,{loadedAttributes:a,attributeData:r},t)),t))).then((()=>(this._nodeAdded(),!0)))})):Promise.resolve(!1)}_loadUncached(e,t){return this._downloadingCount++,this._nodeLoader.loadNodeData(e,t).catch((e=>{throw this._downloadingCount--,e})).then((i=>(this._downloadingCount--,this.schedule((()=>this.layerView.addNode(e,i,t)),t)))).then((()=>{this._nodeAdded(),e.cacheState=C.Cached})).catch((t=>{if(!h(t))throw G.error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,r(this._index)&&this._index.requestUpdate(),t}))}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateUpdating(),e&&this._index&&r(this._index)&&this._index.resetFailedNodes())}_getScale(e){if(this._loadedNodeScales.has(e.index))return this._loadedNodeScales.get(e.index);const t=this._computeScale(e);return this.layerView.isNodeLoaded(e.index)&&this._loadedNodeScales.set(e.index,t),t}_computeScale(e){this._tmpPoint.x=e.mbs[0],this._tmpPoint.y=e.mbs[1],this._tmpPoint.z=e.mbs[2];const t=e.mbs[3];return this.layerView.view.basemapTerrain.getSphereScale(this._tmpPoint,t)}_isNodeInScaleBounds(e){if(!this.areScaleBoundsActive)return!0;const t=this._getScale(e),{minScale:i,maxScale:s}=M(this.layer);return q(t,i,s)}updateStats(e){e.index=r(this._index)?this._index.size:0,this.isGraphics3D&&(e.detail=this._featureLOD,e.target=this.featureTarget*this.baseLOD),r(this._index)&&this._index.updateStats(e)}get test(){const e=this;return{index:this._index,set disableUpdates(t){e._updatesDisabled=t,t?e.cancelNodeLoading():e.requestUpdate()},set disableIDBCache(t){e.disableIDBCache=t},set ignoreServiceObb(t){r(e._index)&&(e._index.ignoreServiceObb=t)},shouldLoadNode:t=>e._shouldLoadNode(t)}}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating(),r(this._index)&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;r(t)&&t.layerFilterChanged(e),this.requestUpdate()}};e([c({readOnly:!0})],z.prototype,"isMeshPyramid",null),e([c({readOnly:!0})],z.prototype,"isGraphics3D",null),e([c({readOnly:!0})],z.prototype,"useMaximumNumberOfFeatures",null),e([c({readOnly:!0})],z.prototype,"indexStreamController",null),e([c({readOnly:!0})],z.prototype,"dataStreamController",null),e([c({readOnly:!0})],z.prototype,"crsVertex",null),e([c({readOnly:!0})],z.prototype,"crsIndex",null),e([c()],z.prototype,"screenSizeFactor",void 0),e([c()],z.prototype,"featureTarget",void 0),e([c()],z.prototype,"fixedFeatureTarget",void 0),e([c()],z.prototype,"layerView",void 0),e([c()],z.prototype,"layer",void 0),e([c({})],z.prototype,"updating",void 0),e([c({})],z.prototype,"updatingProgress",void 0),e([c({readOnly:!0})],z.prototype,"leavesReached",void 0),e([c({constructOnly:!0})],z.prototype,"scaleVisibilityEnabled",void 0),e([c({readOnly:!0,dependsOn:[]})],z.prototype,"rootNodeVisible",null),z=e([p("esri.layers.graphics.controllers.I3SOnDemandController")],z);const K=new o({deallocator:null});let X;function $(e,t){return r(e)&&e.length===t.length&&e.every((e=>J(t,e.name)>=0))}function J(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const W={factorIM:.2,factor3dObject:.05,distancePenalty:10},Y=m();var Z;!function(e){e[e.pop=0]="pop",e[e.fadeout=1]="fadeout"}(Z||(Z={}));const ee=z;export{ee as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import a from"../../../core/Logger.js";import{isSome as r,isNone as d}from"../../../core/maybe.js";import o from"../../../core/PooledArray.js";import{EsriPromiseMixin as n}from"../../../core/Promise.js";import{isAbortError as h}from"../../../core/promiseUtils.js";import{watch as l,initial as u,sync as _}from"../../../core/reactiveUtils.js";import{property as c}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{projectBoundingRect as g}from"../../../geometry/projection.js";import{create as m,intersectsSphere as y}from"../../../geometry/support/aaBoundingRect.js";import{makeDehydratedPoint as x}from"../dehydratedFeatures.js";import{PromiseQueue as f}from"../../support/PromiseQueue.js";import{addTask as b}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as w}from"../../../views/3d/layers/i3s/I3SIndex.js";import N from"../../../views/3d/layers/i3s/I3SLodHandling.js";import{NodeState as v,CacheState as C}from"../../../views/3d/layers/i3s/I3SNode.js";import D from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{I3SStreamDataController as L}from"../../../views/3d/layers/i3s/I3SStreamDataController.js";import{getVertexCrs as S,getIndexCrs as V,findIntersectingNodes as I}from"../../../views/3d/layers/i3s/I3SUtil.js";import A from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{FadeDirection as F}from"../../../views/3d/layers/support/I3SLayerView.js";import{toBoundingRect as U}from"../../../views/3d/support/extentUtils.js";import{ClientType as O,maxDownloadSlots as P}from"../../../views/3d/support/index.js";import{extractSafeScaleBounds as M,scaleBoundsPredicate as q}from"../../../views/support/layerViewUtils.js";import{noBudget as j}from"../../../views/support/Scheduler.js";const G=a.getLogger("esri.layers.graphics.controllers.I3SOnDemandController"),Q=100,T=2,E=1e4,B=1e-4,H=1.2,k=500,R=1.5;let z=class extends(n(t)){constructor(e){super(e),this.screenSizeFactor=0,this.featureTarget=5e4,this.fixedFeatureTarget=!1,this.updating=!0,this.updatingProgress=1,this.leavesReached=!1,this.scaleVisibilityEnabled=!0,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._newLoadingNodes=new o({deallocator:null}),this._loadedNodeScales=new Map,this._modificationsNodeFilteringArray=new o,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._handles=new i,this._idleQueue=new f,this._elevationUpdateNodes=new o({deallocator:null}),this._errorCount=0}get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(this.layer.version.major<2||!s("enable-feature:point-base-layer"))}get indexStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(O.I3S_INDEX);return new L(e,this.layer.apiKey)}get dataStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(O.I3S_DATA);return new L(e,this.layer.apiKey)}get crsVertex(){return S(this.layer)}get crsIndex(){return V(this.layer)}get rootNodeVisible(){if(r(this._index)){const e=this._index.rootNode;if(r(e))return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0}get index(){return this._index}initialize(){this._disableMemCache=!this.layerView.loadCachedGPUData||!this.layerView.addCachedGPUData,this._lodHandling=new N(this.layerView);const e=this.layerView.i3slayer;this.layer=e,this._defaultGeometrySchema=e.store.defaultGeometrySchema,this.disableIDBCache=s("disable-feature:idb-cache"),"fields"in e&&(this._fields=e.fields,this._attributeStorageInfo=e.attributeStorageInfo),this.addResolvingPromise(Promise.all([this.layer.indexInfo,this.layer.when(),this.layerView.when()]).then((([t])=>{var i;if(this.destroyed||!this.layerView||this.layerView.destroyed)return;const s=this.layerView.view;this._setClippingArea(s.clippingArea);const a=this.layerView.view.resourceController;this._handles.add([l((()=>{var e,t;return null==s||null==(e=s.pointsOfInterest)||null==(t=e.focus)?void 0:t.renderLocation}),(e=>this._pointOfInterestChanged(e)),u),l((()=>a.memoryController.memoryFactor),(()=>this._setCameraDirty()),_),l((()=>{var e;return null==(e=this.layerView)?void 0:e.suspended}),(e=>{const t=e?()=>this._updateViewData():()=>this._updateIdleState(!0),i=e?()=>{}:()=>this._updateIdleState(!1);this._idleStateCallbacks?(e&&this.cancelNodeLoading(),this.restartNodeLoading(),this._idleStateCallbacks.idleBegin=t,this._idleStateCallbacks.idleEnd=i):this._idleStateCallbacks=a.scheduler.registerIdleStateCallbacks(t,i)}),u),b(this.layerView.view.resourceController.scheduler,{update:(e,t)=>this._frame(e,t),needsUpdate:()=>this.updating}),this.watch("uncompressedTextureDownsamplingEnabled",(()=>this.restartNodeLoading())),this.watch(["featureTarget","fixedFeatureTarget"],(()=>{this._setCameraDirty(),this._stableFeatureLOD=!1})),s.state.watch("contentCamera",(()=>this._setCameraDirty())),this.layer.watch("elevationInfo",(()=>this._elevationInfoChanged())),this.layer.watch("effectiveScaleRange",(()=>this._scaleBoundsChanged())),this.layerView.watch("lodFactor",(()=>this._setCameraDirty())),this.layerView.watch("availableFields?",(()=>this._requiredFieldsChange())),this.layerView.watch("holeFilling",(e=>r(this._index)&&(this._index.holeFilling=e)))]),this._updateScaleHandles(),this._viewportQueries=new A(this.crsIndex,s.renderCoordsHelper,s.state.contentCamera,!s.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,s.elevationProvider,this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this.lod,angleDependentLoD:this.lod<.5}),this._index=new w(e,t,this.indexStreamController,this._viewportQueries,G,this.layerView.holeFilling,(e=>this.layerView.isNodeLoaded(e)),(e=>this.layerView.isNodeReloading(e)),(e=>this._shouldLoadNode(e)),(e=>this._enableFromGPUCache(e,v.Leaf)),(e=>this._needsUpdate(e)),(()=>!this.indexStreamController.busy),(e=>this.layerView.computeVisibilityObb?this.layerView.computeVisibilityObb(e):null),null!=(i=this.layerView)&&i.computeNodeFiltering?e=>this.layerView.computeNodeFiltering(e):void 0),this._index.imModificationsChanged(!!this.layerView.hasModifications),this._startNodeLoading()}))),this._tmpPoint=x(0,0,0,this.crsIndex)}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;r(t)&&null!=i&&i.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll((e=>{const i=t.getNode(e);r(i)&&this._modificationsNodeFilteringArray.push(i)})),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._idleStateCallbacks&&(this._isIdle=!1,this._idleStateCallbacks.remove(),this._idleStateCallbacks=null),this._handles.destroy(),this._nodeLoader=null,K.prune(),r(X)&&(X.hide(),X=null)}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map((i=>{const s=J(e,i),a=J(t,i);return s>=0&&a>=0?{index:s,name:t[a].name,field:t[a],attributeStorageInfo:e[s]}:null})).filter((e=>null!=e&&e.name!==i))}_requiredFieldsChange(){const e=this._getRequiredAttributes();$(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=m();U(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){r(this._viewportQueries)&&(this._viewportQueries.setPointOfInterest(e),r(this._index)&&(this._index.progressiveLoadPenalty=W.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate()))}updateClippingArea(e){this._setClippingArea(e),r(this._viewportQueries)&&r(this._index)&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this.notifyChange("rootNodeVisible"),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateElevationChanged(e,t){const i=this._index;if(d(i))return;const s=i.rootNode;if(d(s))return;const a=this._elevationUpdateNodes;a.clear(),I(e,t,s,this.crsIndex,i,(e=>a.push(e.index))),a.forAll((e=>{i.invalidateBoundingVolumeCache(e),e===s.index&&this.notifyChange("rootNodeVisible")})),a.length&&this.restartNodeLoading()}getParentIndex(e){return r(this._index)&&this._index.getParentIndex(e)}_elevationInfoChanged(){r(this._index)&&this._index.updateElevationInfo(this.layer.elevationInfo),this._setCameraDirty()}_updateScaleHandles(){const e="scale-bounds";this._handles.remove(e),this.areScaleBoundsActive&&this._handles.add(this.layerView.view.basemapTerrain.on("scale-change",(e=>this._scaleUpdateHandler(e))),e)}_scaleBoundsChanged(){this.areScaleBoundsActive||this._loadedNodeScales.clear(),this._updateScaleHandles(),this._setCameraDirty()}_scaleUpdateHandler(e){this._updateScaleInBoundingRect(e.extent,e.spatialReference),this._setCameraDirty()}_updateScaleInBoundingRect(e,t){const i=this._index;if(d(i))return;const s=i.rootNode;!d(s)&&g(e,t,Y,this.crsIndex)&&this._loadedNodeScales.forEach(((e,t)=>{const s=i.getNode(t);r(s)&&y(Y,s.mbs)&&this._loadedNodeScales.set(t,this._computeScale(s))}))}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateUpdating()}schedule(e,t){return this._idleQueue.push(e,t)}reschedule(e,t){return this._idleQueue.unshift(e,t)}get isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get areScaleBoundsActive(){const{minScale:e,maxScale:t}=M(this.layer);return this.scaleVisibilityEnabled&&(e>0||t>0)}get unloadedMemoryEstimate(){return d(this._index)||this.layerView.suspended?0:this._index.getUnloadedMemoryEstimate()*this.lodDropFactor}get indexDepth(){return r(this._index)?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData||(this._disableMemCache=!0),this._disableMemCache=e}_frame(e,t){return this.layerView.suspended?(this._updateViewData(),this._evaluateUpdating(),-1/0):!this.layerView.visible||d(this._index)?-1/0:(this._processLogError(e,t),this._index.getPriority())}_processLogError(e,t){try{this._process(e,t)}catch(i){this._errorCount<50?G.error("Error during processing: "+i):50===this._errorCount&&G.error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null==this._nodeLoader||d(this._index)||(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this.isIntegratedMesh&&(e.enabled=!1),e.run((()=>this._processIndex(e))),this._updateFeatureLOD(),e.run((()=>this._processCache(e))),this.isIntegratedMesh&&(e.enabled=!0),e.run((()=>this._processNodes(e,t))),this._idleQueue.runTask(e),e.run((()=>this._prefetchIndex())),t.numIndexLoading+=this._index.getIndexLoading(),t.numNodesLoading+=this._downloadingCount,e.run((()=>this._lodHandling.lodGlobalHandling(e))),this._evaluateUpdating())}_processIndex(e){if(d(this._index))return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update([...this._loadingNodes.keys()],e,(e=>this.updateNodeModificationStatus(e))),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushArray(this._index.updates.missing.data,this._index.updates.missing.length));const t=this._index.featureEstimate.leavesReached;this._index.isLoading()||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(d(this._index)||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||d(this._index)||d(this._viewportQueries))return;const e=!this._index.isLoading(),t=this.featureTarget*this.baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.getIndexMissing()>k){if(this._featureLOD<=B)return;this._featureLOD/=R,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=E||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this.lod,a=this._index.checkFeatureTarget(t,s);a!==s&&(this._featureLOD=a/this.baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*H||e&&i.estimate>t))return;if(this._featureLOD<=B)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(E,Math.max(B,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this.lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(d(t))return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);r(s)&&(!this.layerView.isNodeLoaded(s.index)&&this._isNodeInScaleBounds(s));s=t.getParent(s.index))if(this._enableFromGPUCache(s,v.Hole)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(d(this._index))return!1;let i=(this._isIdle?Q:T)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());r(t)&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const a=this._index.getNode(s.add.back());if(d(a)||a.cacheState!==C.Cached&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(a),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach((e=>e.abort())),this._loadingNodes.clear(),this._updatingNodes.forEach((e=>e.abort())),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=T)&&(this._downloadingCount<P&&!this.dataStreamController.busy)}_evaluateUpdating(){let e=!1,t=0;if(this.layerView.suspended)e=this._cameraDirty,t=e?0:1;else{const i=(r(this._index)?this._index.getIndexMissing():0)+3*(r(this._index)?this._index.updates.add.length:0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.running||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}this.updating=e,this.updatingProgress=t}_updateViewData(){if(!this._cameraDirty||d(this._index)||d(this._viewportQueries))return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this.screenSizeFactor=1/(t.perScreenPixelRatio/2),this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this.lod),this._index.invalidateVisibilityCache(),this._index.progressiveLoadPenalty=W.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.resourceController.memoryController.memoryFactor<1?1:this.layerView.progressiveLoadFactor}get lod(){return this._featureLOD*this.baseLOD}get baseLOD(){const e=this.layerView.lodFactor,t=this.layerView.view.resourceController.memoryController.memoryFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*t}get lodDropFactor(){if(this.fixedFeatureTarget)return 1;const e=this.layerView.view.resourceController.memoryController;return(Math.min(e.memoryFactor,.5)-e.minQuality)/(.5-e.minQuality)}isGeometryVisible(e){return r(this._index)&&this._index.isGeometryVisible(e.index)}updateVisibility(e){r(this._index)&&this._index.invalidateNodeVisibilityCache(e)}updateBoundingVolume(e){r(this._index)&&this._index.invalidateBoundingVolumeCache(e)}invalidateGeometryVisibility(e){r(this._index)&&this._index.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){r(this._index)&&this._index.invalidateVisibilityObbs()}modificationsChanged(){r(this._index)&&this._index.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&(!(d(this._index)||!this._index.isGeometryVisible(e.index))&&this._isNodeInScaleBounds(e))}_shouldDropNode(e){if(d(this._viewportQueries))return!1;const t=this.lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenter(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||d(e)||d(this._viewportQueries))return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,uncompressedTextureDownsamplingEnabled:this.layerView.uncompressedTextureDownsamplingEnabled,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new D(this.layer,this.dataStreamController,G,this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading((e=>this._isNodeInScaleBounds(e)),((e,t)=>this._removeNodes(e,t,Z.fadeout)),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateUpdating()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexStreamController.cancelAll(),this.dataStreamController.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateUpdating())}_removeInvisibleNodes(e){const t=this._index;if(d(t)||d(this._viewportQueries))return!1;K.clear(),this.layerView.getLoadedNodeIndices(K);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return K.filterInPlace((e=>{const i=t.getNode(e);return d(i)||!t.isGeometryVisible(e)||s(i)||!this._isNodeInScaleBounds(i)})),K.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(K,e,Z.pop),!(i&&this.lodDropFactor<1)&&(0===K.length||(K.clear(),!1))}markNodeToRemove(e){K.push(e)}removeMarkedNodes(){this._removeNodes(K,j,Z.pop)}_removeNodes(e,t,i){const s=e.length;if(0!==s&&!t.done){for(r(this._index)&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),a=this._index;i===Z.fadeout&&this.layerView.nodeFadeoutEnabled&&r(a)&&a.isGeometryVisible(s)?this.layerView.fadeNode(s,F.FadeOut,!0):this.layerView.removeNode(s),t.madeProgress()}if(this._loadedNodeScales.size>0)for(let t=e.length;t<s;t++){const i=e.data[t];this._loadedNodeScales.delete(i)}}}_needsUpdate(e){if(!e.resources.hasFeatureData||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}_updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t);($(this.layerView.getLoadedAttributes(e.index),this._requiredAttributes)?Promise.resolve(this.layerView.getAttributeData(e.index)):this._nodeLoader.loadAttributes(e,this._requiredAttributes,t.signal)).then((i=>this.schedule((()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:i},t.signal)),t.signal))).catch((i=>{if(!h(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)})).catch((()=>{})).then((()=>{this._updatingNodes.delete(e.index),this._evaluateUpdating()})),this._evaluateUpdating()}_loadNode(e){if(this._loadingNodes.has(e.index))return void G.error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateUpdating(),this._loadAndAddNode(e,t.signal).then((i=>{i&&r(this._index)&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())})).catch((e=>{if(!h(e))throw e})).finally((()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateUpdating()}))}_loadAndAddNode(e,t){return e.cacheState===C.Uncached?this._loadUncached(e,t).then((()=>!1)):this._loadCached(e,t).then((t=>!t&&(e.cacheState=C.Uncached,!0))).catch((t=>!h(t)&&(e.cacheState=C.Uncached,!0)))}_enableFromGPUCache(e,t){if(this._disableMemCache||d(this._index))return!1;if(t===v.Hole&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e);return r(t)&&r(t.attributeInfo)&&$(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){r(this._index)&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateLoadStatus(e,t){const i=this._index;r(i)&&i.updateChildrenLoaded(e,t?1:-1)}_loadCached(e,t){if(this._enableFromGPUCache(e,v.Leaf))return Promise.resolve(!0);const i=this.layerView;return!this.disableIDBCache&&i.loadCachedNodeData&&i.addCachedNodeData?this.schedule((()=>i.loadCachedNodeData(e,t,((t,i)=>this._nodeLoader.loadTextures(e,t,i)))),t).then((s=>{if(d(s))return!1;const a=this._requiredAttributes;return this.reschedule((()=>this._nodeLoader.loadAttributes(e,a,t)),t).then((r=>this.reschedule((()=>i.addCachedNodeData(e,s,{loadedAttributes:a,attributeData:r},t)),t))).then((()=>(this._nodeAdded(),!0)))})):Promise.resolve(!1)}_loadUncached(e,t){return this._downloadingCount++,this._nodeLoader.loadNodeData(e,t).catch((e=>{throw this._downloadingCount--,e})).then((i=>(this._downloadingCount--,this.schedule((()=>this.layerView.addNode(e,i,t)),t)))).then((()=>{this._nodeAdded(),e.cacheState=C.Cached})).catch((t=>{if(!h(t))throw G.error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,r(this._index)&&this._index.requestUpdate(),t}))}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateUpdating(),e&&this._index&&r(this._index)&&this._index.resetFailedNodes())}_getScale(e){if(this._loadedNodeScales.has(e.index))return this._loadedNodeScales.get(e.index);const t=this._computeScale(e);return this.layerView.isNodeLoaded(e.index)&&this._loadedNodeScales.set(e.index,t),t}_computeScale(e){this._tmpPoint.x=e.mbs[0],this._tmpPoint.y=e.mbs[1],this._tmpPoint.z=e.mbs[2];const t=e.mbs[3];return this.layerView.view.basemapTerrain.getSphereScale(this._tmpPoint,t)}_isNodeInScaleBounds(e){if(!this.areScaleBoundsActive)return!0;const t=this._getScale(e),{minScale:i,maxScale:s}=M(this.layer);return q(t,i,s)}updateStats(e){e.index=r(this._index)?this._index.size:0,this.isGraphics3D&&(e.detail=this._featureLOD,e.target=this.featureTarget*this.baseLOD),r(this._index)&&this._index.updateStats(e)}get test(){const e=this;return{index:this._index,set disableUpdates(t){e._updatesDisabled=t,t?e.cancelNodeLoading():e.requestUpdate()},set disableIDBCache(t){e.disableIDBCache=t},set ignoreServiceObb(t){r(e._index)&&(e._index.ignoreServiceObb=t)},shouldLoadNode:t=>e._shouldLoadNode(t)}}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating(),r(this._index)&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;r(t)&&t.layerFilterChanged(e),this.requestUpdate()}};e([c({readOnly:!0})],z.prototype,"isMeshPyramid",null),e([c({readOnly:!0})],z.prototype,"isGraphics3D",null),e([c({readOnly:!0})],z.prototype,"useMaximumNumberOfFeatures",null),e([c({readOnly:!0})],z.prototype,"indexStreamController",null),e([c({readOnly:!0})],z.prototype,"dataStreamController",null),e([c({readOnly:!0})],z.prototype,"crsVertex",null),e([c({readOnly:!0})],z.prototype,"crsIndex",null),e([c()],z.prototype,"screenSizeFactor",void 0),e([c()],z.prototype,"featureTarget",void 0),e([c()],z.prototype,"fixedFeatureTarget",void 0),e([c()],z.prototype,"layerView",void 0),e([c()],z.prototype,"layer",void 0),e([c({})],z.prototype,"updating",void 0),e([c({})],z.prototype,"updatingProgress",void 0),e([c({readOnly:!0})],z.prototype,"leavesReached",void 0),e([c({constructOnly:!0})],z.prototype,"scaleVisibilityEnabled",void 0),e([c({readOnly:!0,dependsOn:[]})],z.prototype,"rootNodeVisible",null),z=e([p("esri.layers.graphics.controllers.I3SOnDemandController")],z);const K=new o({deallocator:null});let X;function $(e,t){return r(e)&&e.length===t.length&&e.every((e=>J(t,e.name)>=0))}function J(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const W={factorIM:.2,factor3dObject:.05,distancePenalty:10},Y=m();var Z;!function(e){e[e.pop=0]="pop",e[e.fadeout=1]="fadeout"}(Z||(Z={}));const ee=z;export{ee as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.24.0-next.20220410",
3
+ "version": "4.24.0-next.20220411",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS API for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- const c="20220410",d="bc67d603609a81fad35c33dfd01d933fceb781c7";export{c as buildDate,d as commitHash};
5
+ const b="20220411",e="1d845bc5e776cbb6e41006e1b216be92da4a166d";export{b as buildDate,e as commitHash};