@arcgis/core 4.22.0-next.20211121 → 4.22.0-next.20211122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{128b16731b77652d17ec.js → fd2aefe36d3a299a3a93.js} +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/RibbonLine.glsl.js +3 -3
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +3 -2
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/BuildingExplorer/support/filterUtils.js +1 -1
|
@@ -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",geometryService:null,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",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.22.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,{SO:()=>l,a9:()=>a,fS:()=>s,cq:()=>f,w6:()=>c,Od:()=>b,e$:()=>d,FY:()=>p});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}const i=!!Array.prototype.fill;function a(e,t){if(i)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function c(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 l{constructor(){this.last=0}}const u=new l;function f(e,t,r,n){n=n||u;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 d(e,t,r,n){const o=null==r?e.length:r,s=f(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const h=new Set;function p(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;h.clear();for(let e=0;e<n;++e)h.add(t[e]);o=o||u;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(h.has(e[t])&&(s&&s.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;for(let t=0;t<i;++t)if(h.has(e[t])&&(s&&s.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;return h.clear(),r}function b(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,{vT:()=>n,on:()=>o,IH:()=>s})},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("esri-text-decoder","TextDecoder"in globalThis),c.add("esri-text-encoder","TextEncoder"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("mapview-transitions-duration",200),c.add("mapserver-pbf-enabled",!1),c.add("vectortilelayer-max-buffers",c("ff")?160:Number.POSITIVE_INFINITY),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,{d9:()=>s,fS:()=>i,yd:()=>o}),r(67676),r(80442);var n=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function s(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;if((0,n.W0)(e)||(0,n.lq)(e)||(0,n.KZ)(e)||(0,n.z3)(e)||(0,n.Uc)(e)||(0,n.Hx)(e)||(0,n.ZY)(e)||(0,n.xZ)(e)||(0,n.fS)(e))return(0,n.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,s(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(s(e))})),t}let t;const r=e;if("function"==typeof r.clone)t=r.clone();else if("function"==typeof r.map&&"function"==typeof r.forEach)t=r.map(s);else if("function"==typeof r.notifyChange&&"function"==typeof r.watch)t=r.clone();else{t={};for(const r of Object.getOwnPropertyNames(e))t[r]=s(e[r])}return t}function i(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){return n(e)&&e.destroy(),null}function f(e){return n(e)&&e.dispose(),null}function d(e){return n(e)&&e.remove(),null}function h(e){return n(e)&&e.release(),null}function p(e){return null}function b(e,t){const r=new Array;for(const n of e)r.push(m(n,null,t));return r}function g(e,t){for(const r of e)m(r,null,t)}function m(e,t,r){return n(e)?r(e):t}function y(e,t){return n(e)?t(e):null}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,{Po:()=>y,yw:()=>i,j0:()=>_,SC:()=>u,O3:()=>f,lV:()=>v,JR:()=>g,U2:()=>w,Wi:()=>o,pC:()=>n,o8:()=>s,Fd:()=>b,R2:()=>m,Bd:()=>p,RY:()=>h,hw:()=>d,Wg:()=>a,Pt:()=>l,s3:()=>c})},78286:(e,t,r)=>{"use strict";r.d(t,{RH:()=>o,hS:()=>s,RB:()=>i});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=>{-1===s.indexOf(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:()=>M,vr:()=>j,Ds:()=>A,as:()=>O,WW:()=>P,R8:()=>w,D_:()=>v,Hc:()=>h,tI:()=>T,y8:()=>E,fu:()=>g,$F:()=>m,d1:()=>k,DB:()=>S,r9:()=>p,k_:()=>f,H9:()=>b,Yn:()=>$,gx:()=>x,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 P(e){return O(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function k(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 x(e){return T(e)?e:Promise.resolve(e)}function T(e){return e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}function A(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=x(e(...l,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=x(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 M(){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 j(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 $(e){return Promise.resolve().then((()=>{f(e)}))}},19153:(e,t,r)=>{"use strict";r.d(t,{Qs:()=>a,hP:()=>c,gx:()=>i,Cb:()=>l});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&&-1!==t.indexOf(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,eP:()=>s,xZ:()=>h,fS:()=>p,z3:()=>l,Hx:()=>f,W0:()=>i,Uc:()=>u,ZY:()=>d,lq:()=>a,KZ:()=>c,tP:()=>o})},17452:(e,t,r)=>{"use strict";r.d(t,{R9:()=>y,qg:()=>E,tD:()=>M,ZN:()=>le,fl:()=>ue,AX:()=>_,Gd:()=>v,Ie:()=>ie,sJ:()=>Q,AH:()=>K,vt:()=>oe,oh:()=>N,P$:()=>Z,Ml:()=>fe,ed:()=>j,b7:()=>C,D6:()=>R,tm:()=>$,YP:()=>B,jc:()=>D,HK:()=>H,$U:()=>X,oC:()=>Y,kl:()=>W,v_:()=>F,hF:()=>L,_l:()=>V,PF:()=>J,Fv:()=>q,B7:()=>S,u0:()=>P,Yd:()=>ne,Hu:()=>ce,Qj:()=>se,hO:()=>ee,mN:()=>O});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=new y(n.Z.applicationUrl),w={},_=(()=>{const e=(0,i.j0)(v.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${v.scheme}://${v.host}${null!=v.port?`:${v.port}`:""}${t}`})();function O(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=P(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 P(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 k(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function S(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=>k(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):k(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=X(e);const n=j(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&te()&&(r=ee(r)),O(r)}function E(e){const t=j(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?P(e.query):null}if(r){const t=O(e);e=r+"?"+t.path;const o=S({...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 A(e){return(e=re(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function M(e){const t={proxyUrl:e.proxyUrl,urlPrefix:A(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 j(e){const t=c.proxyRules,r=A(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function $(e,t){return e=I(e),t=I(t),re(e)===re(t)}function I(e){const t=(e=q(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function N(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 R(e,t,r=!1){const n=ae(e),o=ae(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function W(e){if("string"==typeof e){if(!B(e))return!0;e=ae(e)}if(R(e,v))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=U(t[r]);for(let t=0;t<n.length;t++)if(R(e,n[t]))return!0}return!1}function U(e){return w[e]||(G(e)||Y(e)?w[e]=[new y(L(e))]:w[e]=[new y(`http://${e}`),new y(`https://${e}`)]),w[e]}function L(e,t=_,r){return Y(e)?r&&r.preserveProtocolRelative?e:"http"===v.scheme&&v.authority===Z(e).slice(2)?`http:${e}`:`https:${e}`:G(e)?e:(0,i.j0)(F("/"===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 J(e,t=_,r){if(!B(e))return e;const n=q(e),o=n.toLowerCase(),s=q(t).toLowerCase().replace(/\/+$/,""),i=r?q(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 q(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===v.scheme&&Y(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"===v.scheme&&n===v.authority&&!b.test(e)||(te()&&n===v.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||te()&&!j(e))&&(e=ee(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=L(e=e.trim()))))}function F(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(B(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 Z(e,t=!1){if(D(e)||H(e))return null;let r=e.indexOf("://");if(-1===r&&Y(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=re(e,!0)),e}function B(e){return Y(e)||G(e)}function D(e){return null!=e&&"blob:"===e.slice(0,5)}function H(e){return"data:"===e.slice(0,5)}function K(e){const t=Q(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}const z=/^data:(.*?)(;base64)?,(.*)$/;function Q(e){const t=e.match(z);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function V(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function Y(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function G(e){return u.test(e)}function X(e){return d.test(e)||"https"===v.scheme&&Y(e)}function ee(e){return Y(e)?`https:${e}`:e.replace(f,"https:")}function te(){return"https"===v.scheme}function re(e,t=!1){return Y(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ne(e){let t=0;if(B(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function oe(e,t){if(!e)return"";const r=O(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 se(e){return e.replace(/\/+$/,"")}function ie(e,t,r){if(!(t&&r&&e&&B(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 ae(e){return"string"==typeof e?new y(L(e)):(e.scheme||(e.scheme=v.scheme),e)}function ce(e,t){const r=O(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 le(e,t,r){const n=O(e),o=n.query||{};return o[t]=String(r),`${n.path}?${S(o)}`}function ue(e,t){const r=O(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=S(n);return o?`${r.path}?${o}`:r.path}function fe(e){if((0,i.Wi)(e))return null;const t=e.match(de);return t?t[1]:null}const de=/.*?\.([^\/]*)$/},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(8778),r.e(6570),r.e(8316),r.e(2303),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(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(966)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(411),r.e(2781),r.e(6481),r.e(6459),r.e(3553)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(4588),r.e(411),r.e(1534),r.e(3485),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(5158)]).then(r.bind(r,41650)),GeoJSONSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(8961),r.e(147)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(5638),r.e(4588),r.e(411),r.e(1534),r.e(3485),r.e(3578),r.e(8961),r.e(7054),r.e(2730),r.e(3142)]).then(r.bind(r,53142)),PointCloudWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(411),r.e(9294),r.e(9474)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(411),r.e(7303),r.e(6921),r.e(5340)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(5265).then(r.bind(r,55265)),WFSSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(4556),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(2303),r.e(1785),r.e(6810),r.e(9872)]).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){this._port=e,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});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),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)}}}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_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&&-1!==t.indexOf(".")){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})}_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);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,{Cs:()=>n,jt:()=>a,oi:()=>l,QM:()=>u,AB:()=>c});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,id:()=>a,qh:()=>c,i8:()=>s,Nv:()=>i});var n=r(80442),o=r(17452);const s="4.22",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,{r:()=>n,$:()=>o});const n="20211121",o="7c2f3a944338204a67682c5bff52eb9c8103c038"}},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:"db5bae10b28d7908a154",36:"457dd64964cf7f404943",102:"128b16731b77652d17ec",147:"472df5b8be9c335eb999",223:"59640d78295e2e363f18",247:"a0450fbf01de854f5c97",280:"ea05f870dda27bca4fe8",402:"09fdc334ba4096a225ba",411:"8f4714cdd325b8e28957",511:"dd8c983c153c65ebceca",565:"d53ad780789f4d9124ad",576:"38e792e037e88a74995a",635:"12576e848e14cc1fbb70",639:"b935d0c8d5951298cc53",755:"7e0b4f9a847bb2a52338",819:"6280c69d87b2a3a18780",941:"0632f22aa1af88a238ce",966:"e9af7a5eb1e3bce4f0f9",1074:"2d9b32e3e24631cd4e34",1295:"a164ca7d87bfae334347",1387:"a3a55bd894e1eb739733",1421:"7fa2d758a24bbaaab0bf",1433:"1def8845714ea745fd24",1534:"09141e5539e652edfc6c",1762:"9375938d2d708f1b0271",1765:"e6b41012ade9bdce3244",1773:"aa57f2c380132c746730",1785:"8cf9f06a7efee8eabdd1",2134:"f3c0d0d182988a8d2b3f",2303:"3c4d68029ee2787f9653",2360:"90a5a3e4b38f1f466955",2399:"96f148a556a2418038de",2515:"446f1bc9822d03aa9a7a",2730:"594029863881481feacf",2781:"1de80cd934983f4adfcd",2785:"4fdf762d805ebb17624d",3027:"f30bb46f14bf3e658711",3081:"5ced15d85e540160c20e",3142:"f4a6865f9fd613c789cb",3172:"fe3ca2d2764525a8c67f",3230:"7351fbd8a9dbef027d06",3437:"7495218a8fa025c0c133",3471:"36c4bc3d84e9c3148776",3485:"c2268a36f90a9310feec",3516:"82bb1efd0941a08e7756",3529:"1229554d2f1fae96edda",3553:"a0aa8321b58109c6ae19",3578:"e39316a7998d3dde62bf",3668:"ab1aa39457f9205c9b79",3749:"701688ccf7a6c93c9147",3792:"c80c8aff0d14dd822454",3852:"62c683f44c297d239ab8",3942:"d7f77fe32bb2d69b5714",4067:"f9958a82ce78676e56eb",4166:"8a5e15bb513c65ef730d",4358:"f977977564b2b75332a9",4369:"cb5c42f598064c0c4eaa",4470:"4dca43553ef2090e4b5f",4499:"4d325ff7180a253d08c7",4556:"a465488578b87d63215d",4588:"e14b4af7eefcbc2c46a0",4599:"49bb222ee07a768e998d",4695:"14bef72154b3a19561a7",4720:"fe42716651b39518453c",4816:"d76aa27b92563db8f366",4859:"f7a8197264cbc51eac1d",4889:"0ca1ce6856620fc88011",5051:"ac9163e7b4d544b9aa78",5158:"af6251cc7973b43a1523",5265:"3131d0ebc834e33754e1",5340:"27b9aab0315a3dc7f5e4",5638:"ae7b979ce886b03937cc",5732:"469ba1b24cdeea0758ec",5823:"ddc4adb9b9997fb09b43",5837:"42c67e6579b54844ec06",5845:"3e43df5bd4cba6b0e91f",5853:"65536fcbe080a3c1f813",6104:"1120c94a972c7dbf12d8",6237:"c544df83e86a9d36b68c",6348:"1f02165e7758645b5e0d",6401:"06c34599afdb1fe03cbc",6459:"d8d182c41e8bb70db4c2",6481:"e3aed0a5b64180bdb6c3",6550:"2acb4b5e02cbd6229dfa",6570:"55d707784090d738bb26",6619:"86245d83dd17ebe39b2a",6690:"1d8a6ab5feb97d6ca846",6710:"d11d1d294ccc4ccdf60f",6740:"7eca3800807b2cd3fda0",6748:"0a225c0b6a82779de4dd",6774:"4a830f056c4d0ed93928",6810:"bd29ea967877fc6d7c53",6841:"597f8ce30413c6e86f7c",6884:"98ec617e71d9ec3f962b",6921:"64646de7e991f3076f60",6968:"66f06faae46eb8ea1b00",7039:"30d7685fc6dc1787df44",7049:"9453fdba689296828087",7054:"3ee19c9d81aeeef567e0",7055:"be1ca1154ec28d186311",7091:"63e08d2c2e9098a14ea8",7277:"f183da283af0836421ab",7284:"3414dd7ed9fadd64eb65",7303:"cb070e62a8ac85509384",7319:"3e7a0a81a1f07bce3b30",7392:"7b8f67fe55892fbfb17d",7572:"eb169653ed234382e811",7635:"599c9acfd08aaa88ef74",7668:"4513689048bc2a704bf4",7779:"863fe8818f19f82d4d36",7845:"db075f5e0827991efcfd",7873:"93eb468381bfcf0e47d7",8008:"0a3c38ce907eb1ff6e4d",8014:"ec0be96baf84a833cb38",8062:"e9e01881e762aa389401",8121:"3a32fc4f43d87fe84fcb",8216:"fcde45f86962b11353a6",8227:"1f394b20410fddb30a96",8316:"f98f64bbcb1b24d0d290",8422:"56c34f60fdc752ca8371",8511:"bd7a0b91157250f93aa3",8589:"02ce52ca0084536bc066",8625:"caa5d1b9680a822f2070",8659:"47dab63e1b2e64a96637",8683:"7becae4fffb0090a380c",8758:"826c983100569586b61f",8778:"b957ef59aa56b5c339f4",8828:"36de1a1959f038a61cca",8835:"ff9a9e705237c55f78ff",8846:"dadf9930c296c88c3a88",8936:"7802deb733e6a2d2f369",8961:"9796d54ff12b6429164a",9070:"db202ae7dc8b584f312f",9101:"35f53c6de66eec0573db",9151:"d42f289a65a98d752e12",9169:"f7ae0344257e6e08469b",9201:"83c18c36d8829d00c280",9221:"92b3ad00f9b4bf6dece1",9254:"ccaaefa20dfb940e8cc0",9291:"6e172b435a55bc72baef",9294:"95471140bd6ec868337e",9296:"e9608d8e0ea984aa35a0",9474:"d76ba25485e92bbda0c5",9489:"06a9cdf71330bf9cc774",9490:"7678b37f4f528af762e2",9561:"a0114820691d4dda8a67",9625:"39e48b3510a3c831299e",9664:"5aee3903ee34855d14f2",9767:"9e3fc6ba87fa55c33055",9872:"b245e95708cde2c403de",9884:"356db8b8297282c77291",9928:"5c561d65035d46249fb4",9932:"a00d39545a2db2a66816",9938:"8aa1910de5173c976dac"}[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,102: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",geometryService:null,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",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.22.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,{SO:()=>l,a9:()=>a,fS:()=>s,cq:()=>f,w6:()=>c,Od:()=>b,e$:()=>d,FY:()=>p});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}const i=!!Array.prototype.fill;function a(e,t){if(i)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function c(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 l{constructor(){this.last=0}}const u=new l;function f(e,t,r,n){n=n||u;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 d(e,t,r,n){const o=null==r?e.length:r,s=f(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const h=new Set;function p(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;h.clear();for(let e=0;e<n;++e)h.add(t[e]);o=o||u;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(h.has(e[t])&&(s&&s.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;for(let t=0;t<i;++t)if(h.has(e[t])&&(s&&s.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;return h.clear(),r}function b(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,{vT:()=>n,on:()=>o,IH:()=>s})},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("esri-text-decoder","TextDecoder"in globalThis),c.add("esri-text-encoder","TextEncoder"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("mapview-transitions-duration",200),c.add("mapserver-pbf-enabled",!1),c.add("vectortilelayer-max-buffers",c("ff")?160:Number.POSITIVE_INFINITY),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,{d9:()=>s,fS:()=>i,yd:()=>o}),r(67676),r(80442);var n=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function s(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;if((0,n.W0)(e)||(0,n.lq)(e)||(0,n.KZ)(e)||(0,n.z3)(e)||(0,n.Uc)(e)||(0,n.Hx)(e)||(0,n.ZY)(e)||(0,n.xZ)(e)||(0,n.fS)(e))return(0,n.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,s(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(s(e))})),t}let t;const r=e;if("function"==typeof r.clone)t=r.clone();else if("function"==typeof r.map&&"function"==typeof r.forEach)t=r.map(s);else if("function"==typeof r.notifyChange&&"function"==typeof r.watch)t=r.clone();else{t={};for(const r of Object.getOwnPropertyNames(e))t[r]=s(e[r])}return t}function i(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){return n(e)&&e.destroy(),null}function f(e){return n(e)&&e.dispose(),null}function d(e){return n(e)&&e.remove(),null}function h(e){return n(e)&&e.release(),null}function p(e){return null}function b(e,t){const r=new Array;for(const n of e)r.push(m(n,null,t));return r}function g(e,t){for(const r of e)m(r,null,t)}function m(e,t,r){return n(e)?r(e):t}function y(e,t){return n(e)?t(e):null}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,{Po:()=>y,yw:()=>i,j0:()=>_,SC:()=>u,O3:()=>f,lV:()=>v,JR:()=>g,U2:()=>w,Wi:()=>o,pC:()=>n,o8:()=>s,Fd:()=>b,R2:()=>m,Bd:()=>p,RY:()=>h,hw:()=>d,Wg:()=>a,Pt:()=>l,s3:()=>c})},78286:(e,t,r)=>{"use strict";r.d(t,{RH:()=>o,hS:()=>s,RB:()=>i});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=>{-1===s.indexOf(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:()=>M,vr:()=>j,Ds:()=>A,as:()=>O,WW:()=>P,R8:()=>w,D_:()=>v,Hc:()=>h,tI:()=>T,y8:()=>E,fu:()=>g,$F:()=>m,d1:()=>k,DB:()=>S,r9:()=>p,k_:()=>f,H9:()=>b,Yn:()=>$,gx:()=>x,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 P(e){return O(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function k(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 x(e){return T(e)?e:Promise.resolve(e)}function T(e){return e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}function A(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=x(e(...l,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=x(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 M(){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 j(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 $(e){return Promise.resolve().then((()=>{f(e)}))}},19153:(e,t,r)=>{"use strict";r.d(t,{Qs:()=>a,hP:()=>c,gx:()=>i,Cb:()=>l});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&&-1!==t.indexOf(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,eP:()=>s,xZ:()=>h,fS:()=>p,z3:()=>l,Hx:()=>f,W0:()=>i,Uc:()=>u,ZY:()=>d,lq:()=>a,KZ:()=>c,tP:()=>o})},17452:(e,t,r)=>{"use strict";r.d(t,{R9:()=>y,qg:()=>E,tD:()=>M,ZN:()=>le,fl:()=>ue,AX:()=>_,Gd:()=>v,Ie:()=>ie,sJ:()=>Q,AH:()=>K,vt:()=>oe,oh:()=>N,P$:()=>Z,Ml:()=>fe,ed:()=>j,b7:()=>C,D6:()=>R,tm:()=>$,YP:()=>B,jc:()=>D,HK:()=>H,$U:()=>X,oC:()=>Y,kl:()=>W,v_:()=>F,hF:()=>L,_l:()=>V,PF:()=>J,Fv:()=>q,B7:()=>S,u0:()=>P,Yd:()=>ne,Hu:()=>ce,Qj:()=>se,hO:()=>ee,mN:()=>O});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=new y(n.Z.applicationUrl),w={},_=(()=>{const e=(0,i.j0)(v.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${v.scheme}://${v.host}${null!=v.port?`:${v.port}`:""}${t}`})();function O(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=P(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 P(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 k(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function S(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=>k(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):k(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=X(e);const n=j(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&te()&&(r=ee(r)),O(r)}function E(e){const t=j(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?P(e.query):null}if(r){const t=O(e);e=r+"?"+t.path;const o=S({...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 A(e){return(e=re(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function M(e){const t={proxyUrl:e.proxyUrl,urlPrefix:A(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 j(e){const t=c.proxyRules,r=A(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function $(e,t){return e=I(e),t=I(t),re(e)===re(t)}function I(e){const t=(e=q(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function N(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 R(e,t,r=!1){const n=ae(e),o=ae(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function W(e){if("string"==typeof e){if(!B(e))return!0;e=ae(e)}if(R(e,v))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=U(t[r]);for(let t=0;t<n.length;t++)if(R(e,n[t]))return!0}return!1}function U(e){return w[e]||(G(e)||Y(e)?w[e]=[new y(L(e))]:w[e]=[new y(`http://${e}`),new y(`https://${e}`)]),w[e]}function L(e,t=_,r){return Y(e)?r&&r.preserveProtocolRelative?e:"http"===v.scheme&&v.authority===Z(e).slice(2)?`http:${e}`:`https:${e}`:G(e)?e:(0,i.j0)(F("/"===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 J(e,t=_,r){if(!B(e))return e;const n=q(e),o=n.toLowerCase(),s=q(t).toLowerCase().replace(/\/+$/,""),i=r?q(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 q(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===v.scheme&&Y(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"===v.scheme&&n===v.authority&&!b.test(e)||(te()&&n===v.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||te()&&!j(e))&&(e=ee(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=L(e=e.trim()))))}function F(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(B(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 Z(e,t=!1){if(D(e)||H(e))return null;let r=e.indexOf("://");if(-1===r&&Y(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=re(e,!0)),e}function B(e){return Y(e)||G(e)}function D(e){return null!=e&&"blob:"===e.slice(0,5)}function H(e){return"data:"===e.slice(0,5)}function K(e){const t=Q(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}const z=/^data:(.*?)(;base64)?,(.*)$/;function Q(e){const t=e.match(z);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function V(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function Y(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function G(e){return u.test(e)}function X(e){return d.test(e)||"https"===v.scheme&&Y(e)}function ee(e){return Y(e)?`https:${e}`:e.replace(f,"https:")}function te(){return"https"===v.scheme}function re(e,t=!1){return Y(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ne(e){let t=0;if(B(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function oe(e,t){if(!e)return"";const r=O(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 se(e){return e.replace(/\/+$/,"")}function ie(e,t,r){if(!(t&&r&&e&&B(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 ae(e){return"string"==typeof e?new y(L(e)):(e.scheme||(e.scheme=v.scheme),e)}function ce(e,t){const r=O(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 le(e,t,r){const n=O(e),o=n.query||{};return o[t]=String(r),`${n.path}?${S(o)}`}function ue(e,t){const r=O(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=S(n);return o?`${r.path}?${o}`:r.path}function fe(e){if((0,i.Wi)(e))return null;const t=e.match(de);return t?t[1]:null}const de=/.*?\.([^\/]*)$/},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(8778),r.e(6570),r.e(8316),r.e(2303),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(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(966)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(411),r.e(2781),r.e(6481),r.e(6459),r.e(3553)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(4588),r.e(411),r.e(1534),r.e(3485),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(5158)]).then(r.bind(r,41650)),GeoJSONSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(8961),r.e(147)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(5638),r.e(4588),r.e(411),r.e(1534),r.e(3485),r.e(3578),r.e(8961),r.e(7054),r.e(2730),r.e(3142)]).then(r.bind(r,53142)),PointCloudWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(411),r.e(9294),r.e(9474)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(411),r.e(7303),r.e(6921),r.e(5340)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(5265).then(r.bind(r,55265)),WFSSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(8316),r.e(2303),r.e(7668),r.e(411),r.e(1534),r.e(3578),r.e(8961),r.e(7054),r.e(2781),r.e(6348),r.e(4556),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(2303),r.e(1785),r.e(6810),r.e(9872)]).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){this._port=e,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});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),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)}}}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_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&&-1!==t.indexOf(".")){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})}_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);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,{Cs:()=>n,jt:()=>a,oi:()=>l,QM:()=>u,AB:()=>c});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,id:()=>a,qh:()=>c,i8:()=>s,Nv:()=>i});var n=r(80442),o=r(17452);const s="4.22",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,{r:()=>n,$:()=>o});const n="20211122",o="457614869cd8559337ba8e7dc9f9f9a7b9f8bc7f"}},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:"db5bae10b28d7908a154",36:"457dd64964cf7f404943",102:"fd2aefe36d3a299a3a93",147:"472df5b8be9c335eb999",223:"59640d78295e2e363f18",247:"a0450fbf01de854f5c97",280:"ea05f870dda27bca4fe8",402:"09fdc334ba4096a225ba",411:"8f4714cdd325b8e28957",511:"dd8c983c153c65ebceca",565:"d53ad780789f4d9124ad",576:"38e792e037e88a74995a",635:"12576e848e14cc1fbb70",639:"b935d0c8d5951298cc53",755:"7e0b4f9a847bb2a52338",819:"6280c69d87b2a3a18780",941:"0632f22aa1af88a238ce",966:"e9af7a5eb1e3bce4f0f9",1074:"2d9b32e3e24631cd4e34",1295:"a164ca7d87bfae334347",1387:"a3a55bd894e1eb739733",1421:"7fa2d758a24bbaaab0bf",1433:"1def8845714ea745fd24",1534:"09141e5539e652edfc6c",1762:"9375938d2d708f1b0271",1765:"e6b41012ade9bdce3244",1773:"aa57f2c380132c746730",1785:"8cf9f06a7efee8eabdd1",2134:"f3c0d0d182988a8d2b3f",2303:"3c4d68029ee2787f9653",2360:"90a5a3e4b38f1f466955",2399:"96f148a556a2418038de",2515:"446f1bc9822d03aa9a7a",2730:"594029863881481feacf",2781:"1de80cd934983f4adfcd",2785:"4fdf762d805ebb17624d",3027:"f30bb46f14bf3e658711",3081:"5ced15d85e540160c20e",3142:"f4a6865f9fd613c789cb",3172:"fe3ca2d2764525a8c67f",3230:"7351fbd8a9dbef027d06",3437:"7495218a8fa025c0c133",3471:"36c4bc3d84e9c3148776",3485:"c2268a36f90a9310feec",3516:"82bb1efd0941a08e7756",3529:"1229554d2f1fae96edda",3553:"a0aa8321b58109c6ae19",3578:"e39316a7998d3dde62bf",3668:"ab1aa39457f9205c9b79",3749:"701688ccf7a6c93c9147",3792:"c80c8aff0d14dd822454",3852:"62c683f44c297d239ab8",3942:"d7f77fe32bb2d69b5714",4067:"f9958a82ce78676e56eb",4166:"8a5e15bb513c65ef730d",4358:"f977977564b2b75332a9",4369:"cb5c42f598064c0c4eaa",4470:"4dca43553ef2090e4b5f",4499:"4d325ff7180a253d08c7",4556:"a465488578b87d63215d",4588:"e14b4af7eefcbc2c46a0",4599:"49bb222ee07a768e998d",4695:"14bef72154b3a19561a7",4720:"fe42716651b39518453c",4816:"d76aa27b92563db8f366",4859:"f7a8197264cbc51eac1d",4889:"0ca1ce6856620fc88011",5051:"ac9163e7b4d544b9aa78",5158:"af6251cc7973b43a1523",5265:"3131d0ebc834e33754e1",5340:"27b9aab0315a3dc7f5e4",5638:"ae7b979ce886b03937cc",5732:"469ba1b24cdeea0758ec",5823:"ddc4adb9b9997fb09b43",5837:"42c67e6579b54844ec06",5845:"3e43df5bd4cba6b0e91f",5853:"65536fcbe080a3c1f813",6104:"1120c94a972c7dbf12d8",6237:"c544df83e86a9d36b68c",6348:"1f02165e7758645b5e0d",6401:"06c34599afdb1fe03cbc",6459:"d8d182c41e8bb70db4c2",6481:"e3aed0a5b64180bdb6c3",6550:"2acb4b5e02cbd6229dfa",6570:"55d707784090d738bb26",6619:"86245d83dd17ebe39b2a",6690:"1d8a6ab5feb97d6ca846",6710:"d11d1d294ccc4ccdf60f",6740:"7eca3800807b2cd3fda0",6748:"0a225c0b6a82779de4dd",6774:"4a830f056c4d0ed93928",6810:"bd29ea967877fc6d7c53",6841:"597f8ce30413c6e86f7c",6884:"98ec617e71d9ec3f962b",6921:"64646de7e991f3076f60",6968:"66f06faae46eb8ea1b00",7039:"30d7685fc6dc1787df44",7049:"9453fdba689296828087",7054:"3ee19c9d81aeeef567e0",7055:"be1ca1154ec28d186311",7091:"63e08d2c2e9098a14ea8",7277:"f183da283af0836421ab",7284:"3414dd7ed9fadd64eb65",7303:"cb070e62a8ac85509384",7319:"3e7a0a81a1f07bce3b30",7392:"7b8f67fe55892fbfb17d",7572:"eb169653ed234382e811",7635:"599c9acfd08aaa88ef74",7668:"4513689048bc2a704bf4",7779:"863fe8818f19f82d4d36",7845:"db075f5e0827991efcfd",7873:"93eb468381bfcf0e47d7",8008:"0a3c38ce907eb1ff6e4d",8014:"ec0be96baf84a833cb38",8062:"e9e01881e762aa389401",8121:"3a32fc4f43d87fe84fcb",8216:"fcde45f86962b11353a6",8227:"1f394b20410fddb30a96",8316:"f98f64bbcb1b24d0d290",8422:"56c34f60fdc752ca8371",8511:"bd7a0b91157250f93aa3",8589:"02ce52ca0084536bc066",8625:"caa5d1b9680a822f2070",8659:"47dab63e1b2e64a96637",8683:"7becae4fffb0090a380c",8758:"826c983100569586b61f",8778:"b957ef59aa56b5c339f4",8828:"36de1a1959f038a61cca",8835:"ff9a9e705237c55f78ff",8846:"dadf9930c296c88c3a88",8936:"7802deb733e6a2d2f369",8961:"9796d54ff12b6429164a",9070:"db202ae7dc8b584f312f",9101:"35f53c6de66eec0573db",9151:"d42f289a65a98d752e12",9169:"f7ae0344257e6e08469b",9201:"83c18c36d8829d00c280",9221:"92b3ad00f9b4bf6dece1",9254:"ccaaefa20dfb940e8cc0",9291:"6e172b435a55bc72baef",9294:"95471140bd6ec868337e",9296:"e9608d8e0ea984aa35a0",9474:"d76ba25485e92bbda0c5",9489:"06a9cdf71330bf9cc774",9490:"7678b37f4f528af762e2",9561:"a0114820691d4dda8a67",9625:"39e48b3510a3c831299e",9664:"5aee3903ee34855d14f2",9767:"9e3fc6ba87fa55c33055",9872:"b245e95708cde2c403de",9884:"356db8b8297282c77291",9928:"5c561d65035d46249fb4",9932:"a00d39545a2db2a66816",9938:"8aa1910de5173c976dac"}[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,102: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 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[102],{68773:(e,t,r)=>{r.d(t,{Z:()=>s}),r(80442);var n,o=r(78286),i=r(17202);const s={apiKey:void 0,applicationUrl:null==(n=globalThis.location)?void 0:n.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryService:null,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",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)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){const e="4.22.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${i.r}/assets`}s.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(s,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),s.request.corsEnabledServers=[],s.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)=>{r.d(t,{Z:()=>s});var n=r(22974),o=r(92604),i=r(58896);class s extends i.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof s))return new s(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 s(e.name,e.message,e.details)}}s.prototype.type="error"},92604:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),i=r(19153);const s={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 s[this._parentWithMember("level",t)]<=s[e]}_argsToKey(...e){return(0,i.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)=>{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),i=null==o?"":o;if(void 0===i)throw new Error(`could not find key "${r}" in template`);return i.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{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)=>{r.d(t,{SO:()=>c,a9:()=>a,fS:()=>i,cq:()=>d,w6:()=>l,Od:()=>p,e$:()=>f,FY:()=>g});var n=r(70586),o=r(77734);function i(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}const s=!!Array.prototype.fill;function a(e,t){if(s)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function l(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 c{constructor(){this.last=0}}const u=new c;function d(e,t,r,n){n=n||u;const o=Math.max(0,n.last-10);for(let i=o;i<r;++i)if(e[i]===t)return n.last=i,i;const i=Math.min(o,r);for(let r=0;r<i;++r)if(e[r]===t)return n.last=r,r;return-1}function f(e,t,r,n){const o=null==r?e.length:r,i=d(e,t,o,n);if(-1!==i)return e[i]=e[o-1],null==r&&e.pop(),t}const h=new Set;function g(e,t,r=e.length,n=t.length,o,i){if(0===n||0===r)return r;h.clear();for(let e=0;e<n;++e)h.add(t[e]);o=o||u;const s=Math.max(0,o.last-10);for(let t=s;t<r;++t)if(h.has(e[t])&&(i&&i.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;for(let t=0;t<s;++t)if(h.has(e[t])&&(i&&i.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;return h.clear(),r}function p(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},80442:(e,t,r)=>{var n,o;let i;var s,a;function l(e){return"function"==typeof i[e]?i[e]=i[e](globalThis):i[e]}r.d(t,{Z:()=>l}),i=null!=(n=globalThis.dojoConfig)&&n.has||null!=(o=globalThis.esriConfig)&&o.has?{...null==(s=globalThis.dojoConfig)?void 0:s.has,...null==(a=globalThis.esriConfig)?void 0:a.has}:{},l.add=(e,t,r,n)=>((n||void 0===i[e])&&(i[e]=t),r&&l(e)),l.cache=i,l.add("esri-deprecation-warnings",!0),(()=>{var e;l.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(l.add("host-browser",t),l.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),l.add("dom",t),l("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(l.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),l.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),l.add("khtml",r.includes("Konqueror")?n:void 0),l.add("edge",parseFloat(t.split("Edge/")[1])||void 0),l.add("opr",parseFloat(t.split("OPR/")[1])||void 0),l.add("webkit",!l("wp")&&!l("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),l.add("chrome",!l("edge")&&!l("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),l.add("android",!l("wp")&&parseFloat(t.split("Android ")[1])||void 0),l.add("safari",!r.includes("Safari")||l("wp")||l("chrome")||l("android")||l("edge")||l("opr")?void 0:parseFloat(r.split("Version/")[1])),l.add("mac",r.includes("Macintosh")),!l("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,""));l.add(e,n),l.add("ios",n)}l.add("trident",parseFloat(r.split("Trident/")[1])||void 0),l("webkit")||(!t.includes("Gecko")||l("wp")||l("khtml")||l("trident")||l("edge")||l.add("mozilla",n),l("mozilla")&&l.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&&l.add("esri-mobile",t),r&&l.add("esri-iPhone",r),l.add("esri-geolocation",!!navigator.geolocation)}l.add("esri-canvas-svg-support",!l("trident")),l.add("esri-wasm","WebAssembly"in globalThis),l.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),l.add("esri-atomics","Atomics"in globalThis),l.add("esri-workers","Worker"in globalThis),l.add("esri-text-decoder","TextDecoder"in globalThis),l.add("esri-text-encoder","TextEncoder"in globalThis),l.add("web-feat:cache","caches"in globalThis),l.add("esri-workers-arraybuffer-transfer",!l("safari")||Number(l("safari"))>=12),l.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),l.add("featurelayer-simplify-payload-size-factors",[1,1,4]),l.add("featurelayer-snapshot-enabled",!0),l.add("featurelayer-snapshot-point-min-threshold",8e4),l.add("featurelayer-snapshot-point-max-threshold",4e5),l.add("featurelayer-snapshot-point-coverage",.1),l.add("featurelayer-advanced-symbols",!1),l.add("featurelayer-pbf",!0),l.add("featurelayer-pbf-statistics",!1),l.add("feature-layers-workers",!0),l.add("mapview-transitions-duration",200),l.add("mapserver-pbf-enabled",!1),l.add("vectortilelayer-max-buffers",l("ff")?160:Number.POSITIVE_INFINITY),l("host-webworker")||l("host-browser")&&(l.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),l.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((()=>{l.add("esri-image-decode",!0,!0,!0)})).catch((()=>{l.add("esri-image-decode",!1,!0,!0)}))}return!1})),l.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{r.d(t,{d9:()=>i,fS:()=>s,yd:()=>o}),r(67676),r(80442);var n=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(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;if((0,n.W0)(e)||(0,n.lq)(e)||(0,n.KZ)(e)||(0,n.z3)(e)||(0,n.Uc)(e)||(0,n.Hx)(e)||(0,n.ZY)(e)||(0,n.xZ)(e)||(0,n.fS)(e))return(0,n.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}let t;const r=e;if("function"==typeof r.clone)t=r.clone();else if("function"==typeof r.map&&"function"==typeof r.forEach)t=r.map(i);else if("function"==typeof r.notifyChange&&"function"==typeof r.watch)t=r.clone();else{t={};for(const r of Object.getOwnPropertyNames(e))t[r]=i(e[r])}return t}function s(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)=>{function n(e){return null!=e}function o(e){return null==e}function i(e){return void 0===e}function s(e,t){return n(e)?t(e):null}function a(e){return e}function l(e,t){if(o(e))throw new Error(t);return e}function c(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function f(e){return n(e)&&e.remove(),null}function h(e){return n(e)&&e.release(),null}function g(e){return null}function p(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)y(r,null,t)}function y(e,t,r){return n(e)?r(e):t}function w(e,t){return n(e)?t(e):null}function b(e){return e.filter((e=>n(e)))}function v(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,{Po:()=>w,yw:()=>s,j0:()=>_,SC:()=>u,O3:()=>d,lV:()=>b,JR:()=>m,U2:()=>v,Wi:()=>o,pC:()=>n,o8:()=>i,Fd:()=>p,R2:()=>y,Bd:()=>g,RY:()=>h,hw:()=>f,Wg:()=>a,Pt:()=>c,s3:()=>l})},78286:(e,t,r)=>{r.d(t,{RH:()=>o,hS:()=>i,RB:()=>s});var n=r(22974);function o(e,t,r=!1){return l(e,t,r)}function i(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function s(e,t,r){const n=e.split("."),o=n.pop(),i=a(n,!0,r);i&&o&&(i[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 l(e,t,r){return t?Object.keys(t).reduce((function(e,o){let i=e[o],s=t[o];return i===s?e:void 0===i?(e[o]=(0,n.d9)(s),e):(Array.isArray(s)||Array.isArray(e)?(i=i?Array.isArray(i)?e[o]=i.concat():e[o]=[i]:e[o]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach((e=>{-1===i.indexOf(e)&&i.push(e)})):e[o]=s.concat())):s&&"object"==typeof s?e[o]=l(i,s,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=s),e)}),e||{}):e}},19153:(e,t,r)=>{r.d(t,{Qs:()=>a,hP:()=>l,gx:()=>s,Cb:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function i(e){return null==e?"":e}function s(e,t){return e.replace(o,"object"==typeof t?(e,r)=>i((0,n.hS)(r,t)):(e,r)=>i(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&-1!==t.indexOf(e)?e:`\\${e}`))}function l(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function c(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{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 i(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function s(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 l(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function c(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 d(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function f(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 g(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,eP:()=>i,xZ:()=>h,fS:()=>g,z3:()=>c,Hx:()=>d,W0:()=>s,Uc:()=>u,ZY:()=>f,lq:()=>a,KZ:()=>l,tP:()=>o})},17202:(e,t,r)=>{r.d(t,{r:()=>n,$:()=>o});const n="20211121",o="7c2f3a944338204a67682c5bff52eb9c8103c038"}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[102],{68773:(e,t,r)=>{r.d(t,{Z:()=>s}),r(80442);var n,o=r(78286),i=r(17202);const s={apiKey:void 0,applicationUrl:null==(n=globalThis.location)?void 0:n.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryService:null,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",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)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){const e="4.22.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${i.r}/assets`}s.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(s,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),s.request.corsEnabledServers=[],s.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)=>{r.d(t,{Z:()=>s});var n=r(22974),o=r(92604),i=r(58896);class s extends i.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof s))return new s(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 s(e.name,e.message,e.details)}}s.prototype.type="error"},92604:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),i=r(19153);const s={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 s[this._parentWithMember("level",t)]<=s[e]}_argsToKey(...e){return(0,i.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)=>{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),i=null==o?"":o;if(void 0===i)throw new Error(`could not find key "${r}" in template`);return i.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{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)=>{r.d(t,{SO:()=>c,a9:()=>a,fS:()=>i,cq:()=>d,w6:()=>l,Od:()=>p,e$:()=>f,FY:()=>g});var n=r(70586),o=r(77734);function i(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}const s=!!Array.prototype.fill;function a(e,t){if(s)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function l(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 c{constructor(){this.last=0}}const u=new c;function d(e,t,r,n){n=n||u;const o=Math.max(0,n.last-10);for(let i=o;i<r;++i)if(e[i]===t)return n.last=i,i;const i=Math.min(o,r);for(let r=0;r<i;++r)if(e[r]===t)return n.last=r,r;return-1}function f(e,t,r,n){const o=null==r?e.length:r,i=d(e,t,o,n);if(-1!==i)return e[i]=e[o-1],null==r&&e.pop(),t}const h=new Set;function g(e,t,r=e.length,n=t.length,o,i){if(0===n||0===r)return r;h.clear();for(let e=0;e<n;++e)h.add(t[e]);o=o||u;const s=Math.max(0,o.last-10);for(let t=s;t<r;++t)if(h.has(e[t])&&(i&&i.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;for(let t=0;t<s;++t)if(h.has(e[t])&&(i&&i.push(e[t]),h.delete(e[t]),e[t]=e[r-1],--r,--t,0===h.size||0===r))return h.clear(),r;return h.clear(),r}function p(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},80442:(e,t,r)=>{var n,o;let i;var s,a;function l(e){return"function"==typeof i[e]?i[e]=i[e](globalThis):i[e]}r.d(t,{Z:()=>l}),i=null!=(n=globalThis.dojoConfig)&&n.has||null!=(o=globalThis.esriConfig)&&o.has?{...null==(s=globalThis.dojoConfig)?void 0:s.has,...null==(a=globalThis.esriConfig)?void 0:a.has}:{},l.add=(e,t,r,n)=>((n||void 0===i[e])&&(i[e]=t),r&&l(e)),l.cache=i,l.add("esri-deprecation-warnings",!0),(()=>{var e;l.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(l.add("host-browser",t),l.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),l.add("dom",t),l("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(l.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),l.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),l.add("khtml",r.includes("Konqueror")?n:void 0),l.add("edge",parseFloat(t.split("Edge/")[1])||void 0),l.add("opr",parseFloat(t.split("OPR/")[1])||void 0),l.add("webkit",!l("wp")&&!l("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),l.add("chrome",!l("edge")&&!l("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),l.add("android",!l("wp")&&parseFloat(t.split("Android ")[1])||void 0),l.add("safari",!r.includes("Safari")||l("wp")||l("chrome")||l("android")||l("edge")||l("opr")?void 0:parseFloat(r.split("Version/")[1])),l.add("mac",r.includes("Macintosh")),!l("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,""));l.add(e,n),l.add("ios",n)}l.add("trident",parseFloat(r.split("Trident/")[1])||void 0),l("webkit")||(!t.includes("Gecko")||l("wp")||l("khtml")||l("trident")||l("edge")||l.add("mozilla",n),l("mozilla")&&l.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&&l.add("esri-mobile",t),r&&l.add("esri-iPhone",r),l.add("esri-geolocation",!!navigator.geolocation)}l.add("esri-canvas-svg-support",!l("trident")),l.add("esri-wasm","WebAssembly"in globalThis),l.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),l.add("esri-atomics","Atomics"in globalThis),l.add("esri-workers","Worker"in globalThis),l.add("esri-text-decoder","TextDecoder"in globalThis),l.add("esri-text-encoder","TextEncoder"in globalThis),l.add("web-feat:cache","caches"in globalThis),l.add("esri-workers-arraybuffer-transfer",!l("safari")||Number(l("safari"))>=12),l.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),l.add("featurelayer-simplify-payload-size-factors",[1,1,4]),l.add("featurelayer-snapshot-enabled",!0),l.add("featurelayer-snapshot-point-min-threshold",8e4),l.add("featurelayer-snapshot-point-max-threshold",4e5),l.add("featurelayer-snapshot-point-coverage",.1),l.add("featurelayer-advanced-symbols",!1),l.add("featurelayer-pbf",!0),l.add("featurelayer-pbf-statistics",!1),l.add("feature-layers-workers",!0),l.add("mapview-transitions-duration",200),l.add("mapserver-pbf-enabled",!1),l.add("vectortilelayer-max-buffers",l("ff")?160:Number.POSITIVE_INFINITY),l("host-webworker")||l("host-browser")&&(l.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),l.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((()=>{l.add("esri-image-decode",!0,!0,!0)})).catch((()=>{l.add("esri-image-decode",!1,!0,!0)}))}return!1})),l.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{r.d(t,{d9:()=>i,fS:()=>s,yd:()=>o}),r(67676),r(80442);var n=r(1533);function o(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&o(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;if((0,n.W0)(e)||(0,n.lq)(e)||(0,n.KZ)(e)||(0,n.z3)(e)||(0,n.Uc)(e)||(0,n.Hx)(e)||(0,n.ZY)(e)||(0,n.xZ)(e)||(0,n.fS)(e))return(0,n.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}let t;const r=e;if("function"==typeof r.clone)t=r.clone();else if("function"==typeof r.map&&"function"==typeof r.forEach)t=r.map(i);else if("function"==typeof r.notifyChange&&"function"==typeof r.watch)t=r.clone();else{t={};for(const r of Object.getOwnPropertyNames(e))t[r]=i(e[r])}return t}function s(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)=>{function n(e){return null!=e}function o(e){return null==e}function i(e){return void 0===e}function s(e,t){return n(e)?t(e):null}function a(e){return e}function l(e,t){if(o(e))throw new Error(t);return e}function c(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function f(e){return n(e)&&e.remove(),null}function h(e){return n(e)&&e.release(),null}function g(e){return null}function p(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)y(r,null,t)}function y(e,t,r){return n(e)?r(e):t}function w(e,t){return n(e)?t(e):null}function b(e){return e.filter((e=>n(e)))}function v(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,{Po:()=>w,yw:()=>s,j0:()=>_,SC:()=>u,O3:()=>d,lV:()=>b,JR:()=>m,U2:()=>v,Wi:()=>o,pC:()=>n,o8:()=>i,Fd:()=>p,R2:()=>y,Bd:()=>g,RY:()=>h,hw:()=>f,Wg:()=>a,Pt:()=>c,s3:()=>l})},78286:(e,t,r)=>{r.d(t,{RH:()=>o,hS:()=>i,RB:()=>s});var n=r(22974);function o(e,t,r=!1){return l(e,t,r)}function i(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function s(e,t,r){const n=e.split("."),o=n.pop(),i=a(n,!0,r);i&&o&&(i[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 l(e,t,r){return t?Object.keys(t).reduce((function(e,o){let i=e[o],s=t[o];return i===s?e:void 0===i?(e[o]=(0,n.d9)(s),e):(Array.isArray(s)||Array.isArray(e)?(i=i?Array.isArray(i)?e[o]=i.concat():e[o]=[i]:e[o]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach((e=>{-1===i.indexOf(e)&&i.push(e)})):e[o]=s.concat())):s&&"object"==typeof s?e[o]=l(i,s,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=s),e)}),e||{}):e}},19153:(e,t,r)=>{r.d(t,{Qs:()=>a,hP:()=>l,gx:()=>s,Cb:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function i(e){return null==e?"":e}function s(e,t){return e.replace(o,"object"==typeof t?(e,r)=>i((0,n.hS)(r,t)):(e,r)=>i(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&-1!==t.indexOf(e)?e:`\\${e}`))}function l(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function c(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{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 i(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function s(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 l(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function c(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 d(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function f(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 g(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,eP:()=>i,xZ:()=>h,fS:()=>g,z3:()=>c,Hx:()=>d,W0:()=>s,Uc:()=>u,ZY:()=>f,lq:()=>a,KZ:()=>l,tP:()=>o})},17202:(e,t,r)=>{r.d(t,{r:()=>n,$:()=>o});const n="20211122",o="457614869cd8559337ba8e7dc9f9f9a7b9f8bc7f"}}]);
|
package/chunks/Fog.glsl.js
CHANGED
|
@@ -31,7 +31,7 @@ return vec2((-b - sqrt(d)) / (2.0 * a), (-b + sqrt(d)) / (2.0 * a));
|
|
|
31
31
|
float sunAmount = max(0.0, dot(rayDir, lightingMainDirection));
|
|
32
32
|
|
|
33
33
|
float lightAngle = max(0.0, dot(normalize(cameraPosition + dist * rayDir), lightingMainDirection));
|
|
34
|
-
${i.haze?t`vec3 fogColor = mix(vec3(0.
|
|
34
|
+
${i.haze?t`vec3 fogColor = mix(vec3(0.0), vec3(0.24, 0.44, 0.8), lightAngle);`:t`vec3 fogColor = mix(vec3(0.1), vec3(1.5), lightAngle);`}
|
|
35
35
|
|
|
36
36
|
float phase = sky ? pow(sunAmount, 16.0) : 0.0;
|
|
37
37
|
vec3 col = (lightAngle * vec3(1.0, 0.6, 0.3) * phase + fogColor) * fogAmount;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Slice as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputDepth as i}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{ReadLinearDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import{LineStipple as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{multipassTerrainTest as
|
|
5
|
+
import{Slice as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputDepth as i}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{ReadLinearDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import{LineStipple as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{multipassTerrainTest as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PiUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{symbolAlphaCutoff as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{glsl as p}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as d}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";const c=1;function v(v){const f=new d;f.extensions.add("GL_OES_standard_derivatives"),f.include(o),f.include(t,v),f.include(r,v),1===v.output&&f.include(i,v),f.vertex.uniforms.add("proj","mat4").add("view","mat4").add("cameraNearFar","vec2").add("pixelRatio","float").add("miterLimit","float").add("screenSize","vec2"),f.attributes.add("position","vec3"),f.attributes.add("subdivisionFactor","float"),f.attributes.add("uv0","vec2"),f.attributes.add("auxpos1","vec3"),f.attributes.add("auxpos2","vec3"),f.varyings.add("vColor","vec4"),f.varyings.add("vpos","vec3"),f.varyings.add("linearDepth","float"),v.multipassTerrainEnabled&&f.varyings.add("depth","float");const m=2===v.capType,g=v.stippleEnabled&&m,h=v.falloffEnabled||g,u=v.innerColorEnabled,D=v.stippleEnabled&&v.stippleScaleWithLineWidth||m,x=v.stippleEnabled&&v.stippleScaleWithLineWidth,b=1===v.capType||m;return D&&f.varyings.add("vLineWidth","float"),x&&f.varyings.add("vLineSizeInv","float"),u&&f.varyings.add("vLineDistance","float"),h&&f.varyings.add("vLineDistanceNorm","float"),v.falloffEnabled&&f.fragment.uniforms.add("falloff","float"),v.innerColorEnabled&&(f.fragment.uniforms.add("innerColor","vec4"),f.fragment.uniforms.add("innerWidth","float")),m&&f.varyings.add("vCapPosition","vec2"),f.vertex.code.add(p`#define PERPENDICULAR(v) vec2(v.y, -v.x);
|
|
6
6
|
float interp(float ncp, vec4 a, vec4 b) {
|
|
7
7
|
return (-ncp - a.z) / (b.z - a.z);
|
|
8
8
|
}
|
|
@@ -199,7 +199,7 @@ float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),f.vertex.
|
|
|
199
199
|
float patternLength = ${v.stippleScaleWithLineWidth?"lineSize * ":""} stipplePatternPixelSize;
|
|
200
200
|
|
|
201
201
|
// Compute the coordinates at both start and end of the line segment, because we need both to clamp to in the fragment shader
|
|
202
|
-
// The 0.5 factor
|
|
202
|
+
// The 0.5 factor is because the screen length was calculated at double the screen size (see projectAndScale method)
|
|
203
203
|
vStippleDistanceLimits = computeStippleDistanceLimits(startPseudoScreen, segmentLengthPseudoScreen, segmentLengthScreen * 0.5, patternLength);
|
|
204
204
|
|
|
205
205
|
${b?p`vStippleDistanceLimits += vec2(lineSize * 0.5);`:""}
|
|
@@ -225,7 +225,7 @@ vColor = getColor();
|
|
|
225
225
|
vColor.a *= coverage;
|
|
226
226
|
gl_Position = pos;
|
|
227
227
|
}
|
|
228
|
-
}`),v.multipassTerrainEnabled&&(f.fragment.include(n),f.include(
|
|
228
|
+
}`),v.multipassTerrainEnabled&&(f.fragment.include(n),f.include(a,v)),f.include(e,v),f.fragment.uniforms.add("intrinsicColor","vec4"),f.fragment.include(l),f.fragment.code.add(p`
|
|
229
229
|
void main() {
|
|
230
230
|
discardBySlice(vpos);
|
|
231
231
|
${v.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const c="
|
|
5
|
+
const c="20211122",f="457614869cd8559337ba8e7dc9f9f9a7b9f8bc7f";export{c as buildDate,f as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../config.js";import t from"../../../../request.js";import{bidiText as i}from"../../../../core/BidiText.js";import s from"../../../../core/Error.js";import r from"../../../../core/Logger.js";import{isNone as n,isSome as o}from"../../../../core/maybe.js";import{throwIfAborted as a,isAbortError as h}from"../../../../core/promiseUtils.js";import{pt2px as c}from"../../../../core/screenUtils.js";import{s as u}from"../../../../chunks/vec2.js";import{c as d}from"../../../../chunks/vec2f32.js";import
|
|
5
|
+
import e from"../../../../config.js";import t from"../../../../request.js";import{bidiText as i}from"../../../../core/BidiText.js";import s from"../../../../core/Error.js";import r from"../../../../core/Logger.js";import{isNone as n,isSome as o}from"../../../../core/maybe.js";import{throwIfAborted as a,isAbortError as h}from"../../../../core/promiseUtils.js";import{pt2px as c}from"../../../../core/screenUtils.js";import{s as u}from"../../../../chunks/vec2.js";import{c as d}from"../../../../chunks/vec2f32.js";import l from"../../../../symbols/cim/Rasterizer.js";import{TEXTURE_BINDING_GLYPH_ATLAS as m,TEXTURE_BINDING_SPRITE_ATLAS as g}from"./definitions.js";import{MosaicType as p}from"./enums.js";import{getFullyQualifiedFontName as f}from"./fontUtils.js";import _ from"./GlyphMosaic.js";import w from"./GlyphSource.js";import y from"./SDFConverter.js";import M from"./SpriteMosaic.js";import{is3D as v,charCodes as I,isSimple as b,isSVGResource as R,isImageResource as z,shouldRepeat as T,getPMSResourceSize as j,isGIF as x,isPNG as S,getUrl as U,isSVGImage as B}from"./Utils.js";import G,{isPNG as C,isAnimatedPNG as F}from"./animatedFormats/apng.js";import P,{isGIF as q,isAnimatedGIF as L}from"./animatedFormats/gif.js";import{ok as $}from"./util/Result.js";import{keyFromSymbol as k}from"./util/symbolUtils.js";import{QueueProcessor as A}from"../../../support/QueueProcessor.js";const O=d(),N="arial-unicode-ms-regular",Q=126,E=r.getLogger("esri.views.2d.engine.webgl.TextureManager");async function H(e,i){const r=U(e);let n;const o=";base64,";if(r.includes(o)){const e=r.indexOf(o)+o.length,t=r.substring(e),i=atob(t),s=new Uint8Array(i.length);for(let r=0;r<i.length;r++)s[r]=i.charCodeAt(r);n=s.buffer}else try{const{data:e}=await t(r,{responseType:"array-buffer",...i});n=e}catch(a){if(!h(a))return new s("mapview-invalid-resource",`Could not fetch requested resource at ${r}`)}return n}function V(e,t){const i=Math.round(c(t)*window.devicePixelRatio),s=i>=128?2:4;return Math.min(e,i*s)}const Y=(e,t,i)=>E.error(new s(e,t,i));class D{constructor(e,t,i){this.mosaicType=e,this.page=t,this.sdf=i}static fromMosaic(e,t){return new D(e,t.page,t.sdf)}}class J{constructor(i,r){this.resourceManager=r,this._invalidFontsMap=new Map,this._sdfConverter=new y(Q),this._bindingInfos=new Array,this._hashToBindingIndex=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new A({concurrency:10,process:async(e,i)=>{a(i);try{return await t(e,{responseType:"image",signal:i})}catch(r){if(!h(r))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,r);throw r}}}),this._spriteMosaic=new M(i,2048,2048,500),this._glyphSource=new w(`${e.fontsUrl}/{fontstack}/{range}.pbf`),this._glyphMosaic=new _(1024,1024,this._glyphSource),this._rasterizer=new l(r)}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingIndex.clear(),this._hashToBindingIndex=null,this._bindingInfos=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}async rasterizeItem(e,t,i,s){if(n(e))return Y("mapview-null-resource","Unable to rasterize null resource"),null;switch(e.type){case"text":case"esriTS":{const t=await this._rasterizeText(e,i,s);return t.forEach((e=>this._setTextureBinding(p.GLYPH,e))),{glyphMosaicItems:t}}default:{if(v(e))return Y("mapview-invalid-type",`MapView does not support symbol type: ${e.type}`,e),null;const i=await this._rasterizeSpriteSymbol(e,t,s);return $(i)&&i&&this._setTextureBinding(p.SPRITE,i),{spriteMosaicItem:i}}}}bindTextures(e,t,i,s=!1){if(0===i.textureBinding)return;const r=this._bindingInfos[i.textureBinding-1],n=r.page,o=s?9987:9729;switch(r.mosaicType){case p.SPRITE:{const i=this.sprites.getWidth(n),s=this.sprites.getHeight(n),r=u(O,i,s);return this._spriteMosaic.bind(e,o,n,g),t.setUniform1i("u_texture",g),void t.setUniform2fv("u_mosaicSize",r)}case p.GLYPH:{const i=this.glyphs.width,s=this.glyphs.height,r=u(O,i,s);return this._glyphMosaic.bind(e,o,n,m),t.setUniform1i("u_texture",m),void t.setUniform2fv("u_mosaicSize",r)}default:E.error("mapview-texture-manager",`Cannot handle unknown type ${r.mosaicType}`)}}_hashMosaic(e,t){return 1|e<<1|(t.sdf?1:0)<<2|t.page<<3}_setTextureBinding(e,t){const i=this._hashMosaic(e,t);if(!this._hashToBindingIndex.has(i)){const s=D.fromMosaic(e,t),r=this._bindingInfos.length+1;this._hashToBindingIndex.set(i,r),this._bindingInfos.push(s)}t.textureBinding=this._hashToBindingIndex.get(i)}async _rasterizeText(e,t,s){let r,n;if("cim"in e){const t=e;r=t.fontName,n=t.text}else{const t=e;r=f(t.font),n=t.text}const o=this._invalidFontsMap.has(r),a=t||I(i(n)[0]);try{return await this._glyphMosaic.getGlyphItems(o?N:r,a,s)}catch(h){return Y("mapview-invalid-resource",`Couldn't find font ${r}. Falling back to Arial Unicode MS Regular`),this._invalidFontsMap.set(r,!0),this._glyphMosaic.getGlyphItems(N,a,s)}}async _rasterizeSpriteSymbol(e,t,i){if(b(e))return null;const r=k(e);if(this._spriteMosaic.has(r))return this._spriteMosaic.getSpriteItem(r);if(R(e)||z(e))return this._handleAsyncResource(r,e,i);const n=1,o=this._rasterizer.rasterizeJSONResource(e,n);if(o){const{size:t,image:i,sdf:s,simplePattern:n}=o;return this._addItemToMosaic(r,t,{type:"static",data:i},T(e),s,n)}return new s("TextureManager","unrecognized or null rasterized image")}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let s;s=R(t)?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,s);try{await s,this._ongoingRasterizations.delete(e)}catch{this._ongoingRasterizations.delete(e)}return s}async _handleSVG(e,t,i){const s=[Q,Q],r=await this._sdfConverter.draw(e.path,i);return this._addItemToMosaic(t,s,{type:"static",data:new Uint32Array(r.buffer)},!1,!0,!0)}async _handleGIFOrPNG(e,t,i){const r=await H(e,i);if($(r)){const o=q(r),a=C(r);if(!o&&!a)return new s("mapview-invalid-resource","Image data is neither GIF nor PNG!");let c;try{o&&L(r)?c=await P.create(r,i):a&&F(r)&&(c=await G.create(r,i))}catch(n){if(!h(n))return new s("mapview-invalid-resource","Could not fetch requested resource!")}if(c&&$(c))return this._addItemToMosaic(t,[c.width,c.height],{type:"animated",data:c},T(e),!1,!1);const u=new Blob([r],{type:o?"image/gif":"image/png"}),d=await this._imageFromBlob(u);if(d&&d instanceof HTMLImageElement){let i=d.width,s=d.height;"esriPMS"===e.type&&(i=Math.round(V(d.width,j(e))),s=Math.round(d.height*(i/d.width)));const r="cim"in e?e.cim.colorSubstitutions:void 0,{size:n,sdf:o,image:a}=this._rasterizer.rasterizeImageResource(i,s,d,r);return this._addItemToMosaic(t,n,{type:"static",data:a},T(e),o,!1)}}return new s("mapview-invalid-resource","Could not handle resource!")}async _handleImage(e,t,i){if(x(e)||S(e))return this._handleGIFOrPNG(e,t,i);const r=U(e);try{let s;const n=this.resourceManager.getResource(r);if(o(n))s=n;else{const{data:e}=await this._imageRequestQueue.push(r,{...i});s=e}if(B(r)&&"width"in e&&"height"in e&&(s.width=c(e.width),s.height=c(e.height)),!s.width||!s.height)return null;let a=s.width,h=s.height;"esriPMS"===e.type&&(a=Math.round(V(s.width,j(e))),h=Math.round(s.height*(a/s.width)));const u="cim"in e?e.cim.colorSubstitutions:void 0,{size:d,sdf:l,image:m}=this._rasterizer.rasterizeImageResource(a,h,s,u);return this._addItemToMosaic(t,d,{type:"static",data:m},T(e),l,!1)}catch(n){if(!h(n))return new s("mapview-invalid-resource",`Could not fetch requested resource at ${r}. ${n.message}`)}}async _imageFromBlob(e){const t=window.URL.createObjectURL(e);try{const{data:e}=await this._imageRequestQueue.push(t);return window.URL.revokeObjectURL(t),e}catch(i){if(window.URL.revokeObjectURL(t),!h(i))return new s("mapview-invalid-resource",`Could not fetch requested resource at ${t}`);throw i}}_addItemToMosaic(e,t,i,s,r,n){return this._spriteMosaic.addSpriteItem(e,t,i,s,r,n)}}export{J as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Handles.js";import{releaseMaybe as t,disposeMaybe as i,destroyMaybe as s,isSome as a,isNone as r,unwrapOr as h}from"../../../core/maybe.js";import{on as n}from"../../../core/watchUtils.js";import{b as o}from"../../../chunks/mat4.js";import{c as d}from"../../../chunks/mat4f64.js";import{s as _}from"../../../chunks/vec2.js";import{a as m}from"../../../chunks/vec2f64.js";import{s as u,l as c,g as l}from"../../../chunks/vec3.js";import{c as p}from"../../../chunks/vec3f64.js";import{c as f,f as v}from"../../../chunks/vec4f64.js";import{earth as g}from"../../../geometry/support/Ellipsoid.js";import{rayLeighScaleHeight as b,atmosphereHeight as T,betaRayleigh as w,betaOzone as R,betaMie as j,innerAtmosphereDepth as H,computeInnerAltitudeFade as x}from"./atmosphereUtils.js";import{ChapmanAtmosphereTechniqueConfiguration as q,ChapmanAtmosphereTechnique as E}from"./ChapmanAtmosphereTechnique.js";import{Pos2Tex as U}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as B}from"../webgl-engine/lib/glUtil3D.js";class F{constructor(e){this._view=e,this.canRender=!0,this._cameraPosition=p(),this._projectionInverse=d(),this._viewInverse=d(),this._heightParameters=f(),this._betasRayleigh=p(),this._betasCombined=p(),this._scaleHeight=0,this._radii=m(),this._nearFar=m(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=g.radius,this._updateRadius(g.radius)}destroy(){this._atmosphereTechnique=t(this._atmosphereTechnique),this._atmosphereHazeTechnique=t(this._atmosphereHazeTechnique),this._vao=i(this._vao),this._handles=s(this._handles)}when(){return Promise.resolve()}initializeRenderContext(t){const i=t.renderContext.rctx;this._handles=new e,a(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(n(this._view,"basemapTerrain","elevation-change",(e=>this._updateElevation(e)),(()=>this._updateElevation()))),this._handles.add(n(this._view,"basemapTerrain","elevation-bounds-change",(()=>this._updateVisibleElevationBounds())));const s=new q;s.haze=!1,this._atmosphereTechnique=t.shaderTechniqueRep.acquire(E,s),s.haze=!0,this._atmosphereHazeTechnique=t.shaderTechniqueRep.acquire(E,s),this._vao=B(i,U),this._scaleHeight=b*T,u(this._betasRayleigh,w[0],w[1],w[2]),u(this._betasCombined,w[0]+R[0],w[1]+R[1],w[2]+R[2])}render(e){return this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e){return this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,i){this._update(e.camera);const s=e.rctx,a=e.offscreenRenderingHelper;return s.useProgram(t.program),t.bindPipelineState(s),a.renderDepthDetached((()=>{t.program.bindTexture(i,"depthTex"),this._renderCommon(t.program,e)})),!0}_renderCommon(e,t){if(r(this._vao))return!1;const i=t.rctx;return t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform2fv("radii",this._radii),e.setUniform1f("scaleHeight",this._scaleHeight),e.setUniform1f("betaMie",j),e.setUniform3fv("betaRayleigh",this._betasRayleigh),e.setUniform3fv("betaCombined",this._betasCombined),e.setUniform1f("innerFadeDistance",this._innerFadeDistance),e.setUniform1f("altitudeFade",this._altitudeFade),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(5,0,4),!0}_adjustRadiusForTesselation(e){return e*Math.cos(Math.PI/16/16)}_updateElevation(e){const t=e?e.tile:h(this._view.basemapTerrain.rootTiles,[null])[0];if(r(t)||0!==t.lij[0])return;const i=this._adjustRadiusForTesselation(g.radius+t.elevationBounds[0]);i!==this._lowerElevationBoundRadius&&(this._lowerElevationBoundRadius=i,this._lowerBoundEarthRadius=-1,this._updateVisibleElevationBounds())}_updateVisibleElevationBounds(){const e=this._adjustRadiusForTesselation(g.radius+this._view.basemapTerrain.elevationBounds.min);(this._lowerBoundEarthRadius<0||e<this._lowerBoundEarthRadius)&&this._updateRadius(e)}_updateRadius(e){this._lowerBoundEarthRadius=e,_(this._radii,e,e+T),this._innerFadeDistance=2*Math.sqrt((2*e-H)*H)}_update(e){if(r(e))return;this._cameraHeight=c(e.eye),this._cameraHeightSq=this._cameraHeight*this._cameraHeight,this._cAtmosphere=this._cameraHeightSq-this._radii[1]*this._radii[1];const t=Math.min(1,Math.max(0,(this._cameraHeight-this._radii[0])/T));this._heightParameters=v(this._cameraHeight,this._cameraHeightSq,this._cAtmosphere,t),l(this._cameraPosition,e.eye),o(this._projectionInverse,e.projectionMatrix),o(this._viewInverse,e.viewMatrix),_(this._nearFar,e.near,e.far),this._altitudeFade=x(this._cameraHeight-this._lowerBoundEarthRadius)}static isSupported(e){return e.renderContext.rctx.capabilities.depthTexture}}export{F as ChapmanAtmosphere};
|
|
5
|
+
import e from"../../../core/Handles.js";import{releaseMaybe as t,disposeMaybe as i,destroyMaybe as s,isSome as a,isNone as r,unwrapOr as h}from"../../../core/maybe.js";import{on as n}from"../../../core/watchUtils.js";import{b as o}from"../../../chunks/mat4.js";import{c as d}from"../../../chunks/mat4f64.js";import{s as _}from"../../../chunks/vec2.js";import{a as m}from"../../../chunks/vec2f64.js";import{s as u,l as c,g as l}from"../../../chunks/vec3.js";import{c as p}from"../../../chunks/vec3f64.js";import{c as f,f as v}from"../../../chunks/vec4f64.js";import{earth as g}from"../../../geometry/support/Ellipsoid.js";import{rayLeighScaleHeight as b,atmosphereHeight as T,betaRayleigh as w,betaOzone as R,betaMie as j,innerAtmosphereDepth as H,computeInnerAltitudeFade as x}from"./atmosphereUtils.js";import{ChapmanAtmosphereTechniqueConfiguration as q,ChapmanAtmosphereTechnique as E}from"./ChapmanAtmosphereTechnique.js";import{Pos2Tex as U}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as B}from"../webgl-engine/lib/glUtil3D.js";class F{constructor(e){this._view=e,this.type="realistic",this.canRender=!0,this._cameraPosition=p(),this._projectionInverse=d(),this._viewInverse=d(),this._heightParameters=f(),this._betasRayleigh=p(),this._betasCombined=p(),this._scaleHeight=0,this._radii=m(),this._nearFar=m(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=g.radius,this._updateRadius(g.radius)}destroy(){this._atmosphereTechnique=t(this._atmosphereTechnique),this._atmosphereHazeTechnique=t(this._atmosphereHazeTechnique),this._vao=i(this._vao),this._handles=s(this._handles)}when(){return Promise.resolve()}initializeRenderContext(t){const i=t.renderContext.rctx;this._handles=new e,a(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(n(this._view,"basemapTerrain","elevation-change",(e=>this._updateElevation(e)),(()=>this._updateElevation()))),this._handles.add(n(this._view,"basemapTerrain","elevation-bounds-change",(()=>this._updateVisibleElevationBounds())));const s=new q;s.haze=!1,this._atmosphereTechnique=t.shaderTechniqueRep.acquire(E,s),s.haze=!0,this._atmosphereHazeTechnique=t.shaderTechniqueRep.acquire(E,s),this._vao=B(i,U),this._scaleHeight=b*T,u(this._betasRayleigh,w[0],w[1],w[2]),u(this._betasCombined,w[0]+R[0],w[1]+R[1],w[2]+R[2])}render(e){return this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e){return this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,i){this._update(e.camera);const s=e.rctx,a=e.offscreenRenderingHelper;return s.useProgram(t.program),t.bindPipelineState(s),a.renderDepthDetached((()=>{t.program.bindTexture(i,"depthTex"),this._renderCommon(t.program,e)})),!0}_renderCommon(e,t){if(r(this._vao))return!1;const i=t.rctx;return t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform2fv("radii",this._radii),e.setUniform1f("scaleHeight",this._scaleHeight),e.setUniform1f("betaMie",j),e.setUniform3fv("betaRayleigh",this._betasRayleigh),e.setUniform3fv("betaCombined",this._betasCombined),e.setUniform1f("innerFadeDistance",this._innerFadeDistance),e.setUniform1f("altitudeFade",this._altitudeFade),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(5,0,4),!0}_adjustRadiusForTesselation(e){return e*Math.cos(Math.PI/16/16)}_updateElevation(e){const t=e?e.tile:h(this._view.basemapTerrain.rootTiles,[null])[0];if(r(t)||0!==t.lij[0])return;const i=this._adjustRadiusForTesselation(g.radius+t.elevationBounds[0]);i!==this._lowerElevationBoundRadius&&(this._lowerElevationBoundRadius=i,this._lowerBoundEarthRadius=-1,this._updateVisibleElevationBounds())}_updateVisibleElevationBounds(){const e=this._adjustRadiusForTesselation(g.radius+this._view.basemapTerrain.elevationBounds.min);(this._lowerBoundEarthRadius<0||e<this._lowerBoundEarthRadius)&&this._updateRadius(e)}_updateRadius(e){this._lowerBoundEarthRadius=e,_(this._radii,e,e+T),this._innerFadeDistance=2*Math.sqrt((2*e-H)*H)}_update(e){if(r(e))return;this._cameraHeight=c(e.eye),this._cameraHeightSq=this._cameraHeight*this._cameraHeight,this._cAtmosphere=this._cameraHeightSq-this._radii[1]*this._radii[1];const t=Math.min(1,Math.max(0,(this._cameraHeight-this._radii[0])/T));this._heightParameters=v(this._cameraHeight,this._cameraHeightSq,this._cAtmosphere,t),l(this._cameraPosition,e.eye),o(this._projectionInverse,e.projectionMatrix),o(this._viewInverse,e.viewMatrix),_(this._nearFar,e.near,e.far),this._altitudeFade=x(this._cameraHeight-this._lowerBoundEarthRadius)}static isSupported(e){return e.renderContext.rctx.capabilities.depthTexture}}export{F as ChapmanAtmosphere};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/has.js";import{lerp as t}from"../../../core/mathUtils.js";import{releaseMaybe as i,disposeMaybe as s,destroyMaybe as r,isNone as h}from"../../../core/maybe.js";import{f as o}from"../../../chunks/mat3.js";import{c as a}from"../../../chunks/mat3f64.js";import{q as n}from"../../../chunks/mat4.js";import{c}from"../../../chunks/mat4f64.js";import{z as
|
|
5
|
+
import e from"../../../core/has.js";import{lerp as t}from"../../../core/mathUtils.js";import{releaseMaybe as i,disposeMaybe as s,destroyMaybe as r,isNone as h}from"../../../core/maybe.js";import{f as o}from"../../../chunks/mat3.js";import{c as a}from"../../../chunks/mat3f64.js";import{q as n}from"../../../chunks/mat4.js";import{c as u}from"../../../chunks/mat4f64.js";import{z as c,f as d}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as m}from"../../../geometry/projectionEllipsoid.js";import{CloudsTechnique as _}from"./CloudsTechnique.js";import{NoiseTextureAtlas as l}from"./NoiseTextureAtlas.js";import{createQuadVAO as f}from"../webgl-engine/lib/glUtil3D.js";import g from"../../webgl/FramebufferObject.js";class p{constructor(i,s,r){this._rctx=i,this._view=s,this.requestRender=r,this._cubeMapSize=e("esri-mobile")?1024:2048,this._viewMat3=a(),this._eye=c(),this._didRenderFaces=!1,this.viewDirections=[d(1,0,0),d(-1,0,0),d(0,1,0),d(0,-1,0),d(0,0,1)],this.upDirections=[d(0,1,0),d(0,1,0),d(0,0,-1),d(0,0,1),d(0,1,0)],this._cloudRadius=0,this._viewMatrix=u();const h=x.sunny;this.coverage=t(h.coverage[1],h.coverage[0],.5),this.density=t(h.density[1],h.density[0],.5),this.absorption=t(h.absorption[1],h.absorption[0],.5),this.cloudSize=t(h.cloudSize[1],h.cloudSize[0],.5),this.detailSize=t(h.detailSize[1],h.detailSize[0],.5),this.smoothness=t(h.smoothness[1],h.smoothness[0],.5),this.cloudHeight=t(h.cloudHeight[1],h.cloudHeight[0],.5),this._vao=f(i),this._technique=new _({rctx:i,viewingMode:s.state.viewingMode},null);const o=m(s.spatialReference);this._cloudRadius=.5*o.radius,this.resetRenderFlags()}set coverage(e){this._coverage=e,this.resetRenderFlags()}get coverage(){return this._coverage}set density(e){this._density=this.remap(e,0,1,0,.3),this.resetRenderFlags()}set cloudSize(e){this._cloudSize=this.remap(Math.max(.01,1-e),0,1,0,.02),this.resetRenderFlags()}set detailSize(e){this._detailSize=this.remap(Math.max(.01,1-e),0,1,0,.2),this.resetRenderFlags()}set smoothness(e){this._smoothness=this.remap(1-e,0,1,0,.5),this.resetRenderFlags()}set absorption(e){this._sigmaE=1+e,this._power=this.remap(e,0,1,35,120),this.resetRenderFlags()}get absorption(){return this._sigmaE-1}set cloudHeight(e){this._cloudHeight=this.remap(e,0,1,0,1500),this.resetRenderFlags()}get cloudHeight(){return this._cloudHeight}destroy(){this._technique=i(this._technique),this._frameBufferCube=s(this._frameBufferCube),this._vao=s(this._vao),this._noiseTextureAtlas=r(this._noiseTextureAtlas)}get noiseTextureAtlas(){return h(this._noiseTextureAtlas)&&(this._noiseTextureAtlas=new l(this._rctx,this._view),this._noiseTextureAtlas.render(128,this._rctx)),this._noiseTextureAtlas}get frameBufferCube(){if(h(this._frameBufferCube)){const e={target:34067,pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new g(this._rctx,{colorTarget:2,width:this._cubeMapSize,height:this._cubeMapSize},e)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}resetRenderFlags(){this._didRenderFaces=!1}remap(e,t,i,s,r){return s+(e-t)*(r-s)/(i-t)}get running(){return!this._didRenderFaces}runTask(e){if(e.done)return;if(0===this.coverage||h(this._vao)||this._didRenderFaces)return;const t=this._rctx.getViewport();this._rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this._rctx.bindFramebuffer(this.frameBufferCube,!1,34069);const i=this._technique.program;this._rctx.useProgram(i),i.bindTexture(this.noiseTextureAtlas.textureAtlas,"cloudShapeTexture"),i.setUniform1f("cloudRadius",this._cloudRadius),i.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),i.setUniform1f("power",this._power),i.setUniform1f("sigmaE",this._sigmaE),i.setUniform1f("density",this._density),i.setUniform1f("cloudSize",this._cloudSize),i.setUniform1f("detailSize",this._detailSize),i.setUniform1f("smoothness",this._smoothness),i.setUniform1f("cloudHeight",this._cloudHeight),i.setUniform1f("coverage",this._coverage),this._rctx.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),this._technique.bindPipelineState(this._rctx);for(let s=0;s<5;s++){const e=this.viewDirections[s],t=this.upDirections[s];n(this._viewMatrix,this._eye,e,t),o(this._viewMat3,this._viewMatrix),i.setUniformMatrix3fv("viewMatrix",this._viewMat3);const r=34069+s;this.frameBufferCube.framebufferTexture2D(this.frameBufferCube.colorAttachment.glName,this._rctx.gl,36064,r),this._rctx.gl.drawArrays(this._rctx.gl.TRIANGLE_STRIP,0,4),this._rctx.gl.flush()}this._didRenderFaces=!0,this._rctx.setViewport(t.x,t.y,t.width,t.height),e.madeProgress(),this.requestRender()}get test(){return{coverage:this._coverage,density:this.remap(this._density,0,.3,0,1),absorption:this._sigmaE-1,cloudSize:1-this.remap(this._cloudSize,0,.02,0,1),detailSize:1-this.remap(this._detailSize,0,.2,0,1),smoothness:1-this.remap(this._smoothness,0,.5,0,1),cloudHeight:this.remap(this._cloudHeight,0,1500,0,1)}}}class b{constructor(e,t,i,s,r,h,o,a=.5){this.coverage=e,this.density=t,this.absorption=i,this.cloudSize=s,this.detailSize=r,this.smoothness=h,this.cloudHeight=o,this.median=a}}const x={sunny:new b([.1,.7],[.02,.02],[0,0],[.86,.86],[.8,.8],[.5,.5],[.05,.05]),cloudy:new b([.24,.7],[.135,.2],[0,0],[.5,.5],[.65,.7],[.3,.3],[1,1]),rainy:new b([.5,.9],[.2,.5],[.3,.6],[.4,.4],[.7,.7],[.5,.5],[1,1]),foggy:new b([.8,.8],[.5,.5],[0,0],[.85,.85],[.75,.75],[.8,.8],[.3,.3])};export{p as CloudsGenerator,x as cloudPresets};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{equalsShallow as r}from"../../../core/lang.js";import{lerp as i}from"../../../core/mathUtils.js";import{isSome as o,destroyMaybe as n,removeMaybe as a,applySome as h,isNone as p}from"../../../core/maybe.js";import{react as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{equalsShallow as r}from"../../../core/lang.js";import{lerp as i}from"../../../core/mathUtils.js";import{isSome as o,destroyMaybe as n,removeMaybe as a,applySome as h,isNone as p}from"../../../core/maybe.js";import{react as l,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{when as _}from"../../../core/watchUtils.js";import{property as m}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as g}from"../../../geometry/projectionEllipsoid.js";import{isMoon as v,isEarth as w}from"../../../geometry/support/spatialReferenceUtils.js";import{ChapmanAtmosphere as y}from"./ChapmanAtmosphere.js";import{CloudsComposition as f}from"./CloudsComposition.js";import{CloudsGenerator as A,cloudPresets as C}from"./CloudsGenerator.js";import{Fog as R}from"./Fog.js";import{PanoramicAtmosphere as T}from"./PanoramicAtmosphere.js";import j from"./SimpleAtmosphere.js";import{Stars as b}from"./Stars.js";import{TaskPriority as x}from"../../support/Scheduler.js";const E=[12,13];let P=class extends t{constructor(e){super(e),this._cloudsGeneratorTask=null,this._handles=new s,this._context=null,this._pendingAtmosphere=null,this._atmosphere=null,this._stars=null,this._clouds=null,this._cloudComposition=null,this._fog=null}get atmosphereType(){return o(this._pendingAtmosphere)?this._pendingAtmosphere.type:o(this._atmosphere)?this._atmosphere.type:"none"}get canRender(){var e;return!(null==(e=this.view.basemapTerrain)||!e.renderer.canRender)||"global"!==this.view.viewingMode}get needsLinearDepth(){return"realistic"===this._selectAtmosphereType()}get updating(){return o(this._pendingAtmosphere)||o(this._stars)&&this._stars.updating||o(this._cloudsGeneratorTask)&&this._cloudsGeneratorTask.updating}get weatherEnabled(){var e;return!(null==(e=this.view.environmentManager)||!e.weatherEnabled)}initialize(){this.view._stage.addRenderPlugin(E,this)}destroy(){this._pendingAtmosphere=n(this._pendingAtmosphere),this.uninitializeRenderContext(),this._handles=n(this._handles),this._cloudsGeneratorTask=a(this._cloudsGeneratorTask),this.view&&null!=this.view._stage&&(this.view._stage.removeRenderPlugin(this),this._set("view",null))}initializeRenderContext(e=null){this._context=e,this._handles.add([_(this.view,"basemapTerrain",(()=>this._updateBasemapTerrain()),!0),l((()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality})),(()=>this._updateAtmosphere()),d),l((()=>this._starsCreationParameters),(e=>this._createOrDestroyStars(e)),{sync:!0,initial:!0,equals:r}),l((()=>this._cloudsCreationParameters),(e=>this._createOrDestroyClouds(e)),{sync:!0,initial:!0,equals:r}),l((()=>this._fogCreationParameters),(e=>this._createOrDestroyFog(e)),{sync:!0,initial:!0,equals:r}),l((()=>this._weatherUpdateParameters),(e=>{this._updateWeather(e),this._updateFog(e)}),d)])}uninitializeRenderContext(){this._stars=n(this._stars),this._atmosphere=n(this._atmosphere),this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),this._fog=n(this._fog)}render(e){if(0!==e.pass)return!1;let t=!1;switch(e.slot){case 12:o(this._stars)&&this._stars.render(e)&&(t=!0),o(this._atmosphere)&&this._atmosphere.canRender&&(this._atmosphere.render(e)&&(t=!0),o(this._clouds)&&o(this._clouds.cubeMap)&&!this._clouds.running&&o(this._cloudComposition)&&("sunny"!==this.view.environment.weather.type||0!==this.view.environment.weather.cloudCover)&&(this._cloudComposition.render(e,this._clouds.cubeMap,o(this.view.animation),this._clouds.coverage,this._clouds.absorption)&&(t=!0),this._cloudComposition.isFading()&&this._setNeedsRender()));break;case 13:if(o(this._atmosphere)&&this._atmosphere.canRender&&(this._atmosphere.renderHaze(e)&&(t=!0),o(this._fog))){const s=this.weatherEnabled?this.view.environment.weather.type:"disabled";"foggy"!==s&&"realistic"===this._selectAtmosphereType()||this._fog.render(e,"foggy"===s)&&(t=!0)}break;default:return!1}return t}get _cloudsCreationParameters(){return this.weatherEnabled?{view:this.view,viewingMode:this.view.state.viewingMode,rctx:o(this._context)?this._context.renderContext.rctx:null,radius:g(this.view.spatialReference).radius}:null}_createOrDestroyClouds(e){this._clouds=n(this._clouds),this._cloudsGeneratorTask=a(this._cloudsGeneratorTask),this._cloudComposition=n(this._cloudComposition),h(e,(({view:e,viewingMode:t,rctx:s,radius:r})=>{this._clouds=new A(s,e,(()=>this._setNeedsRender()));const i=this.view.resourceController.scheduler;this._cloudsGeneratorTask=i.registerTask(x.CLOUDS_GENERATOR,this._clouds),this._cloudComposition=new f(s,t,r,c(e.state.camera.eye)-r)})),this._setNeedsRender()}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return p(e)?null:{type:e.type,presetAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){if(p(e)||p(this._clouds))return;const t=C[e.type].median;for(const s in C[e.type])if("median"!==s){const r=C[e.type][s],o=i(r[0],r[1],t);this._clouds[s]=e.presetAdjustment<.5?i(r[0],o,2*e.presetAdjustment):i(o,r[1],2*(e.presetAdjustment-.5))}}_setNeedsRender(){o(this._context)&&this._context.requestRender()}get _starsCreationParameters(){var e,t,s;return{view:this.view,starsEnabled:null!=(e=null==(t=this.view)||null==(s=t.environment)?void 0:s.starsEnabled)&&e}}_createOrDestroyStars({view:e,starsEnabled:t}){t&&p(this._stars)?(this._stars=new b({view:e,requestRender:()=>this._setNeedsRender()}),this._setNeedsRender()):!t&&o(this._stars)&&(this._stars.destroy(),this._stars=null,this._setNeedsRender())}_updateFog(e){p(this._fog)||p(e)||("foggy"===e.type?this._fog.strength=i(3e-5,.005,e.presetAdjustment**3):this._fog.strength=4e-6)}get _fogCreationParameters(){return!this.weatherEnabled||p(this._context)?null:{view:this.view,context:this._context}}_createOrDestroyFog(e){this.weatherEnabled&&p(this._fog)?(h(e,(({view:e,context:t})=>{this._fog=new R(t,e)})),this._updateFog(this._weatherUpdateParameters),this._setNeedsRender()):o(this._fog)&&(this._fog.destroy(),this._fog=null,this._setNeedsRender())}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;o(this._pendingAtmosphere)&&(this._pendingAtmosphere!==this._atmosphere&&this._pendingAtmosphere.destroy(),this._pendingAtmosphere=null);const t=this._getAtmosphereClass();if(!t)return o(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();const s=new t(this.view);o(this._context)&&s.initializeRenderContext(this._context),p(this._atmosphere)&&(this._atmosphere=s,this._setNeedsRender()),this._pendingAtmosphere=s,s.when().then((()=>{o(this._atmosphere)&&this._pendingAtmosphere&&this._pendingAtmosphere!==this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=this._pendingAtmosphere),this._pendingAtmosphere=null,this._setNeedsRender(),this._updateBasemapTerrain()})).catch((()=>{this._pendingAtmosphere===s&&(this._pendingAtmosphere=null)}))}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case"none":return null;case"realistic":return y;case"panoramic":return T;case"simple":return j;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),s=this.view.viewingMode;return!e||null==t||v(this.view.spatialReference)?"none":"local"===s?"panoramic":"high"===t&&o(this._context)&&y.isSupported(this._context)&&w(this.view.spatialReference)?"realistic":"simple"}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=o(this._atmosphere)&&"simple"===this.atmosphereType)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType()}}};e([m({constructOnly:!0})],P.prototype,"view",void 0),e([m()],P.prototype,"_cloudsGeneratorTask",void 0),e([m({type:Boolean,readOnly:!0})],P.prototype,"updating",null),e([m()],P.prototype,"_pendingAtmosphere",void 0),e([m()],P.prototype,"_stars",void 0),e([m()],P.prototype,"_clouds",void 0),e([m()],P.prototype,"_cloudComposition",void 0),e([m()],P.prototype,"_fog",void 0),e([m()],P.prototype,"weatherEnabled",null),e([m()],P.prototype,"_cloudsCreationParameters",null),e([m()],P.prototype,"_weatherUpdateParameters",null),e([m()],P.prototype,"_starsCreationParameters",null),e([m()],P.prototype,"_fogCreationParameters",null),P=e([u("esri.views.3d.environment.EnvironmentRenderer")],P);export{P as EnvironmentRenderer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{smoothstep as e}from"../../../core/mathUtils.js";import{isNone as t,releaseMaybe as r,disposeMaybe as i}from"../../../core/maybe.js";import{b as s}from"../../../chunks/mat4.js";import{c as o}from"../../../chunks/mat4f64.js";import{s as n}from"../../../chunks/vec2.js";import{a as h}from"../../../chunks/vec2f64.js";import{l as a}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as c}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as u}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as m,FogTechnique as f}from"./FogTechnique.js";import{Pos2Tex as g}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as p}from"../webgl-engine/lib/glUtil3D.js";class _{constructor(e,t){this._projectionInverse=o(),this._viewInverse=o(),this._nearFar=h(),this._strength=4e-6;const r=e.renderContext.rctx;this._vao=p(r,g),this._shaderTechniqueRepository=e.shaderTechniqueRep;const i=c(t.spatialReference);this._planetRadius=i.radius,this._atmosphereRadius=i.radius+u}set strength(e){this._strength=e}get strength(){return this._strength}get foggyWeatherTechnique(){if(t(this._foggyWeatherTechnique)){const e=new m;e.haze=!1,this._foggyWeatherTechnique=this._shaderTechniqueRepository.acquire(f,e)}return this._foggyWeatherTechnique}get distanceFogTechnique(){if(t(this._distanceFogTechnique)){const e=new m;e.haze=!0,this._distanceFogTechnique=this._shaderTechniqueRepository.acquire(f,e)}return this._distanceFogTechnique}destroy(){this._distanceFogTechnique=r(this._distanceFogTechnique),this._foggyWeatherTechnique=r(this._foggyWeatherTechnique),this._vao=i(this._vao)}when(){return Promise.resolve()}render(e,t){if(this._update(e.camera,t),this._fogAmount<=0)return!1;const r=e.rctx,i=e.offscreenRenderingHelper,s=t?this.foggyWeatherTechnique:this.distanceFogTechnique;return r.useProgram(s.program),s.bindPipelineState(r),i.renderDepthDetached((()=>{s.program.bindTexture(i.depthTexture,"depthTex"),this._renderFog(s.program,e)})),!0}_renderFog(e,r){if(t(this._vao))return!1;const i=r.rctx;return r.scenelightingData.setLightDirectionUniform(e),e.setUniform3fv("cameraPosition",r.camera.eye),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("strength",this._strength),e.setUniform1f("fogAmount",this._fogAmount),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(5,0,4),!0}_update(r,i){if(t(r))return;s(this._projectionInverse,r.projectionMatrix),s(this._viewInverse,r.viewMatrix),n(this._nearFar,r.near,r.far);const o=a(r.eye),h=o*o;this._atmosphereC=h-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=i?1-e(3e3,6e3,Math.abs(o-this._planetRadius)):1-e(
|
|
5
|
+
import{smoothstep as e}from"../../../core/mathUtils.js";import{isNone as t,releaseMaybe as r,disposeMaybe as i}from"../../../core/maybe.js";import{b as s}from"../../../chunks/mat4.js";import{c as o}from"../../../chunks/mat4f64.js";import{s as n}from"../../../chunks/vec2.js";import{a as h}from"../../../chunks/vec2f64.js";import{l as a}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as c}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as u}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as m,FogTechnique as f}from"./FogTechnique.js";import{Pos2Tex as g}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as p}from"../webgl-engine/lib/glUtil3D.js";class _{constructor(e,t){this._projectionInverse=o(),this._viewInverse=o(),this._nearFar=h(),this._strength=4e-6;const r=e.renderContext.rctx;this._vao=p(r,g),this._shaderTechniqueRepository=e.shaderTechniqueRep;const i=c(t.spatialReference);this._planetRadius=i.radius,this._atmosphereRadius=i.radius+u}set strength(e){this._strength=e}get strength(){return this._strength}get foggyWeatherTechnique(){if(t(this._foggyWeatherTechnique)){const e=new m;e.haze=!1,this._foggyWeatherTechnique=this._shaderTechniqueRepository.acquire(f,e)}return this._foggyWeatherTechnique}get distanceFogTechnique(){if(t(this._distanceFogTechnique)){const e=new m;e.haze=!0,this._distanceFogTechnique=this._shaderTechniqueRepository.acquire(f,e)}return this._distanceFogTechnique}destroy(){this._distanceFogTechnique=r(this._distanceFogTechnique),this._foggyWeatherTechnique=r(this._foggyWeatherTechnique),this._vao=i(this._vao)}when(){return Promise.resolve()}render(e,t){if(this._update(e.camera,t),this._fogAmount<=0)return!1;const r=e.rctx,i=e.offscreenRenderingHelper,s=t?this.foggyWeatherTechnique:this.distanceFogTechnique;return r.useProgram(s.program),s.bindPipelineState(r),i.renderDepthDetached((()=>{s.program.bindTexture(i.depthTexture,"depthTex"),this._renderFog(s.program,e)})),!0}_renderFog(e,r){if(t(this._vao))return!1;const i=r.rctx;return r.scenelightingData.setLightDirectionUniform(e),e.setUniform3fv("cameraPosition",r.camera.eye),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("strength",this._strength),e.setUniform1f("fogAmount",this._fogAmount),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(5,0,4),!0}_update(r,i){if(t(r))return;s(this._projectionInverse,r.projectionMatrix),s(this._viewInverse,r.viewMatrix),n(this._nearFar,r.near,r.far);const o=a(r.eye),h=o*o;this._atmosphereC=h-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=i?1-e(3e3,6e3,Math.abs(o-this._planetRadius)):1-e(7e3,1e4,Math.abs(o-this._planetRadius))}static isSupported(e){return e.capabilities.depthTexture}}export{_ as Fog};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{disposeMaybe as t,abortMaybe as r}from"../../../core/maybe.js";import{createResolver as o,isAbortError as i}from"../../../core/promiseUtils.js";import{c as s}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{requestImage as a}from"../../../support/requestImageUtils.js";import{SimpleAtmosphereTechniqueConfiguration as m,SimpleAtmosphereTechnique as l}from"./SimpleAtmosphereTechnique.js";import h from"./resources/SimpleAtmosphereTexture.js";import{glLayout as c}from"../support/buffer/glUtil.js";import{newLayout as p}from"../support/buffer/InterleavedLayout.js";import{bindProjectionMatrix as u}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Default3D as f}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import g from"../webgl-engine/lib/GeometryUtil.js";import d from"../../webgl/BufferObject.js";import _ from"../../webgl/Texture.js";import{vertexCount as b}from"../../webgl/Util.js";import y from"../../webgl/VertexArrayObject.js";const x=e.getLogger("esri.views.3d.environment.PanoramicAtmosphere");class j{constructor(){this._atmosphereTechniqueConfig=new m,this._readyResolver=o(),this._readyController=new AbortController}destroy(){this._readyResolver.reject(),this._texture=t(this._texture),this._vao=t(this._vao),this._readyController=r(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._atmosphereTechniqueConfig.geometry=1,this._atmosphereTechnique=e.shaderTechniqueRep.acquire(l,this._atmosphereTechniqueConfig);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=b(this._vao,"geometry"),a(h,{signal:this._readyController.signal}).then((r=>{this._texture=new _(t,{pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{i(e)||x.error("Unable to initialize atmosphere: image request failed",e),this._readyResolver.reject()}))}get canRender(){return null!=this._texture}render(e){const t=e.rctx,r=this._atmosphereTechnique.program;return t.useProgram(r),this._atmosphereTechnique.bindPipelineState(t),r.bindTexture(this._texture,"tex"),u(r,e.camera.projectionMatrix),v(w,e.camera.viewMatrix),r.setUniformMatrix4fv("view",w),r.setUniform4f("color",1,1,1,1),e.scenelightingData.setLightDirectionUniform(r),t.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),t.drawArrays(4,0,this._vaoCount),!0}renderHaze(){return!1}_createVertexArrayObject(e){const t=g.createPolySphereGeometry(1,2,!1),r=t.indices.get("position");for(let n=0;n<r.length;n+=3){const e=r[n];r[n]=r[n+2],r[n+2]=e}const o=t.vertexAttributes.get("position").data,i=C.createBuffer(r.length),s=i.position;for(let n=0;n<r.length;++n){const e=3*r[n];s.set(n,0,o[e]),s.set(n,1,o[e+1]),s.set(n,2,o[e+2])}return new y(e,f,{geometry:c(C)},{geometry:d.createVertex(e,35044,i.buffer)})}}function v(e,t){s(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const w=n(),C=p().vec3f("position");export{j as PanoramicAtmosphere};
|
|
5
|
+
import e from"../../../core/Logger.js";import{disposeMaybe as t,abortMaybe as r}from"../../../core/maybe.js";import{createResolver as o,isAbortError as i}from"../../../core/promiseUtils.js";import{c as s}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{requestImage as a}from"../../../support/requestImageUtils.js";import{SimpleAtmosphereTechniqueConfiguration as m,SimpleAtmosphereTechnique as l}from"./SimpleAtmosphereTechnique.js";import h from"./resources/SimpleAtmosphereTexture.js";import{glLayout as c}from"../support/buffer/glUtil.js";import{newLayout as p}from"../support/buffer/InterleavedLayout.js";import{bindProjectionMatrix as u}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Default3D as f}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import g from"../webgl-engine/lib/GeometryUtil.js";import d from"../../webgl/BufferObject.js";import _ from"../../webgl/Texture.js";import{vertexCount as b}from"../../webgl/Util.js";import y from"../../webgl/VertexArrayObject.js";const x=e.getLogger("esri.views.3d.environment.PanoramicAtmosphere");class j{constructor(){this.type="panoramic",this._atmosphereTechniqueConfig=new m,this._readyResolver=o(),this._readyController=new AbortController}destroy(){this._readyResolver.reject(),this._texture=t(this._texture),this._vao=t(this._vao),this._readyController=r(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._atmosphereTechniqueConfig.geometry=1,this._atmosphereTechnique=e.shaderTechniqueRep.acquire(l,this._atmosphereTechniqueConfig);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=b(this._vao,"geometry"),a(h,{signal:this._readyController.signal}).then((r=>{this._texture=new _(t,{pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{i(e)||x.error("Unable to initialize atmosphere: image request failed",e),this._readyResolver.reject()}))}get canRender(){return null!=this._texture}render(e){const t=e.rctx,r=this._atmosphereTechnique.program;return t.useProgram(r),this._atmosphereTechnique.bindPipelineState(t),r.bindTexture(this._texture,"tex"),u(r,e.camera.projectionMatrix),v(w,e.camera.viewMatrix),r.setUniformMatrix4fv("view",w),r.setUniform4f("color",1,1,1,1),e.scenelightingData.setLightDirectionUniform(r),t.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),t.drawArrays(4,0,this._vaoCount),!0}renderHaze(){return!1}_createVertexArrayObject(e){const t=g.createPolySphereGeometry(1,2,!1),r=t.indices.get("position");for(let n=0;n<r.length;n+=3){const e=r[n];r[n]=r[n+2],r[n+2]=e}const o=t.vertexAttributes.get("position").data,i=C.createBuffer(r.length),s=i.position;for(let n=0;n<r.length;++n){const e=3*r[n];s.set(n,0,o[e]),s.set(n,1,o[e+1]),s.set(n,2,o[e+2])}return new y(e,f,{geometry:c(C)},{geometry:d.createVertex(e,35044,i.buffer)})}}function v(e,t){s(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const w=n(),C=p().vec3f("position");export{j as PanoramicAtmosphere};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Evented.js";import s from"../../../core/Handles.js";import{destroyMaybe as i,isSome as n,isNone as o,mapOr as a}from"../../../core/maybe.js";import{after as c}from"../../../core/promiseUtils.js";import{init as h}from"../../../core/watchUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{s as p,a as _,g as m,e as u}from"../../../chunks/vec3.js";import{c as f,f as P}from"../../../chunks/vec3f64.js";import{d as g,f as v}from"../../../chunks/vec4f64.js";import{canProjectToWGS84ComparableLonLat as b,projectPointToWGS84ComparableLonLat as w}from"../../../geometry/projection.js";import{isEarth as C}from"../../../geometry/support/spatialReferenceUtils.js";import{EnvironmentRenderer as U}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as y}from"../support/earthUtils.js";import{computeColorAndIntensity as R,ColorAndIntensity as T,computeShadowsEnabled as S}from"../support/sunUtils.js";import{MainLight as M,AmbientLight as H,FillLight as W}from"../webgl-engine/lighting/Lightsources.js";import G from"../../../webscene/background/ColorBackground.js";let j=class extends r.EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new s,this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new M,this._ambientLight=new H,this._moonLight=new W,this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){var e;return null==(e=this._renderer)?void 0:e.view}get updating(){return!!(!this.disableQueries&&(this._referencePosUpdateQuery||this._referencePosMapCoordsRequested)||this._renderer&&this._renderer.updating)}get weatherEnabled(){var e,t,r;return(null==(e=this._view)?void 0:e.environment.atmosphereEnabled)&&!this._disableWeather&&1===(null==(t=this._view)||null==(r=t.state)?void 0:r.viewingMode)&&C(this._view.spatialReference)}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){this._renderer||(this._renderer=new U({view:e}),this._viewHandles.add([e.watch("environment.lighting.date",(e=>this._lightingDateHandler(e)),!0),e.watch("stationary",(()=>this._interactingStationaryHandler())),e.watch(["environment.lighting.directShadowsEnabled","environment.lighting.ambientOcclusionEnabled","environment.lighting.waterReflectionEnabled","environment.background.color"],(()=>this._updateRenderParamsHandler()),!0),e.watch("spatialReference",(()=>this._resetReferencePosition(!0)),!0),e.watch("environment.weather.type",(()=>this._updateLightParams()),!0),h(e,"viewingMode",(()=>this._resetReferencePosition(!0)),!0),h(e,"environment.lighting.cameraTrackingEnabled",(e=>this._updateCameraTracking(e)),!0),h(e,"state.camera",(()=>this._cameraHandler()),!0),this.watch("disableQueries",(()=>this._cameraHandler()))]),this._updateRenderParamsHandler(),this._updateLightParams(),this._cameraHandler(),this.notifyChange("updating"))}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;e&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){if(!e)return;const t=this._view.environment.lighting;if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!b(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),n(this._referencePosWGS84Comparable)){const e=y(this._referencePosWGS84Comparable,D);n(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLightParams(e)}_preupdateTracking(e){!this._trackingEnabled&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=C(this._view.spatialReference);if(r&&!b(this._view.spatialReference))return!1;const s=e.position;return o(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=f()),r?w(s,this._referencePosWGS84Comparable):p(this._referencePosWGS84Comparable,s.longitude,s.latitude,s.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLightParams(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLightParams(e){const t=this._view,r=t.environment.lighting,s=e||r.date,i=t._stage,o=this._referencePosWGS84Comparable,a=n(o)?E:k;if(n(o)){const e=this.weatherEnabled?t.environment.weather.type:"disabled";R(s,o,t.state.viewingMode,E,e)}const c=this._mainLight,h=a.direct;_(c.intensity,h.color,h.intensity*Math.PI),m(c.direction,h.directionToLightSource);const d=this._ambientLight;_(d.intensity,a.ambient.color,a.ambient.intensity);const l=this._moonLight;u(l.intensity,L,q,a.globalFactor);const p=(1-.5*a.globalFactor)*(1-.4*a.noonFactor*(1-a.globalFactor));_(l.intensity,l.intensity,p),m(l.direction,h.directionToLightSource),i.renderView.updateLightSources([c,d,l],1-a.noonFactor,a.globalFactor),this._updateRenderParamsHandler()}_autoUpdateTimezone(e,t=null){if(!this._view.environment.lighting.cameraTrackingEnabled||o(e))return!1;const r=Q;r.setTime((t||this._view.environment.lighting.date).getTime());const s=y(e,D);if(o(s))return!1;let i=this._view.environment.lighting.positionTimezoneInfo;if(i.autoUpdated){if(i.hours===s.hours&&i.minutes===s.minutes&&i.seconds===s.seconds)return!1}else i=s;const n=r.getUTCHours()-(s.hours-i.hours),a=r.getUTCMinutes()-(s.minutes-i.minutes),c=r.getUTCSeconds()-(s.seconds-i.seconds);return r.setUTCHours(n),r.setUTCMinutes(a),r.setUTCSeconds(c),!t&&this._view.environment.lighting.autoUpdate(r,s)}_updateRenderParamsHandler(){const e=this._view._stage;if(!e)return;const r=a(this._referencePosWGS84Comparable,!0,(e=>S(e[2],this._view.state.viewingMode))),s=this._view.environment.background,i=s instanceof G?{type:"color",color:g(t.toUnitRGBA(s.color))}:{type:"color",color:v(0,0,0,1)};e.renderView.setRenderParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&r,ssao:this._view.environment.lighting.ambientOcclusionEnabled,waterReflectionEnabled:this._view.environment.lighting.waterReflectionEnabled,background:i})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=c(this._referencePointUpdateDelay).then((()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}})).catch((e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)})).then((()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))})),t=this._referencePosUpdateTimer=c(this._referencePointUpdateInterval).then((()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())}));this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLightParams():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLightParams(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};e([d({type:Boolean,readOnly:!0})],j.prototype,"updating",null),e([d()],j.prototype,"disableQueries",void 0),e([d()],j.prototype,"_disableWeather",void 0),e([d()],j.prototype,"weatherEnabled",null),e([d()],j.prototype,"referencePositionWGS84Comparable",null),e([d()],j.prototype,"_renderer",void 0),e([d()],j.prototype,"_referencePosWGS84Comparable",void 0),j=e([l("esri.views.3d.environment.SceneViewEnvironmentManager")],j);const E=new T,k=new T,Q=new Date,D={hours:0,minutes:0,seconds:0},L=P(.22,.22,.33),q=P(.22,.22,.22);export{j as SceneViewEnvironmentManager};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Evented.js";import s from"../../../core/Handles.js";import{destroyMaybe as i,isSome as n,isNone as o,mapOr as a}from"../../../core/maybe.js";import{after as c}from"../../../core/promiseUtils.js";import{init as h}from"../../../core/watchUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{s as p,a as _,g as m,e as u}from"../../../chunks/vec3.js";import{c as f,f as P}from"../../../chunks/vec3f64.js";import{d as g,f as v}from"../../../chunks/vec4f64.js";import{canProjectToWGS84ComparableLonLat as b,projectPointToWGS84ComparableLonLat as w}from"../../../geometry/projection.js";import{isEarth as C}from"../../../geometry/support/spatialReferenceUtils.js";import{EnvironmentRenderer as U}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as y}from"../support/earthUtils.js";import{computeColorAndIntensity as R,ColorAndIntensity as T,computeShadowsEnabled as S}from"../support/sunUtils.js";import{MainLight as M,AmbientLight as H,FillLight as W}from"../webgl-engine/lighting/Lightsources.js";import G from"../../../webscene/background/ColorBackground.js";let j=class extends r.EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new s,this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new M,this._ambientLight=new H,this._moonLight=new W,this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){var e;return null==(e=this._renderer)?void 0:e.view}get updating(){return!!(!this.disableQueries&&(this._referencePosUpdateQuery||this._referencePosMapCoordsRequested)||this._renderer&&this._renderer.updating)}get weatherEnabled(){var e,t,r;return(null==(e=this._view)?void 0:e.environment.atmosphereEnabled)&&!this._disableWeather&&1===(null==(t=this._view)||null==(r=t.state)?void 0:r.viewingMode)&&C(this._view.spatialReference)}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){this._renderer||(this._renderer=new U({view:e}),this._viewHandles.add([e.watch("environment.lighting.date",(e=>this._lightingDateHandler(e)),!0),e.watch("stationary",(()=>this._interactingStationaryHandler())),e.watch(["environment.lighting.directShadowsEnabled","environment.lighting.ambientOcclusionEnabled","environment.lighting.waterReflectionEnabled","environment.background.color"],(()=>this._updateRenderParamsHandler()),!0),e.watch("spatialReference",(()=>this._resetReferencePosition(!0)),!0),e.watch("environment.weather.type",(()=>this._updateLightParams()),!0),this.watch("weatherEnabled",(()=>this._updateLightParams()),!0),h(e,"viewingMode",(()=>this._resetReferencePosition(!0)),!0),h(e,"environment.lighting.cameraTrackingEnabled",(e=>this._updateCameraTracking(e)),!0),h(e,"state.camera",(()=>this._cameraHandler()),!0),this.watch("disableQueries",(()=>this._cameraHandler()))]),this._updateRenderParamsHandler(),this._updateLightParams(),this._cameraHandler(),this.notifyChange("updating"))}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;e&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){if(!e)return;const t=this._view.environment.lighting;if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!b(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),n(this._referencePosWGS84Comparable)){const e=y(this._referencePosWGS84Comparable,L);n(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLightParams(e)}_preupdateTracking(e){!this._trackingEnabled&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=C(this._view.spatialReference);if(r&&!b(this._view.spatialReference))return!1;const s=e.position;return o(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=f()),r?w(s,this._referencePosWGS84Comparable):p(this._referencePosWGS84Comparable,s.longitude,s.latitude,s.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLightParams(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLightParams(e){const t=this._view,r=t.environment.lighting,s=e||r.date,i=t._stage,o=this._referencePosWGS84Comparable,a=n(o)?E:k;if(n(o)){const e=this.weatherEnabled?t.environment.weather.type:"disabled";R(s,o,t.state.viewingMode,E,e)}const c=this._mainLight,h=a.direct;_(c.intensity,h.color,h.intensity*Math.PI),m(c.direction,h.directionToLightSource);const d=this._ambientLight;_(d.intensity,a.ambient.color,a.ambient.intensity);const l=this._moonLight;u(l.intensity,D,q,a.globalFactor);const p=(1-.5*a.globalFactor)*(1-.4*a.noonFactor*(1-a.globalFactor));_(l.intensity,l.intensity,p),m(l.direction,h.directionToLightSource),i.renderView.updateLightSources([c,d,l],1-a.noonFactor,a.globalFactor),this._updateRenderParamsHandler()}_autoUpdateTimezone(e,t=null){if(!this._view.environment.lighting.cameraTrackingEnabled||o(e))return!1;const r=Q;r.setTime((t||this._view.environment.lighting.date).getTime());const s=y(e,L);if(o(s))return!1;let i=this._view.environment.lighting.positionTimezoneInfo;if(i.autoUpdated){if(i.hours===s.hours&&i.minutes===s.minutes&&i.seconds===s.seconds)return!1}else i=s;const n=r.getUTCHours()-(s.hours-i.hours),a=r.getUTCMinutes()-(s.minutes-i.minutes),c=r.getUTCSeconds()-(s.seconds-i.seconds);return r.setUTCHours(n),r.setUTCMinutes(a),r.setUTCSeconds(c),!t&&this._view.environment.lighting.autoUpdate(r,s)}_updateRenderParamsHandler(){const e=this._view._stage;if(!e)return;const r=a(this._referencePosWGS84Comparable,!0,(e=>S(e[2],this._view.state.viewingMode))),s=this._view.environment.background,i=s instanceof G?{type:"color",color:g(t.toUnitRGBA(s.color))}:{type:"color",color:v(0,0,0,1)};e.renderView.setRenderParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&r,ssao:this._view.environment.lighting.ambientOcclusionEnabled,waterReflectionEnabled:this._view.environment.lighting.waterReflectionEnabled,background:i})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=c(this._referencePointUpdateDelay).then((()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}})).catch((e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)})).then((()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))})),t=this._referencePosUpdateTimer=c(this._referencePointUpdateInterval).then((()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())}));this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLightParams():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLightParams(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};e([d({type:Boolean,readOnly:!0})],j.prototype,"updating",null),e([d()],j.prototype,"disableQueries",void 0),e([d()],j.prototype,"_disableWeather",void 0),e([d()],j.prototype,"weatherEnabled",null),e([d()],j.prototype,"referencePositionWGS84Comparable",null),e([d()],j.prototype,"_renderer",void 0),e([d()],j.prototype,"_referencePosWGS84Comparable",void 0),j=e([l("esri.views.3d.environment.SceneViewEnvironmentManager")],j);const E=new T,k=new T,Q=new Date,L={hours:0,minutes:0,seconds:0},D=P(.22,.22,.33),q=P(.22,.22,.22);export{j as SceneViewEnvironmentManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{lerp as t,clamp as r}from"../../../core/mathUtils.js";import{removeMaybe as i,disposeMaybe as s,abortMaybe as a,isNone as o}from"../../../core/maybe.js";import{createResolver as n,isAbortError as h}from"../../../core/promiseUtils.js";import{init as m}from"../../../core/watchUtils.js";import{l}from"../../../chunks/mat4.js";import{c}from"../../../chunks/mat4f64.js";import{s as d}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{l as p,a as f,b as _,i as g,c as x,p as C}from"../../../chunks/vec3.js";import{c as R}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as V}from"../../../geometry/projectionEllipsoid.js";import{isMars as j}from"../../../geometry/support/spatialReferenceUtils.js";import{requestImage as y}from"../../../support/requestImageUtils.js";import{computeInnerAltitudeFade as v,innerAtmosphereDepth as U}from"./atmosphereUtils.js";import{SimpleAtmosphereTechniqueConfiguration as b,SimpleAtmosphereTechnique as q}from"./SimpleAtmosphereTechnique.js";import w from"./resources/MarsAtmosphereTexture.js";import D from"./resources/SimpleAtmosphereTexture.js";import{makePiecewiseLinearFunction as A}from"../support/mathUtils.js";import{glLayout as T}from"../support/buffer/glUtil.js";import{newLayout as F}from"../support/buffer/InterleavedLayout.js";import{Default3D as M}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as S}from"../webgl-engine/lib/glUtil3D.js";import{project as W}from"../webgl-engine/lib/Util.js";import k from"../../webgl/BufferObject.js";import L from"../../webgl/Texture.js";import{vertexCount as O}from"../../webgl/Util.js";import H from"../../webgl/VertexArrayObject.js";const P=e.getLogger("esri.views.3d.environment.SimpleAtmosphere"),z=128,B=-U,I=0,E=50,G=()=>1-511/512,J=A([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);class K{constructor(e){this.view=e,this._renderData={texV:u(),silCircleCenter:R(),silCircleV1:R(),silCircleV2:R(),altitudeFade:0,innerScale:0,undergroundFadeAlpha:0},this._fadeVaoCount=0,this._readyResolver=n(),this._readyController=new AbortController,this.texV1=1,this.isOnMars=j(e.spatialReference);const t=V(e.spatialReference);this.planetRadius=t.radius,this.outerRimWidth=t.outerAtmosphereRimWidth,this.innerRimFactor=(this.planetRadius+B)/this.planetRadius,this.middleRimFactor=(this.planetRadius+I)/this.planetRadius,this.outerRimFactor=(this.planetRadius+this.outerRimWidth)/this.planetRadius,this.texV0=I/this.outerRimWidth,this.texVScale=this.texV1-this.texV0}destroy(){this._readyResolver.reject(),this._cameraChangeHandle=i(this._cameraChangeHandle),this._texture=s(this._texture),this._fadeVao=s(this._fadeVao),this._vao=s(this._vao),this._readyController=a(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._shaderTechniqueRepository=e.shaderTechniqueRep;const t=e.renderContext.rctx;this._cameraChangeHandle=m(this.view,"state.camera",(()=>e.requestRender()),!0),this._vao=this._createRibbon(t),this._vaoCount=O(this._vao,"geometry"),this._fadeVao=S(t),this._fadeVaoCount=O(this._fadeVao,"geometry"),y(this.isOnMars?w:D,{signal:this._readyController.signal}).then((r=>{this._texture=new L(t,{pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{h(e)||P.error("Unable to initialize simple atmosphere: image request failed",e),this._readyResolver.reject()}))}get atmosphereConeTechnique(){if(o(this._atmosphereConeTechnique)){const e=new b;e.geometry=0,this._atmosphereConeTechnique=this._shaderTechniqueRepository.acquire(q,e)}return this._atmosphereConeTechnique}get atmosphereUndergroundTechnique(){if(o(this._atmosphereUndergroundTechnique)){const e=new b;e.geometry=2,this._atmosphereUndergroundTechnique=this._shaderTechniqueRepository.acquire(q,e)}return this._atmosphereUndergroundTechnique}get canRender(){return null!=this._texture}render(e){this._update(e.camera);const t=e.rctx;if(this.atmosphereConeTechnique.bindPipelineState(t),this._renderData.undergroundFadeAlpha<1){const r=this.atmosphereConeTechnique.program;t.useProgram(r),r.setUniformMatrix4fv("proj",e.camera.projectionMatrix),r.setUniformMatrix4fv("view",e.camera.viewMatrix),r.setUniform3fv("silCircleCenter",this._renderData.silCircleCenter),r.setUniform3fv("silCircleV1",this._renderData.silCircleV1),r.setUniform3fv("silCircleV2",this._renderData.silCircleV2),r.setUniform2fv("texV",this._renderData.texV),r.bindTexture(this._texture,"tex"),e.scenelightingData.setLightDirectionUniform(r),r.setUniform1f("altitudeFade",this._renderData.altitudeFade),r.setUniform1f("innerScale",this._renderData.innerScale),t.bindVAO(this._vao),t.drawArrays(4,0,this._vaoCount)}if(this._renderData.undergroundFadeAlpha>0){const r=this.atmosphereUndergroundTechnique.program;t.useProgram(r),r.setUniform1f("undergroundFadeAlpha",this._renderData.undergroundFadeAlpha),e.scenelightingData.setLightDirectionUniform(r),r.setUniform3fv("cameraPosition",e.camera.eye),t.bindVAO(this._fadeVao),t.drawArrays(5,0,this._fadeVaoCount)}return!0}renderHaze(){return!1}_update(e){const i=R(),s=this.planetRadius,a=p(e.eye),o=a-s;if(o<0){const e=Math.min(-o/5e3,1);this._renderData.undergroundFadeAlpha=e}else this._renderData.undergroundFadeAlpha=0;const n=Math.max(E,o),h=s+B;this._renderData.innerScale=Z(s+n,s,h)-1,this._renderData.altitudeFade=v(o),f(i,e.eye,(s+E)/a),N(i,e.center,e.up,s,this._renderData);const m=this._computeScreenRimWidth(e,i,e.up,this._renderData),l=G(),c=J(o);let u=this.texV0+l*this.texVScale,_=this.texV0+m*c*this.texVScale;if(o>E){N(e.eye,e.center,e.up,s,this._renderData);const i=this._computeScreenRimWidth(e,e.eye,e.up,this._renderData),a=r((i-1.5)/(m-1.5),0,1);u=this.texV0+a*l*this.texVScale,_=this.texV0+t(this.texV1,m*c,a)*this.texVScale}d(this._renderData.texV,u,_)}_createRibbon(e){const t=new Float32Array(3+3*z*3),r=new Uint32Array(3*z*5);t[0]=0,t[1]=0,t[2]=-1;for(let a=0;a<z;a++){const e=9*a+3;t[e+0]=a,t[e+1]=this.innerRimFactor,t[e+2]=-1,t[e+3]=a,t[e+4]=this.middleRimFactor,t[e+5]=0,t[e+6]=a,t[e+7]=this.outerRimFactor,t[e+8]=1;const i=3*a+1,s=a===z-1?1:i+3,o=15*a;r[o+0]=i,r[o+1]=i+1,r[o+2]=s+1,r[o+3]=s+1,r[o+4]=s,r[o+5]=i,r[o+6]=i+1,r[o+7]=i+2,r[o+8]=s+2,r[o+9]=s+2,r[o+10]=s+1,r[o+11]=i+1,r[o+12]=i,r[o+13]=s,r[o+14]=0}const i=$.createBuffer(r.length),s=i.position;for(let a=0;a<r.length;++a){const e=3*r[a];s.set(a,0,t[e]),s.set(a,1,t[e+1]),s.set(a,2,t[e+2])}return new H(e,M,{geometry:T($)},{geometry:k.createVertex(e,35044,i.buffer)})}_computeScreenRimWidth(e,t,r,i){return _(X,i.silCircleCenter,i.silCircleV2),f(Y,X,this.outerRimFactor),l(Q,t,X,r),W(X,Q,e.projectionMatrix,e.viewport),W(Y,Q,e.projectionMatrix,e.viewport),g(X,Y)/e.height}}function N(e,t,r,i,s){const a=p(e),o=i*Math.sqrt(a*a-i*i)/a,n=Math.sqrt(i*i-o*o),h=s.silCircleV1,m=s.silCircleV2;return f(s.silCircleCenter,e,n/a),x(h,e,t),C(h)<1&&x(h,e,r),f(h,h,o/p(h)),x(m,h,e),f(m,m,o/p(m)),o}const Q=c(),X=R(),Y=R();function Z(e,t,r){return e*e/(Math.sqrt(e*e-t*t)*Math.sqrt(e*e-r*r)+t*r)}const $=F().vec3f("position");export{K as default};
|
|
5
|
+
import e from"../../../core/Logger.js";import{lerp as t,clamp as r}from"../../../core/mathUtils.js";import{removeMaybe as i,disposeMaybe as s,abortMaybe as a,isNone as o}from"../../../core/maybe.js";import{createResolver as n,isAbortError as h}from"../../../core/promiseUtils.js";import{init as m}from"../../../core/watchUtils.js";import{l}from"../../../chunks/mat4.js";import{c}from"../../../chunks/mat4f64.js";import{s as d}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{l as p,a as f,b as _,i as g,c as x,p as C}from"../../../chunks/vec3.js";import{c as R}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as V}from"../../../geometry/projectionEllipsoid.js";import{isMars as j}from"../../../geometry/support/spatialReferenceUtils.js";import{requestImage as y}from"../../../support/requestImageUtils.js";import{computeInnerAltitudeFade as v,innerAtmosphereDepth as U}from"./atmosphereUtils.js";import{SimpleAtmosphereTechniqueConfiguration as b,SimpleAtmosphereTechnique as q}from"./SimpleAtmosphereTechnique.js";import w from"./resources/MarsAtmosphereTexture.js";import D from"./resources/SimpleAtmosphereTexture.js";import{makePiecewiseLinearFunction as A}from"../support/mathUtils.js";import{glLayout as T}from"../support/buffer/glUtil.js";import{newLayout as F}from"../support/buffer/InterleavedLayout.js";import{Default3D as M}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as S}from"../webgl-engine/lib/glUtil3D.js";import{project as W}from"../webgl-engine/lib/Util.js";import k from"../../webgl/BufferObject.js";import L from"../../webgl/Texture.js";import{vertexCount as O}from"../../webgl/Util.js";import H from"../../webgl/VertexArrayObject.js";const P=e.getLogger("esri.views.3d.environment.SimpleAtmosphere"),z=128,B=-U,I=0,E=50,G=()=>1-511/512,J=A([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);class K{constructor(e){this.view=e,this.type="simple",this._renderData={texV:u(),silCircleCenter:R(),silCircleV1:R(),silCircleV2:R(),altitudeFade:0,innerScale:0,undergroundFadeAlpha:0},this._fadeVaoCount=0,this._readyResolver=n(),this._readyController=new AbortController,this.texV1=1,this.isOnMars=j(e.spatialReference);const t=V(e.spatialReference);this.planetRadius=t.radius,this.outerRimWidth=t.outerAtmosphereRimWidth,this.innerRimFactor=(this.planetRadius+B)/this.planetRadius,this.middleRimFactor=(this.planetRadius+I)/this.planetRadius,this.outerRimFactor=(this.planetRadius+this.outerRimWidth)/this.planetRadius,this.texV0=I/this.outerRimWidth,this.texVScale=this.texV1-this.texV0}destroy(){this._readyResolver.reject(),this._cameraChangeHandle=i(this._cameraChangeHandle),this._texture=s(this._texture),this._fadeVao=s(this._fadeVao),this._vao=s(this._vao),this._readyController=a(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._shaderTechniqueRepository=e.shaderTechniqueRep;const t=e.renderContext.rctx;this._cameraChangeHandle=m(this.view,"state.camera",(()=>e.requestRender()),!0),this._vao=this._createRibbon(t),this._vaoCount=O(this._vao,"geometry"),this._fadeVao=S(t),this._fadeVaoCount=O(this._fadeVao,"geometry"),y(this.isOnMars?w:D,{signal:this._readyController.signal}).then((r=>{this._texture=new L(t,{pixelFormat:6408,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{h(e)||P.error("Unable to initialize simple atmosphere: image request failed",e),this._readyResolver.reject(e)}))}get atmosphereConeTechnique(){if(o(this._atmosphereConeTechnique)){const e=new b;e.geometry=0,this._atmosphereConeTechnique=this._shaderTechniqueRepository.acquire(q,e)}return this._atmosphereConeTechnique}get atmosphereUndergroundTechnique(){if(o(this._atmosphereUndergroundTechnique)){const e=new b;e.geometry=2,this._atmosphereUndergroundTechnique=this._shaderTechniqueRepository.acquire(q,e)}return this._atmosphereUndergroundTechnique}get canRender(){return null!=this._texture}render(e){this._update(e.camera);const t=e.rctx;if(this.atmosphereConeTechnique.bindPipelineState(t),this._renderData.undergroundFadeAlpha<1){const r=this.atmosphereConeTechnique.program;t.useProgram(r),r.setUniformMatrix4fv("proj",e.camera.projectionMatrix),r.setUniformMatrix4fv("view",e.camera.viewMatrix),r.setUniform3fv("silCircleCenter",this._renderData.silCircleCenter),r.setUniform3fv("silCircleV1",this._renderData.silCircleV1),r.setUniform3fv("silCircleV2",this._renderData.silCircleV2),r.setUniform2fv("texV",this._renderData.texV),r.bindTexture(this._texture,"tex"),e.scenelightingData.setLightDirectionUniform(r),r.setUniform1f("altitudeFade",this._renderData.altitudeFade),r.setUniform1f("innerScale",this._renderData.innerScale),t.bindVAO(this._vao),t.drawArrays(4,0,this._vaoCount)}if(this._renderData.undergroundFadeAlpha>0){const r=this.atmosphereUndergroundTechnique.program;t.useProgram(r),r.setUniform1f("undergroundFadeAlpha",this._renderData.undergroundFadeAlpha),e.scenelightingData.setLightDirectionUniform(r),r.setUniform3fv("cameraPosition",e.camera.eye),t.bindVAO(this._fadeVao),t.drawArrays(5,0,this._fadeVaoCount)}return!0}renderHaze(){return!1}_update(e){const i=R(),s=this.planetRadius,a=p(e.eye),o=a-s;if(o<0){const e=Math.min(-o/5e3,1);this._renderData.undergroundFadeAlpha=e}else this._renderData.undergroundFadeAlpha=0;const n=Math.max(E,o),h=s+B;this._renderData.innerScale=Z(s+n,s,h)-1,this._renderData.altitudeFade=v(o),f(i,e.eye,(s+E)/a),N(i,e.center,e.up,s,this._renderData);const m=this._computeScreenRimWidth(e,i,e.up,this._renderData),l=G(),c=J(o);let u=this.texV0+l*this.texVScale,_=this.texV0+m*c*this.texVScale;if(o>E){N(e.eye,e.center,e.up,s,this._renderData);const i=this._computeScreenRimWidth(e,e.eye,e.up,this._renderData),a=r((i-1.5)/(m-1.5),0,1);u=this.texV0+a*l*this.texVScale,_=this.texV0+t(this.texV1,m*c,a)*this.texVScale}d(this._renderData.texV,u,_)}_createRibbon(e){const t=new Float32Array(3+3*z*3),r=new Uint32Array(3*z*5);t[0]=0,t[1]=0,t[2]=-1;for(let a=0;a<z;a++){const e=9*a+3;t[e+0]=a,t[e+1]=this.innerRimFactor,t[e+2]=-1,t[e+3]=a,t[e+4]=this.middleRimFactor,t[e+5]=0,t[e+6]=a,t[e+7]=this.outerRimFactor,t[e+8]=1;const i=3*a+1,s=a===z-1?1:i+3,o=15*a;r[o+0]=i,r[o+1]=i+1,r[o+2]=s+1,r[o+3]=s+1,r[o+4]=s,r[o+5]=i,r[o+6]=i+1,r[o+7]=i+2,r[o+8]=s+2,r[o+9]=s+2,r[o+10]=s+1,r[o+11]=i+1,r[o+12]=i,r[o+13]=s,r[o+14]=0}const i=$.createBuffer(r.length),s=i.position;for(let a=0;a<r.length;++a){const e=3*r[a];s.set(a,0,t[e]),s.set(a,1,t[e+1]),s.set(a,2,t[e+2])}return new H(e,M,{geometry:T($)},{geometry:k.createVertex(e,35044,i.buffer)})}_computeScreenRimWidth(e,t,r,i){return _(X,i.silCircleCenter,i.silCircleV2),f(Y,X,this.outerRimFactor),l(Q,t,X,r),W(X,Q,e.projectionMatrix,e.viewport),W(Y,Q,e.projectionMatrix,e.viewport),g(X,Y)/e.height}}function N(e,t,r,i,s){const a=p(e),o=i*Math.sqrt(a*a-i*i)/a,n=Math.sqrt(i*i-o*o),h=s.silCircleV1,m=s.silCircleV2;return f(s.silCircleCenter,e,n/a),x(h,e,t),C(h)<1&&x(h,e,r),f(h,h,o/p(h)),x(m,h,e),f(m,m,o/p(m)),o}const Q=c(),X=R(),Y=R();function Z(e,t,r){return e*e/(Math.sqrt(e*e-t*t)*Math.sqrt(e*e-r*r)+t*r)}const $=F().vec3f("position");export{K as default};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{RgbaFloatEncoding as e}from"../util/RgbaFloatEncoding.glsl.js";import{glsl as t}from"../../shaderModules/interfaces.js";function a(e,t){e.constants.add("stippleAlphaColorDiscard","float",.001),e.constants.add("stippleAlphaHighlightDiscard","float",.5),t.stippleEnabled?r(e,t):l(e)}function r(a,r){a.fragment.include(e),a.vertex.uniforms.add("stipplePatternPixelSize","float"),r.draped?a.vertex.uniforms.add("worldToScreenRatio","float"):(a.vertex.uniforms.add("worldToScreenPerDistanceRatio","float"),a.vertex.uniforms.add("camPos","vec3"),a.vertex.code.add(t`float computeWorldToScreenRatio(vec3 segmentCenter) {
|
|
5
|
+
import{RgbaFloatEncoding as e}from"../util/RgbaFloatEncoding.glsl.js";import{glsl as t}from"../../shaderModules/interfaces.js";function a(e,t){e.constants.add("stippleAlphaColorDiscard","float",.001),e.constants.add("stippleAlphaHighlightDiscard","float",.5),t.stippleEnabled?r(e,t):l(e)}function r(a,r){a.fragment.include(e),a.vertex.uniforms.add("stipplePatternPixelSize","float"),a.vertex.uniforms.add("pixelRatio","float"),r.draped?a.vertex.uniforms.add("worldToScreenRatio","float"):(a.vertex.uniforms.add("worldToScreenPerDistanceRatio","float"),a.vertex.uniforms.add("camPos","vec3"),a.vertex.code.add(t`float computeWorldToScreenRatio(vec3 segmentCenter) {
|
|
6
6
|
float segmentDistanceToCamera = length(segmentCenter - camPos);
|
|
7
7
|
return worldToScreenPerDistanceRatio / segmentDistanceToCamera;
|
|
8
8
|
}`)),a.varyings.add("vStippleDistance","float"),r.stippleRequiresClamp&&a.varyings.add("vStippleDistanceLimits","vec2"),a.vertex.code.add(t`float discretizeWorldToScreenRatio(float worldToScreenRatio) {
|
|
@@ -15,7 +15,8 @@ return discreteWorldToScreenRatio;
|
|
|
15
15
|
if (segmentLengthPseudoScreen < patternLength) {
|
|
16
16
|
return vec2(startPseudoScreen, startPseudoScreen + segmentLengthPseudoScreen);
|
|
17
17
|
}
|
|
18
|
-
float
|
|
18
|
+
float repetitionsRounded = floor(segmentLengthScreen / (patternLength * pixelRatio) + 0.5);
|
|
19
|
+
float segmentLengthScreenRounded = max(1.0, repetitionsRounded) * patternLength;
|
|
19
20
|
return vec2(0.0, segmentLengthScreenRounded);
|
|
20
21
|
}`),a.fragment.uniforms.add("stipplePatternTexture","sampler2D"),a.fragment.uniforms.add("stipplePatternSDFNormalizer","float"),a.fragment.uniforms.add("stipplePatternTextureSize","float"),a.fragment.uniforms.add("stipplePatternPixelSizeInv","float"),r.stippleOffColorEnabled&&a.fragment.uniforms.add("stippleOffColor","vec4"),a.fragment.code.add(t`float padTexture(float u) {
|
|
21
22
|
return (u * stipplePatternTextureSize + 1.0)/(stipplePatternTextureSize + 2.0);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{isSome as t,unwrap as i}from"../../../../core/maybe.js";import{bindSliceUniformsWithOrigin as r}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindProjectionMatrix as o,bindView as p,bindCameraPosition as l}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as d,ShaderTechniqueConfiguration as h}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as u}from"../lib/DefaultVertexAttributeLocations.js";import{Program as c}from"../lib/Program.js";import{depthCompareLess as m,stencilWriteMaskOn as f,stencilToolMaskBaseParams as g,stencilBaseAllZerosParams as b}from"../lib/StencilUtils.js";import{N as x}from"../../../../chunks/NativeLine.glsl.js";import{separateBlendingParams as P,makePipelineState as T,defaultColorWriteParams as S,defaultDepthWriteParams as v}from"../../../webgl/renderState.js";class E extends n{constructor(e,t,i){super(e,t,i),this.stipplePattern=null,this.stippleTextureBind=null,this.stippleTextureRepository=e.stippleTextureRepository}initializeProgram(e){const t=E.shader.get(),i=this.configuration,r=t.build({output:i.output,attributeColor:i.vertexColors,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:i.draped,stippleEnabled:i.stippleEnabled,stippleOffColorEnabled:i.stippleOffColorEnabled,stippleRequiresClamp:!1,stippleScaleWithLineWidth:!1});return new c(e.rctx,r,u)}dispose(){super.dispose(),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}bindPass(e,r){if(o(this.program,r.camera.projectionMatrix),this.stipplePattern!==e.stipplePattern){const t=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,t),this.stipplePattern=t}if(this.configuration.stippleEnabled){const{pixelSize:e,sdfNormalizer:i,pixels:s}=t(this.stippleTextureBind)?this.stippleTextureBind(this.program):{pixelSize:1,sdfNormalizer:1,pixels:1};this.program.setUniform1f("stipplePatternSDFNormalizer",i),this.program.setUniform1f("stipplePatternTextureSize",s),this.program.setUniform1f("stipplePatternPixelSize",e),this.program.setUniform1f("stipplePatternPixelSizeInv",1/e),this.configuration.draped?this.program.setUniform1f("worldToScreenRatio",1/r.screenToWorldRatio):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/r.camera.perScreenPixelRatio),this.program.setUniform2f("ndcToPixel",r.camera.fullViewport[2]/2,r.camera.fullViewport[3]/2)}if(this.program.setUniform4fv("constantColor",e.color),this.program.setUniform1f("alphaCoverage",Math.min(1,e.width*r.camera.pixelRatio)),this.configuration.stippleOffColorEnabled){const t=i(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",t[0],t[1],t[2],t.length>3?t[3]:1)}4===this.configuration.output&&s(this.program,r)}bindDraw(e){p(this.program,e),this.configuration.stippleEnabled&&!this.configuration.draped&&l(this.program,e.origin,e.camera.viewInverseTransposeMatrix),r(this.program,this.configuration,e),this.program.rebindTextures()}initializePipeline(){const e=this.configuration,t=P(770,1,771,771),i=(t,i=null,r=null)=>T({blending:i,depthTest:m,depthWrite:r,colorWrite:S,stencilWrite:e.sceneHasOcludees?f:null,stencilTest:e.sceneHasOcludees?t?g:b:null});return 0===e.output?(this._occludeePipelineState=i(!0,e.transparent||e.stippleEnabled?t:null,v),i(!1,e.transparent||e.stippleEnabled?t:null,v)):i(!1)}get primitiveType(){return 1}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}E.shader=new a(x,(()=>import("./NativeLine.glsl.js")));class y extends h{constructor(){super(...arguments),this.output=0,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.sceneHasOcludees=!1}}e([d({count:8})],y.prototype,"output",void 0),e([d()],y.prototype,"slicePlaneEnabled",void 0),e([d()],y.prototype,"vertexColors",void 0),e([d()],y.prototype,"transparent",void 0),e([d()],y.prototype,"draped",void 0),e([d()],y.prototype,"stippleEnabled",void 0),e([d()],y.prototype,"stippleOffColorEnabled",void 0),e([d()],y.prototype,"sceneHasOcludees",void 0);export{E as NativeLineTechnique,y as NativeLineTechniqueConfiguration};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{isSome as t,unwrap as i}from"../../../../core/maybe.js";import{bindSliceUniformsWithOrigin as r}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindProjectionMatrix as o,bindView as p,bindCameraPosition as l}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as d,ShaderTechniqueConfiguration as h}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as u}from"../lib/DefaultVertexAttributeLocations.js";import{Program as c}from"../lib/Program.js";import{depthCompareLess as m,stencilWriteMaskOn as f,stencilToolMaskBaseParams as g,stencilBaseAllZerosParams as b}from"../lib/StencilUtils.js";import{N as x}from"../../../../chunks/NativeLine.glsl.js";import{separateBlendingParams as P,makePipelineState as T,defaultColorWriteParams as S,defaultDepthWriteParams as v}from"../../../webgl/renderState.js";class E extends n{constructor(e,t,i){super(e,t,i),this.stipplePattern=null,this.stippleTextureBind=null,this.stippleTextureRepository=e.stippleTextureRepository}initializeProgram(e){const t=E.shader.get(),i=this.configuration,r=t.build({output:i.output,attributeColor:i.vertexColors,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:i.draped,stippleEnabled:i.stippleEnabled,stippleOffColorEnabled:i.stippleOffColorEnabled,stippleRequiresClamp:!1,stippleScaleWithLineWidth:!1});return new c(e.rctx,r,u)}dispose(){super.dispose(),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}bindPass(e,r){if(o(this.program,r.camera.projectionMatrix),this.stipplePattern!==e.stipplePattern){const t=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,t),this.stipplePattern=t}if(this.configuration.stippleEnabled){const{pixelSize:e,sdfNormalizer:i,pixels:s}=t(this.stippleTextureBind)?this.stippleTextureBind(this.program):{pixelSize:1,sdfNormalizer:1,pixels:1};this.program.setUniform1f("stipplePatternSDFNormalizer",i),this.program.setUniform1f("stipplePatternTextureSize",s),this.program.setUniform1f("stipplePatternPixelSize",e),this.program.setUniform1f("stipplePatternPixelSizeInv",1/e),this.program.setUniform1f("pixelRatio",r.camera.pixelRatio),this.configuration.draped?this.program.setUniform1f("worldToScreenRatio",1/r.screenToWorldRatio):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/r.camera.perScreenPixelRatio),this.program.setUniform2f("ndcToPixel",r.camera.fullViewport[2]/2,r.camera.fullViewport[3]/2)}if(this.program.setUniform4fv("constantColor",e.color),this.program.setUniform1f("alphaCoverage",Math.min(1,e.width*r.camera.pixelRatio)),this.configuration.stippleOffColorEnabled){const t=i(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",t[0],t[1],t[2],t.length>3?t[3]:1)}4===this.configuration.output&&s(this.program,r)}bindDraw(e){p(this.program,e),this.configuration.stippleEnabled&&!this.configuration.draped&&l(this.program,e.origin,e.camera.viewInverseTransposeMatrix),r(this.program,this.configuration,e),this.program.rebindTextures()}initializePipeline(){const e=this.configuration,t=P(770,1,771,771),i=(t,i=null,r=null)=>T({blending:i,depthTest:m,depthWrite:r,colorWrite:S,stencilWrite:e.sceneHasOcludees?f:null,stencilTest:e.sceneHasOcludees?t?g:b:null});return 0===e.output?(this._occludeePipelineState=i(!0,e.transparent||e.stippleEnabled?t:null,v),i(!1,e.transparent||e.stippleEnabled?t:null,v)):i(!1)}get primitiveType(){return 1}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}E.shader=new a(x,(()=>import("./NativeLine.glsl.js")));class y extends h{constructor(){super(...arguments),this.output=0,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.sceneHasOcludees=!1}}e([d({count:8})],y.prototype,"output",void 0),e([d()],y.prototype,"slicePlaneEnabled",void 0),e([d()],y.prototype,"vertexColors",void 0),e([d()],y.prototype,"transparent",void 0),e([d()],y.prototype,"draped",void 0),e([d()],y.prototype,"stippleEnabled",void 0),e([d()],y.prototype,"stippleOffColorEnabled",void 0),e([d()],y.prototype,"sceneHasOcludees",void 0);export{E as NativeLineTechnique,y as NativeLineTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import i from"../../core/Handles.js";import o from"../../core/Logger.js";import{isSome as l}from"../../core/maybe.js";import{isAbortError as a}from"../../core/promiseUtils.js";import{
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import i from"../../core/Handles.js";import o from"../../core/Logger.js";import{isSome as l}from"../../core/maybe.js";import{isAbortError as a}from"../../core/promiseUtils.js";import{react as p}from"../../core/reactiveUtils.js";import{whenEqualOnce as n}from"../../core/watchUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import y from"../../layers/BuildingSceneLayer.js";import c from"../../layers/support/BuildingFilter.js";import m from"./BuildingDisciplinesViewModel.js";import u from"./BuildingLevel.js";import f from"./BuildingPhase.js";import{showFullModel as g}from"./support/buildingLayerUtils.js";import{setFilterOnLayers as j,getFilterBlockSolid as v,getFilterBlockXRay as w,generateFilterId as _}from"./support/filterUtils.js";import{createLoadLayersFunction as B}from"./support/layerUtils.js";const L=o.getLogger("esri.widgets.BuildingExplorer.BuildingExplorerViewModel");let x=class extends s{constructor(e){super(e),this.view=null,this.state="disabled",this.level=new u,this.phase=new f,this.disciplines=new m,this._handles=new i,this._loadLayers=B(),this.layers=new t}initialize(){this._handles.add([this.layers.on("change",(()=>this._onLayersChange())),p((()=>({filter:this._filter,state:this.state})),(({filter:e,state:s})=>{"ready"===s&&j(this.layers,e)}),{initial:!0})]),this._onLayersChange()}destroy(){this._handles.destroy(),this.level.destroyed||this.level.destroy(),this.phase.destroyed||this.phase.destroy(),this.disciplines.destroyed||this.disciplines.destroy()}get isSupported(){var e;return"3d"===(null==(e=this.view)?void 0:e.type)}set layers(e){const s=e.filter((e=>e instanceof y));s.length!==e.length&&L.error("Some layers are not BuildingSceneLayers but only BuildingSceneLayers can be passed to the widget."),this._set("layers",r(s,this._get("layers")))}get _filter(){const e=this.level.filterExpressions,s=this.phase.filterExpressions,t=[],r=v([e.solid,s.solid]);l(r)&&t.push(r);const i=w([e.xRay,s.xRay]);return l(i)&&t.push(i),0===t.length?null:new c({id:_(),name:"Building Explorer Filter",filterBlocks:t})}async _onLayersChange(){if(this.level.layers=this.layers,this.phase.layers=this.layers,this.disciplines.layers=this.layers,0!==this.layers.length){this._set("state","loading");try{await this._loadLayers(this.layers),await Promise.all([n(this.level,"state","ready"),n(this.phase,"state","ready"),n(this.disciplines,"state","ready")]),this.layers.forEach(g),this._set("state","ready")}catch(e){a(e)||this._set("state","failed")}}else this._set("state","disabled")}};e([d({value:null})],x.prototype,"view",void 0),e([d()],x.prototype,"isSupported",null),e([d({type:t,nonNullable:!0})],x.prototype,"layers",null),e([d({readOnly:!0})],x.prototype,"state",void 0),e([d({readOnly:!0,type:u})],x.prototype,"level",void 0),e([d({readOnly:!0,type:f})],x.prototype,"phase",void 0),e([d({readOnly:!0,type:m})],x.prototype,"disciplines",void 0),e([d({readOnly:!0})],x.prototype,"_filter",null),x=e([h("esri.widgets.BuildingExplorer.BuildingExplorerViewModel")],x);const b=x;export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as r
|
|
5
|
+
import{isSome as r}from"../../../core/maybe.js";import{generateUUID as t}from"../../../core/uuid.js";import n from"../../../layers/support/BuildingFilterBlock.js";import o from"../../../layers/support/BuildingFilterModeSolid.js";import i from"../../../layers/support/BuildingFilterModeXRay.js";const e="__BUILDING_EXPLORER_FILTER__";function f(){return`${t()}${e}`}function s(r){const t="string"==typeof r?r:r.id;return!!t&&-1!==t.indexOf(e)}function l(t,n){for(const o of t.items)for(const t of o.filters.items){if(!s(t))continue;const o=n(t);if(r(o))return o}return null}function u(t,n){t.forEach((t=>{const o=t.filters.filter((r=>!s(r)));r(n)&&o.push(n),t.filters=o,t.activeFilterId=r(n)?n.id:null}))}function c(r){const t=m(r);return t?new n({filterExpression:t,filterMode:new i}):null}function p(r){const t=m(r);return t?new n({filterExpression:t,filterMode:new o}):null}function m(r){return r.filter((r=>!!r)).map((r=>`(${r})`)).join(" AND ")}export{f as generateFilterId,p as getFilterBlockSolid,c as getFilterBlockXRay,l as getValueFromFilters,s as isBuildingExplorerFilter,u as setFilterOnLayers};
|