@arcgis/core 5.2.0-next.160 → 5.2.0-next.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{15bcf7cfe603f2ee1a24.js → 28104681ba161967039f.js} +1 -1
- package/assets/esri/core/workers/chunks/{842893e75696428d536f.js → 3b0808ee3c4facfaca3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{eebbde81e56d69dc602f.js → 44f90e75c1dc3d726a95.js} +1 -1
- package/assets/esri/core/workers/chunks/{4eae066673484986d4c1.js → 4ed76fb5f6096a089f5b.js} +1 -1
- package/assets/esri/core/workers/chunks/5daa9429808ca31279f2.js +1 -0
- package/assets/esri/core/workers/chunks/83f29a159b8b5197e76a.js +1 -0
- package/assets/esri/core/workers/chunks/{77ebacfdf8e57f2e03f1.js → 8480fe6b4372dbbfa7cc.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d77c8c59b0118c7e77b.js → 85bba551057366cd00ae.js} +1 -1
- package/assets/esri/core/workers/chunks/a2fcbc494333376192aa.js +1 -0
- package/assets/esri/core/workers/chunks/{f1df76f098a3cc924832.js → b5df193c93e9c19f9700.js} +1 -1
- package/assets/esri/core/workers/chunks/{02f8654852d389583891.js → e04fb83ab2634bc15cc7.js} +1 -1
- package/assets/esri/core/workers/chunks/f74ae0eff3f08978e607.js +1 -0
- package/chunks/RibbonLine.glsl.js +69 -83
- package/config.d.ts +62 -34
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/workers/Connection.d.ts +58 -89
- package/core/workers.d.ts +45 -54
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/ray.js +1 -1
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/package.json +2 -2
- package/rest/print.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/DragZoom.js +1 -1
- package/views/3d/input/handlers/MouseWheelFov.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/extrudePolygon.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
- package/views/interactive/editGeometry/operations/ScaleVertex.js +1 -1
- package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Search/LocatorSearchSource.d.ts +22 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +2 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.d.ts +2 -0
- package/widgets/support/SelectionList/ItemBase.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/7d212c415f2709037408.js +0 -1
- package/assets/esri/core/workers/chunks/abb9e820d2871fa7acae.js +0 -1
- package/assets/esri/core/workers/chunks/ade5fdcd08dcbac74740.js +0 -1
- package/assets/esri/core/workers/chunks/b390b9cde2884755e8be.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1588],{79608(t,n,e){e.d(n,{A:()=>f});var r=e(32198),a=e(69540),i=e(91429);let o=class extends a.Pw{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r.Cg)([(0,i.MZ)()],o.prototype,"type",void 0),o=(0,r.Cg)([(0,i.$K)("esri.analysis.support.AnalysisOriginWebScene")],o);const u=o;var s=e(69622),c=e(4902),l=e(25482);let h=0,f=class extends((0,l.T)((0,a.OU)((0,c.s)(s.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){let n=this.parent;if(null!=n)switch(n.type){case"line-of-sight":case"dimension":case"viewshed":n.releaseAnalysis(this);break;case"2d":case"3d":n.analyses.includes(this)&&n.analyses.remove(this)}this._set("parent",t)}equals(t){return this.type===t.type}};(0,r.Cg)([(0,i.MZ)({type:String,constructOnly:!0,clonable:!1})],f.prototype,"id",void 0),(0,r.Cg)([(0,i.MZ)({clonable:!1,value:null})],f.prototype,"parent",null),(0,r.Cg)([(0,i.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":u}}})],f.prototype,"origin",void 0),f=(0,r.Cg)([(0,i.$K)("esri.analysis.Analysis")],f)},91715(t,n,e){e.d(n,{xH:()=>i,N1:()=>u}),e(35522);var r=e(51850),a=e(71351);function i(t,n){return o(t)===o(n)}function o(t){if(null==t)return null;let n=null==t.layer?"":t.layer.id,e=null;return e=null==t.objectId?null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid:t.objectId,null==e?null:`o-${n}-${e}`}e(44208),e(58083),e(70328),e(77548),e(6867),e(49718),(0,r.vt)();const u={json:{write:{writer:function(t,n){null!=t?.layer?.objectIdField&&null!=t.attributes&&(n.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}},clonable:"reference"};(0,a.vt)(),(0,r.vt)()},80200(t,n,e){e.d(n,{d:()=>h});const r={Base64:0,Hex:1,String:2,Raw:3};function a(t,n){let e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}function i(t,n,e,r,i,o){return a(function(t,n){return t<<n|t>>>32-n}(a(a(n,t),a(r,o)),i),e)}function o(t,n,e,r,a,o,u){return i(n&e|~n&r,t,n,a,o,u)}function u(t,n,e,r,a,o,u){return i(n&r|e&~r,t,n,a,o,u)}function s(t,n,e,r,a,o,u){return i(n^e^r,t,n,a,o,u)}function c(t,n,e,r,a,o,u){return i(e^(n|~r),t,n,a,o,u)}function l(t,n){t[n>>5]|=128<<n%32,t[14+(n+64>>>9<<4)]=n;let e=1732584193,r=-271733879,i=-1732584194,l=271733878;for(let n=0;n<t.length;n+=16){let h=e,f=r,d=i,M=l;e=o(e,r,i,l,t[n],7,-680876936),l=o(l,e,r,i,t[n+1],12,-389564586),i=o(i,l,e,r,t[n+2],17,606105819),r=o(r,i,l,e,t[n+3],22,-1044525330),e=o(e,r,i,l,t[n+4],7,-176418897),l=o(l,e,r,i,t[n+5],12,1200080426),i=o(i,l,e,r,t[n+6],17,-1473231341),r=o(r,i,l,e,t[n+7],22,-45705983),e=o(e,r,i,l,t[n+8],7,1770035416),l=o(l,e,r,i,t[n+9],12,-1958414417),i=o(i,l,e,r,t[n+10],17,-42063),r=o(r,i,l,e,t[n+11],22,-1990404162),e=o(e,r,i,l,t[n+12],7,1804603682),l=o(l,e,r,i,t[n+13],12,-40341101),i=o(i,l,e,r,t[n+14],17,-1502002290),r=o(r,i,l,e,t[n+15],22,1236535329),e=u(e,r,i,l,t[n+1],5,-165796510),l=u(l,e,r,i,t[n+6],9,-1069501632),i=u(i,l,e,r,t[n+11],14,643717713),r=u(r,i,l,e,t[n],20,-373897302),e=u(e,r,i,l,t[n+5],5,-701558691),l=u(l,e,r,i,t[n+10],9,38016083),i=u(i,l,e,r,t[n+15],14,-660478335),r=u(r,i,l,e,t[n+4],20,-405537848),e=u(e,r,i,l,t[n+9],5,568446438),l=u(l,e,r,i,t[n+14],9,-1019803690),i=u(i,l,e,r,t[n+3],14,-187363961),r=u(r,i,l,e,t[n+8],20,1163531501),e=u(e,r,i,l,t[n+13],5,-1444681467),l=u(l,e,r,i,t[n+2],9,-51403784),i=u(i,l,e,r,t[n+7],14,1735328473),r=u(r,i,l,e,t[n+12],20,-1926607734),e=s(e,r,i,l,t[n+5],4,-378558),l=s(l,e,r,i,t[n+8],11,-2022574463),i=s(i,l,e,r,t[n+11],16,1839030562),r=s(r,i,l,e,t[n+14],23,-35309556),e=s(e,r,i,l,t[n+1],4,-1530992060),l=s(l,e,r,i,t[n+4],11,1272893353),i=s(i,l,e,r,t[n+7],16,-155497632),r=s(r,i,l,e,t[n+10],23,-1094730640),e=s(e,r,i,l,t[n+13],4,681279174),l=s(l,e,r,i,t[n],11,-358537222),i=s(i,l,e,r,t[n+3],16,-722521979),r=s(r,i,l,e,t[n+6],23,76029189),e=s(e,r,i,l,t[n+9],4,-640364487),l=s(l,e,r,i,t[n+12],11,-421815835),i=s(i,l,e,r,t[n+15],16,530742520),r=s(r,i,l,e,t[n+2],23,-995338651),e=c(e,r,i,l,t[n],6,-198630844),l=c(l,e,r,i,t[n+7],10,1126891415),i=c(i,l,e,r,t[n+14],15,-1416354905),r=c(r,i,l,e,t[n+5],21,-57434055),e=c(e,r,i,l,t[n+12],6,1700485571),l=c(l,e,r,i,t[n+3],10,-1894986606),i=c(i,l,e,r,t[n+10],15,-1051523),r=c(r,i,l,e,t[n+1],21,-2054922799),e=c(e,r,i,l,t[n+8],6,1873313359),l=c(l,e,r,i,t[n+15],10,-30611744),i=c(i,l,e,r,t[n+6],15,-1560198380),r=c(r,i,l,e,t[n+13],21,1309151649),e=c(e,r,i,l,t[n+4],6,-145523070),l=c(l,e,r,i,t[n+11],10,-1120210379),i=c(i,l,e,r,t[n+2],15,718787259),r=c(r,i,l,e,t[n+9],21,-343485551),e=a(e,h),r=a(r,f),i=a(i,d),l=a(l,M)}return[e,r,i,l]}function h(t,n=r.Hex){let e=n||r.Base64,a=l(function(t){let n=[];for(let e=0,r=8*t.length;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}(t),8*t.length);switch(e){case r.Raw:return a;case r.Hex:return function(t){let n="0123456789abcdef",e=[];for(let r=0,a=4*t.length;r<a;r++)e.push(n.charAt(t[r>>2]>>r%4*8+4&15)+n.charAt(t[r>>2]>>r%4*8&15));return e.join("")}(a);case r.String:return function(t){let n=[];for(let e=0,r=32*t.length;e<r;e+=8)n.push(String.fromCharCode(t[e>>5]>>>e%32&255));return n.join("")}(a);case r.Base64:return function(t){let n=[];for(let e=0,r=4*t.length;e<r;e+=3){let r=(t[e>>2]>>e%4*8&255)<<16|(t[e+1>>2]>>(e+1)%4*8&255)<<8|t[e+2>>2]>>(e+2)%4*8&255;for(let a=0;a<4;a++)8*e+6*a>32*t.length?n.push("="):n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-a)&63))}return n.join("")}(a)}}e.d(n,["T",0,r])},4341(t,n,e){e.d(n,{I:()=>a});var r=e(26390);class a{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},87024(t,n,e){e.d(n,{P:()=>d});var r=e(49186),a=e(80200),i=e(76553),o=e(84952),u=e(13069),s=e(96156),c=e(35666),l=e(10107),h=e(85648),f=e(97159);function d(t){let n=t?.origins??[void 0];return(e,r)=>{let a=function(t,n,e){if("resource"===t?.type)return function(t,n,e){let r=(0,s.z4)(n,e);return{type:String,read:(t,n,e)=>{let a=(0,f.r)(t,n,e);return r.type===String?a:"function"==typeof r.type?new r.type({url:a}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(n,a,u,s){if(!s?.resources)return"string"==typeof n?void(a[u]=(0,f.t)(n,s)):void(a[u]=n.write({},s));let l=function(t){return null==t?null:"string"==typeof t?t:t.url}(n),d=(0,f.t)(l,{...s,verifyItemRelativeUrls:s?.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),g=r.type!==String&&(!(0,i.H)(this)||s?.origin&&this.originIdOf(e)>(0,c.aB)(s.origin)),b={object:this,propertyName:e,value:n,targetUrl:d,dest:a,targetPropertyName:u,context:s,params:t};s?.portalItem&&d&&!(0,o.oP)(d)?g&&t?.contentAddressed?M(b):g?function(t){let{context:n,targetUrl:e,params:r,value:a,dest:i,targetPropertyName:u}=t;if(!n.portalItem)return;let s=n.portalItem.resourceFromPath(e),c=p(a,e,n),l=(0,h.n)(c),f=(0,o.Zo)(s.path),d=r?.compress??!1;l===f?(n.resources&&m({...t,resource:s,content:c,compress:d,updates:n.resources.toUpdate}),i[u]=e):M(t)}(b):function({context:t,targetUrl:n,dest:e,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n),compress:!1}),e[r]=n)}(b):s?.portalItem&&(null==d||null!=(0,f.i)(d)||(0,o.w8)(d)||g)?M(b):a[u]=d}}}}(t,n,e);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:t,write:n}=f.b;return{read:t,write:n}}}}(t,e,r);for(let t of n){let n=(0,l.rM)(e,t,r);for(let t in a)n[t]=a[t]}}}function M(t){let{targetUrl:n,params:e,value:i,context:s,dest:c,targetPropertyName:l}=t;if(!s.portalItem)return;let d=(0,f.p)(n),M=p(i,n,s);if(e?.contentAddressed&&"json"!==M.type)return void s.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${l}" is trying to serializing a resource with content of type ${M.type} with content addressing. Content addressing is only supported for json resources.`,{content:M}));let g=e?.contentAddressed&&"json"===M.type?(0,a.d)(M.jsonString):d?.filename??(0,u.lk)(),b=e?.prefix??d?.prefix,y=(0,o.fj)(b,g),v=`${y}.${(0,h.n)(M)}`;if(e?.contentAddressed&&s.resources&&"json"===M.type){let t=s.resources.toKeep.find(({resource:t})=>t.path===v)??s.resources.toAdd.find(({resource:t})=>t.path===v);if(t)return void(c[l]=t.resource.itemRelativeUrl)}let _=s.portalItem.resourceFromPath(v);(0,o.w8)(n)&&s.resources&&s.resources.pendingOperations.push((0,o.tk)(n).then(t=>{_.path=`${y}.${(0,h.n)({type:"blob",blob:t})}`,c[l]=_.itemRelativeUrl}).catch(()=>{}));let x=e?.compress??!1;s.resources&&m({...t,resource:_,content:M,compress:x,updates:s.resources.toAdd}),c[l]=_.itemRelativeUrl}function m({object:t,propertyName:n,updates:e,resource:r,content:a,compress:i}){e.push({resource:r,content:a,compress:i,finish:e=>{!function(t,n,e){"string"==typeof t[n]?t[n]=e.url:t[n].url=e.url}(t,n,e)}})}function p(t,n,e){return"string"==typeof t?{type:"url",url:n}:{type:"json",jsonString:JSON.stringify(t.toJSON(e))}}},62885(t,n,e){e.d(n,{H:()=>i,V:()=>a});var r=e(7762);function a(t,n,e=r.A){return n||=new e,n===t||n.destroyed||(n.removeAll(),(a=t)&&(Array.isArray(a)||"items"in a&&Array.isArray(a.items))?n.addMany(t):t&&n.add(t)),n;var a}function i(t){return t}},9093(t,n,e){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t){return[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]]}e.d(n,{o8:()=>a,vt:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m){return[t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},82534(t,n,e){function r(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>a,vt:()=>r});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},48163(t,n,e){function r(){return[0,0]}function a(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function o(){return i(1,1)}function u(){return i(-1,-1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{fA:()=>i,o8:()=>a,vt:()=>r});const l=o(),h=u(),f=s(),d=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:h,ONES:l,UNIT_X:f,UNIT_Y:d,ZEROS:[0,0],clone:a,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){let e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,negativeOnes:u,ones:o,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["IA",0,h,"Un",0,l])},91829(t,n,e){function r(){return[0,0,0,0]}function a(t,n,e,r){return[t,n,e,r]}function i(){return a(1,1,1,1)}function o(){return a(1,0,0,0)}function u(){return a(0,1,0,0)}function s(){return a(0,0,1,0)}function c(){return a(0,0,0,1)}e.d(n,{_Y:()=>c,fA:()=>a,vt:()=>r});const l=[0,0,0,0],h=i(),f=o(),d=u(),M=s(),m=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:m,UNIT_X:f,UNIT_Y:d,UNIT_Z:M,ZEROS:l,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:function(t,n,e,r){return[t,n,e,r]},fromArray:function(t,n=[0,0,0,0]){let e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:a,ones:i,unitW:c,unitX:o,unitY:u,unitZ:s,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["Un",0,h,"uY",0,l])},58083(t,n,e){e.d(n,{$0:()=>g,$h:()=>q,B8:()=>l,C:()=>i,D_:()=>u,N9:()=>y,O7:()=>A,Qw:()=>c,Tl:()=>f,X_:()=>I,e$:()=>M,eL:()=>m,hM:()=>b,hZ:()=>o,hs:()=>d,kN:()=>p,l:()=>w,lw:()=>h,mg:()=>s,o1:()=>j,sC:()=>x,t2:()=>P,t5:()=>S,tZ:()=>R,ut:()=>C});var r=e(51850),a=e(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function o(t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m,p){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=i,t[5]=o,t[6]=u,t[7]=s,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=M,t[14]=m,t[15]=p,t}function u(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 s(t,n){if(t===n){let e=n[1],r=n[2],a=n[3],i=n[6],o=n[7],u=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=i,t[11]=n[14],t[12]=a,t[13]=o,t[14]=u}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function c(t,n){return l(t,n)||u(t),t}function l(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],l=n[8],h=n[9],f=n[10],d=n[11],M=n[12],m=n[13],p=n[14],g=n[15],b=e*u-r*o,y=e*s-a*o,v=e*c-i*o,_=r*s-a*u,x=r*c-i*u,I=a*c-i*s,w=l*m-h*M,j=l*p-f*M,A=l*g-d*M,q=h*p-f*m,S=h*g-d*m,O=f*g-d*p,P=b*O-y*S+v*q+_*A-x*j+I*w;return P?(P=1/P,t[0]=(u*O-s*S+c*q)*P,t[1]=(a*S-r*O-i*q)*P,t[2]=(m*I-p*x+g*_)*P,t[3]=(f*x-h*I-d*_)*P,t[4]=(s*A-o*O-c*j)*P,t[5]=(e*O-a*A+i*j)*P,t[6]=(p*v-M*I-g*y)*P,t[7]=(l*I-f*v+d*y)*P,t[8]=(o*S-u*A+c*w)*P,t[9]=(r*A-e*S-i*w)*P,t[10]=(M*x-m*v+g*b)*P,t[11]=(h*v-l*x-d*b)*P,t[12]=(u*j-o*q-s*w)*P,t[13]=(e*q-r*j+a*w)*P,t[14]=(m*y-M*_-p*b)*P,t[15]=(l*_-h*y+f*b)*P,t):null}function h(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],l=n[7],h=n[8],f=n[9],d=n[10],M=n[11],m=n[12],p=n[13],g=n[14],b=n[15],y=e[0],v=e[1],_=e[2],x=e[3];return t[0]=y*r+v*u+_*h+x*m,t[1]=y*a+v*s+_*f+x*p,t[2]=y*i+v*c+_*d+x*g,t[3]=y*o+v*l+_*M+x*b,y=e[4],v=e[5],_=e[6],x=e[7],t[4]=y*r+v*u+_*h+x*m,t[5]=y*a+v*s+_*f+x*p,t[6]=y*i+v*c+_*d+x*g,t[7]=y*o+v*l+_*M+x*b,y=e[8],v=e[9],_=e[10],x=e[11],t[8]=y*r+v*u+_*h+x*m,t[9]=y*a+v*s+_*f+x*p,t[10]=y*i+v*c+_*d+x*g,t[11]=y*o+v*l+_*M+x*b,y=e[12],v=e[13],_=e[14],x=e[15],t[12]=y*r+v*u+_*h+x*m,t[13]=y*a+v*s+_*f+x*p,t[14]=y*i+v*c+_*d+x*g,t[15]=y*o+v*l+_*M+x*b,t}function f(t,n,e){let r=e[0],a=e[1],i=e[2];if(n===t)t[12]=n[0]*r+n[4]*a+n[8]*i+n[12],t[13]=n[1]*r+n[5]*a+n[9]*i+n[13],t[14]=n[2]*r+n[6]*a+n[10]*i+n[14],t[15]=n[3]*r+n[7]*a+n[11]*i+n[15];else{let e=n[0],o=n[1],u=n[2],s=n[3],c=n[4],l=n[5],h=n[6],f=n[7],d=n[8],M=n[9],m=n[10],p=n[11];t[0]=e,t[1]=o,t[2]=u,t[3]=s,t[4]=c,t[5]=l,t[6]=h,t[7]=f,t[8]=d,t[9]=M,t[10]=m,t[11]=p,t[12]=e*r+c*a+d*i+n[12],t[13]=o*r+l*a+M*i+n[13],t[14]=u*r+h*a+m*i+n[14],t[15]=s*r+f*a+p*i+n[15]}return t}function d(t,n,e){let r=e[0],a=e[1],i=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*i,t[9]=n[9]*i,t[10]=n[10]*i,t[11]=n[11]*i,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function M(t,n,e,r){let o=r[0],u=r[1],s=r[2],c=Math.sqrt(o*o+u*u+s*s);if(c<=(0,a.FD)())return void i(t,n);c=1/c,o*=c,u*=c,s*=c;let l=Math.sin(e),h=Math.cos(e),f=1-h,d=n[0],M=n[1],m=n[2],p=n[3],g=n[4],b=n[5],y=n[6],v=n[7],_=n[8],x=n[9],I=n[10],w=n[11],j=o*o*f+h,A=u*o*f+s*l,q=s*o*f-u*l,S=o*u*f-s*l,O=u*u*f+h,P=s*u*f+o*l,C=o*s*f+u*l,R=u*s*f-o*l,T=s*s*f+h;t[0]=d*j+g*A+_*q,t[1]=M*j+b*A+x*q,t[2]=m*j+y*A+I*q,t[3]=p*j+v*A+w*q,t[4]=d*S+g*O+_*P,t[5]=M*S+b*O+x*P,t[6]=m*S+y*O+I*P,t[7]=p*S+v*O+w*P,t[8]=d*C+g*R+_*T,t[9]=M*C+b*R+x*T,t[10]=m*C+y*R+I*T,t[11]=p*C+v*R+w*T,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15])}function m(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[4],o=n[5],u=n[6],s=n[7],c=n[8],l=n[9],h=n[10],f=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=i*a+c*r,t[5]=o*a+l*r,t[6]=u*a+h*r,t[7]=s*a+f*r,t[8]=c*a-i*r,t[9]=l*a-o*r,t[10]=h*a-u*r,t[11]=f*a-s*r,t}function p(t,n){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]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function g(t,n,e){if(0===n)return u(t);let r=e[0],i=e[1],o=e[2],s=Math.sqrt(r*r+i*i+o*o);if(s<=(0,a.FD)())return null;s=1/s,r*=s,i*=s,o*=s;let c=Math.sin(n),l=Math.cos(n),h=1-l;return t[0]=r*r*h+l,t[1]=i*r*h+o*c,t[2]=o*r*h-i*c,t[3]=0,t[4]=r*i*h-o*c,t[5]=i*i*h+l,t[6]=o*i*h+r*c,t[7]=0,t[8]=r*o*h+i*c,t[9]=i*o*h-r*c,t[10]=o*o*h+l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,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 v(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3],u=r+r,s=a+a,c=i+i,l=r*u,h=r*s,f=r*c,d=a*s,M=a*c,m=i*c,p=o*u,g=o*s,b=o*c;return t[0]=1-(d+m),t[1]=h+b,t[2]=f-g,t[3]=0,t[4]=h-b,t[5]=1-(l+m),t[6]=M+p,t[7]=0,t[8]=f+g,t[9]=M-p,t[10]=1-(l+d),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}const _=(0,r.vt)();function x(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function I(t,n){let e=n[0],r=n[1],a=n[2],i=n[4],o=n[5],u=n[6],s=n[8],c=n[9],l=n[10];return t[0]=Math.sqrt(e*e+r*r+a*a),t[1]=Math.sqrt(i*i+o*o+u*u),t[2]=Math.sqrt(s*s+c*c+l*l),t}function w(t,n){let e=n[0]+n[5]+n[10],r=0;return e>0?(r=2*Math.sqrt(e+1),t[3]=.25*r,t[0]=(n[6]-n[9])/r,t[1]=(n[8]-n[2])/r,t[2]=(n[1]-n[4])/r):n[0]>n[5]&&n[0]>n[10]?(r=2*Math.sqrt(1+n[0]-n[5]-n[10]),t[3]=(n[6]-n[9])/r,t[0]=.25*r,t[1]=(n[1]+n[4])/r,t[2]=(n[8]+n[2])/r):n[5]>n[10]?(r=2*Math.sqrt(1+n[5]-n[0]-n[10]),t[3]=(n[8]-n[2])/r,t[0]=(n[1]+n[4])/r,t[1]=.25*r,t[2]=(n[6]+n[9])/r):(r=2*Math.sqrt(1+n[10]-n[0]-n[5]),t[3]=(n[1]-n[4])/r,t[0]=(n[8]+n[2])/r,t[1]=(n[6]+n[9])/r,t[2]=.25*r),t}function j(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=n[3],s=a+a,c=i+i,l=o+o,h=a*s,f=a*c,d=a*l,M=i*c,m=i*l,p=o*l,g=u*s,b=u*c,y=u*l,v=r[0],_=r[1],x=r[2];return t[0]=(1-(M+p))*v,t[1]=(f+y)*v,t[2]=(d-b)*v,t[3]=0,t[4]=(f-y)*_,t[5]=(1-(h+p))*_,t[6]=(m+g)*_,t[7]=0,t[8]=(d+b)*x,t[9]=(m-g)*x,t[10]=(1-(h+M))*x,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function A(t,n,e,r,a){let i=n[0],o=n[1],u=n[2],s=n[3],c=i+i,l=o+o,h=u+u,f=i*c,d=i*l,M=i*h,m=o*l,p=o*h,g=u*h,b=s*c,y=s*l,v=s*h,_=r[0],x=r[1],I=r[2],w=a[0],j=a[1],A=a[2],q=(1-(m+g))*_,S=(d+v)*_,O=(M-y)*_,P=(d-v)*x,C=(1-(f+g))*x,R=(p+b)*x,T=(M+y)*I,D=(p-b)*I,U=(1-(f+m))*I;return t[0]=q,t[1]=S,t[2]=O,t[3]=0,t[4]=P,t[5]=C,t[6]=R,t[7]=0,t[8]=T,t[9]=D,t[10]=U,t[11]=0,t[12]=e[0]+w-(q*w+P*j+T*A),t[13]=e[1]+j-(S*w+C*j+D*A),t[14]=e[2]+A-(O*w+R*j+U*A),t[15]=1,t}function q(t,n,e,r,a,i,o){let u=1/(e-n),s=1/(a-r),c=1/(i-o);return t[0]=2*i*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*s,t[6]=0,t[7]=0,t[8]=(e+n)*u,t[9]=(a+r)*s,t[10]=(o+i)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*c,t[15]=0,t}function S(t,n,e,r){let i=n[0],o=n[1],s=n[2],c=i-e[0],l=o-e[1],h=s-e[2],f=(0,a.FD)();if(Math.abs(c)<f&&Math.abs(l)<f&&Math.abs(h)<f)return void u(t);let d=1/Math.sqrt(c*c+l*l+h*h);c*=d,l*=d,h*=d;let M=r[0],m=r[1],p=r[2],g=m*h-p*l,b=p*c-M*h,y=M*l-m*c;d=Math.sqrt(g*g+b*b+y*y),d?(d=1/d,g*=d,b*=d,y*=d):(g=0,b=0,y=0);let v=l*y-h*b,_=h*g-c*y,x=c*b-l*g;d=Math.sqrt(v*v+_*_+x*x),d?(d=1/d,v*=d,_*=d,x*=d):(v=0,_=0,x=0),t[0]=g,t[1]=v,t[2]=c,t[3]=0,t[4]=b,t[5]=_,t[6]=l,t[7]=0,t[8]=y,t[9]=x,t[10]=h,t[11]=0,t[12]=-(g*i+b*o+y*s),t[13]=-(v*i+_*o+x*s),t[14]=-(c*i+l*o+h*s),t[15]=1}function O(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function P(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function C(t){let n=(0,a.FD)(),e=t[0],r=t[1],i=t[2],o=t[4],u=t[5],s=t[6],c=t[8],l=t[9],h=t[10];return Math.abs(1-(e*e+o*o+c*c))<=n&&Math.abs(1-(r*r+u*u+l*l))<=n&&Math.abs(1-(i*i+s*s+h*h))<=n}function R(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 T=h,D=O;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t},adjoint:function(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],l=n[8],h=n[9],f=n[10],d=n[11],M=n[12],m=n[13],p=n[14],g=n[15];return t[0]=u*(f*g-d*p)-h*(s*g-c*p)+m*(s*d-c*f),t[1]=-(r*(f*g-d*p)-h*(a*g-i*p)+m*(a*d-i*f)),t[2]=r*(s*g-c*p)-u*(a*g-i*p)+m*(a*c-i*s),t[3]=-(r*(s*d-c*f)-u*(a*d-i*f)+h*(a*c-i*s)),t[4]=-(o*(f*g-d*p)-l*(s*g-c*p)+M*(s*d-c*f)),t[5]=e*(f*g-d*p)-l*(a*g-i*p)+M*(a*d-i*f),t[6]=-(e*(s*g-c*p)-o*(a*g-i*p)+M*(a*c-i*s)),t[7]=e*(s*d-c*f)-o*(a*d-i*f)+l*(a*c-i*s),t[8]=o*(h*g-d*m)-l*(u*g-c*m)+M*(u*d-c*h),t[9]=-(e*(h*g-d*m)-l*(r*g-i*m)+M*(r*d-i*h)),t[10]=e*(u*g-c*m)-o*(r*g-i*m)+M*(r*c-i*u),t[11]=-(e*(u*d-c*h)-o*(r*d-i*h)+l*(r*c-i*u)),t[12]=-(o*(h*p-f*m)-l*(u*p-s*m)+M*(u*f-s*h)),t[13]=e*(h*p-f*m)-l*(r*p-a*m)+M*(r*f-a*h),t[14]=-(e*(u*p-s*m)-o*(r*p-a*m)+M*(r*s-a*u)),t[15]=e*(u*f-s*h)-o*(r*f-a*h)+l*(r*s-a*u),t},copy:i,determinant:function(t){let n=t[0],e=t[1],r=t[2],a=t[3],i=t[4],o=t[5],u=t[6],s=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],M=t[13],m=t[14],p=t[15];return(n*o-e*i)*(h*p-f*m)-(n*u-r*i)*(l*p-f*M)+(n*s-a*i)*(l*m-h*M)+(e*u-r*o)*(c*p-f*d)-(e*s-a*o)*(c*m-h*d)+(r*s-a*u)*(c*M-l*d)},equals:function(t,n){if(t===n)return!0;let e=t[0],r=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],l=t[7],h=t[8],f=t[9],d=t[10],M=t[11],m=t[12],p=t[13],g=t[14],b=t[15],y=n[0],v=n[1],_=n[2],x=n[3],I=n[4],w=n[5],j=n[6],A=n[7],q=n[8],S=n[9],O=n[10],P=n[11],C=n[12],R=n[13],T=n[14],D=n[15],U=(0,a.FD)();return Math.abs(e-y)<=U*Math.max(1,Math.abs(e),Math.abs(y))&&Math.abs(r-v)<=U*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-_)<=U*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-x)<=U*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(u-I)<=U*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(s-w)<=U*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-j)<=U*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-A)<=U*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(h-q)<=U*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-S)<=U*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(d-O)<=U*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(M-P)<=U*Math.max(1,Math.abs(M),Math.abs(P))&&Math.abs(m-C)<=U*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(p-R)<=U*Math.max(1,Math.abs(p),Math.abs(R))&&Math.abs(g-T)<=U*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(b-D)<=U*Math.max(1,Math.abs(b),Math.abs(D))},exactEquals:P,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,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=e+e,u=r+r,s=a+a,c=e*o,l=r*o,h=r*u,f=a*o,d=a*u,M=a*s,m=i*o,p=i*u,g=i*s;return t[0]=1-h-M,t[1]=l+g,t[2]=f-p,t[3]=0,t[4]=l-g,t[5]=1-c-M,t[6]=d+m,t[7]=0,t[8]=f+p,t[9]=d-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,n){let e=_,r=-n[0],a=-n[1],i=-n[2],o=n[3],u=n[4],s=n[5],c=n[6],l=n[7],h=r*r+a*a+i*i+o*o;return h>0?(e[0]=2*(u*o+l*r+s*i-c*a)/h,e[1]=2*(s*o+l*a+c*r-u*i)/h,e[2]=2*(c*o+l*i+u*a-s*r)/h):(e[0]=2*(u*o+l*r+s*i-c*a),e[1]=2*(s*o+l*a+c*r-u*i),e[2]=2*(c*o+l*i+u*a-s*r)),v(t,n,e),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:j,fromRotationTranslationScaleOrigin:A,fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:p,fromXRotation:b,fromYRotation:function(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:y,frustum:q,getRotation:w,getScale:I,getTranslation:x,hasIdentityRotation:R,identity:u,invert:l,invertOrIdentity:c,isOrthoNormal:C,lookAt:S,mul:T,multiply:h,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t},ortho:function(t,n,e,r,a,i,o){let u=1/(n-e),s=1/(r-a),c=1/(i-o);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+e)*u,t[13]=(a+r)*s,t[14]=(o+i)*c,t[15]=1,t},perspective:function(t,n,e,r,a){let i,o=1/Math.tan(n/2);return t[0]=o/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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!=a&&a!==1/0?(i=1/(r-a),t[10]=(a+r)*i,t[14]=2*a*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,e,r){let a=Math.tan(n.upDegrees*Math.PI/180),i=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),u=Math.tan(n.rightDegrees*Math.PI/180),s=2/(o+u),c=2/(a+i);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-u)*s*.5,t[9]=(a-i)*c*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t},rotate:M,rotateX:m,rotateY:function(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[0],o=n[1],u=n[2],s=n[3],c=n[8],l=n[9],h=n[10],f=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*a-c*r,t[1]=o*a-l*r,t[2]=u*a-h*r,t[3]=s*a-f*r,t[8]=i*r+c*a,t[9]=o*r+l*a,t[10]=u*r+h*a,t[11]=s*r+f*a,t},rotateZ:function(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[0],o=n[1],u=n[2],s=n[3],c=n[4],l=n[5],h=n[6],f=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*a+c*r,t[1]=o*a+l*r,t[2]=u*a+h*r,t[3]=s*a+f*r,t[4]=c*a-i*r,t[5]=l*a-o*r,t[6]=h*a-u*r,t[7]=f*a-s*r,t},scale:d,set:o,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:D,subtract:O,targetTo:function(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=r[0],s=r[1],c=r[2],l=a-e[0],h=i-e[1],f=o-e[2],d=l*l+h*h+f*f;d>0&&(d=1/Math.sqrt(d),l*=d,h*=d,f*=d);let M=s*f-c*h,m=c*l-u*f,p=u*h-s*l;return d=M*M+m*m+p*p,d>0&&(d=1/Math.sqrt(d),M*=d,m*=d,p*=d),t[0]=M,t[1]=m,t[2]=p,t[3]=0,t[4]=h*p-f*m,t[5]=f*M-l*p,t[6]=l*m-h*M,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=a,t[13]=i,t[14]=o,t[15]=1,t},translate:f,transpose:s},Symbol.toStringTag,{value:"Module"}))},35522(t,n,e){e.d(n,{$A:()=>j,Bw:()=>i,C:()=>o,Cc:()=>A,DI:()=>x,Io:()=>b,Ln:()=>g,Om:()=>w,Qr:()=>h,Re:()=>c,S8:()=>I,T9:()=>m,WQ:()=>s,Z0:()=>q,_S:()=>d,aI:()=>D,ei:()=>S,fw:()=>P,gL:()=>O,hG:()=>y,hZ:()=>u,hs:()=>p,jk:()=>M,lw:()=>l,m3:()=>v,oW:()=>U,t2:()=>T,tn:()=>f,ze:()=>_});var r=e(51850),a=e(34304);function i(t){let n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function s(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function c(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function M(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function m(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function g(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function b(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.sqrt(e*e+r*r+a*a)}function y(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function v(t){let n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function _(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function x(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function I(t,n=t){let e=n[0],r=n[1],a=n[2],i=e*e+r*r+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function w(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function j(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2];return t[0]=a*s-i*u,t[1]=i*o-r*s,t[2]=r*u-a*o,t}function A(t,n,e,r){let a=n[0],i=n[1],o=n[2];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t}function q(t,n,e){let r=n[0],a=n[1],i=n[2];return t[0]=e[0]*r+e[4]*a+e[8]*i+e[12],t[1]=e[1]*r+e[5]*a+e[9]*i+e[13],t[2]=e[2]*r+e[6]*a+e[10]*i+e[14],t}function S(t,n,e){let r=n[0],a=n[1],i=n[2];return t[0]=r*e[0]+a*e[3]+i*e[6],t[1]=r*e[1]+a*e[4]+i*e[7],t[2]=r*e[2]+a*e[5]+i*e[8],t}function O(t,n,e){return P(t,n,e[0],e[1],e[2],e[3])}function P(t,n,e,r,a,i){let o=n[0],u=n[1],s=n[2],c=r*s-a*u,l=a*o-e*s,h=e*u-r*o,f=r*h-a*l,d=a*c-e*h,M=e*l-r*c,m=2*i;return t[0]=o+c*m+2*f,t[1]=u+l*m+2*d,t[2]=s+h*m+2*M,t}const C=(0,r.vt)(),R=(0,r.vt)();function T(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function D(t,n){if(t===n)return!0;let e=t[0],r=t[1],i=t[2],o=n[0],u=n[1],s=n[2],c=(0,a.FD)();return Math.abs(e-o)<=c*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-s)<=c*Math.max(1,Math.abs(i),Math.abs(s))}function U(t,n,e){let r=e[0]-n[0],a=e[1]-n[1],i=e[2]-n[2],o=r*r+a*a+i*i;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=a*o,t[2]=i*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const N=c,z=l,F=h,$=b,Z=y,V=i,E=v;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:s,angle:function(t,n){I(C,t),I(R,n);let e=w(C,R);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,a,i){let o=1-i,u=o*o,s=i*i,c=u*o,l=3*i*u,h=3*s*o,f=s*i;return t[0]=n[0]*c+e[0]*l+r[0]*h+a[0]*f,t[1]=n[1]*c+e[1]*l+r[1]*h+a[1]*f,t[2]=n[2]*c+e[2]*l+r[2]*h+a[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:o,cross:j,crossAndNormalize:function(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2],c=a*s-i*u,l=i*o-r*s,h=r*u-a*o,f=Math.sqrt(c*c+l*l+h*h);return t[0]=c/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:$,distance:b,div:F,divide:h,dot:w,equals:D,exactEquals:T,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,a,i){let o=i*i,u=o*(2*i-3)+1,s=o*(i-2)+i,c=o*(i-1),l=o*(3-2*i);return t[0]=n[0]*u+e[0]*s+r[0]*c+a[0]*l,t[1]=n[1]*u+e[1]*s+r[1]*c+a[1]*l,t[2]=n[2]*u+e[2]*s+r[2]*c+a[2]*l,t},inverse:x,len:V,length:i,lerp:A,max:m,min:M,mul:z,multiply:l,negate:_,normalize:I,random:function(t,n=1){let e=a.Ov,r=2*e()*Math.PI,i=2*e()-1,o=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=i*n,t},rotateX:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0],i[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),i[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),i[1]=a[1],i[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),i[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),i[2]=a[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:g,scaleTo:function(t,n){return p(t,t,n/V(t))},set:u,sign:d,sqrDist:Z,sqrLen:E,squaredDistance:y,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:N,subtract:c,transformMat3:S,transformMat4:q,transformMat4Z:function(t,n){return n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]},transformQuat:O,transformQuatValues:P},Symbol.toStringTag,{value:"Module"})),e.d(n,["Il",0,V,"jb",0,N,"lo",0,Z,"uE",0,E])},78955(t,n,e){e.d(n,{Bw:()=>p,C:()=>a,Cc:()=>v,LI:()=>f,Om:()=>y,S8:()=>b,T9:()=>h,WQ:()=>o,Z0:()=>_,aI:()=>I,hG:()=>m,hZ:()=>i,hs:()=>d,jk:()=>l,m3:()=>g,t2:()=>x});var r=e(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t}function o(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t}function h(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t}function f(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function d(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function M(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+a*a+i*i)}function m(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+a*a+i*i}function p(t){let n=t[0],e=t[1],r=t[2],a=t[3];return Math.sqrt(n*n+e*e+r*r+a*a)}function g(t){let n=t[0],e=t[1],r=t[2],a=t[3];return n*n+e*e+r*r+a*a}function b(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=e*e+r*r+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e*o,t[1]=r*o,t[2]=a*o,t[3]=i*o),t}function y(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function v(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=n[3];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t[3]=u+r*(e[3]-u),t}function _(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3];return t[0]=e[0]*r+e[4]*a+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*a+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*a+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*a+e[11]*i+e[15]*o,t}function x(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function I(t,n){let e=t[0],a=t[1],i=t[2],o=t[3],u=n[0],s=n[1],c=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-u)<=h*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(a-s)<=h*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=h*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-l)<=h*Math.max(1,Math.abs(o),Math.abs(l))}const w=u,j=s,A=c,q=M,S=m,O=p,P=g;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:a,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:q,distance:M,div:A,divide:c,dot:y,equals:I,exactEquals:x,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:O,length:p,lerp:v,max:h,min:l,mul:j,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:b,random:function(t,n=1){let e,a,i,o,u,s,c=r.Ov;do{e=2*c()-1,a=2*c()-1,u=e*e+a*a}while(u>=1);do{i=2*c()-1,o=2*c()-1,s=i*i+o*o}while(s>=1);let l=Math.sqrt((1-u)/s);return t[0]=n*e,t[1]=n*a,t[2]=n*i*l,t[3]=n*o*l,t},round:f,scale:d,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:S,sqrLen:P,squaredDistance:m,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:w,subtract:u,transformMat4:_,transformQuat:function(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2],c=e[3],l=c*r+u*i-s*a,h=c*a+s*r-o*i,f=c*i+o*a-u*r,d=-o*r-u*a-s*i;return t[0]=l*c+d*-o+h*-s-f*-u,t[1]=h*c+d*-u+f*-o-l*-s,t[2]=f*c+d*-s+l*-u-h*-o,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},56512(t,n,e){function r(t){let n,e,r=[],a=!1;return function(...i){return a&&n===this&&function(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(t[e]!==n[e])return!1;return!0}(i,r)||(e=t.apply(this,i),n=this,r=i,a=!0),e}}e.d(n,{B:()=>r})},76553(t,n,e){function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}e.d(n,{H:()=>r})},13069(t,n,e){e.d(n,{AG:()=>u,lk:()=>a,vD:()=>o,yS:()=>i});const r="randomUUID"in crypto;function a(){if(r)return crypto.randomUUID();let t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;let n=n=>t[n].toString(16).padStart(4,"0");return n(0)+n(1)+"-"+n(2)+"-"+n(3)+"-"+n(4)+"-"+n(5)+n(6)+n(7)}function i(){return`{${a().toUpperCase()}}`}function o(){return`{${a()}}`}function u(t){let n=t.toUpperCase();return t.startsWith("{")?n:`{${n}}`}},4197(t,n,e){e.d(n,{Vj:()=>l,cj:()=>c,jh:()=>i,l5:()=>u,yH:()=>s});var r=e(34275),a=e(9093);function i(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function o(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function u(t,n,e){return Array.isArray(t)?t.slice(n,n+e):t.subarray(n,n+e)}function s(t,n){if(0===n.length)return o(t);if(0===t.length)return o(n);let e=i(t.length+n.length);for(let n=0;n<t.length;++n)e[n]=t[n];for(let r=0;r<n.length;++r)e[t.length+r]=n[r];return e}function c(t){return[...t]}function l(t){let n=(0,a.vt)();for(let e=0;e<16;++e)n[e]=t[e];return n}},70328(t,n,e){e.d(n,{BI:()=>q,C:()=>o,DC:()=>f,Ej:()=>y,Ie:()=>j,Jt:()=>A,Lu:()=>_,Ne:()=>x,RF:()=>h,TF:()=>g,VL:()=>M,aI:()=>O,fA:()=>u,gE:()=>c,gX:()=>b,hZ:()=>w,iT:()=>d,is:()=>S,pg:()=>v,uJ:()=>p,vI:()=>I,vY:()=>s,vt:()=>i,w1:()=>l,yr:()=>m}),e(35522);var r=e(5443),a=(e(19419),e(4197));function i(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,n){for(let e=0;e<6;e++)t[e]=n[e];return t}function u(t,n,e,r,a,o,u=i()){return u[0]=t,u[1]=n,u[2]=e,u[3]=r,u[4]=a,u[5]=o,u}function s(t,n=i()){return function(t,n,e,r=i()){return w(r,P),function(t,n,e=0,r=n.length/3){let a=t[0],i=t[1],o=t[2],u=t[3],s=t[4],c=t[5];for(let t=0;t<r;t++)a=Math.min(a,n[e+3*t]),i=Math.min(i,n[e+3*t+1]),o=Math.min(o,n[e+3*t+2]),u=Math.max(u,n[e+3*t]),s=Math.max(s,n[e+3*t+1]),c=Math.max(c,n[e+3*t+2]);t[0]=a,t[1]=i,t[2]=o,t[3]=u,t[4]=s,t[5]=c}(r,t,n,e),r}(t,0,t.length/3,n)}function c(t,n=(0,a.jh)(24)){let[e,r,i,o,u,s]=t;return n[0]=e,n[1]=r,n[2]=i,n[3]=e,n[4]=r,n[5]=s,n[6]=e,n[7]=u,n[8]=i,n[9]=e,n[10]=u,n[11]=s,n[12]=o,n[13]=r,n[14]=i,n[15]=o,n[16]=r,n[17]=s,n[18]=o,n[19]=u,n[20]=i,n[21]=o,n[22]=u,n[23]=s,n}function l(t,n){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:n}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:n})}function h(t,n,e=t){e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e[4]=Math.max(t[4],n[4]),e[5]=Math.max(t[5],n[5])}function f(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[3]=Math.max(t[3],n[2]),t[4]=Math.max(t[4],n[3])}function d(t,[n,e,r]){!function(t,n,e,r){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],e),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],n),t[4]=Math.max(t[4],e),t[5]=Math.max(t[5],r)}(t,n,e,r)}function M(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let n=M(t),e=p(t),r=m(t);return n*n+e*e+r*r}function b(t,n=[0,0,0]){return n[0]=t[0]+M(t)/2,n[1]=t[1]+m(t)/2,n[2]=t[2]+p(t)/2,n}function y(t,n=[0,0,0]){return n[0]=M(t),n[1]=m(t),n[2]=p(t),n}function v(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function _(t,n){return n[0]=t[3],n[1]=t[4],n[2]=t[5],n}function x(t,n,e=t){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e!==t&&(e[3]=t[3],e[4]=t[4],e[5]=t[5]),e}function I(t,n,e=t){return e[3]=n[0],e[4]=n[1],e[5]=n[2],e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2]),t}function w(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function j(t){return t?w(t,P):i(P)}function A(t,n){return t[0]=n[0],t[1]=n[1],t[2]=-1/0,t[3]=n[2],t[4]=n[3],t[5]=1/0,t}function q(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=-1/0,t[3]=r,t[4]=a,t[5]=1/0,t}function S(t){return 6===t.length}function O(t,n,e){if(null==t||null==n)return t===n;if(!S(t)||!S(n))return!1;if(e){for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}else for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}const P=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];i(),e.d(n,["qv",0,P,"v_",0,C])},71351(t,n,e){e.d(n,{C:()=>h,Cr:()=>f,LV:()=>l,fA:()=>d,kb:()=>M,vt:()=>s}),e(4576);var r=e(4341),a=(e(77690),e(29242)),i=e(35522),o=e(51850),u=e(32114);function s(t){return t?c((0,o.o8)(t.origin),(0,o.o8)(t.direction)):c((0,o.vt)(),(0,o.vt)())}function c(t,n){return{origin:t,direction:n}}function l(t,n){let e=m.get();return e.origin=t,e.direction=n,e}function h(t,n=s()){return d(t.origin,t.direction,n)}function f(t,n,e=s()){return(0,i.C)(e.origin,t),(0,i.Re)(e.direction,n,t),e}function d(t,n,e=s()){return(0,i.C)(e.origin,t),(0,i.C)(e.direction,n),e}function M(t,n){let e=(0,i.$A)(u.rq.get(),(0,i.S8)(u.rq.get(),t.direction),(0,i.Re)(u.rq.get(),n,t.origin));return(0,i.Om)(e,e)}const m=new r.I(()=>s());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,a.vt)()},32114(t,n,e){e.d(n,{Rc:()=>d,rq:()=>h,Km:()=>f}),e(44208);var r=e(26390),a=e(29242),i=e(9093),o=e(82534),u=e(48163),s=e(51850),c=e(91829);class l{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new l(u.vt)}static createVec3f64(){return new l(s.vt)}static createVec4f64(){return new l(c.vt)}static createMat3f64(){return new l(a.vt)}static createMat4f64(){return new l(i.vt)}static createQuatf64(){return new l(o.vt)}get test(){}}l.createVec2f64();const h=l.createVec3f64(),f=l.createVec4f64(),d=(l.createMat3f64(),l.createMat4f64());l.createQuatf64()},85648(t,n,e){e.d(n,{n:()=>a});var r=e(84952);function a(t){return i[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){let n=(0,r.Zo)(t);return s[n]||o}(t.url)}(t)]||u}const i={},o="text/plain",u=i[o],s={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let t in s)i[s[t]]=t},24212(t,n,e){e.d(n,{$7:()=>s,B:()=>u,M7:()=>h,XF:()=>l,tW:()=>c,w7:()=>o});var r=e(56512),a=e(86211),i=e(16271);function o(t,n){return function(t,n){return n?.mode?n.mode:function(t){return t?f:d}(t).mode}(null==t||(t.hasZ??!1),n)}function u(t,n,e){return e&&e.mode!==n?`${t} only support ${n} elevation mode`:null}function s(t,n,e){return e?.mode===n?`${t} do not support ${n} elevation mode`:null}function c(t,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function l(t,n){n&&t.warn(".elevationInfo=",n)}function h(t){return(t?.offset??0)*(0,i.Ao)(t?.unit)}(0,r.B)((t,n,e)=>{if(!t||"decimal-degrees"===n)return 0;let r="unknown"!==n&&n?n:"meters",i=(0,a.mq)(e);return i?(0,a.oU)(t,r,i):0});const f={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}},49718(t,n,e){e(51850),e(6867).w_},6867(t,n,e){e.d(n,{w_:()=>h});var r=e(58083),a=e(9093),i=e(35522),o=e(51850),u=e(78955),s=e(91829),c=e(71351);class l{constructor(){this.intersector=4}get distance(){return this._distance}get renderDistance(){return this._renderDistance}_init(){this._distance=this._renderDistance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(t,n,e,r=null,a=null,i=null){this.intersector=t,this._distance=e,this._renderDistance=r,this.target=n,this.drapedLayerOrder=a,this.renderPriority=i}}class h extends l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,i.hs)(d,this.ray.direction,this.distance),(0,i.Bw)(d))}withinDistance(t){return!!f(this)&&null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!f(this)&&((0,i.hs)(d,this.ray.direction,this.distance),(0,i.WQ)(t,this.ray.origin,d),!0)}getTransformedNormal(t){return(0,i.C)(M,this.normal),M[3]=0,(0,u.Z0)(M,M,this.transformation),(0,i.C)(t,M),(0,i.S8)(t,t)}constructor(t){super(),this.normal=(0,o.vt)(),this.transformation=(0,a.vt)(),this._ray=(0,c.vt)(),this.init(t)}init(t){super._init(),t&&(0,c.C)(t,this._ray)}set(t,n,e,u,s,c,l,h){this._setBase(t,n,e,u,l,h),(0,i.C)(this.normal,s??o.Cb),(0,r.C)(this.transformation,c??a.zK)}copy(t){this._setBase(t.intersector,t.target,t.distance,t.renderDistance,t.drapedLayerOrder,t.renderPriority),(0,c.C)(t.ray,this._ray),(0,i.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function f(t){return null!=t?.distance&&null!=t?.renderDistance}const d=(0,o.vt)(),M=(0,s.vt)()},78553(t,n,e){e.d(n,{D:()=>i,p:()=>a});var r=e(78888);function a(t){let n=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(n,100))}function i(t){let n=1-t/100;return Math.max(0,Math.min(n,1))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1588],{79608(t,n,e){e.d(n,{A:()=>f});var r=e(32198),a=e(69540),i=e(91429);let o=class extends a.Pw{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r.Cg)([(0,i.MZ)()],o.prototype,"type",void 0),o=(0,r.Cg)([(0,i.$K)("esri.analysis.support.AnalysisOriginWebScene")],o);const u=o;var s=e(69622),c=e(4902),l=e(25482);let h=0,f=class extends((0,l.T)((0,a.OU)((0,c.s)(s.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){let n=this.parent;if(null!=n)switch(n.type){case"line-of-sight":case"dimension":case"viewshed":n.releaseAnalysis(this);break;case"2d":case"3d":n.analyses.includes(this)&&n.analyses.remove(this)}this._set("parent",t)}equals(t){return this.type===t.type}};(0,r.Cg)([(0,i.MZ)({type:String,constructOnly:!0,clonable:!1})],f.prototype,"id",void 0),(0,r.Cg)([(0,i.MZ)({clonable:!1,value:null})],f.prototype,"parent",null),(0,r.Cg)([(0,i.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":u}}})],f.prototype,"origin",void 0),f=(0,r.Cg)([(0,i.$K)("esri.analysis.Analysis")],f)},91715(t,n,e){e.d(n,{xH:()=>i,N1:()=>u}),e(35522);var r=e(51850),a=e(71351);function i(t,n){return o(t)===o(n)}function o(t){if(null==t)return null;let n=null==t.layer?"":t.layer.id,e=null;return e=null==t.objectId?null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid:t.objectId,null==e?null:`o-${n}-${e}`}e(44208),e(58083),e(70328),e(77548),e(6867),e(49718),(0,r.vt)();const u={json:{write:{writer:function(t,n){null!=t?.layer?.objectIdField&&null!=t.attributes&&(n.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}},clonable:"reference"};(0,a.vt)(),(0,r.vt)()},80200(t,n,e){e.d(n,{d:()=>h});const r={Base64:0,Hex:1,String:2,Raw:3};function a(t,n){let e=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(e>>16)<<16|65535&e}function i(t,n,e,r,i,o){return a(function(t,n){return t<<n|t>>>32-n}(a(a(n,t),a(r,o)),i),e)}function o(t,n,e,r,a,o,u){return i(n&e|~n&r,t,n,a,o,u)}function u(t,n,e,r,a,o,u){return i(n&r|e&~r,t,n,a,o,u)}function s(t,n,e,r,a,o,u){return i(n^e^r,t,n,a,o,u)}function c(t,n,e,r,a,o,u){return i(e^(n|~r),t,n,a,o,u)}function l(t,n){t[n>>5]|=128<<n%32,t[14+(n+64>>>9<<4)]=n;let e=1732584193,r=-271733879,i=-1732584194,l=271733878;for(let n=0;n<t.length;n+=16){let h=e,f=r,d=i,M=l;e=o(e,r,i,l,t[n],7,-680876936),l=o(l,e,r,i,t[n+1],12,-389564586),i=o(i,l,e,r,t[n+2],17,606105819),r=o(r,i,l,e,t[n+3],22,-1044525330),e=o(e,r,i,l,t[n+4],7,-176418897),l=o(l,e,r,i,t[n+5],12,1200080426),i=o(i,l,e,r,t[n+6],17,-1473231341),r=o(r,i,l,e,t[n+7],22,-45705983),e=o(e,r,i,l,t[n+8],7,1770035416),l=o(l,e,r,i,t[n+9],12,-1958414417),i=o(i,l,e,r,t[n+10],17,-42063),r=o(r,i,l,e,t[n+11],22,-1990404162),e=o(e,r,i,l,t[n+12],7,1804603682),l=o(l,e,r,i,t[n+13],12,-40341101),i=o(i,l,e,r,t[n+14],17,-1502002290),r=o(r,i,l,e,t[n+15],22,1236535329),e=u(e,r,i,l,t[n+1],5,-165796510),l=u(l,e,r,i,t[n+6],9,-1069501632),i=u(i,l,e,r,t[n+11],14,643717713),r=u(r,i,l,e,t[n],20,-373897302),e=u(e,r,i,l,t[n+5],5,-701558691),l=u(l,e,r,i,t[n+10],9,38016083),i=u(i,l,e,r,t[n+15],14,-660478335),r=u(r,i,l,e,t[n+4],20,-405537848),e=u(e,r,i,l,t[n+9],5,568446438),l=u(l,e,r,i,t[n+14],9,-1019803690),i=u(i,l,e,r,t[n+3],14,-187363961),r=u(r,i,l,e,t[n+8],20,1163531501),e=u(e,r,i,l,t[n+13],5,-1444681467),l=u(l,e,r,i,t[n+2],9,-51403784),i=u(i,l,e,r,t[n+7],14,1735328473),r=u(r,i,l,e,t[n+12],20,-1926607734),e=s(e,r,i,l,t[n+5],4,-378558),l=s(l,e,r,i,t[n+8],11,-2022574463),i=s(i,l,e,r,t[n+11],16,1839030562),r=s(r,i,l,e,t[n+14],23,-35309556),e=s(e,r,i,l,t[n+1],4,-1530992060),l=s(l,e,r,i,t[n+4],11,1272893353),i=s(i,l,e,r,t[n+7],16,-155497632),r=s(r,i,l,e,t[n+10],23,-1094730640),e=s(e,r,i,l,t[n+13],4,681279174),l=s(l,e,r,i,t[n],11,-358537222),i=s(i,l,e,r,t[n+3],16,-722521979),r=s(r,i,l,e,t[n+6],23,76029189),e=s(e,r,i,l,t[n+9],4,-640364487),l=s(l,e,r,i,t[n+12],11,-421815835),i=s(i,l,e,r,t[n+15],16,530742520),r=s(r,i,l,e,t[n+2],23,-995338651),e=c(e,r,i,l,t[n],6,-198630844),l=c(l,e,r,i,t[n+7],10,1126891415),i=c(i,l,e,r,t[n+14],15,-1416354905),r=c(r,i,l,e,t[n+5],21,-57434055),e=c(e,r,i,l,t[n+12],6,1700485571),l=c(l,e,r,i,t[n+3],10,-1894986606),i=c(i,l,e,r,t[n+10],15,-1051523),r=c(r,i,l,e,t[n+1],21,-2054922799),e=c(e,r,i,l,t[n+8],6,1873313359),l=c(l,e,r,i,t[n+15],10,-30611744),i=c(i,l,e,r,t[n+6],15,-1560198380),r=c(r,i,l,e,t[n+13],21,1309151649),e=c(e,r,i,l,t[n+4],6,-145523070),l=c(l,e,r,i,t[n+11],10,-1120210379),i=c(i,l,e,r,t[n+2],15,718787259),r=c(r,i,l,e,t[n+9],21,-343485551),e=a(e,h),r=a(r,f),i=a(i,d),l=a(l,M)}return[e,r,i,l]}function h(t,n=r.Hex){let e=n||r.Base64,a=l(function(t){let n=[];for(let e=0,r=8*t.length;e<r;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}(t),8*t.length);switch(e){case r.Raw:return a;case r.Hex:return function(t){let n="0123456789abcdef",e=[];for(let r=0,a=4*t.length;r<a;r++)e.push(n.charAt(t[r>>2]>>r%4*8+4&15)+n.charAt(t[r>>2]>>r%4*8&15));return e.join("")}(a);case r.String:return function(t){let n=[];for(let e=0,r=32*t.length;e<r;e+=8)n.push(String.fromCharCode(t[e>>5]>>>e%32&255));return n.join("")}(a);case r.Base64:return function(t){let n=[];for(let e=0,r=4*t.length;e<r;e+=3){let r=(t[e>>2]>>e%4*8&255)<<16|(t[e+1>>2]>>(e+1)%4*8&255)<<8|t[e+2>>2]>>(e+2)%4*8&255;for(let a=0;a<4;a++)8*e+6*a>32*t.length?n.push("="):n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-a)&63))}return n.join("")}(a)}}e.d(n,["T",0,r])},4341(t,n,e){e.d(n,{I:()=>a});var r=e(26390);class a{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},87024(t,n,e){e.d(n,{P:()=>d});var r=e(49186),a=e(80200),i=e(76553),o=e(84952),u=e(13069),s=e(96156),c=e(35666),l=e(10107),h=e(85648),f=e(97159);function d(t){let n=t?.origins??[void 0];return(e,r)=>{let a=function(t,n,e){if("resource"===t?.type)return function(t,n,e){let r=(0,s.z4)(n,e);return{type:String,read:(t,n,e)=>{let a=(0,f.r)(t,n,e);return r.type===String?a:"function"==typeof r.type?new r.type({url:a}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(n,a,u,s){if(!s?.resources)return"string"==typeof n?void(a[u]=(0,f.t)(n,s)):void(a[u]=n.write({},s));let l=function(t){return null==t?null:"string"==typeof t?t:t.url}(n),d=(0,f.t)(l,{...s,verifyItemRelativeUrls:s?.verifyItemRelativeUrls?{writtenUrls:s.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),g=r.type!==String&&(!(0,i.H)(this)||s?.origin&&this.originIdOf(e)>(0,c.aB)(s.origin)),b={object:this,propertyName:e,value:n,targetUrl:d,dest:a,targetPropertyName:u,context:s,params:t};s?.portalItem&&d&&!(0,o.oP)(d)?g&&t?.contentAddressed?M(b):g?function(t){let{context:n,targetUrl:e,params:r,value:a,dest:i,targetPropertyName:u}=t;if(!n.portalItem)return;let s=n.portalItem.resourceFromPath(e),c=p(a,e,n),l=(0,h.n)(c),f=(0,o.Zo)(s.path),d=r?.compress??!1;l===f?(n.resources&&m({...t,resource:s,content:c,compress:d,updates:n.resources.toUpdate}),i[u]=e):M(t)}(b):function({context:t,targetUrl:n,dest:e,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n),compress:!1}),e[r]=n)}(b):s?.portalItem&&(null==d||null!=(0,f.i)(d)||(0,o.w8)(d)||g)?M(b):a[u]=d}}}}(t,n,e);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:t,write:n}=f.b;return{read:t,write:n}}}}(t,e,r);for(let t of n){let n=(0,l.rM)(e,t,r);for(let t in a)n[t]=a[t]}}}function M(t){let{targetUrl:n,params:e,value:i,context:s,dest:c,targetPropertyName:l}=t;if(!s.portalItem)return;let d=(0,f.p)(n),M=p(i,n,s);if(e?.contentAddressed&&"json"!==M.type)return void s.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${l}" is trying to serializing a resource with content of type ${M.type} with content addressing. Content addressing is only supported for json resources.`,{content:M}));let g=e?.contentAddressed&&"json"===M.type?(0,a.d)(M.jsonString):d?.filename??(0,u.lk)(),b=e?.prefix??d?.prefix,y=(0,o.fj)(b,g),v=`${y}.${(0,h.n)(M)}`;if(e?.contentAddressed&&s.resources&&"json"===M.type){let t=s.resources.toKeep.find(({resource:t})=>t.path===v)??s.resources.toAdd.find(({resource:t})=>t.path===v);if(t)return void(c[l]=t.resource.itemRelativeUrl)}let _=s.portalItem.resourceFromPath(v);(0,o.w8)(n)&&s.resources&&s.resources.pendingOperations.push((0,o.tk)(n).then(t=>{_.path=`${y}.${(0,h.n)({type:"blob",blob:t})}`,c[l]=_.itemRelativeUrl}).catch(()=>{}));let x=e?.compress??!1;s.resources&&m({...t,resource:_,content:M,compress:x,updates:s.resources.toAdd}),c[l]=_.itemRelativeUrl}function m({object:t,propertyName:n,updates:e,resource:r,content:a,compress:i}){e.push({resource:r,content:a,compress:i,finish:e=>{!function(t,n,e){"string"==typeof t[n]?t[n]=e.url:t[n].url=e.url}(t,n,e)}})}function p(t,n,e){return"string"==typeof t?{type:"url",url:n}:{type:"json",jsonString:JSON.stringify(t.toJSON(e))}}},62885(t,n,e){e.d(n,{H:()=>i,V:()=>a});var r=e(7762);function a(t,n,e=r.A){return n||=new e,n===t||n.destroyed||(n.removeAll(),(a=t)&&(Array.isArray(a)||"items"in a&&Array.isArray(a.items))?n.addMany(t):t&&n.add(t)),n;var a}function i(t){return t}},9093(t,n,e){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(t){return[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]]}e.d(n,{o8:()=>a,vt:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m){return[t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},82534(t,n,e){function r(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>a,vt:()=>r});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,i])},48163(t,n,e){function r(){return[0,0]}function a(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function o(){return i(1,1)}function u(){return i(-1,-1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{fA:()=>i,o8:()=>a,vt:()=>r});const l=o(),h=u(),f=s(),d=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:h,ONES:l,UNIT_X:f,UNIT_Y:d,ZEROS:[0,0],clone:a,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){let e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,negativeOnes:u,ones:o,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["IA",0,h,"Un",0,l])},91829(t,n,e){function r(){return[0,0,0,0]}function a(t,n,e,r){return[t,n,e,r]}function i(){return a(1,1,1,1)}function o(){return a(1,0,0,0)}function u(){return a(0,1,0,0)}function s(){return a(0,0,1,0)}function c(){return a(0,0,0,1)}e.d(n,{_Y:()=>c,fA:()=>a,vt:()=>r});const l=[0,0,0,0],h=i(),f=o(),d=u(),M=s(),m=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:m,UNIT_X:f,UNIT_Y:d,UNIT_Z:M,ZEROS:l,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:function(t,n,e,r){return[t,n,e,r]},fromArray:function(t,n=[0,0,0,0]){let e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:a,ones:i,unitW:c,unitX:o,unitY:u,unitZ:s,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["Un",0,h,"uY",0,l])},58083(t,n,e){e.d(n,{$0:()=>g,$h:()=>q,B8:()=>l,C:()=>i,D_:()=>u,N9:()=>y,O7:()=>A,Qw:()=>c,Tl:()=>f,X_:()=>I,e$:()=>M,eL:()=>m,hM:()=>b,hZ:()=>o,hs:()=>d,kN:()=>p,l:()=>w,lw:()=>h,mg:()=>s,o1:()=>j,sC:()=>x,t2:()=>P,t5:()=>S,tZ:()=>R,ut:()=>C});var r=e(51850),a=e(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function o(t,n,e,r,a,i,o,u,s,c,l,h,f,d,M,m,p){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=i,t[5]=o,t[6]=u,t[7]=s,t[8]=c,t[9]=l,t[10]=h,t[11]=f,t[12]=d,t[13]=M,t[14]=m,t[15]=p,t}function u(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 s(t,n){if(t===n){let e=n[1],r=n[2],a=n[3],i=n[6],o=n[7],u=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=i,t[11]=n[14],t[12]=a,t[13]=o,t[14]=u}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function c(t,n){return l(t,n)||u(t),t}function l(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],l=n[8],h=n[9],f=n[10],d=n[11],M=n[12],m=n[13],p=n[14],g=n[15],b=e*u-r*o,y=e*s-a*o,v=e*c-i*o,_=r*s-a*u,x=r*c-i*u,I=a*c-i*s,w=l*m-h*M,j=l*p-f*M,A=l*g-d*M,q=h*p-f*m,S=h*g-d*m,O=f*g-d*p,P=b*O-y*S+v*q+_*A-x*j+I*w;return P?(P=1/P,t[0]=(u*O-s*S+c*q)*P,t[1]=(a*S-r*O-i*q)*P,t[2]=(m*I-p*x+g*_)*P,t[3]=(f*x-h*I-d*_)*P,t[4]=(s*A-o*O-c*j)*P,t[5]=(e*O-a*A+i*j)*P,t[6]=(p*v-M*I-g*y)*P,t[7]=(l*I-f*v+d*y)*P,t[8]=(o*S-u*A+c*w)*P,t[9]=(r*A-e*S-i*w)*P,t[10]=(M*x-m*v+g*b)*P,t[11]=(h*v-l*x-d*b)*P,t[12]=(u*j-o*q-s*w)*P,t[13]=(e*q-r*j+a*w)*P,t[14]=(m*y-M*_-p*b)*P,t[15]=(l*_-h*y+f*b)*P,t):null}function h(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3],u=n[4],s=n[5],c=n[6],l=n[7],h=n[8],f=n[9],d=n[10],M=n[11],m=n[12],p=n[13],g=n[14],b=n[15],y=e[0],v=e[1],_=e[2],x=e[3];return t[0]=y*r+v*u+_*h+x*m,t[1]=y*a+v*s+_*f+x*p,t[2]=y*i+v*c+_*d+x*g,t[3]=y*o+v*l+_*M+x*b,y=e[4],v=e[5],_=e[6],x=e[7],t[4]=y*r+v*u+_*h+x*m,t[5]=y*a+v*s+_*f+x*p,t[6]=y*i+v*c+_*d+x*g,t[7]=y*o+v*l+_*M+x*b,y=e[8],v=e[9],_=e[10],x=e[11],t[8]=y*r+v*u+_*h+x*m,t[9]=y*a+v*s+_*f+x*p,t[10]=y*i+v*c+_*d+x*g,t[11]=y*o+v*l+_*M+x*b,y=e[12],v=e[13],_=e[14],x=e[15],t[12]=y*r+v*u+_*h+x*m,t[13]=y*a+v*s+_*f+x*p,t[14]=y*i+v*c+_*d+x*g,t[15]=y*o+v*l+_*M+x*b,t}function f(t,n,e){let r=e[0],a=e[1],i=e[2];if(n===t)t[12]=n[0]*r+n[4]*a+n[8]*i+n[12],t[13]=n[1]*r+n[5]*a+n[9]*i+n[13],t[14]=n[2]*r+n[6]*a+n[10]*i+n[14],t[15]=n[3]*r+n[7]*a+n[11]*i+n[15];else{let e=n[0],o=n[1],u=n[2],s=n[3],c=n[4],l=n[5],h=n[6],f=n[7],d=n[8],M=n[9],m=n[10],p=n[11];t[0]=e,t[1]=o,t[2]=u,t[3]=s,t[4]=c,t[5]=l,t[6]=h,t[7]=f,t[8]=d,t[9]=M,t[10]=m,t[11]=p,t[12]=e*r+c*a+d*i+n[12],t[13]=o*r+l*a+M*i+n[13],t[14]=u*r+h*a+m*i+n[14],t[15]=s*r+f*a+p*i+n[15]}return t}function d(t,n,e){let r=e[0],a=e[1],i=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=n[7]*a,t[8]=n[8]*i,t[9]=n[9]*i,t[10]=n[10]*i,t[11]=n[11]*i,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function M(t,n,e,r){let o=r[0],u=r[1],s=r[2],c=Math.sqrt(o*o+u*u+s*s);if(c<=(0,a.FD)())return void i(t,n);c=1/c,o*=c,u*=c,s*=c;let l=Math.sin(e),h=Math.cos(e),f=1-h,d=n[0],M=n[1],m=n[2],p=n[3],g=n[4],b=n[5],y=n[6],v=n[7],_=n[8],x=n[9],I=n[10],w=n[11],j=o*o*f+h,A=u*o*f+s*l,q=s*o*f-u*l,S=o*u*f-s*l,O=u*u*f+h,P=s*u*f+o*l,C=o*s*f+u*l,R=u*s*f-o*l,T=s*s*f+h;t[0]=d*j+g*A+_*q,t[1]=M*j+b*A+x*q,t[2]=m*j+y*A+I*q,t[3]=p*j+v*A+w*q,t[4]=d*S+g*O+_*P,t[5]=M*S+b*O+x*P,t[6]=m*S+y*O+I*P,t[7]=p*S+v*O+w*P,t[8]=d*C+g*R+_*T,t[9]=M*C+b*R+x*T,t[10]=m*C+y*R+I*T,t[11]=p*C+v*R+w*T,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15])}function m(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[4],o=n[5],u=n[6],s=n[7],c=n[8],l=n[9],h=n[10],f=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=i*a+c*r,t[5]=o*a+l*r,t[6]=u*a+h*r,t[7]=s*a+f*r,t[8]=c*a-i*r,t[9]=l*a-o*r,t[10]=h*a-u*r,t[11]=f*a-s*r,t}function p(t,n){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]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function g(t,n,e){if(0===n)return u(t);let r=e[0],i=e[1],o=e[2],s=Math.sqrt(r*r+i*i+o*o);if(s<=(0,a.FD)())return null;s=1/s,r*=s,i*=s,o*=s;let c=Math.sin(n),l=Math.cos(n),h=1-l;return t[0]=r*r*h+l,t[1]=i*r*h+o*c,t[2]=o*r*h-i*c,t[3]=0,t[4]=r*i*h-o*c,t[5]=i*i*h+l,t[6]=o*i*h+r*c,t[7]=0,t[8]=r*o*h+i*c,t[9]=i*o*h-r*c,t[10]=o*o*h+l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,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 v(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3],u=r+r,s=a+a,c=i+i,l=r*u,h=r*s,f=r*c,d=a*s,M=a*c,m=i*c,p=o*u,g=o*s,b=o*c;return t[0]=1-(d+m),t[1]=h+b,t[2]=f-g,t[3]=0,t[4]=h-b,t[5]=1-(l+m),t[6]=M+p,t[7]=0,t[8]=f+g,t[9]=M-p,t[10]=1-(l+d),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}const _=(0,r.vt)();function x(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function I(t,n){let e=n[0],r=n[1],a=n[2],i=n[4],o=n[5],u=n[6],s=n[8],c=n[9],l=n[10];return t[0]=Math.sqrt(e*e+r*r+a*a),t[1]=Math.sqrt(i*i+o*o+u*u),t[2]=Math.sqrt(s*s+c*c+l*l),t}function w(t,n){let e=n[0]+n[5]+n[10],r=0;return e>0?(r=2*Math.sqrt(e+1),t[3]=.25*r,t[0]=(n[6]-n[9])/r,t[1]=(n[8]-n[2])/r,t[2]=(n[1]-n[4])/r):n[0]>n[5]&&n[0]>n[10]?(r=2*Math.sqrt(1+n[0]-n[5]-n[10]),t[3]=(n[6]-n[9])/r,t[0]=.25*r,t[1]=(n[1]+n[4])/r,t[2]=(n[8]+n[2])/r):n[5]>n[10]?(r=2*Math.sqrt(1+n[5]-n[0]-n[10]),t[3]=(n[8]-n[2])/r,t[0]=(n[1]+n[4])/r,t[1]=.25*r,t[2]=(n[6]+n[9])/r):(r=2*Math.sqrt(1+n[10]-n[0]-n[5]),t[3]=(n[1]-n[4])/r,t[0]=(n[8]+n[2])/r,t[1]=(n[6]+n[9])/r,t[2]=.25*r),t}function j(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=n[3],s=a+a,c=i+i,l=o+o,h=a*s,f=a*c,d=a*l,M=i*c,m=i*l,p=o*l,g=u*s,b=u*c,y=u*l,v=r[0],_=r[1],x=r[2];return t[0]=(1-(M+p))*v,t[1]=(f+y)*v,t[2]=(d-b)*v,t[3]=0,t[4]=(f-y)*_,t[5]=(1-(h+p))*_,t[6]=(m+g)*_,t[7]=0,t[8]=(d+b)*x,t[9]=(m-g)*x,t[10]=(1-(h+M))*x,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function A(t,n,e,r,a){let i=n[0],o=n[1],u=n[2],s=n[3],c=i+i,l=o+o,h=u+u,f=i*c,d=i*l,M=i*h,m=o*l,p=o*h,g=u*h,b=s*c,y=s*l,v=s*h,_=r[0],x=r[1],I=r[2],w=a[0],j=a[1],A=a[2],q=(1-(m+g))*_,S=(d+v)*_,O=(M-y)*_,P=(d-v)*x,C=(1-(f+g))*x,R=(p+b)*x,T=(M+y)*I,D=(p-b)*I,U=(1-(f+m))*I;return t[0]=q,t[1]=S,t[2]=O,t[3]=0,t[4]=P,t[5]=C,t[6]=R,t[7]=0,t[8]=T,t[9]=D,t[10]=U,t[11]=0,t[12]=e[0]+w-(q*w+P*j+T*A),t[13]=e[1]+j-(S*w+C*j+D*A),t[14]=e[2]+A-(O*w+R*j+U*A),t[15]=1,t}function q(t,n,e,r,a,i,o){let u=1/(e-n),s=1/(a-r),c=1/(i-o);return t[0]=2*i*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*s,t[6]=0,t[7]=0,t[8]=(e+n)*u,t[9]=(a+r)*s,t[10]=(o+i)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*c,t[15]=0,t}function S(t,n,e,r){let i=n[0],o=n[1],s=n[2],c=i-e[0],l=o-e[1],h=s-e[2],f=(0,a.FD)();if(Math.abs(c)<f&&Math.abs(l)<f&&Math.abs(h)<f)return void u(t);let d=1/Math.sqrt(c*c+l*l+h*h);c*=d,l*=d,h*=d;let M=r[0],m=r[1],p=r[2],g=m*h-p*l,b=p*c-M*h,y=M*l-m*c;d=Math.sqrt(g*g+b*b+y*y),d?(d=1/d,g*=d,b*=d,y*=d):(g=0,b=0,y=0);let v=l*y-h*b,_=h*g-c*y,x=c*b-l*g;d=Math.sqrt(v*v+_*_+x*x),d?(d=1/d,v*=d,_*=d,x*=d):(v=0,_=0,x=0),t[0]=g,t[1]=v,t[2]=c,t[3]=0,t[4]=b,t[5]=_,t[6]=l,t[7]=0,t[8]=y,t[9]=x,t[10]=h,t[11]=0,t[12]=-(g*i+b*o+y*s),t[13]=-(v*i+_*o+x*s),t[14]=-(c*i+l*o+h*s),t[15]=1}function O(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function P(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function C(t){let n=(0,a.FD)(),e=t[0],r=t[1],i=t[2],o=t[4],u=t[5],s=t[6],c=t[8],l=t[9],h=t[10];return Math.abs(1-(e*e+o*o+c*c))<=n&&Math.abs(1-(r*r+u*u+l*l))<=n&&Math.abs(1-(i*i+s*s+h*h))<=n}function R(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 T=h,D=O;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t},adjoint:function(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=n[4],u=n[5],s=n[6],c=n[7],l=n[8],h=n[9],f=n[10],d=n[11],M=n[12],m=n[13],p=n[14],g=n[15];return t[0]=u*(f*g-d*p)-h*(s*g-c*p)+m*(s*d-c*f),t[1]=-(r*(f*g-d*p)-h*(a*g-i*p)+m*(a*d-i*f)),t[2]=r*(s*g-c*p)-u*(a*g-i*p)+m*(a*c-i*s),t[3]=-(r*(s*d-c*f)-u*(a*d-i*f)+h*(a*c-i*s)),t[4]=-(o*(f*g-d*p)-l*(s*g-c*p)+M*(s*d-c*f)),t[5]=e*(f*g-d*p)-l*(a*g-i*p)+M*(a*d-i*f),t[6]=-(e*(s*g-c*p)-o*(a*g-i*p)+M*(a*c-i*s)),t[7]=e*(s*d-c*f)-o*(a*d-i*f)+l*(a*c-i*s),t[8]=o*(h*g-d*m)-l*(u*g-c*m)+M*(u*d-c*h),t[9]=-(e*(h*g-d*m)-l*(r*g-i*m)+M*(r*d-i*h)),t[10]=e*(u*g-c*m)-o*(r*g-i*m)+M*(r*c-i*u),t[11]=-(e*(u*d-c*h)-o*(r*d-i*h)+l*(r*c-i*u)),t[12]=-(o*(h*p-f*m)-l*(u*p-s*m)+M*(u*f-s*h)),t[13]=e*(h*p-f*m)-l*(r*p-a*m)+M*(r*f-a*h),t[14]=-(e*(u*p-s*m)-o*(r*p-a*m)+M*(r*s-a*u)),t[15]=e*(u*f-s*h)-o*(r*f-a*h)+l*(r*s-a*u),t},copy:i,determinant:function(t){let n=t[0],e=t[1],r=t[2],a=t[3],i=t[4],o=t[5],u=t[6],s=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],M=t[13],m=t[14],p=t[15];return(n*o-e*i)*(h*p-f*m)-(n*u-r*i)*(l*p-f*M)+(n*s-a*i)*(l*m-h*M)+(e*u-r*o)*(c*p-f*d)-(e*s-a*o)*(c*m-h*d)+(r*s-a*u)*(c*M-l*d)},equals:function(t,n){if(t===n)return!0;let e=t[0],r=t[1],i=t[2],o=t[3],u=t[4],s=t[5],c=t[6],l=t[7],h=t[8],f=t[9],d=t[10],M=t[11],m=t[12],p=t[13],g=t[14],b=t[15],y=n[0],v=n[1],_=n[2],x=n[3],I=n[4],w=n[5],j=n[6],A=n[7],q=n[8],S=n[9],O=n[10],P=n[11],C=n[12],R=n[13],T=n[14],D=n[15],U=(0,a.FD)();return Math.abs(e-y)<=U*Math.max(1,Math.abs(e),Math.abs(y))&&Math.abs(r-v)<=U*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-_)<=U*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-x)<=U*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(u-I)<=U*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(s-w)<=U*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-j)<=U*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(l-A)<=U*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(h-q)<=U*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-S)<=U*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(d-O)<=U*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(M-P)<=U*Math.max(1,Math.abs(M),Math.abs(P))&&Math.abs(m-C)<=U*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(p-R)<=U*Math.max(1,Math.abs(p),Math.abs(R))&&Math.abs(g-T)<=U*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(b-D)<=U*Math.max(1,Math.abs(b),Math.abs(D))},exactEquals:P,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,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=e+e,u=r+r,s=a+a,c=e*o,l=r*o,h=r*u,f=a*o,d=a*u,M=a*s,m=i*o,p=i*u,g=i*s;return t[0]=1-h-M,t[1]=l+g,t[2]=f-p,t[3]=0,t[4]=l-g,t[5]=1-c-M,t[6]=d+m,t[7]=0,t[8]=f+p,t[9]=d-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,n){let e=_,r=-n[0],a=-n[1],i=-n[2],o=n[3],u=n[4],s=n[5],c=n[6],l=n[7],h=r*r+a*a+i*i+o*o;return h>0?(e[0]=2*(u*o+l*r+s*i-c*a)/h,e[1]=2*(s*o+l*a+c*r-u*i)/h,e[2]=2*(c*o+l*i+u*a-s*r)/h):(e[0]=2*(u*o+l*r+s*i-c*a),e[1]=2*(s*o+l*a+c*r-u*i),e[2]=2*(c*o+l*i+u*a-s*r)),v(t,n,e),t},fromRotation:g,fromRotationTranslation:v,fromRotationTranslationScale:j,fromRotationTranslationScaleOrigin:A,fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:p,fromXRotation:b,fromYRotation:function(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:y,frustum:q,getRotation:w,getScale:I,getTranslation:x,hasIdentityRotation:R,identity:u,invert:l,invertOrIdentity:c,isOrthoNormal:C,lookAt:S,mul:T,multiply:h,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t},ortho:function(t,n,e,r,a,i,o){let u=1/(n-e),s=1/(r-a),c=1/(i-o);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+e)*u,t[13]=(a+r)*s,t[14]=(o+i)*c,t[15]=1,t},perspective:function(t,n,e,r,a){let i,o=1/Math.tan(n/2);return t[0]=o/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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!=a&&a!==1/0?(i=1/(r-a),t[10]=(a+r)*i,t[14]=2*a*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,e,r){let a=Math.tan(n.upDegrees*Math.PI/180),i=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),u=Math.tan(n.rightDegrees*Math.PI/180),s=2/(o+u),c=2/(a+i);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-u)*s*.5,t[9]=(a-i)*c*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t},rotate:M,rotateX:m,rotateY:function(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[0],o=n[1],u=n[2],s=n[3],c=n[8],l=n[9],h=n[10],f=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*a-c*r,t[1]=o*a-l*r,t[2]=u*a-h*r,t[3]=s*a-f*r,t[8]=i*r+c*a,t[9]=o*r+l*a,t[10]=u*r+h*a,t[11]=s*r+f*a,t},rotateZ:function(t,n,e){let r=Math.sin(e),a=Math.cos(e),i=n[0],o=n[1],u=n[2],s=n[3],c=n[4],l=n[5],h=n[6],f=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=i*a+c*r,t[1]=o*a+l*r,t[2]=u*a+h*r,t[3]=s*a+f*r,t[4]=c*a-i*r,t[5]=l*a-o*r,t[6]=h*a-u*r,t[7]=f*a-s*r,t},scale:d,set:o,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:D,subtract:O,targetTo:function(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=r[0],s=r[1],c=r[2],l=a-e[0],h=i-e[1],f=o-e[2],d=l*l+h*h+f*f;d>0&&(d=1/Math.sqrt(d),l*=d,h*=d,f*=d);let M=s*f-c*h,m=c*l-u*f,p=u*h-s*l;return d=M*M+m*m+p*p,d>0&&(d=1/Math.sqrt(d),M*=d,m*=d,p*=d),t[0]=M,t[1]=m,t[2]=p,t[3]=0,t[4]=h*p-f*m,t[5]=f*M-l*p,t[6]=l*m-h*M,t[7]=0,t[8]=l,t[9]=h,t[10]=f,t[11]=0,t[12]=a,t[13]=i,t[14]=o,t[15]=1,t},translate:f,transpose:s},Symbol.toStringTag,{value:"Module"}))},35522(t,n,e){e.d(n,{$A:()=>j,Bw:()=>i,C:()=>o,Cc:()=>A,DI:()=>x,Io:()=>b,Ln:()=>g,Om:()=>w,Qr:()=>h,Re:()=>c,S8:()=>I,T9:()=>m,WQ:()=>s,Z0:()=>q,_S:()=>d,aI:()=>D,ei:()=>S,fw:()=>P,gL:()=>O,hG:()=>y,hZ:()=>u,hs:()=>p,jk:()=>M,lw:()=>l,m3:()=>v,oW:()=>U,t2:()=>T,tn:()=>f,ze:()=>_});var r=e(51850),a=e(34304);function i(t){let n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function s(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function c(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function M(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function m(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function g(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function b(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return Math.sqrt(e*e+r*r+a*a)}function y(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2];return e*e+r*r+a*a}function v(t){let n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function _(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function x(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function I(t,n=t){let e=n[0],r=n[1],a=n[2],i=e*e+r*r+a*a;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function w(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function j(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2];return t[0]=a*s-i*u,t[1]=i*o-r*s,t[2]=r*u-a*o,t}function A(t,n,e,r){let a=n[0],i=n[1],o=n[2];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t}function q(t,n,e){let r=n[0],a=n[1],i=n[2];return t[0]=e[0]*r+e[4]*a+e[8]*i+e[12],t[1]=e[1]*r+e[5]*a+e[9]*i+e[13],t[2]=e[2]*r+e[6]*a+e[10]*i+e[14],t}function S(t,n,e){let r=n[0],a=n[1],i=n[2];return t[0]=r*e[0]+a*e[3]+i*e[6],t[1]=r*e[1]+a*e[4]+i*e[7],t[2]=r*e[2]+a*e[5]+i*e[8],t}function O(t,n,e){return P(t,n,e[0],e[1],e[2],e[3])}function P(t,n,e,r,a,i){let o=n[0],u=n[1],s=n[2],c=r*s-a*u,l=a*o-e*s,h=e*u-r*o,f=r*h-a*l,d=a*c-e*h,M=e*l-r*c,m=2*i;return t[0]=o+c*m+2*f,t[1]=u+l*m+2*d,t[2]=s+h*m+2*M,t}const C=(0,r.vt)(),R=(0,r.vt)();function T(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function D(t,n){if(t===n)return!0;let e=t[0],r=t[1],i=t[2],o=n[0],u=n[1],s=n[2],c=(0,a.FD)();return Math.abs(e-o)<=c*Math.max(1,Math.abs(e),Math.abs(o))&&Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(i-s)<=c*Math.max(1,Math.abs(i),Math.abs(s))}function U(t,n,e){let r=e[0]-n[0],a=e[1]-n[1],i=e[2]-n[2],o=r*r+a*a+i*i;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=a*o,t[2]=i*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const N=c,z=l,F=h,$=b,Z=y,V=i,E=v;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:s,angle:function(t,n){I(C,t),I(R,n);let e=w(C,R);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,a,i){let o=1-i,u=o*o,s=i*i,c=u*o,l=3*i*u,h=3*s*o,f=s*i;return t[0]=n[0]*c+e[0]*l+r[0]*h+a[0]*f,t[1]=n[1]*c+e[1]*l+r[1]*h+a[1]*f,t[2]=n[2]*c+e[2]*l+r[2]*h+a[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:o,cross:j,crossAndNormalize:function(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2],c=a*s-i*u,l=i*o-r*s,h=r*u-a*o,f=Math.sqrt(c*c+l*l+h*h);return t[0]=c/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:$,distance:b,div:F,divide:h,dot:w,equals:D,exactEquals:T,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,a,i){let o=i*i,u=o*(2*i-3)+1,s=o*(i-2)+i,c=o*(i-1),l=o*(3-2*i);return t[0]=n[0]*u+e[0]*s+r[0]*c+a[0]*l,t[1]=n[1]*u+e[1]*s+r[1]*c+a[1]*l,t[2]=n[2]*u+e[2]*s+r[2]*c+a[2]*l,t},inverse:x,len:V,length:i,lerp:A,max:m,min:M,mul:z,multiply:l,negate:_,normalize:I,random:function(t,n=1){let e=a.Ov,r=2*e()*Math.PI,i=2*e()-1,o=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=i*n,t},rotateX:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0],i[1]=a[1]*Math.cos(r)-a[2]*Math.sin(r),i[2]=a[1]*Math.sin(r)+a[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[2]*Math.sin(r)+a[0]*Math.cos(r),i[1]=a[1],i[2]=a[2]*Math.cos(r)-a[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){let a=[],i=[];return a[0]=n[0]-e[0],a[1]=n[1]-e[1],a[2]=n[2]-e[2],i[0]=a[0]*Math.cos(r)-a[1]*Math.sin(r),i[1]=a[0]*Math.sin(r)+a[1]*Math.cos(r),i[2]=a[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:g,scaleTo:function(t,n){return p(t,t,n/V(t))},set:u,sign:d,sqrDist:Z,sqrLen:E,squaredDistance:y,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:N,subtract:c,transformMat3:S,transformMat4:q,transformMat4Z:function(t,n){return n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]},transformQuat:O,transformQuatValues:P},Symbol.toStringTag,{value:"Module"})),e.d(n,["Il",0,V,"jb",0,N,"lo",0,Z,"uE",0,E])},78955(t,n,e){e.d(n,{Bw:()=>p,C:()=>a,Cc:()=>v,LI:()=>f,Om:()=>y,S8:()=>b,T9:()=>h,WQ:()=>o,Z0:()=>_,aI:()=>I,hG:()=>m,hZ:()=>i,hs:()=>d,jk:()=>l,m3:()=>g,t2:()=>x});var r=e(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t}function o(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function c(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t}function h(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t}function f(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t}function d(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function M(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+a*a+i*i)}function m(t,n){let e=n[0]-t[0],r=n[1]-t[1],a=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+a*a+i*i}function p(t){let n=t[0],e=t[1],r=t[2],a=t[3];return Math.sqrt(n*n+e*e+r*r+a*a)}function g(t){let n=t[0],e=t[1],r=t[2],a=t[3];return n*n+e*e+r*r+a*a}function b(t,n){let e=n[0],r=n[1],a=n[2],i=n[3],o=e*e+r*r+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e*o,t[1]=r*o,t[2]=a*o,t[3]=i*o),t}function y(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function v(t,n,e,r){let a=n[0],i=n[1],o=n[2],u=n[3];return t[0]=a+r*(e[0]-a),t[1]=i+r*(e[1]-i),t[2]=o+r*(e[2]-o),t[3]=u+r*(e[3]-u),t}function _(t,n,e){let r=n[0],a=n[1],i=n[2],o=n[3];return t[0]=e[0]*r+e[4]*a+e[8]*i+e[12]*o,t[1]=e[1]*r+e[5]*a+e[9]*i+e[13]*o,t[2]=e[2]*r+e[6]*a+e[10]*i+e[14]*o,t[3]=e[3]*r+e[7]*a+e[11]*i+e[15]*o,t}function x(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function I(t,n){let e=t[0],a=t[1],i=t[2],o=t[3],u=n[0],s=n[1],c=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-u)<=h*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(a-s)<=h*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-c)<=h*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-l)<=h*Math.max(1,Math.abs(o),Math.abs(l))}const w=u,j=s,A=c,q=M,S=m,O=p,P=g;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:a,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:q,distance:M,div:A,divide:c,dot:y,equals:I,exactEquals:x,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:O,length:p,lerp:v,max:h,min:l,mul:j,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:b,random:function(t,n=1){let e,a,i,o,u,s,c=r.Ov;do{e=2*c()-1,a=2*c()-1,u=e*e+a*a}while(u>=1);do{i=2*c()-1,o=2*c()-1,s=i*i+o*o}while(s>=1);let l=Math.sqrt((1-u)/s);return t[0]=n*e,t[1]=n*a,t[2]=n*i*l,t[3]=n*o*l,t},round:f,scale:d,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:S,sqrLen:P,squaredDistance:m,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:w,subtract:u,transformMat4:_,transformQuat:function(t,n,e){let r=n[0],a=n[1],i=n[2],o=e[0],u=e[1],s=e[2],c=e[3],l=c*r+u*i-s*a,h=c*a+s*r-o*i,f=c*i+o*a-u*r,d=-o*r-u*a-s*i;return t[0]=l*c+d*-o+h*-s-f*-u,t[1]=h*c+d*-u+f*-o-l*-s,t[2]=f*c+d*-s+l*-u-h*-o,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},56512(t,n,e){function r(t){let n,e,r=[],a=!1;return function(...i){return a&&n===this&&function(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(t[e]!==n[e])return!1;return!0}(i,r)||(e=t.apply(this,i),n=this,r=i,a=!0),e}}e.d(n,{B:()=>r})},76553(t,n,e){function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}e.d(n,{H:()=>r})},13069(t,n,e){e.d(n,{AG:()=>u,lk:()=>a,vD:()=>o,yS:()=>i});const r="randomUUID"in crypto;function a(){if(r)return crypto.randomUUID();let t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;let n=n=>t[n].toString(16).padStart(4,"0");return n(0)+n(1)+"-"+n(2)+"-"+n(3)+"-"+n(4)+"-"+n(5)+n(6)+n(7)}function i(){return`{${a().toUpperCase()}}`}function o(){return`{${a()}}`}function u(t){let n=t.toUpperCase();return t.startsWith("{")?n:`{${n}}`}},4197(t,n,e){e.d(n,{Vj:()=>l,cj:()=>c,jh:()=>i,l5:()=>u,yH:()=>s});var r=e(34275),a=e(9093);function i(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function o(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function u(t,n,e){return Array.isArray(t)?t.slice(n,n+e):t.subarray(n,n+e)}function s(t,n){if(0===n.length)return o(t);if(0===t.length)return o(n);let e=i(t.length+n.length);for(let n=0;n<t.length;++n)e[n]=t[n];for(let r=0;r<n.length;++r)e[t.length+r]=n[r];return e}function c(t){return[...t]}function l(t){let n=(0,a.vt)();for(let e=0;e<16;++e)n[e]=t[e];return n}},70328(t,n,e){e.d(n,{BI:()=>q,C:()=>o,DC:()=>f,Ej:()=>y,Ie:()=>j,Jt:()=>A,Lu:()=>_,Ne:()=>x,RF:()=>h,TF:()=>g,VL:()=>M,aI:()=>O,fA:()=>u,gE:()=>c,gX:()=>b,hZ:()=>w,iT:()=>d,is:()=>S,pg:()=>v,uJ:()=>p,vI:()=>I,vY:()=>s,vt:()=>i,w1:()=>l,yr:()=>m}),e(35522);var r=e(5443),a=(e(19419),e(4197));function i(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,n){for(let e=0;e<6;e++)t[e]=n[e];return t}function u(t,n,e,r,a,o,u=i()){return u[0]=t,u[1]=n,u[2]=e,u[3]=r,u[4]=a,u[5]=o,u}function s(t,n=i()){return function(t,n,e,r=i()){return w(r,P),function(t,n,e=0,r=n.length/3){let a=t[0],i=t[1],o=t[2],u=t[3],s=t[4],c=t[5];for(let t=0;t<r;t++)a=Math.min(a,n[e+3*t]),i=Math.min(i,n[e+3*t+1]),o=Math.min(o,n[e+3*t+2]),u=Math.max(u,n[e+3*t]),s=Math.max(s,n[e+3*t+1]),c=Math.max(c,n[e+3*t+2]);t[0]=a,t[1]=i,t[2]=o,t[3]=u,t[4]=s,t[5]=c}(r,t,n,e),r}(t,0,t.length/3,n)}function c(t,n=(0,a.jh)(24)){let[e,r,i,o,u,s]=t;return n[0]=e,n[1]=r,n[2]=i,n[3]=e,n[4]=r,n[5]=s,n[6]=e,n[7]=u,n[8]=i,n[9]=e,n[10]=u,n[11]=s,n[12]=o,n[13]=r,n[14]=i,n[15]=o,n[16]=r,n[17]=s,n[18]=o,n[19]=u,n[20]=i,n[21]=o,n[22]=u,n[23]=s,n}function l(t,n){return isFinite(t[2])||isFinite(t[5])?new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:n}):new r.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:n})}function h(t,n,e=t){e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e[4]=Math.max(t[4],n[4]),e[5]=Math.max(t[5],n[5])}function f(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[3]=Math.max(t[3],n[2]),t[4]=Math.max(t[4],n[3])}function d(t,[n,e,r]){!function(t,n,e,r){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],e),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],n),t[4]=Math.max(t[4],e),t[5]=Math.max(t[5],r)}(t,n,e,r)}function M(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let n=M(t),e=p(t),r=m(t);return n*n+e*e+r*r}function b(t,n=[0,0,0]){return n[0]=t[0]+M(t)/2,n[1]=t[1]+m(t)/2,n[2]=t[2]+p(t)/2,n}function y(t,n=[0,0,0]){return n[0]=M(t),n[1]=m(t),n[2]=p(t),n}function v(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function _(t,n){return n[0]=t[3],n[1]=t[4],n[2]=t[5],n}function x(t,n,e=t){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e!==t&&(e[3]=t[3],e[4]=t[4],e[5]=t[5]),e}function I(t,n,e=t){return e[3]=n[0],e[4]=n[1],e[5]=n[2],e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2]),t}function w(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function j(t){return t?w(t,P):i(P)}function A(t,n){return t[0]=n[0],t[1]=n[1],t[2]=-1/0,t[3]=n[2],t[4]=n[3],t[5]=1/0,t}function q(t,n,e,r,a){return t[0]=n,t[1]=e,t[2]=-1/0,t[3]=r,t[4]=a,t[5]=1/0,t}function S(t){return 6===t.length}function O(t,n,e){if(null==t||null==n)return t===n;if(!S(t)||!S(n))return!1;if(e){for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}else for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}const P=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];i(),e.d(n,["qv",0,P,"v_",0,C])},71351(t,n,e){e.d(n,{C:()=>h,Cr:()=>f,LV:()=>l,fA:()=>d,kb:()=>M,vt:()=>s});var r=e(4341),a=(e(77690),e(29242)),i=e(35522),o=e(51850),u=e(32114);function s(t){return t?c((0,o.o8)(t.origin),(0,o.o8)(t.direction)):c((0,o.vt)(),(0,o.vt)())}function c(t,n){return{origin:t,direction:n}}function l(t,n){let e=m.get();return e.origin=t,e.direction=n,e}function h(t,n=s()){return d(t.origin,t.direction,n)}function f(t,n,e=s()){return(0,i.C)(e.origin,t),(0,i.Re)(e.direction,n,t),e}function d(t,n,e=s()){return(0,i.C)(e.origin,t),(0,i.C)(e.direction,n),e}function M(t,n){let e=(0,i.$A)(u.rq.get(),(0,i.S8)(u.rq.get(),t.direction),(0,i.Re)(u.rq.get(),n,t.origin));return(0,i.Om)(e,e)}const m=new r.I(()=>s());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,a.vt)()},32114(t,n,e){e.d(n,{Rc:()=>d,rq:()=>h,Km:()=>f}),e(44208);var r=e(26390),a=e(29242),i=e(9093),o=e(82534),u=e(48163),s=e(51850),c=e(91829);class l{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new l(u.vt)}static createVec3f64(){return new l(s.vt)}static createVec4f64(){return new l(c.vt)}static createMat3f64(){return new l(a.vt)}static createMat4f64(){return new l(i.vt)}static createQuatf64(){return new l(o.vt)}get test(){}}l.createVec2f64();const h=l.createVec3f64(),f=l.createVec4f64(),d=(l.createMat3f64(),l.createMat4f64());l.createQuatf64()},85648(t,n,e){e.d(n,{n:()=>a});var r=e(84952);function a(t){return i[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){let n=(0,r.Zo)(t);return s[n]||o}(t.url)}(t)]||u}const i={},o="text/plain",u=i[o],s={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let t in s)i[s[t]]=t},24212(t,n,e){e.d(n,{$7:()=>s,B:()=>u,M7:()=>h,XF:()=>l,tW:()=>c,w7:()=>o});var r=e(56512),a=e(86211),i=e(16271);function o(t,n){return function(t,n){return n?.mode?n.mode:function(t){return t?f:d}(t).mode}(null==t||(t.hasZ??!1),n)}function u(t,n,e){return e&&e.mode!==n?`${t} only support ${n} elevation mode`:null}function s(t,n,e){return e?.mode===n?`${t} do not support ${n} elevation mode`:null}function c(t,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function l(t,n){n&&t.warn(".elevationInfo=",n)}function h(t){return(t?.offset??0)*(0,i.Ao)(t?.unit)}(0,r.B)((t,n,e)=>{if(!t||"decimal-degrees"===n)return 0;let r="unknown"!==n&&n?n:"meters",i=(0,a.mq)(e);return i?(0,a.oU)(t,r,i):0});const f={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}},49718(t,n,e){e(51850),e(6867).w_},6867(t,n,e){e.d(n,{w_:()=>h});var r=e(58083),a=e(9093),i=e(35522),o=e(51850),u=e(78955),s=e(91829),c=e(71351);class l{constructor(){this.intersector=4}get distance(){return this._distance}get renderDistance(){return this._renderDistance}_init(){this._distance=this._renderDistance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(t,n,e,r=null,a=null,i=null){this.intersector=t,this._distance=e,this._renderDistance=r,this.target=n,this.drapedLayerOrder=a,this.renderPriority=i}}class h extends l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,i.hs)(d,this.ray.direction,this.distance),(0,i.Bw)(d))}withinDistance(t){return!!f(this)&&null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!f(this)&&((0,i.hs)(d,this.ray.direction,this.distance),(0,i.WQ)(t,this.ray.origin,d),!0)}getTransformedNormal(t){return(0,i.C)(M,this.normal),M[3]=0,(0,u.Z0)(M,M,this.transformation),(0,i.C)(t,M),(0,i.S8)(t,t)}constructor(t){super(),this.normal=(0,o.vt)(),this.transformation=(0,a.vt)(),this._ray=(0,c.vt)(),this.init(t)}init(t){super._init(),t&&(0,c.C)(t,this._ray)}set(t,n,e,u,s,c,l,h){this._setBase(t,n,e,u,l,h),(0,i.C)(this.normal,s??o.Cb),(0,r.C)(this.transformation,c??a.zK)}copy(t){this._setBase(t.intersector,t.target,t.distance,t.renderDistance,t.drapedLayerOrder,t.renderPriority),(0,c.C)(t.ray,this._ray),(0,i.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function f(t){return null!=t?.distance&&null!=t?.renderDistance}const d=(0,o.vt)(),M=(0,s.vt)()},78553(t,n,e){e.d(n,{D:()=>i,p:()=>a});var r=e(78888);function a(t){let n=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(n,100))}function i(t){let n=1-t/100;return Math.max(0,Math.min(n,1))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[77],{11006(t,e,n){function i(t,e,n,i,a){r(t,e,n||0,i||t.length-1,a||o)}function r(t,e,n,i,o){for(;i>n;){if(i-n>600){var l=i-n+1,s=e-n+1,h=Math.log(l),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(l-c)/l)*(s-l/2<0?-1:1);r(t,e,Math.max(n,Math.floor(e-s*c/l+u)),Math.min(i,Math.floor(e+(l-s)*c/l+u)),o)}var m=t[e],f=n,p=i;for(a(t,n,e),o(t[i],m)>0&&a(t,n,i);f<p;){for(a(t,f,p),f++,p--;o(t[f],m)<0;)f++;for(;o(t[p],m)>0;)p--}0===o(t[n],m)?a(t,n,p):a(t,++p,i),p<=e&&(n=p+1),e<=p&&(i=p-1)}}function a(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function o(t,e){return t<e?-1:+(t>e)}n.d(e,{q:()=>i})},4341(t,e,n){n.d(e,{I:()=>r});var i=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,a));t++)this._items.push(this._allocator())}}const a=1024},75503(t,e,n){n.d(e,{wq:()=>l});var i=n(4576),r=n(21818),a=(n(44208),n(15142)),o=n(11006);class l{constructor(t=9,e){this._compareMinX=m,this._compareMinY=f,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(),Y.prune(),w.prune(),B.prune()}all(t){s(this._data,t)}search(t,e){let n=this._data,i=this._toBBox;if(v(t,n))for(X.clear();n;){for(let r=0,a=n.children.length;r<a;r++){let a=n.children[r],o=n.leaf?i(a):a;v(t,o)&&(n.leaf?e(a):g(t,o)?s(a,e):X.push(a))}n=X.pop()}}collides(t){let e=this._data,n=this._toBBox;if(!v(t,e))return!1;for(X.clear();e;){for(let i=0,r=e.children.length;i<r;i++){let r=e.children[i],a=e.leaf?n(r):r;if(v(t,a)){if(e.leaf||g(t,a))return!0;X.push(r)}}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-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){let 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 y([]),this}remove(t){if(!t)return this;let e,n=this._data,a=null,o=0,l=!1,s=this._toBBox(t);for(w.clear(),B.clear();n||w.length>0;){if(n||(n=w.pop(),a=w.data[w.length-1],o=B.pop()??0,l=!0),n.leaf&&(e=(0,i.qh)(n.children,(0,r.z)(t),n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),w.push(n),this._condense(w),this;l||n.leaf||!g(n,s)?a?(o++,n=a.children[o],l=!1):n=null:(w.push(n),B.push(o),o=0,a=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,n,i){let r=n-e+1,a=this._maxEntries;if(r<=a){let i=new y(t.slice(e,n+1));return h(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/a**(i-1)));let o=new b([]);o.height=i;let l=Math.ceil(r/a),s=l*Math.ceil(Math.sqrt(a));M(t,e,n,s,this._compareMinX);for(let r=e;r<=n;r+=s){let e=Math.min(r+s-1,n);M(t,r,e,l,this._compareMinY);for(let n=r;n<=e;n+=l){let r=Math.min(n+l-1,e);o.children.push(this._build(t,n,r,i-1))}}return h(o,this._toBBox),o}_insert(t,e,n){let i=this._toBBox,r=n?t:i(t);w.clear();let a=function(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let a=0,o=e.children.length;a<o;a++){let o=e.children[a],l=p(o),s=x(t,o)-l;s<r?(r=s,i=l<i?l:i,n=o):s===r&&l<i&&(i=l,n=o)}e=n||e.children[0]}return e}(r,this._data,e,w);for(a.children.push(t),u(a,r);e>=0&&w.data[e].children.length>this._maxEntries;)this._split(w,e),e--;!function(t,e,n){for(let i=n;i>=0;i--)u(e.data[i],t)}(r,w,e)}_split(t,e){let n=t.data[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);let a=this._chooseSplitIndex(n,r,i);if(!a)return;let o=n.children.splice(a,n.children.length-a),l=n.leaf?new y(o):new b(o);l.height=n.height,h(n,this._toBBox),h(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new b([t,e]),this._data.height=t.height+1,h(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,r,a;i=r=1/0;for(let o=e;o<=n-e;o++){let e=c(t,0,o,this._toBBox),l=c(t,o,n,this._toBBox),s=_(e,l),h=p(e)+p(l);s<i?(i=s,a=o,r=h<r?h:r):s===i&&h<r&&(r=h,a=o)}return a}_chooseSplitAxis(t,e,n){let i=t.leaf?this._compareMinX:m,r=t.leaf?this._compareMinY:f;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);let r=this._toBBox,a=c(t,0,e,r),o=c(t,n-e,n,r),l=d(a)+d(o);for(let i=e;i<n-e;i++){let e=t.children[i];u(a,t.leaf?r(e):e),l+=d(a)}for(let i=n-e-1;i>=e;i--){let e=t.children[i];u(o,t.leaf?r(e):e),l+=d(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let n=t.data[e];if(0===n.children.length)if(e>0){let r=t.data[e-1],a=r.children;a.splice((0,i.qh)(a,n,a.length,r.indexHint),1)}else this.clear();else h(n,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function s(t,e){let n=t;for(Y.clear();n;){if(!0===n.leaf)for(let t of n.children)e((0,r.z)(t));else Y.pushArray(n.children);n=Y.pop()??null}}function h(t,e){c(t,0,t.children.length,e,t)}function c(t,e,n,i,r){r||=new y([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let a,o=e;o<n;o++)a=t.children[o],u(r,t.leaf?i(a):a);return r}function u(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 m(t,e){return t.minX-e.minX}function f(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function x(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 _(t,e){let n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),a=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,a-i)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,n,i,r){let a=[e,n];for(;a.length;){let e=a.pop(),n=a.pop();if(e-n<=i)continue;let l=n+Math.ceil((e-n)/i/2)*i;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const X=new a.A,Y=new a.A,w=new a.A,B=new a.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class R extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class y extends R{constructor(t){super(),this.children=t,this.leaf=!0}}class b extends R{constructor(t){super(),this.children=t,this.leaf=!1}}},83027(t,e,n){const i=n(29953).ho;n.d(e,["h",0,i])},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>f,LV:()=>h,_I:()=>m,kb:()=>u,vt:()=>s});var i=n(34727),r=n(4341),a=n(35522),o=n(51850),l=n(32114);function s(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function h(t,e){let n=p.get();return n.origin=t,n.vector=e,n}function c(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.Re)(n.vector,e,t),n}function u(t,e){let n=(0,a.Re)(l.rq.get(),e,t.origin),r=(0,a.Om)(t.vector,n),o=(0,a.Om)(t.vector,t.vector);if(Math.abs(o)<d)return(0,a.hG)(t.origin,e);let s=(0,i.qE)(r/o,0,1),h=(0,a.Re)(l.rq.get(),(0,a.hs)(l.rq.get(),t.vector,s),n);return(0,a.Om)(h,h)}function m(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,o){let{vector:s,origin:h}=t,c=(0,a.Re)(l.rq.get(),e,h),u=(0,a.Om)(s,c)/(0,a.m3)(s);return(0,a.hs)(o,s,(0,i.qE)(u,n,r)),(0,a.WQ)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)();const p=new r.I(()=>s()),d=1e-9},38419(t,e,n){n.r(e),n.d(e,{default:()=>l});var i=n(44208),r=n(75503),a=n(95696),o=n(72258);class l{async createIndex(t,e){if(!t.vertexAttributes?.position)return new r.wq;let n=function(t){let{vertexAttributes:{position:e},vertexSpace:n,spatialReference:i,transform:r}=t,l=(0,o.UR)({vertexAttributes:{position:e},vertexSpace:n,spatialReference:i,transform:r},a.A.absolute,{allowBufferReuse:!0})?.position;return l?!t.components||t.components.some(t=>!t.faces)?{position:l.buffer}:{position:l.buffer,components:t.components.map(t=>t.faces)}:null}(t),i=null==e?this.createIndexThread(n).result:await e.invoke("createIndexThread",n,{transferList:[]});return s().fromJSON(i)}createIndexThread(t){let e=s();if(!t)return{result:e.toJSON()};let n=new Float64Array(t.position);return t.components?function(t,e,n){let i=0;for(let t of n)i+=t.length/3;let r=Array(i),a=0;for(let t of n)for(let n=0;n<t.length;n+=3)r[a++]=h(e,3*t[n],3*t[n+1],3*t[n+2]);return t.load(r),{result:t.toJSON()}}(e,n,t.components.map(t=>new Uint32Array(t))):function(t,e){let n=Array(e.length/9),i=0;for(let t=0;t<e.length;t+=9)n[i++]=h(e,t,t+3,t+6);return t.load(n),{result:t.toJSON()}}(e,n)}}function s(){return new r.wq(9,(0,i.A)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function h(t,e,n,i){return{minX:Math.min(t[e],t[n],t[i]),maxX:Math.max(t[e],t[n],t[i]),minY:Math.min(t[e+1],t[n+1],t[i+1]),maxY:Math.max(t[e+1],t[n+1],t[i+1]),p0:[t[e],t[e+1],t[e+2]],p1:[t[n],t[n+1],t[n+2]],p2:[t[i],t[i+1],t[i+2]]}}},60077(t,e,n){n.d(e,{create:()=>u});var i=n(32198),r=n(83027),a=n(91429),o=n(51850),l=n(71351),s=n(48295),h=n(38419),c=n(7236);async function u(t,e){let n=await(++p,x&&=(clearTimeout(x),0),d||(d=(0,r.h)("ElevationSamplerWorker").catch(()=>null),d)),i=await f.createIndex(t,n);!function(t){--p,null!=t&&0===p&&(x=setTimeout(()=>{t.close(),d=null,x=0},_))}(n);let a=t.spatialReference,o=t.extent.clone();return new m({spatialReference:a,extent:o,noDataValue:e?.noDataValue||0,rindex:i})}let m=class extends c.A{constructor(t){super(t),this.demResolution={min:0,max:0}}elevationAt(t,e){let n=-1/0;return(0,l.fA)([t,e,0],[0,0,-1],g),this.rindex.search({minX:t,maxX:t,minY:e,maxY:e},t=>{(0,s.Ui)(t,g,v)&&v[2]>n&&(n=v[2])}),n===-1/0?this.noDataValue:n}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"rindex",void 0),m=(0,i.Cg)([(0,a.$K)("esri.geometry.support.meshUtils.elevationSampler")],m);const f=new h.default;let p=0,d=null,x=0;const _=1e4,g=(0,l.fA)([0,0,0],[0,0,-1]),v=(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>u,Cr:()=>m,LV:()=>c,fA:()=>f,kb:()=>p,vt:()=>s}),n(4576);var i=n(4341),r=(n(77690),n(29242)),a=n(35522),o=n(51850),l=n(32114);function s(t){return t?h((0,o.o8)(t.origin),(0,o.o8)(t.direction)):h((0,o.vt)(),(0,o.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=d.get();return n.origin=t,n.direction=e,n}function u(t,e=s()){return f(t.origin,t.direction,e)}function m(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.Re)(n.direction,e,t),n}function f(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.C)(n.direction,e),n}function p(t,e){let n=(0,a.$A)(l.rq.get(),(0,a.S8)(l.rq.get(),t.direction),(0,a.Re)(l.rq.get(),e,t.origin));return(0,a.Om)(n,n)}const d=new i.I(()=>s());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,r.vt)()},48295(t,e,n){n.d(e,{BU:()=>c,Ui:()=>l,cq:()=>h,k3:()=>u,rb:()=>m});var i=n(4341),r=n(35522),a=n(51850),o=n(11964);function l(t,e,n){let{direction:i,origin:a}=e,{p0:o,p1:l,p2:s}=t,h=l[0]-o[0],c=l[1]-o[1],u=l[2]-o[2],m=s[0]-o[0],f=s[1]-o[1],p=s[2]-o[2],d=i[1]*p-f*i[2],x=i[2]*m-p*i[0],_=i[0]*f-m*i[1],g=h*d+c*x+u*_;if(g>-1e-5&&g<1e-5)return!1;let v=1/g,M=a[0]-o[0],X=a[1]-o[1],Y=a[2]-o[2],w=v*(M*d+X*x+Y*_);if(w<0||w>1)return!1;let B=X*u-c*Y,A=Y*h-u*M,R=M*c-h*X,y=v*(i[0]*B+i[1]*A+i[2]*R);if(y<0||w+y>1)return!1;if(n){let t=v*(m*B+f*A+p*R);(0,r.hs)(n,i,t),(0,r.WQ)(n,a,n)}return!0}function s(t,e,n){let[i,r]=t,[a,o]=e,[l,s]=n;return.5*((a-i)*(s-r)-(o-r)*(l-i))}function h(t,e,n,i,r=0){let a=s(i,t,e),o=s(i,e,n),l=s(i,n,t);return!((a<-r||o<-r||l<-r)&&(a>r||o>r||l>r))}function c(t,e,n){return(0,r.Re)(f,e,t),(0,r.Re)(p,n,t),.5*(0,r.Bw)((0,r.$A)(f,f,p))}function u(t,e,n,i,a){(0,r.jb)(f,i,n),(0,r.jb)(d,a,n),(0,r.jb)(p,e,n);let o=(0,r.Om)(f,p),l=(0,r.Om)(d,p);if(o<=0&&l<=0)return void(0,r.C)(t,n);(0,r.jb)(p,e,i);let s=(0,r.Om)(f,p),h=(0,r.Om)(d,p);if(s>=0&&h<=s)return void(0,r.C)(t,i);let c=o*h-s*l;if(c<=0&&o>=0&&s<=0)return void(0,r.Ln)(t,n,f,o/(o-s));(0,r.jb)(p,e,a);let u=(0,r.Om)(f,p),m=(0,r.Om)(d,p);if(m>=0&&u<=m)return void(0,r.C)(t,a);let x=u*l-o*m;if(x<=0&&l>=0&&m<=0)return void(0,r.Ln)(t,n,d,l/(l-m));let _=s*m-u*h;if(_<=0&&h-s>=0&&u-m>=0)return(0,r.jb)(p,a,i),void(0,r.Ln)(t,i,p,(h-s)/(h-s+(u-m)));let g=1/(_+x+c);(0,r.C)(t,n),(0,r.Ln)(t,t,f,x*g),(0,r.Ln)(t,t,d,c*g)}function m(t,e,n,i){(0,r.jb)(f,n,e),(0,r.jb)(p,i,e),(0,r.$A)(t,f,p);let a=(0,r.Bw)(t);return 0!==a&&((0,r.hs)(t,t,1/a),!0)}n(32114),new i.I(o.vt),new i.I(()=>{return t?{p0:(0,a.o8)(t.p0),p1:(0,a.o8)(t.p1),p2:(0,a.o8)(t.p2)}:{p0:(0,a.vt)(),p1:(0,a.vt)(),p2:(0,a.vt)()};var t});const f=(0,a.vt)(),p=(0,a.vt)(),d=(0,a.vt)()},7236(t,e,n){n.d(e,{A:()=>h});var i=n(32198),r=n(65529),a=n(53966),o=n(91429),l=n(86738),s=n(28735);let h=class extends r.nJ{queryElevation(t){let e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;switch(t.type){case"point":return function(t,e,n){return t.hasZ=!0,t.z=n.elevationAt(e.x,e.y),t}(t,e,this);case"polyline":return function(t,e,n){c.spatialReference=e.spatialReference;let i=t.hasM&&!t.hasZ;for(let r=0;r<t.paths.length;r++){let a=t.paths[r],o=e.paths[r];for(let t=0;t<a.length;t++){let e=a[t],r=o[t];c.x=r[0],c.y=r[1],i&&(e[3]=e[2]),e[2]=n.elevationAt(c.x,c.y)}}return t.hasZ=!0,t}(t,e,this);case"multipoint":return function(t,e,n){c.spatialReference=e.spatialReference;let i=t.hasM&&!t.hasZ;for(let r=0;r<t.points.length;r++){let a=t.points[r],o=e.points[r];c.x=o[0],c.y=o[1],i&&(a[3]=a[2]),a[2]=n.elevationAt(c.x,c.y)}return t.hasZ=!0,t}(t,e,this);default:return null}}projectIfRequired(t,e){if(null==t)return null;let n=t.spatialReference;if(n.equals(e))return t;let i=(0,s.Cv)(t,e);return i||a.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),i}};h=(0,i.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],h);const c=new l.A}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[77],{11006(t,e,n){function i(t,e,n,i,a){r(t,e,n||0,i||t.length-1,a||o)}function r(t,e,n,i,o){for(;i>n;){if(i-n>600){var l=i-n+1,s=e-n+1,h=Math.log(l),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(l-c)/l)*(s-l/2<0?-1:1);r(t,e,Math.max(n,Math.floor(e-s*c/l+u)),Math.min(i,Math.floor(e+(l-s)*c/l+u)),o)}var m=t[e],f=n,p=i;for(a(t,n,e),o(t[i],m)>0&&a(t,n,i);f<p;){for(a(t,f,p),f++,p--;o(t[f],m)<0;)f++;for(;o(t[p],m)>0;)p--}0===o(t[n],m)?a(t,n,p):a(t,++p,i),p<=e&&(n=p+1),e<=p&&(i=p-1)}}function a(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function o(t,e){return t<e?-1:+(t>e)}n.d(e,{q:()=>i})},4341(t,e,n){n.d(e,{I:()=>r});var i=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,a));t++)this._items.push(this._allocator())}}const a=1024},75503(t,e,n){n.d(e,{wq:()=>l});var i=n(4576),r=n(21818),a=(n(44208),n(15142)),o=n(11006);class l{constructor(t=9,e){this._compareMinX=m,this._compareMinY=f,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(),Y.prune(),w.prune(),B.prune()}all(t){s(this._data,t)}search(t,e){let n=this._data,i=this._toBBox;if(v(t,n))for(X.clear();n;){for(let r=0,a=n.children.length;r<a;r++){let a=n.children[r],o=n.leaf?i(a):a;v(t,o)&&(n.leaf?e(a):g(t,o)?s(a,e):X.push(a))}n=X.pop()}}collides(t){let e=this._data,n=this._toBBox;if(!v(t,e))return!1;for(X.clear();e;){for(let i=0,r=e.children.length;i<r;i++){let r=e.children[i],a=e.leaf?n(r):r;if(v(t,a)){if(e.leaf||g(t,a))return!0;X.push(r)}}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-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){let 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 y([]),this}remove(t){if(!t)return this;let e,n=this._data,a=null,o=0,l=!1,s=this._toBBox(t);for(w.clear(),B.clear();n||w.length>0;){if(n||(n=w.pop(),a=w.data[w.length-1],o=B.pop()??0,l=!0),n.leaf&&(e=(0,i.qh)(n.children,(0,r.z)(t),n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),w.push(n),this._condense(w),this;l||n.leaf||!g(n,s)?a?(o++,n=a.children[o],l=!1):n=null:(w.push(n),B.push(o),o=0,a=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,n,i){let r=n-e+1,a=this._maxEntries;if(r<=a){let i=new y(t.slice(e,n+1));return h(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/a**(i-1)));let o=new b([]);o.height=i;let l=Math.ceil(r/a),s=l*Math.ceil(Math.sqrt(a));M(t,e,n,s,this._compareMinX);for(let r=e;r<=n;r+=s){let e=Math.min(r+s-1,n);M(t,r,e,l,this._compareMinY);for(let n=r;n<=e;n+=l){let r=Math.min(n+l-1,e);o.children.push(this._build(t,n,r,i-1))}}return h(o,this._toBBox),o}_insert(t,e,n){let i=this._toBBox,r=n?t:i(t);w.clear();let a=function(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let a=0,o=e.children.length;a<o;a++){let o=e.children[a],l=p(o),s=x(t,o)-l;s<r?(r=s,i=l<i?l:i,n=o):s===r&&l<i&&(i=l,n=o)}e=n||e.children[0]}return e}(r,this._data,e,w);for(a.children.push(t),u(a,r);e>=0&&w.data[e].children.length>this._maxEntries;)this._split(w,e),e--;!function(t,e,n){for(let i=n;i>=0;i--)u(e.data[i],t)}(r,w,e)}_split(t,e){let n=t.data[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);let a=this._chooseSplitIndex(n,r,i);if(!a)return;let o=n.children.splice(a,n.children.length-a),l=n.leaf?new y(o):new b(o);l.height=n.height,h(n,this._toBBox),h(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new b([t,e]),this._data.height=t.height+1,h(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,r,a;i=r=1/0;for(let o=e;o<=n-e;o++){let e=c(t,0,o,this._toBBox),l=c(t,o,n,this._toBBox),s=_(e,l),h=p(e)+p(l);s<i?(i=s,a=o,r=h<r?h:r):s===i&&h<r&&(r=h,a=o)}return a}_chooseSplitAxis(t,e,n){let i=t.leaf?this._compareMinX:m,r=t.leaf?this._compareMinY:f;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);let r=this._toBBox,a=c(t,0,e,r),o=c(t,n-e,n,r),l=d(a)+d(o);for(let i=e;i<n-e;i++){let e=t.children[i];u(a,t.leaf?r(e):e),l+=d(a)}for(let i=n-e-1;i>=e;i--){let e=t.children[i];u(o,t.leaf?r(e):e),l+=d(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let n=t.data[e];if(0===n.children.length)if(e>0){let r=t.data[e-1],a=r.children;a.splice((0,i.qh)(a,n,a.length,r.indexHint),1)}else this.clear();else h(n,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function s(t,e){let n=t;for(Y.clear();n;){if(!0===n.leaf)for(let t of n.children)e((0,r.z)(t));else Y.pushArray(n.children);n=Y.pop()??null}}function h(t,e){c(t,0,t.children.length,e,t)}function c(t,e,n,i,r){r||=new y([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let a,o=e;o<n;o++)a=t.children[o],u(r,t.leaf?i(a):a);return r}function u(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 m(t,e){return t.minX-e.minX}function f(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function x(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 _(t,e){let n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),a=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,a-i)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,n,i,r){let a=[e,n];for(;a.length;){let e=a.pop(),n=a.pop();if(e-n<=i)continue;let l=n+Math.ceil((e-n)/i/2)*i;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const X=new a.A,Y=new a.A,w=new a.A,B=new a.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class R extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class y extends R{constructor(t){super(),this.children=t,this.leaf=!0}}class b extends R{constructor(t){super(),this.children=t,this.leaf=!1}}},83027(t,e,n){const i=n(29953).ho;n.d(e,["h",0,i])},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>f,LV:()=>h,_I:()=>m,kb:()=>u,vt:()=>s});var i=n(34727),r=n(4341),a=n(35522),o=n(51850),l=n(32114);function s(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function h(t,e){let n=p.get();return n.origin=t,n.vector=e,n}function c(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.Re)(n.vector,e,t),n}function u(t,e){let n=(0,a.Re)(l.rq.get(),e,t.origin),r=(0,a.Om)(t.vector,n),o=(0,a.Om)(t.vector,t.vector);if(Math.abs(o)<d)return(0,a.hG)(t.origin,e);let s=(0,i.qE)(r/o,0,1),h=(0,a.Re)(l.rq.get(),(0,a.hs)(l.rq.get(),t.vector,s),n);return(0,a.Om)(h,h)}function m(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,o){let{vector:s,origin:h}=t,c=(0,a.Re)(l.rq.get(),e,h),u=(0,a.Om)(s,c)/(0,a.m3)(s);return(0,a.hs)(o,s,(0,i.qE)(u,n,r)),(0,a.WQ)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)();const p=new r.I(()=>s()),d=1e-9},38419(t,e,n){n.r(e),n.d(e,{default:()=>l});var i=n(44208),r=n(75503),a=n(95696),o=n(72258);class l{async createIndex(t,e){if(!t.vertexAttributes?.position)return new r.wq;let n=function(t){let{vertexAttributes:{position:e},vertexSpace:n,spatialReference:i,transform:r}=t,l=(0,o.UR)({vertexAttributes:{position:e},vertexSpace:n,spatialReference:i,transform:r},a.A.absolute,{allowBufferReuse:!0})?.position;return l?!t.components||t.components.some(t=>!t.faces)?{position:l.buffer}:{position:l.buffer,components:t.components.map(t=>t.faces)}:null}(t),i=null==e?this.createIndexThread(n).result:await e.invoke("createIndexThread",n,{transferList:[]});return s().fromJSON(i)}createIndexThread(t){let e=s();if(!t)return{result:e.toJSON()};let n=new Float64Array(t.position);return t.components?function(t,e,n){let i=0;for(let t of n)i+=t.length/3;let r=Array(i),a=0;for(let t of n)for(let n=0;n<t.length;n+=3)r[a++]=h(e,3*t[n],3*t[n+1],3*t[n+2]);return t.load(r),{result:t.toJSON()}}(e,n,t.components.map(t=>new Uint32Array(t))):function(t,e){let n=Array(e.length/9),i=0;for(let t=0;t<e.length;t+=9)n[i++]=h(e,t,t+3,t+6);return t.load(n),{result:t.toJSON()}}(e,n)}}function s(){return new r.wq(9,(0,i.A)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function h(t,e,n,i){return{minX:Math.min(t[e],t[n],t[i]),maxX:Math.max(t[e],t[n],t[i]),minY:Math.min(t[e+1],t[n+1],t[i+1]),maxY:Math.max(t[e+1],t[n+1],t[i+1]),p0:[t[e],t[e+1],t[e+2]],p1:[t[n],t[n+1],t[n+2]],p2:[t[i],t[i+1],t[i+2]]}}},60077(t,e,n){n.d(e,{create:()=>u});var i=n(32198),r=n(83027),a=n(91429),o=n(51850),l=n(71351),s=n(48295),h=n(38419),c=n(7236);async function u(t,e){let n=await(++p,x&&=(clearTimeout(x),0),d||(d=(0,r.h)("ElevationSamplerWorker").catch(()=>null),d)),i=await f.createIndex(t,n);!function(t){--p,null!=t&&0===p&&(x=setTimeout(()=>{t.close(),d=null,x=0},_))}(n);let a=t.spatialReference,o=t.extent.clone();return new m({spatialReference:a,extent:o,noDataValue:e?.noDataValue||0,rindex:i})}let m=class extends c.A{constructor(t){super(t),this.demResolution={min:0,max:0}}elevationAt(t,e){let n=-1/0;return(0,l.fA)([t,e,0],[0,0,-1],g),this.rindex.search({minX:t,maxX:t,minY:e,maxY:e},t=>{(0,s.Ui)(t,g,v)&&v[2]>n&&(n=v[2])}),n===-1/0?this.noDataValue:n}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"rindex",void 0),m=(0,i.Cg)([(0,a.$K)("esri.geometry.support.meshUtils.elevationSampler")],m);const f=new h.default;let p=0,d=null,x=0;const _=1e4,g=(0,l.fA)([0,0,0],[0,0,-1]),v=(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>u,Cr:()=>m,LV:()=>c,fA:()=>f,kb:()=>p,vt:()=>s});var i=n(4341),r=(n(77690),n(29242)),a=n(35522),o=n(51850),l=n(32114);function s(t){return t?h((0,o.o8)(t.origin),(0,o.o8)(t.direction)):h((0,o.vt)(),(0,o.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=d.get();return n.origin=t,n.direction=e,n}function u(t,e=s()){return f(t.origin,t.direction,e)}function m(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.Re)(n.direction,e,t),n}function f(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.C)(n.direction,e),n}function p(t,e){let n=(0,a.$A)(l.rq.get(),(0,a.S8)(l.rq.get(),t.direction),(0,a.Re)(l.rq.get(),e,t.origin));return(0,a.Om)(n,n)}const d=new i.I(()=>s());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,r.vt)()},48295(t,e,n){n.d(e,{BU:()=>c,Ui:()=>l,cq:()=>h,k3:()=>u,rb:()=>m});var i=n(4341),r=n(35522),a=n(51850),o=n(11964);function l(t,e,n){let{direction:i,origin:a}=e,{p0:o,p1:l,p2:s}=t,h=l[0]-o[0],c=l[1]-o[1],u=l[2]-o[2],m=s[0]-o[0],f=s[1]-o[1],p=s[2]-o[2],d=i[1]*p-f*i[2],x=i[2]*m-p*i[0],_=i[0]*f-m*i[1],g=h*d+c*x+u*_;if(g>-1e-5&&g<1e-5)return!1;let v=1/g,M=a[0]-o[0],X=a[1]-o[1],Y=a[2]-o[2],w=v*(M*d+X*x+Y*_);if(w<0||w>1)return!1;let B=X*u-c*Y,A=Y*h-u*M,R=M*c-h*X,y=v*(i[0]*B+i[1]*A+i[2]*R);if(y<0||w+y>1)return!1;if(n){let t=v*(m*B+f*A+p*R);(0,r.hs)(n,i,t),(0,r.WQ)(n,a,n)}return!0}function s(t,e,n){let[i,r]=t,[a,o]=e,[l,s]=n;return.5*((a-i)*(s-r)-(o-r)*(l-i))}function h(t,e,n,i,r=0){let a=s(i,t,e),o=s(i,e,n),l=s(i,n,t);return!((a<-r||o<-r||l<-r)&&(a>r||o>r||l>r))}function c(t,e,n){return(0,r.Re)(f,e,t),(0,r.Re)(p,n,t),.5*(0,r.Bw)((0,r.$A)(f,f,p))}function u(t,e,n,i,a){(0,r.jb)(f,i,n),(0,r.jb)(d,a,n),(0,r.jb)(p,e,n);let o=(0,r.Om)(f,p),l=(0,r.Om)(d,p);if(o<=0&&l<=0)return void(0,r.C)(t,n);(0,r.jb)(p,e,i);let s=(0,r.Om)(f,p),h=(0,r.Om)(d,p);if(s>=0&&h<=s)return void(0,r.C)(t,i);let c=o*h-s*l;if(c<=0&&o>=0&&s<=0)return void(0,r.Ln)(t,n,f,o/(o-s));(0,r.jb)(p,e,a);let u=(0,r.Om)(f,p),m=(0,r.Om)(d,p);if(m>=0&&u<=m)return void(0,r.C)(t,a);let x=u*l-o*m;if(x<=0&&l>=0&&m<=0)return void(0,r.Ln)(t,n,d,l/(l-m));let _=s*m-u*h;if(_<=0&&h-s>=0&&u-m>=0)return(0,r.jb)(p,a,i),void(0,r.Ln)(t,i,p,(h-s)/(h-s+(u-m)));let g=1/(_+x+c);(0,r.C)(t,n),(0,r.Ln)(t,t,f,x*g),(0,r.Ln)(t,t,d,c*g)}function m(t,e,n,i){(0,r.jb)(f,n,e),(0,r.jb)(p,i,e),(0,r.$A)(t,f,p);let a=(0,r.Bw)(t);return 0!==a&&((0,r.hs)(t,t,1/a),!0)}n(32114),new i.I(o.vt),new i.I(()=>{return t?{p0:(0,a.o8)(t.p0),p1:(0,a.o8)(t.p1),p2:(0,a.o8)(t.p2)}:{p0:(0,a.vt)(),p1:(0,a.vt)(),p2:(0,a.vt)()};var t});const f=(0,a.vt)(),p=(0,a.vt)(),d=(0,a.vt)()},7236(t,e,n){n.d(e,{A:()=>h});var i=n(32198),r=n(65529),a=n(53966),o=n(91429),l=n(86738),s=n(28735);let h=class extends r.nJ{queryElevation(t){let e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;switch(t.type){case"point":return function(t,e,n){return t.hasZ=!0,t.z=n.elevationAt(e.x,e.y),t}(t,e,this);case"polyline":return function(t,e,n){c.spatialReference=e.spatialReference;let i=t.hasM&&!t.hasZ;for(let r=0;r<t.paths.length;r++){let a=t.paths[r],o=e.paths[r];for(let t=0;t<a.length;t++){let e=a[t],r=o[t];c.x=r[0],c.y=r[1],i&&(e[3]=e[2]),e[2]=n.elevationAt(c.x,c.y)}}return t.hasZ=!0,t}(t,e,this);case"multipoint":return function(t,e,n){c.spatialReference=e.spatialReference;let i=t.hasM&&!t.hasZ;for(let r=0;r<t.points.length;r++){let a=t.points[r],o=e.points[r];c.x=o[0],c.y=o[1],i&&(a[3]=a[2]),a[2]=n.elevationAt(c.x,c.y)}return t.hasZ=!0,t}(t,e,this);default:return null}}projectIfRequired(t,e){if(null==t)return null;let n=t.spatialReference;if(n.equals(e))return t;let i=(0,s.Cv)(t,e);return i||a.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),i}};h=(0,i.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],h);const c=new l.A}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4934],{67996(e,t,r){r.d(t,{cZ:()=>S,XW:()=>F,fe:()=>k});var i=r(56507),n=r(49186),s=r(91869),a=(r(90708),r(92722)),o=r(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new u}}class u{constructor(){this.objectIdFieldName="",this.uniqueIdField=new d,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new h,this.geometryType=null,this.spatialReference=new o.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new c,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class d{constructor(){this.name="",this.isSystemMaintained=!1}}class h{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class c{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class f{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class g{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var M=r(45724),I=r(93637),C=r(49403);const _={upperLeft:0,lowerLeft:1},T={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};function v(e){let t=new l;t.version=e.version;let r=e.get_query_result();if(0!==r.results_type.value)throw Error("Got a non-feature collection type");let i=r.get_feature_result(),n=t.queryResult.featureResult;n.objectIdFieldName=i.objectid_field_name,n.exceededTransferLimit=i.exceeded_transfer_limit,n.hasM=i.has_m,n.hasZ=i.has_z,n.geometryType=(0,I.i7)(C.bV,i.geometry_type.value),n.globalIdFieldName=i.globalid_field_name,n.geohashFieldName=i.geohash_field_name;let s=n.uniqueIdField,a=i.unique_id_field;s.name=a.name,s.isSystemMaintained=a.isSystemMaintained;let o=n.geometryProperties,p=i.geometry_properties;o.shapeAreaFieldName=p.shapeAreaFieldName,o.shapeLengthFieldName=p.shapeLengthFieldName,o.units=p.units;let u=n.spatialReference,d=i.spatial_reference;u.wkid=d.wkid,u.latestWkid=d.latestWkid,u.vcsWkid=d.vcsWkid,u.latestVcsWkid=d.latestVcsWkid,u.wkt=d.wkt,n.transform=function(e){let t=new c;t.quantizeOriginPosition=(0,I.i7)(_,e.quantizeOriginPosition.value);let r=t.scale,i=e.scale;r.xScale=i.xScale,r.yScale=i.yScale,r.mScale=i.mScale,r.zScale=i.zScale;let n=t.translate,s=e.translate;return n.xTranslate=s.xTranslate,n.yTranslate=s.yTranslate,n.mTranslate=s.mTranslate,n.zTranslate=s.zTranslate,t}(i.transform);let h=n.fields,y=n.fieldNameToAttributeIndexMap,m=i.fields,f=m.size();for(let e=0;e<f;e++){let t=m.get(e),r=E(t);h.push(r),y[r.name]=e,t.delete()}m.delete();let b=n.values,M=i.values_count();for(let e=0;e<M;e++)b.push(i.get_value_at(e));let T=n.features,v=i.features,S=v.size();if(S>0)for(let e of w)if(void 0===y[e])throw Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<S;e++){let t=new g,r=v.get(e),i=t.attributes,n=r.attributes_count();for(let e=0;e<n;e++)i.push(r.get_attribute_at(e));let s=r.get_compressed_geometry();s&&(t.compressedGeometry=A(s),t.centroid=A(r.get_centroid()));let a=t.aggregateGeometries,o=r.aggregate_geometries,l=o.size();for(let e=0;e<l;e++){let t=o.get(e),r=A(t);a.push(r),t.delete()}o.delete(),T.push(t),r.delete()}v.delete();let k=n.geometryFields,L=i.geometry_fields,N=L.size();for(let e=0;e<N;e++){let t=L.get(e),r=x(t);k.push(r),t.delete()}return L.delete(),t}function A(e){let t=new b;t.geometryType=(0,I.i7)(C.bV,e.geometry_type.value);let r=[],i=[];for(let t=0;t<e.lengths.length;t++)r.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=r,t.coords=i,t}function E(e){let t=new f;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,I.i7)(C.r5,e.field_type.value),t.sqlType=(0,I.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){let t=E(e);return t.geometryType=(0,I.i7)(C.bV,e.geometry_type.value),t}async function S(e,t,r){t??=!1;let a={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){let r=await(await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal})).data;return async function(e){let t=new((await(0,M.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),i=new Map;if(0!==r.error_code)throw new n.A("knowledge-graph:layer-support-utils",r.error_message);let s=t.get_map_of_identifier_sets(),a=s.keys,o=a.size();for(let e=0;e<o;e++){let t=a.get(e),r=s.query_identifier_set(t),o=[];if(1===r.id_array_type.value){let e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else if(3===r.id_array_type.value){let e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}else if(2===r.id_array_type.value){let e=r.get_string_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_string_at(r))}else{if(0!==r.id_array_type.value)throw new n.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{let e=r.get_oid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_objectid_at(r).toString())}}i.set(t,o)}return t.delete(),i}(new Uint8Array(r))}(e,r).then(e=>{!function(e,t){for(let[r,i]of e){let e=(0,s.tE)(t.namedTypeDefinitions,r,()=>({useAllData:!1,members:new Map}));for(let t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,a)}),a}async function k(e){let t=await(0,M.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(let[i,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;let r=n.members.keys(),s=!1,a=!0,o=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,u=new t.IdentifierArray,d=new t.ObjectIdentifierSet;for(let e of r)a&&=(s=!isNaN(Number(e)),!1),s?o.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),u.add_identifier(e);d.set_oid_array(o),d.set_string_array(l),d.set_globalid_array(p),d.set_identifier_array(u),o.delete(),l.delete(),p.delete(),u.delete(),e.put_identifier_set(i,d),d.delete()}}(r,t,e);let i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(r),i.encode();let e=i.get_encoding_result();if(0!==e.error.error_code)throw new n.A("knowledge-graph:layer-support-utils",e.error.error_message);let t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{r.delete()}}async function L(e,t){return async function(e){let t=new((await(0,M.I)()).FeatureCollectionDecoder),r=t.decode(new Uint8Array(e));if(0!==r.error_code)throw new n.A("knowledge-graph:layer-support-utils",r.error_message);let i=v(t.get_feature_collection());return t.delete(),i}(await(await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal})).data)}function N(e,t){if(!e?.queryResult?.featureResult)return t;let{hasZ:r,hasM:i}=e.queryResult.featureResult,n=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(let o of e.queryResult.featureResult.features){let e=o.attributes[n.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=o.attributes[n.ELEMENTUID];if(o.compressedGeometry?.coords?.length>0){let e=o.compressedGeometry.lengths;"esriGeometryPoint"===o.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new a.A(e,o.compressedGeometry.coords,r,i)})}else l.members.set(p,{id:p})}return t}const F={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){let r=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&r.push(L(e.entitiesUrl,t).then(e=>{N(e,i)})),e.relationshipsUrl&&r.push(L(e.relationshipsUrl,t).then(e=>{N(e,i)})),await Promise.all(r),i}(e,t)}},75503(e,t,r){r.d(t,{wq:()=>o});var i=r(4576),n=r(21818),s=(r(44208),r(15142)),a=r(11006);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,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(),I.prune(),C.prune(),_.prune(),T.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data,i=this._toBBox;if(w(e,r))for(I.clear();r;){for(let n=0,s=r.children.length;n<s;n++){let s=r.children[n],a=r.leaf?i(s):s;w(e,a)&&(r.leaf?t(s):b(e,a)?l(s,t):I.push(s))}r=I.pop()}}collides(e){let t=this._data,r=this._toBBox;if(!w(e,t))return!1;for(I.clear();t;){for(let i=0,n=t.children.length;i<n;i++){let n=t.children[i],s=t.leaf?r(n):n;if(w(e,s)){if(t.leaf||b(e,s))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-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){let 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 E([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,a=0,o=!1,l=this._toBBox(e);for(_.clear(),T.clear();r||_.length>0;){if(r||(r=_.pop(),s=_.data[_.length-1],a=T.pop()??0,o=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.z)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),_.push(r),this._condense(_),this;o||r.leaf||!b(r,l)?s?(a++,r=s.children[a],o=!1):r=null:(_.push(r),T.push(a),a=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){let n=r-t+1,s=this._maxEntries;if(n<=s){let i=new E(e.slice(t,r+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(i-1)));let a=new x([]);a.height=i;let o=Math.ceil(n/s),l=o*Math.ceil(Math.sqrt(s));M(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){let t=Math.min(n+l-1,r);M(e,n,t,o,this._compareMinY);for(let r=n;r<=t;r+=o){let n=Math.min(r+o-1,t);a.children.push(this._build(e,r,n,i-1))}}return p(a,this._toBBox),a}_insert(e,t,r){let i=this._toBBox,n=r?e:i(e);_.clear();let s=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let s=0,a=t.children.length;s<a;s++){let a=t.children[s],o=y(a),l=f(e,a)-o;l<n?(n=l,i=o<i?o:i,r=a):l===n&&o<i&&(i=o,r=a)}t=r||t.children[0]}return t}(n,this._data,t,_);for(s.children.push(e),d(s,n);t>=0&&_.data[t].children.length>this._maxEntries;)this._split(_,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,_,t)}_split(e,t){let r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);let s=this._chooseSplitIndex(r,n,i);if(!s)return;let a=r.children.splice(s,r.children.length-s),o=r.leaf?new E(a):new x(a);o.height=r.height,p(r,this._toBBox),p(o,this._toBBox),t?e.data[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,s;i=n=1/0;for(let a=t;a<=r-t;a++){let t=u(e,0,a,this._toBBox),o=u(e,a,r,this._toBBox),l=g(t,o),p=y(t)+y(o);l<i?(i=l,s=a,n=p<n?p:n):l===i&&p<n&&(n=p,s=a)}return s}_chooseSplitAxis(e,t,r){let i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);let n=this._toBBox,s=u(e,0,t,n),a=u(e,r-t,r,n),o=m(s)+m(a);for(let i=t;i<r-t;i++){let t=e.children[i];d(s,e.leaf?n(t):t),o+=m(s)}for(let i=r-t-1;i>=t;i--){let t=e.children[i];d(a,e.leaf?n(t):t),o+=m(a)}return o}_condense(e){for(let t=e.length-1;t>=0;t--){let r=e.data[t];if(0===r.children.length)if(t>0){let n=e.data[t-1],s=n.children;s.splice((0,i.qh)(s,r,s.length,n.indexHint),1)}else this.clear();else p(r,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(C.clear();r;){if(!0===r.leaf)for(let e of r.children)t((0,n.z)(e));else C.pushArray(r.children);r=C.pop()??null}}function p(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||=new E([]),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,a=t;a<r;a++)s=e.children[a],d(n,e.leaf?i(s):s);return n}function d(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 h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(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 g(e,t){let r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function M(e,t,r,i,n){let s=[t,r];for(;s.length;){let t=s.pop(),r=s.pop();if(t-r<=i)continue;let o=r+Math.ceil((t-r)/i/2)*i;(0,a.q)(e,o,r,t,n),s.push(r,o,o,t)}}const I=new s.A,C=new s.A,_=new s.A,T=new s.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,r){r.d(t,{Qf:()=>o,Qh:()=>s,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=p;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=p;for(let r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):p;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const p=32,u=16,d=145},15795(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(91429),s=r(58318),a=r(4146),o=r(63074),l=r(25036),p=r(98809),u=r(88625);let d=class extends((0,o.dM)((0,l.j)(a.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new p.Y,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}get loaded(){return super.loaded}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}graphicChanged(e){this.emit("graphic-update",e)}};(0,i.Cg)([(0,n.MZ)({type:u.A})],d.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,n.MZ)((0,s.C)(p.Y,"graphics"))],d.prototype,"graphics",void 0),(0,i.Cg)([(0,n.MZ)({type:["show","hide"]})],d.prototype,"listMode",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],d.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({constructOnly:!0})],d.prototype,"internal",void 0),d=(0,i.Cg)([(0,n.$K)("esri.layers.GraphicsLayer")],d)},6518(e,t,r){r.d(t,{F:()=>o});var i=r(44208),n=r(75503),s=r(19419);const a={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((r,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,s.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){a.minX=e[0],a.minY=e[1],a.maxX=e[2],a.maxY=e[3]})(t),e.search(a,r)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,r){r.d(t,{A:()=>y});var i=r(4576),n=r(49186),s=r(65529),a=r(53966),o=r(70328),l=r(19419),p=r(90708),u=r(6518),d=r(51441),h=r(37730);const c=(0,o.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=h.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;let[t,r,i,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let r of e){let e=this._boundsStore.get(r.objectId);e&&t((0,o.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void a.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let r,i=this._featuresById.get(t);if(i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,p.jQ)(r??(0,l.vt)(),e.geometry),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){let t=e?.objectId;if(null==t)return a.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let r=this._featuresById.get(t);if(!r)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(r)??0;let{geometry:i,attributes:s}=e;for(let e in s)r.attributes[e]=s[e];return i&&(r.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(r)??0,r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,r){var i=r(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,r)=>new i.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};r.d(t,["T",0,n])},64714(e,t,r){r.d(t,{F0:()=>o,Vx:()=>u,e2:()=>h,f:()=>m});var i=r(44208),n=r(4718),s=r(99352),a=r(93470);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}const c={...s.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},y={...s.P,supportedStatistics:{...s.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function m(e,t,r=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r?c:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r?y:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},24137(e,t,r){r.d(t,{P:()=>C});var i=r(32198),n=r(69622),s=r(49186),a=r(53966),o=r(91869),l=r(17676),p=r(39516),u=r(91429),d=r(5443),h=r(39829),c=r(99917),y=r(21325),m=r(15375);const f=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${f(e.left,t)} ${e.operator} ${f(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let r="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)r+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";r+=`lower(n.${e.left.column})`}if(r+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),r+=`'${t.toLowerCase()}')`}return r}return t.unsupportedOperationFound=!0,""};var g=r(69860),b=r(99916),w=r(53902),M=r(42538),I=r(97552);let C=class extends n.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;let t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),(!e.inclusionModeDefinition||e.inclusionModeDefinition?.generateAllSublayers)&&this.entityTypeNames.add(r.name),r.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),(!e.inclusionModeDefinition||e.inclusionModeDefinition?.generateAllSublayers)&&this.relationshipTypeNames.add(r.name),r.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((r,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return a.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}let n=new Map;r.members?.forEach(e=>{(0,o.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,n)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){let r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||=new Map,r.members.set(t,{id:t}),(0,o.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{let r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,o.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,r,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return{features:[],cypherTranslationApplied:!1};let n;if(n=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===r.type){let e=r,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=n.outFields;s&&1===s.length&&s[0]===m.dr&&"1=1"===n.where||await Promise.all(i??[]);let a=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return a.forEach(r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);let i=this.memberIdTypeLookup.get(r.attributes[m.Cz]),n=this.memberIdTypeLookup.get(r.attributes[m.KQ]),s=this._isEndEntitySpatial(i,r,m.Cz),a=this._isEndEntitySpatial(n,r,m.KQ);r.attributes[m.BL]=Number(s&&a)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);let i=this.geographicLookup.get(t.objectType.name);i&&r.attributes[i.name]?r.attributes[m.BL]=1:r.attributes[m.BL]=0}r.attributes[m.T1]=r.geometry,o.push(r)}),{features:o,cypherTranslationApplied:!1}}return this.retrieveDataFromService(n,t,r,i)}async getConnectedRecordIds(e,t,r){let i=[],n="",s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(let e of t)n=n+e+"|";n=n.slice(0,-1)}let a={},o=[];for(let[e,r]of s){let i=`${e}_ids`;a[i]=r,t&&0!==t?.length?o.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${n}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):o.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!o.length)return i;let l=o.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:l,bindParameters:a}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e];i.push({id:r[0],typeName:r[1]}),i.push({id:r[2],typeName:r[3]})}}return i}async getRelationshipsBetweenNodes(e,t,r){let i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];let n={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(let[e,t]of i.entries()){let r=`${e}_ids`;n[r]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}let a=s.join(" UNION "),o=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:a,bindParameters:n}),{signal:r?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e];o.push({id:r[0],typeName:r[1]})}}return o}async getRelationshipsFromNodes(e,t,r,i){let n=this._getNamedTypeIdMapFromNodeIds(e);if(0===n.size||0===t.length)return[];let s={relationshipExclusionIds:r,possibleConnectionEntityIds:t},a=[];for(let[e,t]of n.entries()){let r=`${e}_ids`;s[r]=t,a.push(`MATCH (n:${e}) WHERE id(n) IN $${r} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}let o=a.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new M.A({openCypherQuery:o,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){let r=t[e],i=l.get(r[1]);i||(i=new Set,l.set(r[1],i)),i.add(r[0])}}let u=[];for(let[e,t]of l)for(let r of t)u.push({id:r,typeName:e});return u}async refreshCacheContent(e,t,r,i=!0,n){let a=g.A.getInstance(),p=[],u=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&d.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(let t of this.memberIdTypeLookup.get(e))u.has(t)?u.get(t)?.push(e):u.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?u.set(t,null):e.members&&e.members.forEach(e=>{u.has(t)&&null!==u.get(t)?u.get(t)?.push(e.id):u.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,null)}));for(let[e,l]of u){let u=new Set(l),h=new Promise((p,h)=>{(async()=>{let p,h=new Set,c=[],y="",f=!1;if(t||d.get(e)?.properties?.forEach(e=>{e.name&&h.add(e.name)}),r&&this.geographicLookup.has(e)){let t=this.geographicLookup.get(e)?.name;t&&h.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,h.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);f=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,h.forEach(e=>{y+=`, n.${e}`,c.push(e)})}p=l?new M.A({openCypherQuery:y,bindParameters:{ids:l}}):new M.A({openCypherQuery:y});let g=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,p,{signal:n?.signal})).resultRowsStream.getReader();for(;;){let{done:t,value:r}=await g.read();if(t)break;let n=[];for(let e=0;e<r.length;e++){let t=r[e],i=0,s=0,a={properties:{}};for(a.id=t[i],i++,s++,f&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++,(0,o.tE)(this.nodeConnectionsLookup,a.originId,()=>new Set).add(a.id),(0,o.tE)(this.nodeConnectionsLookup,a.destinationId,()=>new Set).add(a.id),(0,o.tE)(this.relationshipConnectionsLookup,a.id,()=>[a.originId,a.destinationId]));i<t.length;i++)a.properties[c[i-s]]=t[i];u.delete(a.id),n.push(a)}let s=a.writeToStore(n,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);let l=this.sublayerCaches.get(e);s.forEach(t=>{l?.set(t.attributes[m.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,o.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}let b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(let e of u)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):h(e)})});p.push(h),this._processingCacheUpdatesLookup.get(e)?.push(h)}if(await Promise.all(p),n?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){let t=new Set,r=new Set(e.map(e=>e.id));for(let r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{r.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,r,i){let n,o=g.A.getInstance(),l=new Set,u=[],I="",C=[],_=!1,T="relationship"===t.graphType,v=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,A=r.sublayerIdsCache.get(t.objectType.name),E=!v&&A?Array.from(A).sort():null,x={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(E=e.objectIds);else if(null!=e.objectIds&&E&&E.length>0){let t=e.objectIds;e.objectIds=E.filter(e=>t.includes(e))}else if(null!=e.objectIds)E=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],{features:[],cypherTranslationApplied:_};e.objectIds=E}if(null!=e.outFields){let r=e.outFields;r.includes("*")?t.fields.forEach(e=>{l.add(e.name)}):r.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&l.add(e)})}if(null!=e.geometry){let i,a=e.geometry,o=r.dataManager.knowledgeGraph.serviceDefinition,m=o?.spatialReference,f=o?.serviceCapabilities?.geometryCapabilities,g=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if("point"===a.type){let e=a;e.spatialReference?.isWGS84||(await(0,c.initializeProjection)(e.spatialReference,y.KK),e=(0,c.project)(e,y.KK)),i=new d.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else a?.extent?.spatialReference&&!a.spatialReference?.isWGS84?(await(0,c.initializeProjection)(a.extent.spatialReference,y.KK),i=(0,c.project)(a.extent,y.KK)):i=a.extent;if(g&&w&&m){if(4326!==m.wkid){let e=new d.A({spatialReference:m,xmax:g,ymax:w}),t=(0,c.project)(e,y.KK);g=t.xmax,w=t.ymax}if(i.xmax-i.xmin>g)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){let r=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{r.fieldNames.includes(e.name)&&l.add(e.name)})}I=T?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&l.add(t.geometryFieldName),l.forEach(e=>{I+=`, n.${e}`,u.push(e)}),n=new M.A({openCypherQuery:I,bindParameters:{param_filter_geom:new h.A({rings:(0,b.Wq)(i)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){let i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&l.add(e.name)}),r=f(i.parseTree,x),x.unsupportedOperationFound&&(r="")}let i="";i=T?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;E&&(s=!0,i+=" WHERE ID(n) IN $ids"),r&&(i+=s?" AND":" WHERE",i+=` ${r}`),i+=" return ID(n)",T&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&l.add(t.geometryFieldName),l.forEach(e=>{i+=`, n.${e}`,u.push(e)}),x.unsupportedOperationFound||(i=((e,t)=>{let r=e;return t.orderByFields?.length&&(r=function(e,t){let r=e.trimEnd();if(/\border\s+by\b/i.test(r))return a.A.getLogger("cypherUtils").warn("Query already contains an ORDER BY clause. Skipping addition of new ORDER BY."),e;let i=t.map(e=>e.trim()).filter(e=>!!e).map(e=>{let[t,r]=e.split(/\s+/);return t?`${t===m.dr?"ID(n)":`n.${t}`} ${"DESC"===r?.toUpperCase()?"DESC":"ASC"}`:null}).filter(e=>!!e);return i.length?`${r} ORDER BY ${i.join(", ")}`:e}(r,t.orderByFields)),null!=t.start&&(r=function(e,t){let r=e.trimEnd();return/\bskip\s+(\$\w+|\d+)\b/i.test(r)?(a.A.getLogger("cypherUtils").warn("Query already contains a SKIP clause. Skipping addition of new SKIP."),e):`${r} SKIP ${t}`}(r,t.start)),null!=t.num&&(r=function(e,t){let r=e.trimEnd();return/\blimit\s+(\$\w+|\d+)\b/i.test(r)?(a.A.getLogger("cypherUtils").warn("Query already contains a LIMIT clause. Skipping addition of new LIMIT."),e):`${r} LIMIT ${t}`}(r,t.num)),r})(i,e),_=!0),n=E?new M.A({openCypherQuery:i,bindParameters:{ids:E}}):new M.A({openCypherQuery:i})}let S=(await(0,w.executeQueryStreaming)(r.dataManager.knowledgeGraph,n,i)).resultRowsStream.getReader();for(;;){let{done:e,value:i}=await S.read();if(e)break;let n=[];for(let e=0;e<i.length;e++){let t=i[e],r=0,s=0,a={properties:{}};for(a.id=t[r],r++,s++,T&&(a.originId=t[r],r++,s++,a.destinationId=t[r],r++,s++);r<t.length;r++)a.properties[u[r-s]]=t[r];n.push(a)}C=C.concat(o.writeToStore(n,m.dr,r.dataManager.geographicLookup.get(t.objectType.name)?.name))}return{features:C,cypherTranslationApplied:_}}_isEndEntitySpatial(e,t,r){for(let i of e??[])if(this.entityTypeNames.has(i)){let e=this.geographicLookup.get(i),n=e&&this.sublayerCaches.get(i)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){let t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(let r of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(r))return;t.has(r)?t.get(r)?.push(e):t.set(r,[e])}}),t}};(0,i.Cg)([(0,u.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"memberIdTypeLookup",void 0),C=(0,i.Cg)([(0,u.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],C)},62796(e,t,r){r.d(t,{A:()=>fe});var i=r(32198),n=r(37838),s=r(49186),a=r(4718),o=r(53966),l=r(25728),p=r(91429),u=(r(29953),r(78247)),d=r(5443),h=r(86738),c=r(39829),y=r(82799),m=r(99917),f=r(16930),g=r(21325),b=r(50498),w=r(41910),M=r(55156),I=r(60950),C=r(89808),_=r(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var v;class A extends _.A{get[(v=T,I.ym)](){return this.sublayer}get[M.e](){return this.sublayer}get[C.Q](){return this.sublayer}get[w.e7](){return this.sublayer}constructor(e,t){super(),this[v]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const E=Symbol("isLinkChartGraphicOriginSymbol");var x;class S extends _.A{get[(x=E,I.ym)](){return this.sublayer}get[M.e](){return this.sublayer}get[C.Q](){return this.sublayer}get[w.e7](){return this.sublayer}constructor(e,t){super(),this[x]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var k=r(4146),L=r(83221),N=r(75752),F=r(64714),R=r(15375);const O=(0,r(17036).p)(),D=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(O.fields)],r.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(O.fieldsIndex)],r.prototype,"fieldsIndex",void 0),r=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],r),r};var P=r(40736),j=r(63074),B=r(6455),G=r(87718),$=r(56658),Z=r(32756),Q=r(54310),q=r(25036),U=r(82935),z=r(10873),Y=r(20569),H=r(29005),X=r(20437),W=r(30524),K=r(46499),V=r(39383),J=r(96184),ee=r(96576),te=r(65494),re=r(41214),ie=r(53902),ne=r(22671),se=r(97552),ae=r(30291),oe=r(88625),le=r(37531),pe=r(50343),ue=r(43937);function de(e){if(!e.json)return e;e.json.write=he(e.json.write);let t,r=e.json.origins;if(!r)return e;for(t in r){let e=r[t];e&&(e.write=he(e.write))}return e}function he(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){let{target:t,writer:r,overridePolicy:i,...n}=e;return function(e,t){let r=ye.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:ye}}function ye(e,t){let r=!!this.geometryType,i={enabled:r};return r&&(i={...i,...me.call(this,e,t)}),i}function me(e,t){return{allowNull:this.originIdOf(t)>=3,ignoreOrigin:this.originIdOf(t)>0}}let fe=class extends(D((0,B.FJ)((0,$.J)((0,G.F)((0,j.dM)((0,Z.fY)((0,U.e)((0,q.j)((0,Q.J)((0,l.M)(k.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=R.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{let e=new MessageChannel;return new pe.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{let r=se.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,P.hZ)(null)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}get editingEnabled(){return this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveCapabilities(){let e=(0,a.o8)(this.capabilities),{operations:t,editing:r}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=r.supportsDeleteByOthers=r.supportsGeometryUpdate=r.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=r.supportsGeometryUpdate=!0),e}get effectiveEditingEnabled(){return this.userHasUpdateItemPrivileges||this.editingEnabled}set featureReduction(e){let t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){let e=[],t=new Map;for(let e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(r=>{let i="esriFieldTypeOID"===r.fieldType?"esriFieldTypeInteger":r.fieldType,n=X.A.fromJSON({name:r.name,type:i,alias:r.alias,defaultValue:r.defaultValue,editable:r.editable,nullable:r.nullable,domain:r.domain&&t.has(r.domain)?t.get(r.domain).toJSON():void 0});e.push(n)}),e.push(X.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),X.A.fromJSON({name:R.M1,type:"esriFieldTypeInteger",alias:R.M1,editable:!1}),X.A.fromJSON({name:R.BL,type:"esriFieldTypeInteger",alias:R.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,P.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.geometryType;return e&&"esriGeometryNull"!==e?b.gy.fromJSON(e):null}get geometryFieldName(){return"link-chart"===this.parentCompositeLayer?.type?R.T1:this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new A(this.parent,this);case"link-chart":return new S(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name;return(e?this.objectType?.properties?.[e]:null)?.hasM??!1}get hasZ(){let e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name)?.name;return(e?this.objectType?.properties?.[e]:null)?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;let e=this.objectType.properties?(0,P.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,P.iW)(this.graphType,this.graphTypeName,e):(0,P.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,W.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");let e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=(0,P.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new ee.A({type:"simple",symbol:(0,P.UT)(r)});let e=(0,te.r)((0,F.F0)(b.gy.toJSON("point")).renderer);return(0,le.dt)(e.symbol,r),e}let i=(0,te.r)((0,F.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,le.dt)(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??f.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,P.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get dateFieldsTimeZone(){return this.parentCompositeLayer?.dateFieldsTimeZone}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}get userHasEditingPrivileges(){return!this.parent||this.parent.userHasEditingPrivileges}get userHasFullEditingPrivileges(){return!!this.parent&&this.parent.userHasFullEditingPrivileges}get userHasUpdateItemPrivileges(){return!!this.parent&&this.parent.userHasUpdateItemPrivileges}createPopupTemplate(e){return(0,ae.tn)(this,e)}createQuery(){return new se.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fields.find(t=>t.name===e)?.domain||null}async queryFeatures(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e),s=this.graphicOrigin,a=ne.A.fromJSON(await i.executeQuery(this._createQueryEngineQueryJSON(r,n),t?.signal));return a.features.forEach(e=>{e.sourceLayer=this,e.origin=s}),a}async queryFeaturesJSON(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e);return await i.executeQuery(this._createQueryEngineQueryJSON(r,n),t?.signal)}async queryFeatureCount(e,t){await this.load();let{resolvedQuery:r,queryEngine:i,cypherTranslationApplied:n}=await this._setupQueryObjects(e);return i.executeQueryForCount(this._createQueryEngineQueryJSON(r,n),t?.signal)}async queryExtent(e={},t){await this.load();let r,i={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:s,cypherTranslationApplied:a}=await this._setupQueryObjects(i),o=await s.executeQueryForExtent(this._createQueryEngineQueryJSON(n,a),t?.signal);return r=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new d.A(o.extent):new d.A,{count:o.count,extent:r}}async queryObjectIds(e,t){await this.load();let r,i=se.A.from(e);if(this.parentCompositeLayer){if("link-chart"!==this.parentCompositeLayer.type||!this._cachedQueryEngine){let{features:e,cypherTranslationApplied:n}=await this.parentCompositeLayer.dataManager.getData(i,this,this.parentCompositeLayer,t);return r=this.loadQueryEngine(e),await r.executeQueryForIds(this._createQueryEngineQueryJSON(i,n),t?.signal)}r=this._cachedQueryEngine}else o.A.getLogger(this).warn("Attempting to query for object IDs with no features failed because the parent composite layer is missing or not yet loaded."),r=this.loadQueryEngine([]);return await r.executeQueryForIds(this._createQueryEngineQueryJSON(i,!1),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer?.dataManager.knowledgeGraph)throw new s.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");let t=await(0,P.O9)(e,this,this.parentCompositeLayer);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};let r=await(0,ie.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,P.Gz)(r,this.graphTypeName),n={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",n),this.emit("apply-edits",{result:Promise.resolve(n)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...n.addedFeatures.map(e=>e.globalId),...n.updatedFeatures.map(e=>e.globalId),...n.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){let t=new L.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new N.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){if(!this.parentCompositeLayer)return o.A.getLogger(this).warn("Attempting to refresh the cached query engine with no features failed because the parent composite layer is missing or not yet loaded."),void(this._cachedQueryEngine=this.loadQueryEngine([]));let{features:e}=await this.parentCompositeLayer.dataManager.getData(new se.A({where:"1=1",outFields:[R.dr]}),this,this.parentCompositeLayer);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,W.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}_createQueryEngineQueryJSON(e,t){let r=e.toJSON();return t&&delete r.resultOffset,r}async _setupQueryObjects(e,t){let r=se.A.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(i.spatialReference,g.KK),r.geometry=i instanceof c.A||i instanceof y.A||i instanceof h.A?(0,m.project)(i,g.KK):(0,m.project)(i.extent,g.KK)),!this.parentCompositeLayer)return o.A.getLogger(this).warn("Attempting to execute a query with no features failed because the parent composite layer is missing or not yet loaded."),{resolvedQuery:r,queryEngine:this.loadQueryEngine([]),cypherTranslationApplied:!1};if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine,cypherTranslationApplied:!1};let{features:n,cypherTranslationApplied:s}=await this.parentCompositeLayer.dataManager.getData(r,this,this.parentCompositeLayer,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(n),cypherTranslationApplied:s}}};(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(j.sU)))],fe.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],fe.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],fe.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(B.Dp)))],fe.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(B.KV)))],fe.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(j.LF)))],fe.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({type:oe.A})],fe.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(G.Y)))],fe.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(Y.d)))],fe.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({type:u.A})],fe.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],fe.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],fe.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],fe.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],fe.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[K.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,r){let i=[["ESRI__AGGREGATION_COUNT",R.M1],["ESRI__ORIGIN_ID",R.Cz],["ESRI__DESTINATION_ID",R.KQ],["ESRI__LAYOUT_GEOMETRY",R.T1]];try{for(let t of e)for(let[e,r]of i)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(e){o.A.getLogger(this).warn("Error updating labelingInfo",e)}return V.w.call(this,e,t,r)},write:ce()}})],fe.prototype,"labelingInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],fe.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.fV)))],fe.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.hG)))],fe.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.hn)))],fe.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.ke)))],fe.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(Z.ne)))],fe.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],fe.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(z.M6)))],fe.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],fe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:me}}})],fe.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:re.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],fe.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],fe.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)({type:H.A})],fe.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:J.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:me},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:me}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:me}}}}})],fe.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],fe.prototype,"title",null),(0,i.Cg)([(0,ue.K)("title")],fe.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],fe.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(de((0,a.o8)(U.B)))],fe.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"userHasEditingPrivileges",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"userHasFullEditingPrivileges",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],fe.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],fe.prototype,"visible",void 0),fe=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],fe)},69860(e,t,r){r.d(t,{A:()=>o});var i=r(65864),n=r(90708),s=r(43334),a=r(15375);class o{constructor(){this._featureLookup=new Map}static getInstance(){return o.instance||=new o,o.instance}static resetInstance(){o.instance&&=null}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){let t=[];return e.forEach(e=>{let r=this.readFromStoreById(e);r&&t.push(r)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){let o=[];return e.forEach(e=>{if(!e?.id)return;e.properties||=[];let l=null;r&&e.properties[r]&&(l=(0,n.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[a.Cz]=e.originId,e.properties[a.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){let t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};let e=r&&p[r];null!=e&&(p[r]=(0,i.rS)(e)),l??=t.geometry}}let u=new s.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,u),o.push(u)}),o}}},15375(e,t,r){r.d(t,["BL",0,"LC.ESRI__IsSpatial","Cz",0,"ESRI__OriginID","KQ",0,"ESRI__DestID","M1",0,"ESRI__AggregationCount","T1",0,"ESRI__LayoutGeometry","dr",0,"ESRI__ID"])},40736(e,t,r){r.d(t,{Gz:()=>Q,O9:()=>Z,hZ:()=>$,CP:()=>U,dD:()=>q,UT:()=>O,MY:()=>D,Td:()=>R,iW:()=>P,e$:()=>j,$L:()=>z,N1:()=>B,qN:()=>N});var i=r(68197),n=r(92602),s=r(70333),a=(r(49186),r(91869)),o=r(17676),l=r(78247),p=r(89909),u=r(99917),d=r(16930),h=r(52039),c=r(99352),y=r(15375),m=r(29005),f=r(46499),g=r(73913),b=r(77548),w=r(80812),M=r(10407),I=r(53902),C=r(25927),_=r(32198),T=r(69622),v=r(91429);let A=class extends T.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,_.Cg)([(0,v.MZ)()],A.prototype,"entityAdds",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"entityUpdates",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"entityDeletes",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"relationshipAdds",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"relationshipUpdates",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"relationshipDeletes",void 0),(0,_.Cg)([(0,v.MZ)()],A.prototype,"options",void 0),A=(0,_.Cg)([(0,v.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],A);var E=r(23150),x=r(94128),S=r(40863),k=r(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function N(e,t,r){return(async(e,t,r)=>{if(t||=[...e.layers,...e.tables].map(e=>e.graphTypeName),0===t?.length)return;let i=new Map;for(let r of t)i.set(r,L(e,r));let n=await(0,I.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:r?.signal}});for(let t of[...e.layers,...e.tables]){let r=t.objectType.name;if(null==r)continue;let i=n.get(L(e,r));if(i){let e=JSON.parse(i);"object"==typeof e&&e&&!e.hasOwnProperty("showLabels")&&(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,r)}const F="#4a0932.#b31515.#18382e.#a64f1b.#102432.#8c213f.#ed9310.#2c6954.#144d59.#ffc730.#75351e.#454f4b.#78b1c2.#191921.#8f8f82.#9be0c0.#dbb658.#87b051.#11495c.#c43541.#9c5596.#44498b.#ad9d63.#86afb3.#5c98ca.#b0bfa2.#73241f.#b86b53.#d9d78c.#3e756d.#f260a1.#a0d17d.#c27c30.#eb82eb.#ffdf3c.#ffb259.#ab52b3.#3cccb4.#0095ba.#d92b30".split(".");function R(e){return e<0||e>=F.length?new i.A("#8f8f82"):new i.A(F[e])}function O(e){let t=e.toArray();return new S.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function D(e){let t="ESRI__ID",r=4;for(let i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,r=2):"esriFieldTypeString"===i.fieldType&&r>3&&(t=i.name,r=3)}return t}function P(e,t,r){let i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},n=new f.A({labelExpressionInfo:new g.A({expression:"ESRI__ID"===r?`${t}`:`$feature.${r}`}),labelPlacement:"above-center",symbol:new k.A(i)}),s=new f.A({labelExpressionInfo:new g.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new k.A({...i,yoffset:"12px"})});return"entity"===e?[n]:[s]}function j(e,t,r){let i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},n="ESRI__ID"===r?`${e}`:`$feature.${r}`;return"point"===t?[new f.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"above-center",symbol:new k.A(i)})]:"polyline"===t?[new f.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"center-along",repeatLabel:!0,symbol:new k.A(i)})]:"polygon"===t?[new f.A({labelExpressionInfo:new g.A({expression:n}),labelPlacement:"always-horizontal",symbol:new k.A(i)})]:null}async function B(e,t,r){return(async(e,t,r)=>{let i=!0,a=!1,o=!1;if(!n.A.userPrivilegesApplied)return{edit:i,fullEdit:a,updateItem:o};let l=await(0,b.wI)(t,r);if(!l||!s.id?.getCredential(`${l}/sharing`,{...r,prompt:!1}))return{edit:i,fullEdit:a,updateItem:o};let p=new w.default({id:e,portal:{url:l}});return await p.load(r),({features:{edit:i,fullEdit:a},content:{updateItem:o}}=(0,M.It)(p)),{edit:i,fullEdit:a,updateItem:o}})(e,t,r).catch(e=>((0,o.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const G={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function $(e){let{capabilities:t,allowGeometryUpdates:r,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:n}}}=e?.serviceDefinition||G,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),a=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:n,supportsTrueCurve:!1,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:a.has("Create"),supportsDelete:a.has("Delete"),supportsEditing:a.has("Editing"),supportsChangeTracking:!1,supportsQuery:a.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:a.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:c.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:c.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&r,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:a.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:a.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function Z(e,t,r){let i=new A,n=t.graphTypeName,s=t.graphType,o="knowledge-graph"===r.type?t.geometryFieldName:null,l=!!t.fieldsIndex.get(o)?.editable,p=e=>{let r={...e};for(let e of t.fields)e.editable||delete r[e.name];for(let t of Object.keys(e))t.includes("ESRI__")&&delete r[t];return r},c=async e=>{await(0,u.initializeProjection)(e.spatialReference,d.A.WGS84);let t=(0,u.project)(e,d.A.WGS84);return"point"===t.type?t.normalize():(await(0,h.el)(t))[0]};for(let t of e.addFeatures??[]){let e=p(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===s?(i.entityAdds||=[],o&&t.geometry&&(e[o]=await c(t.geometry)),i.entityAdds.push(new C.A({properties:e,typeName:n}))):(i.relationshipAdds||=[],i.relationshipAdds.push(new E.A({properties:e,typeName:n}))))}for(let t of e.updateFeatures??[]){let e=t.attributes[y.dr],r=p(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===s?(i.entityUpdates||=[],o&&l&&t.geometry&&(r[o]=await c(t.geometry)),i.entityUpdates.push(new C.A({id:e,properties:r,typeName:n}))):(i.relationshipUpdates||=[],i.relationshipUpdates.push(new E.A({id:e,properties:r,typeName:n}))))}let m=new Map;for(let t of e.deleteFeatures??[])if((0,x.D)(t)){let e=t,r=(0,a.tE)(m,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===n&&r.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,a.tE)(m,n,()=>({typeName:n,ids:[]})).ids.push(t.objectId);for(let e of m.values())e.ids.length>0&&("entity"===s?(i.entityDeletes||=[],i.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(i.relationshipDeletes||=[],i.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return i}function Q(e,t){let r={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(let i of e.editResults)if(i.typeName===t){for(let e of i.adds)r.addFeatureResults.push({objectId:e.id,globalId:e.id});for(let e of i.updates)r.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(let e of i.deletes)r.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return r}function q(e){if(!e.objectType)return null;let t=[];for(let r of e.fields)!r.name.includes("ESRI__")&&r.editable&&"geometry"!==r.type&&t.push(new p.A({fieldName:r.name}));return new l.A({elements:t})}function U(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new m.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}const z=e=>{let t="",r=e.split("/"),i=r.lastIndexOf("KnowledgeGraphServer");return i>0&&(t=r[i-1]),t}},99916(e,t,r){r.d(t,{Wq:()=>l,aq:()=>o}),r(52106);var i=r(49186),n=(r(86738),r(39829),r(82799),r(15795),r(69860),r(8460),r(69647)),s=r(53902),a=r(42538);async function o(e,t,r){let i=[],n=function(e,t){let r=new Map;if(t.dataModel?.relationshipTypes)for(let e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(let t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);return r}(e,t),o={},l=[];for(let[e,t]of n){if(t.length<1)continue;let r=`${e}_ids`;o[r]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${r} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];let p=l.join(" UNION "),u=new a.A({openCypherQuery:p,bindParameters:o}),d=(await(0,s.executeQueryStreaming)(t,u,r?.requestOptions)).resultRowsStream.getReader();for(;;){let{done:e,value:t}=await d.read();if(e)break;for(let e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}function l(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}r(40863),r(94985),r(68249),r.d(t,["k5",0,e=>n.P_.get(e)??"radial-root-centric"])},82935(e,t,r){var i=r(32198),n=r(91429),s=r(30524),a=r(96184),o=r(73133),l=r(79677),p=r(10184),u=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,n=o.j.fromJSON(r.timeOffsetUnits);return i&&n?new p.A({value:i,unit:n}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,s.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:l.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:p.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,u.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),n=r(53966),s=r(20437),a=r(95466),o=r(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return a.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,o.DB)(this.fieldsIndex,e)}}}}},8460(e,t,r){r.d(t,{$C:()=>m,Hh:()=>a,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>b,pM:()=>d,vJ:()=>f});var i=r(2741);let n,s=null;function a(){return n||(n=r.e(3666).then(()=>r(3666)).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),n)}const o={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){let t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:o[t.timeDirection]??o.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function u(e,t,r,i,n,a){let o=r.length,l=n.length,p=Float64Array.BYTES_PER_ELEMENT,u=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,h=16+o*(d+2*p)+2*u*l,c=s._malloc(h);try{let d=c+16-c%16,h=d+o*p,y=h+o*p,m=y+l*u,f=m+l*u,g=()=>[s.HEAPF64.subarray(d>>3,(d>>3)+o),s.HEAPF64.subarray(h>>3,(h>>3)+o),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(f,f+o)],[b,w,M,I,C]=g();b.set(r),w.set(i),M.set(n),I.set(a),C.set(t);let _=e(o,f,d,h,l,y,m),T=null,v=null;if(0===_.value){let e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),r=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();l&&(!e||!t)||i&&!r?_.value=1:(T={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(r>>3,(r>>3)+2*i))},v=s.getAuxiliaryGraphicElements())}let[A,E,x,S,k]=g();return r.set(A),i.set(E),n.set(x),a.set(S),t.set(k),{status:_.value,links:T,graphics:v}}finally{s._free(c),s.cleanupLayout()}}var d,h,c,y,m,f,g,b;(h=d||={}).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},h.apply=function(e,t,r,i,n,a,o=2,l=1,p=-1){return u((t,r,i,n,a,u,d)=>s.applyForceDirectedLayout(e,t,r,i,n,a,u,d,o,l,p),t,r,i,n,a)},function(e){e.apply=function(e,t,r,i,n,a,o=2,l=1,p=-1){return u((t,r,i,n,a,u,d)=>s.applyCommunityLayout(e,t,r,i,n,a,u,d,o,l,p),t,r,i,n,a)}}(c||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applySimpleLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(y||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applyHierarchicalLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(m||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applyRadialTreeLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(f||={}),function(e){e.apply=function(e,t,r,i,n,a){return u((t,r,i,n,a,o,l)=>s.applySmartTreeLayout(e,t,r,i,n,a,o,l),t,r,i,n,a)}}(g||={}),function(e){e.apply=function(e,t,r,i,n,a,o,l,d,h,c,y){return u((t,r,i,o,l,u,m)=>{if(n.length!==t||a.length!==t||d.length!==l||h.length!==l)return{value:1};let f=Float64Array.BYTES_PER_ELEMENT,g=s._malloc(16+t*f),b=s._malloc(16+t*f),w=s._malloc(16+l*f),M=s._malloc(16+l*f),I=g+16-g%16,C=b+16-b%16,_=w+16-w%16,T=M+16-M%16;try{return s.HEAPF64.subarray(I>>3,(I>>3)+t).set(n),s.HEAPF64.subarray(C>>3,(C>>3)+t).set(a),s.HEAPF64.subarray(_>>3,(_>>3)+l).set(d),s.HEAPF64.subarray(T>>3,(T>>3)+l).set(h),s.applyChronologicalLayout(e,t,r,i,o,I,C,l,u,m,_,T,c,p(y))}finally{s._free(g),s._free(b),s._free(w),s._free(M)}},t,r,i,o,l)}}(b||={})},69647(e,t,r){var i=r(66552);const n=(0,i.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),s=(0,i.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),a=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);r.d(t,["P_",0,a,"SJ",0,n,"lg",0,s])},54628(e,t,r){r.d(t,{lV:()=>s,zI:()=>n});var i=r(56507);async function n(e,t,r){if(!e||!t||!e.includes("/resources"))return!1;let n=t+"/resources",s=e.includes("/resources/")?e.split("/resources/")[1]:e;if(!s)return!1;let a=1;for(;-1!==a;){let e=(await(0,i.A)(n,{query:{f:"json",start:a,num:100}})).data,t=e?.resources??[];for(let e of t)if(e.resource===s)return"number"==typeof r&&e.created===r;if(null==e.nextStart||!t.length)break;a=e.nextStart}return!1}async function s(e,t){if(!e.length||!t)return new Map;let r=t+"/resources",n=1,s=new Map;for(;-1!==n;){let e=(await(0,i.A)(r,{query:{f:"json",start:n,num:100}})).data,t=e?.resources??[];for(let e of t)"number"==typeof e.created&&s.set(e.resource,e.created);if(null==e.nextStart||!t.length)break;n=e.nextStart}let a=new Map;for(let t of e){let e=t.includes("/resources/")?t.split("/resources/")[1]:t,r=s.get(e);null!=r&&a.set(t,r)}return a}r(49186),r(53966),r(17676),r(86738),r(8460)},25927(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(91429),s=r(86738),a=r(54238);let o=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,n.MZ)({type:s.A,json:{write:!0}})],o.prototype,"layoutGeometry",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.Entity")],o)},54238(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(91429),s=r(77901);let a=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],a)},77901(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(25482),s=r(91429);let a=class extends n.o{constructor(e){super(e),this.properties={}}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],a)},42538(e,t,r){r.d(t,{A:()=>l});var i=r(32198),n=r(91429),s=r(16930),a=r(69622);let o=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,n.MZ)()],o.prototype,"openCypherQuery",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphQuery")],o);let l=class extends o{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,n.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,n.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,n.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,r){r.d(t,{A:()=>a});var i=r(32198),n=r(91429),s=r(77901);let a=class extends s.A{constructor(e){super(e)}};a=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.ObjectValue")],a)},42095(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(25482),s=r(91429),a=r(77901);let o=class extends n.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],o.prototype,"path",void 0),o=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],o)},23150(e,t,r){r.d(t,{A:()=>o});var i=r(32198),n=r(91429),s=r(82799),a=r(54238);let o=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"originId",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"destinationId",void 0),(0,i.Cg)([(0,n.MZ)({type:s.A,json:{write:!0}})],o.prototype,"layoutGeometry",void 0),o=(0,i.Cg)([(0,n.$K)("esri.rest.knowledgeGraph.Relationship")],o)},2272(e,t,r){r.d(t,{Dl:()=>p,gf:()=>d,jV:()=>l,lF:()=>u});var i=r(92602),n=r(70333),s=r(4718),a=r(84952),o=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function p(e){return"string"==typeof e?(0,a.An)(e):(0,s.o8)(e)}function u(e,t,r){let i={};for(let n in e){if("declaredClass"===n)continue;let s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[n]=s.map(e=>u(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(r?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?s:JSON.stringify(s);else i[n]=s}return i}async function d(e,t,s){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t)||(!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(6475),r.e(7715)]).then(()=>r(50148)),(await n.id.getCredential(e,s))?.token)}},62046(e,t,r){r.d(t,{Fe:()=>y,KU:()=>b,Nk:()=>p,X5:()=>s});var i=r(68197),n=r(93397);function s(e,t,r){if(!e)return;let i=(0,n.lW)(e),s=function(e){let t=(0,n.lW)(e);if("CIMTextSymbol"===t?.type)return t.height??0;let r=0;if(t?.symbolLayers)for(let e of t.symbolLayers)(0,n.MM)(e)&&null!=e.size&&e.size>r?r=e.size:(0,n.mA)(e)&&null!=e.width&&e.width>r?r=e.width:(0,n.jn)(e);return r}(e);0!==s?a(i,t/s,!1,r):function(e,t){if(e){if("CIMTextSymbol"===e.type)return void(e.height=t);if(e.symbolLayers)for(let r of e.symbolLayers)switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":r.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":r.width=t}}}(i,t)}function a(e,t,r,i){if(e){if("CIMTextSymbol"===e.type)return void(null!=e.height&&(e.height*=t));if(r&&e.effects)for(let r of e.effects)l(r,t);if(e.symbolLayers)for(let r of e.symbolLayers){switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":o(r,t,i);break;case"CIMPictureStroke":case"CIMSolidStroke":case"CIMGradientStroke":!i?.preserveOutlineWidth&&r.width&&(r.width*=t);break;case"CIMPictureFill":r.height&&(r.height*=t),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t);break;case"CIMHatchFill":a(r.lineSymbol,t,!0,{...i,preserveOutlineWidth:!1}),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t),r.separation&&(r.separation*=t)}if(r.effects)for(let e of r.effects)l(e,t)}}}function o(e,t,r){if(e&&(e.markerPlacement&&function(e,t){switch((0,n.zr)(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length&&(e.placementTemplate=e.placementTemplate.map(e=>e*t));break;case"CIMMarkerPlacementAlongLineVariableSize":e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length&&(e.placementTemplate=e.placementTemplate.map(e=>e*t));break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size=null==e.size?0:e.size*t,"CIMVectorMarker"===e.type&&e.markerGraphics))for(let i of e.markerGraphics)e.scaleSymbolsProportionally||a(i.symbol,t,!0,r)}function l(e,t){if(!(0,n.Kq)(e))switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length&&(e.dashTemplate=e.dashTemplate.map(e=>e*t));break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function p(e){let t=[];return u((0,n.lW)(e),t),t.length?new i.A((0,n.e6)(t[0])):null}function u(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;let i="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(let e of r.symbolLayers)if(!(e.colorLocked||i&&((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&d(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":d(t,e.color);break;case"CIMGradientFill":h(t,e);break;case"CIMHatchFill":u(e.lineSymbol,t)}}function d(e,t){for(let r of e)if(r.join(".")===t.join("."))return;e.push(t)}function h(e,t){switch(t.colorRamp?.type){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&c(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":c(e,t.colorRamp)}}function c(e,t){t&&(t.fromColor&&d(e,t.fromColor),t.toColor&&d(e,t.toColor))}function y(e,t,r){t instanceof i.A||(t=new i.A(t));let s=(0,n.lW)(e);s&&m(s,t,r)}function m(e,t,r){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;let s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(let e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(r){let{layersToColor:t}=r;if(((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))&&"fill"===t||(0,n.jn)(e)&&"outline"===t)continue}else if((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))continue;let i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{m(e.symbol,t,r)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":f(e,t);break;case"CIMHatchFill":m(e.lineSymbol,t,r)}}}function f(e,t){switch(e.colorRamp?.type){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&g(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":g(e.colorRamp,t)}}function g(e,t){if(e&&(e.fromColor&&=t.toArray(),e.toColor)){let r=t.clone();r.a=0,e.toColor=r.toArray()}}function b(e,t,r=!1){let i=(0,n.lW)(e);if(r&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){let e=t-(i.angle||0);for(let t of i.symbolLayers)if((0,n.MM)(t)){let r=t.rotation||0;t.rotateClockwise?r-=e:r+=e,t.rotation=r}i.angle=t}}else i.angle=t}},37531(e,t,r){r.d(t,{dt:()=>h,GG:()=>g,UQ:()=>f,Sx:()=>u});var i=r(68197),n=r(60999),s=(r(90629),r(51850)),a=(r(76369),r(62046)),o=(r(2741),r(56507),r(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new o.q(1e3),new i.A([128,128,128]);var l=r(28975),p=r(33910);function u(e,t){if(!e)return null;let r=null;return(0,p.wk)(e)?r=function(e){let t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)}),r?new i.A(r):null}(e):(0,p.$y)(e)&&(r="cim"===e.type?(0,a.Nk)(e):e.color?new i.A(e.color):null),r?d(r,t):null}function d(e,t){if(null==t||null==e)return e;let r=e.toRgba();return r[3]*=t,new i.A(r)}function h(e,t,r){e&&(t||null!=r)&&(t&&=new i.A(t),(0,p.wk)(e)?function(e,t,r){let n=e.symbolLayers;if(!n)return;let s=(e,n=!1)=>{let s=t??e??null;return null!=r?.override&&(!s&&n&&(s=new i.A([255,255,255])),s&&(s.a=r.override)),d(s,r?.add)};n.forEach(e=>{if("water"===e.type)return void(e.color=d(e.color,r?.add));let t=null==e.material?null:e.material.color,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.A({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=d(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,r):(0,p.$y)(e)&&function(e,t,r){t??=e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=d(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=d(e.outline.color,r?.add))}(e,t,r))}function c(e){for(let t of e)if("number"==typeof t)return t;return null}function y(e,t,r){for(let i=0;i<3;i++){let n=e[i];switch(n){case"symbol-value":{let e=r[i];return null==e?1:e/t[i]}case"proportional":break;default:if(null!=n&&t[i])return n/t[i]}}return null}function m(e,t,r,i){switch(e){case"proportional":return r*i;case"symbol-value":return t??r;default:return e}}async function f(e,t){if(e&&t){if((0,p.wk)(e))return async function(e,t){let i=e.symbolLayers;i&&await(0,n.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){let r=t[2];"number"==typeof r&&(e.size=r)}(e,t);break;case"icon":case"line":case"text":!function(e,t){let r=c(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){let r=y(t,s.Un,[e.width,void 0,e.height]);null!=r&&(e.width=m(t[0],e.width,1,r),e.height=m(t[2],e.height,1,r))}(e,t);break;case"object":await async function(e,t){let{resourceSize:i,symbolSize:n}=await async function(e){let{computeObjectLayerResourceSize:t}=await r.e(5404).then(()=>r(95404)),i=await t(e,10),{width:n,height:s,depth:a}=e,o=[n,a,s],l=1;for(let e=0;e<3;e++){let t=o[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)o[e]??(o[e]=i[e]*l);return{resourceSize:i,symbolSize:o}}(e),s=y(t,i,n);null!=s&&(e.width=m(t[0],n[0],i[0],s),e.depth=m(t[1],n[1],i[1],s),e.height=m(t[2],n[2],i[2],s))}(e,t)}}(e,t))}(e,t);(0,p.$y)(e)&&function(e,t){let r=c(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{let t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r;break;case"simple-fill":case"picture-fill":break;case"cim":(0,a.X5)(e,r,{preserveOutlineWidth:!1})}}(e,t)}}function g(e,t,r){if(e&&null!=t)if((0,p.wk)(e)){let i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,p.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,a.KU)(e,t,!0)}}}}]);
|