@arcgis/core 5.2.0-next.54 → 5.2.0-next.56
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/{7e2bf6dd26c3cf0b49b0.js → 2190034c14ab3a25ac20.js} +1 -1
- package/assets/esri/core/workers/chunks/{a239f1e82dde4f7ada32.js → 2c29085c5e649971b31b.js} +1 -1
- package/assets/esri/core/workers/chunks/{77f19d204a4673b1e676.js → 46756a7f014d9d5b3f6c.js} +2 -2
- package/assets/esri/core/workers/chunks/4abd54518e35050feb90.js +1 -0
- package/assets/esri/core/workers/chunks/61d0ada7627f21988183.js +1 -0
- package/assets/esri/core/workers/chunks/{c38992b250731137cb1a.js → 6e84140c6129c5a666f7.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d6d07ecebf881ad913f.js → 8b80dd993ed14ec263c8.js} +1 -1
- package/assets/esri/core/workers/chunks/8ce649e55fefc8eca55c.js +1 -0
- package/assets/esri/core/workers/chunks/{2fbb00a29faeaa02912b.js → a4d9985391126e8ea06d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0ffd0190adfed8e5937a.js → a633291cdaff7fb7ce80.js} +1 -1
- package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +1 -0
- package/assets/esri/core/workers/chunks/{2d6d2d4df05bba9fa4a6.js → daae34cd086c0c6a5900.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce719d3aec8b52bfe160.js → ecff3a6ca99f2c88c837.js} +1 -1
- package/assets/esri/core/workers/chunks/{847ce06b14a921cd16f0.js → facf7e07e758601b642f.js} +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/geometry/support/normalizeUtilsSync.js +1 -1
- package/kernel.js +1 -1
- package/package.json +5 -5
- package/rest/featureService/FeatureService.d.ts +50 -2
- package/support/revision.js +1 -1
- package/symbols/cim/types.d.ts +2 -2
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/2d/layers/support/annodime/utils.js +1 -1
- package/views/2d/layers/support/annodime/virtualFields.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/SpatialIndex2D.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/support/ElevationUpdateEvent.js +2 -0
- package/views/3d/support/elevationUpdateExtentUtils.js +2 -0
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/assets/esri/core/workers/chunks/25cb56c3b538d00e7693.js +0 -1
- package/assets/esri/core/workers/chunks/2da337d7fd9295f6b967.js +0 -1
- package/assets/esri/core/workers/chunks/9e474465d069cb9e94f5.js +0 -1
- package/assets/esri/core/workers/chunks/c8db0a4fb5bc982dc9fc.js +0 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +0 -2
- package/views/3d/terrain/ElevationUpdateEvent.js +0 -2
- /package/assets/esri/core/workers/chunks/{77f19d204a4673b1e676.js.LICENSE.txt → 46756a7f014d9d5b3f6c.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2491],{11006(e,t,n){function i(e,t,n,i,o){r(e,t,n||0,i||e.length-1,o||s)}function r(e,t,n,i,s){for(;i>n;){if(i-n>600){var a=i-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);r(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(i,Math.floor(t+(a-l)*u/a+h)),s)}var d=e[t],p=n,m=i;for(o(e,n,t),s(e[i],d)>0&&o(e,n,i);p<m;){for(o(e,p,m),p++,m--;s(e[p],d)<0;)p++;for(;s(e[m],d)>0;)m--}0===s(e[n],d)?o(e,n,m):o(e,++m,i),m<=t&&(n=m+1),t<=m&&(i=m-1)}}function o(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function s(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>i})},40876(e,t,n){n.d(t,{Eq:()=>p,G1:()=>f,TS:()=>o,V6:()=>r,Vm:()=>m,ay:()=>l,c1:()=>g,c4:()=>s,j5:()=>c,lT:()=>h,oW:()=>u,xV:()=>_});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function o(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...o(e)]}function a(e,t,n){n<0&&++n,n>1&&--n;const i=6*n;return i<1?e+(t-e)*i:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,i=1){const r=(e%360+360)%360/360,o=n<=.5?n*(t+1):n+t-n*t,s=2*n-o;return[Math.round(255*a(s,o,r+1/3)),Math.round(255*a(s,o,r)),Math.round(255*a(s,o,r-1/3)),i]}function c(e){const t=e.length>5,n=t?8:4,i=(1<<n)-1,r=t?1:17,o=t?9===e.length:5===e.length;let s=Number("0x"+e.slice(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return o&&(l=s&i,s>>=n,a[3]=r*l/255),l=s&i,s>>=n,a[2]=r*l,l=s&i,s>>=n,a[1]=r*l,l=s&i,s>>=n,a[0]=r*l,a}function u(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),r=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,i+16*i,(r+16*r)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function h(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?f(e[3]):1,e}function p(e){let t=r(e)?o(e):null;return t??=h(e),t??=u(e),t}function m(e){const t=p(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function f(e){return y(e,0,1)}function g(e){return Math.round(y(e,0,255))}function y(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const x=1/2.2;function _(e){return e**x}n.d(t,["iw",0,x])},62885(e,t,n){n.d(t,{H:()=>o,V:()=>r});var i=n(7762);function r(e,t,n=i.A){return t||(t=new n),t===e||t.destroyed||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function o(e){return e}},21287(e,t,n){n.d(t,{M5:()=>h,eV:()=>u});var i=n(11254),r=n(49186),o=n(17676),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,i){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const r=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,i);return r.data.set(e,0),r}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const r=await(0,i.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:r.data,mediaType:r.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:i}=await n.e(820).then(n.bind(n,10820));if(e(l))return i(l,t)}if(u){const{isAnimatedPNG:e,parseApng:i}=await n.e(2390).then(n.bind(n,22390));if(e(l))return i(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,i.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new r.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},48163(e,t,n){function i(){return[0,0]}function r(e){return[e[0],e[1]]}function o(e,t){return[e,t]}function s(){return o(1,1)}function a(){return o(-1,-1)}function l(){return o(1,0)}function c(){return o(0,1)}n.d(t,{fA:()=>o,o8:()=>r,vt:()=>i});const u=s(),h=a(),d=l(),p=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:h,ONES:u,UNIT_X:d,UNIT_Y:p,ZEROS:[0,0],clone:r,create:i,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let i=0;i<n;++i)t[i]=e[i];return t},fromValues:o,negativeOnes:a,ones:s,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(t,["IA",0,h,"Un",0,u])},75503(e,t,n){n.d(t,{wq:()=>a});var i=n(4576),r=n(21818),o=(n(44208),n(15142)),s=n(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,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(),w.prune(),P.prune(),b.prune(),M.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(_(e,n))for(w.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],s=n.leaf?i(o):o;_(e,s)&&(n.leaf?t(o):x(e,s)?l(o,t):w.push(o))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],o=t.leaf?n(r):r;if(_(e,o)){if(t.leaf||x(e,o))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new C([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(b.clear(),M.clear();n||b.length>0;){if(n||(n=b.pop(),o=b.data[b.length-1],s=M.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),b.push(n),this._condense(b),this;a||n.leaf||!x(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(b.push(n),M.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let o=this._maxEntries;if(r<=o){const i=new C(e.slice(t,n+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/o**(i-1)));const s=new R([]);s.height=i;const a=Math.ceil(r/o),l=a*Math.ceil(Math.sqrt(o));v(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);v(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);s.children.push(this._build(e,n,r,i-1))}}return c(s,this._toBBox),s}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);b.clear();const o=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=m(s),l=g(e,s)-a;l<r?(r=l,i=a<i?a:i,n=s):l===r&&a<i&&(i=a,n=s)}t=n||t.children[0]}return t}(r,this._data,t,b);for(o.children.push(e),h(o,r);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)h(t.data[i],e)}(r,b,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const o=this._chooseSplitIndex(n,r,i);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new C(s):new R(s);a.height=n.height,c(n,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new R([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,o;i=r=1/0;for(let s=t;s<=n-t;s++){const t=u(e,0,s,this._toBBox),a=u(e,s,n,this._toBBox),l=y(t,a),c=m(t)+m(a);l<i?(i=l,o=s,r=c<r?c:r):l===i&&c<r&&(r=c,o=s)}return o}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,o=u(e,0,t,r),s=u(e,n-t,n,r);let a=f(o)+f(s);for(let i=t;i<n-t;i++){const t=e.children[i];h(o,e.leaf?r(t):t),a+=f(o)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];h(s,e.leaf?r(t):t),a+=f(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],o=r.children;o.splice((0,i.qh)(o,n,o.length,r.indexHint),1)}else this.clear();else c(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(P.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.z)(e));else P.pushArray(n.children);n=P.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,i,r){r||(r=new C([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],h(r,e.leaf?i(o):o);return r}function h(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 d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(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 y(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const w=new o.A,P=new o.A,b=new o.A,M=new o.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class C extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class R extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},16494(e,t,n){var i=n(17632);const r=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new i.I({whiteList:r,onTagAttr:(e,t,n)=>{const i=`${t}="${n}"`;if(o.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);n.d(t,["Nd",0,a,"W5",0,s])},90629(e,t,n){n.d(t,{Lz:()=>r,PN:()=>o,cr:()=>s,gs:()=>l,r_:()=>c,tc:()=>a}),n(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function r(e){return e?e/72*96:0}function o(e){return e?72*e/96:0}function s(e){if("string"==typeof e){const t=e.match(i);if(t){const n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),r=e.startsWith("-"),s="px"===i?o(n):n;return r?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function a(e=0,t=0){return{x:e,y:t}}function l(e=0,t=0){return[e,t]}function c(e=0,t=0,n=0){return[e,t,n]}},13069(e,t,n){n.d(t,{AG:()=>a,lk:()=>r,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${r().toUpperCase()}}`}function s(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},80754(e,t,n){n.d(t,{kS:()=>c,kd:()=>l,r8:()=>u});var i=n(82799),r=n(16930),o=n(60408),s=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,s.Ed)(e))for(const n of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,s.aO)(e)){const[n,i]=e.c;n[0]+=t,i[0]+=t;continue}if((0,s.FG)(e)){const[n,i]=e.a;n[0]+=t,i[0]+=t;continue}if((0,s.n1)(e)){const[n,i,r]=e.b;n[0]+=t,i[0]+=t,r[0]+=t;continue}e[0]+=t}for(const n of u(e))for(const e of n)e[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}n.d(t,["j7",0,a])},89056(e,t,n){n.d(t,{b3:()=>h,jZ:()=>u});var i=n(12195),r=n(19419),o=n(537),s=n(95108),a=n(60408),l=n(80754),c=n(21325);function u(e){return d(e,!0)}function h(e){return d(e,!1)}function d(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,c.Vp)(n),s=(0,i.W)(e)?e.toJSON():e;if(!r)return s;const u=(0,c.K8)(n)?102100:4326,h=l.j7[u].maxX,d=l.j7[u].minX;if((0,a.fT)(s))return m(s,h,d);if((0,a.U9)(s))return s.points=s.points.map(e=>m(e,h,d)),s;if((0,a.ZC)(s))return p(s,r);if((0,a.Bi)(s)||(0,a.Rg)(s)){const e=(0,o.Rg)(v,s),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},i=(0,l.kd)(n.xmin,d)*(2*h),r=0===i?s:(0,l.kS)(s,i);return n.xmin+=i,n.xmax+=i,n.xmax>h?x(r,h,t):n.xmin<d?x(r,d,t):r}return s}function p(e,t){if(!t)return e;const n=function(e,t){const n=[],{ymin:i,ymax:r,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=f(e.xmin,t),{x:d,frameId:p}=f(e.xmax,t),m=u===d&&a>0;if(a>2*c){const e={xmin:o<s?u:d,ymin:i,xmax:c,ymax:r},t={xmin:l,ymin:i,xmax:o<s?d:u,ymax:r},a={xmin:0,ymin:i,xmax:c,ymax:r},m={xmin:l,ymin:i,xmax:0,ymax:r},f=[],y=[];g(e,a)&&f.push(h),g(e,m)&&y.push(h),g(t,a)&&f.push(p),g(t,m)&&y.push(p);for(let e=h+1;e<p;e++)f.push(e),y.push(e);n.push(new _(e,[h]),new _(t,[p]),new _(a,f),new _(m,y))}else u>d||m?n.push(new _({xmin:u,ymin:i,xmax:c,ymax:r},[h]),new _({xmin:l,ymin:i,xmax:d,ymax:r},[p])):n.push(new _({xmin:u,ymin:i,xmax:d,ymax:r},[h]));return n}(e,t).map(e=>e.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,n){if(Array.isArray(e)){const i=e[0];if(i>t){const n=(0,l.kd)(i,t);e[0]=i+n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e[0]=i+t*(-2*n)}}else{const i=e.x;if(i>t){const n=(0,l.kd)(i,t);e.x+=n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e.x+=t*(-2*n)}}return e}function f(e,t){const[n,i]=t.valid,r=2*i;let o,s=0;return e>i?(o=Math.ceil(Math.abs(e-i)/r),e-=o*r,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/r),e+=o*r,s=-o),{x:e,frameId:s}}function g(e,t){const{xmin:n,ymin:i,xmax:r,ymax:o}=t;return y(e,n,i)&&y(e,n,o)&&y(e,r,o)&&y(e,r,i)}function y(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function x(e,t,n=!0){const i=!(0,a.Rg)(e);if(i&&(0,s.m3)(e),n)return(new w).cut(e,t);const r=i?e.rings:e.paths,o=i?4:2,l=r.length,c=-2*t;for(let e=0;e<l;e++){const t=r[e];if(t&&t.length>=o){const e=[];for(const[n,...i]of t)e.push([n+c,...i]);r.push(e)}}return i?e.rings=r:e.paths=r,e}class _{constructor(e,t){this.extent=e,this.frameIds=t}}const v=(0,r.vt)();class w{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const i=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=i;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide===-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(P(this._lineIn,n<=0?e:this._xCut,t),P(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function P(e,t,n){const i=e.length;i>1&&e[i-1][0]===t&&e[i-2][0]===t?e[i-1][1]=n:e.push([t,n])}},90182(e,t,n){n.r(t),n.d(t,{default:()=>tt});var i=n(5482),r=n(7762),o=n(49186),s=n(53966),a=n(25728),l=n(17676),c=n(91429),u=n(16930),h=n(4146),d=n(63074),p=n(34287),m=n(8303),f=n(25036),g=n(69540),y=n(25482),x=n(77690),_=n(29242),v=n(37585),w=n(35522);const P=(0,n(51850).vt)(),b=(0,_.vt)(),M=(0,_.vt)(),I=(0,_.vt)();function A(e,t,n){return(0,w.hZ)(P,t[0],t[1],1),(0,w.ei)(P,P,(0,x.mg)(b,n)),0===P[2]?(0,v.hZ)(e,P[0],P[1]):(0,v.hZ)(e,P[0]/P[2],P[1]/P[2])}function C(e,t,n){return R(M,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(I,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,x.lw)(e,(0,x.KC)(M,M),I),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,i,r,o,s,a,l){(0,x.hZ)(e,t,i,o,n,r,s,1,1,1),(0,w.hZ)(P,a,l,1),(0,x.KC)(b,e);const[c,u,h]=(0,w.ei)(P,P,(0,x.mg)(b,b));return(0,x.hZ)(b,c,0,0,0,u,0,0,0,h),(0,x.lw)(e,b,e)}var E=n(90629),S=n(48163),L=n(86738),O=n(39829),T=n(91218),B=n(56560);const Z=e=>{const t=e;return class extends t{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:i}=(0,T.projectOrLoad)(e,t);return i?null:i||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}}};var k=n(36005),j=n(43937);const Y=(0,_.vt)(),U=(0,S.vt)();let N=class extends y.o{};(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],N.prototype,"x",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],N.prototype,"y",void 0),N=(0,i.Cg)([(0,c.$K)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],N);let H=class extends((0,y.T)(Z(g.Pw))){constructor(e){super(e),this.height=0,this.type="control-points",this.width=0}get controlPoints(){return this._get("controlPoints")??null}set controlPoints(e){this._set("controlPoints",e)}readControlPoints(e,t){const n=u.A.fromJSON(t.spatialReference),i=(0,_.fA)(...t.coefficients,1);return e.map(e=>((0,v.hZ)(U,e.x,e.y),A(U,U,i),{sourcePoint:e,mapPoint:new L.A({x:U[0],y:U[1],spatialReference:n})}))}writeControlPoints(e,t,n,i){if(null==this.transform){const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:i?.layer,georeference:this});return void(i?.messages?i.messages.push(e):s.A.getLogger(this).error(e.name,e.message))}null!=e&&X(e[0])&&(t.controlPoints=e.map(e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}}),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8))}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(Y);if(null==e||!X(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,i){const r=(0,S.fA)(0,n),o=(0,S.fA)(0,0),s=(0,S.fA)(t,0),a=(0,S.fA)(t,n);return A(r,r,e),A(o,o,e),A(s,s,e),A(a,a,e),new O.A({rings:[[r,o,s,a,r]],spatialReference:i})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!X(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:i}=this,{rings:[[r,o,s,a]]}=e,l=new B.A({sourcePoint:(0,E.tc)(0,i),mapPoint:new L.A({x:r[0],y:r[1],spatialReference:t})}),c=new B.A({sourcePoint:(0,E.tc)(0,0),mapPoint:new L.A({x:o[0],y:o[1],spatialReference:t})}),u=new B.A({sourcePoint:(0,E.tc)(n,0),mapPoint:new L.A({x:s[0],y:s[1],spatialReference:t})}),h=new B.A({sourcePoint:(0,E.tc)(n,i),mapPoint:new L.A({x:a[0],y:a[1],spatialReference:t})});X(l)&&X(c)&&X(u)&&X(h)&&(Q(Y,l,c,u,h),this.controlPoints=this.controlPoints.map(({sourcePoint:e})=>((0,v.hZ)(U,e.x,e.y),A(U,U,Y),{sourcePoint:e,mapPoint:new L.A({x:U[0],y:U[1],spatialReference:t})})))}get inverseTransform(){return null==this.transform?null:(0,x.B8)((0,_.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!X(this.controlPoints[0]))return null;(0,v.hZ)(U,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return A(U,U,this.transform),new L.A({x:U[0],y:U[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!X(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,T.projectOrLoad)(e,t).geometry)?null:((0,v.hZ)(U,e.x,e.y),A(U,U,this.inverseTransform),(0,E.tc)(U[0],U[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:i}=this;if(!(null!=t&&n>0&&i>0))return null;const[r,o,s,a]=t;if(!X(r))return null;const l=r.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!X(c.controlPoint))return null;null==e&&(e=(0,_.vt)());let d=null;return d=X(u.controlPoint)&&X(h.controlPoint)?Q(e,r,c.controlPoint,u.controlPoint,h.controlPoint):X(u.controlPoint)?function(e,t,n,i){return J($,F,t),J(z,W,n),J(V,q,i),(0,v.Cc)(G,$,z,.5),(0,v.e$)(G,V,G,Math.PI),(0,v.Cc)(D,F,W,.5),(0,v.e$)(D,q,D,Math.PI),ie(e,$,z,V,G,F,W,q,D)}(e,r,c.controlPoint,u.controlPoint):function(e,t,n){return J($,F,t),J(z,W,n),(0,v.e$)(V,z,$,K),(0,v.e$)(G,$,z,K),(0,v.e$)(q,W,F,-K),(0,v.e$)(D,F,W,-K),ie(e,$,z,V,G,F,W,q,D)}(e,r,c.controlPoint),d.every(e=>0===e)?null:d}_projectControlPoint(e,t){if(!X(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:i}=e,{geometry:r,pending:o}=(0,T.projectOrLoad)(i,t);return o?{valid:!1,controlPoint:null}:o||r?{valid:!0,controlPoint:new B.A({sourcePoint:n,mapPoint:r})}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:i.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function X(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,i.Cg)([(0,c.MZ)({type:[B.A],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[N],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:u.A,isRequired:!0}}}}})],H.prototype,"controlPoints",null),(0,i.Cg)([(0,k.w)("controlPoints")],H.prototype,"readControlPoints",null),(0,i.Cg)([(0,j.K)("controlPoints")],H.prototype,"writeControlPoints",null),(0,i.Cg)([(0,c.MZ)({clonable:!1})],H.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],H.prototype,"height",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"inverseTransform",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],H.prototype,"transform",null),(0,i.Cg)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],H.prototype,"width",void 0),H=(0,i.Cg)([(0,c.$K)("esri.layers.support.ControlPointsGeoreference")],H);const $=(0,S.vt)(),z=(0,S.vt)(),V=(0,S.vt)(),G=(0,S.vt)(),F=(0,S.vt)(),W=(0,S.vt)(),q=(0,S.vt)(),D=(0,S.vt)(),K=Math.PI/2;function J(e,t,n){(0,v.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,v.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function Q(e,t,n,i,r){return J($,F,t),J(z,W,n),J(V,q,i),J(G,D,r),ie(e,$,z,V,G,F,W,q,D)}const ee=new Array(8).fill(0),te=new Array(8).fill(0);function ne(e,t,n,i,r){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=i[0],e[5]=i[1],e[6]=r[0],e[7]=r[1],e}function ie(e,t,n,i,r,o,s,a,l){return C(e,ne(ee,t,n,i,r),ne(te,o,s,a,l))}var re=n(11254),oe=n(21287),se=n(84952),ae=n(13069),le=n(92474),ce=n(64108);let ue=0;const he=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:ue++})}};return n=(0,i.Cg)([(0,ce.$)("esri.core.NumericIdentifiable")],n),n};var de=n(35666),pe=n(5443),me=n(21325);const fe=(0,S.vt)();let ge=class extends(Z(g.Pw)){constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:i}=this;if(null==e||null==t||null==n||null==i)return null;const r=e.spatialReference;return t=this.projectOrWarn(t,r),n=this.projectOrWarn(n,r),i=this.projectOrWarn(i,r),null==t||null==n||null==i?null:new O.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[i.x,i.y],[n.x,n.y]]],spatialReference:r})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[i,r,o,s]]}=e;this.bottomLeft=new L.A({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new L.A({x:r[0],y:r[1],spatialReference:n}),this.topRight=new L.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new L.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:i,bottomLeft:r}=this;if(null==e||null==t||null==n||null==i||null==r)return null;const o=t.spatialReference;e=e.normalize();const s=(0,T.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,v.hZ)(fe,s.x,s.y);const a=C((0,_.vt)(),[t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return A(fe,fe,a),(0,E.tc)(fe[0],fe[1])}};(0,i.Cg)([(0,c.MZ)({clonable:!1})],ge.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)({type:L.A})],ge.prototype,"bottomLeft",void 0),(0,i.Cg)([(0,c.MZ)({type:L.A})],ge.prototype,"bottomRight",void 0),(0,i.Cg)([(0,c.MZ)({type:L.A})],ge.prototype,"topLeft",void 0),(0,i.Cg)([(0,c.MZ)({type:L.A})],ge.prototype,"topRight",void 0),ge=(0,i.Cg)([(0,c.$K)("esri.layers.support.CornersGeoreference")],ge);const ye=ge;var xe=n(34727),_e=n(34304);let ve=class extends(Z(g.Pw)){constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:i,spatialReference:r}=this.extent;let o;if(this.rotation){const{x:r,y:s}=this.extent.center,a=we(r,s,this.rotation);o=[a(e,t),a(e,i),a(n,i),a(n,t)],o.push(o[0])}else o=[[e,t],[e,i],[n,i],[n,t],[e,t]];return new O.A({rings:[o],spatialReference:r})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,i,r]],extent:{center:{x:o,y:s}}}=e,a=(0,xe.KJ)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=we(o,s,-a),[c,u]=l(n[0],n[1]),[h,d]=l(r[0],r[1]);this.extent=new pe.A({xmin:c,ymin:u,xmax:h,ymax:d,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:i,ymin:r,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,T.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=we(a.x,a.y,-n)(u,h)),(0,E.tc)((0,xe.hs)(u,i,o,0,1),(0,xe.hs)(h,s,r,0,1))}};function we(e,t,n){const i=(0,_e.DF)(n),r=Math.cos(i),o=Math.sin(i);return(n,i)=>[r*(n-e)+o*(i-t)+e,r*(i-t)-o*(n-e)+t]}function Pe(e,t){const n=(0,de.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>3}function be(e,t,n){return{enabled:!Pe(n?.layer,n?.origin),ignoreOrigin:!0}}(0,i.Cg)([(0,c.MZ)({clonable:!1})],ve.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)({type:pe.A})],ve.prototype,"extent",void 0),(0,i.Cg)([(0,c.MZ)({type:Number})],ve.prototype,"rotation",void 0),ve=(0,i.Cg)([(0,c.$K)("esri.layers.support.ExtentAndRotationGeoreference")],ve);const Me={json:{name:"url",type:String,write:{overridePolicy:be}}},Ie={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:be}}},Ae={types:{key:"type",base:null,typeMap:{"control-points":H,corners:ye,"extent-and-rotation":ve}},json:{types:{key:"type",base:null,typeMap:{"control-points":H}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};var Ce=n(59923);let Re=class extends(he((0,a.M)(le.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return H.fromJSON(e)}writeGeoreference(e,t,n,i){const r=i?.resources?.pendingOperations,o=()=>{const r=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:i}=e;if(5!==i?.rings[0]?.length)return null;const[r,o,s,a]=i.rings[0],{spatialReference:l}=i;return new H({controlPoints:[new B.A({mapPoint:new L.A({x:r[0],y:r[1],spatialReference:l}),sourcePoint:(0,E.tc)(0,n)}),new B.A({mapPoint:new L.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,E.tc)(0,0)}),new B.A({mapPoint:new L.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,E.tc)(t,0)}),new B.A({mapPoint:new L.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,E.tc)(t,n)})],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(r){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==r.controlPoints?.length)return void(0,Ce.qt)(i,"ControlPointsGeoreference.controlPoints","only 'control-points' georeference with 4 control points may be persisted.");t[n]=r.write({},i)}};if("control-points"!==e.type&&!this.loaded&&r)return t[n]={},void r.push(this.load().then(o));o()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:i}=this;if(null==e||null==t||0===n||0===i)return null;const r=t.toSourceNormalized(e);return null==r?null:(r.x*=n,r.y*=i,r)}};(0,i.Cg)([(0,c.MZ)(Ae)],Re.prototype,"georeference",void 0),(0,i.Cg)([(0,k.w)("georeference")],Re.prototype,"readGeoreference",null),(0,i.Cg)([(0,j.K)("georeference")],Re.prototype,"writeGeoreference",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1,write:!1}})],Re.prototype,"opacity",void 0),Re=(0,i.Cg)([(0,c.$K)("esri.layers.support.MediaElementBase")],Re);var Ee=n(85648);const Se=Symbol("ImageElementInstance"),Le=Symbol("VideoElementInstance");function Oe(e){return function(e){return null!=e&&"object"==typeof e&&Se in e}(e)||function(e){return null!=e&&"object"==typeof e&&Le in e}(e)}var Te,Be=n(97159);let Ze=class extends Re{static{Te=Se}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Te]=!0,this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,oe.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Be.f)(t.url,n)}writeImage(e,t,n,i){if(null==e)return;const r=i?.portalItem,o=i?.resources;if(!r||!o)return void("string"==typeof e&&(t[n]=(0,Be.t)(e,i)));const s=function(e){return"string"==typeof e&&!(0,se.DB)(e)&&!(0,se.w8)(e)}(e)?e:null;if(s){if(null==(0,Be.i)(s))return void(t[n]=s);const e=(0,Be.t)(s,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(r&&e&&!(0,se.oP)(e))return o.toKeep.push({resource:r.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,se.DB)(e)?(0,se.N9)(e):(await(0,re.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=n,e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),i}(e).toBlob(t))}(e).then(e=>{const i=function(e,t){const n=(0,ae.lk)(),i=`${(0,se.fj)("media",n)}.${(0,Ee.n)({type:"blob",blob:e})}`;return t.resourceFromPath(i)}(e,r);t[n]=i.itemRelativeUrl,o.toAdd.push({resource:i,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,i.Cg)([(0,c.MZ)()],Ze.prototype,"animationOptions",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Ze.prototype,"content",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Ze.prototype,"contentWidth",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Ze.prototype,"contentHeight",null),(0,i.Cg)([(0,c.MZ)(Me)],Ze.prototype,"image",void 0),(0,i.Cg)([(0,k.w)("image",["url"])],Ze.prototype,"readImage",null),(0,i.Cg)([(0,j.K)("image")],Ze.prototype,"writeImage",null),(0,i.Cg)([(0,c.MZ)(Ie)],Ze.prototype,"type",void 0),Ze=(0,i.Cg)([(0,c.$K)("esri.layers.support.ImageElement")],Ze);var ke=n(62885),je=n(65529),Ye=n(61893),Ue=n(36708),Ne=n(19419),He=n(12176),Xe=n(6518),$e=n(69622),ze=n(89056);let Ve=class extends $e.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ne.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,T.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return O.A.fromJSON((0,ze.jZ)(this.coords))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ne.VY)(e):null}};(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"element",void 0),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"bounds",null),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"normalizedCoords",null),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"normalizedBounds",null),Ve=(0,i.Cg)([(0,c.$K)("esri.layers.support.MediaElementView")],Ve);var Ge,Fe=n(16494),We=n(38969);const qe=Symbol("canplay");let De=class extends Re{static{Ge=Le}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[Ge]=!0}load(){const e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{const t=document.createElement("video");return t.src=Fe.W5.sanitizeUrl((0,se.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;const t=(0,xe.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,i){if(!e)return void(i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source is missing")));const r=function(e){return"string"==typeof e&&!(0,se.DB)(e)&&!(0,se.w8)(e)}(e)?e:null;if(!r)return void(i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,se.oP)(r)&&i?.blockedRelativeUrls&&i.blockedRelativeUrls.push(r);const s=(0,se.s2)(r);(0,Be.i)(s)?i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=s}async _preProcessVideoUrl(e){if((0,se.zs)(e))return(0,se.yM)(e);try{return await(0,re.A)(e,{method:"head"}),e}catch{try{return(0,se.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,se.w8)(e.src)||(e.src=e.src));try{await(0,We.i)(e,e=>this.addHandles(e,qe)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(qe)}}};(0,i.Cg)([(0,c.MZ)()],De.prototype,"autoplay",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],De.prototype,"content",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],De.prototype,"contentWidth",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],De.prototype,"contentHeight",null),(0,i.Cg)([(0,c.MZ)({type:Number})],De.prototype,"currentTime",null),(0,i.Cg)([(0,c.MZ)({type:Number})],De.prototype,"duration",null),(0,i.Cg)([(0,c.MZ)(Me)],De.prototype,"video",null),(0,i.Cg)([(0,j.K)("video")],De.prototype,"writeVideo",null),(0,i.Cg)([(0,c.MZ)(Ie)],De.prototype,"type",void 0),De=(0,i.Cg)([(0,c.$K)("esri.layers.support.VideoElement")],De);const Ke={key:"type",defaultKeyValue:"image",base:Re,typeMap:{image:Ze,video:De}},Je=r.A.ofType(Ke);let Qe=class extends((0,le.WV)((0,Ye.g)(je.nJ))){constructor(e){super(e),this._index=new Xe.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new Ve({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const i=(0,Ue.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(i,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new Je}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:u.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}get elements(){return this._get("elements")}set elements(e){this._set("elements",(0,ke.V)(e,this._get("elements"),Je))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new pe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,T.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,me.aI)(e.spatialReference,this.spatialReference)?e:(0,T.project)(e,this.spatialReference);if(!n)return[];const i=n.normalize(),r=[];for(const e of i)this._index.forEachInBounds((0,Ne.VY)(e),({normalizedCoords:t,element:n})=>{null!=t&&(0,He.fA)(e,t)&&r.push(n)});return r.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),r}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,i=this._index.has(e),r=null!=n;this._index.delete(e),r&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(i!==r?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,i.Cg)([(0,c.MZ)()],Qe.prototype,"elements",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"fullExtent",null),(0,i.Cg)([(0,c.MZ)()],Qe.prototype,"spatialReference",null),Qe=(0,i.Cg)([(0,c.$K)("esri.layers.support.LocalMediaElementSource")],Qe);let et=class extends((0,d.dM)((0,f.j)((0,p.q)((0,m.A)((0,a.M)(h.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:r,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case 0:return r(this,t);case 1:return o(this,i,t)}}),this.source=new Qe}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const i=Oe(t)?new Qe({elements:new r.A([t])}):t;this._set("effectiveSource",i),this.spatialReference&&(i.spatialReference=this.spatialReference),await i.load(e),this.spatialReference=i.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new Qe({elements:new r.A(e)}):e instanceof r.A?new Qe({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const i=this._createSource(t);return i?.read(t,n),i}writeSource(e,t,n,i){if(e&&e instanceof Qe){const t=e.elements.length;if(1!==t)return void(i?.messages&&i.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}Oe(e)?e.write(t,i):i?.messages&&(e?i.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):i.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Ze;case"video":return new De}return null}_getSourceOverride(e,t){if(Oe(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){const n=e.toJSON(),i=this._createSource(n);return i.read({...n},{origin:"portal-item"}),i.read({georeference:t},{origin:"web-map"}),i.read({georeference:t},{origin:"web-scene"}),i}return null}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],et.prototype,"effectiveSource",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],et.prototype,"georeference",void 0),(0,i.Cg)([(0,k.w)("web-document","georeference")],et.prototype,"readGeoreference",null),(0,i.Cg)([(0,c.MZ)({type:String})],et.prototype,"copyright",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],et.prototype,"fullExtent",null),(0,i.Cg)([(0,c.MZ)({type:["MediaLayer"]})],et.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],et.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:H}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Pe(this,n?.origin)&&Oe(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],et.prototype,"source",null),(0,i.Cg)([(0,c.wg)("source")],et.prototype,"castSource",null),(0,i.Cg)([(0,k.w)("source",["url"])],et.prototype,"readSource",null),(0,i.Cg)([(0,j.K)("source")],et.prototype,"writeSource",null),(0,i.Cg)([(0,c.MZ)({type:u.A})],et.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],et.prototype,"type",void 0),et=(0,i.Cg)([(0,c.$K)("esri.layers.MediaLayer")],et);const tt=et},6518(e,t,n){n.d(t,{F:()=>a});var i=n(44208),r=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.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){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,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;const e=(0,o.Ie)();for(const 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){const 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,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(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){const 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()))}}},8303(e,t,n){var i=n(5482),r=n(92602),o=n(70333),s=n(11254),a=n(60999),l=n(49186),c=n(36563),u=n(53966),h=n(97768),d=n(17676),p=n(84952),m=n(91429),f=n(77548),g=n(20655),y=n(80812),x=n(41318),_=n(10407),v=n(36005),w=n(43937);const P={credential:null,user:null};n.d(t,["A",0,e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new y.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await n.e(1204).then(n.bind(n,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await n.e(1204).then(n.bind(n,41204)),i=new AbortController,r=(0,c.rE)(i);return this.addHandles(r,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:i.signal})}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),r=e===n.id;if(r&&n.portal.user)return this._getUserPrivileges(n,i);let s,a;if(r)s=n.portal.url;else try{s=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!s||!(0,p.b8)(s,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,c=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:c},content:{updateItem:u}};try{if(r?await n.reload():(n=new y.default({id:e,portal:{url:s}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,i)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:c},content:{updateItem:u}}}_getUserPrivileges(e,t){const n=(0,_.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const n=P.credential===t?P.user:await this._fetchEditingUser(e);return P.credential=t,P.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const i=`${n.owningSystemUrl}/sharing/rest`,r=g.A.getDefault();if(r&&r.loaded&&(0,p.S8)(r.restUrl)===(0,p.S8)(i))return r.user;const l=`${i}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?x.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return n&&i&&!(0,p.ut)(i.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,m.MZ)({type:y.default})],b.prototype,"portalItem",null),(0,i.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,i.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,i.Cg)([(0,m.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,i.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],b),b}])},38969(e,t,n){n.d(t,{i:()=>r});var i=n(37955);function r(e,t){return new Promise((n,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,i.Oo)(e,"canplay",n)),t((0,i.Oo)(e,"error",r)))})}},10407(e,t,n){n.d(t,{It:()=>p,LG:()=>s,OM:()=>c,Sm:()=>u,Y:()=>a,bK:()=>l,sQ:()=>h});var i=n(91218),r=n(16930),o=n(28735);function s(e,t){if(!a(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function c(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function u(e,t,n){n?s(e,t):c(e,t)}async function h(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const n=r.A.WGS84;return await(0,i.initializeProjection)(t,n),(0,i.project)(e,n)}(n)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){const{portal:t,isOrgItem:n,itemControl:i}=e,r=t.user?.privileges;let o=!r||r.includes("features:user:edit"),s=!!n&&!!r?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:a}}}n.d(t,["mm",0,d])},85648(e,t,n){n.d(t,{n:()=>r});var i=n(84952);function r(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={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(const e in l)o[l[e]]=e}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3586],{73354(t,e,n){n.d(e,{a:()=>h,b:()=>i,c:()=>o,d:()=>a,e:()=>f,f:()=>c,l:()=>u,n:()=>d,t:()=>s}),n(44208);var r=n(72727);function o(t,e,n){s(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function s(t,e,n,o=3,s=o){const a=(0,r.k)(t.length,o,3),i=(0,r.k)(e.length,s,3),l=Math.min(a,i),u=n[0],c=n[1],h=n[2],f=n[4],d=n[5],p=n[6],m=n[8],y=n[9],g=n[10],M=n[12],b=n[13],R=n[14];let _=0,w=0;for(let n=0;n<l;n++){const n=e[_],r=e[_+1],a=e[_+2];t[w]=u*n+f*r+m*a+M,t[w+1]=c*n+d*r+y*a+b,t[w+2]=h*n+p*r+g*a+R,_+=s,w+=o}return t}function a(t,e,n){i(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function i(t,e,n,o=3,s=o){const a=(0,r.k)(t.length,o,3),i=(0,r.k)(e.length,s,3),l=Math.min(a,i),u=n[0],c=n[1],h=n[2],f=n[3],d=n[4],p=n[5],m=n[6],y=n[7],g=n[8];let M=0,b=0;for(let n=0;n<l;n++){const n=e[M],r=e[M+1],a=e[M+2];t[b]=u*n+f*r+m*a,t[b+1]=c*n+d*r+y*a,t[b+2]=h*n+p*r+g*a,M+=s,b+=o}}function l(t,e,n,r=3,o=r){const s=Math.min(t.length/r,e.length/o);let a=0,i=0;for(let l=0;l<s;l++)t[i]=n*e[a],t[i+1]=n*e[a+1],t[i+2]=n*e[a+2],a+=o,i+=r;return t}function u(t,e,n,r){c(t.typedBuffer,e.typedBuffer,n,r,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,r,o=3,s=o){const a=Math.min(t.length/o,e.length/s);let i=0,l=0;const u=1/2.2;for(let c=0;c<a;c++)t[l]=r*(n*e[i])**u,t[l+1]=r*(n*e[i+1])**u,t[l+2]=r*(n*e[i+2])**u,i+=s,l+=o}function h(t,e,n,o=3,s=o){const a=(0,r.k)(t.length,o,3),i=(0,r.k)(e.length,s,3),l=Math.min(a,i);let u=0,c=0;for(let r=0;r<l;r++)t[c]=e[u]+n[0],t[c+1]=e[u+1]+n[1],t[c+2]=e[u+2]+n[2],u+=s,c+=o;return t}function f(t,e){d(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function d(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let s=0,a=0;for(let i=0;i<o;i++){const o=e[s],i=e[s+1],l=e[s+2],u=o*o+i*i+l*l;if(u>0){const e=1/Math.sqrt(u);t[a]=e*o,t[a+1]=e*i,t[a+2]=e*l}s+=r,a+=n}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:d,normalizeView:f,scale:l,scaleView:function(t,e,n){l(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)},shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,s=t.typedBufferStride,a=e.typedBuffer,i=e.typedBufferStride;let l=0,u=0;for(let t=0;t<r;t++)o[u]=a[l]>>n,o[u+1]=a[l+1]>>n,o[u+2]=a[l+2]>>n,l+=i,u+=s},transformMat3:i,transformMat3View:a,transformMat4:s,transformMat4View:o,translate:h},Symbol.toStringTag,{value:"Module"}))},69540(t,e,n){var r=n(5482),o=n(69622),s=(n(44208),n(4718)),a=(n(53966),n(97768)),i=n(88620),l=n(64108);const u=Symbol("ClonableMixin"),c=t=>{var e;const n=t;let o=class extends n{constructor(){super(...arguments),this[e]=!0}static{e=u}clone(t){const e=(0,i.oY)(this);(0,a.Lw)(e,"unable to clone instance of non-accessor class");const n=e.metadata,r=e.store,o={},l=new Map;for(const e in n){const a=n[e],i=r?.originOf(e),u=a.clonable;if(a.readOnly||!1===u||7!==i&&0!==i&&5!==i&&4!==i)continue;const c=this[e];let h=null;if("function"==typeof u)h=u(c,t);else if("reference"===u)h=c;else if(h=(0,s.TU)(c,t),null!=c&&null==h)continue;0===i?l.set(e,h):o[e]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(o);if(l.size){const t=(0,i.oY)(u)?.store;if(t)for(const[e,n]of l)t.set(e,n,0)}return u}};return o=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],o),o},h=c(o.A);n.d(e,["OU",0,c,"Pw",0,h])},95488(t,e,n){n.d(e,{I:()=>o});var r=n(11406);class o extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(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]]}n.d(e,{o8:()=>o,vt:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:r,fromValues:function(t,e,n,r,o,s,a,i,l,u,c,h,f,d,p,m){return[t,e,n,r,o,s,a,i,l,u,c,h,f,d,p,m]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,s])},51850(t,e,n){function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function s(t,e,n){return[t,e,n]}function a(t,e,n){return[t,e,n]}function i(t,e=[0,0,0]){const n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function l(){return[0,0,0]}function u(){return s(1,1,1)}function c(){return s(1,0,0)}function h(){return s(0,1,0)}function f(){return s(0,0,1)}n.d(e,{CN:()=>a,S:()=>u,Ul:()=>l,ci:()=>i,fA:()=>s,o8:()=>o,vt:()=>r});const d=[0,0,0],p=u(),m=c(),y=h(),g=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_X:m,UNIT_Y:y,UNIT_Z:g,ZEROS:d,clone:o,create:r,freeze:a,fromArray:i,fromValues:s,ones:u,unitX:c,unitY:h,unitZ:f,zeros:l},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,g,"Cw",0,m,"JP",0,y,"Un",0,p,"uY",0,d])},58083(t,e,n){n.d(e,{$0:()=>g,$h:()=>I,B8:()=>c,C:()=>s,D_:()=>i,N9:()=>b,O7:()=>T,Qw:()=>u,Tl:()=>f,X_:()=>A,e$:()=>p,eL:()=>m,hM:()=>M,hZ:()=>a,hs:()=>d,kN:()=>y,l:()=>v,lw:()=>h,mg:()=>l,o1:()=>S,sC:()=>w,t2:()=>P,t5:()=>O,tZ:()=>x,ut:()=>N,v3:()=>E});var r=n(51850),o=n(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e,n,r,o,s,a,i,l,u,c,h,f,d,p,m,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=a,t[6]=i,t[7]=l,t[8]=u,t[9]=c,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=m,t[15]=y,t}function i(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 l(t,e){if(t===e){const n=e[1],r=e[2],o=e[3],s=e[6],a=e[7],i=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=s,t[11]=e[14],t[12]=o,t[13]=a,t[14]=i}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){return c(t,e)||i(t),t}function c(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],i=e[5],l=e[6],u=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],y=e[14],g=e[15],M=n*i-r*a,b=n*l-o*a,R=n*u-s*a,_=r*l-o*i,w=r*u-s*i,A=o*u-s*l,v=c*m-h*p,S=c*y-f*p,T=c*g-d*p,I=h*y-f*m,E=h*g-d*m,O=f*g-d*y;let C=M*O-b*E+R*I+_*T-w*S+A*v;return C?(C=1/C,t[0]=(i*O-l*E+u*I)*C,t[1]=(o*E-r*O-s*I)*C,t[2]=(m*A-y*w+g*_)*C,t[3]=(f*w-h*A-d*_)*C,t[4]=(l*T-a*O-u*S)*C,t[5]=(n*O-o*T+s*S)*C,t[6]=(y*R-p*A-g*b)*C,t[7]=(c*A-f*R+d*b)*C,t[8]=(a*E-i*T+u*v)*C,t[9]=(r*T-n*E-s*v)*C,t[10]=(p*w-m*R+g*M)*C,t[11]=(h*R-c*w-d*M)*C,t[12]=(i*S-a*I-l*v)*C,t[13]=(n*I-r*S+o*v)*C,t[14]=(m*b-p*_-y*M)*C,t[15]=(c*_-h*b+f*M)*C,t):null}function h(t,e,n){const r=e[0],o=e[1],s=e[2],a=e[3],i=e[4],l=e[5],u=e[6],c=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],y=e[13],g=e[14],M=e[15];let b=n[0],R=n[1],_=n[2],w=n[3];return t[0]=b*r+R*i+_*h+w*m,t[1]=b*o+R*l+_*f+w*y,t[2]=b*s+R*u+_*d+w*g,t[3]=b*a+R*c+_*p+w*M,b=n[4],R=n[5],_=n[6],w=n[7],t[4]=b*r+R*i+_*h+w*m,t[5]=b*o+R*l+_*f+w*y,t[6]=b*s+R*u+_*d+w*g,t[7]=b*a+R*c+_*p+w*M,b=n[8],R=n[9],_=n[10],w=n[11],t[8]=b*r+R*i+_*h+w*m,t[9]=b*o+R*l+_*f+w*y,t[10]=b*s+R*u+_*d+w*g,t[11]=b*a+R*c+_*p+w*M,b=n[12],R=n[13],_=n[14],w=n[15],t[12]=b*r+R*i+_*h+w*m,t[13]=b*o+R*l+_*f+w*y,t[14]=b*s+R*u+_*d+w*g,t[15]=b*a+R*c+_*p+w*M,t}function f(t,e,n){const r=n[0],o=n[1],s=n[2];if(e===t)t[12]=e[0]*r+e[4]*o+e[8]*s+e[12],t[13]=e[1]*r+e[5]*o+e[9]*s+e[13],t[14]=e[2]*r+e[6]*o+e[10]*s+e[14],t[15]=e[3]*r+e[7]*o+e[11]*s+e[15];else{const n=e[0],a=e[1],i=e[2],l=e[3],u=e[4],c=e[5],h=e[6],f=e[7],d=e[8],p=e[9],m=e[10],y=e[11];t[0]=n,t[1]=a,t[2]=i,t[3]=l,t[4]=u,t[5]=c,t[6]=h,t[7]=f,t[8]=d,t[9]=p,t[10]=m,t[11]=y,t[12]=n*r+u*o+d*s+e[12],t[13]=a*r+c*o+p*s+e[13],t[14]=i*r+h*o+m*s+e[14],t[15]=l*r+f*o+y*s+e[15]}return t}function d(t,e,n){const r=n[0],o=n[1],s=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function p(t,e,n,r){let a=r[0],i=r[1],l=r[2],u=Math.sqrt(a*a+i*i+l*l);if(u<=(0,o.FD)())return void s(t,e);u=1/u,a*=u,i*=u,l*=u;const c=Math.sin(n),h=Math.cos(n),f=1-h,d=e[0],p=e[1],m=e[2],y=e[3],g=e[4],M=e[5],b=e[6],R=e[7],_=e[8],w=e[9],A=e[10],v=e[11],S=a*a*f+h,T=i*a*f+l*c,I=l*a*f-i*c,E=a*i*f-l*c,O=i*i*f+h,C=l*i*f+a*c,P=a*l*f+i*c,N=i*l*f-a*c,x=l*l*f+h;t[0]=d*S+g*T+_*I,t[1]=p*S+M*T+w*I,t[2]=m*S+b*T+A*I,t[3]=y*S+R*T+v*I,t[4]=d*E+g*O+_*C,t[5]=p*E+M*O+w*C,t[6]=m*E+b*O+A*C,t[7]=y*E+R*O+v*C,t[8]=d*P+g*N+_*x,t[9]=p*P+M*N+w*x,t[10]=m*P+b*N+A*x,t[11]=y*P+R*N+v*x,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15])}function m(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[4],a=e[5],i=e[6],l=e[7],u=e[8],c=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*o+u*r,t[5]=a*o+c*r,t[6]=i*o+h*r,t[7]=l*o+f*r,t[8]=u*o-s*r,t[9]=c*o-a*r,t[10]=h*o-i*r,t[11]=f*o-l*r,t}function y(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function g(t,e,n){if(0===e)return i(t);let r=n[0],s=n[1],a=n[2],l=Math.sqrt(r*r+s*s+a*a);if(l<=(0,o.FD)())return null;l=1/l,r*=l,s*=l,a*=l;const u=Math.sin(e),c=Math.cos(e),h=1-c;return t[0]=r*r*h+c,t[1]=s*r*h+a*u,t[2]=a*r*h-s*u,t[3]=0,t[4]=r*s*h-a*u,t[5]=s*s*h+c,t[6]=a*s*h+r*u,t[7]=0,t[8]=r*a*h+s*u,t[9]=s*a*h-r*u,t[10]=a*a*h+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function M(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function b(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,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 R(t,e,n){const r=e[0],o=e[1],s=e[2],a=e[3],i=r+r,l=o+o,u=s+s,c=r*i,h=r*l,f=r*u,d=o*l,p=o*u,m=s*u,y=a*i,g=a*l,M=a*u;return t[0]=1-(d+m),t[1]=h+M,t[2]=f-g,t[3]=0,t[4]=h-M,t[5]=1-(c+m),t[6]=p+y,t[7]=0,t[8]=f+g,t[9]=p-y,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const _=(0,r.vt)();function w(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function A(t,e){const n=e[0],r=e[1],o=e[2],s=e[4],a=e[5],i=e[6],l=e[8],u=e[9],c=e[10];return t[0]=Math.sqrt(n*n+r*r+o*o),t[1]=Math.sqrt(s*s+a*a+i*i),t[2]=Math.sqrt(l*l+u*u+c*c),t}function v(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t}function S(t,e,n,r){const o=e[0],s=e[1],a=e[2],i=e[3],l=o+o,u=s+s,c=a+a,h=o*l,f=o*u,d=o*c,p=s*u,m=s*c,y=a*c,g=i*l,M=i*u,b=i*c,R=r[0],_=r[1],w=r[2];return t[0]=(1-(p+y))*R,t[1]=(f+b)*R,t[2]=(d-M)*R,t[3]=0,t[4]=(f-b)*_,t[5]=(1-(h+y))*_,t[6]=(m+g)*_,t[7]=0,t[8]=(d+M)*w,t[9]=(m-g)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function T(t,e,n,r,o){const s=e[0],a=e[1],i=e[2],l=e[3],u=s+s,c=a+a,h=i+i,f=s*u,d=s*c,p=s*h,m=a*c,y=a*h,g=i*h,M=l*u,b=l*c,R=l*h,_=r[0],w=r[1],A=r[2],v=o[0],S=o[1],T=o[2],I=(1-(m+g))*_,E=(d+R)*_,O=(p-b)*_,C=(d-R)*w,P=(1-(f+g))*w,N=(y+M)*w,x=(p+b)*A,D=(y-M)*A,G=(1-(f+m))*A;return t[0]=I,t[1]=E,t[2]=O,t[3]=0,t[4]=C,t[5]=P,t[6]=N,t[7]=0,t[8]=x,t[9]=D,t[10]=G,t[11]=0,t[12]=n[0]+v-(I*v+C*S+x*T),t[13]=n[1]+S-(E*v+P*S+D*T),t[14]=n[2]+T-(O*v+N*S+G*T),t[15]=1,t}function I(t,e,n,r,o,s,a){const i=1/(n-e),l=1/(o-r),u=1/(s-a);return t[0]=2*s*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*l,t[6]=0,t[7]=0,t[8]=(n+e)*i,t[9]=(o+r)*l,t[10]=(a+s)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*s*2*u,t[15]=0,t}function E(t,e,n,r,o,s,a){const i=1/(e-n),l=1/(r-o),u=1/(s-a);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*i,t[13]=(o+r)*l,t[14]=(a+s)*u,t[15]=1,t}function O(t,e,n,r){const s=e[0],a=e[1],l=e[2];let u=s-n[0],c=a-n[1],h=l-n[2];const f=(0,o.FD)();if(Math.abs(u)<f&&Math.abs(c)<f&&Math.abs(h)<f)return void i(t);let d=1/Math.sqrt(u*u+c*c+h*h);u*=d,c*=d,h*=d;const p=r[0],m=r[1],y=r[2];let g=m*h-y*c,M=y*u-p*h,b=p*c-m*u;d=Math.sqrt(g*g+M*M+b*b),d?(d=1/d,g*=d,M*=d,b*=d):(g=0,M=0,b=0);let R=c*b-h*M,_=h*g-u*b,w=u*M-c*g;d=Math.sqrt(R*R+_*_+w*w),d?(d=1/d,R*=d,_*=d,w*=d):(R=0,_=0,w=0),t[0]=g,t[1]=R,t[2]=u,t[3]=0,t[4]=M,t[5]=_,t[6]=c,t[7]=0,t[8]=b,t[9]=w,t[10]=h,t[11]=0,t[12]=-(g*s+M*a+b*l),t[13]=-(R*s+_*a+w*l),t[14]=-(u*s+c*a+h*l),t[15]=1}function C(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function P(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function N(t){const e=(0,o.FD)(),n=t[0],r=t[1],s=t[2],a=t[4],i=t[5],l=t[6],u=t[8],c=t[9],h=t[10];return Math.abs(1-(n*n+a*a+u*u))<=e&&Math.abs(1-(r*r+i*i+c*c))<=e&&Math.abs(1-(s*s+l*l+h*h))<=e}function x(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 D=h,G=C;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],i=e[5],l=e[6],u=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],y=e[14],g=e[15];return t[0]=i*(f*g-d*y)-h*(l*g-u*y)+m*(l*d-u*f),t[1]=-(r*(f*g-d*y)-h*(o*g-s*y)+m*(o*d-s*f)),t[2]=r*(l*g-u*y)-i*(o*g-s*y)+m*(o*u-s*l),t[3]=-(r*(l*d-u*f)-i*(o*d-s*f)+h*(o*u-s*l)),t[4]=-(a*(f*g-d*y)-c*(l*g-u*y)+p*(l*d-u*f)),t[5]=n*(f*g-d*y)-c*(o*g-s*y)+p*(o*d-s*f),t[6]=-(n*(l*g-u*y)-a*(o*g-s*y)+p*(o*u-s*l)),t[7]=n*(l*d-u*f)-a*(o*d-s*f)+c*(o*u-s*l),t[8]=a*(h*g-d*m)-c*(i*g-u*m)+p*(i*d-u*h),t[9]=-(n*(h*g-d*m)-c*(r*g-s*m)+p*(r*d-s*h)),t[10]=n*(i*g-u*m)-a*(r*g-s*m)+p*(r*u-s*i),t[11]=-(n*(i*d-u*h)-a*(r*d-s*h)+c*(r*u-s*i)),t[12]=-(a*(h*y-f*m)-c*(i*y-l*m)+p*(i*f-l*h)),t[13]=n*(h*y-f*m)-c*(r*y-o*m)+p*(r*f-o*h),t[14]=-(n*(i*y-l*m)-a*(r*y-o*m)+p*(r*l-o*i)),t[15]=n*(i*f-l*h)-a*(r*f-o*h)+c*(r*l-o*i),t},copy:s,determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],i=t[6],l=t[7],u=t[8],c=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],y=t[15];return(e*a-n*s)*(h*y-f*m)-(e*i-r*s)*(c*y-f*p)+(e*l-o*s)*(c*m-h*p)+(n*i-r*a)*(u*y-f*d)-(n*l-o*a)*(u*m-h*d)+(r*l-o*i)*(u*p-c*d)},equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],s=t[2],a=t[3],i=t[4],l=t[5],u=t[6],c=t[7],h=t[8],f=t[9],d=t[10],p=t[11],m=t[12],y=t[13],g=t[14],M=t[15],b=e[0],R=e[1],_=e[2],w=e[3],A=e[4],v=e[5],S=e[6],T=e[7],I=e[8],E=e[9],O=e[10],C=e[11],P=e[12],N=e[13],x=e[14],D=e[15],G=(0,o.FD)();return Math.abs(n-b)<=G*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-R)<=G*Math.max(1,Math.abs(r),Math.abs(R))&&Math.abs(s-_)<=G*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(a-w)<=G*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(i-A)<=G*Math.max(1,Math.abs(i),Math.abs(A))&&Math.abs(l-v)<=G*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(u-S)<=G*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-T)<=G*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(h-I)<=G*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(f-E)<=G*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(d-O)<=G*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(p-C)<=G*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(m-P)<=G*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(y-N)<=G*Math.max(1,Math.abs(y),Math.abs(N))&&Math.abs(g-x)<=G*Math.max(1,Math.abs(g),Math.abs(x))&&Math.abs(M-D)<=G*Math.max(1,Math.abs(M),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,e){const n=e[0],r=e[1],o=e[2],s=e[3],a=n+n,i=r+r,l=o+o,u=n*a,c=r*a,h=r*i,f=o*a,d=o*i,p=o*l,m=s*a,y=s*i,g=s*l;return t[0]=1-h-p,t[1]=c+g,t[2]=f-y,t[3]=0,t[4]=c-g,t[5]=1-u-p,t[6]=d+m,t[7]=0,t[8]=f+y,t[9]=d-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=_,r=-e[0],o=-e[1],s=-e[2],a=e[3],i=e[4],l=e[5],u=e[6],c=e[7],h=r*r+o*o+s*s+a*a;return h>0?(n[0]=2*(i*a+c*r+l*s-u*o)/h,n[1]=2*(l*a+c*o+u*r-i*s)/h,n[2]=2*(u*a+c*s+i*o-l*r)/h):(n[0]=2*(i*a+c*r+l*s-u*o),n[1]=2*(l*a+c*o+u*r-i*s),n[2]=2*(u*a+c*s+i*o-l*r)),R(t,e,n),t},fromRotation:g,fromRotationTranslation:R,fromRotationTranslationScale:S,fromRotationTranslationScaleOrigin:T,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:y,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:b,frustum:I,getRotation:v,getScale:A,getTranslation:w,hasIdentityRotation:x,identity:i,invert:c,invertOrIdentity:u,isOrthoNormal:N,lookAt:O,mul:D,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:E,perspective:function(t,e,n,r,o){const s=1/Math.tan(e/2);let a;return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,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!=o&&o!==1/0?(a=1/(r-o),t[10]=(o+r)*a,t[14]=2*o*r*a):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const o=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),i=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+i),u=2/(o+s);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(a-i)*l*.5,t[9]=(o-s)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:p,rotateX:m,rotateY:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[0],a=e[1],i=e[2],l=e[3],u=e[8],c=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o-u*r,t[1]=a*o-c*r,t[2]=i*o-h*r,t[3]=l*o-f*r,t[8]=s*r+u*o,t[9]=a*r+c*o,t[10]=i*r+h*o,t[11]=l*r+f*o,t},rotateZ:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[0],a=e[1],i=e[2],l=e[3],u=e[4],c=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o+u*r,t[1]=a*o+c*r,t[2]=i*o+h*r,t[3]=l*o+f*r,t[4]=u*o-s*r,t[5]=c*o-a*r,t[6]=h*o-i*r,t[7]=f*o-l*r,t},scale:d,set:a,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:G,subtract:C,targetTo:function(t,e,n,r){const o=e[0],s=e[1],a=e[2],i=r[0],l=r[1],u=r[2];let c=o-n[0],h=s-n[1],f=a-n[2],d=c*c+h*h+f*f;d>0&&(d=1/Math.sqrt(d),c*=d,h*=d,f*=d);let p=l*f-u*h,m=u*c-i*f,y=i*h-l*c;return d=p*p+m*m+y*y,d>0&&(d=1/Math.sqrt(d),p*=d,m*=d,y*=d),t[0]=p,t[1]=m,t[2]=y,t[3]=0,t[4]=h*y-f*m,t[5]=f*p-c*y,t[6]=c*m-h*p,t[7]=0,t[8]=c,t[9]=h,t[10]=f,t[11]=0,t[12]=o,t[13]=s,t[14]=a,t[15]=1,t},translate:f,transpose:l},Symbol.toStringTag,{value:"Module"}))},35522(t,e,n){n.d(e,{$A:()=>S,Bw:()=>s,C:()=>a,Cc:()=>T,DI:()=>w,Io:()=>M,Ln:()=>g,Om:()=>v,Qr:()=>h,Re:()=>u,S8:()=>A,T9:()=>m,WQ:()=>l,Z0:()=>I,_S:()=>d,aI:()=>G,ei:()=>E,fw:()=>C,g7:()=>P,gL:()=>O,hG:()=>b,hZ:()=>i,hs:()=>y,jk:()=>p,lw:()=>c,m3:()=>R,oW:()=>L,t2:()=>D,tn:()=>f,ze:()=>_});var r=n(51850),o=n(34304);function s(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function f(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function m(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function y(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function g(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function M(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(n*n+r*r+o*o)}function b(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o}function R(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function _(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function w(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function A(t,e){const n=e[0],r=e[1],o=e[2];let s=n*n+r*r+o*o;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function S(t,e,n){const r=e[0],o=e[1],s=e[2],a=n[0],i=n[1],l=n[2];return t[0]=o*l-s*i,t[1]=s*a-r*l,t[2]=r*i-o*a,t}function T(t,e,n,r){const o=e[0],s=e[1],a=e[2];return t[0]=o+r*(n[0]-o),t[1]=s+r*(n[1]-s),t[2]=a+r*(n[2]-a),t}function I(t,e,n){const r=e[0],o=e[1],s=e[2];return t[0]=n[0]*r+n[4]*o+n[8]*s+n[12],t[1]=n[1]*r+n[5]*o+n[9]*s+n[13],t[2]=n[2]*r+n[6]*o+n[10]*s+n[14],t}function E(t,e,n){const r=e[0],o=e[1],s=e[2];return t[0]=r*n[0]+o*n[3]+s*n[6],t[1]=r*n[1]+o*n[4]+s*n[7],t[2]=r*n[2]+o*n[5]+s*n[8],t}function O(t,e,n){return C(t,e,n[0],n[1],n[2],n[3])}function C(t,e,n,r,o,s){const a=e[0],i=e[1],l=e[2],u=r*l-o*i,c=o*a-n*l,h=n*i-r*a,f=r*h-o*c,d=o*u-n*h,p=n*c-r*u,m=2*s;return t[0]=a+u*m+2*f,t[1]=i+c*m+2*d,t[2]=l+h*m+2*p,t}function P(t,e){A(N,t),A(x,e);const n=v(N,x);return n>1?0:n<-1?Math.PI:Math.acos(n)}const N=(0,r.vt)(),x=(0,r.vt)();function D(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function G(t,e){if(t===e)return!0;const n=t[0],r=t[1],s=t[2],a=e[0],i=e[1],l=e[2],u=(0,o.FD)();return Math.abs(n-a)<=u*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-i)<=u*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function L(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],s=n[2]-e[2];let a=r*r+o*o+s*s;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=s*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const B=u,U=c,j=h,F=M,k=b,Z=s,q=R;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:l,angle:P,bezier:function(t,e,n,r,o,s){const a=1-s,i=a*a,l=s*s,u=i*a,c=3*s*i,h=3*l*a,f=l*s;return t[0]=e[0]*u+n[0]*c+r[0]*h+o[0]*f,t[1]=e[1]*u+n[1]*c+r[1]*h+o[1]*f,t[2]=e[2]*u+n[2]*c+r[2]*h+o[2]*f,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:S,crossAndNormalize:function(t,e,n){const r=e[0],o=e[1],s=e[2],a=n[0],i=n[1],l=n[2],u=o*l-s*i,c=s*a-r*l,h=r*i-o*a,f=Math.sqrt(u*u+c*c+h*h);return t[0]=u/f,t[1]=c/f,t[2]=h/f,t},direction:L,dist:F,distance:M,div:j,divide:h,dot:v,equals:G,exactEquals:D,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,o,s){const a=s*s,i=a*(2*s-3)+1,l=a*(s-2)+s,u=a*(s-1),c=a*(3-2*s);return t[0]=e[0]*i+n[0]*l+r[0]*u+o[0]*c,t[1]=e[1]*i+n[1]*l+r[1]*u+o[1]*c,t[2]=e[2]*i+n[2]*l+r[2]*u+o[2]*c,t},inverse:w,len:Z,length:s,lerp:T,max:m,min:p,mul:U,multiply:c,negate:_,normalize:A,random:function(t,e=1){const n=o.Ov,r=2*n()*Math.PI,s=2*n()-1,a=Math.sqrt(1-s*s)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=s*e,t},rotateX:function(t,e,n,r){const o=[],s=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],s[0]=o[0],s[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),s[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},rotateY:function(t,e,n,r){const o=[],s=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],s[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),s[1]=o[1],s[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},rotateZ:function(t,e,n,r){const o=[],s=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],s[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),s[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),s[2]=o[2],t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:y,scaleAndAdd:g,set:i,sign:d,sqrDist:k,sqrLen:q,squaredDistance:b,squaredLength:R,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:B,subtract:u,transformMat3:E,transformMat4:I,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:O,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,Z,"jb",0,B,"lo",0,k,"uE",0,q,"xg",0,F])},83027(t,e,n){const r=n(29953).ho;n.d(e,["h",0,r])},35982(t,e,n){n.d(e,{B:()=>c});var r=n(4576),o=n(71511),s=n(36563),a=n(53966),i=n(97768),l=n(17676),u=n(83027);class c{constructor(t,e,n,r,o={}){this._mainMethod=e,this._transferLists=n,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,u.h)(t,{...o,schedule:r}).then(t=>{null!=this._thread||this._destroyed?t.close():(this._thread=t,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(t=>{o.hasInitialize&&t.invoke("initialize",{}).catch(()=>{});for(const e of this._listeners)this._connectListenerToClient(e,t);this._onClientConnected(t)}))}),this._promise.catch(e=>a.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${t} worker: ${e}`))}on(t,e){const n=new h(t,e);return this._listeners.push(n),this._connectListener(n),(0,s.hA)(()=>{(0,r.TF)(this._listeners,n),n.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,i.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const t of this._listeners)t.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(t,e,n){return this.invokeMethod(this._mainMethod,t,e,n)}invokeMethod(t,e,n,r){if(this._thread){const o=this._transferLists[t],s=o?o(e):[];return this._thread.invoke(t,e,{transferList:s,signal:n,jobPriority:r})}return this._promise?this._promise.then(()=>((0,l.Te)(n),this.invokeMethod(t,e,n))):Promise.reject((0,l.NK)())}broadcast(t,e){return this._thread?Promise.all(this._thread.broadcast(e,t)).then(f):this._promise?this._promise.then(()=>this.broadcast(t,e)):Promise.reject((0,l.NK)())}get promise(){return this._promise}_onClientConnected(t){}_connectListener(t){this._thread&&t.add(this._thread.on(t.eventName,t.callback))}_connectListenerToClient(t,e){t.add(e.on(t.eventName,t.callback))}}class h{constructor(t,e){this.eventName=t,this.callback=e,this._handles=new o.A}add(t){this._handles.add(t)}destroy(){this._handles.destroy()}}function f(){}},48526(t,e,n){n.d(e,{A:()=>y});var r,o=n(5482),s=n(4576),a=n(4718),i=n(91429),l=n(5443),u=n(91075),c=n(86738),h=n(16930),f=n(90634),d=n(47610),p=n(56993),m=n(43937);let y=r=class extends u.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:n,hasZ:r,spatialReference:o}=t;switch(e??=[],e?.at(0)?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return o??=h.A.WGS84,{...t,hasM:n,hasZ:r,points:e,spatialReference:o}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=(0,f.ge)(this);return t?new l.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,a.o8)(this.points)}clone(){const{points:t,spatialReference:e,hasM:n,hasZ:o}=this;return new r({points:(0,a.o8)(t),spatialReference:e.clone(),hasM:n,hasZ:o})}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return null!=e==(null!=n)&&!(null!=e&&null!=n&&!e.equals(n))&&(0,s.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,p.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;const e=this.points[t],n={x:e[0],y:e[1],spatialReference:this.spatialReference};let r=2;return this.hasZ&&(n.z=e[2],r=3),this.hasM&&(n.m=e[r]),new c.A(n)}removePoint(t){if(!this._validateInputs(t))return null;const e=new c.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,p.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,o.Cg)([(0,i.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,o.Cg)([(0,i.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,o.Cg)([(0,i.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,o.Cg)([(0,m.K)("points")],y.prototype,"writePoints",null),y=r=(0,o.Cg)([(0,i.$K)("esri.geometry.Multipoint")],y),y.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,n){n.d(e,{A:()=>p});var r,o=n(5482),s=n(4718),a=n(91429),i=n(5443),l=n(91075),u=n(86738),c=n(16930),h=n(90634),f=n(56993),d=n(43937);let p=r=class extends l.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:n,hasZ:r,spatialReference:o}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return o??=c.A.WGS84,{...t,hasM:n,hasZ:r,paths:e,spatialReference:o}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,s.o8)(t)}get extent(){const t=(0,h.Z3)(this),{spatialReference:e}=this;return t?new i.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;const e=this.paths,n=e.length;if(function(t){return!Array.isArray(t[0])}(t)){const r=[];for(let e=0,n=t.length;e<n;e++)r[e]=t[e].toArray();e[n]=r}else e[n]=t.slice();return this.notifyChange("paths"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;const n=this.paths[t][e],r=this.hasZ,o=this.hasM;return r&&!o?new u.A(n[0],n[1],n[2],void 0,this.spatialReference):o&&!r?new u.A(n[0],n[1],void 0,n[2],this.spatialReference):r&&o?new u.A(n[0],n[1],n[2],n[3],this.spatialReference):new u.A(n[0],n[1],this.spatialReference)}insertPoint(t,e,n){return this._validateInputs(t,e,!0)?((0,f.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t].splice(e,0,n),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const e=this.paths.splice(t,1)[0],n=this.spatialReference,r=e.map(t=>new u.A(t,n));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;const n=new u.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(t,e,n){return this._validateInputs(t,e)?((0,f.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t][e]=n,this.notifyChange("paths"),this):this}_validateInputs(t,e,n=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){const r=this.paths[t];if(n&&(e<0||e>r.length))return!1;if(!n&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],p.prototype,"curvePaths",void 0),(0,o.Cg)([(0,d.K)("curvePaths")],p.prototype,"writeCurvePaths",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,o.Cg)([(0,a.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],p.prototype,"paths",void 0),(0,o.Cg)([(0,d.K)("paths")],p.prototype,"writePaths",null),p=r=(0,o.Cg)([(0,a.$K)("esri.geometry.Polyline")],p),p.prototype.toJSON.isDefaultToJSON=!0},159(t,e,n){n.d(e,{A:()=>u});var r,o=n(5482),s=n(69540),a=n(25482),i=n(91429),l=n(99157);let u=r=class extends((0,s.OU)(a.o)){constructor(t){super(t),this.steps=[]}getInverse(){const t=new r;for(let e=this.steps.length-1;e>=0;e--){const n=this.steps[e];t.steps.push(n.getInverse())}return t}};(0,o.Cg)([(0,i.MZ)({type:[l.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=r=(0,o.Cg)([(0,i.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(t,e,n){n.d(e,{A:()=>l});var r,o=n(5482),s=n(69540),a=n(25482),i=n(91429);let l=r=class extends((0,s.OU)(a.o)){constructor(t){super(t),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,o.Cg)([(0,i.MZ)({json:{name:"transformForward",read:t=>!t,write:(t,e,n)=>{e[n]=!t}}})],l.prototype,"isInverse",void 0),(0,o.Cg)([(0,i.MZ)({json:{write:!0}})],l.prototype,"wkt",void 0),(0,o.Cg)([(0,i.MZ)({json:{write:!0}})],l.prototype,"wkid",void 0),l=r=(0,o.Cg)([(0,i.$K)("esri.geometry.operators.support.GeographicTransformationStep")],l)},9762(t,e,n){n.r(e),n.d(e,{projectBuffer:()=>o});var r=n(49208);function o(t,e,n,o,s,a,i=Math.floor(t.length/3)){const l=(0,r.jd)(e,s);if(null==l)return!1;if(l===r.pO){if(t===o&&n===a)return!0;const e=n+3*i;for(let r=n,s=a;r<e;r++,s++)o[s]=t[r]??0;return!0}const u=n+3*i;for(let e=n,r=a;e<u;e+=3,r+=3)l(t,e,o,r);return!0}},65806(t,e,n){n.d(e,{g:()=>a});var r=n(51850),o=n(91218),s=n(9762);function a(t,e,n,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,n))return i[0]=t.x,i[1]=t.y,i[2]=t.z??0,(0,s.projectBuffer)(i,t.spatialReference,0,e,n,0);const a=(0,o.tryProject)(t,n,r);return!!a&&(e[0]=a.x,e[1]=a.y,e[2]=a.z??0,!0)}const i=(0,r.vt)()},27993(t,e,n){n.d(e,{F:()=>i});var r=n(91218),o=n(16930),s=n(9762),a=n(65806);function i(t,e,n,o){return!(null==e||null==o||t.length<2)&&((0,r.canProjectWithoutEngine)(e,o)?(0,s.projectBuffer)(t,e,0,n,o,0,1):(l.x=t[0],l.y=t[1],l.z=t[2],l.spatialReference=e,(0,a.g)(l,n,o)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},49208(t,e,n){n.d(e,{Tp:()=>h,jd:()=>c,pO:()=>d});var r=n(34727),o=n(86211),s=n(73941),a=n(79258),i=n(34403),l=n(21325);const u={2:{5:d,7:null,9:null,10:d,1:_,6:null,8:null,0:null,3:m,11:y,2:d,4:T},5:{5:d,7:null,9:null,10:d,1:_,6:null,8:null,0:null,3:m,11:y,2:d,4:T},7:{5:null,7:d,9:null,10:d,1:null,6:R,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:d,10:d,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:p,7:null,9:null,10:p,1:function(t,e,n,r){const o=t[e]/N,s=P-2*Math.atan(Math.exp(-t[e+1]/N)),a=N+(t[e+2]??0),i=Math.cos(s)*a;n[r]=Math.cos(o)*i,n[r+1]=Math.sin(o)*i,n[r+2]=Math.sin(s)*a},6:null,8:null,0:null,3:d,11:function(t,e,n,r){p(t,e,n,r),y(n,r,n,r)},2:p,4:function(t,e,n,r){p(t,e,n,r),T(n,r,n,r)}},4:{5:I,7:null,9:null,10:I,1:function(t,e,n,r){I(t,e,n,r),_(n,r,n,r)},6:null,8:null,0:null,3:function(t,e,n,r){I(t,e,n,r),m(n,r,n,r)},11:function(t,e,n,r){I(t,e,n,r),y(n,r,n,r)},2:I,4:d},1:{5:S,7:null,9:null,10:S,1:d,6:null,8:null,0:null,3:function(t,e,n,r){S(t,e,n,r),m(n,r,n,r)},11:function(t,e,n,r){S(t,e,n,r),y(n,r,n,r)},2:S,4:function(t,e,n,r){S(t,e,n,r),T(n,r,n,r)}},6:{5:null,7:v,9:null,10:v,1:null,6:d,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:d,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:d,3:null,11:null,2:null,4:null},10:{5:d,7:d,9:d,10:d,1:_,6:R,8:b,0:null,3:m,11:y,2:d,4:T},11:{5:g,7:null,9:null,10:g,1:function(t,e,n,r){g(t,e,n,r),_(n,r,n,r)},6:null,8:null,0:null,3:function(t,e,n,r){g(t,e,n,r),m(n,r,n,r)},11:d,2:g,4:function(t,e,n,r){g(t,e,n,r),T(n,r,n,r)}}};function c(t,e){return h(t,e)?.projector}function h(t,e){if(null==t||null==e)return null;if(E.source.spatialReference===t&&E.dest.spatialReference===e)return E;const n=f(t,E.source),r=f(e,E.dest);return 0===n&&0===r?(0,l.aI)(t,e)?E.projector=d:E.projector=null:E.projector=u[n][r],E}function f(t,e){return t?e.spatialReference===t?e.spatialReferenceId:(e.spatialReference=t,"metersPerUnit"in e&&(e.metersPerUnit=(0,o.GA)(t,1)),(0,s.jA)(t)?e.spatialReferenceId=1:(0,l.oT)(t)?e.spatialReferenceId=2:(0,l.K8)(t)?e.spatialReferenceId=3:(0,l.r1)(t)?e.spatialReferenceId=11:t.wkt===s.Ro.wkt?e.spatialReferenceId=4:4490===t.wkid?e.spatialReferenceId=5:t.wkt===s.FY.wkt?e.spatialReferenceId=6:t.wkt===s.LJ.wkt?e.spatialReferenceId=8:(0,s.q8)(t)?e.spatialReferenceId=7:(0,s.KQ)(t)?e.spatialReferenceId=9:e.spatialReferenceId=0):0}function d(t,e,n,r){t!==n&&(n[r++]=t[e++],n[r++]=t[e++],n[r]=t[e]??0)}function p(t,e,n,r){n[r]=C*(t[e]/N),n[r+1]=C*(P-2*Math.atan(Math.exp(-t[e+1]/N))),n[r+2]=t[e+2]??0}function m(t,e,n,o){!function(t,e,n,o,s){const a=.4999999*Math.PI,i=(0,r.qE)(O*t[e+1],-a,a),l=Math.sin(i);n[o++]=O*t[e]*s.radius,n[o++]=s.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[o]=t[e+2]??0}(t,e,n,o,a.$O)}function y(t,e,n,r){n[r]=t[e]*x,n[r+1]=t[e+1]*x,n[r+2]=t[e+2]??0}function g(t,e,n,r){n[r]=t[e]*D,n[r+1]=t[e+1]*D,n[r+2]=t[e+2]??0}function M(t,e,n,r,o){const s=o+(t[e+2]??0),a=O*t[e],i=O*t[e+1],l=Math.cos(i)*s;n[r]=Math.cos(a)*l,n[r+1]=Math.sin(a)*l,n[r+2]=Math.sin(i)*s}function b(t,e,n,r){M(t,e,n,r,a.Sw.radius)}function R(t,e,n,r){M(t,e,n,r,a.sH.radius)}function _(t,e,n,r){M(t,e,n,r,a.$O.radius)}function w(t,e,n,o,s){const a=t[e],i=t[e+1],l=t[e+2]??0,u=Math.sqrt(a*a+i*i+l*l),c=(0,r.YN)(l/(0===u?1:u)),h=Math.atan2(i,a);n[o++]=C*h,n[o++]=C*c,n[o]=u-s}function A(t,e,n,r){w(t,e,n,r,a.Sw.radius)}function v(t,e,n,r){w(t,e,n,r,a.sH.radius)}function S(t,e,n,r){w(t,e,n,r,a.$O.radius)}function T(t,e,n,r){!function(t,e,n,r,o){const s=O*t[e],a=O*t[e+1],i=t[e+2]??0,l=Math.sin(a),u=Math.cos(a),c=o.radius/Math.sqrt(1-o.eccentricitySquared*l*l);n[r++]=(c+i)*u*Math.cos(s),n[r++]=(c+i)*u*Math.sin(s),n[r++]=(c*(1-o.eccentricitySquared)+i)*l}(t,e,n,r,a.$O)}function I(t,e,n,r){const o=i.TP,s=t[e],l=t[e+1],u=t[e+2]??0;let c,h,f,d,p,m,y,g,M,b,R,_,w,A,v,S,T,I,E,O,P;c=Math.abs(u),h=s*s+l*l,f=Math.sqrt(h),d=h+u*u,p=Math.sqrt(d),O=Math.atan2(l,s),m=u*u/d,y=h/d,A=o.a2/p,v=o.a3-o.a4/p,y>.3?(g=c/p*(1+y*(o.a1+A+m*v)/p),E=Math.asin(g),b=g*g,M=Math.sqrt(1-b)):(M=f/p*(1-m*(o.a5-A-y*v)/p),E=Math.acos(M),b=1-M*M,g=Math.sqrt(b)),R=1-a.$O.eccentricitySquared*b,_=a.$O.radius/Math.sqrt(R),w=o.a6*_,A=f-_*M,v=c-w*g,T=M*A+g*v,S=M*v-g*A,I=S/(w/R+T),E+=I,P=T+S*I/2,u<0&&(E=-E),n[r++]=C*O,n[r++]=C*E,n[r]=P}const E={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:d},O=(0,r.kU)(1),C=(0,r.KJ)(1),P=.5*Math.PI,N=a.$O.radius,x=N*Math.PI/180,D=180/(N*Math.PI);n.d(e,["w5",0,u])},91218(t,e,n){n.r(e),n.d(e,{canProjectWithoutEngine:()=>Y,initializeProjection:()=>V,isEqualBaseGCS:()=>$,isLoaded:()=>N,isLoadedOrLoad:()=>x,isLoadedOrLoadFor:()=>D,load:()=>L,project:()=>B,projectAsync:()=>z,projectExtent:()=>ot,projectMany:()=>U,projectMultipoint:()=>X,projectOrLoad:()=>F,projectOrLoadMany:()=>k,projectPoint:()=>K,projectPolygon:()=>nt,projectPolyline:()=>tt,projectWithoutEngine:()=>W,requiresLoad:()=>G,test:()=>H,tryProject:()=>j,unload:()=>q});var r=n(49186),o=n(17676),s=n(62788),a=n(95488),i=n(51850),l=n(21276),u=n(73941),c=n(5443),h=n(91075),f=n(48526),d=n(86738),p=n(39829),m=n(82799),y=n(16930),g=n(98764),M=n(159),b=n(9762),R=n(49208);function _(t,e,n,r,o,s){return w[0]=t,w[1]=e,w[2]=n,(0,b.projectBuffer)(w,r,0,o,s,0)}const w=(0,i.vt)();var A=n(60408),v=n(21325),S=n(52006);let T=null,I=null,E=null,O=null,C={};const P=new a.I;function N(){return!!(I?.isLoaded()&&E?.isLoaded()&&O?.isLoaded())}function x(){return!!N()||((0,s.gc)(P),L(),!1)}function D(t,e){return!t||!e||Y(t,e)||x()}function G(t,e){return!Y(t,e)&&!N()}async function L(t){null==T&&(T=Promise.all([n.e(3276).then(n.bind(n,83276)).then(t=>(I=t,I.load())),n.e(8377).then(n.bind(n,8377)).then(t=>(E=t,E.load())),n.e(2158).then(n.bind(n,12158)).then(t=>(O=t,O.load()))])),await T,(0,o.Te)(t),P.notify()}function B(t,e,n){return Array.isArray(t)?0===t.length?[]:((0,l.H)(t),U(t,t[0].spatialReference,e,n)):((0,l.f)(t),U([t],t.spatialReference,e,n)[0])}function U(t,e,n,r){if(null==e||null==n)return t;if(Y(e,n,r))return t.map(t=>W(t,e,n));if(null==r?.geographicTransformation&&(0,u.jA)(e))return U(t.map(t=>W(t,e,y.A.WGS84)),y.A.WGS84,n,{zConversionDisabled:r?.zConversionDisabled});if(null==r?.geographicTransformation&&(0,u.jA)(n))return U(t,e,y.A.WGS84).map(t=>W(t,y.A.WGS84,n));if(!N())throw new Z;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:O.getTransformation(e,n,r.areaOfInterestExtent)||new M.A};else if(!r?.areaOfInterestExtent){const t=function(t,e){return[t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??"",e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??""].join()}(e,n);let o=C[t];o||(o=O.getTransformation(e,n)||new M.A,C[t]=o),r={geographicTransformation:o,zConversionDisabled:r?.zConversionDisabled}}return t[0].spatialReference||(t[0].spatialReference=e),t[0]instanceof h.A?I.executeMany(t,n,r):E.executeMany(t,n,r)}function j(t,e,n){try{return B(t,e,n)}catch(t){return null}}function F(t,e){const n=k([t],e);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function k(t,e,n){if(!N())for(const n of t)if(null!=n&&!(0,v.aI)(n.spatialReference,e)&&(0,v.fn)(n.spatialReference)&&(0,v.fn)(e)&&!Y(n.spatialReference,e))return(0,s.gc)(P),{pending:L(),geometries:null};return{pending:null,geometries:t.map(t=>null==t?null:(0,v.aI)(t.spatialReference,e)?t:(0,v.fn)(t.spatialReference)&&(0,v.fn)(e)?B(t,e,n):null)}}class Z extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function q(){T=null,I=null,E=null,O=null,C={}}const H={get loadPromise(){return T}};async function z(t,e,n){if((0,o.Te)(n),!t)return t;const r=k(Array.isArray(t)?t:[t],e,n);if(r.pending)return await r.pending,(0,o.Te)(n),z(t,e,n);const s=r.geometries??[];return Array.isArray(t)?s:s[0]}function Y(t,e,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,v.aI)(t,e)||(0,v.fn)(t)&&(0,v.fn)(e)&&!!(0,R.jd)(t,e))}function $(t,e){if((0,v.aI)(t,e))return!0;if(!(0,v.fn)(t)||!(0,v.fn)(e))return!1;const n=(0,v.oT)(t)||(0,v.K8)(t)||(0,v.x1)(t),r=(0,v.oT)(e)||(0,v.K8)(e)||(0,v.x1)(e);return n&&r}async function V(t,e,n,r){if(N())return(0,o.NO)(r);if(Array.isArray(t)){for(const{source:e,dest:n,options:o}of t)if(e&&n&&!Y(e,n,o))return L(r)}else if(t&&e&&!Y(t,e,n))return L(r);return(0,o.NO)(r)}function W(t,e,n){return t?(0,A.fT)(t)?J(t,e,new d.A,n,0):(0,A.ZC)(t)?st(t,e,new c.A,n,0):(0,A.Bi)(t)?rt(t,e,new p.A,n,0):(0,A.Rg)(t)?et(t,e,new m.A,n,0):(0,A.U9)(t)?Q(t,e,new f.A,n,0):null:null}function K(t,e,n=e.spatialReference,r=0){return null!=n&&null!=t.spatialReference&&null!=J(t,t.spatialReference,e,n,r)}function J(t,e,n,r,o){ut[0]=t.x,ut[1]=t.y;const s=t.z;return ut[2]=void 0!==s?s:o,(0,b.projectBuffer)(ut,e,0,ut,r,0)?(n.x=ut[0],n.y=ut[1],n.spatialReference=r,void 0!==s||(0,u.xP)(r)?(n.z=ut[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===t.m?(n.m=void 0,n.hasM=!1):(n.m=t.m,n.hasM=!0),n):null}function X(t,e,n=e.spatialReference,r=0){return null!=t.spatialReference&&null!=n&&null!=Q(t,t.spatialReference,e,n,r)}function Q(t,e,n,r,o){const{points:s,hasZ:a,hasM:i}=t,l=[],u=s.length,c=[];for(const t of s)c.push(t[0],t[1],a?t[2]:o);if(!(0,b.projectBuffer)(c,e,0,c,r,0,u))return null;const h=lt(a,r);for(let t=0;t<u;++t){const e=3*t,n=c[e],r=c[e+1];h&&i?l.push([n,r,c[e+2],s[t][3]]):h?l.push([n,r,c[e+2]]):i?l.push([n,r,s[t][2]]):l.push([n,r])}return n.points=l,n.spatialReference=r,n.hasZ=a,n.hasM=i,n}function tt(t,e,n=e.spatialReference,r=0){return null!=t.spatialReference&&null!=n&&null!=et(t,t.spatialReference,e,n,r)}function et(t,e,n,r,o){const{curvePaths:s,paths:a,hasZ:i,hasM:l}=t;if(!(s?it(s,i??!1,l??!1,e,n.curvePaths=[],r,o):at(a,i??!1,l??!1,e,n.paths,r,o)))return null;const u=lt(i,r);return n.spatialReference=r,n.hasZ=u,n.hasM=l,n}function nt(t,e,n=e.spatialReference,r=0){return null!=t.spatialReference&&null!=n&&null!=rt(t,t.spatialReference,e,n,r)}function rt(t,e,n,r,o){const{curveRings:s,rings:a,hasZ:i,hasM:l}=t;return(s?it(s,i??!1,l??!1,e,n.curveRings=[],r,o):at(a,i??!1,l??!1,e,n.rings,r,o))?(n.spatialReference=r,n.hasZ=lt(i,r),n.hasM=l,n):null}function ot(t,e,n=e.spatialReference,r=0){return null!=t.spatialReference&&null!=n&&null!=st(t,t.spatialReference,e,n,r)}function st(t,e,n,r,o){const{xmin:s,ymin:a,xmax:i,ymax:l,hasZ:u,hasM:c}=t;if(!_(s,a,u?t.zmin:o,e,ut,r))return null;const h=lt(u,r);return n.xmin=ut[0],n.ymin=ut[1],h&&(n.zmin=ut[2]),_(i,l,u?t.zmax:o,e,ut,r)?(n.xmax=ut[0],n.ymax=ut[1],h&&(n.zmax=ut[2]),c&&(n.mmin=t.mmin,n.mmax=t.mmax),n.spatialReference=r,n):null}function at(t,e,n,r,o,s,a=0){const i=new Array;for(const n of t)for(const t of n)i.push(t[0],t[1],e?t[2]:a);if(!(0,b.projectBuffer)(i,r,0,i,s,0))return!1;let l=0;o.length=0;const u=e?3:2,c=lt(e,s);for(const e of t){const t=new Array;for(const r of e){const e=i.slice(l,l+=3);c||e.pop(),n&&e.push(r[u]),t.push(e)}o.push(t)}return!0}function it(t,e,n,r,o,s,a=0){const i=new Array;for(const n of t)for(const t of n){if((0,S.FG)(t))return!1;if((0,S.aO)(t)){const[n,r]=t.c;i.push(n[0],n[1],e?n[2]:a,r[0],r[1],a);continue}if((0,S.n1)(t)){const[n,r,o]=t.b;i.push(n[0],n[1],e?n[2]:a,r[0],r[1],a,o[0],o[1],a);continue}const n=t;i.push(n[0],n[1],e?n[2]:a)}if(!(0,b.projectBuffer)(i,r,0,i,s,0))return!1;let l=0;o.length=0;const u=e?3:2,c=lt(e,s);for(const e of t){const t=new Array;for(const r of e){const e=i.slice(l,l+=3);if(c||e.pop(),n&&e.push((0,S.yP)(r)[u]),(0,S.FG)(r))return!1;if((0,S.aO)(r)){const n=i[l++],r=i[l++];++l,t.push({c:[e,[n,r]]});continue}if((0,S.n1)(r)){const n=i[l++],r=i[l++];++l;const o=i[l++],s=i[l++];++l,t.push({b:[e,[n,r],[o,s]]});continue}t.push(e)}o.push(t)}return!0}function lt(t,e){return t||(0,u.xP)(e)||(0,v.aI)(e,g.Y0)}const ut=(0,i.vt)()},98764(t,e,n){n.d(e,{lO:()=>c});var r=n(73941),o=n(16930),s=n(21325);const a=new o.A(r.fv),i=new o.A(r.FY),l=new o.A(r.LJ),u=new o.A(r.Ro);function c(t){const e=h.get(t);if(e)return e;let n=a;if(t)if(t===i)n=i;else if(t===l)n=l;else{const e=t.wkid,r=t.latestWkid;if(null!=e||null!=r)(0,s.tl)(e)||(0,s.tl)(r)?n=i:((0,s.ZL)(e)||(0,s.ZL)(r))&&(n=l);else{const e=t.wkt2??t.wkt;if(e){const t=e.toUpperCase();t===f?n=i:t===d&&(n=l)}}}return h.set(t,n),n}const h=new Map,f=i.wkt.toUpperCase(),d=l.wkt.toUpperCase();n.d(e,["GD",0,a,"Y0",0,u])},4197(t,e,n){n.d(e,{Vj:()=>c,cj:()=>u,jh:()=>s,l5:()=>i,yH:()=>l});var r=n(34275),o=n(9093);function s(t){return t<=1024?new Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function l(t,e){if(0===e.length)return a(t);if(0===t.length)return a(e);const n=s(t.length+e.length);for(let e=0;e<t.length;++e)n[e]=t[e];for(let r=0;r<e.length;++r)n[t.length+r]=e[r];return n}function u(t){return[...t]}function c(t){const e=(0,o.vt)();for(let n=0;n<16;++n)e[n]=t[n];return e}},95696(t,e,n){n.d(e,{A:()=>u});var r,o=n(5482),s=n(69540),a=n(25482),i=n(91429),l=n(93223);let u=class extends((0,s.OU)(a.o)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,o.Cg)([(0,i.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,o.Cg)([(0,i.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(t,e,n){n.d(e,{A:()=>u});var r=n(5482),o=n(69540),s=n(25482),a=n(91429),i=n(51850),l=n(93223);let u=class extends((0,o.OU)(s.o)){constructor(t){super(t),this.type="local",this.origin=(0,i.vt)()}};(0,r.Cg)([(0,l.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},72727(t,e,n){function r(t,e,n){if(e<=0)return 0;const r=t-n;return r<0?0:Math.floor(r/e)+1}n.d(e,{k:()=>r}),n(53966)},34403(t,e,n){var r=n(79258);Math.PI;const o=r.$O.radius,s=r.$O.eccentricitySquared,a={a1:o*s,a2:o*s*o*s,a3:o*s*s/2,a4:o*s*o*s*2.5,a5:o*s+o*s*s/2,a6:1-s};r.$O.radius,r.$O.flattening,r.Sw.radius,r.Sw.flattening,r.sH.radius,r.sH.flattening,r.sH.radius,n.d(e,["TP",0,a])},60408(t,e,n){function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function o(t){return void 0!==t.points}function s(t){return void 0!==t.x&&void 0!==t.y}function a(t){return void 0!==t.paths||void 0!==t.curvePaths}function i(t){return void 0!==t.rings||void 0!==t.curveRings}function l(t){return"object"==typeof t&&"vertexAttributes"in t}function u(t){return t?s(t)?"esriGeometryPoint":a(t)?"esriGeometryPolyline":i(t)?"esriGeometryPolygon":r(t)?"esriGeometryEnvelope":o(t)?"esriGeometryMultipoint":null:null}function c(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function h(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}n.d(e,{$B:()=>u,Bi:()=>i,Pv:()=>c,Rg:()=>a,U9:()=>o,W0:()=>h,ZC:()=>r,fT:()=>s,uW:()=>l})},97770(t,e,n){n.d(e,{Ey:()=>N,F8:()=>P,J2:()=>I,Yq:()=>O,_m:()=>E,iS:()=>C,wj:()=>x});var r=n(66552),o=n(73444),s=n(98623),a=n(92647);const i={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},h={year:"numeric",month:"long",day:"numeric"},f={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},p={hour:"numeric",minute:"numeric"},m={...p,second:"numeric"},y={hourCycle:"h23"},g={...p,...y},M={...m,...y},b={"short-date":c,"short-date-short-time":{...c,...p},"short-date-short-time-24":{...c,...g},"short-date-long-time":{...c,...m},"short-date-long-time-24":{...c,...M},"short-date-le":c,"short-date-le-short-time":{...c,...p},"short-date-le-short-time-24":{...c,...g},"short-date-le-long-time":{...c,...m},"short-date-le-long-time-24":{...c,...M},"long-month-day-year":h,"long-month-day-year-short-time":{...h,...p},"long-month-day-year-short-time-24":{...h,...g},"long-month-day-year-long-time":{...h,...m},"long-month-day-year-long-time-24":{...h,...M},"day-short-month-year":f,"day-short-month-year-short-time":{...f,...p},"day-short-month-year-short-time-24":{...f,...g},"day-short-month-year-long-time":{...f,...m},"day-short-month-year-long-time-24":{...f,...M},"long-date":d,"long-date-short-time":{...d,...p},"long-date-short-time-24":{...d,...g},"long-date-long-time":{...d,...m},"long-date-long-time-24":{...d,...M},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":p,"long-time":m},R=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),_={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},w=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),A=w.find(({type:t})=>"month"===t)?.value.toLowerCase();function v(){const t=(0,o.lR)();return(t&&_[t])??(0,o.QC)()}"mart"!==A&&(_.bs="sr-Latn-CS");let S=new WeakMap;const T=b["short-date-short-time"];function I(t){return b[t]}function E(t){const{dateStyle:e,timeStyle:n,hour12:r,year:o,month:s}=t,a={};return e?a.dateStyle=e:o&&(a.year=o,a.month=s||void 0),n&&!a.year&&(a.timeStyle=n,a.hour12="auto"===r?void 0:"always"===r),a}function O(t,e=T){return function(t){let e=S.get(t);if(!e){const n=v(),r=x(t.timeZone??"system"),o={...t,timeZone:r};e=new Intl.DateTimeFormat(n,o),S.set(t,e)}return e}(e).format(t)}function C(t,e=T){return O(new Date(t),{...e,...u,...l})}function P(t,e=T){return O(new Date(`1970-01-01T${t}Z`),{...e,...u,...i})}function N(t,e=T){const n=a.c9.fromISO(t,{setZone:!0});if(!n.isValid)return t;if(e.timeZone)return O(n.toJSDate(),e);const r=0===n.offset?"UTC":e.timeZone,o={...e,timeZone:r};return n.toLocaleString(o,{locale:v()})}function x(t){switch(t){case"system":return s.N;case s.L:return"UTC";default:return t}}(0,o.Ml)(()=>{S=new WeakMap}),n.d(e,["_v",0,R])},73444(t,e,n){n.d(e,{JK:()=>l,Ml:()=>y,QC:()=>h,lR:()=>c,oQ:()=>p});var r=n(36563);let o;n(44208);const s=globalThis.esriConfig?.locale,a=globalThis.document?.documentElement;function i(){const t=a?.getAttribute("lang"),e=globalThis.navigator?.language;return s??t??e??"en"}function l(){return void 0===o&&(o=i()),o}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function c(t=l()){return f(t)?.language}function h(t=l()){const e=f(t);return e?.language&&e?.extlang?t.replace(`${e.language}-`,""):t}function f(t=l()){return u.exec(t)?.groups}const d=[];function p(t){return d.push(t),(0,r.hA)(()=>{d.splice(d.indexOf(t),1)})}new Map;const m=[];function y(t){return m.push(t),(0,r.hA)(()=>m.splice(m.indexOf(t),1))}function g(){const t=i();o!==t&&([...m].forEach(e=>e(t)),o=t,[...d].forEach(e=>e(t)))}globalThis.addEventListener?.("languagechange",g),a&&new MutationObserver(()=>{g()}).observe(a,{attributeFilter:["lang"]})},98623(t,e,n){const r=Intl.DateTimeFormat().resolvedOptions().timeZone;n.d(e,["L",0,"unknown","N",0,r])},89606(t,e,n){n.d(e,{GN:()=>h,MU:()=>c,yf:()=>d});var r=n(35522),o=n(51850),s=n(10614),a=n(63907),i=n(74038);class l{constructor(t,e){this.data=t,this.indices=e}}class u{constructor(t,e,n,r,o){this.indices=t,this.packedNormals=e,this.appendedVertexToOriginal=n,this.outputVertexCount=r,this.appendedVertexCount=o}}function c(t,e,n,u,c){return!u||n.some(({name:t})=>"normal"===t||"normalCompressed"===t)?function(t,e,n,a){const i=new l(t.slice().buffer,e);if(!a)return i;const u=n[0].stride,c=i.data.byteLength/u;for(const t of n)if("normalCompressed"===t.name){const{offset:e}=t,n=new Int16Array(i.data),l=(0,o.vt)();for(let t=0;t<c;++t)(0,s.Tz)(l,n,t,u/2,e/2),(0,r.ei)(l,l,a),(0,s.aT)(n,t,l[0],l[1],l[2],u/2,e/2)}else if("normal"===t.name){const{offset:e}=t,n=new Float32Array(i.data),s=(0,o.vt)();for(let t=0;t<c;++t){const o=(t*u+e)/4;s[0]=n[o],s[1]=n[o+1],s[2]=n[o+2],(0,r.ei)(s,s,a),n[o]=s[0],n[o+1]=s[1],n[o+2]=s[2]}}return i}(t,e,n,c):function(t,e,n,r){const o=n[0].stride,s=o/4,l=new Float32Array(t.buffer,t.byteOffset,t.byteLength/4),u=t.byteLength/o,c=o+4;n.forEach(t=>t.stride=c),n.push(new i._("normalCompressed",2,a.pe.SHORT,o,c,!0));const d=h(e,l,s,r);return f(l,u,o,c,d)}(t,e,n,c)}function h(t,e,n,r){const o=t.length/3,s=e.length/n,{faceNormals:a,faceAreas:i,faceEdges:l,edgeFaces:u,vertexFaces:c,vertexFaceCountAndOffset:h}=function(t,e,n,r,o,s){const a=new Float32Array(3*o),i=new Float32Array(o),l=new Uint32Array(3*o),u=new Int32Array(3*o*2),c=3*o,h=new Uint32Array(c),f=new Uint32Array(2*n);for(let t=0;t<o;++t){const e=3*t;for(let t=0;t<3;++t)++f[2*r[e+t]]}{let t=0;for(let e=0;e<n;++e){const n=2*e;f[n+1]=t,t+=f[n]}for(let t=0;t<o;++t){const e=3*t;for(let n=0;n<3;++n)h[f[2*r[e+n]+1]++]=t}for(let t=0;t<n;++t)f[2*t+1]-=f[2*t]}let d=0;const p=new Uint32Array(2*c*2),m=new Uint32Array(2*n);for(let t=0;t<n;++t){const e=2*t,n=4*f[e+1];m[e]=n,m[e+1]=n}function y(t,e,n){const r=Math.min(t,e),o=Math.max(t,e),s=t<e?0:1,a=2*r,i=m[a],l=m[a+1];let c=-1;for(let t=i;t<l;t+=2)if(p[t]===o){c=p[t+1];break}return-1===c&&(c=d++,p[l]=o,p[l+1]=c,m[a+1]=l+2,u[2*c+(1-s)]=-1),u[2*c+s]=n,c}for(let n=0;n<r.length;n+=3){const o=r[n],u=o*e,c=t[u],h=t[u+1],f=t[u+2],d=r[n+1],p=d*e,m=t[p],g=t[p+1],M=t[p+2],b=r[n+2],R=b*e,_=c-m,w=h-g,A=f-M,v=c-t[R],S=h-t[R+1],T=f-t[R+2],I=w*T-A*S,E=A*v-_*T,O=_*S-w*v,C=Math.sqrt(I*I+E*E+O*O)||1,P=n/3;i[P]=.5*C;const N=1/C;if(s){const t=s[0]*I+s[3]*E+s[6]*O,e=s[1]*I+s[4]*E+s[7]*O,n=s[2]*I+s[5]*E+s[8]*O;a[3*P]=t*N,a[3*P+1]=e*N,a[3*P+2]=n*N}else a[3*P]=I*N,a[3*P+1]=E*N,a[3*P+2]=O*N;const x=y(o,d,P),D=y(d,b,P),G=y(b,o,P);l[3*P]=x,l[3*P+1]=D,l[3*P+2]=G}return{faceNormals:a,faceAreas:i,faceEdges:l,vertexFaces:h,vertexFaceCountAndOffset:f,edgeFaces:u}}(e,n,s,t,o,r);return function(t,e,n,r,o,s){const a=new Uint8Array(e),i=new Uint32Array(e),l=new Uint32Array(3*e);let u=0;const c=new Uint32Array(e);let h=0;for(let e=0;e<t.length;e+=3){const t=e/3;if(1===a[t])continue;a[t]=1;const f=n[3*t],d=n[3*t+1],p=n[3*t+2];for(h=0,c[h++]=t,l[0]=o[3*t],l[1]=o[3*t+1],l[2]=o[3*t+2],u=3,i[t]=t+1;u>0;){const e=l[--u];for(let r=0;r<2;++r){const y=s[2*e+r];if(-1===y||i[y]===t+1)continue;i[y]=t+1;const g=n[3*y],M=n[3*y+1],b=n[3*y+2];if(Math.abs(1-(f*g+d*M+p*b))<m){c[h++]=y,a[y]=1;for(let t=0;t<3;++t){const n=o[3*y+t];n!==e&&(l[u++]=n)}}}}if(h>1){let t=0,e=0,o=0,s=0;for(let a=0;a<h;++a){const i=c[a],l=r[i];t+=l,e+=n[3*i]*l,o+=n[3*i+1]*l,s+=n[3*i+2]*l}const a=Math.sqrt(e*e+o*o+s*s)||1;e/=a,o/=a,s/=a;for(let a=0;a<h;++a){const i=c[a];n[3*i]=e,n[3*i+1]=o,n[3*i+2]=s,r[i]=t}}}}(t,o,a,i,l,u),p(o,s,t,a,i,c,h)}function f(t,e,n,r,o){const s=n/4,a=r/4,i=o.outputVertexCount,u=new Float32Array(i*a),c=new Uint32Array(u.buffer),h=s,f=new Uint32Array(t.buffer,t.byteOffset,t.length);return function(t,e,n,r,o,s,a){for(let i=0;i<s;++i){const s=i*o,l=i*e;for(let e=0;e<o;++e)t[l+e]=r[s+e];t[l+n]=a[i]}}(c,a,h,f,s,e,o.packedNormals),d(c,a,h,f,s,e,i,o.appendedVertexToOriginal,o.packedNormals),new l(u.buffer,o.indices)}function d(t,e,n,r,o,s,a,i,l){for(let u=s;u<a;++u){const a=i[u-s]*o,c=u*e;for(let e=0;e<o;++e)t[c+e]=r[a+e];t[c+n]=l[u]}}function p(t,e,n,r,o,s,a){const i=3*t,l=new(i<256?Uint8Array:i<65536?Uint16Array:Uint32Array)(n);let c=e;const h=new(e<256?Uint8Array:e<65536?Uint16Array:Uint32Array)(i-e),f=new ArrayBuffer(4*i),d=new Int16Array(f),p=new Uint32Array(f);let m=0,g=0;const M=new Uint32Array(t);let b=0;const R=1-y;for(let t=0;t<e;++t){m=a[2*t+1],g=m+a[2*t];let n=t;for(;m<g;){{const t=s[--g],e=3*t,a=r[e],i=r[e+1],l=r[e+2];b=0,M[b++]=t;let u=m;for(;u<g;){const t=s[u],e=3*t;if(a*r[e]+i*r[e+1]+l*r[e+2]>R){M[b++]=t;const e=--g;if(u<e){s[u]=s[e];continue}}++u}let c=0,h=0,f=0;if(1===b)c=a,h=i,f=l;else{for(let t=0;t<b;++t){const e=M[t],n=o[e],s=3*e;c+=r[s]*n,h+=r[s+1]*n,f+=r[s+2]*n}const t=Math.sqrt(c*c+h*h+f*f)||1;c/=t,h/=t,f/=t}{const t=1/(Math.abs(c)+Math.abs(h)+Math.abs(f)),e=c*t,r=h*t;let o=e,s=r;f<=0&&(o=(e>=0?1:-1)*(1-Math.abs(r)),s=(r>=0?1:-1)*(1-Math.abs(e)));const a=2*n,i=Math.round(32767*o),l=Math.round(32767*s);d[a]=i<-32767?-32767:i>32767?32767:i,d[a+1]=l<-32767?-32767:l>32767?32767:l}}if(n!==t)for(let e=0;e<b;++e){const r=3*M[e];l[r]===t&&(l[r]=n),l[r+1]===t&&(l[r+1]=n),l[r+2]===t&&(l[r+2]=n)}if(m>=g)break;n=c++,h[n-e]=t}}return new u(l,p,h,c,c-e)}const m=.04,y=.8},94715(t,e,n){n.r(e),n.d(e,{destroyContext:()=>v,dracoDecompressPointCloudData:()=>M,filterObbsForModifications:()=>b,filterObbsForModificationsSync:()=>C,initialize:()=>x,interpretObbModificationResults:()=>O,process:()=>g,project:()=>w,setLegacySchema:()=>_,setModifications:()=>R,setModificationsSync:()=>I,test:()=>G,transformNormals:()=>A});var r=n(34727),o=n(77690),s=n(29242),a=n(58083),i=n(9093),l=n(16930),u=n(4197),c=n(95696),h=n(18251),f=n(73354),d=n(2741);let p;var m=n(89606),y=n(98697);async function g(t){T=await D();const e=[t.geometryBuffer];return{result:E(T,t,e),transferList:e}}async function M(t){T=await D();const e=[t.geometryBuffer],{geometryBuffer:n}=t,r=n.byteLength,o=T._malloc(r),s=new Uint8Array(T.HEAPU8.buffer,o,r);s.set(new Uint8Array(n));const a=T.dracoDecompressPointCloudData(o,s.byteLength);if(T._free(o),a.error.length>0)throw new Error(`i3s.wasm: ${a.error}`);const i=a.featureIds?.length>0?a.featureIds.slice():null,l=a.positions.slice();return i&&e.push(i.buffer),e.push(l.buffer),{result:{positions:l,featureIds:i},transferList:e}}async function b(t){await D(),C(t);const e={buffer:t.buffer};return{result:e,transferList:[e.buffer]}}async function R(t){await D(),I(t)}async function _(t){T=await D(),T.setLegacySchema(t.context,t.jsonSchema)}async function w(t){const{localMatrix:e,origin:r,positions:o,vertexSpace:s}=t,a=l.A.fromJSON(t.inSpatialReference),i=l.A.fromJSON(t.outSpatialReference),f=e?(0,u.Vj)(e):void 0,d=(0,u.cj)(r);let p;const[{projectBuffer:m},{initializeProjection:y}]=await Promise.all([Promise.resolve().then(n.bind(n,9762)),Promise.resolve().then(n.bind(n,91218))]);await y(a,i);const g=[0,0,0];if(!m(d,a,0,g,i,0))throw new Error("Failed to project");if("georeferenced"===s.type&&null==s.origin){if(p=new Float64Array(o.length),!m(o,a,0,p,i,0,p.length/3))throw new Error("Failed to project")}else{const t="georeferenced"===s.type?c.A.fromJSON(s):h.A.fromJSON(s),{projectMeshVertexPositions:e}=await n.e(4594).then(n.bind(n,74594)),r=e({vertexAttributes:{position:o},transform:f?{localMatrix:f}:void 0,vertexSpace:t,spatialReference:a},i);if(!r)throw new Error("Failed to project");p=r}const M=p.length,[b,R,_]=g;for(let t=0;t<M;t+=3)p[t]-=b,p[t+1]-=R,p[t+2]-=_;return{result:{projected:p,original:o,projectedOrigin:g},transferList:[p.buffer,o.buffer]}}async function A({normalMatrix:t,normals:e}){const n=new Float32Array(e.length);return(0,f.b)(n,e,t),(0,r.or)(t)&&(0,f.n)(n,n),{result:{transformed:n,original:e},transferList:[n.buffer,e.buffer]}}function v(t){P(t)}let S,T;function I(t){if(!T)return;const e=t.modifications,n=T._malloc(8*e.length),r=new Float64Array(T.HEAPU8.buffer,n,e.length);for(let t=0;t<e.length;++t)r[t]=e[t];T.setModifications(t.context,n,e.length,t.isGeodetic),T._free(n)}function E(t,e,n){const{context:r,globalTrafo:l,geometryElevationOffset:u,mbs:c,obbData:h,layouts:f,needNormals:d,computeNormals:p,elevationOffset:g,planetRadiusInGlobalMode:M,geometryBuffer:b,geometryDescriptor:R,geometryData:_,indexToVertexProjector:w,vertexToRenderProjector:A,normalReferenceFrame:v}=e,S=t._malloc(b.byteLength),T=t._malloc(33*Float64Array.BYTES_PER_ELEMENT),I=new Uint8Array(t.HEAPU8.buffer,S,b.byteLength);I.set(new Uint8Array(b));const E=new Float64Array(t.HEAPU8.buffer,T,33);N(E,[NaN,NaN,NaN],0);let O=3;N(E,l,O),O+=16,N(E,c.center,O),O+=3,E[O++]=c.radius,h&&N(E,h,O++);const C={isDraco:!1,isLegacy:!1,color:f.some(t=>t.some(t=>"color"===t.name)),normal:d&&f.some(t=>t.some(t=>"normalCompressed"===t.name)),uv0:f.some(t=>t.some(t=>"uv0"===t.name)),uvRegion:f.some(t=>t.some(t=>"uvRegion"===t.name)),featureIndex:R.featureIndex},P=t.process(r,!!h,S,I.byteLength,R,C,T,g,w,A,v);if(t._free(T),t._free(S),P.error.length>0)throw new Error(`i3s.wasm: ${P.error}`);if(P.discarded)return null;const x=P.componentOffsets.length>0?P.componentOffsets.slice():null,D=P.featureIds.length>0?P.featureIds.slice():null,G=P.anchorIds.length>0?Array.from(P.anchorIds):null,L=P.anchors.length>0?Array.from(P.anchors):null,B=1===P.indicesType?new Uint16Array(P.indices.buffer,P.indices.byteOffset,P.indices.byteLength/2).slice():new Uint32Array(P.indices.buffer,P.indices.byteOffset,P.indices.byteLength/4).slice(),U=f[0].slice(),j=(0,o.z0)((0,s.vt)(),l),F=(0,m.MU)(P.interleavedVertedData,B,U,p&&!C.normal,j),k=P.positions.slice(),Z=function(t,e,n,r,o){const s=n?(0,i.o8)(n):(0,i.vt)();(0,a.lw)(s,e,s);const l=s[0],u=s[1],c=s[2],h=s[4],f=s[5],d=s[6],p=s[8],m=s[9],y=s[10],g=s[12],M=s[13],b=s[14];let R=1/0,_=-1/0;for(let e=0;e<t.length;e+=3){const n=t[e],s=t[e+1],a=t[e+2],i=n*c+s*d+a*y+b;let w=0;if(r>0){const t=n*l+s*h+a*p+g,e=n*u+s*f+a*m+M;w=Math.sqrt(t*t+e*e+i*i)-r}else w=i;w-=o,R=Math.min(R,w),_=Math.max(_,w)}return{minElevation:R,maxElevation:_}}(k,l,_?.geometries[0]?.transformation,M,u),{buffer:q,byteOffset:H,byteLength:z}=P.positionIndices,Y=1===P.positionIndicesType?new Uint16Array(q,H,z/2).slice():new Uint32Array(q,H,z/4).slice(),$=new y._b(U,F.data,F.indices,P.hasColors,P.hasModifications,{data:k,indices:Y});return D&&n.push(D.buffer),x&&n.push(x.buffer),n.push(F.data),n.push(F.indices.buffer),n.push(k.buffer),n.push(Y.buffer),new y.sQ(x,D,G,L,$,l,P.obb,Z.minElevation,Z.maxElevation)}function O(t){return 0===t?0:1===t?1:2===t?2:3}function C(t){if(!T)return;const{context:e,buffer:n}=t,r=T._malloc(n.byteLength),o=n.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(T.HEAPU8.buffer,r,o),a=new Float64Array(n);s.set(a),T.filterOBBs(e,r,o),a.set(s),T._free(r)}function P(t){0===T?.destroy(t)&&(T=null,S=null,p=null)}function N(t,e,n){for(let r=0;r<e.length;++r)t[r+n]=e[r]}async function x(){T||await D()}async function D(){return T||(T=await(S??=(p??=(async()=>{const t=await n.e(2980).then(n.bind(n,82980));return await t.default({locateFile:t=>(0,d.s)(`esri/libs/i3s/${t}`)})})(),p))),T}const G={transform:(t,e)=>T&&E(T,t,e),destroy:P}},98697(t,e,n){n.d(e,{H1:()=>p,Ir:()=>d,_b:()=>u,sQ:()=>c});var r=n(53966),o=n(15142),s=n(51850),a=n(35982),i=n(91218),l=n(27993);class u{constructor(t,e,n,r,o,s){this.layout=t,this.interleavedVertexData=e,this.indices=n,this.hasColors=r,this.hasModifications=o,this.positionData=s}}class c{constructor(t,e,n,r,o,s,a,i,l){this.componentOffsets=t,this.featureIds=e,this.anchorIds=n,this.anchors=r,this.transformedGeometry=o,this.globalTrafo=s,this.obb=a,this.geometryMinElevation=i,this.geometryMaxElevation=l}}a.B;const h=new o.A({deallocator:null}),f=(0,s.vt)();function d(t,e,n){h.clear();let o=1/0,s=1/0,a=-1/0,u=-1/0,c=!1;for(const t of e){const e="clip"===t.type?2:"mask"===t.type?1:0,d=t.geometry;let p=t=>t;if(d.spatialReference){if(!(0,i.canProjectWithoutEngine)(d.spatialReference,n)){r.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:d});continue}p=t=>((0,l.F)(t,d.spatialReference,f,n),f)}c=c||1===e;const m=d.rings.length,y=d.rings.some(t=>t.length<3);if(0===m||y)r.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-invalid-polygon","Ignoring invalid modification polygon (no rings or rings with less than 3 vertices).",{polygon:d});else{h.push(e),h.push(m);for(const t of d.rings){h.push(t.length);for(const e of t){const t=p(e);h.push(t[0]),h.push(t[1]),h.push(t[2]??0),o=Math.min(o,t[0]),s=Math.min(s,t[1]),a=Math.max(a,t[0]),u=Math.max(u,t[1])}}}}if(null!=t)if(c){const e=1e-4;h.push(2),h.push(2),h.push(4),h.push(o-e),h.push(s-e),h.push(0),h.push(a+e),h.push(s-e),h.push(0),h.push(a+e),h.push(u+e),h.push(0),h.push(o-e),h.push(u+e),h.push(0),h.push(4),h.push(t[0]),h.push(t[1]),h.push(0),h.push(t[2]),h.push(t[1]),h.push(0),h.push(t[2]),h.push(t[3]),h.push(0),h.push(t[0]),h.push(t[3]),h.push(0)}else h.push(1),h.push(1),h.push(4),h.push(t[0]),h.push(t[1]),h.push(0),h.push(t[2]),h.push(t[1]),h.push(0),h.push(t[2]),h.push(t[3]),h.push(0),h.push(t[0]),h.push(t[3]),h.push(0);h.push(3);const d=new Float64Array(h.length);for(let t=0;t<h.length;++t)d[t]=h.at(t);return d}function p(t,e){let n=0;for(const r of e){const e=r.geometry,o=e.rings.length,s=e.rings.some(t=>t.length<3);if(0!==o&&!s){n+=1,n+=1;for(let r=0;r<e.rings.length;++r){const o=e.rings[r];n+=1;for(let s=0;s<o.length;++s){const o=[t[n+0],t[n+1],t[n+2]];n+=3,e.setPoint(r,s,o)}}}}}},10614(t,e,n){n.d(e,{Tz:()=>a,aT:()=>s});var r=n(34727),o=n(35522);function s(t,e,n,r,o,s=2,a=0){const l=1/(Math.abs(n)+Math.abs(r)+Math.abs(o)),u=n*l,c=r*l,h=o<=0?(u>=0?1:-1)*(1-Math.abs(c)):u,f=o<=0?(c>=0?1:-1)*(1-Math.abs(u)):c,d=e*s+a;t[d]=i(h),t[d+1]=i(f)}function a(t,e,n,r=2,s=0){const a=n*r+s,i=l(e[a]),u=l(e[a+1]),c=1-Math.abs(i)-Math.abs(u);return t[2]=c,c<0?(t[0]=(i>=0?1:-1)*(1-Math.abs(u)),t[1]=(u>=0?1:-1)*(1-Math.abs(i))):(t[0]=i,t[1]=u),(0,o.S8)(t,t)}function i(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function l(t){return(0,r.qE)(t/32767,-1,1)}n(51850)},74038(t,e,n){n.d(e,{_:()=>r});class r{constructor(t,e,n,r,o,s=!1,a=0,i=!1){this.name=t,this.count=e,this.type=n,this.offset=r,this.stride=o,this.normalized=s,this.divisor=a,this.integer=i}}},63907(t,e,n){const r={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},o={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},s=Object.values(o),a={FLOAT:r.FLOAT,UNSIGNED_BYTE:r.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:r.BYTE,UNSIGNED_SHORT:r.UNSIGNED_SHORT,SHORT:r.SHORT,UNSIGNED_INT:r.UNSIGNED_INT,INT:r.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269};n.d(e,["CQ",0,{COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497},"H0",0,o,"SB",0,{DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},"WR",0,{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},"XN",0,s,"iE",0,{DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},"ld",0,a,"pe",0,r,"vt",0,{Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12}])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2772,8325],{80200(e,t,s){s.d(t,{d:()=>p});const n={Base64:0,Hex:1,String:2,Raw:3};function r(e,t){const s=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(s>>16)<<16|65535&s}function o(e,t,s,n,o,i){return r(function(e,t){return e<<t|e>>>32-t}(r(r(t,e),r(n,i)),o),s)}function i(e,t,s,n,r,i,a){return o(t&s|~t&n,e,t,r,i,a)}function a(e,t,s,n,r,i,a){return o(t&n|s&~n,e,t,r,i,a)}function c(e,t,s,n,r,i,a){return o(t^s^n,e,t,r,i,a)}function l(e,t,s,n,r,i,a){return o(s^(t|~n),e,t,r,i,a)}function u(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let s=1732584193,n=-271733879,o=-1732584194,u=271733878;for(let t=0;t<e.length;t+=16){const p=s,h=n,f=o,d=u;s=i(s,n,o,u,e[t],7,-680876936),u=i(u,s,n,o,e[t+1],12,-389564586),o=i(o,u,s,n,e[t+2],17,606105819),n=i(n,o,u,s,e[t+3],22,-1044525330),s=i(s,n,o,u,e[t+4],7,-176418897),u=i(u,s,n,o,e[t+5],12,1200080426),o=i(o,u,s,n,e[t+6],17,-1473231341),n=i(n,o,u,s,e[t+7],22,-45705983),s=i(s,n,o,u,e[t+8],7,1770035416),u=i(u,s,n,o,e[t+9],12,-1958414417),o=i(o,u,s,n,e[t+10],17,-42063),n=i(n,o,u,s,e[t+11],22,-1990404162),s=i(s,n,o,u,e[t+12],7,1804603682),u=i(u,s,n,o,e[t+13],12,-40341101),o=i(o,u,s,n,e[t+14],17,-1502002290),n=i(n,o,u,s,e[t+15],22,1236535329),s=a(s,n,o,u,e[t+1],5,-165796510),u=a(u,s,n,o,e[t+6],9,-1069501632),o=a(o,u,s,n,e[t+11],14,643717713),n=a(n,o,u,s,e[t],20,-373897302),s=a(s,n,o,u,e[t+5],5,-701558691),u=a(u,s,n,o,e[t+10],9,38016083),o=a(o,u,s,n,e[t+15],14,-660478335),n=a(n,o,u,s,e[t+4],20,-405537848),s=a(s,n,o,u,e[t+9],5,568446438),u=a(u,s,n,o,e[t+14],9,-1019803690),o=a(o,u,s,n,e[t+3],14,-187363961),n=a(n,o,u,s,e[t+8],20,1163531501),s=a(s,n,o,u,e[t+13],5,-1444681467),u=a(u,s,n,o,e[t+2],9,-51403784),o=a(o,u,s,n,e[t+7],14,1735328473),n=a(n,o,u,s,e[t+12],20,-1926607734),s=c(s,n,o,u,e[t+5],4,-378558),u=c(u,s,n,o,e[t+8],11,-2022574463),o=c(o,u,s,n,e[t+11],16,1839030562),n=c(n,o,u,s,e[t+14],23,-35309556),s=c(s,n,o,u,e[t+1],4,-1530992060),u=c(u,s,n,o,e[t+4],11,1272893353),o=c(o,u,s,n,e[t+7],16,-155497632),n=c(n,o,u,s,e[t+10],23,-1094730640),s=c(s,n,o,u,e[t+13],4,681279174),u=c(u,s,n,o,e[t],11,-358537222),o=c(o,u,s,n,e[t+3],16,-722521979),n=c(n,o,u,s,e[t+6],23,76029189),s=c(s,n,o,u,e[t+9],4,-640364487),u=c(u,s,n,o,e[t+12],11,-421815835),o=c(o,u,s,n,e[t+15],16,530742520),n=c(n,o,u,s,e[t+2],23,-995338651),s=l(s,n,o,u,e[t],6,-198630844),u=l(u,s,n,o,e[t+7],10,1126891415),o=l(o,u,s,n,e[t+14],15,-1416354905),n=l(n,o,u,s,e[t+5],21,-57434055),s=l(s,n,o,u,e[t+12],6,1700485571),u=l(u,s,n,o,e[t+3],10,-1894986606),o=l(o,u,s,n,e[t+10],15,-1051523),n=l(n,o,u,s,e[t+1],21,-2054922799),s=l(s,n,o,u,e[t+8],6,1873313359),u=l(u,s,n,o,e[t+15],10,-30611744),o=l(o,u,s,n,e[t+6],15,-1560198380),n=l(n,o,u,s,e[t+13],21,1309151649),s=l(s,n,o,u,e[t+4],6,-145523070),u=l(u,s,n,o,e[t+11],10,-1120210379),o=l(o,u,s,n,e[t+2],15,718787259),n=l(n,o,u,s,e[t+9],21,-343485551),s=r(s,p),n=r(n,h),o=r(o,f),u=r(u,d)}return[s,n,o,u]}function p(e,t=n.Hex){const s=t||n.Base64,r=u(function(e){const t=[];for(let s=0,n=8*e.length;s<n;s+=8)t[s>>5]|=(255&e.charCodeAt(s/8))<<s%32;return t}(e),8*e.length);switch(s){case n.Raw:return r;case n.Hex:return function(e){const t="0123456789abcdef",s=[];for(let n=0,r=4*e.length;n<r;n++)s.push(t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15));return s.join("")}(r);case n.String:return function(e){const t=[];for(let s=0,n=32*e.length;s<n;s+=8)t.push(String.fromCharCode(e[s>>5]>>>s%32&255));return t.join("")}(r);case n.Base64:return function(e){const t=[];for(let s=0,n=4*e.length;s<n;s+=3){const n=(e[s>>2]>>s%4*8&255)<<16|(e[s+1>>2]>>(s+1)%4*8&255)<<8|e[s+2>>2]>>(s+2)%4*8&255;for(let r=0;r<4;r++)8*s+6*r>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-r)&63))}return t.join("")}(r)}}s.d(t,["T",0,n])},87024(e,t,s){s.d(t,{P:()=>f});var n=s(49186),r=s(80200),o=s(76553),i=s(84952),a=s(13069),c=s(96156),l=s(35666),u=s(10107),p=s(85648),h=s(97159);function f(e){const t=e?.origins??[void 0];return(s,n)=>{const r=function(e,t,s){if("resource"===e?.type)return function(e,t,s){const n=(0,c.z4)(t,s);return{type:String,read:(e,t,s)=>{const r=(0,h.r)(e,t,s);return n.type===String?r:"function"==typeof n.type?new n.type({url:r}):void 0},write:{isRequired:n.json?.write?.isRequired,writer(t,r,a,c){if(!c?.resources)return"string"==typeof t?void(r[a]=(0,h.t)(t,c)):void(r[a]=t.write({},c));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,h.t)(u,{...c,verifyItemRelativeUrls:c?.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),y=n.type!==String&&(!(0,o.H)(this)||c?.origin&&this.originIdOf(s)>(0,l.aB)(c.origin)),_={object:this,propertyName:s,value:t,targetUrl:f,dest:r,targetPropertyName:a,context:c,params:e};c?.portalItem&&f&&!(0,i.oP)(f)?y&&e?.contentAddressed?d(_):y?function(e){const{context:t,targetUrl:s,params:n,value:r,dest:o,targetPropertyName:a}=e;if(!t.portalItem)return;const c=t.portalItem.resourceFromPath(s),l=g(r,s,t),u=(0,p.n)(l),h=(0,i.Zo)(c.path),f=n?.compress??!1;u===h?(t.resources&&m({...e,resource:c,content:l,compress:f,updates:t.resources.toUpdate}),o[a]=s):d(e)}(_):function({context:e,targetUrl:t,dest:s,targetPropertyName:n}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),s[n]=t)}(_):c?.portalItem&&(null==f||null!=(0,h.i)(f)||(0,i.w8)(f)||y)?d(_):r[a]=f}}}}(e,t,s);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=h.b;return{read:e,write:t}}}}(e,s,n);for(const e of t){const t=(0,u.rM)(s,e,n);for(const e in r)t[e]=r[e]}}}function d(e){const{targetUrl:t,params:s,value:o,context:c,dest:l,targetPropertyName:u}=e;if(!c.portalItem)return;const f=(0,h.p)(t),d=g(o,t,c);if(s?.contentAddressed&&"json"!==d.type)return void c.messages?.push(new n.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${d.type} with content addressing. Content addressing is only supported for json resources.`,{content:d}));const y=s?.contentAddressed&&"json"===d.type?(0,r.d)(d.jsonString):f?.filename??(0,a.lk)(),_=(0,i.fj)(s?.prefix??f?.prefix,y),v=`${_}.${(0,p.n)(d)}`;if(s?.contentAddressed&&c.resources&&"json"===d.type){const e=c.resources.toKeep.find(({resource:e})=>e.path===v)??c.resources.toAdd.find(({resource:e})=>e.path===v);if(e)return void(l[u]=e.resource.itemRelativeUrl)}const w=c.portalItem.resourceFromPath(v);(0,i.w8)(t)&&c.resources&&c.resources.pendingOperations.push((0,i.tk)(t).then(e=>{w.path=`${_}.${(0,p.n)({type:"blob",blob:e})}`,l[u]=w.itemRelativeUrl}).catch(()=>{}));const b=s?.compress??!1;c.resources&&m({...e,resource:w,content:d,compress:b,updates:c.resources.toAdd}),l[u]=w.itemRelativeUrl}function m({object:e,propertyName:t,updates:s,resource:n,content:r,compress:o}){s.push({resource:n,content:r,compress:o,finish:s=>{!function(e,t,s){"string"==typeof e[t]?e[t]=s.url:e[t].url=s.url}(e,t,s)}})}function g(e,t,s){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(s))}}},13069(e,t,s){s.d(t,{AG:()=>a,lk:()=>r,vD:()=>i,yS:()=>o});const n="randomUUID"in crypto;function r(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${r().toUpperCase()}}`}function i(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},83027(e,t,s){const n=s(29953).ho;s.d(t,["h",0,n])},35982(e,t,s){s.d(t,{B:()=>u});var n=s(4576),r=s(71511),o=s(36563),i=s(53966),a=s(97768),c=s(17676),l=s(83027);class u{constructor(e,t,s,n,r={}){this._mainMethod=t,this._transferLists=s,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,l.h)(e,{...r,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{r.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>i.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const s=new p(e,t);return this._listeners.push(s),this._connectListener(s),(0,o.hA)(()=>{(0,n.TF)(this._listeners,s),s.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,s){return this.invokeMethod(this._mainMethod,e,t,s)}invokeMethod(e,t,s,n){if(this._thread){const r=this._transferLists[e],o=r?r(t):[];return this._thread.invoke(e,t,{transferList:o,signal:s,jobPriority:n})}return this._promise?this._promise.then(()=>((0,c.Te)(s),this.invokeMethod(e,t,s))):Promise.reject((0,c.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,c.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class p{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new r.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function h(){}},58325(e,t,s){s.d(t,{A:()=>S});var n,r=s(5482),o=s(11254),i=s(7762),a=s(25482),c=s(84952),l=s(91429),u=s(4718),p=s(67076),h=s(87024),f=s(39829),d=s(91218),m=s(16930),g=s(21325),y=s(88546),_=s(72772),v=s(98697),w=s(43937);let b=n=class extends a.o{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,s,n){if(this._needWGS84Conversion(n))this._doWGS84Conversion(t,s,n);else if(n.layer?.spatialReference&&!n.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,d.canProjectWithoutEngine)(e.spatialReference,n.layer.spatialReference))return void(n?.messages&&n.messages.push(new p.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:n.layer.spatialReference,context:n})));const r=new f.A;(0,d.projectPolygon)(e,r,n.layer.spatialReference),t[s]=r.toJSON(n)}else t[s]=e.toJSON(n)}_needWGS84Conversion(e){if("integrated-mesh-3dtiles"===e.layer?.type){const t=e.layer;return!t.esriCrsSpatialReference||!(0,g.aI)(t.esriCrsSpatialReference,this.geometry.spatialReference)}return!1}_doWGS84Conversion(e,t,s){let n=!0;if((0,_.isInitialized)()){const r=(0,v.Ir)(null,[this],m.A.WGS84);if(r.length>1){const o=(0,_.switchMeshModificationPolygonVCSSync)({modifications:r,inVCS:5773});if(o.success&&o.modifications){const r=[this.clone()];(0,v.H1)(o.modifications,r),1===r.length&&r[0].geometry&&(r[0].geometry.spatialReference=y.Zx,e[t]=r[0].geometry.toJSON(s),n=!1)}}}n&&s?.messages&&s.messages.push(new p.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:this.geometry.spatialReference,context:s}))}clone(){return new n({geometry:(0,u.o8)(this.geometry),type:this.type})}};var C;(0,r.Cg)([(0,l.MZ)({type:f.A}),(0,h.P)()],b.prototype,"geometry",void 0),(0,r.Cg)([(0,w.K)(["web-scene","portal-item"],"geometry")],b.prototype,"writeGeometry",null),(0,r.Cg)([(0,l.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,h.P)()],b.prototype,"type",void 0),b=n=(0,r.Cg)([(0,l.$K)("esri.layers.support.SceneModification")],b);let S=C=class extends((0,a.T)(i.A.ofType(b))){constructor(e){super(e),this.url=null}clone(){return new C({url:this.url,items:this.items.map(e=>e.clone())})}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}static fromJSON(e,t){const s=new C;for(const n of e)s.add(b.fromJSON(n,t));return s}static async fromUrl(e,t,s,n=!1){const r={url:(0,c.An)(e),origin:"service"},i=await(0,o.A)(e,{responseType:"json",signal:s?.signal}),a=t.toJSON(),l=[];for(const e of i.data){let t=a;n&&e.geometry.spatialReference&&(t=e.geometry.spatialReference),l.push(b.fromJSON({...e,geometry:{spatialReference:t,...e.geometry}},r))}return new C({url:e,items:l})}};(0,r.Cg)([(0,l.MZ)({type:String})],S.prototype,"url",void 0),S=C=(0,r.Cg)([(0,l.$K)("esri.layers.support.SceneModifications")],S)},85648(e,t,s){s.d(t,{n:()=>r});var n=s(84952);function r(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,n.Zo)(e);return c[t]||i}(e.url)}(e)]||a}const o={},i="text/plain",a=o[i],c={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(const e in c)o[c[e]]=e},72772(e,t,s){s.r(t),s.d(t,{addSpatialReferenceInfo:()=>c,destroyWasm:()=>u,initialize:()=>p,isInitialized:()=>h,process:()=>a,switchMeshModificationPolygonVCSSync:()=>l});var n=s(2741);function r(e){return(0,n.s)(`esri/libs/lyr3d/${e}`)}let o,i=null;async function a(e){await p();const t={status:1,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]};if(e.inputs.length<1)return{result:t,transferList:[]};const s={ptrs:[],sizes:[]};for(const t of e.inputs){const e=i._malloc(t.byteLength);new Uint8Array(i.HEAPU8.buffer,e,t.byteLength).set(new Uint8Array(t)),s.ptrs.push(e),s.sizes.push(t.byteLength)}const n=i.process(e.jobDescJson,e.id,s,e.isMissingResourceCase);t.status=n.status,t.missingInputUrls=n.missingInputUrls.slice();const r=0===n.status&&n.data,o=2===t.status&&t.missingInputUrls.length>0;t.jobDescJson=n.jobDescJson.slice(),t.error=n.error.slice(),r?t.data=n.data.slice():o&&(t.originalInputs=e.inputs.slice());for(let e=0;e<s.ptrs.length;++e)i._free(s.ptrs[e]);const a=[];if(r)a.push(t.data.buffer);else if(o)for(const t of e.inputs)a.push(t);return{result:t,transferList:a}}async function c(e){await p(),i.add_spatial_reference_info(e.sr,e.isGCS,e.toMetersXY,e.toMetersZ)}function l(e){if(!i)return{success:!1,modifications:null};const t=i._malloc(8*e.modifications.length),s=new Float64Array(i.HEAPF64.buffer,t,e.modifications.length);s.set(e.modifications);const n=i.switch_mesh_modification_polygon_vcs(t,e.modifications.length,e.inVCS);let r=null;return n&&(r=s.slice()),i._free(t),{success:n,modifications:r}}function u(){i&&(i.uninitialize_lyr3d_worker_wasm(),i=null)}function p(){return h()?Promise.resolve():(o||(o=new Promise(e=>s.e(2343).then(s.bind(s,2343)).then(({default:t})=>{const s=t({locateFile:r,onRuntimeInitialized:()=>e(s)})})).catch(e=>{throw e}).then(e=>{i=e,i.initialize_lyr3d_worker_wasm(),o=null})),o)}function h(){return null!==i}},98697(e,t,s){s.d(t,{H1:()=>d,Ir:()=>f,_b:()=>l,sQ:()=>u});var n=s(53966),r=s(15142),o=s(51850),i=s(35982),a=s(91218),c=s(27993);class l{constructor(e,t,s,n,r,o){this.layout=e,this.interleavedVertexData=t,this.indices=s,this.hasColors=n,this.hasModifications=r,this.positionData=o}}class u{constructor(e,t,s,n,r,o,i,a,c){this.componentOffsets=e,this.featureIds=t,this.anchorIds=s,this.anchors=n,this.transformedGeometry=r,this.globalTrafo=o,this.obb=i,this.geometryMinElevation=a,this.geometryMaxElevation=c}}i.B;const p=new r.A({deallocator:null}),h=(0,o.vt)();function f(e,t,s){p.clear();let r=1/0,o=1/0,i=-1/0,l=-1/0,u=!1;for(const e of t){const t="clip"===e.type?2:"mask"===e.type?1:0,f=e.geometry;let d=e=>e;if(f.spatialReference){if(!(0,a.canProjectWithoutEngine)(f.spatialReference,s)){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}d=e=>((0,c.F)(e,f.spatialReference,h,s),h)}u=u||1===t;const m=f.rings.length,g=f.rings.some(e=>e.length<3);if(0===m||g)n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-invalid-polygon","Ignoring invalid modification polygon (no rings or rings with less than 3 vertices).",{polygon:f});else{p.push(t),p.push(m);for(const e of f.rings){p.push(e.length);for(const t of e){const e=d(t);p.push(e[0]),p.push(e[1]),p.push(e[2]??0),r=Math.min(r,e[0]),o=Math.min(o,e[1]),i=Math.max(i,e[0]),l=Math.max(l,e[1])}}}}if(null!=e)if(u){const t=1e-4;p.push(2),p.push(2),p.push(4),p.push(r-t),p.push(o-t),p.push(0),p.push(i+t),p.push(o-t),p.push(0),p.push(i+t),p.push(l+t),p.push(0),p.push(r-t),p.push(l+t),p.push(0),p.push(4),p.push(e[0]),p.push(e[1]),p.push(0),p.push(e[2]),p.push(e[1]),p.push(0),p.push(e[2]),p.push(e[3]),p.push(0),p.push(e[0]),p.push(e[3]),p.push(0)}else p.push(1),p.push(1),p.push(4),p.push(e[0]),p.push(e[1]),p.push(0),p.push(e[2]),p.push(e[1]),p.push(0),p.push(e[2]),p.push(e[3]),p.push(0),p.push(e[0]),p.push(e[3]),p.push(0);p.push(3);const f=new Float64Array(p.length);for(let e=0;e<p.length;++e)f[e]=p.at(e);return f}function d(e,t){let s=0;for(const n of t){const t=n.geometry,r=t.rings.length,o=t.rings.some(e=>e.length<3);if(0!==r&&!o){s+=1,s+=1;for(let n=0;n<t.rings.length;++n){const r=t.rings[n];s+=1;for(let o=0;o<r.length;++o){const r=[e[s+0],e[s+1],e[s+2]];s+=3,t.setPoint(n,o,r)}}}}}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{makeHandle as t}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import n from"../../../../symbols/support/ElevationInfo.js";import{LineOfSightPlacementController as r}from"./LineOfSightPlacementController.js";import{LineOfSightRayIntersector as l}from"./LineOfSightRayIntersector.js";import{LineOfSightReshapeTool3D as h}from"./LineOfSightReshapeTool3D.js";import{ExclusiveOperationManager as c}from"../../../analysis/ExclusiveOperationManager.js";import{ViewEventPriorities as p}from"../../../input/InputManager.js";import{AnalysisToolBase as v}from"../../../interactive/AnalysisToolBase.js";import{deactivevateTool as d}from"../../../interactive/interactiveToolUtils.js";import{sketchKeys as y}from"../../../interactive/keybindings.js";const _={ready:"ready",creating:"creating",created:"created"};let u=class extends v{constructor(e){super(e),this._operationManager=new c,this._syncingActiveTool=!1,this.analysisViewData=null,this.removeIncompleteOnCancel=!1,this._reshapeIntersector=new l({view:e.view}),this._reshapeTool=new h({analysis:e.analysis,analysisViewData:e.analysisViewData,intersector:this._reshapeIntersector,view:e.view}),this._placementController=new r({...e,parent:this,shouldPreventVertexAdd:(e,t)=>this._reshapeTool.hasManipulatorAt(e,t)})}get active(){return this._reshapeTool.active||this._placementController.active}get canRedo(){return this._activeUndoRedoComponent?.canRedo??!1}get canUndo(){return this._activeUndoRedoComponent?.canUndo??!1}get state(){return this._placementController.active?_.creating:null!=this.analysis.observer?.position?_.created:_.ready}get cursor(){return this._placementController.active?"crosshair":null}get updating(){return this._reshapeTool.updating||this._placementController.updating}initialize(){this.addHandles([this.view.on("key-down",e=>this._onKeyDown(e),p.WIDGET),i(()=>({editable:this.editable,interactive:this.analysisViewData.interactive,placementActive:this._placementController.active,valid:this.analysis.valid,visible:this.visible}),()=>this._syncActiveTool(),s),i(()=>this.state===_.created,e=>{e?this.finishToolCreation():this._set("created",!1)},s),i(()=>this.analysisViewData.visible,e=>{this.visible=e},s),i(()=>{const{analysis:e}=this,{observer:t,targets:i}=e;return{observer:t,observerPosition:t?.position,observerElevationInfo:t?.elevationInfo,observerFeature:t?.feature,targets:i.toArray().map(e=>[e,e.position,e.elevationInfo,e.feature])}},()=>this._syncItemsFromAnalysis(),s),i(()=>this.editable,e=>{this.analysisViewData.editable=e},s)])}destroy(){this._operationManager.destroy(),this._reshapeTool.stop(),this._placementController.stop(),this._reshapeTool.destroy(),this._placementController.destroy(),this._reshapeIntersector.destroy()}place(e){return this.analysisViewData.interactive=!0,this._operationManager.start("place",async(o,a)=>{const{elevationInfo:n}=e??{},r=n&&"observer"in n?n.observer:n,l=n&&"targets"in n?n.targets:n;this._placementController.observerPlacementElevationInfo=m(r),this._placementController.targetPlacementElevationInfo=m(l);const h=this.analysis.clone();let c=!1,p=!1;const v=()=>{if(!p){if(p=!0,this.stop(),!this.analysis.valid)return this.analysis.clear(),void o.reject();a.aborted||this.analysis.equals(h)?o.reject():o.resolve({})}};o.handles.push(t(()=>this.stop()),i(()=>this._placementController.active,e=>{e?c=!0:c&&v()},s)),this.continue()},e)}activate(){this.view.focus(),this.analysisViewData.interactive=!0,this._syncActiveTool(),this.analysis.valid||this._placementController.active||this.continue()}deactivate(){this.onDeactivate()}continue(){this.analysisViewData.interactive=!0,this._placementController.continue()}stop(){this._placementController.stop(),this._placementController.observerPlacementElevationInfo=null,this._placementController.targetPlacementElevationInfo=null,this._syncActiveTool()}redo(){this._activeUndoRedoComponent?.redo()}undo(){this._activeUndoRedoComponent?.undo()}get testInfo(){}onEditableChange(){this.analysisViewData.editable=this.editable,this._reshapeTool.setEditableFlag(1,!0),this._reshapeTool.setEditableFlag(0,this.editable),this._syncActiveTool()}_hideReshapeTool(){this._reshapeTool.stop(),this._reshapeTool.visible=!1}_onKeyDown(e){const t=e.key;t===y.undo&&this.canUndo?(e.stopPropagation(),this.undo()):t===y.redo&&this.canRedo?(e.stopPropagation(),this.redo()):t===y.cancel&&!this.active&&this._reshapeTool.hasSelection&&this._reshapeTool.clearSelection()}get _activeUndoRedoComponent(){return this.analysisViewData.interactive?this._placementController.active||!this._canActivateReshapeTool?this._placementController.active?this._placementController:null:this._reshapeTool:null}get _canActivateReshapeTool(){return this.visible&&this.editable&&this.analysis.valid&&null!=this.analysis.observer?.position}_syncActiveTool(){if(!this._syncingActiveTool){this._syncingActiveTool=!0;try{const e=this.analysisViewData.interactive,t=this._canActivateReshapeTool;if(this._placementController.visible=this.visible&&e,this._reshapeTool.isParentToolInteracting=e&&this._placementController.active,!e)return this._placementController.stop(),this._hideReshapeTool(),this.analysisViewData.cursorTarget=null,void d(this.view,this);if(this._placementController.active)return this._reshapeTool.stop(),this._reshapeTool.visible=this.visible,void d(this.view,this);if(!t)return this._hideReshapeTool(),void d(this.view,this);if(this._reshapeTool.visible=!0,this.analysisViewData.cursorTarget=null,!this._reshapeTool.active&&!this._reshapeTool.hasSelection){const e=this.analysis.targets.at(-1);null!=e&&this._reshapeTool.applySelection({type:"target",target:e})}d(this.view,this)}finally{this._syncingActiveTool=!1}}}_syncItemsFromAnalysis(){this._syncActiveTool()}};function m(e){if(null==e)return null;const{featureExpressionInfo:t,mode:i,offset:s,unit:o}=e;return new n({featureExpressionInfo:t,mode:i,offset:s,unit:o})}e([o({constructOnly:!0})],u.prototype,"view",void 0),e([o({constructOnly:!0})],u.prototype,"analysis",void 0),e([o({constructOnly:!0})],u.prototype,"analysisViewData",void 0),e([o()],u.prototype,"active",null),e([o()],u.prototype,"canRedo",null),e([o()],u.prototype,"canUndo",null),e([o()],u.prototype,"state",null),e([o()],u.prototype,"cursor",null),e([o()],u.prototype,"updating",null),e([o()],u.prototype,"removeIncompleteOnCancel",void 0),e([o()],u.prototype,"_canActivateReshapeTool",null),u=e([a("esri.views.3d.analysis.LineOfSight.LineOfSightTool2")],u);export{u as LineOfSightTool2};
|
|
File without changes
|