@arcgis/core 4.28.0-next.20230621 → 4.28.0-next.20230622

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 (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/05c0fdbfc82538f2f68d.js +1 -0
  3. package/assets/esri/core/workers/chunks/0bd95f46a0a9005a19f9.js +1 -0
  4. package/assets/esri/core/workers/chunks/19b4f02fb2392d964582.js +1 -0
  5. package/assets/esri/core/workers/chunks/26212a08ea383547335b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{2420ec029236ab31d908.js → 2882a55a971af1f7858b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/303238fc2fcdbb277981.js +1 -0
  8. package/assets/esri/core/workers/chunks/42dfebbe964f2b44ffab.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4b235d1b6a72773cd4f4.js → 57bb8516fa998a0fba78.js} +1 -1
  10. package/assets/esri/core/workers/chunks/6208f2dfa9dfd3bca000.js +1 -0
  11. package/assets/esri/core/workers/chunks/64008bde5d3ffd9f2499.js +1 -0
  12. package/assets/esri/core/workers/chunks/{c1dfbda75abc748a6ca4.js → 6aa42f510969014db3f4.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{cfe379a78a983373b3ac.js → 7304f45f5622a68253e4.js} +1 -1
  14. package/assets/esri/core/workers/chunks/733b70d6e5c466a67e9c.js +1 -0
  15. package/assets/esri/core/workers/chunks/7694521b44681d52b713.js +1 -0
  16. package/assets/esri/core/workers/chunks/80aa79040c0a7d039c3d.js +1 -0
  17. package/assets/esri/core/workers/chunks/91f957cd49a95a8a95f5.js +1 -0
  18. package/assets/esri/core/workers/chunks/{42b6315e21c4c1345ba5.js → 9f5337a80963e0b3c009.js} +1 -1
  19. package/assets/esri/core/workers/chunks/a16458b4653b284b4b80.js +1 -0
  20. package/assets/esri/core/workers/chunks/a54f361506012be46fdb.js +1 -0
  21. package/assets/esri/core/workers/chunks/{cfc3dcca2b69d20d5375.js → c0b9cc091efd5db827de.js} +1 -1
  22. package/assets/esri/core/workers/chunks/ce7f575a6c2053c7ca17.js +1 -0
  23. package/assets/esri/core/workers/chunks/d24f7ef6eca8c91b90b4.js +1 -0
  24. package/assets/esri/core/workers/chunks/dbd86e4b7983873cbe7c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{3c3f65913006b84b2289.js → de20572d334abd4a7d82.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{c8702e53a8ad6cf6ab85.js → dede2b4948f1f07a9859.js} +1 -1
  27. package/assets/esri/core/workers/chunks/e3f7d464f6d74523fc13.js +1 -0
  28. package/assets/esri/core/workers/chunks/f6040205c50e2795a1a0.js +1 -0
  29. package/assets/esri/core/workers/chunks/{915734255a79bff3ef0f.js → fcd54e9e64c2864f183c.js} +1 -1
  30. package/assets/esri/t9n/common.json +1 -1
  31. package/assets/esri/t9n/common_en.json +1 -1
  32. package/assets/esri/themes/base/_core.scss +6 -2
  33. package/assets/esri/themes/base/_mixins.scss +0 -147
  34. package/assets/esri/themes/base/widgets/_AreaMeasurement2D.scss +0 -8
  35. package/assets/esri/themes/base/widgets/_AreaMeasurement3D.scss +0 -8
  36. package/assets/esri/themes/base/widgets/_DirectLineMeasurement3D.scss +0 -1
  37. package/assets/esri/themes/base/widgets/_DistanceMeasurement2D.scss +0 -1
  38. package/assets/esri/themes/base/widgets/_MeasurementWidgetContent.scss +58 -0
  39. package/assets/esri/themes/base/widgets/_UnitSelect.scss +14 -0
  40. package/assets/esri/themes/dark/main.css +1 -1
  41. package/assets/esri/themes/light/main.css +1 -1
  42. package/assets/esri/themes/light/view.css +1 -1
  43. package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D.json +1 -1
  44. package/assets/esri/widgets/AreaMeasurement2D/t9n/AreaMeasurement2D_en.json +1 -1
  45. package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D.json +1 -1
  46. package/assets/esri/widgets/AreaMeasurement3D/t9n/AreaMeasurement3D_en.json +1 -1
  47. package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D.json +1 -1
  48. package/assets/esri/widgets/DirectLineMeasurement3D/t9n/DirectLineMeasurement3D_en.json +1 -1
  49. package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D.json +1 -1
  50. package/assets/esri/widgets/DistanceMeasurement2D/t9n/DistanceMeasurement2D_en.json +1 -1
  51. package/core/promiseUtils.js +1 -1
  52. package/geometry/projection.js +1 -1
  53. package/interfaces.d.ts +270 -5
  54. package/layers/LinkChartLayer.d.ts +4 -0
  55. package/layers/LinkChartLayer.js +1 -1
  56. package/layers/support/TileInfoTilemapCache.js +1 -1
  57. package/package.json +1 -1
  58. package/support/revision.js +1 -1
  59. package/symbols/cim/cimAnalyzer.js +1 -1
  60. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  61. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  62. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  63. package/views/3d/environment/CloudsGenerator.js +1 -1
  64. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  65. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  66. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  67. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  68. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  69. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  70. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  71. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  72. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  73. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  74. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  75. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  76. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  77. package/views/3d/layers/graphics/Labeler.js +1 -1
  78. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  79. package/views/3d/state/ViewState.js +1 -1
  80. package/views/3d/state/ViewStateManager.js +1 -1
  81. package/views/3d/support/DisplayQualityProfile.js +1 -1
  82. package/views/3d/support/MemoryController.js +1 -1
  83. package/views/3d/support/SceneViewPerformanceInfo.js +1 -1
  84. package/views/3d/support/cameraUtils.js +1 -1
  85. package/views/3d/support/viewpointUtils.js +1 -1
  86. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  87. package/views/3d/terrain/OverlayRenderer.js +1 -1
  88. package/views/3d/webgl-engine/Stage.js +1 -1
  89. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  90. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +0 -1
  91. package/views/3d/webgl-engine/lib/Highlight.js +1 -1
  92. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  93. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  94. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  95. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  96. package/views/webgl/Texture.js +1 -1
  97. package/widgets/AreaMeasurement2D.js +1 -1
  98. package/widgets/AreaMeasurement3D.js +1 -1
  99. package/widgets/DirectLineMeasurement3D.js +1 -1
  100. package/widgets/DistanceMeasurement2D.js +1 -1
  101. package/widgets/FeatureForm/FieldInput.js +1 -1
  102. package/widgets/support/MeasurementWidgetContent.js +5 -0
  103. package/widgets/support/UnitSelect.js +5 -0
  104. package/assets/esri/core/workers/chunks/07f16ea775b39a1a4a7b.js +0 -1
  105. package/assets/esri/core/workers/chunks/1bbc868d2430103951eb.js +0 -1
  106. package/assets/esri/core/workers/chunks/1d2ef88a8d028adef102.js +0 -1
  107. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +0 -1
  108. package/assets/esri/core/workers/chunks/3b3d676b609c47a77164.js +0 -1
  109. package/assets/esri/core/workers/chunks/3d9a8cb638cf9b8ca4b3.js +0 -1
  110. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +0 -1
  111. package/assets/esri/core/workers/chunks/642510b0371311ff8e16.js +0 -1
  112. package/assets/esri/core/workers/chunks/7e4013f8c31c9a9438c6.js +0 -1
  113. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +0 -1
  114. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +0 -1
  115. package/assets/esri/core/workers/chunks/a9e9297267614c4c4f3b.js +0 -1
  116. package/assets/esri/core/workers/chunks/b31974524932e638df8c.js +0 -1
  117. package/assets/esri/core/workers/chunks/b75b4b132dbd9cb9d372.js +0 -1
  118. package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +0 -1
  119. package/assets/esri/core/workers/chunks/d2a127f7bb0e2ba14a13.js +0 -1
  120. package/assets/esri/core/workers/chunks/e097f41bbfac00250477.js +0 -1
  121. package/assets/esri/core/workers/chunks/e55f80b774e090a0aa04.js +0 -1
  122. package/assets/esri/core/workers/chunks/e668c7e2e61aae6ca6e0.js +0 -1
  123. package/assets/esri/core/workers/chunks/f0299d93a95f40ea7cf7.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4727,1900],{10661:(e,t,n)=>{n.d(t,{s:()=>i});var r=n(42100);class i extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},60437:(e,t,n)=>{n.d(t,{Gv:()=>f,HH:()=>l,JR:()=>m,TC:()=>a,Tn:()=>p,Ue:()=>i,al:()=>o,bZ:()=>h,cS:()=>y,dp:()=>u,fS:()=>b,is:()=>g,op:()=>d,pp:()=>s,t8:()=>c});var r=n(6570);function i(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,n,r,o,l,a=i()){return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=o,a[5]=l,a}function l(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.Z(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function s(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function p(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?c(e,f):i(f)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function b(e,t,n){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n(24470);const f=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];i()},1231:(e,t,n)=>{n.d(t,{Z:()=>g});var r,i=n(43697),o=n(35454),l=n(96674),a=n(5600),s=n(75215),u=(n(67676),n(80442),n(36030)),d=n(71715),p=n(52011),c=n(72729),y=n(86719);const m=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=r=class extends l.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?m.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,i._)([(0,a.Cb)()],h.prototype,"description",void 0),(0,i._)([(0,d.r)("description")],h.prototype,"readDescription",null),(0,i._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],h.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:s.z8,json:{write:!0}})],h.prototype,"length",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,i._)([(0,u.J)(y.v)],h.prototype,"type",void 0),(0,i._)([(0,a.Cb)()],h.prototype,"valueType",void 0),(0,i._)([(0,d.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=r=(0,i._)([(0,p.j)("esri.layers.support.Field")],h);const g=h},72729:(e,t,n)=>{n.d(t,{im:()=>x,V5:()=>w}),n(80442);var r,i=n(43697),o=n(22974),l=n(5600),a=(n(75215),n(36030)),s=n(52011),u=n(96674);n(67676);let d=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=r=(0,i._)([(0,s.j)("esri.layers.support.CodedValue")],d);const p=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,a.J)(p)],c.prototype,"type",void 0),c=(0,i._)([(0,s.j)("esri.layers.support.Domain")],c);const y=c;var m;let h=m=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,l.Cb)({type:[d],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,i._)([(0,a.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=m=(0,i._)([(0,s.j)("esri.layers.support.CodedValueDomain")],h);const g=h;var b;n(92604),n(20102);let f=b=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,i._)([(0,a.J)({inherited:"inherited"})],f.prototype,"type",void 0),f=b=(0,i._)([(0,s.j)("esri.layers.support.InheritedDomain")],f);const v=f;var T;let V=T=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,l.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],V.prototype,"maxValue",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],V.prototype,"minValue",void 0),(0,i._)([(0,a.J)({range:"range"})],V.prototype,"type",void 0),V=T=(0,i._)([(0,s.j)("esri.layers.support.RangeDomain")],V);const _=V,w={key:"type",base:y,typeMap:{range:V,"coded-value":g,inherited:v}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,n)=>{n.d(t,{v:()=>r});const r=new(n(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1993,5732,9880],{99880:(t,e,n)=>{n.d(e,{V:()=>l});var s=n(68773),i=(n(3172),n(20102)),r=n(92604),o=n(81271);const a=r.Z.getLogger("esri.assets");function l(t){if(!s.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new i.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(s.default.assetsPath,t)}},5732:(t,e,n)=>{n.d(e,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,n)=>{n.d(e,{A:()=>m,a:()=>l,d:()=>p,e:()=>d,f:()=>f,g:()=>y,h:()=>b,i:()=>o,j:()=>M,k:()=>c,m:()=>h,s:()=>r,t:()=>a,w:()=>u,y:()=>v,z:()=>S});var s=n(65617),i=n(46851);function r(t,e,n,s,i,r,o,a,l,h,u,c,d,f,p,m,g){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=u,t[10]=c,t[11]=d,t[12]=f,t[13]=p,t[14]=m,t[15]=g,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const n=e[1],s=e[2],i=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=s,t[9]=r,t[11]=e[14],t[12]=i,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],_=e[15],y=n*a-s*o,x=n*l-i*o,b=n*h-r*o,M=s*l-i*a,S=s*h-r*a,v=i*h-r*l,w=u*m-c*p,I=u*g-d*p,E=u*_-f*p,F=c*g-d*m,B=c*_-f*m,z=d*_-f*g;let N=y*z-x*B+b*F+M*E-S*I+v*w;return N?(N=1/N,t[0]=(a*z-l*B+h*F)*N,t[1]=(i*B-s*z-r*F)*N,t[2]=(m*v-g*S+_*M)*N,t[3]=(d*S-c*v-f*M)*N,t[4]=(l*E-o*z-h*I)*N,t[5]=(n*z-i*E+r*I)*N,t[6]=(g*b-p*v-_*x)*N,t[7]=(u*v-d*b+f*x)*N,t[8]=(o*B-a*E+h*w)*N,t[9]=(s*E-n*B-r*w)*N,t[10]=(p*S-m*b+_*y)*N,t[11]=(c*b-u*S-f*y)*N,t[12]=(a*I-o*F-l*w)*N,t[13]=(n*F-s*I+i*w)*N,t[14]=(m*x-p*M-g*y)*N,t[15]=(u*M-c*x+d*y)*N,t):null}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],_=e[14],y=e[15];let x=n[0],b=n[1],M=n[2],S=n[3];return t[0]=x*s+b*a+M*c+S*m,t[1]=x*i+b*l+M*d+S*g,t[2]=x*r+b*h+M*f+S*_,t[3]=x*o+b*u+M*p+S*y,x=n[4],b=n[5],M=n[6],S=n[7],t[4]=x*s+b*a+M*c+S*m,t[5]=x*i+b*l+M*d+S*g,t[6]=x*r+b*h+M*f+S*_,t[7]=x*o+b*u+M*p+S*y,x=n[8],b=n[9],M=n[10],S=n[11],t[8]=x*s+b*a+M*c+S*m,t[9]=x*i+b*l+M*d+S*g,t[10]=x*r+b*h+M*f+S*_,t[11]=x*o+b*u+M*p+S*y,x=n[12],b=n[13],M=n[14],S=n[15],t[12]=x*s+b*a+M*c+S*m,t[13]=x*i+b*l+M*d+S*g,t[14]=x*r+b*h+M*f+S*_,t[15]=x*o+b*u+M*p+S*y,t}function u(t,e,n){const s=n[0],i=n[1],r=n[2];if(e===t)t[12]=e[0]*s+e[4]*i+e[8]*r+e[12],t[13]=e[1]*s+e[5]*i+e[9]*r+e[13],t[14]=e[2]*s+e[6]*i+e[10]*r+e[14],t[15]=e[3]*s+e[7]*i+e[11]*r+e[15];else{const n=e[0],o=e[1],a=e[2],l=e[3],h=e[4],u=e[5],c=e[6],d=e[7],f=e[8],p=e[9],m=e[10],g=e[11];t[0]=n,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=u,t[6]=c,t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=g,t[12]=n*s+h*i+f*r+e[12],t[13]=o*s+u*i+p*r+e[13],t[14]=a*s+c*i+m*r+e[14],t[15]=l*s+d*i+g*r+e[15]}return t}function c(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,s){let r,o,a,l,h,u,c,d,f,p,m,g,_,y,x,b,M,S,v,w,I,E,F,B,z=s[0],N=s[1],T=s[2],R=Math.sqrt(z*z+N*N+T*T);return R<(0,i.g)()?null:(R=1/R,z*=R,N*=R,T*=R,r=Math.sin(n),o=Math.cos(n),a=1-o,l=e[0],h=e[1],u=e[2],c=e[3],d=e[4],f=e[5],p=e[6],m=e[7],g=e[8],_=e[9],y=e[10],x=e[11],b=z*z*a+o,M=N*z*a+T*r,S=T*z*a-N*r,v=z*N*a-T*r,w=N*N*a+o,I=T*N*a+z*r,E=z*T*a+N*r,F=N*T*a-z*r,B=T*T*a+o,t[0]=l*b+d*M+g*S,t[1]=h*b+f*M+_*S,t[2]=u*b+p*M+y*S,t[3]=c*b+m*M+x*S,t[4]=l*v+d*w+g*I,t[5]=h*v+f*w+_*I,t[6]=u*v+p*w+y*I,t[7]=c*v+m*w+x*I,t[8]=l*E+d*F+g*B,t[9]=h*E+f*F+_*B,t[10]=u*E+p*F+y*B,t[11]=c*E+m*F+x*B,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e,n){if(0===e)return o(t);let s,r,a,l=n[0],h=n[1],u=n[2],c=Math.sqrt(l*l+h*h+u*u);return c<(0,i.g)()?null:(c=1/c,l*=c,h*=c,u*=c,s=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+u*s,t[2]=u*l*a-h*s,t[3]=0,t[4]=l*h*a-u*s,t[5]=h*h*a+r,t[6]=u*h*a+l*s,t[7]=0,t[8]=l*u*a+h*s,t[9]=h*u*a-l*s,t[10]=u*u*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function m(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=s+s,l=i+i,h=r+r,u=s*a,c=s*l,d=s*h,f=i*l,p=i*h,m=r*h,g=o*a,_=o*l,y=o*h;return t[0]=1-(f+m),t[1]=c+y,t[2]=d-_,t[3]=0,t[4]=c-y,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=d+_,t[9]=p-g,t[10]=1-(u+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const _=(0,s.c)();function y(t,e,n,s){const i=e[0],r=e[1],o=e[2],a=e[3],l=i+i,h=r+r,u=o+o,c=i*l,d=i*h,f=i*u,p=r*h,m=r*u,g=o*u,_=a*l,y=a*h,x=a*u,b=s[0],M=s[1],S=s[2];return t[0]=(1-(p+g))*b,t[1]=(d+x)*b,t[2]=(f-y)*b,t[3]=0,t[4]=(d-x)*M,t[5]=(1-(c+g))*M,t[6]=(m+_)*M,t[7]=0,t[8]=(f+y)*S,t[9]=(m-_)*S,t[10]=(1-(c+p))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function x(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function b(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function M(t,e){if(t===e)return!0;const n=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],_=t[14],y=t[15],x=e[0],b=e[1],M=e[2],S=e[3],v=e[4],w=e[5],I=e[6],E=e[7],F=e[8],B=e[9],z=e[10],N=e[11],T=e[12],R=e[13],Z=e[14],A=e[15],O=(0,i.g)();return Math.abs(n-x)<=O*Math.max(1,Math.abs(n),Math.abs(x))&&Math.abs(s-b)<=O*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(r-M)<=O*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(o-S)<=O*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(a-v)<=O*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(l-w)<=O*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=O*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(u-E)<=O*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-F)<=O*Math.max(1,Math.abs(c),Math.abs(F))&&Math.abs(d-B)<=O*Math.max(1,Math.abs(d),Math.abs(B))&&Math.abs(f-z)<=O*Math.max(1,Math.abs(f),Math.abs(z))&&Math.abs(p-N)<=O*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(m-T)<=O*Math.max(1,Math.abs(m),Math.abs(T))&&Math.abs(g-R)<=O*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(_-Z)<=O*Math.max(1,Math.abs(_),Math.abs(Z))&&Math.abs(y-A)<=O*Math.max(1,Math.abs(y),Math.abs(A))}function S(t){const e=(0,i.g)(),n=t[0],s=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],u=t[9],c=t[10];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(s*s+a*a+u*u))<=e&&Math.abs(1-(r*r+l*l+c*c))<=e}function v(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=x;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],_=e[15];return t[0]=a*(d*_-f*g)-c*(l*_-h*g)+m*(l*f-h*d),t[1]=-(s*(d*_-f*g)-c*(i*_-r*g)+m*(i*f-r*d)),t[2]=s*(l*_-h*g)-a*(i*_-r*g)+m*(i*h-r*l),t[3]=-(s*(l*f-h*d)-a*(i*f-r*d)+c*(i*h-r*l)),t[4]=-(o*(d*_-f*g)-u*(l*_-h*g)+p*(l*f-h*d)),t[5]=n*(d*_-f*g)-u*(i*_-r*g)+p*(i*f-r*d),t[6]=-(n*(l*_-h*g)-o*(i*_-r*g)+p*(i*h-r*l)),t[7]=n*(l*f-h*d)-o*(i*f-r*d)+u*(i*h-r*l),t[8]=o*(c*_-f*m)-u*(a*_-h*m)+p*(a*f-h*c),t[9]=-(n*(c*_-f*m)-u*(s*_-r*m)+p*(s*f-r*c)),t[10]=n*(a*_-h*m)-o*(s*_-r*m)+p*(s*h-r*a),t[11]=-(n*(a*f-h*c)-o*(s*f-r*c)+u*(s*h-r*a)),t[12]=-(o*(c*g-d*m)-u*(a*g-l*m)+p*(a*d-l*c)),t[13]=n*(c*g-d*m)-u*(s*g-i*m)+p*(s*d-i*c),t[14]=-(n*(a*g-l*m)-o*(s*g-i*m)+p*(s*l-i*a)),t[15]=n*(a*d-l*c)-o*(s*d-i*c)+u*(s*l-i*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*o-n*r)*(c*g-d*m)-(e*a-s*r)*(u*g-d*p)+(e*l-i*r)*(u*m-c*p)+(n*a-s*o)*(h*g-d*f)-(n*l-i*o)*(h*m-c*f)+(s*l-i*a)*(h*p-u*f)},equals:M,exactEquals:b,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,u=s*o,c=s*a,d=i*o,f=i*a,p=i*l,m=r*o,g=r*a,_=r*l;return t[0]=1-c-p,t[1]=u+_,t[2]=d-g,t[3]=0,t[4]=u-_,t[5]=1-h-p,t[6]=f+m,t[7]=0,t[8]=d+g,t[9]=f-m,t[10]=1-h-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=_,s=-e[0],i=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],u=e[7],c=s*s+i*i+r*r+o*o;return c>0?(n[0]=2*(a*o+u*s+l*r-h*i)/c,n[1]=2*(l*o+u*i+h*s-a*r)/c,n[2]=2*(h*o+u*r+a*i-l*s)/c):(n[0]=2*(a*o+u*s+l*r-h*i),n[1]=2*(l*o+u*i+h*s-a*r),n[2]=2*(h*o+u*r+a*i-l*s)),g(t,e,n),t},fromRotation:p,fromRotationTranslation:g,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,n,s,i){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,u=o+o,c=a+a,d=r*h,f=r*u,p=r*c,m=o*u,g=o*c,_=a*c,y=l*h,x=l*u,b=l*c,M=s[0],S=s[1],v=s[2],w=i[0],I=i[1],E=i[2],F=(1-(m+_))*M,B=(f+b)*M,z=(p-x)*M,N=(f-b)*S,T=(1-(d+_))*S,R=(g+y)*S,Z=(p+x)*v,A=(g-y)*v,O=(1-(d+m))*v;return t[0]=F,t[1]=B,t[2]=z,t[3]=0,t[4]=N,t[5]=T,t[6]=R,t[7]=0,t[8]=Z,t[9]=A,t[10]=O,t[11]=0,t[12]=n[0]+w-(F*w+N*I+Z*E),t[13]=n[1]+I-(B*w+T*I+A*E),t[14]=n[2]+E-(z*w+R*I+O*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:m,fromYRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,s,i,r,o){const a=1/(n-e),l=1/(i-s),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(i+s)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let s=0;return n>0?(s=2*Math.sqrt(n+1),t[3]=.25*s,t[0]=(e[6]-e[9])/s,t[1]=(e[8]-e[2])/s,t[2]=(e[1]-e[4])/s):e[0]>e[5]&&e[0]>e[10]?(s=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/s,t[0]=.25*s,t[1]=(e[1]+e[4])/s,t[2]=(e[8]+e[2])/s):e[5]>e[10]?(s=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/s,t[0]=(e[1]+e[4])/s,t[1]=.25*s,t[2]=(e[6]+e[9])/s):(s=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/s,t[0]=(e[8]+e[2])/s,t[1]=(e[6]+e[9])/s,t[2]=.25*s),t},getScaling:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],u=e[10];return t[0]=Math.sqrt(n*n+s*s+i*i),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+u*u),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:v,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:S,lookAt:function(t,e,n,s){const r=e[0],a=e[1],l=e[2];let h=r-n[0],u=a-n[1],c=l-n[2];const d=(0,i.g)();if(Math.abs(h)<d&&Math.abs(u)<d&&Math.abs(c)<d)return void o(t);let f=1/Math.sqrt(h*h+u*u+c*c);h*=f,u*=f,c*=f;const p=s[0],m=s[1],g=s[2];let _=m*c-g*u,y=g*h-p*c,x=p*u-m*h;f=Math.sqrt(_*_+y*y+x*x),f?(f=1/f,_*=f,y*=f,x*=f):(_=0,y=0,x=0);let b=u*x-c*y,M=c*_-h*x,S=h*y-u*_;f=Math.sqrt(b*b+M*M+S*S),f?(f=1/f,b*=f,M*=f,S*=f):(b=0,M=0,S=0),t[0]=_,t[1]=b,t[2]=h,t[3]=0,t[4]=y,t[5]=M,t[6]=u,t[7]=0,t[8]=x,t[9]=S,t[10]=c,t[11]=0,t[12]=-(_*r+y*a+x*l),t[13]=-(b*r+M*a+S*l),t[14]=-(h*r+u*a+c*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t[9]=e[9]+n[9]*s,t[10]=e[10]+n[10]*s,t[11]=e[11]+n[11]*s,t[12]=e[12]+n[12]*s,t[13]=e[13]+n[13]*s,t[14]=e[14]+n[14]*s,t[15]=e[15]+n[15]*s,t},ortho:function(t,e,n,s,i,r,o){const a=1/(e-n),l=1/(s-i),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*a,t[13]=(i+s)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,n,s,i){const r=1/Math.tan(e/2);let o;return t[0]=r/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(s-i),t[10]=(i+s)*o,t[14]=2*i*s*o):(t[10]=-1,t[14]=-2*s),t},perspectiveFromFieldOfView:function(t,e,n,s){const i=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(i+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(i-r)*h*.5,t[10]=s/(n-s),t[11]=-1,t[12]=0,t[13]=0,t[14]=s*n/(n-s),t[15]=0,t},rotate:d,rotateX:function(t,e,n){const s=Math.sin(n),i=Math.cos(n),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],u=e[9],c=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*i+h*s,t[5]=o*i+u*s,t[6]=a*i+c*s,t[7]=l*i+d*s,t[8]=h*i-r*s,t[9]=u*i-o*s,t[10]=c*i-a*s,t[11]=d*i-l*s,t},rotateY:function(t,e,n){const s=Math.sin(n),i=Math.cos(n),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],u=e[9],c=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*i-h*s,t[1]=o*i-u*s,t[2]=a*i-c*s,t[3]=l*i-d*s,t[8]=r*s+h*i,t[9]=o*s+u*i,t[10]=a*s+c*i,t[11]=l*s+d*i,t},rotateZ:function(t,e,n){const s=Math.sin(n),i=Math.cos(n),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],u=e[5],c=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*i+h*s,t[1]=o*i+u*s,t[2]=a*i+c*s,t[3]=l*i+d*s,t[4]=h*i-r*s,t[5]=u*i-o*s,t[6]=c*i-a*s,t[7]=d*i-l*s,t},scale:c,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:x,targetTo:function(t,e,n,s){const i=e[0],r=e[1],o=e[2],a=s[0],l=s[1],h=s[2];let u=i-n[0],c=r-n[1],d=o-n[2],f=u*u+c*c+d*d;f>0&&(f=1/Math.sqrt(f),u*=f,c*=f,d*=f);let p=l*d-h*c,m=h*u-a*d,g=a*c-l*u;return f=p*p+m*m+g*g,f>0&&(f=1/Math.sqrt(f),p*=f,m*=f,g*=f),t[0]=p,t[1]=m,t[2]=g,t[3]=0,t[4]=c*g-d*m,t[5]=d*p-u*g,t[6]=u*m-c*p,t[7]=0,t[8]=u,t[9]=c,t[10]=d,t[11]=0,t[12]=i,t[13]=r,t[14]=o,t[15]=1,t},translate:u,transpose:a},Symbol.toStringTag,{value:"Module"}))},32448:(t,e,n)=>{n.d(e,{Z:()=>l});var s=n(43697),i=n(92036),r=n(50758),o=n(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const n=this._listenersMap&&this._listenersMap.get(t);if(!n)return!1;const s=this._target||this;return[...n].forEach((t=>{t.call(s,e)})),n.length>0}on(t,e){if(Array.isArray(t)){const n=t.map((t=>this.on(t,e)));return(0,r.AL)(n)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const n=this._listenersMap.get(t)||[];return n.push(e),this._listenersMap.set(t,n),(0,r.kB)((()=>{const n=this._listenersMap&&this._listenersMap.get(t)||[],s=n.indexOf(e);s>=0&&n.splice(s,1)}))}once(t,e){const n=this.on(t,(t=>{n.remove(),e.call(null,t)}));return n}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let n=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return n=(0,s._)([(0,o.j)("esri.core.Evented")],n),n};let n=class extends i.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};n=(0,s._)([(0,o.j)("esri.core.Evented")],n),t.EventedAccessor=n}(a||(a={}));const l=a},13867:(t,e,n)=>{n.d(e,{z:()=>i});var s=n(69801);class i{constructor(t,e){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,n=1){this._storage.put(this,t,e,n,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,n)=>{n.d(e,{WJ:()=>a,Xq:()=>o});var s,i,r=n(44553);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(t,e,n){this.name=t,this._storage=e,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),n&&(this._storage.registerRemoveFunc(this.id,n),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,n,s=0){this._storage.put(this,t,e,n,s)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,n){this._storage.updateSize(this,t,e,n)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,n,i,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==n&&this._notifyRemove(e,o.entry,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,n,s.ALL);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:n,size:i,lifetime:a,lives:a}),this._size+=i,t.size+=i,this._checkSizeLimits()}updateSize(t,e,n,i){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===n){for(this._size-=r.size,t.size-=r.size;i>this._maxSize;){const t=this._notifyRemove(e,n,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}r.size=i,this._size+=i,t.size+=i,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const n=this._db.get(e);if(n)return this._size-=n.size,t.size-=n.size,this._db.delete(e),++this._hit,n.entry;++this._miss}get(t,e){e=t.id+e;const n=this._db.get(e);if(void 0!==n)return this._db.delete(e),n.lives=n.lifetime,this._db.set(e,n),++this._hit,n.entry;++this._miss}peek(t,e){const n=this._db.get(t.id+e);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},n=new Array;this._db.forEach(((t,s)=>{const i=t.lifetime;n[i]=(n[i]||0)+t.size,this._users.forAll((n=>{const{id:i,name:r}=n;if(s.startsWith(i)){const n=e[r]||0;e[r]=n+t.size}}))}));const s={};this._users.forAll((t=>{const n=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[n]||0;e[n]=i,s[n]=Math.round(100*t.hitRate)+"%"}else s[n]="0%"}));const i=Object.keys(e);i.sort(((t,n)=>e[n]-e[t])),i.forEach((n=>t[n]=Math.round(e[n]/2**20)+"MB / "+s[n]));for(let e=n.length-1;e>=0;--e){const s=n[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,n)=>{n.startsWith(e)&&(this._size-=t.size,this._db.delete(n),this._notifyRemove(n,t.entry,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,n){let s;return this._removeFuncs.some((i=>{if(t.startsWith(i[0])){const t=i[1](e,n);return"number"==typeof t&&(s=t),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,n]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,n,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,n=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,n&&(n.size-=e.size);const i=this._notifyRemove(t,e.entry,s.SOME);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},10661:(t,e,n)=>{n.d(e,{s:()=>i});var s=n(42100);class i extends s.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,n)=>{n.d(e,{Ed:()=>h,UI:()=>u,mt:()=>p,q6:()=>f,vr:()=>m});var s=n(43697),i=n(92036),r=n(70586),o=n(95330),a=n(5600),l=n(52011);function h(t,e,n){return(0,o.as)(t.map(((t,s)=>e.apply(n,[t,s]))))}async function u(t,e,n){return(await(0,o.as)(t.map(((t,s)=>e.apply(n,[t,s]))))).map((t=>t.value))}function c(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return c(await t)}catch(t){return d(t)}}async function p(t){try{return c(await t)}catch(t){return(0,o.r9)(t),d(t)}}function m(t,e){return new g(t,e)}let g=class extends i.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=t(n),this.promise.then((t=>{this._result=c(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.Cb)()],g.prototype,"value",null),(0,s._)([(0,a.Cb)()],g.prototype,"error",null),(0,s._)([(0,a.Cb)()],g.prototype,"finished",null),(0,s._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,s._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},24133:(t,e,n)=>{n.d(e,{Q:()=>o});var s=n(67676),i=n(44553),r=n(88764);class o{constructor(t=9,e){this._compareMinX=u,this._compareMinY=c,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),x.prune(),b.prune(),M.prune(),S.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(_(t,n))for(x.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;_(t,o)&&(n.leaf?e(r):g(t,o)?this._all(r,e):x.push(r))}n=x.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!_(t,e))return!1;for(x.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(_(t,r)){if(e.leaf||g(t,r))return!0;x.push(i)}}e=x.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,n=this._data,i=null,r=0,o=!1;const a=this._toBBox(t);for(M.clear(),S.clear();n||M.length>0;){if(n||(n=M.pop(),i=M.data[M.length-1],r=S.pop()??0,o=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),M.push(n),this._condense(M),this;o||n.leaf||!g(n,a)?i?(r++,n=i.children[r],o=!1):n=null:(M.push(n),S.push(r),r=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(b.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else b.pushArray(n.children);n=b.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new I(t.slice(e,n+1));return a(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new E([]);o.height=s;const l=Math.ceil(i/r),h=l*Math.ceil(Math.sqrt(r));y(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);y(t,i,e,l,this._compareMinY);for(let n=i;n<=e;n+=l){const i=Math.min(n+l-1,e);o.children.push(this._build(t,n,i,s-1))}}return a(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=d(o),l=p(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);M.clear();const r=this._chooseSubtree(i,this._data,e,M);for(r.children.push(t),h(r,i);e>=0&&M.data[e].children.length>this._maxEntries;)this._split(M,e),e--;this._adjustParentBBoxes(i,M,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),l=n.leaf?new I(o):new E(o);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new E([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,n,this._toBBox),h=m(e,a),u=d(e)+d(a);h<s?(s=h,r=o,i=u<i?u:i):h===s&&u<i&&(i=u,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:u,i=t.leaf?this._compareMinY:c;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=l(t,0,e,i),o=l(t,n-e,n,i);let a=f(r)+f(o);for(let s=e;s<n-e;s++){const e=t.children[s];h(r,t.leaf?i(e):e),a+=f(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];h(o,t.leaf?i(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)h(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else a(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,s,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],h(i,t.leaf?s(r):r);return i}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function m(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function _(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t,e,n,s,i){const o=[e,n];for(;o.length;){const e=o.pop(),n=o.pop();if(e-n<=s)continue;const a=n+Math.ceil((e-n)/s/2)*s;(0,r.q)(t,a,n,e,i),o.push(n,a,a,e)}}const x=new i.Z,b=new i.Z,M=new i.Z,S=new i.Z({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class w extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class I extends w{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends w{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,n)=>{n.d(e,{Qc:()=>u,WU:()=>a,lt:()=>h});var s=n(19153),i=n(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,i.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const n=t.split("-");n.length>1&&n[0]in r&&(t=n[0],e=!0),e||(t="en")}const[n,s,o="#,##0.###"]=r[t];return{decimal:n,group:s,pattern:o}}function a(t,e){const n=o((e={...e}).locale);e.customs=n;const s=e.pattern||n.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,n){const s=(n=n||{}).customs.group,i=n.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===n.fractional&&(n.places=0),e.replace(a,function(t,e,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const s=e.split("."),i="string"==typeof n.places&&n.places.indexOf(",");let r=n.places;i?r=n.places.substring(i+1):+r>=0||(r=(s[1]||[]).length),n.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(s[1]||n.places){i&&(n.places=n.places.substring(0,i));const t=void 0!==n.places?n.places:s[1]&&s[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=s[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let u,c,d=s[0].lastIndexOf(",");if(-1!==d){u=s[0].length-d-1;const t=s[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(c=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-u;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",c&&(u=c,c=void 0)}return o[0]=f.reverse().join(n.group||","),o.join(n.decimal||".")}(t,h[0],{decimal:i,group:s,places:n.places,round:n.round}))}(t,s,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),n=t.pattern||e.pattern,i=e.group,r=e.decimal;let a=1;if(n.includes("%"))a/=100;else if(n.includes("‰"))a/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const h=n.split(";");1===h.length&&h.push("-"+h[0]);const u=d(h,(e=>(e="(?:"+(0,s.Qs)(e,".")+")").replace(l,(e=>{const n={signed:!1,separator:t.strict?i:[i,""],fractional:t.fractional,decimal:r,exponent:!1},s=e.split(".");let o=t.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?n.fractional=!1:(void 0===o&&(o=t.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(n.fractional=!0),!t.places&&+o<s[1].length&&(o+=","+s[1].length),n.places=o);const l=s[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=c(t),n=d(t.fractional,(e=>{let n="";return e&&0!==t.places&&(n="\\"+t.decimal,t.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+t.places+"}"),n}),!0);let s=e+n;return n&&(s="(?:(?:"+s+")|(?:"+n+"))"),s+d(t.exponent,(e=>e?"([eE]"+c({signed:t.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:u.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:i,decimal:r,factor:a}}function u(t,e){const n=h(e),s=new RegExp("^"+n.regexp+"$").exec(t);if(!s)return NaN;let i=s[1];if(!s[1]){if(!s[2])return NaN;i=s[2],n.factor*=-1}return i=i.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(i)*n.factor}function c(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,s.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const n=t.groupSize,i=t.groupSize2;if(i){const t="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+e+"]\\d{"+i+"})*["+e+"]\\d{"+n+"})";return n-i>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*)"}),!0)}const d=(t,e,n)=>{if(!(t instanceof Array))return e(t);const s=[];for(let n=0;n<t.length;n++)s.push(e(t[n]));return f(s.join("|"),Boolean(n))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>g,on:()=>c,tX:()=>_});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return u(t,e,n,f)}function h(t,e,n={}){return u(t,e,n,p)}function u(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function c(t,e,n,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(u),n(t)}const f=l(t,((t,n)=>{c(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return u=(0,i.kB)((()=>{f.remove(),c()})),u}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),u(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??f)])}))}(t,p,e)}function f(t){return!0}function p(t){return!!t}n(87538);const m={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},16306:(t,e,n)=>{n.d(e,{aX:()=>S});var s=n(68773),i=n(20102),r=n(92604),o=n(38913),a=n(58901),l=n(73913),h=n(8744),u=n(40488),c=(n(66577),n(3172)),d=n(33955),f=n(11282),p=n(81271);async function m(t,e,n){const s="string"==typeof t?(0,p.mN)(t):t,i=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...n,query:{...s.query,f:"json",sr:i.wkid??JSON.stringify(i),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,c.default)(s.path+"/simplify",o);var l;return function(t,e,n){const s=(0,d.q9)(e);return t.map((t=>{const e=s.fromJSON(t);return e.spatialReference=n,e}))}(a.geometries,r,i)}const g=r.Z.getLogger("esri.geometry.support.normalizeUtils");function _(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function x(t,e,n){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw g.error(t),new i.Z(t)}const n=(0,l.x3)(t),s=[];for(const t of n){const n=[];s.push(n),n.push([t[0][0],t[0][1]]);for(let s=0;s<t.length-1;s++){const i=t[s][0],r=t[s][1],o=t[s+1][0],a=t[s+1][1],l=Math.sqrt((o-i)*(o-i)+(a-r)*(a-r)),h=(a-r)/l,u=(o-i)/l,c=l/e;if(c>1){for(let t=1;t<=c-1;t++){const s=t*e,o=u*s+i,a=h*s+r;n.push([o,a])}const t=(l+Math.floor(c-1)*e)/2,s=u*t+i,o=h*t+r;n.push([s,o])}n.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:s,spatialReference:t.spatialReference}):new a.Z({paths:s,spatialReference:t.spatialReference})}(t,1e6);t=(0,u.Sx)(e,!0)}return n&&(t=(0,l.Sy)(t,n)),t}function b(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,l.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,l.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,l.XZ)(s,e);t=t.clone().offset(n*(-2*e),0)}else if(s<n){const e=(0,l.XZ)(s,n);t=t.clone().offset(e*(-2*n),0)}}return t}function M(t,e){let n=-1;for(let s=0;s<e.cutIndexes.length;s++){const i=e.cutIndexes[s],r=e.geometries[s],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((n=>{if(n[0]<180)return!0;{let n=0;for(let t=0;t<e.length;t++){const s=e[t][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.XZ)(n,180);for(let n=0;n<e.length;n++){const e=r.getPoint(t,n);r.setPoint(t,n,e.clone().offset(s,0))}return!0}}))}if(i===n){if(_(t))for(const e of(0,l.x3)(r))t[i]=t[i].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[i]=t[i].addPath(e)}else n=i,t[i]=r}return t}async function S(t,e,n){if(!Array.isArray(t))return S([t],e);e&&"string"!=typeof e&&g.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof e?e:e?.url??s.default.geometryServiceUrl;let r,p,_,y,v,w,I,E,F=0;const B=[],z=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,p=(0,h.C5)(r),_=r.isWebMercator,w=_?102100:4326,y=l.UZ[w].maxX,v=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),p)if("mesh"===e.type)z.push(e);else if("point"===e.type)z.push(b(e.clone(),y,v));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>b(t,y,v))),z.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,p);z.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,n=(0,l.XZ)(t.xmin,v)*(2*y);let s=0===n?e.clone():(0,l.Sy)(e.clone(),n);t.offset(n,0),t.intersects(I)&&t.xmax!==y?(F=t.xmax>F?t.xmax:F,s=x(s,_),B.push(s),z.push("cut")):t.intersects(E)&&t.xmin!==v?(F=t.xmax*(2*y)>F?t.xmax*(2*y):F,s=x(s,_,360),B.push(s),z.push("cut")):z.push(s)}else z.push(e.clone());else z.push(e);else z.push(e);let N=(0,l.XZ)(F,y),T=-90;const R=N,Z=new a.Z;for(;N>0;){const t=360*N-180;Z.addPath([[t,T],[t,-1*T]]),T*=-1,N--}if(B.length>0&&R>0){const e=M(B,await async function(t,e,n,s){const i=(0,f.en)(t),r=e[0].spatialReference,o={...s,query:{...i.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(n)}},a=await(0,c.default)(i.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(i,B,Z,n)),s=[],r=[];for(let n=0;n<z.length;n++){const i=z[n];if("cut"!==i)r.push(i);else{const i=e.shift(),o=t[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&i.rings.length>=o.rings.length?(s.push(i),r.push("simplify")):r.push(_?(0,u.$)(i):i)}}if(!s.length)return r;const o=await m(i,s,n),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(_?(0,u.$)(o.shift()):o.shift())}return a}const A=[];for(let t=0;t<z.length;t++){const e=z[t];if("cut"!==e)A.push(e);else{const t=B.shift();A.push(!0===_?(0,u.$)(t):t)}}return A}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,n)=>{n.d(e,{Kd:()=>a,Ze:()=>c,qe:()=>h});var s=n(50758);let i;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===i&&(i=o()),i}const l=[];function h(t){return l.push(t),(0,s.kB)((()=>l.splice(l.indexOf(t),1)))}const u=[];function c(t){return u.push(t),(0,s.kB)((()=>l.splice(u.indexOf(t),1)))}globalThis.addEventListener?.("languagechange",(function(){const t=o();i!==t&&(i=t,[...u].forEach((e=>{e.call(null,t)})),[...l].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,n)=>{n.d(e,{Z:()=>g});var s=n(20102),i=n(32448),r=n(92604),o=n(60437),a=n(24470),l=n(98732),h=n(37549),u=n(29730),c=n(70272),d=n(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new c.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,u.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var p=n(11490);const m=(0,o.Ue)();class g{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,n,s,i]=this.fullBounds;return{xmin:e,ymin:n,xmax:s,ymax:i,spatialReference:(0,p.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const n of t){const t=this._boundsStore.get(n.objectId);t&&e((0,o.JR)(m,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,n)=>{this._markedIds.has(n)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const n=this._featuresById.get(e);let i;if(this._markedIds.add(e),n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.$)(null!=i?i:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,n)=>{n.r(e),n.d(e,{default:()=>H}),n(66577);var s=n(3172),i=n(66643),r=n(20102),o=n(92604),a=n(95330),l=n(81271),h=n(44547),u=n(37455),c=n(8744),d=n(40488),f=n(70272),p=n(5428),m=n(57191),g=n(37427),_=n(64106),y=n(14808),x=n(35671);const b=/^\s*"([\S\s]*)"\s*$/,M=/""/g,S="\n",v=[","," ",";","|","\t"];function*w(t,e,n){let s=0;for(;s<=t.length;){const i=t.indexOf(e,s),r=t.substring(s,i>-1?i:void 0);s+=r.length+e.length,n&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":S;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function F(t,e,n){t=t.trim(),e=e?.trim();const s=[],i=Array.from(new Set([n?.delimiter,...v])).filter((t=>null!=t));for(const n of i){const i=N(t,n).length,r=N(e,n).length??i;i>1&&s.push({weight:Math.min(i,r),delimiter:n})}const r=s.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const s=R(z(t,e).names,n?.longitudeField,n?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:e,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*B(t,e,n,s=(()=>Object.create(null))){const i=I(t);i.next();let r="",o="",a=0,l=s(),h=0;t:for(const t of i){const i=E(t,n);for(const t of i)if(r+=o+t,o="",a+=T(t),a%2==0){if(a>0){const t=b.exec(r);if(!t){l=s(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(M,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=n;0===a?(yield l,l=s(),h=0):o=S}}function z(t,e){const n=N(t,e).filter((t=>null!=t)),s=n.map((t=>(0,x.q6)(t)));for(let t=s.length-1;t>=0;t--)s[t]||(s.splice(t,1),n.splice(t,1));return{names:s,aliases:n}}function N(t,e){if(!t?.length)return[];const n=[];let s="",i="",r=0;const o=E(t,e);for(const t of o)if(s+=i+t,i="",r+=T(t),r%2==0){if(r>0){const t=b.exec(s);t&&n.push(t[1].replaceAll(M,'"'))}else n.push(s);s="",r=0}else i=e;return n}function T(t){let e=0,n=0;for(n=t.indexOf('"',n);n>=0;)e++,n=t.indexOf('"',n+1);return e}function R(t,e,n){e=(0,x.q6)(e)?.toLowerCase(),n=(0,x.q6)(n)?.toLowerCase();const s=t.map((t=>t.toLowerCase())),i=e?t[s.indexOf(e)]:null,r=n?t[s.indexOf(n)]:null;return{longitudeFieldName:i||t[s.indexOf(k.find((t=>s.includes(t))))],latitudeFieldName:r||t[s.indexOf(X.find((t=>s.includes(t))))]}}function Z(t,e,n,s,i){const r=[],o=B(t,n,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<n.length;t++){const e=n[t],o=s[t];if(e===i.longitudeFieldName||e===i.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,n;switch(A(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",n=36;break;default:t="esriFieldTypeString",n=255}r.push({name:e,type:t,alias:o,length:n})}}return r}function A(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let n=!1;if(""!==t){if(e.test(t))n=!0;else{let e=q(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";n=!0}else n=!0}else n=!0}return n?/^[-]?\d*[.,]?\d*$/.test(t)?"string":O(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function O(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let n=!0;if(!L&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,s=0;for(;!e&&s<=t.length;)e=!C.test(t[s]),s++;n=!e}}return n}const q=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),n=new RegExp("["+t.group+"\\s\\xa0]","g"),s=t.factor;return i=>{const r=e.exec(i);if(t.factor=s,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(n,"").replace(t.decimal,"."),+o*t.factor}}(),C=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,L=Number.isNaN(new Date("technology 10").getTime()),X=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],k=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var Y=n(25278),j=n(99514),P=n(82971);const D=(0,Y.bU)("esriGeometryPoint"),U=["csv"],J=[0,0];class ${constructor(t,e){this.x=t,this.y=e}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[n]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),s=function(t,e){const n=e.parsingOptions||{},s={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},i=s.layerDefinition={name:(0,l.vt)(e.url,U)||"csv",drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:u,locationInfo:c}=F(a,h,n);if(!u)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:n});if(!c)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:n});s.locationInfo=c,s.delimiter=u;const{names:d,aliases:f}=z(a,u),p=Z(t,s.delimiter,d,f,s.locationInfo);if(n.fields?.length){const t=new j.Z(n.fields);for(const e of p){const n=t.get(e.name);n&&Object.assign(e,n)}}if(!p.some((t=>"esriFieldTypeOID"===t.type&&(i.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};i.objectIdField=t.name,p.unshift(t)}i.fields=p;const m=new j.Z(i.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=m.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=m.get(s.locationInfo.longitudeFieldName).name),i.timeInfo){const t=i.timeInfo;if(t.startTimeField){const e=m.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=m.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=m.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(i.timeInfo=null)}return s}(n,t);this._locationInfo=s.locationInfo,this._delimiter=s.delimiter,this._queryEngine=this._createQueryEngine(s);const i=await this._createFeatures(n);this._queryEngine.featureStore.addMany(i);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(s.layerDefinition.extent=o,a){const{start:t,end:e}=a;s.layerDefinition.timeInfo.timeExtent=[t,e]}return s}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,i.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:n}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const i=(0,l.mN)(e);return(await(0,s.default)(i.path,{query:{...i.query,...n},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:n,extent:s,timeInfo:i}=t.layerDefinition,r=new m.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new _.q({fields:n,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:i,objectIdField:e,spatialReference:s.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:n}=this._locationInfo,{objectIdField:s,fieldsIndex:i,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=i.fields.filter((t=>t.name!==s)).map((t=>t.name));let m=0;const g={};for(const t of i.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,x.os)(t);void 0!==e&&(g[t.name]=e)}const _=B(t,l,this._delimiter,(0,Y.Dm)(g,s));for(const t of _){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[n]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[n]=l;for(const s in t)if(s!==e&&s!==n)if(i.isDateField(s)){const e=new Date(t[s]);t[s]=O(e,t[s])?e.getTime():null}else if(i.isNumericField(s)){const e=q(t[s]);isNaN(e)?t[s]=null:t[s]=e}t[s]=m,m++,o.push(new $(l,r)),a.push(t)}}if(!(0,c.fS)({wkid:4326},r))if((0,c.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,J);else o=(0,h.oj)(u.N,o,P.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:n}=o[t],i=a[t];i[s]=t+1,y.push(new f.u_(new p.Z([],[e,n]),i,null,i[s]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=q(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,g._W)(c.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,n)=>{n.d(e,{Dm:()=>u,Hq:()=>c,MS:()=>d,bU:()=>a});var s=n(80442),i=n(22974),r=n(61159),o=n(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function u(t,e){if((0,s.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let n=`this.${e} = null;`;for(const e in t)n+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[e]:null,...t})}}function c(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,n)=>{n.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),n(68773),n(40330);var s=n(22974),i=n(81271);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,i.mN)(t):(0,s.d9)(t)}function a(t,e,n){const s={};for(const i in t){if("declaredClass"===i)continue;const r=t[i];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){s[i]=[];for(let t=0;t<r.length;t++)s[i][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(n&&n[i]);s[i]=e?t:JSON.stringify(t)}else s[i]=e?r:JSON.stringify(r);else s[i]=r}return s}n(71058)},58333:(t,e,n)=>{n.d(e,{ET:()=>r,I4:()=>i,eG:()=>l,lF:()=>o,lj:()=>u,qP:()=>a,wW:()=>h});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[749,3172,5732,1900,4727,9880],{99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),o=(n(3172),n(20102)),i=n(92604),a=n(81271);const s=i.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw s.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},5732:(e,t,n)=>{n.d(t,{c:()=>r,g:()=>o});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},46521:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,n,r,o,i,a,s,l){return[e,t,n,r,o,i,a,s,l]}function i(e,t){return new Float64Array(e,t,9)}n.d(t,{a:()=>i,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:i,fromValues:o},Symbol.toStringTag,{value:"Module"}))},52138:(e,t,n)=>{n.d(t,{A:()=>m,a:()=>l,d:()=>p,e:()=>d,f:()=>f,g:()=>b,h:()=>x,i:()=>a,j:()=>w,k:()=>h,m:()=>c,s:()=>i,t:()=>s,w:()=>u,y:()=>v,z:()=>_});var r=n(65617),o=n(46851);function i(e,t,n,r,o,i,a,s,l,c,u,h,d,f,p,m,y){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i,e[5]=a,e[6]=s,e[7]=l,e[8]=c,e[9]=u,e[10]=h,e[11]=d,e[12]=f,e[13]=p,e[14]=m,e[15]=y,e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function s(e,t){if(e===t){const n=t[1],r=t[2],o=t[3],i=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=i,e[11]=t[14],e[12]=o,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],y=t[14],g=t[15],b=n*s-r*a,M=n*l-o*a,x=n*c-i*a,w=r*l-o*s,_=r*c-i*s,v=o*c-i*l,T=u*m-h*p,S=u*y-d*p,O=u*g-f*p,q=h*y-d*m,B=h*g-f*m,C=d*g-f*y;let j=b*C-M*B+x*q+w*O-_*S+v*T;return j?(j=1/j,e[0]=(s*C-l*B+c*q)*j,e[1]=(o*B-r*C-i*q)*j,e[2]=(m*v-y*_+g*w)*j,e[3]=(d*_-h*v-f*w)*j,e[4]=(l*O-a*C-c*S)*j,e[5]=(n*C-o*O+i*S)*j,e[6]=(y*x-p*v-g*M)*j,e[7]=(u*v-d*x+f*M)*j,e[8]=(a*B-s*O+c*T)*j,e[9]=(r*O-n*B-i*T)*j,e[10]=(p*_-m*x+g*b)*j,e[11]=(h*x-u*_-f*b)*j,e[12]=(s*S-a*q-l*T)*j,e[13]=(n*q-r*S+o*T)*j,e[14]=(m*M-p*w-y*b)*j,e[15]=(u*w-h*M+d*b)*j,e):null}function c(e,t,n){const r=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],y=t[13],g=t[14],b=t[15];let M=n[0],x=n[1],w=n[2],_=n[3];return e[0]=M*r+x*s+w*h+_*m,e[1]=M*o+x*l+w*d+_*y,e[2]=M*i+x*c+w*f+_*g,e[3]=M*a+x*u+w*p+_*b,M=n[4],x=n[5],w=n[6],_=n[7],e[4]=M*r+x*s+w*h+_*m,e[5]=M*o+x*l+w*d+_*y,e[6]=M*i+x*c+w*f+_*g,e[7]=M*a+x*u+w*p+_*b,M=n[8],x=n[9],w=n[10],_=n[11],e[8]=M*r+x*s+w*h+_*m,e[9]=M*o+x*l+w*d+_*y,e[10]=M*i+x*c+w*f+_*g,e[11]=M*a+x*u+w*p+_*b,M=n[12],x=n[13],w=n[14],_=n[15],e[12]=M*r+x*s+w*h+_*m,e[13]=M*o+x*l+w*d+_*y,e[14]=M*i+x*c+w*f+_*g,e[15]=M*a+x*u+w*p+_*b,e}function u(e,t,n){const r=n[0],o=n[1],i=n[2];if(t===e)e[12]=t[0]*r+t[4]*o+t[8]*i+t[12],e[13]=t[1]*r+t[5]*o+t[9]*i+t[13],e[14]=t[2]*r+t[6]*o+t[10]*i+t[14],e[15]=t[3]*r+t[7]*o+t[11]*i+t[15];else{const n=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7],f=t[8],p=t[9],m=t[10],y=t[11];e[0]=n,e[1]=a,e[2]=s,e[3]=l,e[4]=c,e[5]=u,e[6]=h,e[7]=d,e[8]=f,e[9]=p,e[10]=m,e[11]=y,e[12]=n*r+c*o+f*i+t[12],e[13]=a*r+u*o+p*i+t[13],e[14]=s*r+h*o+m*i+t[14],e[15]=l*r+d*o+y*i+t[15]}return e}function h(e,t,n){const r=n[0],o=n[1],i=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*o,e[5]=t[5]*o,e[6]=t[6]*o,e[7]=t[7]*o,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function d(e,t,n,r){let i,a,s,l,c,u,h,d,f,p,m,y,g,b,M,x,w,_,v,T,S,O,q,B,C=r[0],j=r[1],I=r[2],E=Math.sqrt(C*C+j*j+I*I);return E<(0,o.g)()?null:(E=1/E,C*=E,j*=E,I*=E,i=Math.sin(n),a=Math.cos(n),s=1-a,l=t[0],c=t[1],u=t[2],h=t[3],d=t[4],f=t[5],p=t[6],m=t[7],y=t[8],g=t[9],b=t[10],M=t[11],x=C*C*s+a,w=j*C*s+I*i,_=I*C*s-j*i,v=C*j*s-I*i,T=j*j*s+a,S=I*j*s+C*i,O=C*I*s+j*i,q=j*I*s-C*i,B=I*I*s+a,e[0]=l*x+d*w+y*_,e[1]=c*x+f*w+g*_,e[2]=u*x+p*w+b*_,e[3]=h*x+m*w+M*_,e[4]=l*v+d*T+y*S,e[5]=c*v+f*T+g*S,e[6]=u*v+p*T+b*S,e[7]=h*v+m*T+M*S,e[8]=l*O+d*q+y*B,e[9]=c*O+f*q+g*B,e[10]=u*O+p*q+b*B,e[11]=h*O+m*q+M*B,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function f(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function p(e,t,n){if(0===t)return a(e);let r,i,s,l=n[0],c=n[1],u=n[2],h=Math.sqrt(l*l+c*c+u*u);return h<(0,o.g)()?null:(h=1/h,l*=h,c*=h,u*=h,r=Math.sin(t),i=Math.cos(t),s=1-i,e[0]=l*l*s+i,e[1]=c*l*s+u*r,e[2]=u*l*s-c*r,e[3]=0,e[4]=l*c*s-u*r,e[5]=c*c*s+i,e[6]=u*c*s+l*r,e[7]=0,e[8]=l*u*s+c*r,e[9]=c*u*s-l*r,e[10]=u*u*s+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function m(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function y(e,t,n){const r=t[0],o=t[1],i=t[2],a=t[3],s=r+r,l=o+o,c=i+i,u=r*s,h=r*l,d=r*c,f=o*l,p=o*c,m=i*c,y=a*s,g=a*l,b=a*c;return e[0]=1-(f+m),e[1]=h+b,e[2]=d-g,e[3]=0,e[4]=h-b,e[5]=1-(u+m),e[6]=p+y,e[7]=0,e[8]=d+g,e[9]=p-y,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}const g=(0,r.c)();function b(e,t,n,r){const o=t[0],i=t[1],a=t[2],s=t[3],l=o+o,c=i+i,u=a+a,h=o*l,d=o*c,f=o*u,p=i*c,m=i*u,y=a*u,g=s*l,b=s*c,M=s*u,x=r[0],w=r[1],_=r[2];return e[0]=(1-(p+y))*x,e[1]=(d+M)*x,e[2]=(f-b)*x,e[3]=0,e[4]=(d-M)*w,e[5]=(1-(h+y))*w,e[6]=(m+g)*w,e[7]=0,e[8]=(f+b)*_,e[9]=(m-g)*_,e[10]=(1-(h+p))*_,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function M(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function x(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function w(e,t){if(e===t)return!0;const n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],f=e[10],p=e[11],m=e[12],y=e[13],g=e[14],b=e[15],M=t[0],x=t[1],w=t[2],_=t[3],v=t[4],T=t[5],S=t[6],O=t[7],q=t[8],B=t[9],C=t[10],j=t[11],I=t[12],E=t[13],P=t[14],N=t[15],F=(0,o.g)();return Math.abs(n-M)<=F*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(r-x)<=F*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-w)<=F*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(a-_)<=F*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-v)<=F*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(l-T)<=F*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(c-S)<=F*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(u-O)<=F*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-q)<=F*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(d-B)<=F*Math.max(1,Math.abs(d),Math.abs(B))&&Math.abs(f-C)<=F*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-j)<=F*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(m-I)<=F*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(y-E)<=F*Math.max(1,Math.abs(y),Math.abs(E))&&Math.abs(g-P)<=F*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(b-N)<=F*Math.max(1,Math.abs(b),Math.abs(N))}function _(e){const t=(0,o.g)(),n=e[0],r=e[1],i=e[2],a=e[4],s=e[5],l=e[6],c=e[8],u=e[9],h=e[10];return Math.abs(1-(n*n+a*a+c*c))<=t&&Math.abs(1-(r*r+s*s+u*u))<=t&&Math.abs(1-(i*i+l*l+h*h))<=t}function v(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[8]&&0===e[9]&&1===e[10]}const T=c,S=M;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},adjoint:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],y=t[14],g=t[15];return e[0]=s*(d*g-f*y)-h*(l*g-c*y)+m*(l*f-c*d),e[1]=-(r*(d*g-f*y)-h*(o*g-i*y)+m*(o*f-i*d)),e[2]=r*(l*g-c*y)-s*(o*g-i*y)+m*(o*c-i*l),e[3]=-(r*(l*f-c*d)-s*(o*f-i*d)+h*(o*c-i*l)),e[4]=-(a*(d*g-f*y)-u*(l*g-c*y)+p*(l*f-c*d)),e[5]=n*(d*g-f*y)-u*(o*g-i*y)+p*(o*f-i*d),e[6]=-(n*(l*g-c*y)-a*(o*g-i*y)+p*(o*c-i*l)),e[7]=n*(l*f-c*d)-a*(o*f-i*d)+u*(o*c-i*l),e[8]=a*(h*g-f*m)-u*(s*g-c*m)+p*(s*f-c*h),e[9]=-(n*(h*g-f*m)-u*(r*g-i*m)+p*(r*f-i*h)),e[10]=n*(s*g-c*m)-a*(r*g-i*m)+p*(r*c-i*s),e[11]=-(n*(s*f-c*h)-a*(r*f-i*h)+u*(r*c-i*s)),e[12]=-(a*(h*y-d*m)-u*(s*y-l*m)+p*(s*d-l*h)),e[13]=n*(h*y-d*m)-u*(r*y-o*m)+p*(r*d-o*h),e[14]=-(n*(s*y-l*m)-a*(r*y-o*m)+p*(r*l-o*s)),e[15]=n*(s*d-l*h)-a*(r*d-o*h)+u*(r*l-o*s),e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],o=e[3],i=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],y=e[15];return(t*a-n*i)*(h*y-d*m)-(t*s-r*i)*(u*y-d*p)+(t*l-o*i)*(u*m-h*p)+(n*s-r*a)*(c*y-d*f)-(n*l-o*a)*(c*m-h*f)+(r*l-o*s)*(c*p-u*f)},equals:w,exactEquals:x,frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},fromQuat:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],a=n+n,s=r+r,l=o+o,c=n*a,u=r*a,h=r*s,d=o*a,f=o*s,p=o*l,m=i*a,y=i*s,g=i*l;return e[0]=1-h-p,e[1]=u+g,e[2]=d-y,e[3]=0,e[4]=u-g,e[5]=1-c-p,e[6]=f+m,e[7]=0,e[8]=d+y,e[9]=f-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromQuat2:function(e,t){const n=g,r=-t[0],o=-t[1],i=-t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=r*r+o*o+i*i+a*a;return h>0?(n[0]=2*(s*a+u*r+l*i-c*o)/h,n[1]=2*(l*a+u*o+c*r-s*i)/h,n[2]=2*(c*a+u*i+s*o-l*r)/h):(n[0]=2*(s*a+u*r+l*i-c*o),n[1]=2*(l*a+u*o+c*r-s*i),n[2]=2*(c*a+u*i+s*o-l*r)),y(e,t,n),e},fromRotation:p,fromRotationTranslation:y,fromRotationTranslationScale:b,fromRotationTranslationScaleOrigin:function(e,t,n,r,o){const i=t[0],a=t[1],s=t[2],l=t[3],c=i+i,u=a+a,h=s+s,d=i*c,f=i*u,p=i*h,m=a*u,y=a*h,g=s*h,b=l*c,M=l*u,x=l*h,w=r[0],_=r[1],v=r[2],T=o[0],S=o[1],O=o[2],q=(1-(m+g))*w,B=(f+x)*w,C=(p-M)*w,j=(f-x)*_,I=(1-(d+g))*_,E=(y+b)*_,P=(p+M)*v,N=(y-b)*v,F=(1-(d+m))*v;return e[0]=q,e[1]=B,e[2]=C,e[3]=0,e[4]=j,e[5]=I,e[6]=E,e[7]=0,e[8]=P,e[9]=N,e[10]=F,e[11]=0,e[12]=n[0]+T-(q*T+j*S+P*O),e[13]=n[1]+S-(B*T+I*S+N*O),e[14]=n[2]+O-(C*T+E*S+F*O),e[15]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromTranslation:f,fromXRotation:m,fromYRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,n,r,o,i,a){const s=1/(n-t),l=1/(o-r),c=1/(i-a);return e[0]=2*i*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(o+r)*l,e[10]=(a+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*i*2*c,e[15]=0,e},getRotation:function(e,t){const n=t[0]+t[5]+t[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),e[3]=.25*r,e[0]=(t[6]-t[9])/r,e[1]=(t[8]-t[2])/r,e[2]=(t[1]-t[4])/r):t[0]>t[5]&&t[0]>t[10]?(r=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/r,e[0]=.25*r,e[1]=(t[1]+t[4])/r,e[2]=(t[8]+t[2])/r):t[5]>t[10]?(r=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/r,e[0]=(t[1]+t[4])/r,e[1]=.25*r,e[2]=(t[6]+t[9])/r):(r=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/r,e[0]=(t[8]+t[2])/r,e[1]=(t[6]+t[9])/r,e[2]=.25*r),e},getScaling:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[4],a=t[5],s=t[6],l=t[8],c=t[9],u=t[10];return e[0]=Math.sqrt(n*n+r*r+o*o),e[1]=Math.sqrt(i*i+a*a+s*s),e[2]=Math.sqrt(l*l+c*c+u*u),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},hasIdentityRotation:v,identity:a,invert:l,invertOrIdentity:function(e,t){return l(e,t)||a(e),e},isOrthoNormal:_,lookAt:function(e,t,n,r){const i=t[0],s=t[1],l=t[2];let c=i-n[0],u=s-n[1],h=l-n[2];const d=(0,o.g)();if(Math.abs(c)<d&&Math.abs(u)<d&&Math.abs(h)<d)return void a(e);let f=1/Math.sqrt(c*c+u*u+h*h);c*=f,u*=f,h*=f;const p=r[0],m=r[1],y=r[2];let g=m*h-y*u,b=y*c-p*h,M=p*u-m*c;f=Math.sqrt(g*g+b*b+M*M),f?(f=1/f,g*=f,b*=f,M*=f):(g=0,b=0,M=0);let x=u*M-h*b,w=h*g-c*M,_=c*b-u*g;f=Math.sqrt(x*x+w*w+_*_),f?(f=1/f,x*=f,w*=f,_*=f):(x=0,w=0,_=0),e[0]=g,e[1]=x,e[2]=c,e[3]=0,e[4]=b,e[5]=w,e[6]=u,e[7]=0,e[8]=M,e[9]=_,e[10]=h,e[11]=0,e[12]=-(g*i+b*s+M*l),e[13]=-(x*i+w*s+_*l),e[14]=-(c*i+u*s+h*l),e[15]=1},mul:T,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},ortho:function(e,t,n,r,o,i,a){const s=1/(t-n),l=1/(r-o),c=1/(i-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(o+r)*l,e[14]=(a+i)*c,e[15]=1,e},perspective:function(e,t,n,r,o){const i=1/Math.tan(t/2);let a;return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=o&&o!==1/0?(a=1/(r-o),e[10]=(o+r)*a,e[14]=2*o*r*a):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){const o=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(o+i);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(o-i)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},rotate:d,rotateX:function(e,t,n){const r=Math.sin(n),o=Math.cos(n),i=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*o+c*r,e[5]=a*o+u*r,e[6]=s*o+h*r,e[7]=l*o+d*r,e[8]=c*o-i*r,e[9]=u*o-a*r,e[10]=h*o-s*r,e[11]=d*o-l*r,e},rotateY:function(e,t,n){const r=Math.sin(n),o=Math.cos(n),i=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*o-c*r,e[1]=a*o-u*r,e[2]=s*o-h*r,e[3]=l*o-d*r,e[8]=i*r+c*o,e[9]=a*r+u*o,e[10]=s*r+h*o,e[11]=l*r+d*o,e},rotateZ:function(e,t,n){const r=Math.sin(n),o=Math.cos(n),i=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*o+c*r,e[1]=a*o+u*r,e[2]=s*o+h*r,e[3]=l*o+d*r,e[4]=c*o-i*r,e[5]=u*o-a*r,e[6]=h*o-s*r,e[7]=d*o-l*r,e},scale:h,set:i,str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},sub:S,subtract:M,targetTo:function(e,t,n,r){const o=t[0],i=t[1],a=t[2],s=r[0],l=r[1],c=r[2];let u=o-n[0],h=i-n[1],d=a-n[2],f=u*u+h*h+d*d;f>0&&(f=1/Math.sqrt(f),u*=f,h*=f,d*=f);let p=l*d-c*h,m=c*u-s*d,y=s*h-l*u;return f=p*p+m*m+y*y,f>0&&(f=1/Math.sqrt(f),p*=f,m*=f,y*=f),e[0]=p,e[1]=m,e[2]=y,e[3]=0,e[4]=h*y-d*m,e[5]=d*p-u*y,e[6]=u*m-h*p,e[7]=0,e[8]=u,e[9]=h,e[10]=d,e[11]=0,e[12]=o,e[13]=i,e[14]=a,e[15]=1,e},translate:u,transpose:s},Symbol.toStringTag,{value:"Module"}))},13598:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function i(e,t){return new Float64Array(e,t,16)}n.d(t,{I:()=>a,a:()=>i,b:()=>o,c:()=>r});const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:o,create:r,createView:i,fromValues:function(e,t,n,r,o,i,a,s,l,c,u,h,d,f,p,m){return[e,t,n,r,o,i,a,s,l,c,u,h,d,f,p,m]}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,n)=>{function r(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}n.d(t,{I:()=>a,a:()=>r,b:()=>o,c:()=>i});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:o,create:r,createView:i,fromValues:function(e,t,n,r){return[e,t,n,r]}},Symbol.toStringTag,{value:"Module"}))},88764:(e,t,n)=>{n.d(t,{q:()=>l});var r,o,i,a=n(5732),s={exports:{}};r=s,o=function(){function e(n,r,o,i,a){for(;i>o;){if(i-o>600){var s=i-o+1,l=r-o+1,c=Math.log(s),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(n,r,Math.max(o,Math.floor(r-l*u/s+h)),Math.min(i,Math.floor(r+(s-l)*u/s+h)),a)}var d=n[r],f=o,p=i;for(t(n,o,r),a(n[i],d)>0&&t(n,o,i);f<p;){for(t(n,f,p),f++,p--;a(n[f],d)<0;)f++;for(;a(n[p],d)>0;)p--}0===a(n[o],d)?t(n,o,p):t(n,++p,i),p<=r&&(o=p+1),r<=p&&(i=p-1)}}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}return function(t,r,o,i,a){e(t,r,o||0,i||t.length-1,a||n)}},void 0!==(i=o())&&(r.exports=i);const l=(0,a.g)(s.exports)},20773:(e,t,n)=>{n.d(t,{a:()=>s,b:()=>a,c:()=>o,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>i});var r=n(72220);function o(e,t,n){i(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function i(e,t,n,o=3,i=o){if(e.length/o!==Math.ceil(t.length/i))return r.c.error("source and destination buffers need to have the same number of elements"),e;const a=e.length/o,s=n[0],l=n[1],c=n[2],u=n[4],h=n[5],d=n[6],f=n[8],p=n[9],m=n[10],y=n[12],g=n[13],b=n[14];let M=0,x=0;for(let n=0;n<a;n++){const n=t[M],r=t[M+1],a=t[M+2];e[x]=s*n+u*r+f*a+y,e[x+1]=l*n+h*r+p*a+g,e[x+2]=c*n+d*r+m*a+b,M+=i,x+=o}return e}function a(e,t,n){s(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function s(e,t,n,o=3,i=o){if(e.length/o!==Math.ceil(t.length/i))return void r.c.error("source and destination buffers need to have the same number of elements");const a=e.length/o,s=n[0],l=n[1],c=n[2],u=n[3],h=n[4],d=n[5],f=n[6],p=n[7],m=n[8];let y=0,g=0;for(let n=0;n<a;n++){const n=t[y],r=t[y+1],a=t[y+2];e[g]=s*n+u*r+f*a,e[g+1]=l*n+h*r+p*a,e[g+2]=c*n+d*r+m*a,y+=i,g+=o}}function l(e,t,n){c(e.typedBuffer,t,n,e.typedBufferStride)}function c(e,t,n,r=3){const o=Math.min(e.length/r,t.count),i=t.typedBuffer,a=t.typedBufferStride;let s=0,l=0;for(let t=0;t<o;t++)e[l]=n*i[s],e[l+1]=n*i[s+1],e[l+2]=n*i[s+2],s+=a,l+=r}function u(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const o=Math.min(e.length/n,t.length/r);let i=0,a=0;for(let s=0;s<o;s++){const o=t[i],s=t[i+1],l=t[i+2],c=o*o+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*o,e[a+1]=t*s,e[a+2]=t*l}i+=r,a+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),o=e.typedBuffer,i=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)o[c]=a[l]>>n,o[c+1]=a[l+1]>>n,o[c+2]=a[l+2]>>n,l+=s,c+=i},transformMat3:s,transformMat3View:a,transformMat4:i,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},2368:(e,t,n)=>{n.d(t,{J:()=>u,j:()=>h});var r=n(43697),o=n(92036),i=(n(80442),n(22974)),a=(n(92604),n(70586)),s=n(31263),l=n(1153),c=n(52011);const u=e=>{let t=class extends e{clone(){const e=(0,l.vw)(this);(0,a.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,n=e.store,r={},o=new Map;for(const e in t){const a=t[e],l=n?.originOf(e),c=a.clonable;if(a.readOnly||!1===c||l!==s.s3.USER&&l!==s.s3.DEFAULTS&&l!==s.s3.WEB_MAP&&l!==s.s3.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,i.Vo)(u),null!=u&&null==h||(l===s.s3.DEFAULTS?o.set(e,h):r[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(o.size){const e=(0,l.vw)(c)?.store;if(e)for(const[t,n]of o)e.set(t,n,s.s3.DEFAULTS)}return c}};return t=(0,r._)([(0,c.j)("esri.core.Clonable")],t),t};let h=class extends(u(o.Z)){};h=(0,r._)([(0,c.j)("esri.core.Clonable")],h)},10661:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(42100);class o extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},24133:(e,t,n)=>{n.d(t,{Q:()=>a});var r=n(67676),o=n(44553),i=n(88764);class a{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),M.prune(),x.prune(),w.prune(),_.prune()}all(e){this._all(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(g(e,n))for(M.clear();n;){for(let o=0,i=n.children.length;o<i;o++){const i=n.children[o],a=n.leaf?r(i):i;g(e,a)&&(n.leaf?t(i):y(e,a)?this._all(i,t):M.push(i))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!g(e,t))return!1;for(M.clear();t;){for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],i=t.leaf?n(o):o;if(g(e,i)){if(t.leaf||y(e,i))return!0;M.push(o)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new S([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,i=0,a=!1;const s=this._toBBox(e);for(w.clear(),_.clear();n||w.length>0;){if(n||(n=w.pop(),o=w.data[w.length-1],i=_.pop()??0,a=!0),n.leaf&&(t=(0,r.cq)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),w.push(n),this._condense(w),this;a||n.leaf||!y(n,s)?o?(i++,n=o.children[i],a=!1):n=null:(w.push(n),_.push(i),i=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else x.pushArray(n.children);n=x.pop()??null}}_build(e,t,n,r){const o=n-t+1;let i=this._maxEntries;if(o<=i){const r=new S(e.slice(t,n+1));return s(r,this._toBBox),r}r||(r=Math.ceil(Math.log(o)/Math.log(i)),i=Math.ceil(o/i**(r-1)));const a=new O([]);a.height=r;const l=Math.ceil(o/i),c=l*Math.ceil(Math.sqrt(i));b(e,t,n,c,this._compareMinX);for(let o=t;o<=n;o+=c){const t=Math.min(o+c-1,n);b(e,o,t,l,this._compareMinY);for(let n=o;n<=t;n+=l){const o=Math.min(n+l-1,t);a.children.push(this._build(e,n,o,r-1))}}return s(a,this._toBBox),a}_chooseSubtree(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,o=1/0;for(let i=0,a=t.children.length;i<a;i++){const a=t.children[i],s=d(a),l=p(e,a)-s;l<o?(o=l,r=s<r?s:r,n=a):l===o&&s<r&&(r=s,n=a)}t=n||t.children[0]}return t}_insert(e,t,n){const r=this._toBBox,o=n?e:r(e);w.clear();const i=this._chooseSubtree(o,this._data,t,w);for(i.children.push(e),c(i,o);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;this._adjustParentBBoxes(o,w,t)}_split(e,t){const n=e.data[t],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);const i=this._chooseSplitIndex(n,o,r);if(!i)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const a=n.children.splice(i,n.children.length-i),l=n.leaf?new S(a):new O(a);l.height=n.height,s(n,this._toBBox),s(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,s(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,o,i;r=o=1/0;for(let a=t;a<=n-t;a++){const t=l(e,0,a,this._toBBox),s=l(e,a,n,this._toBBox),c=m(t,s),u=d(t)+d(s);c<r?(r=c,i=a,o=u<o?u:o):c===r&&u<o&&(o=u,i=a)}return i}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:u,o=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,o)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const o=this._toBBox,i=l(e,0,t,o),a=l(e,n-t,n,o);let s=f(i)+f(a);for(let r=t;r<n-t;r++){const t=e.children[r];c(i,e.leaf?o(t):t),s+=f(i)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];c(a,e.leaf?o(t):t),s+=f(a)}return s}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)c(t.data[r],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const o=e.data[t-1],i=o.children;i.splice((0,r.cq)(i,n,i.length,o.indexHint),1)}else this.clear();else s(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function s(e,t){l(e,0,e.children.length,t,e)}function l(e,t,n,r,o){o||(o=new S([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let i,a=t;a<n;a++)i=e.children[a],c(o,e.leaf?r(i):i);return o}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),o=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,o-n)*Math.max(0,i-r)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,n,r,o){const a=[t,n];for(;a.length;){const t=a.pop(),n=a.pop();if(t-n<=r)continue;const s=n+Math.ceil((t-n)/r/2)*r;(0,i.q)(e,s,n,t,o),a.push(n,s,s,t)}}const M=new o.Z,x=new o.Z,w=new o.Z,_=new o.Z({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new r.SO}}class S extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},83025:(e,t,n)=>{n.d(t,{JK:()=>s,QZ:()=>i,Rq:()=>a,bg:()=>o,mB:()=>l});var r=n(1533);function o(e,t=!1){return e<=r.DB?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,r.kJ)(e)?e.length:e.byteLength/8)<=r.DB?Array.from(e):new Float64Array(e)}function a(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function s(e,t){for(let n=0;n<t.length;++n)e[n]=t[n];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},85872:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(43697),o=n(2368),i=n(96674),a=n(5600),s=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,s.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,a.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const d=h},50567:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(2368),i=n(96674),a=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),s=n(52011);let l=class extends((0,o.J)(i.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,a.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(43697),o=n(2368),i=n(96674),a=n(5600),s=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,n,r]=this.origin;return new u.Z({x:t,y:n,z:r,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:n}){this.origin=(0,c.f)(e,t,n??0)}};(0,r._)([(0,s.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,a.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const d=h},60437:(e,t,n)=>{n.d(t,{Gv:()=>b,HH:()=>a,JR:()=>p,TC:()=>s,Tn:()=>h,Ue:()=>o,al:()=>i,bZ:()=>m,cS:()=>f,dp:()=>c,fS:()=>g,is:()=>y,op:()=>u,pp:()=>l,t8:()=>d});var r=n(6570);function o(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,n,r,i,a,s=o()){return s[0]=e,s[1]=t,s[2]=n,s[3]=r,s[4]=i,s[5]=a,s}function a(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.Z(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function s(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function h(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?d(e,b):o(b)}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function y(e){return 6===e.length}function g(e,t,n){if(null==e||null==t)return e===t;if(!y(e)||!y(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];o()},72220:(e,t,n)=>{n.d(t,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},61787:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r=n(80442),o=n(24133),i=n(66459);class a{async createIndex(e,t){const n=new Array;if(!e.vertexAttributes||!e.vertexAttributes.position)return new o.Q;const r=this._createMeshData(e),i=null!=t?await t.invoke("createIndexThread",r,{transferList:n}):this.createIndexThread(r).result;return this._createPooledRBush().fromJSON(i)}createIndexThread(e){const t=new Float64Array(e.position),n=this._createPooledRBush();return e.components?this._createIndexComponentsThread(n,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(n,t)}_createIndexAllThread(e,t){const n=new Array(t.length/9);let r=0;for(let e=0;e<t.length;e+=9)n[r++]=s(t,e,e+3,e+6);return e.load(n),{result:e.toJSON()}}_createIndexComponentsThread(e,t,n){let r=0;for(const e of n)r+=e.length/3;const o=new Array(r);let i=0;for(const e of n)for(let n=0;n<e.length;n+=3)o[i++]=s(t,3*e[n],3*e[n+1],3*e[n+2]);return e.load(o),{result:e.toJSON()}}_createMeshData(e){const t=(e.vertexSpace.isRelative?(0,i.I5)({position:e.vertexAttributes.position,normal:null,tangent:null},e.vertexSpace,e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:t}:{position:t,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new o.Q(9,(0,r.Z)("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function s(e,t,n,r){return{minX:Math.min(e[t],e[n],e[r]),maxX:Math.max(e[t],e[n],e[r]),minY:Math.min(e[t+1],e[n+1],e[r+1]),maxY:Math.max(e[t+1],e[n+1],e[r+1]),p0:[e[t],e[t+1],e[t+2]],p1:[e[n],e[n+1],e[n+2]],p2:[e[r],e[r+1],e[r+2]]}}},1231:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(35454),a=n(96674),s=n(5600),l=n(75215),c=(n(67676),n(80442),n(36030)),u=n(71715),h=n(52011),d=n(72729),f=n(86719);const p=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?p.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"description",void 0),(0,o._)([(0,u.r)("description")],m.prototype,"readDescription",null),(0,o._)([(0,s.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,s.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,c.J)(f.v)],m.prototype,"type",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"valueType",void 0),(0,o._)([(0,u.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,s.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,o._)([(0,h.j)("esri.layers.support.Field")],m);const y=m},72729:(e,t,n)=>{n.d(t,{im:()=>T,V5:()=>v}),n(80442);var r,o=n(43697),i=n(22974),a=n(5600),s=(n(75215),n(36030)),l=n(52011),c=n(96674);n(67676);let u=r=class extends c.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=r=(0,o._)([(0,l.j)("esri.layers.support.CodedValue")],u);const h=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends c.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,s.J)(h)],d.prototype,"type",void 0),d=(0,o._)([(0,l.j)("esri.layers.support.Domain")],d);const f=d;var p;let m=p=class extends f{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new p({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,a.Cb)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,s.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=p=(0,o._)([(0,l.j)("esri.layers.support.CodedValueDomain")],m);const y=m;var g;n(92604),n(20102);let b=g=class extends f{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,s.J)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,o._)([(0,l.j)("esri.layers.support.InheritedDomain")],b);const M=b;var x;let w=x=class extends f{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new x({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,s.J)({range:"range"})],w.prototype,"type",void 0),w=x=(0,o._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const _=w,v={key:"type",base:f,typeMap:{range:w,"coded-value":y,inherited:M}};function T(e){if(!e||!e.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return y.fromJSON(e);case"inherited":return M.fromJSON(e)}return null}},86719:(e,t,n)=>{n.d(t,{v:()=>r});const r=new(n(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},3172:(e,t,n)=>{n.r(t),n.d(t,{default:()=>f});var r=n(68773),o=n(40330),i=n(20102),a=n(80442),s=n(22974),l=n(95330),c=n(81271),u=n(19745),h=n(71058),d=n(85958);async function f(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,c.u0)(t.query.toString().replaceAll("+"," ")));const s=(0,c.HK)(e),u=(0,c.jc)(e);u||s||(e=(0,c.Fv)(e));const g={url:e,requestOptions:{...t}};let b=(0,c.oh)(e);if(b){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let n,r;try{r=await e.before(t)}catch(e){n=v("request:interceptor",e,t)}if((r instanceof Error||r instanceof i.Z)&&(n=v("request:interceptor",r,t)),n)throw e.error&&e.error(n),n;return r}}(b,g);if(null!=e)return{data:e,getHeader:x,httpStatus:200,requestOptions:g.requestOptions,url:g.url};b.after||b.error||(b=null)}if(e=g.url,"image"===(t=g.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g);if("head"===t.method){if(t.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(s||u)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await n.e(9884).then(n.bind(n,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const M=new AbortController;(0,l.fu)(t,(()=>M.abort()));const w={controller:M,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:b,params:g,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},_=await async function(e){let t,n;await async function(e){const t=e.params.url,n=e.params.requestOptions,i=e.controller.signal,a=n.body;let s=null,c=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?s=a:a instanceof HTMLFormElement&&(s=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:n.cacheBust&&!("polyfill"in f._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:n.headers||{},method:"head"===n.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:i},(s||c)&&(e.fetchOptions.body=s||c),"anonymous"===n.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||n.query?.token||s?.get("token")),!e.hasToken&&r.default.apiKey&&(0,h.r)(t)&&(n.query||(n.query={}),n.query.token=r.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!S(t)&&!(0,l.Hc)(i)){let r;"immediate"===n.authMode?(await T(),r=await o.id.getCredential(t,{signal:i}),e.credential=r):"no-prompt"===n.authMode?(await T(),r=await o.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=r):o.id&&(r=o.id.findCredential(t)),r&&(e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[t,n]=await O(e)}while(!await B(e,t,n))}catch(n){const r=v("request:server",n,e.params,t);throw r.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(r),r}const i=e.params.url;if(n&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&n.user?.username&&!(0,c.kl)(i)){const e=(0,c.P$)(i,!0);e&&m.trustedServers.push(e)}Array.isArray(n.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(n.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&o.id){const e=o.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,a.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:n,getHeader:t?e=>t?.headers.get(e):x,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(w);return b?.after?.(_),_}let p;const m=r.default.request,y="FormData"in globalThis,g=[499,498,403,401],b=["COM_0056","COM_0057","SB_0008"],M=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],x=()=>null,w=Symbol();function _(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,c.kl)(t)}function v(e,t,n,r){let o="Error";const a={url:n.url,requestOptions:n.requestOptions,getHeader:x,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,s.d9)(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=a,t;if(t){const e=r&&(e=>r.headers.get(e)),n=r?.status,i=t.message;i&&(o=i),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||n||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=w in t?t[w]:t}return(0,l.D_)(t)?(0,l.zE)():new i.Z(e,o,a)}async function T(){o.id||await Promise.all([n.e(7126),n.e(6261),n.e(9255),n.e(1400),n.e(450)]).then(n.bind(n,73660))}function S(e){return M.some((t=>t.test(e)))}async function O(e){let t=e.params.url;const n=e.params.requestOptions,r=e.fetchOptions??{},i=(0,c.jc)(t)||(0,c.HK)(t),s=n.responseType||"json",h=i?0:null!=n.timeout?n.timeout:m.timeout;let p=!1;if(!i){e.useSSL&&(t=(0,c.hO)(t)),n.cacheBust&&"default"===r.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let i={...n.query};e.credentialToken&&(i.token=e.credentialToken);let s=(0,c.B7)(i);(0,a.Z)("esri-url-encodes-apostrophe")&&(s=s.replaceAll("'","%27"));const l=t.length+1+s.length;let h;p="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||l>m.maxUrlLength;const f=n.useProxy||!!(0,c.ed)(t);if(f){const e=(0,c.b7)(t);h=e.path,!p&&h.length+1+l>m.maxUrlLength&&(p=!0),e.query&&(i={...e.query,...i})}if("HEAD"===r.method&&(p||f)){if(p){if(l>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(r.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?t=(0,c.fl)(t,i):(r.body=(0,c.B7)(i),r.headers||(r.headers={}),r.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,i),f&&(e.useProxy=!0,t=`${h}?${t}`),i.token&&y&&r.body instanceof FormData&&!(0,u.P)(t)&&r.body.set("token",i.token),n.hasOwnProperty("withCredentials"))e.withCredentials=n.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(o.id){const n=o.id.findServerInfo(t);n?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(r.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(p?(0,c.fl)(t,i):t))}let g,b,M=0,x=!1;h>0&&(M=setTimeout((()=>{x=!0,e.controller.abort()}),h));try{if("native-request-init"===n.responseType)b=r,b.url=t;else if("image"!==n.responseType||"default"!==r.cache||"GET"!==r.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(n.headers)||!i&&!e.useProxy&&m.proxyUrl&&!_(t)){if(g=await f._abortableFetch(t,r),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===n.responseType)b=g;else if("HEAD"!==r.method)if(g.ok){switch(s){case"array-buffer":b=await g.arrayBuffer();break;case"blob":case"image":b=await g.blob();break;default:b=await g.text()}if(M&&(clearTimeout(M),M=0),"json"===s||"xml"===s||"document"===s)if(b)switch(s){case"json":b=JSON.parse(b);break;case"xml":b=q(b,"application/xml");break;case"document":b=q(b,"text/html")}else b=null;if(b){if("array-buffer"===s||"blob"===s){const e=g.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&b["blob"===s?"size":"byteLength"]<=750)try{const e=await new Response(b).json();e.error&&(b=e)}catch{}}"image"===s&&b instanceof Blob&&(b=await C(URL.createObjectURL(b),e,!0))}}else{b=await g.text();try{b=JSON.parse(b)}catch{}}}else b=await C(t,e)}catch(r){if("AbortError"===r.name){if(x)throw(0,d.Tf)();throw(0,l.zE)("Request canceled")}if(!(!g&&r instanceof TypeError&&m.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||e.useProxy||_(t))throw r;e.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{M&&clearTimeout(M)}return[g,b]}function q(e,t){let n;try{n=(new DOMParser).parseFromString(e,t)}catch{}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}async function B(e,t,n){if(e.redoRequest)return e.redoRequest=!1,!1;const r=e.params.requestOptions;if(!t||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let i,a;if(n&&(n.error?i=n.error:"error"===n.status&&Array.isArray(n.messages)&&(i={...n},i[w]=n,i.details=n.messages)),!i&&!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[w]=n,i;let s,l=null;i&&(a=Number(i.code),l=i.hasOwnProperty("subcode")?Number(i.subcode):null,s=i.messageCode,s=s?.toUpperCase());const c=r.authMode;if(403===a&&(4===l||i.message?.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&g.includes(a)&&!S(e.params.url)&&(403!==a||s&&!b.includes(s)&&(null==l||2===l&&e.credentialToken))){await T();try{const t=await o.id.getCredential(e.params.url,{error:v("request:server",i,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function C(e,t,n=!1){const r=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=m.priority,o.src=e,(0,d.fY)(o,e,n,r)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,n)=>{n.d(t,{r:()=>i});var r=n(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,r.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,n)=>{n.d(t,{Hu:()=>h,Tf:()=>u,fY:()=>s,jH:()=>d,jz:()=>f});var r=n(68773),o=n(80442),i=n(95330),a=n(81271);function s(e,t,n=!1,r){return new Promise(((a,s)=>{if((0,i.Hc)(r))return void s(l());let c=()=>{d(),s(new Error(`Unable to load ${t}`))},u=()=>{const t=e;d(),a(t)},h=()=>{if(!e)return;const t=e;d(),t.src="",s(l())};const d=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=r&&r.removeEventListener("abort",h),h=null,n&&URL.revokeObjectURL(t)};null!=r&&r.addEventListener("abort",h),(0,o.Z)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const c="Timeout exceeded";function u(){return new Error(c)}function h(e){r.default.request.crossOriginNoCorsDomains||(r.default.request.crossOriginNoCorsDomains={});const t=r.default.request.crossOriginNoCorsDomains;for(let n of e)n=n.toLowerCase(),/^https?:\/\//.test(n)?t[(0,a.P$)(n)??""]=0:(t[(0,a.P$)("http://"+n)??""]=0,t[(0,a.P$)("https://"+n)??""]=0)}function d(e){const t=r.default.request.crossOriginNoCorsDomains;if(t){let n=(0,a.P$)(e);if(n)return n=n.toLowerCase(),!(0,a.D6)(n,(0,a.TI)())&&t[n]<Date.now()-36e5}return!1}async function f(e){const t=r.default.request.crossOriginNoCorsDomains,n=(0,a.P$)(e);t&&n&&(t[n.toLowerCase()]=Date.now());const o=(0,a.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2594],{17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>p,tX:()=>g});var i=r(91460),s=r(50758),l=r(70586),n=r(95330),o=r(26258);function a(e,t,r={}){return c(e,t,r,h)}function u(e,t,r={}){return c(e,t,r,m)}function c(e,t,r={},i){let s=null;const n=r.once?(e,r)=>{i(e)&&((0,l.hw)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,o.aQ)(e,n,r.sync,r.equals),r.initial){const t=e();n(t,t)}return s}function p(e,t,r,n={}){let o=null,u=null,c=null;function p(){o&&u&&(u.remove(),n.onListenerRemove?.(o),o=null,u=null)}function d(e){n.once&&n.once&&(0,l.hw)(c),r(e)}const h=a(e,((e,r)=>{p(),(0,i.vT)(e)&&(o=e,u=(0,i.on)(e,t,d),n.onListenerAdd?.(e))}),{sync:n.sync,initial:!0});return c=(0,s.kB)((()=>{h.remove(),p()})),c}function d(e,t){return function(e,t,r){if((0,n.Hc)(r))return Promise.reject((0,n.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let o=null;function a(){o=(0,l.hw)(o)}return new Promise(((i,l)=>{o=(0,s.AL)([(0,n.fu)(r,(()=>{a(),l((0,n.zE)())})),c(e,(e=>{a(),i(e)}),{sync:!1,once:!0},t??h)])}))}(e,m,t)}function h(e){return!0}function m(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},72594:(e,t,r)=>{r.r(t),r.d(t,{default:()=>fe});var i,s=r(43697),l=r(3172),n=r(67676),o=r(46791),a=r(20102),u=r(22974),c=r(16453),p=r(78286),d=r(95330),h=r(17445),m=r(81271),y=r(5600),f=(r(75215),r(71715)),g=r(52011),w=r(30556),v=r(6570),x=r(87085),b=r(16199),S=r(71612),C=r(38009),M=r(16859),I=r(34760),L=r(72965),T=r(90082),_=r(11145),P=r(42238),E=r(5833),A=r(96674);r(80442);let O=i=class extends A.wq{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new i;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo&&this.tileInfo.clone()),e}};(0,s._)([(0,y.Cb)({type:v.Z,json:{read:{source:"fullExtent"}}})],O.prototype,"fullExtent",void 0),(0,s._)([(0,y.Cb)({type:String,json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,s._)([(0,y.Cb)({type:_.Z,json:{read:{source:"tileInfo"}}})],O.prototype,"tileInfo",void 0),O=i=(0,s._)([(0,g.j)("esri.layer.support.TileMatrixSet")],O);const R=O;var F;let V=F=class extends A.wq{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s._)([(0,y.Cb)({json:{read:{source:"id"}}})],V.prototype,"id",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"title"}}})],V.prototype,"title",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"abstract"}}})],V.prototype,"description",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"legendUrl"}}})],V.prototype,"legendUrl",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"isDefault"}}})],V.prototype,"isDefault",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"keywords"}}})],V.prototype,"keywords",void 0),V=F=(0,s._)([(0,g.j)("esri.layer.support.WMTSStyle")],V);const j=V;var U;let N=U=class extends A.wq{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?v.Z.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map((e=>v.Z.fromJSON(e))):t.tileMatrixSets?.map((e=>v.Z.fromJSON(e.fullExtent))).filter((e=>e))??[]}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats&&this.imageFormats.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles?.at(0)?.id??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?this.tileMatrixSets.find((e=>e.id===this.tileMatrixSetId)):null}clone(){const e=new U;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats&&this.imageFormats.slice()),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles&&this.styles.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s._)([(0,y.Cb)()],N.prototype,"description",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"fullExtent",void 0),(0,s._)([(0,f.r)("fullExtent",["fullExtent"])],N.prototype,"readFullExtent",null),(0,s._)([(0,y.Cb)({readOnly:!0})],N.prototype,"fullExtents",void 0),(0,s._)([(0,f.r)("fullExtents",["fullExtents","tileMatrixSets"])],N.prototype,"readFullExtents",null),(0,s._)([(0,y.Cb)()],N.prototype,"id",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"imageFormat",null),(0,s._)([(0,y.Cb)({json:{read:{source:"formats"}}})],N.prototype,"imageFormats",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"layer",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"parent",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"styleId",null),(0,s._)([(0,y.Cb)({type:o.Z.ofType(j),json:{read:{source:"styles"}}})],N.prototype,"styles",void 0),(0,s._)([(0,y.Cb)({json:{write:{ignoreOrigin:!0}}})],N.prototype,"title",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"tileMatrixSetId",void 0),(0,s._)([(0,y.Cb)({readOnly:!0})],N.prototype,"tileMatrixSet",null),(0,s._)([(0,y.Cb)({type:o.Z.ofType(R),json:{read:{source:"tileMatrixSets"}}})],N.prototype,"tileMatrixSets",void 0),N=U=(0,s._)([(0,g.j)("esri.layers.support.WMTSSublayer")],N);const Z=N;var k=r(2109),D=r(94139),W=r(58116),B=r(52162),K=r(88724),$=r(39450);const q=90.71428571428571;function Y(e){const t=e.replaceAll(/ows:/gi,"");if(!H("Contents",(new DOMParser).parseFromString(t,"text/xml").documentElement))throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant",{text:e})}function G(e){return e.nodeType===Node.ELEMENT_NODE}function H(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(G(i)&&i.nodeName===e)return i}return null}function J(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];G(s)&&s.nodeName===e&&r.push(s)}return r}function z(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];G(s)&&s.nodeName===e&&r.push(s)}return r.map((e=>e.textContent)).filter(n.pC)}function Q(e,t){return e.split(">").forEach((e=>{t&&(t=H(e,t))})),t&&t.textContent}function X(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some((i=>{if(i.nodeName.includes(e)){const e=H(t,i),l=e&&e.textContent;if(l===r||r.split(":")&&r.split(":")[1]===l)return s=i,!0}return!1})),s}function ee(e,t,r,i,s){const l=Q("Abstract",t),n=z("Format",t);return{id:e,fullExtent:re(t),fullExtents:ie(t),description:l,formats:n,styles:se(t,i),title:Q("Title",t),tileMatrixSets:le(s,t,r)}}function te(e,t){const r=[],i=e.layerMap?.get(t);if(!i)return null;const s=J("ResourceURL",i),l=J("Dimension",i);let n,o,a,u;return l.length&&(n=Q("Identifier",l[0]),o=z("Default",l[0])||z("Value",l[0])),l.length>1&&(a=Q("Identifier",l[1]),u=z("Default",l[1])||z("Value",l[1])),e.dimensionMap.set(t,{dimensions:o,dimensions2:u}),s.forEach((e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(n&&o.length)if(t.includes("{"+n+"}"))t=t.replace("{"+n+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+n.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue}"+t.substring(e+n.length+2))}if(a&&u.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue2}"+t.substring(e+a.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}})),r}function re(e){const t=H("WGS84BoundingBox",e),r=t?Q("LowerCorner",t).split(" "):["-180","-90"],i=t?Q("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function ie(e){const t=[];return(0,K.h)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const r=e.getAttribute("crs").toLowerCase(),i=ne(r),s=r.includes("epsg")&&(0,B.A)(i.wkid);let l,n,o,a;(0,K.h)(e,{LowerCorner:e=>{[l,n]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([l,n]=[n,l])},UpperCorner:e=>{[o,a]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([o,a]=[a,o])}}),t.push({xmin:l,ymin:n,xmax:o,ymax:a,spatialReference:i})}}),t}function se(e,t){return J("Style",e).map((e=>{const r=H("LegendURL",e),i=H("Keywords",e),s=i?z("Keyword",i):[];let l=r&&r.getAttribute("xlink:href");return t&&(l=l&&l.replace(/^http:/i,"https:")),{abstract:Q("Abstract",e),id:Q("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:Q("Title",e)}}))}function le(e,t,r){return J("TileMatrixSetLink",t).map((t=>function(e,t,r){const i=H("TileMatrixSet",t).textContent,s=z("TileMatrix",t),l=r.find((e=>{const t=H("Identifier",e),r=t&&t.textContent;return!!(r===i||i.split(":")&&i.split(":")[1]===r)})),n=H("TileMatrixSetLimits",t),o=n&&J("TileMatrixLimits",n),a=new Map;if(o?.length)for(const e of o){const t=H("TileMatrix",e).textContent,r=+H("MinTileRow",e).textContent,i=+H("MaxTileRow",e).textContent,s=+H("MinTileCol",e).textContent,l=+H("MaxTileCol",e).textContent;a.set(t,{minCol:s,maxCol:l,minRow:r,maxRow:i})}const u=Q("SupportedCRS",l).toLowerCase(),c=function(e,t){return oe(H("TileMatrix",e),t)}(l,u),p=c.spatialReference,d=H("TileMatrix",l),h=[parseInt(Q("TileWidth",d),10),parseInt(Q("TileHeight",d),10)],m=[];s.length?s.forEach(((e,t)=>{const r=X("TileMatrix","Identifier",e,l);m.push(pe(r,u,t,i,a))})):J("TileMatrix",l).forEach(((e,t)=>{m.push(pe(e,u,t,i,a))}));const y=function(e,t,r,i,s){const l=H("BoundingBox",t);let n,o,a,u,c,p;if(l&&(n=Q("LowerCorner",l).split(" "),o=Q("UpperCorner",l).split(" ")),n&&n.length>1&&o&&o.length>1)a=parseFloat(n[0]),c=parseFloat(n[1]),u=parseFloat(o[0]),p=parseFloat(o[1]);else{const e=H("TileMatrix",t),l=parseInt(Q("MatrixWidth",e),10),n=parseInt(Q("MatrixHeight",e),10);a=r.x,p=r.y,u=a+l*i[0]*s.resolution,c=p-n*i[1]*s.resolution}return function(e,t,r){return"1.0.0"===e&&(0,B.A)(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}(e,r.spatialReference,r)?new v.Z(c,a,p,u,r.spatialReference):new v.Z(a,c,u,p,r.spatialReference)}(e,l,c,h,m[0]).toJSON(),f=new _.Z({dpi:96,spatialReference:p,size:h,origin:c,lods:m}).toJSON();return{id:i,fullExtent:y,tileInfo:f}}(e,t,r)))}function ne(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const r=function(e){return e.includes("crs84")||e.includes("crs:84")?ae.CRS84:e.includes("crs83")||e.includes("crs:83")?ae.CRS83:e.includes("crs27")||e.includes("crs:27")?ae.CRS27:null}(e);return null!=r&&(t=r),{wkid:t}}function oe(e,t){const r=ne(t),[i,s]=Q("TopLeftCorner",e).split(" ").map((e=>parseFloat(e))),l=t.includes("epsg")&&(0,B.A)(r.wkid);return new D.Z(l?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}var ae,ue,ce;function pe(e,t,r,i,s){const l=ne(t),n=Q("Identifier",e);let o=parseFloat(Q("ScaleDenominator",e));const a=de(l.wkid,o,i);o*=96/q;const u=+Q("MatrixWidth",e),c=+Q("MatrixHeight",e),{maxCol:p=u-1,maxRow:d=c-1,minCol:h=0,minRow:m=0}=s.get(n)??{},{x:y,y:f}=oe(e,t);return new $.Z({cols:[h,p],level:r,levelValue:n,origin:[y,f],scale:o,resolution:a,rows:[m,d]})}function de(e,t,r){let i;return i=W.Z.hasOwnProperty(""+e)?W.Z.values[W.Z[e]]:"default028mm"===r?6370997*Math.PI/180:(0,k.e8)(e).metersPerDegree,7*t/25e3/i}(ue=ae||(ae={}))[ue.CRS84=4326]="CRS84",ue[ue.CRS83=4269]="CRS83",ue[ue.CRS27=4267]="CRS27";const he={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},me=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let ye=ce=class extends((0,S.h)((0,I.Q)((0,L.M)((0,C.q)((0,M.I)((0,c.R)(x.Z))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,h.YP)((()=>this.activeLayer),((e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)}),h.Z_),(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.layer=this,e.parent=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=null,e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=null,e.parent=null;if(e)for(const t of e)t.layer=this,t.parent=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.r9).then((()=>this._fetchService(e))).catch((e=>{throw(0,d.r9)(e),new a.Z("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})}))),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new Z);let i=t.layers.find((e=>e.id===this.activeLayer.id));return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,l=i?.layerIdentifier;let n=null;const o=i?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(n=o[0]):n=o);const a=s?.format,u=s?.style;return new Z({id:l,imageFormat:a,styleId:u,tileMatrixSetId:n})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,p.hS)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map((e=>{const r=new Z;return r.read(e,t),r}))}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map((e=>e.tileInfo?.spatialReference)).toArray().filter(n.pC)??[]}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new P.Z(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&"/"===e.substr(-1)?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId),i=r?.tileInfo,s=e.fullExtent,l=new E.B({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new b.default({fullExtent:s,urlTemplate:t,tileInfo:i,wmtsInfo:l})}async fetchTile(e,t,r,i={}){const{signal:s}=i,n=this.getTileUrl(e,t,r),{data:o}=await(0,l.default)(n,{responseType:"image",signal:s});return o}async fetchImageBitmapTile(e,t,r,i={}){const{signal:s}=i;if(this.fetchTile!==ce.prototype.fetchTile){const l=await this.fetchTile(e,t,r,i);return(0,T.V)(l,e,t,r,s)}const n=this.getTileUrl(e,t,r),{data:o}=await(0,l.default)(n,{responseType:"blob",signal:s});return(0,T.V)(o,e,t,r,s)}findSublayerById(e){return this.sublayers?.find((t=>t.id===e))}getTileUrl(e,t,r){const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=i?.tileInfo?.lods[e],l=s?s.levelValue||`${s.level}`:`${e}`;let n=this.resourceInfo?"":function(e,t,r,i,s,l,n,o){const a=function(e,t,r){const i=te(e,t),s=i?.filter((e=>e.format===r));return(s?.length?s:i)??[]}(e,t,i);if(!(a?.length>0))return"";const{dimensionMap:u}=e,c=u.get(t).dimensions?.[0],p=u.get(t).dimensions2?.[0];return a[n%a.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,l).replaceAll(/\{TileRow\}/gi,""+n).replaceAll(/\{TileCol\}/gi,""+o).replaceAll(/\{dimensionValue\}/gi,c).replaceAll(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,r);return n||(n=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`)),n=this._appendCustomLayerParameters(n),n}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const r=function(e,t,r,i){const{dimensionMap:s}=e,l=te(e,t);let n="";if(l&&l.length>0){const e=s.get(t).dimensions&&s.get(t).dimensions[0],o=s.get(t).dimensions2&&s.get(t).dimensions2[0];n=l[0].template,n.indexOf(".xxx")===n.length-4&&(n=n.slice(0,n.length-4)),n=n.replaceAll(/\{Style\}/gi,i),n=n.replaceAll(/\{TileMatrixSet\}/gi,r),n=n.replaceAll(/\{TileMatrix\}/gi,"{level}"),n=n.replaceAll(/\{TileRow\}/gi,"{row}"),n=n.replaceAll(/\{TileCol\}/gi,"{col}"),n=n.replaceAll(/\{dimensionValue\}/gi,e),n=n.replaceAll(/\{dimensionValue2\}/gi,o)}return n}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return he[r.toLowerCase()]&&(s=he[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){let t;if(this.resourceInfo)"KVP"===this.resourceInfo.serviceMode&&(this.url+=this.url.includes("?")?"":"?"),t={ssl:!1,data:this.resourceInfo};else try{t=await this._getCapabilities(this.serviceMode,e),Y(t.data)}catch{const r="KVP"===this.serviceMode?"RESTful":"KVP";try{t=await this._getCapabilities(r,e),Y(t.data),this.serviceMode=r}catch(e){throw new a.Z("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}this.resourceInfo?t.data=function(e){return e.layers.forEach((e=>{e.tileMatrixSets?.forEach((e=>{const t=e.tileInfo;t&&96!==t.dpi&&(t.lods?.forEach((r=>{r.scale=96*r.scale/t.dpi,r.resolution=de(t.spatialReference?.wkid,r.scale*q/96,e.id)})),t.dpi=96)}))})),e}(t.data):t.data=function(e,t){e=e.replaceAll(/ows:/gi,"");const r=(new DOMParser).parseFromString(e,"text/xml").documentElement,i=new Map,s=new Map,l=H("Contents",r);if(!l)throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid");const n=H("OperationsMetadata",r),o=n?.querySelector("[name='GetTile']"),u=o?.getElementsByTagName("Get"),c=u&&Array.prototype.slice.call(u),p=t.url?.indexOf("https"),d=void 0!==p&&p>-1;let h,m,y=t.serviceMode,f=t?.url;if(c&&c.length&&c.some((e=>{const t=H("Constraint",e);return!t||X("AllowedValues","Value",y,t)?(f=e.attributes[0].nodeValue,!0):(!t||X("AllowedValues","Value","RESTful",t)||X("AllowedValues","Value","REST",t)?m=e.attributes[0].nodeValue:t&&!X("AllowedValues","Value","KVP",t)||(h=e.attributes[0].nodeValue),!1)})),!f)if(m)f=m,y="RESTful";else if(h)f=h,y="KVP";else{const e=H("ServiceMetadataURL",r);f=e?.getAttribute("xlink:href")}const g=f.indexOf("1.0.0/");-1===g&&"RESTful"===y?f+="/":g>-1&&(f=f.substring(0,g)),"KVP"===y&&(f+=g>-1?"":"?"),d&&(f=f.replace(/^http:/i,"https:"));const w=Q("ServiceIdentification>ServiceTypeVersion",r),v=Q("ServiceIdentification>AccessConstraints",r),x=v&&/^none$/i.test(v)?null:v,b=J("Layer",l),S=J("TileMatrixSet",l),C=b.map((e=>{const t=Q("Identifier",e);return i.set(t,e),ee(t,e,S,d,w)}));return{copyright:x,dimensionMap:s,layerMap:i,layers:C,serviceMode:y,tileUrl:f}}(t.data,{serviceMode:this.serviceMode,url:this.url}),t.data&&this.read(t.data,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await(0,l.default)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){const t=this.findSublayerById(this.activeLayer.id),r=t?.tileMatrixSets?.find((t=>t.id===e));return r}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,u.d9)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=(0,m.mN)(e),i={...r.query,...t},s=(0,m.B7)(i);return""===s?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=this.url.split("?")[0];const t="KVP"===e?`${this.url}?request=GetCapabilities&service=WMTS&version=${this.version}`:`${this.url}/${this.version}/WMTSCapabilities.xml`;return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,m.mN)(e).query;if(!t)return null;const r={};return Object.keys(t).forEach((e=>{r[e.toLowerCase()]=t[e]})),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const t=Object.keys(r);t.length&&(e=e?(0,u.d9)(e):{},t.forEach((t=>{e.hasOwnProperty(t)||me.has(t)||(e[t]=r[t])})))}return e}};(0,s._)([(0,y.Cb)()],ye.prototype,"dimensionMap",void 0),(0,s._)([(0,y.Cb)()],ye.prototype,"layerMap",void 0),(0,s._)([(0,y.Cb)({type:Z,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],ye.prototype,"activeLayer",void 0),(0,s._)([(0,f.r)("service","activeLayer",["layers"])],ye.prototype,"readActiveLayerFromService",null),(0,s._)([(0,f.r)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],ye.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,s._)([(0,w.c)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:_.Z},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],ye.prototype,"writeActiveLayer",null),(0,s._)([(0,y.Cb)({type:String,value:"",json:{write:!0}})],ye.prototype,"copyright",void 0),(0,s._)([(0,y.Cb)({type:["show","hide"]})],ye.prototype,"listMode",void 0),(0,s._)([(0,y.Cb)({json:{read:!0,write:!0}})],ye.prototype,"blendMode",void 0),(0,s._)([(0,y.Cb)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],ye.prototype,"customParameters",void 0),(0,s._)([(0,f.r)(["portal-item","web-document"],"customParameters")],ye.prototype,"readCustomParameters",null),(0,s._)([(0,y.Cb)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],ye.prototype,"customLayerParameters",void 0),(0,s._)([(0,y.Cb)({type:v.Z,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],ye.prototype,"fullExtent",void 0),(0,s._)([(0,y.Cb)({readOnly:!0})],ye.prototype,"fullExtents",null),(0,s._)([(0,y.Cb)({type:["WebTiledLayer"]})],ye.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.Cb)()],ye.prototype,"resourceInfo",void 0),(0,s._)([(0,y.Cb)()],ye.prototype,"serviceMode",void 0),(0,s._)([(0,f.r)(["portal-item","web-document"],"serviceMode",["templateUrl"])],ye.prototype,"readServiceMode",null),(0,s._)([(0,y.Cb)({type:o.Z.ofType(Z)})],ye.prototype,"sublayers",void 0),(0,s._)([(0,f.r)("service","sublayers",["layers"])],ye.prototype,"readSublayersFromService",null),(0,s._)([(0,y.Cb)({readOnly:!0})],ye.prototype,"supportedSpatialReferences",null),(0,s._)([(0,y.Cb)({readOnly:!0})],ye.prototype,"tilemapCache",null),(0,s._)([(0,y.Cb)({json:{read:{source:"title"}}})],ye.prototype,"title",null),(0,s._)([(0,y.Cb)({json:{read:!1},readOnly:!0,value:"wmts"})],ye.prototype,"type",void 0),(0,s._)([(0,y.Cb)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],ye.prototype,"url",null),(0,s._)([(0,y.Cb)()],ye.prototype,"version",void 0),ye=ce=(0,s._)([(0,g.j)("esri.layers.WMTSLayer")],ye);const fe=ye},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},88724:(e,t,r)=>{function i(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{H:()=>s,h:()=>i})},42238:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),s=r(95330);class l{constructor(e,t=0,r=e.lods.length-1){this.tileInfo=e,this.minLOD=t,this.maxLOD=r}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){const i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,l){await(0,s.Yn)(l);const n=this.getAvailability(e,t,r);if("unavailable"===n)throw new i.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return n}async fetchAvailabilityUpsample(e,t,r,i,l){await(0,s.Yn)(l),i.level=e,i.row=t,i.col=r;const n=this.tileInfo;return n.updateTileInfo(i),this.fetchAvailability(e,t,r,l).catch((e=>{if((0,s.D_)(e))throw e;if(n.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,l);throw e}))}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2594],{17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>p,tX:()=>g});var i=r(91460),s=r(50758),l=r(70586),n=r(95330),o=r(26258);function a(e,t,r={}){return c(e,t,r,h)}function u(e,t,r={}){return c(e,t,r,m)}function c(e,t,r={},i){let s=null;const n=r.once?(e,r)=>{i(e)&&((0,l.hw)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,o.aQ)(e,n,r.sync,r.equals),r.initial){const t=e();n(t,t)}return s}function p(e,t,r,n={}){let o=null,u=null,c=null;function p(){o&&u&&(u.remove(),n.onListenerRemove?.(o),o=null,u=null)}function d(e){n.once&&n.once&&(0,l.hw)(c),r(e)}const h=a(e,((e,r)=>{p(),(0,i.vT)(e)&&(o=e,u=(0,i.on)(e,t,d),n.onListenerAdd?.(e))}),{sync:n.sync,initial:!0});return c=(0,s.kB)((()=>{h.remove(),p()})),c}function d(e,t){return function(e,t,r){if((0,n.Hc)(r))return Promise.reject((0,n.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let o=null;function a(){o=(0,l.hw)(o)}return new Promise(((i,l)=>{o=(0,s.AL)([(0,n.fu)(r,(()=>{a(),l((0,n.zE)())})),c(e,(e=>{a(),i(e)}),{sync:!1,once:!0},t??h)])}))}(e,m,t)}function h(e){return!0}function m(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},72594:(e,t,r)=>{r.r(t),r.d(t,{default:()=>fe});var i,s=r(43697),l=r(3172),n=r(67676),o=r(46791),a=r(20102),u=r(22974),c=r(16453),p=r(78286),d=r(95330),h=r(17445),m=r(81271),y=r(5600),f=(r(75215),r(71715)),g=r(52011),w=r(30556),v=r(6570),x=r(87085),b=r(16199),S=r(71612),C=r(38009),M=r(16859),I=r(34760),L=r(72965),T=r(90082),_=r(11145),P=r(42238),E=r(5833),A=r(96674);r(80442);let O=i=class extends A.wq{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new i;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo&&this.tileInfo.clone()),e}};(0,s._)([(0,y.Cb)({type:v.Z,json:{read:{source:"fullExtent"}}})],O.prototype,"fullExtent",void 0),(0,s._)([(0,y.Cb)({type:String,json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,s._)([(0,y.Cb)({type:_.Z,json:{read:{source:"tileInfo"}}})],O.prototype,"tileInfo",void 0),O=i=(0,s._)([(0,g.j)("esri.layer.support.TileMatrixSet")],O);const R=O;var F;let V=F=class extends A.wq{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s._)([(0,y.Cb)({json:{read:{source:"id"}}})],V.prototype,"id",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"title"}}})],V.prototype,"title",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"abstract"}}})],V.prototype,"description",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"legendUrl"}}})],V.prototype,"legendUrl",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"isDefault"}}})],V.prototype,"isDefault",void 0),(0,s._)([(0,y.Cb)({json:{read:{source:"keywords"}}})],V.prototype,"keywords",void 0),V=F=(0,s._)([(0,g.j)("esri.layer.support.WMTSStyle")],V);const j=V;var U;let N=U=class extends A.wq{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?v.Z.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map((e=>v.Z.fromJSON(e))):t.tileMatrixSets?.map((e=>v.Z.fromJSON(e.fullExtent))).filter((e=>e))??[]}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats&&this.imageFormats.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles?.at(0)?.id??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?this.tileMatrixSets.find((e=>e.id===this.tileMatrixSetId)):null}clone(){const e=new U;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats&&this.imageFormats.slice()),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent&&this.fullExtent.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles&&this.styles.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s._)([(0,y.Cb)()],N.prototype,"description",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"fullExtent",void 0),(0,s._)([(0,f.r)("fullExtent",["fullExtent"])],N.prototype,"readFullExtent",null),(0,s._)([(0,y.Cb)({readOnly:!0})],N.prototype,"fullExtents",void 0),(0,s._)([(0,f.r)("fullExtents",["fullExtents","tileMatrixSets"])],N.prototype,"readFullExtents",null),(0,s._)([(0,y.Cb)()],N.prototype,"id",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"imageFormat",null),(0,s._)([(0,y.Cb)({json:{read:{source:"formats"}}})],N.prototype,"imageFormats",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"layer",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"parent",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"styleId",null),(0,s._)([(0,y.Cb)({type:o.Z.ofType(j),json:{read:{source:"styles"}}})],N.prototype,"styles",void 0),(0,s._)([(0,y.Cb)({json:{write:{ignoreOrigin:!0}}})],N.prototype,"title",void 0),(0,s._)([(0,y.Cb)()],N.prototype,"tileMatrixSetId",void 0),(0,s._)([(0,y.Cb)({readOnly:!0})],N.prototype,"tileMatrixSet",null),(0,s._)([(0,y.Cb)({type:o.Z.ofType(R),json:{read:{source:"tileMatrixSets"}}})],N.prototype,"tileMatrixSets",void 0),N=U=(0,s._)([(0,g.j)("esri.layers.support.WMTSSublayer")],N);const Z=N;var D=r(2109),k=r(94139),W=r(58116),B=r(52162),K=r(88724),$=r(39450);const q=90.71428571428571;function Y(e){const t=e.replaceAll(/ows:/gi,"");if(!H("Contents",(new DOMParser).parseFromString(t,"text/xml").documentElement))throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant",{text:e})}function G(e){return e.nodeType===Node.ELEMENT_NODE}function H(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(G(i)&&i.nodeName===e)return i}return null}function J(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];G(s)&&s.nodeName===e&&r.push(s)}return r}function z(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];G(s)&&s.nodeName===e&&r.push(s)}return r.map((e=>e.textContent)).filter(n.pC)}function Q(e,t){return e.split(">").forEach((e=>{t&&(t=H(e,t))})),t&&t.textContent}function X(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some((i=>{if(i.nodeName.includes(e)){const e=H(t,i),l=e&&e.textContent;if(l===r||r.split(":")&&r.split(":")[1]===l)return s=i,!0}return!1})),s}function ee(e,t,r,i,s){const l=Q("Abstract",t),n=z("Format",t);return{id:e,fullExtent:re(t),fullExtents:ie(t),description:l,formats:n,styles:se(t,i),title:Q("Title",t),tileMatrixSets:le(s,t,r)}}function te(e,t){const r=[],i=e.layerMap?.get(t);if(!i)return null;const s=J("ResourceURL",i),l=J("Dimension",i);let n,o,a,u;return l.length&&(n=Q("Identifier",l[0]),o=z("Default",l[0])||z("Value",l[0])),l.length>1&&(a=Q("Identifier",l[1]),u=z("Default",l[1])||z("Value",l[1])),e.dimensionMap.set(t,{dimensions:o,dimensions2:u}),s.forEach((e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(n&&o.length)if(t.includes("{"+n+"}"))t=t.replace("{"+n+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+n.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue}"+t.substring(e+n.length+2))}if(a&&u.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.substring(0,e)+"{dimensionValue2}"+t.substring(e+a.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}})),r}function re(e){const t=H("WGS84BoundingBox",e),r=t?Q("LowerCorner",t).split(" "):["-180","-90"],i=t?Q("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function ie(e){const t=[];return(0,K.h)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const r=e.getAttribute("crs").toLowerCase(),i=ne(r),s=r.includes("epsg")&&(0,B.A)(i.wkid);let l,n,o,a;(0,K.h)(e,{LowerCorner:e=>{[l,n]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([l,n]=[n,l])},UpperCorner:e=>{[o,a]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([o,a]=[a,o])}}),t.push({xmin:l,ymin:n,xmax:o,ymax:a,spatialReference:i})}}),t}function se(e,t){return J("Style",e).map((e=>{const r=H("LegendURL",e),i=H("Keywords",e),s=i?z("Keyword",i):[];let l=r&&r.getAttribute("xlink:href");return t&&(l=l&&l.replace(/^http:/i,"https:")),{abstract:Q("Abstract",e),id:Q("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:Q("Title",e)}}))}function le(e,t,r){return J("TileMatrixSetLink",t).map((t=>function(e,t,r){const i=H("TileMatrixSet",t).textContent,s=z("TileMatrix",t),l=r.find((e=>{const t=H("Identifier",e),r=t&&t.textContent;return!!(r===i||i.split(":")&&i.split(":")[1]===r)})),n=H("TileMatrixSetLimits",t),o=n&&J("TileMatrixLimits",n),a=new Map;if(o?.length)for(const e of o){const t=H("TileMatrix",e).textContent,r=+H("MinTileRow",e).textContent,i=+H("MaxTileRow",e).textContent,s=+H("MinTileCol",e).textContent,l=+H("MaxTileCol",e).textContent;a.set(t,{minCol:s,maxCol:l,minRow:r,maxRow:i})}const u=Q("SupportedCRS",l).toLowerCase(),c=function(e,t){return oe(H("TileMatrix",e),t)}(l,u),p=c.spatialReference,d=H("TileMatrix",l),h=[parseInt(Q("TileWidth",d),10),parseInt(Q("TileHeight",d),10)],m=[];s.length?s.forEach(((e,t)=>{const r=X("TileMatrix","Identifier",e,l);m.push(pe(r,u,t,i,a))})):J("TileMatrix",l).forEach(((e,t)=>{m.push(pe(e,u,t,i,a))}));const y=function(e,t,r,i,s){const l=H("BoundingBox",t);let n,o,a,u,c,p;if(l&&(n=Q("LowerCorner",l).split(" "),o=Q("UpperCorner",l).split(" ")),n&&n.length>1&&o&&o.length>1)a=parseFloat(n[0]),c=parseFloat(n[1]),u=parseFloat(o[0]),p=parseFloat(o[1]);else{const e=H("TileMatrix",t),l=parseInt(Q("MatrixWidth",e),10),n=parseInt(Q("MatrixHeight",e),10);a=r.x,p=r.y,u=a+l*i[0]*s.resolution,c=p-n*i[1]*s.resolution}return function(e,t,r){return"1.0.0"===e&&(0,B.A)(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}(e,r.spatialReference,r)?new v.Z(c,a,p,u,r.spatialReference):new v.Z(a,c,u,p,r.spatialReference)}(e,l,c,h,m[0]).toJSON(),f=new _.Z({dpi:96,spatialReference:p,size:h,origin:c,lods:m}).toJSON();return{id:i,fullExtent:y,tileInfo:f}}(e,t,r)))}function ne(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const r=function(e){return e.includes("crs84")||e.includes("crs:84")?ae.CRS84:e.includes("crs83")||e.includes("crs:83")?ae.CRS83:e.includes("crs27")||e.includes("crs:27")?ae.CRS27:null}(e);return null!=r&&(t=r),{wkid:t}}function oe(e,t){const r=ne(t),[i,s]=Q("TopLeftCorner",e).split(" ").map((e=>parseFloat(e))),l=t.includes("epsg")&&(0,B.A)(r.wkid);return new k.Z(l?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}var ae,ue,ce;function pe(e,t,r,i,s){const l=ne(t),n=Q("Identifier",e);let o=parseFloat(Q("ScaleDenominator",e));const a=de(l.wkid,o,i);o*=96/q;const u=+Q("MatrixWidth",e),c=+Q("MatrixHeight",e),{maxCol:p=u-1,maxRow:d=c-1,minCol:h=0,minRow:m=0}=s.get(n)??{},{x:y,y:f}=oe(e,t);return new $.Z({cols:[h,p],level:r,levelValue:n,origin:[y,f],scale:o,resolution:a,rows:[m,d]})}function de(e,t,r){let i;return i=W.Z.hasOwnProperty(""+e)?W.Z.values[W.Z[e]]:"default028mm"===r?6370997*Math.PI/180:(0,D.e8)(e).metersPerDegree,7*t/25e3/i}(ue=ae||(ae={}))[ue.CRS84=4326]="CRS84",ue[ue.CRS83=4269]="CRS83",ue[ue.CRS27=4267]="CRS27";const he={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},me=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let ye=ce=class extends((0,S.h)((0,I.Q)((0,L.M)((0,C.q)((0,M.I)((0,c.R)(x.Z))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,h.YP)((()=>this.activeLayer),((e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)}),h.Z_),(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.layer=this,e.parent=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=null,e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=null,e.parent=null;if(e)for(const t of e)t.layer=this,t.parent=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.r9).then((()=>this._fetchService(e))).catch((e=>{throw(0,d.r9)(e),new a.Z("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})}))),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new Z);let i=t.layers.find((e=>e.id===this.activeLayer.id));return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,l=i?.layerIdentifier;let n=null;const o=i?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(n=o[0]):n=o);const a=s?.format,u=s?.style;return new Z({id:l,imageFormat:a,styleId:u,tileMatrixSetId:n})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,p.hS)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map((e=>{const r=new Z;return r.read(e,t),r}))}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map((e=>e.tileInfo?.spatialReference)).toArray().filter(n.pC)??[]}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new P.Z(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&"/"===e.substr(-1)?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId),i=r?.tileInfo,s=e.fullExtent,l=new E.B({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new b.default({fullExtent:s,urlTemplate:t,tileInfo:i,wmtsInfo:l})}async fetchTile(e,t,r,i={}){const{signal:s}=i,n=this.getTileUrl(e,t,r),{data:o}=await(0,l.default)(n,{responseType:"image",signal:s});return o}async fetchImageBitmapTile(e,t,r,i={}){const{signal:s}=i;if(this.fetchTile!==ce.prototype.fetchTile){const l=await this.fetchTile(e,t,r,i);return(0,T.V)(l,e,t,r,s)}const n=this.getTileUrl(e,t,r),{data:o}=await(0,l.default)(n,{responseType:"blob",signal:s});return(0,T.V)(o,e,t,r,s)}findSublayerById(e){return this.sublayers?.find((t=>t.id===e))}getTileUrl(e,t,r){const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=i?.tileInfo?.lods[e],l=s?s.levelValue||`${s.level}`:`${e}`;let n=this.resourceInfo?"":function(e,t,r,i,s,l,n,o){const a=function(e,t,r){const i=te(e,t),s=i?.filter((e=>e.format===r));return(s?.length?s:i)??[]}(e,t,i);if(!(a?.length>0))return"";const{dimensionMap:u}=e,c=u.get(t).dimensions?.[0],p=u.get(t).dimensions2?.[0];return a[n%a.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,l).replaceAll(/\{TileRow\}/gi,""+n).replaceAll(/\{TileCol\}/gi,""+o).replaceAll(/\{dimensionValue\}/gi,c).replaceAll(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,r);return n||(n=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`)),n=this._appendCustomLayerParameters(n),n}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const r=function(e,t,r,i){const{dimensionMap:s}=e,l=te(e,t);let n="";if(l&&l.length>0){const e=s.get(t).dimensions&&s.get(t).dimensions[0],o=s.get(t).dimensions2&&s.get(t).dimensions2[0];n=l[0].template,n.indexOf(".xxx")===n.length-4&&(n=n.slice(0,n.length-4)),n=n.replaceAll(/\{Style\}/gi,i),n=n.replaceAll(/\{TileMatrixSet\}/gi,r),n=n.replaceAll(/\{TileMatrix\}/gi,"{level}"),n=n.replaceAll(/\{TileRow\}/gi,"{row}"),n=n.replaceAll(/\{TileCol\}/gi,"{col}"),n=n.replaceAll(/\{dimensionValue\}/gi,e),n=n.replaceAll(/\{dimensionValue2\}/gi,o)}return n}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return he[r.toLowerCase()]&&(s=he[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){let t;if(this.resourceInfo)"KVP"===this.resourceInfo.serviceMode&&(this.url+=this.url.includes("?")?"":"?"),t={ssl:!1,data:this.resourceInfo};else try{t=await this._getCapabilities(this.serviceMode,e),Y(t.data)}catch{const r="KVP"===this.serviceMode?"RESTful":"KVP";try{t=await this._getCapabilities(r,e),Y(t.data),this.serviceMode=r}catch(e){throw new a.Z("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}this.resourceInfo?t.data=function(e){return e.layers.forEach((e=>{e.tileMatrixSets?.forEach((e=>{const t=e.tileInfo;t&&96!==t.dpi&&(t.lods?.forEach((r=>{r.scale=96*r.scale/t.dpi,r.resolution=de(t.spatialReference?.wkid,r.scale*q/96,e.id)})),t.dpi=96)}))})),e}(t.data):t.data=function(e,t){e=e.replaceAll(/ows:/gi,"");const r=(new DOMParser).parseFromString(e,"text/xml").documentElement,i=new Map,s=new Map,l=H("Contents",r);if(!l)throw new a.Z("wmtslayer:wmts-capabilities-xml-is-not-valid");const n=H("OperationsMetadata",r),o=n?.querySelector("[name='GetTile']"),u=o?.getElementsByTagName("Get"),c=u&&Array.prototype.slice.call(u),p=t.url?.indexOf("https"),d=void 0!==p&&p>-1;let h,m,y=t.serviceMode,f=t?.url;if(c&&c.length&&c.some((e=>{const t=H("Constraint",e);return!t||X("AllowedValues","Value",y,t)?(f=e.attributes[0].nodeValue,!0):(!t||X("AllowedValues","Value","RESTful",t)||X("AllowedValues","Value","REST",t)?m=e.attributes[0].nodeValue:t&&!X("AllowedValues","Value","KVP",t)||(h=e.attributes[0].nodeValue),!1)})),!f)if(m)f=m,y="RESTful";else if(h)f=h,y="KVP";else{const e=H("ServiceMetadataURL",r);f=e?.getAttribute("xlink:href")}const g=f.indexOf("1.0.0/");-1===g&&"RESTful"===y?f+="/":g>-1&&(f=f.substring(0,g)),"KVP"===y&&(f+=g>-1?"":"?"),d&&(f=f.replace(/^http:/i,"https:"));const w=Q("ServiceIdentification>ServiceTypeVersion",r),v=Q("ServiceIdentification>AccessConstraints",r),x=v&&/^none$/i.test(v)?null:v,b=J("Layer",l),S=J("TileMatrixSet",l),C=b.map((e=>{const t=Q("Identifier",e);return i.set(t,e),ee(t,e,S,d,w)}));return{copyright:x,dimensionMap:s,layerMap:i,layers:C,serviceMode:y,tileUrl:f}}(t.data,{serviceMode:this.serviceMode,url:this.url}),t.data&&this.read(t.data,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await(0,l.default)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){const t=this.findSublayerById(this.activeLayer.id),r=t?.tileMatrixSets?.find((t=>t.id===e));return r}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,u.d9)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=(0,m.mN)(e),i={...r.query,...t},s=(0,m.B7)(i);return""===s?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=this.url.split("?")[0];const t="KVP"===e?`${this.url}?request=GetCapabilities&service=WMTS&version=${this.version}`:`${this.url}/${this.version}/WMTSCapabilities.xml`;return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,m.mN)(e).query;if(!t)return null;const r={};return Object.keys(t).forEach((e=>{r[e.toLowerCase()]=t[e]})),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const t=Object.keys(r);t.length&&(e=e?(0,u.d9)(e):{},t.forEach((t=>{e.hasOwnProperty(t)||me.has(t)||(e[t]=r[t])})))}return e}};(0,s._)([(0,y.Cb)()],ye.prototype,"dimensionMap",void 0),(0,s._)([(0,y.Cb)()],ye.prototype,"layerMap",void 0),(0,s._)([(0,y.Cb)({type:Z,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],ye.prototype,"activeLayer",void 0),(0,s._)([(0,f.r)("service","activeLayer",["layers"])],ye.prototype,"readActiveLayerFromService",null),(0,s._)([(0,f.r)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],ye.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,s._)([(0,w.c)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:_.Z},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],ye.prototype,"writeActiveLayer",null),(0,s._)([(0,y.Cb)({type:String,value:"",json:{write:!0}})],ye.prototype,"copyright",void 0),(0,s._)([(0,y.Cb)({type:["show","hide"]})],ye.prototype,"listMode",void 0),(0,s._)([(0,y.Cb)({json:{read:!0,write:!0}})],ye.prototype,"blendMode",void 0),(0,s._)([(0,y.Cb)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],ye.prototype,"customParameters",void 0),(0,s._)([(0,f.r)(["portal-item","web-document"],"customParameters")],ye.prototype,"readCustomParameters",null),(0,s._)([(0,y.Cb)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],ye.prototype,"customLayerParameters",void 0),(0,s._)([(0,y.Cb)({type:v.Z,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],ye.prototype,"fullExtent",void 0),(0,s._)([(0,y.Cb)({readOnly:!0})],ye.prototype,"fullExtents",null),(0,s._)([(0,y.Cb)({type:["WebTiledLayer"]})],ye.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.Cb)()],ye.prototype,"resourceInfo",void 0),(0,s._)([(0,y.Cb)()],ye.prototype,"serviceMode",void 0),(0,s._)([(0,f.r)(["portal-item","web-document"],"serviceMode",["templateUrl"])],ye.prototype,"readServiceMode",null),(0,s._)([(0,y.Cb)({type:o.Z.ofType(Z)})],ye.prototype,"sublayers",void 0),(0,s._)([(0,f.r)("service","sublayers",["layers"])],ye.prototype,"readSublayersFromService",null),(0,s._)([(0,y.Cb)({readOnly:!0})],ye.prototype,"supportedSpatialReferences",null),(0,s._)([(0,y.Cb)({readOnly:!0})],ye.prototype,"tilemapCache",null),(0,s._)([(0,y.Cb)({json:{read:{source:"title"}}})],ye.prototype,"title",null),(0,s._)([(0,y.Cb)({json:{read:!1},readOnly:!0,value:"wmts"})],ye.prototype,"type",void 0),(0,s._)([(0,y.Cb)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],ye.prototype,"url",null),(0,s._)([(0,y.Cb)()],ye.prototype,"version",void 0),ye=ce=(0,s._)([(0,g.j)("esri.layers.WMTSLayer")],ye);const fe=ye},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},88724:(e,t,r)=>{function i(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{H:()=>s,h:()=>i})},42238:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),s=r(95330);class l{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){const i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,l){await(0,s.Yn)(l);const n=this.getAvailability(e,t,r);if("unavailable"===n)throw new i.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return n}async fetchAvailabilityUpsample(e,t,r,i,l){await(0,s.Yn)(l),i.level=e,i.row=t,i.col=r;const n=this.tileInfo;return n.updateTileInfo(i),this.fetchAvailability(e,t,r,l).catch((e=>{if((0,s.D_)(e))throw e;if(n.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,l);throw e}))}}}}]);