@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 22 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3720],{69397:(e,t,n)=>{n.d(t,{Qf:()=>u,Qh:()=>i,RS:()=>o,ez:()=>a,i5:()=>f,lM:()=>s,qK:()=>h});var r=n(34275);const o=16;function s(e){if(!e)return 0;let t=h;for(const n in e)e.hasOwnProperty(n)&&(t+=l(e[n],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let n=a;for(let r=0;r<t;r++)n+=l(e[r]);return n}(e);let t=h;for(const n in e)e.hasOwnProperty(n)&&(t+=l(e[n]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?i(e):h;case"string":return function(e){return 32+e.length}(e);case"number":return o;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce(((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+f:Array.isArray(t)?c(t,o):0:0)),0)}function c(e,t){return a+e.length*t}const h=32,a=16,f=145},4197:(e,t,n)=>{n.d(t,{jh:()=>o,l5:()=>i,xm:()=>s});var r=n(34275);function o(e,t=!1){return e<=r.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=r.y9?Array.from(e):new Float64Array(e)}function i(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}},70328:(e,t,n)=>{n.d(t,{BI:()=>M,Ej:()=>I,Ie:()=>T,Jt:()=>F,Ne:()=>p,RF:()=>h,_F:()=>g,aI:()=>A,fA:()=>i,gE:()=>u,gX:()=>y,hZ:()=>b,iT:()=>a,is:()=>w,qv:()=>G,vI:()=>N,vY:()=>l,v_:()=>x,vt:()=>s,w1:()=>c});var r=n(5443),o=(n(19419),n(4197));function s(e=x){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,n,r,o,i,l=s()){return l[0]=e,l[1]=t,l[2]=n,l[3]=r,l[4]=o,l[5]=i,l}function l(e,t=s()){return function(e,t,n,r=s()){return b(r,G),function(e,t,n=0,r=t.length/3){let o=e[0],s=e[1],i=e[2],l=e[3],u=e[4],c=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[n+3*e]),s=Math.min(s,t[n+3*e+1]),i=Math.min(i,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),u=Math.max(u,t[n+3*e+1]),c=Math.max(c,t[n+3*e+2]);e[0]=o,e[1]=s,e[2]=i,e[3]=l,e[4]=u,e[5]=c}(r,e,t,n),r}(e,0,e.length/3,t)}function u(e,t=(0,o.jh)(24)){const[n,r,s,i,l,u]=e;return t[0]=n,t[1]=r,t[2]=s,t[3]=n,t[4]=r,t[5]=u,t[6]=n,t[7]=l,t[8]=s,t[9]=n,t[10]=l,t[11]=u,t[12]=i,t[13]=r,t[14]=s,t[15]=i,t[16]=r,t[17]=u,t[18]=i,t[19]=l,t[20]=s,t[21]=i,t[22]=l,t[23]=u,t}function c(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e){return e[0]>=e[3]?0:e[3]-e[0]}function d(e){return e[1]>=e[4]?0:e[4]-e[1]}function m(e){return e[2]>=e[5]?0:e[5]-e[2]}function g(e){const t=f(e),n=m(e),r=d(e);return Math.sqrt(t*t+n*n+r*r)}function y(e,t=[0,0,0]){return t[0]=e[0]+f(e)/2,t[1]=e[1]+d(e)/2,t[2]=e[2]+m(e)/2,t}function I(e,t=[0,0,0]){return t[0]=f(e),t[1]=d(e),t[2]=m(e),t}function p(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function N(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function T(e){return e?b(e,G):s(G)}function F(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function M(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function A(e,t,n){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const G=[1/0,1/0,1/0,-1/0,-1/0,-1/0],x=[0,0,0,0,0,0];s()},43334:(e,t,n)=>{n.d(t,{N3:()=>l,Om:()=>i});var r=n(69397),o=n(27647),s=n(92722);class i{constructor(e=null,t={},n,r,o=0){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=o}static fromJSON(e){const t=e.geometry?s.A.fromJSON(e.geometry):null,n=e.centroid?s.A.fromJSON(e.centroid):null,r=e.objectId;return new i(t,e.attributes,n,r)}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new i(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,o.Q)(new s.A,this.geometry,e.hasZ,e.hasM),this.centroid}get usedMemory(){return 128+(0,r.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(69397);class o{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new o(e.lengths,e.coords)}static fromRect(e){const[t,n,r,s]=e,i=r-t,l=s-n;return new o([5],[t,n,i,0,0,l,-i,0,0,-l])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}area(){let e=0,t=0;if(!this.lengths.length)return 0;for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];if(r<3)continue;let o=this.coords[2*t],s=this.coords[2*t+1];for(let n=1;n<r;n+=1){const r=this.coords[2*(n+t)],i=this.coords[2*(n+t)+1];e+=-.5*(r-o)*(i+s),o=r,s=i}t+=r}return e}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;for(const e of n){for(let n=1;n<e;n++)t[2*(r+n)]+=t[2*(r+n)-2],t[2*(r+n)+1]+=t[2*(r+n)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new o([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),n=this.coords.slice(0,t);return e?(e.set(n),new o(this.lengths,e)):new o(Array.from(this.lengths),Array.from(n))}}},27647:(e,t,n)=>{function r(e,t){return e?t?4:3:t?3:2}function o(e,t,n,o){if(!t?.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const l=e.coords,u=[],c=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:h,coords:a}=t,f=r(n,o);let d=0;for(const e of h){const t=s(c,a,d,e,n,o);t&&u.push(t),d+=e*f}if(u.sort(((e,t)=>{let r=e[2]-t[2];return 0===r&&n&&(r=e[4]-t[4]),r})),u.length){let e=6*u[0][2];l[0]=u[0][0]/e,l[1]=u[0][1]/e,n&&(e=6*u[0][4],l[2]=0!==e?u[0][3]/e:0),(l[0]<c[0]||l[0]>c[1]||l[1]<c[2]||l[1]>c[3]||n&&(l[2]<c[4]||l[2]>c[5]))&&(l.length=0)}if(!l.length){const e=t.lengths[0]?i(a,0,h[0],n,o):null;if(!e)return null;l[0]=e[0],l[1]=e[1],n&&e.length>2&&(l[2]=e[2])}return e}function s(e,t,n,o,s,i){const l=r(s,i);let u=n,c=n+l,h=0,a=0,f=0,d=0,m=0;for(let n=0,r=o-1;n<r;n++,u+=l,c+=l){const n=t[u],r=t[u+1],o=t[u+2],i=t[c],l=t[c+1],g=t[c+2];let y=n*l-i*r;d+=y,h+=(n+i)*y,a+=(r+l)*y,s&&(y=n*g-i*o,f+=(o+g)*y,m+=y),n<e[0]&&(e[0]=n),n>e[1]&&(e[1]=n),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),s&&(o<e[4]&&(e[4]=o),o>e[5]&&(e[5]=o))}if(d>0&&(d*=-1),m>0&&(m*=-1),!d)return null;const g=[h,a,.5*d];return s&&(g[3]=f,g[4]=.5*m),g}function i(e,t,n,o,s){const i=r(o,s);let a=t,f=t+i,d=0,m=0,g=0,y=0;for(let t=0,r=n-1;t<r;t++,a+=i,f+=i){const t=e[a],n=e[a+1],r=e[a+2],s=e[f],i=e[f+1],I=e[f+2],p=o?u(t,n,r,s,i,I):l(t,n,s,i);if(p)if(d+=p,o){const e=h(t,n,r,s,i,I);m+=p*e[0],g+=p*e[1],y+=p*e[2]}else{const e=c(t,n,s,i);m+=p*e[0],g+=p*e[1]}}return d>0?o?[m/d,g/d,y/d]:[m/d,g/d]:n>0?o?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,n,r){const o=n-e,s=r-t;return Math.sqrt(o*o+s*s)}function u(e,t,n,r,o,s){const i=r-e,l=o-t,u=s-n;return Math.sqrt(i*i+l*l+u*u)}function c(e,t,n,r){return[e+.5*(n-e),t+.5*(r-t)]}function h(e,t,n,r,o,s){return[e+.5*(r-e),t+.5*(o-t),n+.5*(s-n)]}n.d(t,{Q:()=>o})},90708:(e,t,n)=>{n.d(t,{B2:()=>T,BW:()=>V,Ch:()=>ie,DF:()=>A,Di:()=>B,E2:()=>U,IE:()=>b,Nl:()=>te,Q4:()=>le,Rk:()=>ce,Ux:()=>J,Ye:()=>L,ZF:()=>X,eU:()=>z,eY:()=>W,hK:()=>ae,jH:()=>ee,jQ:()=>se,kz:()=>ne,oN:()=>Q,q3:()=>H,qK:()=>_,qN:()=>Y,z5:()=>R,zv:()=>$});var r=n(49186),o=n(53966),s=n(97768),i=n(70328),l=n(19419),u=n(65864),c=n(43334),h=n(58512),a=n(92722);function f(e,t){return e?t?4:3:t?3:2}const d=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0},g=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s},y=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s,e[n+2]=t[r+2]},I=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s,e[n+2]=t[r+3]},p=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s,e[n+2]=t[r+2],e[n+3]=t[r+3]};function N(e,t,n,r){if(e){if(n)return t&&r?p:y;if(t&&r)return I}else if(t&&r)return y;return g}function b({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}function T({scale:e,translate:t},n){return Math.round((t[1]-n)/e[1])}function F({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}function M({scale:e,translate:t},n){return Math.round((n-t[1])/e[1])}function w({scale:e,translate:t},n,r){return n*e[r]+t[r]}function A(e,t,n){return e?t?n?Z(e):P(e):n?O(e):G(e):null}function G(e){const t=e.coords;return{x:t[0],y:t[1]}}function x(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function P(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function E(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function O(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function v(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function Z(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function q(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function j(e,t){return e&&t?q:e?E:t?v:x}function Y(e,t,n=j(null!=t.z,null!=t.m)){return n(e,t)}function _(e,t,n){if(null==e)return null;const r=f(t,n),o=[];for(let t=0;t<e.coords.length;t+=r){const n=[];for(let o=0;o<r;o++)n.push(e.coords[t+o]);o.push(n)}return t?n?{points:o,hasZ:t,hasM:n}:{points:o,hasZ:t}:n?{points:o,hasM:n}:{points:o}}function S(e,t,n=f(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const r=e.coords;let o=0;for(const e of t.points)for(let t=0;t<n;t++)r[o++]=e[t];return e}function V(e,t,n){if(!e)return null;const r=f(t,n),{coords:o,lengths:s}=e,i=[];let l=0;for(const e of s){const t=[];for(let n=0;n<e;n++){const e=[];for(let t=0;t<r;t++)e.push(o[l++]);t.push(e)}i.push(t)}return t?n?{paths:i,hasZ:t,hasM:n}:{paths:i,hasZ:t}:n?{paths:i,hasM:n}:{paths:i}}function k(e,t,n=f(t.hasZ,t.hasM)){const{lengths:r,coords:o}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<n;e++)o[s++]=t[e];r.push(e.length)}return e}function R(e,t,n){if(!e)return null;const r=f(t,n),{coords:o,lengths:s}=e,i=[];let l=0;for(const e of s){const t=[];for(let n=0;n<e;n++){const e=[];for(let t=0;t<r;t++)e.push(o[l++]);t.push(e)}i.push(t)}return t?n?{rings:i,hasZ:t,hasM:n}:{rings:i,hasZ:t}:n?{rings:i,hasM:n}:{rings:i}}function L(e,t,n=t.hasZ,r=t.hasM){return z(e,t.rings,n,r)}function z(e,t,n,r){const o=f(n,r),{lengths:s,coords:i}=e;let l=0;fe(e);for(const e of t){for(const t of e)for(let e=0;e<o;e++)i[l++]=t[e];s.push(e.length)}return e}const C=[],D=[];function U(e,t,n,r,o){C[0]=e;const[s]=B(D,C,t,n,r,o);return de(C),de(D),s}function B(e,t,n,o,s,i){if(de(e),!n){for(const n of t){const t=i?n.attributes[i]:void 0;e.push(new c.Om(null,n.attributes,null,t))}return e}switch(n){case"esriGeometryPoint":return function(e,t,n,r,o){const s=j(n,r);for(const{geometry:n,attributes:r}of t){const t=null!=n?s(new a.A,n):null;e.push(new c.Om(t,r,null,o?r[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryMultipoint":return function(e,t,n,r,o){const s=f(n,r);for(const{geometry:n,attributes:r}of t){const t=null!=n?S(new a.A,n,s):null;e.push(new c.Om(t,r,null,o?r[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolyline":return function(e,t,n,r,o){const s=f(n,r);for(const{geometry:n,attributes:r,centroid:i}of t){const t=null!=n?k(new a.A,n,s):null,l=null!=i?Y(new a.A,i):null;e.push(new c.Om(t,r,l,o?r[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,n,r,o){for(const{geometry:s,centroid:i,attributes:l}of t){const t=null!=s?L(new a.A,s,n,r):null,u=o?l[o]:void 0;null!=i?e.push(new c.Om(t,l,x(new a.A,i),u)):e.push(new c.Om(t,l,null,u))}return e}(e,t,o,s,i);default:d().error("convertToFeatureSet:unknown-geometry",new r.A(`Unable to parse unknown geometry type '${n}'`)),de(e)}return e}function Q(e,t,n,r){D[0]=e,K(C,D,t,n,r);const o=C[0];return de(C),de(D),o}function J(e,t,n){if(null==e)return null;const o=new a.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==n&&(n=e.hasM),(0,u.fT)(e)?j(null!=t?t:null!=e.z,null!=n?n:null!=e.m)(o,e):(0,u.Bi)(e)?L(o,e,t,n):(0,u.Rg)(e)?k(o,e,f(t,n)):(0,u.U9)(e)?S(o,e,f(t,n)):void d().error("convertFromGeometry:unknown-geometry",new r.A(`Unable to parse unknown geometry type '${e}'`))}function $(e,t,n,o){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=G;return n&&o?e=Z:n?e=P:o&&(e=O),e(s)}case"esriGeometryMultipoint":return _(s,n,o);case"esriGeometryPolyline":return V(s,n,o);case"esriGeometryPolygon":return R(s,n,o);default:return d().error("convertToGeometry:unknown-geometry",new r.A(`Unable to parse unknown geometry type '${t}'`)),null}}function K(e,t,n,o,s){if(de(e),null==n)return function(e,t){for(const n of t)e.push({attributes:n.attributes});return e}(e,t);switch(n){case"esriGeometryPoint":return function(e,t,n,r){let o=G;n&&r?o=Z:n?o=P:r&&(o=O);for(const n of t){const{geometry:t,attributes:r}=n,s=null!=t?o(t):null;e.push({attributes:r,geometry:s})}return e}(e,t,o,s);case"esriGeometryMultipoint":return function(e,t,n,r){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?_(o,n,r):null});return e}(e,t,o,s);case"esriGeometryPolyline":return function(e,t,n,r){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?V(o,n,r):null});return e}(e,t,o,s);case"esriGeometryPolygon":return function(e,t,n,r){for(const{geometry:o,attributes:s,centroid:i}of t){const t=null!=o?R(o,n,r):null;if(null!=i){const n=G(i);e.push({attributes:s,centroid:n,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,o,s);default:d().error("convertToFeatureSet:unknown-geometry",new r.A(`Unable to parse unknown geometry type '${n}'`))}return e}function X(e){const{objectIdFieldName:t,spatialReference:n,transform:r,fields:o,hasM:s,hasZ:i,features:l,geometryType:u,exceededTransferLimit:c,uniqueIdField:h,queryGeometry:a,queryGeometryType:f}=e,d={features:K([],l,u,i,s),fields:o,geometryType:u,objectIdFieldName:t,spatialReference:n,uniqueIdField:h,queryGeometry:$(a,f,!1,!1)};return r&&(d.transform=r),c&&(d.exceededTransferLimit=c),s&&(d.hasM=s),i&&(d.hasZ=i),d}function H(e,t){const n=new h.A,{hasM:o,hasZ:s,features:i,objectIdFieldName:l,spatialReference:u,geometryType:c,exceededTransferLimit:a,transform:f,fields:m}=e;return m&&(n.fields=m),n.geometryType=c??null,n.objectIdFieldName=l??t??null,n.spatialReference=u??null,n.objectIdFieldName?(i&&B(n.features,i,c,s,o,n.objectIdFieldName),a&&(n.exceededTransferLimit=a),o&&(n.hasM=o),s&&(n.hasZ=s),f&&(n.transform=f),n):(d().error(new r.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),n)}function W(e){const{transform:t,features:n,hasM:r,hasZ:o}=e;if(!t)return e;for(const e of n)null!=e.geometry&&ie(e.geometry,e.geometry,r,o,t),null!=e.centroid&&ie(e.centroid,e.centroid,r,o,t);return e.transform=null,e}function ee(e,t){const{geometryType:n,features:r,hasM:o,hasZ:s}=t;if(!e)return t;for(let t=0;t<r.length;t++){const i=r[t],l=i.weakClone();l.geometry=new a.A,te(l.geometry,i.geometry,o,s,n,e),i.centroid&&(l.centroid=new a.A,te(l.centroid,i.centroid,o,s,"esriGeometryPoint",e)),r[t]=l}return t.transform=e,t}function te(e,t,n,r,o,s,i=n,l=r){if(fe(e),!t?.coords.length)return null;const u=m[o],{coords:c,lengths:h}=t,a=f(n,r),d=f(n&&i,r&&l),g=N(n,r,i,l);if(!h.length)return g(e.coords,c,0,0,b(s,c[0]),T(s,c[1])),fe(e,a,0),e;let y,I,p,F,M=0,w=0,A=w;for(const t of h){if(t<u)continue;let n=0;w=A,p=y=b(s,c[M]),F=I=T(s,c[M+1]),g(e.coords,c,w,M,p,F),n++,M+=a,w+=d;for(let r=1;r<t;r++,M+=a)p=b(s,c[M]),F=T(s,c[M+1]),p===y&&F===I||(g(e.coords,c,w,M,p-y,F-I),w+=d,n++,y=p,I=F);n>=u&&(e.lengths.push(n),A=w)}return de(e.coords,A),e.coords.length?e:null}function ne(e,t,n,r,o,s,i=n,l=r){if(fe(e),!t?.coords.length)return null;const u=m[o],{coords:c,lengths:h}=t,a=f(n,r),d=f(n&&i,r&&l),g=N(n,r,i,l);if(!h.length)return g(e.coords,c,0,0,c[0],c[1]),fe(e,a,0),e;let y=0;const I=s*s;for(const t of h){if(t<u){y+=t*a;continue}const n=e.coords.length/d,r=y,o=y+(t-1)*a;g(e.coords,c,e.coords.length,r,c[r],c[r+1]),oe(e.coords,c,a,I,g,r,o),g(e.coords,c,e.coords.length,o,c[o],c[o+1]);const s=e.coords.length/d-n;s>=u?e.lengths.push(s):de(e.coords,n*d),y+=t*a}return e.coords.length?e:null}function re(e,t,n,r){const o=e[t],s=e[t+1],i=e[n],l=e[n+1],u=e[r],c=e[r+1];let h=i,a=l,f=u-h,d=c-a;if(0!==f||0!==d){const e=((o-h)*f+(s-a)*d)/(f*f+d*d);e>1?(h=u,a=c):e>0&&(h+=f*e,a+=d*e)}return f=o-h,d=s-a,f*f+d*d}function oe(e,t,n,r,o,s,i){let l,u=r,c=0;for(let e=s+n;e<i;e+=n)l=re(t,e,s,i),l>u&&(c=e,u=l);u>r&&(c-s>n&&oe(e,t,n,r,o,s,c),o(e,t,e.length,c,t[c],t[c+1]),i-c>n&&oe(e,t,n,r,o,c,i))}function se(e,t,n,r){if(!t?.coords?.length)return null;const o=f(n,r);let s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=o){const n=e[t],r=e[t+1];s=Math.min(s,n),c=Math.max(c,n),u=Math.min(u,r),h=Math.max(h,r)}}return(0,i.is)(e)?(0,i.BI)(e,s,u,c,h):(0,l.fA)(s,u,c,h,e),e}function ie(e,t,n,r,o){const{coords:i,lengths:l}=t,u=f(n,r);if(!i.length)return e!==t&&fe(e),e;(0,s.Lw)(o);const{originPosition:c,scale:h,translate:a}=o,d=me;d.originPosition=c;const m=d.scale;m[0]=h[0]??1,m[1]=-(h[1]??1),m[2]=h[2]??1,m[3]=h[3]??1;const g=d.translate;if(g[0]=a[0]??0,g[1]=a[1]??0,g[2]=a[2]??0,g[3]=a[3]??0,!l.length){for(let t=0;t<u;++t)e.coords[t]=w(d,i[t],t);return e!==t&&fe(e,u,0),e}let y=0;for(let t=0;t<l.length;t++){const n=l[t];e.lengths[t]=n;for(let t=0;t<u;++t)e.coords[y+t]=w(d,i[y+t],t);let r=e.coords[y],o=e.coords[y+1];y+=u;for(let t=1;t<n;t++,y+=u){r+=i[y]*m[0],o+=i[y+1]*m[1],e.coords[y]=r,e.coords[y+1]=o;for(let t=2;t<u;++t)e.coords[y+t]=w(d,i[y+t],t)}}return e!==t&&fe(e,i.length,l.length),e}function le(e,t,n,r,o,s){if(fe(e),e.lengths.push(...t.lengths),n===o&&r===s)for(let n=0;n<t.coords.length;n++)e.coords.push(t.coords[n]);else{const i=f(n,r),l=N(n,r,o,s),u=t.coords;for(let t=0;t<u.length;t+=i)l(e.coords,u,e.coords.length,t,u[t],u[t+1])}return e}function ue(e,t,n,r){let o=0,s=e[r*t],i=e[r*(t+1)];for(let l=1;l<n;l++){const n=s+e[r*(t+l)],u=i+e[r*(t+l)+1],c=(n-s)*(u+i);s=n,i=u,o+=c}return.5*o}function ce(e,t){const{coords:n,lengths:r}=e;let o=0,s=0;for(let e=0;e<r.length;e++){const i=r[e];s+=ue(n,o,i,t),o+=i}return Math.abs(s)}function he(e,t,n,r){return 0==e*r-n*t&&e*n+t*r>0}function ae(e,t,n,r,o){const s=f(r,o);if(!e.lengths.length){if(e.coords.length<2)return null;const[n,r]=e.coords,o=F(t,n),s=M(t,r);return new a.A([],[o,s])}const i=new a.A([],[0,0]),l=m[n],u="esriGeometryPolygon"===n||"esriGeometryPolyline"===n;let c=0,h=0;for(let n=0;n<e.lengths.length;n++){const r=e.lengths[n],o=h;let a=F(t,e.coords[s*c]),f=M(t,e.coords[s*c+1]);i.coords[h++]=a,i.coords[h++]=f;let d=0,m=0,g=1;for(let n=1;n<r;n++){const r=F(t,e.coords[s*(n+c)]),o=M(t,e.coords[s*(n+c)+1]);if(r!==a||o!==f){const e=r-a,t=o-f;u&&he(d,m,e,t)?(i.coords[h-2]+=e,i.coords[h-1]+=t,a+=e,f+=t):(i.coords[h++]=r,i.coords[h++]=o,a=r,f=o,d=e,m=t,g+=1)}}g<l?h=o:i.lengths.push(g),c+=r}return 0===i.lengths.length?null:i}function fe(e,t=0,n=0){de(e.lengths,n),de(e.coords,t)}function de(e,t=0){e.length!==t&&(e.length=t)}const me={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);