@arcgis/core 5.1.0-next.88 → 5.1.0-next.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/arcade/validation/arcadeValidator.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +1 -0
  4. package/assets/esri/core/workers/chunks/{500be1fb7cc9efec875c.js → 0e3dcf99382478181366.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{aae40d70eb01249c1bab.js → 1e4e7111d43f01c149b3.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2549a07f403447482f4e.js → 2dcfc4d7e76c922bcbf9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{4dc91c2208201ba34c90.js → 3397eae416622c64e628.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{b9e163f4a898e50cc854.js → 39d6032d79720935910d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d05a7ce6c1d4b883ed4c.js → 41cbde4738ae4adf973d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{a401d44a5b45c05072c2.js → 4b9b9e6136c11d5d7901.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5409369d0d637cb30257.js +1 -0
  12. package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js → 73af4c947e8151d411c1.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{01bd1b86ba899c6aa4c0.js → 75c09a2fa4c34b4844c5.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{b2983f521d8c96becd8a.js → 7ed5b669010db58845f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{8178e9ba3c568d406a87.js → 81d761c837b7456ec99f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7185486c6dc28fc367a1.js → 90a8dfb03a437fe8a6e7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{c9065cee85eb8dde6a42.js → a2159df718a7f2f59271.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7f34fa9f154f5101cb13.js → a232d05c0a055f398c6e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +2 -0
  20. package/assets/esri/core/workers/chunks/{4baf66314f82cfa76beb.js → adfa5c136c72c1e65770.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{004af103a94d21cb4889.js → aefeb5a17bb481c95da3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{164ee62f2211987ad850.js → bb8d596f15fd3a0d783a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +596 -0
  24. package/assets/esri/core/workers/chunks/{3cf77b7a61f78f9bcd62.js → ceff78c9e31e3572a082.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{5cc38ac051d3d0557920.js → cfaa6e205bfc0c94a1b1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/d5ad036d282df54b9ddc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{475394218caaa4cd3e86.js → d7e7f3efd1d28617b808.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f37e4ae0e9be80210db0.js → f2c11f54255fd506655e.js} +1 -1
  29. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  30. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  31. package/chunks/ComponentShader.glsl.js +3 -3
  32. package/chunks/index.js +1 -1
  33. package/config.js +1 -1
  34. package/interfaces.d.ts +7 -0
  35. package/kernel.js +1 -1
  36. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  37. package/package.json +2 -2
  38. package/support/revision.js +1 -1
  39. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  40. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  41. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  42. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  43. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  44. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +22 -16
  45. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  46. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  47. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  48. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  49. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  50. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  51. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  52. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  53. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  54. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  55. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  56. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  57. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  58. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  59. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  60. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  61. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  62. package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +1 -1
  63. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  64. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +2 -0
  65. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  66. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  67. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  68. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +64 -0
  69. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +2 -0
  70. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  71. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  72. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  73. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  74. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  75. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -2
  76. package/assets/esri/core/workers/chunks/3e72bd6dbfc52d956c06.js +0 -1
  77. package/assets/esri/core/workers/chunks/a429355534bf6cbd8304.js +0 -1
  78. package/assets/esri/core/workers/chunks/d00dddc3881fa29446e1.js +0 -1
  79. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +0 -596
  80. package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +0 -2
  81. /package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js.LICENSE.txt → 73af4c947e8151d411c1.js.LICENSE.txt} +0 -0
  82. /package/assets/esri/core/workers/chunks/{fe30e61652716fcccf16.js.LICENSE.txt → a508104179e08f0f268c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see a508104179e08f0f268c.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[477],{64083(t,e,s){s.d(e,{C:()=>f,G:()=>g,c:()=>u,p:()=>h,t:()=>d});var i=s(76189),o=s(40496),n=s(41276),r=s(56034),a=s(6829);let c;const h=()=>{c?.forEach(({callbacks:t},e)=>{const s=Object.keys(e);t.forEach(t=>t(s))}),c=void 0},l=(t,e,s)=>{const o=t.manager;return o.V!==n.s6&&o.V!==s&&o.S(void 0,void 0),0===o.T.length&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=s,o.T.push((t,o)=>(0,i.UF)(e,void 0,s===o?t:void 0)),s},d=(t=[(0,o.r)(),...(0,o.d)()],e,s)=>{const n=Array.isArray(t)?t:[t];let r=n.length+1;const a=t=>{r-=1,void 0!==t&&(r=Math.min(r,0)),0===r&&e(t)};n.forEach(t=>((t,e,s)=>{const o=Object.keys(t),n=o.length;void 0===c&&queueMicrotask(h),c??=new Map;let r=c.get(t);return void 0===r&&(r={callbacks:[],keyCount:n},c.set(t,r)),r.keyCount!==n&&(r.callbacks.forEach(t=>t(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(o=>{const r=t=>(0,i.UF)(e,null,t),a=o[n];void 0===a?r(void 0):t[a]===s?r(a):r(void 0)}),s})(t,e=>a(void 0===e?void 0:{key:e,host:t,isReactive:!1}),s));for(const t of n)if("manager"in t&&t.manager.component===t){l(t,e=>a(void 0===e?void 0:{key:e,host:t,isReactive:!0}),s);break}return s},u=((t="",e={},s=(0,o.r)())=>{const i={emit:i=>{""===t&&h();const o=new CustomEvent(t,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...e});return s.el.dispatchEvent(o),o}};return""===t&&d(void 0,e=>t=e.key,i),i}).bind(null,"");var p;p=o.c;class f{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#i=[],this.#o=[],this.#n=[],this.#r=[],this.#a=[],this.#c=[],this.#h=!1,this.P=new r.cY,this.connectedCalled=!1,this.loadedCalled=!1,this[p]=!0,this.#l=[];const e=this,s=t??(0,o.r)(new.target.name);e.#d=s,e.ready=e.P.promise,e.#u=y(e),e.component=s,e.#d.addController(e),void 0===e.#d.manager||((0,o.b)(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#i;#o;#n;#r;#a;#c;#h;#d;catchUpLifecycle(){const{manager:t}=this.#d;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t.#h||this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch((0,a.G3)(this.#d))}#u;get exports(){return this.#u}set exports(t){const e=this.#u;e!==t&&(this.#u=t,this.#l.forEach(i.UF),this.connectedCalled&&!1!==this.O&&this.#d.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#u=e?y(t):t,this.#l.forEach(i.UF)}#l;watchExports(t){const e=()=>t(this.#u);return this.#l.push(e),()=>{this.#l.splice(this.#l.indexOf(e),1)}}get use(){return(0,o.a)(this.#d),o.u}get useRef(){return(0,o.a)(this.#d),o.k}get useRefSync(){return(0,o.a)(this.#d),o.l}controllerRemoved(){this.#d.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#i.push(t)}onUpdate(t){this.#o.push(t)}onUpdated(t){this.#n.push(t)}onDestroy(t){this.#r.push(t)}onLifecycle(t){this.#a.push(t),this.connectedCalled&&this.#d.el.isConnected&&this.#p(t)}triggerConnected(){const t=this;t.hostConnected&&(0,i.UF)(t.hostConnected,t),t.#t.forEach(i.UF),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&(0,i.UF)(t.hostDisconnected,t),t.#e.forEach(i.UF),t.#c.forEach(i.UF),t.#c=[]}async triggerLoad(){if(this.#h)return;this.#h=!0;const t=this;t.hostLoad&&await(0,i.ao)(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(i.ao)),this.P.resolve(this.#u)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,i.UF)(this.hostLoaded,this),this.#i.forEach(i.UF),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&(0,i.UF)(this.hostUpdate,this,t),this.#o.forEach(m,t)}triggerUpdated(t){this.hostUpdated&&(0,i.UF)(this.hostUpdated,this,t),this.#n.forEach(m,t)}triggerDestroy(){this.hostDestroy&&(0,i.UF)(this.hostDestroy,this),this.#r.forEach(i.UF)}triggerLifecycle(){this.hostLifecycle&&this.#p(()=>this.hostLifecycle()),this.#a.forEach(this.#p,this)}#p(t){(0,o.a)(this.#d);const e=(0,i.UF)(t);(Array.isArray(e)?e:[e]).forEach(t=>{"function"==typeof t?this.#c.push(t):"object"==typeof t&&"function"==typeof t.remove&&this.#c.push(t.remove)})}}function m(t){(0,i.UF)(t,void 0,this)}const g=f,y=t=>{if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const e=new Proxy(t,{get(t,s,i){if("exports"!==s&&"_exports"!==s||!(s in t)||t[s]!==e)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,i):void 0}});return e}},40496(t,e,s){s.d(e,{a:()=>r,b:()=>h,c:()=>i,d:()=>l,e:()=>y,i:()=>o,j:()=>u,k:()=>f,l:()=>m,r:()=>a,s:()=>g,u:()=>p});const i=Symbol.for("controller"),o=t=>"function"==typeof t?.then;let n;const r=t=>{n!==t&&(n=t,queueMicrotask(()=>n===t?n=void 0:0))},a=t=>n;let c=[];const h=t=>{if(void 0===t)return void(c=[]);const e=c.indexOf(t);c=-1===e?[...c,t]:c.slice(0,e+1),queueMicrotask(()=>c=[])},l=()=>c;let d;const u=t=>{d!==t&&(d=t,queueMicrotask(()=>d===t?d=void 0:0))},p=async(t,e)=>{const s=m(t);if(void 0===s)return t;if(await s.ready,"function"==typeof e){const t=s.watchExports(s=>e(s,t))}return s.exports},f=async t=>{const e=m(t);return await e.ready,e},m=t=>{const e=a().manager.X(t);if(void 0!==e)return e;if((t=>"object"==typeof t&&null!==t&&(i in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t))return t;const s=(()=>{const t=d;return d=void 0,t})();return void 0!==s?s:void 0};let g=!1;const y=t=>{g=!0;try{return t()}finally{g=!1}}},15236(t,e,s){s.d(e,{C:()=>c,a:()=>l,b:()=>h,s:()=>d});var i=s(76189),o=s(64083),n=s(41276),r=s(56034),a=s(40496);class c extends o.G{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=n.s6,this.T=[],this.#f=new WeakMap,this.#d=t,this.exports=void 0,this.hasDestroy=l in t&&"function"==typeof t.destroy,n.WF.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){const e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${l} prop.`)}void 0!==this.#m&&clearTimeout(this.#m),(0,o.p)();for(const e of t.M)"triggerConnected"in e?e.triggerConnected():(0,i.UF)(e.hostConnected,e)},hostDisconnected:()=>{for(const e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():(0,i.UF)(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):(0,i.UF)(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(const e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):(0,i.UF)(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,a.a)(t)}#m;#d;async destroy(){if(!this.destroyed){this.#d.el.isConnected&&(this.hasDestroy=!1,this.#d.el.remove()),this.#m=void 0,this.destroyed=!0;for(const t of this.#d.M)"triggerDestroy"in t?t.triggerDestroy():(0,i.UF)(t.hostDestroy,t);this.#d.M.splice(0)}}U(){if(void 0!==this.#m&&clearTimeout(this.#m),!this.#d.el.isConnected&&!this.#d.autoDestroyDisabled){const t=()=>{this.#d.destroy()};this.#m=(0,r.oK)(t,h)}}S(t,e){const s=this.T;this.V=n.s6,this.T=[],s.forEach(s=>s(t,e))}#f;W(t,e){("object"==typeof e&&null!==e||"function"==typeof e)&&this.#f.set(e,t)}X(t){return"object"==typeof t&&null!==t||"function"==typeof t?this.#f.get(t):void 0}}let h=1e3;const l="autoDestroyDisabled";function d(t){h=t}},19470(t,e,s){s.d(e,{WF:()=>S,le:()=>T,s6:()=>x,CP:()=>k,zl:()=>L,Bq:()=>P,pf:()=>R});var i=s(64083),o=s(22343);o.W3,o.Ec;var n=s(56034);const r=t=>{let e=t;for(;e=e.parentNode??e.host;)if(e?.constructor?.lumina){const s=e;return s.manager?.loadedCalled||(s.J??s._offspring).push(t),(s.I??s._postLoad).promise}return!1},a={};function c(){}function h(t){for(const e of["Associated","Disabled","Reset","StateRestore"]){const s=`orm${e}Callback`;t.prototype["f"+s]=async function(...t){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${s}`,{detail:t}))}}}const l=Object.defineProperty,d=globalThis.HTMLElement??c;class u extends d{constructor(){super(),this.#g={},this.#y=[],this.I=new n.cY,this.H=new n.cY,this.J=[];const t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(e=>{Object.hasOwn(t,e)&&(t.#g[e]=t[e],delete t[e])}),e.A?t.#$({a:e.A}):e.B.then(async s=>{await e.K.p,t.#$(await(s.default?.then(t=>"function"==typeof t?{a:t}:t)??s))}).catch(e=>{t.H.reject(e),setTimeout(()=>{throw e})})}static{this.lumina=!0}static F(){for(const t of this.C??[])l(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#g[t]},set(e){this.#g[t]=e}});for(const t of this.E??[])l(this.prototype,t,{async value(...e){this.#A||await this.H.promise;const s=this.#A;return await s[t](...e)},configurable:!0});for(const t of this.D??[])l(this.prototype,t,{value(...e){return this.#A[t](...e)},configurable:!0})}static{h(this)}#A;#g;#y;get manager(){return this.#A?.manager}attributeChangedCallback(t,e,s){this.#A?.attributeChangedCallback(t,e,s),this.#A||this.#y.push(t)}connectedCallback(){this.#A?this.#A.connectedCallback?.():queueMicrotask(()=>this.G=r(this))}disconnectedCallback(){this.#A?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#$(t){const e=this.constructor,s=e.L,i=this.#g,o=Object.values(t).find(t=>t.L===s),n=`${s}--lazy`;let r=o;for(;r&&!Object.hasOwn(r,"lumina");)r=Object.getPrototypeOf(r);f(r),!e.A&&(e.A=o,customElements.define(n,o)),o.N=this;const a=document.createElement(n);o.N=void 0,this.#A=a,this.#g=a,this.#y.forEach(t=>a.attributeChangedCallback(t,null,this.getAttribute(t))),Object.entries(i).forEach(p,a);const c=this.isConnected;(c||this.G)&&(a.connectedCallback?.(),c||a.disconnectedCallback())}addController(){}requestUpdate(){this.#A?.requestUpdate()}}function p([t,e]){this[t]=e}const f=t=>{const e=t.prototype,s=Element.prototype;Object.hasOwn(e,"isConnected")||(e.setAttribute=function(t,e){s.setAttribute.call(this.el,t,e)},e.removeAttribute=function(t){s.removeAttribute.call(this.el,t)},e.hasAttribute=function(t){return s.hasAttribute.call(this.el,t)},l(e,"isConnected",{get(){return Reflect.get(s,"isConnected",this.el)}}))};var m=s(76189),g=s(96852),y=s(41276),$=s(40496),A=s(15236),v=s(33377),_=s(63179);const b=(0,_.u$)(class extends _.WL{constructor(t){if(super(t),t.type!==_.OA.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return v.c0}}),C="important",E=" !"+C,w=(0,_.u$)(class extends _.WL{constructor(t){if(super(t),t.type!==_.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const i=e[t];if(null!=i){this.ft.add(t);const e="string"==typeof i&&i.endsWith(E);t.includes("-")||e?s.setProperty(t,e?i.slice(0,-11):i,e?C:""):s[t]=i}}return v.c0}});s(22804);var U=s(80966);class S extends y.WF{constructor(){super(),this.M=[],this.manager=new A.C(this);const t=this,e=t.constructor,s=e.N,i=e.K.o,o=S.prototype.shouldUpdate;t.#v=s?.H??new n.cY,t.I=s?.I??new n.cY,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#_=t.enableUpdating,t.enableUpdating=c,t.shouldUpdate!==o&&(t.#b=t.shouldUpdate,t.shouldUpdate=o),i&&(t.#C=new Map,e.elementProperties.forEach((e,s)=>t.#C.set(s,i()))),y.S$&&t.el.setAttribute(e.K.hydratedAttribute,"")}static finalizeStyles(t){const e=super.finalizeStyles(t),s=this.shadowRootOptions===a;return void 0===this.K?.commonStyles||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){const s="number"==typeof e?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,o=i?.hasChanged??y.Ec,n={attribute:!!(1&s&&"string"==typeof t)&&(0,g.j1)(t),reflect:!!(2&s),type:4&s?Boolean:8&s?Number:void 0,state:!!(16&s),readOnly:!!(32&s),noAccessor:!!(64&s),useDefault:!!(128&s),c:!1,...i,hasChanged(t,e){const s=o(t,e);return n.c=s,s}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){const o=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return o.t?.(this.#C.get(t)),n.get?.call(this)},set(e){const o=this.manager;if(s.readOnly&&!$.s&&(o.R||o.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${e}"`);n.set.call(this,e??void 0),s.c&&this.#C?.get(t)?.notify(),o.T.length>0&&((0,i.p)(),o?.S(t,e))}}}static{this.lumina=!0}static{h(this)}#C;#b;#_;#v;#E;#w;get elementInternals(){return this.#w??=this.el.attachInternals(),this.#w}connectedCallback(){this.hasAttribute("defer-hydration")||this.#U(!0)}#U(t){const e=this.constructor.K.c?.(()=>this.requestUpdate());this.#E=e;const s=!this.manager.connectedCalled;t&&super.connectedCallback(),s?queueMicrotask(()=>this.#S().catch(t=>{this.#v.reject(t),setTimeout(()=>{throw t})})):e&&this.requestUpdate()}#T(t){try{this.#E.clear(),this.constructor.K.r(this.#E,()=>super.update(t))}catch(t){throw this.#E.clear(),t}}disconnectedCallback(){super.disconnectedCallback(),this.#E?.destroy(),this.#E=void 0}createRenderRoot(){const t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===a?this.el:this.el.attachShadow(s));if(t)return this.manager.connectedCalled||this.#U(!1),y.WF.prototype.createRenderRoot.call(this),t;if(this.isConnected){const t=i.getRootNode();t.adoptedStyleSheets=[...t.adoptedStyleSheets,...e.elementStyles.map(t=>"styleSheet"in t?t.styleSheet:t)]}return i}async#S(){const t=this.el.G??r(this.el);t&&await t;const e=[];for(const t of this.M)"triggerLoad"in t?e.push(t.triggerLoad()):e.push((0,m.ao)(t.hostLoad,t));await Promise.all(e),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(t=>t.has(A.a)&&this.manager.U()),this.#_(!0),this.performUpdate(),this.I.resolve(),await 0;const s=this.J.filter(t=>!t.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async t=>await t.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const t of this.M)"triggerLoaded"in t?t.triggerLoaded():(0,m.UF)(t.hostLoaded,t);this.loaded?.(),this.#v.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#b?.(t)??!0}update(t){this.#E?this.#T(t):super.update(t)}listen(t,e,s){const i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){const o=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,o,i),()=>t.removeEventListener(e,o,i)))}async componentOnReady(){return await this.#v.promise,this}addController(t){this.M.push(t),!($.c in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}}const T=t=>{let e;const s=t=>{e=new URL(t,globalThis.location?.href||void 0).href},i={...t,getAssetPath(t){const s=new URL(t,e);return s.origin!==globalThis.location?.origin?s.href:s.pathname},setAssetPath:s,customElement(t,e){e.K=i,e.L=t,y.S$?function(){try{customElements.define(t,e)}catch{}}():customElements.get(t)||customElements.define(t,e)}};return s(t.defaultAssetPath),i},k=t=>"object"==typeof t&&null!=t?b(t):t,L=t=>"object"==typeof t&&null!=t?w(t):t;class O extends _.WL{#k;#L;constructor(t){super(t);const e=this;this.#L=function(t){return e.#k.call(this,t)}}render(t){return"function"==typeof t?(this.#k=t,(0,U.K)(this.#L)):(0,U.K)(t)}}(0,_.u$)(O);const x=y.s6;function P(t,e,s){null==s?t.removeAttribute(e):t.setAttribute(e,s)}const R={toAttribute:t=>!0===t?"":!1===t?null:t}},54395(t,e,s){s.d(e,{Yt:()=>i,Zj:()=>c,eg:()=>a});const i=(t,e,s)=>(0,n(e).subscribe)(e=>{const i=e.some(e=>((t,e)=>{let s=t;for(;s;){if(s===e)return!0;if(!s.parentNode)return!1;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t,e.target));i&&s()}),o={},n=t=>{const e=t.join(","),s=o[e];if(void 0!==s)return s;const i=new Set,n=new MutationObserver(t=>i.forEach(e=>e(t)));globalThis.document&&n.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});const r={subscribe:t=>(i.add(t),()=>{i.delete(t),0===i.size&&(n.disconnect(),o[e]=void 0)})};return o[e]=r,r},r=(t,e)=>{let s=t;for(;s;){const t=s.closest?.(e);if(t)return t;const i=s.getRootNode?.();if(i===globalThis.document)return;s=i?.host}};function a(t){const e=r(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const c=(t,e,s)=>{const i=r(t,`[${e}]`);return i?.getAttribute(e)??s}},76189(t,e,s){s.d(e,{UF:()=>i,ao:()=>o});const i=(t,e,...s)=>{try{return t?.call(e,...s)}catch(e){console.error(e,t)}},o=async(t,e,...s)=>{try{const i=t?.call(e,...s);return await i}catch(e){console.error(e,t)}}},6829(t,e,s){s.d(e,{G3:()=>r,Rm:()=>n});const i=new Set;const o=t=>"string"==typeof t?t:"el"in t?t.el.localName:"localName"in t?t.localName:t.declaredClass,n=(t,e,s,n)=>{const r=o(e);if(n?.once){const e=`${t}${r}${s}`;if(i.has(e))return;i.add(e)}let a;if(n?.detail){a={};for(const[t,e]of Object.entries(n.detail))if("object"!=typeof e&&"function"!=typeof e||null===e)a[t]=e;else{const s=new WeakRef(e);Object.defineProperty(a,t,{get:()=>s.deref()})}console[t](`[${r}]: ${s}`,a)}else console[t](`[${r}]: ${s}`)},r=t=>{const e=`[${o(t)}] `;return t=>{const s=t instanceof Error&&t.message?t:new Error(String(t));s.message=`${e}${s.message}`,setTimeout(()=>{throw t})}}},56034(t,e,s){s.d(e,{cY:()=>i,oK:()=>o});class i{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const o=(t,e)=>{const s=e>n?r:e/a;let i=0;const o=setInterval(()=>{i+=s,i>=e&&(clearInterval(o),t())},s);return o},n=4e3,r=2e3,a=4},96852(t,e,s){s.d(e,{TK:()=>i,YF:()=>a,j1:()=>o});const i=t=>t.split("-").map(r).join(""),o=t=>t.replace(n,(t,e)=>`${0===e?"":"-"}${t.toLowerCase()}`),n=/[A-Z]+(?![a-z])|[A-Z]/gu,r=t=>t.charAt(0).toUpperCase()+t.slice(1),a=t=>t.charAt(0).toLowerCase()+t.slice(1);crypto},64282(t,e,s){s.d(e,{C:()=>a,D:()=>c,a:()=>p,b:()=>h,c:()=>g,g:()=>y,s:()=>$}),Object(function(){var t=new Error("Cannot find module '../cdn/main.css'");throw t.code="MODULE_NOT_FOUND",t}());var i=s(19470),o=s(41276);const n="calcite-mode-auto",r="calcite-mode-dark",a={autoMode:n,darkMode:r,lightMode:"calcite-mode-light",rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left"},c={filter:250,nextTick:0,resize:150,reposition:100},h=25;function l(){const{classList:t}=document.body,e=window.matchMedia("(prefers-color-scheme: dark)").matches,s=()=>t.contains(r)||t.contains(n)&&e?"dark":"light",i=t=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:t}})),o=t=>{a!==t&&i(t),a=t};let a=s();i(a),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>o(t.matches?"dark":"light")),new MutationObserver(()=>o(s())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}let d;const u={focusTrapStack:[],logLevel:"info"};function p(){return d||(d={...u,...globalThis.calciteConfig??{}}),d}const f="5.1.0-next.42";o.S$||("interactive"===document.readyState?l():document.addEventListener("DOMContentLoaded",l,{once:!0})),queueMicrotask(function(){const t=p();t&&t.version||(console.info(`Using Calcite Components ${f} [Date: 2026-04-28, Revision: 4a7a38934]`),Object.defineProperty(t,"version",{value:f,writable:!1}),globalThis.calciteConfig=t)});const m=(0,i.le)({defaultAssetPath:"https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.1.0-next.42/dist/cdn/",hydratedAttribute:"calcite-hydrated"}),{customElement:g,getAssetPath:y,setAssetPath:$}=m},73731(t,e,s){s.d(e,{Qu:()=>n,qu:()=>o});var i=s(64282);let o=!1;const n=t=>{o=!0,(0,i.s)(t)}},22343(t,e,s){s.d(e,{mN:()=>w,AH:()=>c,W3:()=>b,Ec:()=>C});const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap;class a{constructor(t,e,s){if(this._$cssResult$=!0,s!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1],t[0]);return new a(s,t,n)},h=(t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),o=i.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,t.appendChild(e)}},l=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:d,defineProperty:u,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,y=globalThis,$=y.trustedTypes,A=$?$.emptyScript:"",v=y.reactiveElementPolyfillSupport,_=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},C=(t,e)=>!d(t,e),E={attribute:!0,type:String,converter:b,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class w extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=E){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&u(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);o?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??E}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return h(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:b).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=i;const n=o.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s,i=!1,o){if(void 0!==t){const n=this.constructor;if(!1===i&&(o=this[t]),s??=n.getPropertyOptions(t),!((s.hasChanged??C)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==o||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[_("elementProperties")]=new Map,w[_("finalized")]=new Map,v?.({ReactiveElement:w}),(y.reactiveElementVersions??=[]).push("2.1.2")},40171(t,e,s){s.d(e,{Rt:()=>n,mY:()=>a});var i=s(33377);const{I:o}=i.ge,n=t=>void 0===t.strings,r={},a=(t,e=r)=>t._$AH=e},63179(t,e,s){s.d(e,{OA:()=>i,WL:()=>n,u$:()=>o});const i={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},o=t=>(...e)=>({_$litDirective$:t,values:e});class n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},33377(t,e,s){s.d(e,{JW:()=>U,XX:()=>q,c0:()=>T,ej:()=>S,ge:()=>z,qy:()=>w,s6:()=>k});const i=globalThis,o=t=>t,n=i.trustedTypes,r=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,a="$lit$",c=`lit$${Math.random().toFixed(9).slice(2)}$`,h="?"+c,l=`<${h}>`,d=document,u=()=>d.createComment(""),p=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,m=t=>f(t)||"function"==typeof t?.[Symbol.iterator],g="[ \t\n\f\r]",y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,A=/>/g,v=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),_=/'/g,b=/"/g,C=/^(?:script|style|textarea|title)$/i,E=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),w=E(1),U=E(2),S=E(3),T=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),L=new WeakMap,O=d.createTreeWalker(d,129);function x(t,e){if(!f(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==r?r.createHTML(e):e}const P=(t,e)=>{const s=t.length-1,i=[];let o,n=2===e?"<svg>":3===e?"<math>":"",r=y;for(let e=0;e<s;e++){const s=t[e];let h,d,u=-1,p=0;for(;p<s.length&&(r.lastIndex=p,d=r.exec(s),null!==d);)p=r.lastIndex,r===y?"!--"===d[1]?r=$:void 0!==d[1]?r=A:void 0!==d[2]?(C.test(d[2])&&(o=RegExp("</"+d[2],"g")),r=v):void 0!==d[3]&&(r=v):r===v?">"===d[0]?(r=o??y,u=-1):void 0===d[1]?u=-2:(u=r.lastIndex-d[2].length,h=d[1],r=void 0===d[3]?v:'"'===d[3]?b:_):r===b||r===_?r=v:r===$||r===A?r=y:(r=v,o=void 0);const f=r===v&&t[e+1].startsWith("/>")?" ":"";n+=r===y?s+l:u>=0?(i.push(h),s.slice(0,u)+a+s.slice(u)+c+f):s+c+(-2===u?e:f)}return[x(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class R{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,r=0;const l=t.length-1,d=this.parts,[p,f]=P(t,e);if(this.el=R.createElement(p,s),O.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=O.nextNode())&&d.length<l;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(a)){const e=f[r++],s=i.getAttribute(t).split(c),n=/([.?@])?(.*)/.exec(e);d.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?H:"?"===n[1]?I:"@"===n[1]?F:j}),i.removeAttribute(t)}else t.startsWith(c)&&(d.push({type:6,index:o}),i.removeAttribute(t));if(C.test(i.tagName)){const t=i.textContent.split(c),e=t.length-1;if(e>0){i.textContent=n?n.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],u()),O.nextNode(),d.push({type:2,index:++o});i.append(t[e],u())}}}else if(8===i.nodeType)if(i.data===h)d.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(c,t+1));)d.push({type:7,index:o}),t+=c.length-1}o++}}static createElement(t,e){const s=d.createElement("template");return s.innerHTML=t,s}}function M(t,e,s=t,i){if(e===T)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const n=p(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=M(t,o._$AS(t,e.values),o,i)),e}class D{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??d).importNode(e,!0);O.currentNode=i;let o=O.nextNode(),n=0,r=0,a=s[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new N(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new W(o,this,t)),this._$AV.push(e),a=s[++r]}n!==a?.index&&(o=O.nextNode(),n++)}return O.currentNode=d,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class N{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),p(t)?t===k||null==t||""===t?(this._$AH!==k&&this._$AR(),this._$AH=k):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):m(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==k&&p(this._$AH)?this._$AA.nextSibling.data=t:this.T(d.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=R.createElement(x(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new D(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=L.get(t.strings);return void 0===e&&L.set(t.strings,e=new R(t)),e}k(t){f(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new N(this.O(u()),this.O(u()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=o(t).nextSibling;o(t).remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class j{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=k,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=k}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(void 0===o)t=M(this,t,e,0),n=!p(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const i=t;let r,a;for(t=o[0],r=0;r<o.length-1;r++)a=M(this,i[s+r],e,r),a===T&&(a=this._$AH[r]),n||=!p(a)||a!==this._$AH[r],a===k?t=k:t!==k&&(t+=(a??"")+o[r+1]),this._$AH[r]=a}n&&!i&&this.j(t)}j(t){t===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends j{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===k?void 0:t}}class I extends j{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==k)}}class F extends j{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??k)===T)return;const s=this._$AH,i=t===k&&s!==k||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==k&&(s===k||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const z={M:a,P:c,A:h,C:1,L:P,R:D,D:m,V:M,I:N,H:j,N:I,U:F,B:H,F:W},B=i.litHtmlPolyfillSupport;B?.(R,N),(i.litHtmlVersions??=[]).push("3.3.2");const q=(t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new N(e.insertBefore(u(),t),t,void 0,s??{})}return o._$AI(t),o}},22804(t,e,s){s.d(e,{V:()=>r});var i=s(33377),o=s(63179),n=s(40171);const r=(0,o.u$)(class extends o.WL{constructor(t){if(super(t),t.type!==o.OA.PROPERTY&&t.type!==o.OA.ATTRIBUTE&&t.type!==o.OA.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!(0,n.Rt)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===i.c0||e===i.s6)return e;const s=t.element,r=t.name;if(t.type===o.OA.PROPERTY){if(e===s[r])return i.c0}else if(t.type===o.OA.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(r))return i.c0}else if(t.type===o.OA.ATTRIBUTE&&s.getAttribute(r)===e+"")return i.c0;return(0,n.mY)(t),e}})},80966(t,e,s){s.d(e,{_:()=>p,K:()=>g});var i=s(33377),o=s(40171),n=s(63179);const r=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),r(t,e);return!0},a=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},c=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),d(e)}};function h(t){void 0!==this._$AN?(a(this),this._$AM=t,c(this)):this._$AM=t}function l(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)r(i[t],!1),a(i[t]);else null!=i&&(r(i,!1),a(i));else r(this,t)}const d=t=>{t.type==n.OA.CHILD&&(t._$AP??=l,t._$AQ??=h)};class u extends n.WL{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),c(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(r(this,t),a(this))}setValue(t){if((0,o.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const p=()=>new f;class f{}const m=new WeakMap,g=(0,n.u$)(class extends u{render(t){return i.s6}update(t,[e]){const s=e!==this.G;return s&&void 0!==this.G&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),i.s6}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let s=m.get(e);void 0===s&&(s=new WeakMap,m.set(e,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},41276(t,e,s){s.d(e,{WF:()=>r,AH:()=>i.AH,qy:()=>o.qy,S$:()=>c,Ec:()=>i.Ec,s6:()=>o.s6,JW:()=>o.JW});var i=s(22343),o=s(33377);const n=globalThis;class r extends i.mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,o.XX)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return o.c0}}r._$litElement$=!0,r.finalized=!0,n.litElementHydrateSupport?.({LitElement:r});const a=n.litElementPolyfillSupport;a?.({LitElement:r}),(n.litElementVersions??=[]).push("4.2.2");const c=!1}}]);
@@ -596,7 +596,7 @@ return fallOffFunction(vv, vn, 0.1);
596
596
  vec2 uvOffset = uv + rf * blurSize;
597
597
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
598
598
  }
599
- fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>h,b:()=>l,c:()=>s,d:()=>n,e:()=>m,f:()=>d,l:()=>u,n:()=>p,t:()=>i});var o=r(40876),a=(r(44208),r(72727));function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],p=r[6],f=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],a=t[w+1],i=t[w+2];e[M]=c*r+h*a+f*i+x,e[M+1]=u*r+m*a+v*i+b,e[M+2]=d*r+p*a+g*i+y,w+=n,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],p=r[5],f=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],a=t[x+1],i=t[x+2];e[b]=c*r+h*a+f*i,e[b+1]=u*r+m*a+v*i,e[b+2]=d*r+p*a+g*i,x+=n,b+=o}}function c(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,a,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=a*(r*t[l])**u,e[c+1]=a*(r*t[l+1])**u,e[c+2]=a*(r*t[l+2])**u,l+=i,c+=n}function h(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let a=0;a<l;a++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=o;return e}function m(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:p,normalizeView:m,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a,ie:()=>l,uC:()=>s});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>u,fA:()=>a,uY:()=>c,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>c,fA:()=>n,o8:()=>a,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>h,fA:()=>a,uY:()=>d,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),p=l(),f=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:p,UNIT_Z:f,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>w,aI:()=>S,hG:()=>f,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,I=c,_=p,P=f,z=v,D=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:_,distance:p,div:I,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:D,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>a,Ul:()=>m,i5:()=>h,lM:()=>n,qK:()=>u});var o=r(34275);const a=16;function n(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return a;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,a):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>I});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function p(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class f{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends f{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),p=(0,d.RS)([],c,u,s),f=(0,d.RS)([],h,p,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([p,u]),this.tEndStack.push(e),this.arcEndStack.push(f),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends f{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:p}){if(l)return e.push([...r]),e;const f=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<f?2*Math.asin(u/f):x,y=c>0&&c<=n?2*Math.acos(1-c/n):x,w=Math.min(b,y),M=Math.min(m,Math.max(p,Math.ceil(Math.abs(x/w)))),S=1/M;for(let t=1;t<M;t++){const r=t*S,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function y(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function w(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function M(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function S(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?y(e,t,r,o):(0,l.DA)(r)?w(e,t,r,o):M(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=p(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),S(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=_(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(6312)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=p(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?y(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?w(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?M(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function _(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>D,O7:()=>P,el:()=>_});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),p=r(31411),f=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),y=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function M(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,p.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,p,M,S,P,z=0;const D=[],F=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,M=c?102100:4326,m=u.j7[M].maxX,p=u.j7[M].minX,S=u.j7[M].plus180Line,P=u.j7[M].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(C(t.clone(),m,p));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,p)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,p)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(S)&&n!==m?(z=n>z?n:z,o=T(o,c),D.push(o),F.push("cut")):e.intersects(P)&&a!==p?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),D.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let O=(0,u.kd)(z,m),j=-90;const E=O,R=new l.A;for(;O>0;){const e=360*O-180;R.addPath([[e,j],[e,-1*j]]),j*=-1,O--}if(D.length>0&&E>0){const t=I(D,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,f.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,D,R,r)),o=[],n=[];for(let r=0;r<F.length;r++){const a=F[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,y.X)(t))}},{data:s}=await(0,f.A)(o.path+"/simplify",i);return(0,y.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const H=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)H.push(t);else{const e=D.shift();H.push(!0===c?(0,h.Gh)(e):e)}}return H}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const D=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>w,vE:()=>M,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=S){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,p=d*d+h*h+m*m,f=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return o[0]=d*f,o[1]=h*f,o[2]=m*f,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(p,s),s++,l=!(0,a.t2)(m,p);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(f,s),s++,(0,a.Re)(v,m,p),(0,a.S8)(v,v),(0,a.Re)(g,p,f),(0,a.S8)(g,g),l=!(0,a.t2)(m,f)&&!(0,a.t2)(p,f)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,p,f,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),p=(0,n.vt)(),f=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(M(e,t.origin,t.vector,0,r))}function b(e,t){return w(e,t)>=0}function y(e,t){const r=(0,a.Om)(e,t.ray.direction),o=-w(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const n=o/r;return r>0?n<t.c1&&(t.c1=n):n>t.c0&&(t.c0=n),t.c0<=t.c1}function w(e,t){return(0,a.Om)(e,t)+e[3]}function M(e,t,r,n,i){const s=(0,a.Om)(e,r),l=w(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const S=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,J8:()=>p,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64()),p=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),i}},5644(e,t,r){r.d(t,{fetch:()=>yt});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),p=r(34275);function f(e,t=!1){return e<=p.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),y=r(21015),w=r(84498),M=r(51530),S=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:S.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class I{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var _=r(11254),P=r(60999),z=r(49186),D=r(53966),F=r(69397);class O{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new O;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var j=r(17676),E=r(46140),R=r(97146),H=r(31217),B=r(46610),N=r(63500),W=r(18845),A=r(49255),G=r(97768),L=r(92130),V=r(65786);class k extends L.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,G.Gz)(this._texture),this._textureNormal=(0,G.Gz)(this._textureNormal),this._textureEmissive=(0,G.Gz)(this._textureEmissive),this._textureOcclusion=(0,G.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,G.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new $(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,G.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,j.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,G.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends V.Y{constructor(e=null){super(),this.textureEmissive=e}}class $ extends U{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var q=r(11725),Z=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,m.vt)();function X(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,Z.vA)(0===e.type),Q(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=de,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),v=m>=p?m>=f?0:2:p>=f?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,w=u[b]/u[g],M=u[y]/u[g],S=1/u[g],T=te,C=re,I=oe,{normalRequired:_}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&((0,d.C)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.C)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.C)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(I,h[2],e);const m=T[b]-w*T[g],p=T[y]-M*T[g],f=C[b]-w*C[g],v=C[y]-M*C[g],x=I[b]-w*I[g],P=I[y]-M*I[g],z=x*v-P*f,D=m*P-p*x,F=f*p-v*m;if((z<0||D<0||F<0)&&(z>0||D>0||F>0))continue;const O=z+D+F;if(0===O)continue;const j=z*(S*T[g])+D*(S*C[g])+F*(S*I[g]);if(j*Math.sign(O)<0)continue;const E=j/O;E>=0&&c(E,_?ne(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const K=(0,h.vt)();function Q(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,K);if((0,m.Ne)(J,e.bbMin),(0,m.vI)(J,e.bbMax),null!=a&&a.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],p=t[0],f=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const y=i*a[r+1];let w=n[y],M=n[y+1],S=n[y+2];const T=i*a[r+2];let C=n[T],I=n[T+1],_=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[w,M,S]=l.applyToVertex(w,M,S,e),[C,I,_]=l.applyToVertex(C,I,_,e));const P=w-c,z=M-x,D=S-b,F=C-c,O=I-x,j=_-b,E=f*j-O*v,R=v*F-j*p,H=p*O-F*f,B=P*E+z*R+D*H;if(Math.abs(B)<=ce)continue;const N=d-c,W=h-x,A=m-b,G=N*E+W*R+A*H;if(B>0){if(G<0||G>B)continue}else if(G>0||G<B)continue;const L=W*D-z*A,V=A*P-D*N,k=N*z-P*W,U=p*L+f*V+v*k;if(B>0){if(U<0||G+U>B)continue}else if(U>0||G+U<B)continue;const $=(F*L+O*V+j*k)/B;$>=0&&u($,g?ae(P,z,D,F,O,j,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const ee=(0,h.vt)();const te=(0,h.vt)(),re=(0,h.vt)(),oe=(0,h.vt)();function ae(e,t,r,o,a,n,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,a,n),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ne(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,h.vt)(),se=(0,h.vt)(),le=1e3,ce=1e-7,ue=(0,h.vt)(),de=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()];var he=r(16396),me=r(59907);class pe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a,n){return(0,me.vJ)(r,o,this.layout,e,t,a,n)}}var fe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),ye=r(4431),we=r(1843),Me=r(72824),Se=r(13840),Te=r(98958),Ce=r(16943),Ie=r(33524),_e=r(56133),Pe=r(4576);r(66289);var ze=r(69622),De=r(65529),Fe=r(32728);class Oe{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let je=class extends ze.A{constructor(e,t){super(e),this.events=new De.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Re(Ee.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ae,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Oe(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=He,o=Be;t.localTransform.getMat(e,Ne),t.globalTransform.getMat(e,We);const a=(0,l.lw)(We,We,Ne);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Fe.wp)(He,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Be),r.modelOrigin.getVec(e,He),t[0]=Be[0],t[1]=Be[1],t[2]=Be[2],t[3]=0,t[4]=Be[3],t[5]=Be[4],t[6]=Be[5],t[7]=0,t[8]=Be[6],t[9]=Be[7],t[10]=Be[8],t[11]=0,t[12]=He[0],t[13]=He[1],t[14]=He[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(He,this,e),t*=Math.max(He[0],He[1],He[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(He,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(He[0],He[1],He[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Ae,Math.floor(this._capacity*Pe.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Oe(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],je.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],je.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],je.prototype,"size",null),je=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],je);const Ee=(0,we.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Re(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const He=(0,h.vt)(),Be=(0,s.vt)(),Ne=(0,c.vt)(),We=(0,c.vt)(),Ae=64,Ge=(0,we.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Le=r(74810),Ve=r(28491),ke=r(90644),Ue=r(49788);class $e extends Me.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Le.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Ue.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Me.gy;let qe=class extends Te.w{constructor(e,t){let o=(0,ye.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,ye.U)(function(e){return Re(Ge.clone(),e)}(t)))),super(e,t,o),this.shader=new Se.r(Ve.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,Ie.Yf)(r,!1,e.emissionDimmingPass):null,culling:Ye(e)?(0,ke.Xt)(a):null,depthTest:(0,Ie.mt)(r,Ze(n)),depthWrite:(0,Ie.z5)(e),colorWrite:ke.kn,stencilWrite:i?_e.v0:null,stencilTest:i?t?_e.Ax:_e.cP:null,polygonOffset:(0,fe.sG)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function Ze(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,we.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ce.E)()&&t.vec4u8("olidColor"),t}qe=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],qe);var Xe=r(51976),Ke=r(47724);class Qe extends Ke.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ge.Cg)([(0,Xe.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Xe.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends qe{constructor(){super(...arguments),this.shader=new Se.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Xe.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Xe.W)()],rt.prototype,"receiveShadows",void 0);class ot extends q.i{constructor(e,t){super(e,nt),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,A.uw)(e)&&!this.transparent],[4,e=>(0,A.uw)(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>(0,A.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,A._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,o,a,n){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let n=null;switch(r.viewingMode){case 1:n=(0,d.S8)(ct,dt);break;case 2:n=(0,d.C)(ct,lt)}const i=(0,d.Re)(ht,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(n,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(n,n,u),(0,d.ei)(ut,n,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),a=(0,d.Re)(st,a,ut)}n=(0,fe.b6)(n,this._configuration,o,a),X(e,r,o,a,(0,he.ou)(r.verticalOffset),n)}createGLMaterial(e){return new at(e)}createBufferWriter(){return new pe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:a,texture:n,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||a<1||(null!=n||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class at extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:qe,e)}}class nt extends $e{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const it=(0,h.vt)(),st=(0,h.vt)(),lt=(0,h.fA)(0,0,1),ct=(0,h.vt)(),ut=(0,h.vt)(),dt=(0,h.vt)(),ht=(0,h.vt)(),mt=()=>D.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class pt{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function ft(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(mt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(mt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(mt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(mt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else mt().warn("Indexed geometries must specify faces"),o=!1;break}default:mt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(mt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(mt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new E.A(1,2,"wosr");async function yt(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,P.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,j.QP)(r.error),function(e){throw new z.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){mt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,H.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new pt(r,o,a+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new O,i=e.resource,s=E.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const p=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!ft(i))continue;const s=xt(i),l=i.params.vertexAttributes,f=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,R.tM)(x);f.push([e,new B.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!p.has(b)){const{image:e,parameters:t}=y,r=new W.h(e,t);o.push(r),p.set(b,r)}const w=p.get(b),M=w?w.id:void 0,S=s.material;let T=n.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?gt(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new ot(o,t),n.set(S,b,T)}a.push(T);const C=new N.V(T,f);m+=f.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let p;if(t.cache)p=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));p=await e(new y.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:S,referenceBoundingBox:C}=function(e,t,r){const a=e.model,s=e.meta,p=a.meta?.ESRI_proxyEllipsoid,y=s.isEsriSymbolResource&&null!=p&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const a=e.model.lods[r];for(const n of a.parts){const a=n.attributes.normal;if(null==a)return;const i=n.attributes.position,s=i.count,u=(0,h.vt)(),m=(0,h.vt)(),p=(0,h.vt)(),f=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),n.transform);let b=0,y=0;for(let l=0;l<s;l++){i.getVec(l,m),a.getVec(l,u),(0,d.Z0)(m,m,n.transform),(0,d.Re)(p,m,t.center),(0,d.Qr)(p,p,t.radius);const s=p[2],c=(0,d.Bw)(p),h=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(p,p,t.radius),null!==x&&(0,d.Z0)(p,p,x),(0,d.S8)(p,p),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(p,p,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=p[0],g[b+1]=p[1],g[b+2]=p[2],b+=3,f[y]=h,f[y+1]=h,f[y+2]=h,f[y+3]=1,y+=4}n.attributes.normal=new v.xs(g.buffer),n.attributes.color=new v.Eq(f.buffer)}}}(e,p));const S=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:S,isSchematic:!1,treeRendering:y,mrrFactors:Le.SY}:{usePBR:S,isSchematic:!1,treeRendering:!1,mrrFactors:Le.mb},_={...t.materialParameters,treeRendering:y},P=new Array,z=new Map,D=new Map,F=a.lods.length,O=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new I(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:p,tangent:f}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(f?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new W.h((0,M.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),p=null!=d.colorTexture&&g?s.get(d.colorTexture):null,f=(0,Le.Jr)(d),y=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=p?p.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:f?Le.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:f,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...n},l))}const y=i.get(v);if(r.stageResources.materials.push(y),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return y}(a,e,c,C,_,z,D,t,y),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,w.x)(e.indices||r,e.primitiveType),a=f(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(a,s,e.transform,3,l);const c=[["position",new B.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=f(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(wt,e.transform),(0,g.b)(t,a,wt,3,s),(0,n.or)(wt)&&(0,g.n)(t,t),c.push(["normal",new B.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=f(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(wt,e.transform),(0,x.t)(t,a,wt,4,s),(0,n.or)(wt)&&(0,g.n)(t,t,4),c.push(["tangent",new B.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=f(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,b.a)(t,a,2,n),c.push(["uv0",new B.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new B.n(t,o,4,!0)])}return{geometry:new N.V(t,c),vertexCount:r}}(e,r??new ot({},t)),p=d.boundingInfo;null!=p&&0===s&&((0,m.iT)(O,p.bbMin),(0,m.iT)(O,p.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:O}}(p,t,s.specifiedLodIndex);return{lods:S,referenceBoundingBox:C,isEsriSymbolResource:p.meta.isEsriSymbolResource,isWosr:!1}}const wt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
599
+ fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>h,b:()=>l,c:()=>s,d:()=>n,e:()=>m,f:()=>d,l:()=>u,n:()=>p,t:()=>i});var o=r(40876),a=(r(44208),r(72727));function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],p=r[6],f=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],a=t[w+1],i=t[w+2];e[M]=c*r+h*a+f*i+x,e[M+1]=u*r+m*a+v*i+b,e[M+2]=d*r+p*a+g*i+y,w+=n,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],p=r[5],f=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],a=t[x+1],i=t[x+2];e[b]=c*r+h*a+f*i,e[b+1]=u*r+m*a+v*i,e[b+2]=d*r+p*a+g*i,x+=n,b+=o}}function c(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,a,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=a*(r*t[l])**u,e[c+1]=a*(r*t[l+1])**u,e[c+2]=a*(r*t[l+2])**u,l+=i,c+=n}function h(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let a=0;a<l;a++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=o;return e}function m(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:p,normalizeView:m,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a,ie:()=>l,uC:()=>s});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>u,fA:()=>a,uY:()=>c,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>c,fA:()=>n,o8:()=>a,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>h,fA:()=>a,uY:()=>d,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),p=l(),f=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:p,UNIT_Z:f,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>w,aI:()=>S,hG:()=>f,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,I=c,_=p,P=f,z=v,D=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:_,distance:p,div:I,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:D,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>a,Ul:()=>m,i5:()=>h,lM:()=>n,qK:()=>u});var o=r(34275);const a=16;function n(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return a;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,a):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>I});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function p(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class f{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends f{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),p=(0,d.RS)([],c,u,s),f=(0,d.RS)([],h,p,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([p,u]),this.tEndStack.push(e),this.arcEndStack.push(f),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends f{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:p}){if(l)return e.push([...r]),e;const f=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<f?2*Math.asin(u/f):x,y=c>0&&c<=n?2*Math.acos(1-c/n):x,w=Math.min(b,y),M=Math.min(m,Math.max(p,Math.ceil(Math.abs(x/w)))),S=1/M;for(let t=1;t<M;t++){const r=t*S,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function y(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function w(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function M(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function S(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?y(e,t,r,o):(0,l.DA)(r)?w(e,t,r,o):M(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=p(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),S(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function I(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=_(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(6042),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(6312)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=p(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?y(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?w(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?M(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function _(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>D,O7:()=>P,el:()=>_});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),p=r(31411),f=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),y=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function M(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,p.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function I(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,p,M,S,P,z=0;const D=[],F=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,M=c?102100:4326,m=u.j7[M].maxX,p=u.j7[M].minX,S=u.j7[M].plus180Line,P=u.j7[M].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(C(t.clone(),m,p));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,p)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,p)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(S)&&n!==m?(z=n>z?n:z,o=T(o,c),D.push(o),F.push("cut")):e.intersects(P)&&a!==p?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),D.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let O=(0,u.kd)(z,m),j=-90;const E=O,R=new l.A;for(;O>0;){const e=360*O-180;R.addPath([[e,j],[e,-1*j]]),j*=-1,O--}if(D.length>0&&E>0){const t=I(D,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,f.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,D,R,r)),o=[],n=[];for(let r=0;r<F.length;r++){const a=F[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,y.X)(t))}},{data:s}=await(0,f.A)(o.path+"/simplify",i);return(0,y.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const H=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)H.push(t);else{const e=D.shift();H.push(!0===c?(0,h.Gh)(e):e)}}return H}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const D=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>w,vE:()=>M,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=S){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,p=d*d+h*h+m*m,f=Math.abs(p-1)>1e-5&&p>1e-12?1/Math.sqrt(p):1;return o[0]=d*f,o[1]=h*f,o[2]=m*f,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(p,s),s++,l=!(0,a.t2)(m,p);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(f,s),s++,(0,a.Re)(v,m,p),(0,a.S8)(v,v),(0,a.Re)(g,p,f),(0,a.S8)(g,g),l=!(0,a.t2)(m,f)&&!(0,a.t2)(p,f)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,p,f,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),p=(0,n.vt)(),f=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(M(e,t.origin,t.vector,0,r))}function b(e,t){return w(e,t)>=0}function y(e,t){const r=(0,a.Om)(e,t.ray.direction),o=-w(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const n=o/r;return r>0?n<t.c1&&(t.c1=n):n>t.c0&&(t.c0=n),t.c0<=t.c1}function w(e,t){return(0,a.Om)(e,t)+e[3]}function M(e,t,r,n,i){const s=(0,a.Om)(e,r),l=w(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const S=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,J8:()=>p,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64()),p=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),i}},5644(e,t,r){r.d(t,{fetch:()=>yt});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),p=r(34275);function f(e,t=!1){return e<=p.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),y=r(21015),w=r(84498),M=r(51530),S=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:S.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class I{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var _=r(11254),P=r(60999),z=r(49186),D=r(53966),F=r(69397);class O{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new O;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var j=r(17676),E=r(46140),R=r(97146),H=r(31217),B=r(46610),N=r(63500),W=r(18845),A=r(49255),G=r(97768),L=r(92130),V=r(65786);class k extends L.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,G.Gz)(this._texture),this._textureNormal=(0,G.Gz)(this._textureNormal),this._textureEmissive=(0,G.Gz)(this._textureEmissive),this._textureOcclusion=(0,G.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,G.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new $(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,G.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,j.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,G.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends V.Y{constructor(e=null){super(),this.textureEmissive=e}}class $ extends U{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var q=r(11725),Z=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,m.vt)();function X(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,Z.vA)(0===e.type),Q(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=de,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),v=m>=p?m>=f?0:2:p>=f?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,w=u[b]/u[g],M=u[y]/u[g],S=1/u[g],T=te,C=re,I=oe,{normalRequired:_}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&((0,d.C)(h[0],s.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.C)(h[1],s.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.C)(h[2],s.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(I,h[2],e);const m=T[b]-w*T[g],p=T[y]-M*T[g],f=C[b]-w*C[g],v=C[y]-M*C[g],x=I[b]-w*I[g],P=I[y]-M*I[g],z=x*v-P*f,D=m*P-p*x,F=f*p-v*m;if((z<0||D<0||F<0)&&(z>0||D>0||F>0))continue;const O=z+D+F;if(0===O)continue;const j=z*(S*T[g])+D*(S*C[g])+F*(S*I[g]);if(j*Math.sign(O)<0)continue;const E=j/O;E>=0&&c(E,_?ne(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const K=(0,h.vt)();function Q(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,K);if((0,m.Ne)(J,e.bbMin),(0,m.vI)(J,e.bbMax),null!=a&&a.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],p=t[0],f=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const y=i*a[r+1];let w=n[y],M=n[y+1],S=n[y+2];const T=i*a[r+2];let C=n[T],I=n[T+1],_=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[w,M,S]=l.applyToVertex(w,M,S,e),[C,I,_]=l.applyToVertex(C,I,_,e));const P=w-c,z=M-x,D=S-b,F=C-c,O=I-x,j=_-b,E=f*j-O*v,R=v*F-j*p,H=p*O-F*f,B=P*E+z*R+D*H;if(Math.abs(B)<=ce)continue;const N=d-c,W=h-x,A=m-b,G=N*E+W*R+A*H;if(B>0){if(G<0||G>B)continue}else if(G>0||G<B)continue;const L=W*D-z*A,V=A*P-D*N,k=N*z-P*W,U=p*L+f*V+v*k;if(B>0){if(U<0||G+U>B)continue}else if(U>0||G+U<B)continue;const $=(F*L+O*V+j*k)/B;$>=0&&u($,g?ae(P,z,D,F,O,j,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const ee=(0,h.vt)();const te=(0,h.vt)(),re=(0,h.vt)(),oe=(0,h.vt)();function ae(e,t,r,o,a,n,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,a,n),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ne(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,h.vt)(),se=(0,h.vt)(),le=1e3,ce=1e-7,ue=(0,h.vt)(),de=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()];var he=r(16396),me=r(59907);class pe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a){(0,me.vJ)(r,o,this.layout,e,t,a)}}var fe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),ye=r(4431),we=r(1843),Me=r(72824),Se=r(13840),Te=r(98958),Ce=r(16943),Ie=r(33524),_e=r(56133),Pe=r(4576);r(66289);var ze=r(69622),De=r(65529),Fe=r(32728);class Oe{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let je=class extends ze.A{constructor(e,t){super(e),this.events=new De.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Re(Ee.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ae,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Oe(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Z.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=He,o=Be;t.localTransform.getMat(e,Ne),t.globalTransform.getMat(e,We);const a=(0,l.lw)(We,We,Ne);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Fe.wp)(He,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Be),r.modelOrigin.getVec(e,He),t[0]=Be[0],t[1]=Be[1],t[2]=Be[2],t[3]=0,t[4]=Be[3],t[5]=Be[4],t[6]=Be[5],t[7]=0,t[8]=Be[6],t[9]=Be[7],t[10]=Be[8],t[11]=0,t[12]=He[0],t[13]=He[1],t[14]=He[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(He,this,e),t*=Math.max(He[0],He[1],He[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(He,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(He[0],He[1],He[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Ae,Math.floor(this._capacity*Pe.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Oe(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],je.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],je.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],je.prototype,"size",null),je=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],je);const Ee=(0,we.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Re(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const He=(0,h.vt)(),Be=(0,s.vt)(),Ne=(0,c.vt)(),We=(0,c.vt)(),Ae=64,Ge=(0,we.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Le=r(74810),Ve=r(28491),ke=r(90644),Ue=r(49788);class $e extends Me.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Le.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Ue.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Me.gy;let qe=class extends Te.w{constructor(e,t){let o=(0,ye.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,ye.U)(function(e){return Re(Ge.clone(),e)}(t)))),super(e,t,o),this.shader=new Se.r(Ve.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,Ie.Yf)(r,!1,e.emissionDimmingPass):null,culling:Ye(e)?(0,ke.Xt)(a):null,depthTest:(0,Ie.mt)(r,Ze(n)),depthWrite:(0,Ie.z5)(e),colorWrite:ke.kn,stencilWrite:i?_e.v0:null,stencilTest:i?t?_e.Ax:_e.cP:null,polygonOffset:(0,fe.sG)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function Ze(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,we.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Ce.E)()&&t.vec4u8("olidColor"),t}qe=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],qe);var Xe=r(51976),Ke=r(47724);class Qe extends Ke.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ge.Cg)([(0,Xe.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Xe.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Xe.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Xe.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends qe{constructor(){super(...arguments),this.shader=new Se.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Xe.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Xe.W)()],rt.prototype,"receiveShadows",void 0);class ot extends q.i{constructor(e,t){super(e,nt),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,A.uw)(e)&&!this.transparent],[4,e=>(0,A.uw)(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>(0,A.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,A._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,o,a,n){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let n=null;switch(r.viewingMode){case 1:n=(0,d.S8)(ct,dt);break;case 2:n=(0,d.C)(ct,lt)}const i=(0,d.Re)(ht,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(n,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(n,n,u),(0,d.ei)(ut,n,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),a=(0,d.Re)(st,a,ut)}n=(0,fe.b6)(n,this._configuration,o,a),X(e,r,o,a,(0,he.ou)(r.verticalOffset),n)}createGLMaterial(e){return new at(e)}createBufferWriter(){return new pe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:a,texture:n,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||a<1||(null!=n||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class at extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:qe,e)}}class nt extends $e{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const it=(0,h.vt)(),st=(0,h.vt)(),lt=(0,h.fA)(0,0,1),ct=(0,h.vt)(),ut=(0,h.vt)(),dt=(0,h.vt)(),ht=(0,h.vt)(),mt=()=>D.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class pt{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function ft(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(mt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(mt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(mt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(mt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else mt().warn("Indexed geometries must specify faces"),o=!1;break}default:mt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(mt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(mt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new E.A(1,2,"wosr");async function yt(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,P.Ke)((0,_.A)(e,t));if(r.ok)return r.value.data;(0,j.QP)(r.error),function(e){throw new z.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){mt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,H.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new pt(r,o,a+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new O,i=e.resource,s=E.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const p=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!ft(i))continue;const s=xt(i),l=i.params.vertexAttributes,f=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,R.tM)(x);f.push([e,new B.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!p.has(b)){const{image:e,parameters:t}=y,r=new W.h(e,t);o.push(r),p.set(b,r)}const w=p.get(b),M=w?w.id:void 0,S=s.material;let T=n.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?gt(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new ot(o,t),n.set(S,b,T)}a.push(T);const C=new N.V(T,f);m+=f.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let p;if(t.cache)p=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));p=await e(new y.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:S,referenceBoundingBox:C}=function(e,t,r){const a=e.model,s=e.meta,p=a.meta?.ESRI_proxyEllipsoid,y=s.isEsriSymbolResource&&null!=p&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const a=e.model.lods[r];for(const n of a.parts){const a=n.attributes.normal;if(null==a)return;const i=n.attributes.position,s=i.count,u=(0,h.vt)(),m=(0,h.vt)(),p=(0,h.vt)(),f=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),n.transform);let b=0,y=0;for(let l=0;l<s;l++){i.getVec(l,m),a.getVec(l,u),(0,d.Z0)(m,m,n.transform),(0,d.Re)(p,m,t.center),(0,d.Qr)(p,p,t.radius);const s=p[2],c=(0,d.Bw)(p),h=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(p,p,t.radius),null!==x&&(0,d.Z0)(p,p,x),(0,d.S8)(p,p),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(p,p,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=p[0],g[b+1]=p[1],g[b+2]=p[2],b+=3,f[y]=h,f[y+1]=h,f[y+2]=h,f[y+3]=1,y+=4}n.attributes.normal=new v.xs(g.buffer),n.attributes.color=new v.Eq(f.buffer)}}}(e,p));const S=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:S,isSchematic:!1,treeRendering:y,mrrFactors:Le.SY}:{usePBR:S,isSchematic:!1,treeRendering:!1,mrrFactors:Le.mb},_={...t.materialParameters,treeRendering:y},P=new Array,z=new Map,D=new Map,F=a.lods.length,O=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new I(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:p,tangent:f}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(f?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new W.h((0,M.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),p=null!=d.colorTexture&&g?s.get(d.colorTexture):null,f=(0,Le.Jr)(d),y=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=p?p.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:f?Le.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:f,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...n},l))}const y=i.get(v);if(r.stageResources.materials.push(y),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return y}(a,e,c,C,_,z,D,t,y),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,w.x)(e.indices||r,e.primitiveType),a=f(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(a,s,e.transform,3,l);const c=[["position",new B.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=f(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(wt,e.transform),(0,g.b)(t,a,wt,3,s),(0,n.or)(wt)&&(0,g.n)(t,t),c.push(["normal",new B.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=f(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(wt,e.transform),(0,x.t)(t,a,wt,4,s),(0,n.or)(wt)&&(0,g.n)(t,t,4),c.push(["tangent",new B.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=f(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,b.a)(t,a,2,n),c.push(["uv0",new B.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new B.n(t,o,4,!0)])}return{geometry:new N.V(t,c),vertexCount:r}}(e,r??new ot({},t)),p=d.boundingInfo;null!=p&&0===s&&((0,m.iT)(O,p.bbMin),(0,m.iT)(O,p.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:O}}(p,t,s.specifiedLodIndex);return{lods:S,referenceBoundingBox:C,isEsriSymbolResource:p.meta.isEsriSymbolResource,isWosr:!1}}const wt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
600
600
  void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
601
601
  `)}},33120(e,t,r){r.d(t,{i$:()=>i,xJ:()=>n}),r(46686),r(62308);var o=r(77108),a=r(31821);function n(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function i(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
602
602
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);