@arcgis/core 5.2.0-next.58 → 5.2.0-next.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{2cfd2b433deecec413d3.js → 14c066c31fe37b7f6e63.js} +1 -1
  3. package/assets/esri/core/workers/chunks/20b9bc8d5cbe9a18a644.js +1 -0
  4. package/assets/esri/core/workers/chunks/{4a7d48b5c75cb710689a.js → 3abc12d2407e4214963d.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{2aeb8a4a426ec56f6133.js → 42692a4ce3fb364e321e.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{c39b6707d8284d57ff26.js → 498d29e8c8be4a12ba12.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{f9e299ac2d1c9ef78326.js → 4e2f3dd158a5228c87ba.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{ba65c976eaa458d82ab9.js → 4fb549f11e176fc2f24a.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{290fbc6d32c799841ccc.js → 507b7f4c276b60ffe9d5.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{ff7a6ea26e867e021636.js → 5527b2da4abe0faa98bb.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{358b22e4940ae9329ffa.js → 81659d121ed732bda907.js} +2 -2
  12. package/assets/esri/core/workers/chunks/{cef7f4237539574f0730.js → 8210fc9e072209e26fa9.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{9de1125b708c4a591edf.js → d205edd949f3e6e24eb9.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{912e9743d006ccc723bf.js → d6aad815fc0ee8e24bb5.js} +1 -1
  15. package/chunks/languageUtils.js +1 -1
  16. package/config.js +1 -1
  17. package/kernel.js +1 -1
  18. package/package.json +4 -4
  19. package/support/revision.js +1 -1
  20. package/assets/esri/core/workers/chunks/a1fcef22b6151a7f7917.js +0 -1
  21. /package/assets/esri/core/workers/chunks/{358b22e4940ae9329ffa.js.LICENSE.txt → 81659d121ed732bda907.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8825],{78825(t,e,n){n.d(e,{nZ:()=>de,D7:()=>he,zg:()=>Ge});const r=4294967295,s=134695760,a=s,i=33639248,o=101075792,c=117853008,l=(new Date(2107,11,31),new Date(1980,0,1),1/0),u="undefined",f="function",d=new Uint8Array;let h=2;try{typeof navigator!=u&&navigator.hardwareConcurrency&&(h=navigator.hardwareConcurrency)}catch{}const w={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:h,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=u&&CompressionStream,DecompressionStream:typeof DecompressionStream!=u&&DecompressionStream},p=["baseURI","wasmURI","workerURI","chunkSize","maxWorkers","terminateWorkerTimeout","workerStarvationTimeout","useCompressionStream","useWebWorkers","CompressionStream","DecompressionStream","CompressionStreamZlib","DecompressionStreamZlib"],g=Object.assign({},w);function m(t){return Math.max(t.chunkSize,64)}function y(t){for(const e of p){const n=t[e];void 0!==n&&(g[e]=n)}}const b=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;b[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=b[e-1][t];b[e][t]=n>>>8^b[0][255&n]}const[z,S,k,U,v,x,M,O]=b;class F{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const s=new DataView(t.buffer,t.byteOffset,n),a=n-8;for(;r<=a;r+=8){const t=e^s.getInt32(r,!0),n=s.getInt32(r+4,!0);e=O[255&t]^M[t>>>8&255]^x[t>>>16&255]^v[t>>>24&255]^U[255&n]^k[n>>>8&255]^S[n>>>16&255]^z[n>>>24&255]}}for(;r<n;r++)e=e>>>8^z[255&(e^t[r])];this.crc=e}get(){return~this.crc}}class j extends TransformStream{constructor(){let t;const e=new F;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}const W={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=W.getPartial(n);return 32===r?t.concat(e):W._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+W.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=W.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let s=0;s<t.length;s++)r.push(n|t[s]>>>e),n=t[s]<<32-e;const s=t.length?t[t.length-1]:0,a=W.getPartial(s);return r.push(W.partial(e+a&31,e+a>32?n:r.pop(),1)),r}},D={bytes:{fromBits(t){const e=W.bitLength(t)/8,n=new Uint8Array(e);let r;for(let s=0;s<e;s++)3&s||(r=t[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3&~n||(e.push(r),r=0);return 3&n&&e.push(W.partial(8*(3&n),r)),e}}},q=class{constructor(t){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],t?(e._h=t._h.slice(0),e._buffer=t._buffer.slice(0),e._length=t._length):e.reset()}reset(){const t=this;return t._h=t._init.slice(0),t._buffer=[],t._length=0,t}update(t){const e=this;"string"==typeof t&&(t=D.utf8String.toBits(t));const n=e._buffer=W.concat(e._buffer,t),r=e._length,s=e._length=r+W.bitLength(t);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(n);let i=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);t<=s;t+=e.blockSize)e._block(a.subarray(16*i,16*(i+1))),i+=1;return n.splice(0,16*i),e}finalize(){const t=this;let e=t._buffer;const n=t._h;e=W.concat(e,[W.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),n}_f(t,e,n,r){return t<=19?e&n|~e&r:t<=39?e^n^r:t<=59?e&n|e&r|n&r:t<=79?e^n^r:void 0}_S(t,e){return e<<t|e>>>32-t}_block(t){const e=this,n=e._h,r=Array(80);for(let e=0;e<16;e++)r[e]=t[e];let s=n[0],a=n[1],i=n[2],o=n[3],c=n[4];for(let t=0;t<=79;t++){t>=16&&(r[t]=e._S(1,r[t-3]^r[t-8]^r[t-14]^r[t-16]));const n=e._S(5,s)+e._f(t,a,i,o)+c+r[t]+e._key[Math.floor(t/20)]|0;c=o,o=i,i=e._S(30,a),a=s,s=n}n[0]=n[0]+s|0,n[1]=n[1]+a|0,n[2]=n[2]+i|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}},L=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],s=t.length;let a,i,o,c=1;if(4!==s&&6!==s&&8!==s)throw new Error("invalid aes key size");for(e._key=[i=t.slice(0),o=[]],a=s;a<4*s+28;a++){let t=i[a-1];(a%s===0||8===s&&a%s===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%s===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-s]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];o[t]=a<=4||t<4?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],s=[],a=[];let i,o,c,l;for(let t=0;t<256;t++)a[(s[t]=t<<1^283*(t>>7))^t]=t;for(let u=i=0;!n[u];u^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[u]=a,r[a]=u,l=s[c=s[o=s[u]]];let f=16843009*l^65537*c^257*o^16843008*u,d=257*s[a]^16843008*a;for(let n=0;n<4;n++)t[n][u]=d=d<<24^d>>>8,e[n][a]=f=f<<24^f>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],r=n.length/4-2,s=[0,0,0,0],a=this._tables[e],i=a[0],o=a[1],c=a[2],l=a[3],u=a[4];let f,d,h,w=t[0]^n[0],p=t[e?3:1]^n[1],g=t[2]^n[2],m=t[e?1:3]^n[3],y=4;for(let t=0;t<r;t++)f=i[w>>>24]^o[p>>16&255]^c[g>>8&255]^l[255&m]^n[y],d=i[p>>>24]^o[g>>16&255]^c[m>>8&255]^l[255&w]^n[y+1],h=i[g>>>24]^o[m>>16&255]^c[w>>8&255]^l[255&p]^n[y+2],m=i[m>>>24]^o[w>>16&255]^c[p>>8&255]^l[255&g]^n[y+3],y+=4,w=f,p=d,g=h;for(let t=0;t<4;t++)s[e?3&-t:t]=u[w>>>24]<<24^u[p>>16&255]<<16^u[g>>8&255]<<8^u[255&m]^n[y++],f=w,w=p,p=g,g=m,m=f;return s}},V=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const s=W.bitLength(e);for(let s=0;s<r;s+=4){this.incCounter(n);const r=t.encrypt(n);e[s]^=r[0],e[s+1]^=r[1],e[s+2]^=r[2],e[s+3]^=r[3]}return W.clamp(e,s)}},E={importKey:t=>new E.hmacSha1(D.bytes.toBits(t)),pbkdf2(t,e,n,r){if(n=n||1e4,r<0||n<0)throw new Error("invalid params to pbkdf2");const s=1+(r>>5)<<2;let a,i,o,c,l;const u=new ArrayBuffer(s),f=new DataView(u);let d=0;const h=W;for(e=D.bytes.toBits(e),l=1;d<(s||1);l++){for(a=i=t.encrypt(h.concat(e,[l])),o=1;o<n;o++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(o=0;d<(s||1)&&o<a.length;o++)f.setInt32(d,a[o]),d+=4}return u.slice(0,r/8)},hmacSha1:class{constructor(t){const e=this,n=e._hash=q,r=[[],[]];e._baseHash=[new n,new n];const s=e._baseHash[0].blockSize/32;t.length>s&&(t=(new n).update(t).finalize());for(let e=0;e<s;e++)r[0][e]=909522486^t[e],r[1][e]=1549556828^t[e];e._baseHash[0].update(r[0]),e._baseHash[1].update(r[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},R=typeof crypto!=u&&typeof crypto.getRandomValues==f,I="Invalid password",T="Invalid signature",N="zipjs-abort-check-password";function Z(t){if(R)return crypto.getRandomValues(t);throw new Error("Crypto API not supported")}const C=16,P={name:"PBKDF2"},A=Object.assign({hash:{name:"HMAC"}},P),B=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},P),X=["deriveBits"],H=[8,12,16],G=[16,24,32],Y=10,K=[0,0,0,0],Q=typeof crypto!=u,J=Q&&crypto.subtle,_=Q&&typeof J!=u,$=D.bytes,tt=L,et=V,nt=E.hmacSha1;let rt=Q&&_&&typeof J.importKey==f,st=Q&&_&&typeof J.deriveBits==f;class at extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r}){super({start(){ot(this,t,e,n)},async transform(t,e){const n=this,{password:s,strength:a,resolveReady:i,ready:o}=n;s?(await async function(t,e,n,r){const s=await lt(t,e,n,dt(r,0,H[e])),a=dt(r,H[e]);if(s[0]!=a[0]||s[1]!=a[1])throw new Error(I)}(n,a,s,dt(t,0,H[a]+2)),t=dt(t,H[a]+2),r?e.error(new Error(N)):i()):await o;const c=new Uint8Array(t.length-Y-(t.length-Y)%C);e.enqueue(ct(n,t,c,0,Y,!0))},async flush(t){const{ctr:e,hmac:n,pending:r,ready:s}=this;if(n&&e){await s;const a=dt(r,0,r.length-Y),i=dt(r,r.length-Y);let o=d;if(a.length){const t=wt($,a);n.update(t);const r=e.update(t);o=ht($,r)}const c=dt(ht($,n.digest()),0,Y);let l=r.length<Y?1:0;for(let t=0;t<Y;t++)l|=c[t]^i[t];if(l)throw new Error(T);t.enqueue(o)}}})}}class it extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:n}){let r;super({start(){ot(this,t,e,n)},async transform(t,e){const n=this,{password:r,strength:s,resolveReady:a,ready:i}=n;let o=d;r?(o=await async function(t,e,n){const r=Z(new Uint8Array(H[e]));return ft(r,await lt(t,e,n,r))}(n,s,r),a()):await i;const c=new Uint8Array(o.length+t.length-t.length%C);c.set(o,0),e.enqueue(ct(n,t,c,o.length,0))},async flush(t){const{ctr:e,hmac:n,pending:s,ready:a}=this;if(n&&e){await a;let i=d;if(s.length){const t=e.update(wt($,s));n.update(t),i=ht($,t)}r.signature=ht($,n.digest()).slice(0,Y),t.enqueue(ft(i,r.signature))}}}),r=this}}function ot(t,e,n,r){Object.assign(t,{ready:new Promise(e=>t.resolveReady=e),password:ut(e,n),strength:r-1,pending:d})}function ct(t,e,n,r,s,a){const{ctr:i,hmac:o,pending:c}=t;c.length&&(e=ft(c,e));const l=e.length-s;let u;for(n=function(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}(n,r+(l-l%C)),u=0;u<=l-C;u+=C){const t=wt($,dt(e,u,u+C));a&&o.update(t);const s=i.update(t);a||o.update(s),n.set(ht($,s),u+r)}return t.pending=dt(e,u),n}async function lt(t,e,n,r){t.password=null;const s=await async function(t,e,n,r,s){if(!rt)return E.importKey(e);try{return await J.importKey("raw",e,n,!1,s)}catch{return rt=!1,E.importKey(e)}}(0,n,A,0,X),a=await async function(t,e,n){if(!st)return E.pbkdf2(e,t.salt,B.iterations,n);try{return await J.deriveBits(t,e,n)}catch{return st=!1,E.pbkdf2(e,t.salt,B.iterations,n)}}(Object.assign({salt:r},B),s,8*(2*G[e]+2)),i=new Uint8Array(a),o=wt($,dt(i,0,G[e])),c=wt($,dt(i,G[e],2*G[e])),l=dt(i,2*G[e]);return Object.assign(t,{keys:{key:o,authentication:c,passwordVerification:l},ctr:new et(new tt(o),Array.from(K)),hmac:new nt(c)}),l}function ut(t,e){return void 0===e?function(t){if(typeof TextEncoder==u){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new TextEncoder).encode(t)}(t):e}function ft(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function dt(t,e,n){return t.subarray(e,n)}function ht(t,e){return t.fromBits(e)}function wt(t,e){return t.toBits(e)}class pt extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){mt(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=yt(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e.at(-1)^n.passwordVerification))throw new Error(I);t=t.subarray(12)}r?e.error(new Error(N)):e.enqueue(yt(n,t))}})}}class gt extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){mt(this,t,e,n)},transform(t,e){const n=this;let r,s;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=Z(new Uint8Array(12));e[11]=n.passwordVerification,r=new Uint8Array(t.length+e.length),r.set(bt(n,e),0),s=12}else r=new Uint8Array(t.length),s=0;r.set(bt(n,t),s),e.enqueue(r)}})}}function mt(t,e,n,r){Object.assign(t,{password:e,rawPassword:n,passwordVerification:r}),function(t,e,n){const r=[305419896,591751049,878082192];if(Object.assign(t,{keys:r,crcKey0:new F(r[0]),crcKey2:new F(r[2])}),n)for(let e=0;e<n.length;e++)zt(t,n[e]);else for(let n=0;n<e.length;n++)zt(t,e.charCodeAt(n))}(t,e,n)}function yt(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=St(t)^e[r],zt(t,n[r]);return n}function bt(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=St(t)^e[r],zt(t,e[r]);return n}function zt(t,e){let[,n]=t.keys;t.crcKey0.append([e]);const r=~t.crcKey0.get();n=Ut(Math.imul(Ut(n+kt(r)),134775813)+1),t.crcKey2.append([n>>>24]);const s=~t.crcKey2.get();t.keys=[r,n,s]}function St(t){const e=2|t.keys[2];return kt(Math.imul(e,1^e)>>>8)}function kt(t){return 255&t}function Ut(t){return 4294967295&t}const vt="Invalid uncompressed size";class xt extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamZlib:n,CompressionStream:r}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:c,level:l,deflate64:u}=t,f=this;let d,h,w,p=super.readable;const g=c&&s&&!u&&(!a||o)&&Boolean(i&&r);a&&!o||!c||g||(d=new j,p=Wt(p,d)),s&&(g?(w=new Mt,p=Dt(p,new r("gzip")),p=Wt(p,w)):p=jt(p,i,{level:l,chunkSize:e},r,n,r)),a&&(o?p=Wt(p,new gt(t)):(h=new it(t),p=Wt(p,h))),Ft(f,p,()=>{let t;a&&!o&&(t=h.signature),a&&!o||!c||(t=g?w.signature:new DataView(d.value.buffer).getUint32(0)),f.signature=t})}}class Mt extends TransformStream{constructor(){let t,e=10,n=new Uint8Array(0);super({transform(t,r){if(e){const n=Math.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const s=n.length+t.length;if(s<=8){const e=new Uint8Array(s);return e.set(n),e.set(t,n.length),void(n=e)}const a=s-8,i=new Uint8Array(a),o=Math.min(a,n.length);i.set(n.subarray(0,o),0),a>o&&i.set(t.subarray(0,a-o),o),r.enqueue(i);const c=new Uint8Array(8),l=n.length-o;l&&c.set(n.subarray(o),0),c.set(t.subarray(a-o),l),n=c},flush(){const e=new DataView(n.buffer,n.byteOffset,n.byteLength);t.signature=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Ot extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamZlib:n,DecompressionStream:r}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:c,useCompressionStream:l,deflate64:u}=t;let f,d,h=super.readable;a&&(s?h=Wt(h,new pt(t)):(d=new at(t),h=Wt(h,d))),c&&(h=jt(h,l,{chunkSize:e,deflate64:u},r,n,r),h=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error("Invalid compressed data");throw e.cause=t,e}const{value:r,done:s}=n;s?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}(h)),a&&!s||!i||(f=new j,h=Wt(h,f)),Ft(this,h,()=>{if((!a||s)&&i){const t=new DataView(f.value.buffer);if(o!=t.getUint32(0,!1))throw new Error(T)}})}}function Ft(t,e,n){e=Wt(e,new TransformStream({flush:n})),Object.defineProperty(t,"readable",{get:()=>e})}function jt(t,e,n,r,s,a){const i=e&&r?r:s||a,o=n.deflate64?"deflate64-raw":"deflate-raw";let c;try{c=new i(o,n)}catch(t){if(!e)throw t;if(s)c=new s(o,n);else{if(!a)throw t;c=new a(o,n)}}return Dt(t,c)}function Wt(t,e){return t.pipeThrough(e)}function Dt(t,e){const n=e.writable.getWriter(),r=t.getReader();return async function(){try{for(;;){await n.ready;const t=await r.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(n,t),await async function(t,e){try{await t.cancel(e)}catch{}}(r,t)}}(),e.readable}const qt="deflate",Lt="inflate";class Vt extends TransformStream{constructor(t,e){super({});const n=this,{codecType:r}=t;let s;r.startsWith(qt)?s=xt:r.startsWith(Lt)&&(s=Ot),n.outputSize=0;let a=0;const i=new s(t,e),o=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(n,{inputSize:a})}}),l=new TransformStream({transform(e,r){if(e&&e.length&&(r.enqueue(e),n.outputSize+=e.length,void 0!==t.outputSize&&n.outputSize>t.outputSize))throw new Error(vt)},flush(){const{signature:t}=i;Object.assign(n,{signature:t,inputSize:a})}});Object.defineProperty(n,"readable",{get:()=>o.pipeThrough(c).pipeThrough(i).pipeThrough(l)})}}class Et extends TransformStream{constructor(t){let e;t>=1||(t=65536),super({transform:function(n,r){if(e){const t=new Uint8Array(e.length+n.length);t.set(e),t.set(n,e.length),n=t,e=null}let s=0;for(;n.length-s>t;)r.enqueue(n.slice(s,s+t)),s+=t;e=s?n.slice(s):n},flush(t){e&&e.length&&t.enqueue(e)}})}}const Rt={type:"module"},It="error";let Tt,Nt,Zt,Ct,Pt=!0;try{Pt=typeof structuredClone==f&&void 0!==structuredClone(new DOMException("","AbortError")).code}catch{}let At=()=>{};class Bt{constructor(t,{readable:e,writable:n},{options:r,config:s,streamOptions:a,useWebWorkers:i,transferStreams:o,workerURI:c},l){const{signal:f}=a;return Object.assign(t,{busy:!0,generation:(t.generation||0)+1,readable:e.pipeThrough(new Et(m(s))).pipeThrough(new Xt(a),{signal:f}),writable:n,options:Object.assign({},r),workerURI:c,transferStreams:o,terminate:()=>new Promise(e=>{const{worker:n,busy:r}=t;n?(r?t.resolveTerminated=e:(n.terminate(),e()),t.interface=null):e()}),onTaskFinished(){if(t.busy){const{resolveTerminated:e}=t;e&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),e()),t.busy=!1,l(t)}}}),void 0===Tt&&(Tt=typeof Worker!=u),(i&&Tt?Yt:Gt)(t,s)}}class Xt extends TransformStream{constructor({onstart:t,onprogress:e,size:n,onend:r}){let s=0;super({async start(){t&&await Ht(t,n)},async transform(t,r){s+=t.length,e&&await Ht(e,s,n),r.enqueue(t)},async flush(){r&&await Ht(r,s)}})}}async function Ht(t,...e){try{await t(...e)}catch{}}function Gt(t,e){return{run:()=>async function({options:t,readable:e,writable:n,onTaskFinished:r},s){let a;try{if(!t.useCompressionStream)try{await At(s)}catch{const e=t.codecType.startsWith(qt)?s.CompressionStreamZlib:s.DecompressionStreamZlib;e&&!e.requiresModule||(t.useCompressionStream=!0)}a=new Vt(t,s),await e.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:r,inputSize:i,outputSize:o}=a;return{signature:r,inputSize:i,outputSize:o}}catch(t){throw a&&(t.outputSize=a.outputSize),t}finally{r()}}(t,e)}}function Yt(t,e){const{baseURI:n,chunkSize:r}=e;let{wasmURI:s}=e;if(!t.interface){let a;typeof s==f&&(s=s());try{a=Qt(t.workerURI,n,t)}catch{return Tt=!1,Gt(t,e)}Object.assign(t,{worker:a,terminated:!1,interface:{run:()=>async function(t,e){let n,r;const s=new Promise((t,e)=>{n=t,r=e});Object.assign(t,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:s});const{readable:a,options:i}=t,{writable:o,closed:c,abortPipe:l}=function(t){const e=new AbortController,{writable:n,readable:r}=new TransformStream,s=r.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return s.catch(()=>{}),{writable:n,closed:s,abortPipe:()=>e.abort()}}(t.writable);let u;try{u=_t({type:"start",options:i,config:e,readable:a,writable:o},t)}catch(e){l();try{await c}catch{}throw t.onTaskFinished(),e}u||Object.assign(t,{reader:a.getReader(),writer:o.getWriter()});try{const t=await s;return await f(),await c,t}catch(t){await f(),l();try{await c}catch{}throw t}async function f(){if(!u&&!o.locked)try{await o.getWriter().close()}catch{}}}(t,{chunkSize:r,wasmURI:s,baseURI:n})}})}return t.interface}function Kt(t){const{worker:e}=t;if(e)try{e.terminate()}catch{}t.interface=null}function Qt(t,e,n,r,s=!0){let a,i,o;if(void 0===Zt||Nt!==t){const c=typeof t==f;i=c?t(s):t;const l=i.startsWith("data:"),u=i.startsWith("blob:");if(l||u){void 0===r&&(r=!1),r&&(o=Rt);try{a=new Worker(i,o)}catch(s){if(u)try{URL.revokeObjectURL(i)}catch{}if(c&&u)return Qt(t,e,n,r,!1);if(r)throw s;return Qt(t,e,n,!0,!1)}}else{void 0===r&&(r=!0),r&&(o=Rt);try{i=new URL(i,e)}catch{}try{a=new Worker(i,o)}catch(a){if(r)throw a;return Qt(t,e,n,!1,s)}}Nt=t,Zt=i,Ct=o}else a=new Worker(Zt,Ct);return a.addEventListener("message",t=>async function({data:t},e){const{type:n,value:r,messageId:s,result:a,error:i}=t,{reader:o,writer:c,resolveResult:l,rejectResult:u,onTaskFinished:f,generation:d}=e,h=()=>e.generation!=d;try{if(i){const{message:t,stack:e,code:n,name:r,outputSize:s}=i,a=new Error(t);Object.assign(a,{stack:e,code:n,name:r,outputSize:s}),w(a)}else{if("pull"==n){const{value:t,done:n}=await o.read();h()||_t({type:"data",value:t,done:n,messageId:s},e)}"data"==n&&(await c.ready,await c.write(new Uint8Array(r)),h()||_t({type:"ack",messageId:s},e)),"close"==n&&w(null,a)}}catch(i){h()||(Kt(e),w(i))}function w(t,e){h()||(t?u(t):l(e),c&&c.releaseLock(),f())}}(t,n)),a.addEventListener(It,t=>Jt(t,n)),a.addEventListener("messageerror",t=>Jt(t,n)),a}function Jt(t,e){t.preventDefault&&t.preventDefault();const{rejectResult:n,writer:r,onTaskFinished:s}=e;Kt(e),n&&(n(t.error||new Error(t.message||It)),r&&r.releaseLock(),s())}function _t(t,{worker:e,writer:n,transferStreams:r}){try{const{value:n,readable:s,writable:a}=t,i=[];if(n&&(t.value=n.byteOffset||n.byteLength!=n.buffer.byteLength?new Uint8Array(n):n,i.push(t.value.buffer)),r&&Pt?(s&&i.push(s),a&&i.push(a)):t.readable=t.writable=null,i.length)try{return e.postMessage(t,i),!0}catch{Pt=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}let $t=[];const te=[];let ee,ne,re=0;function se(){!ee&&te.length&&Number.isFinite(ne)&&ne>=0&&(ee=setTimeout(ie,ne))}function ae(){ee&&(clearTimeout(ee),ee=null)}function ie(){if(ee=null,te.length){const[{resolve:t,stream:e,workerOptions:n}]=te.splice(0,1),r=Object.assign({},n,{useWebWorkers:!1,workerURI:void 0});t(new Bt({},e,r,oe)),se()}}function oe(){ae(),se()}function ce(t){const{terminateTimeout:e}=t;e&&(clearTimeout(e),t.terminateTimeout=null)}const le="writable";class ue{constructor(){this.size=0}init(){this.initialized=!0}}class fe extends ue{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,diskNumberStart:n,chunkSize:r=65536}={}){const s=this;let a=0;return new ReadableStream({async pull(i){const o=void 0===e?r:Math.min(r,e-a),c=await be(s,t+a,o,n);i.enqueue(c),a+r>e||void 0===e&&!c.length&&o?i.close():a+=r}})}}class de extends fe{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const n=this,r=t+e,s=t||r<n.size?n.blob.slice(t,r):n.blob;let a=await s.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,r)),new Uint8Array(a)}}class he extends ue{constructor(t){super();const e=this,n=new TransformStream,r=[];t&&r.push(["Content-Type",t]),Object.defineProperty(e,le,{get:()=>n.writable}),e.blob=new Response(n.readable,{headers:r}).blob(),e.blob.catch(()=>{})}getData(){return this.blob}}class we extends fe{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(n,r)=>{await ye(n),r!=e.length-1&&(t.lastDiskOffset+=n.size),t.size+=n.size})),super.init()}async readUint8Array(t,e,n=0){const r=this,{readers:s}=this;let a,i=n;-1==i&&(i=s.length-1);let o=t;for(;s[i]&&o>=s[i].size;)o-=s[i].size,i++;const c=s[i];if(c){const s=c.size;if(o+e<=s)a=await be(c,o,e);else{const i=s-o;a=new Uint8Array(e);const l=await be(c,o,i);a.set(l,0);const u=await r.readUint8Array(t+i,e-i,n);a.set(u,i),l.length+u.length<e&&(a=a.subarray(0,l.length+u.length))}}else a=d;return r.lastDiskNumber=Math.max(i,r.lastDiskNumber),a}}class pe extends ue{constructor(t,e=4294967295){super();const n=this;let r,s,a;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){const{availableSize:i}=n;if(a)e.length>=i?(await o(e.subarray(0,i)),await c(),n.diskOffset+=r.size,n.diskNumber++,a=null,n.availableSize=n.maxSize,e.length>i&&await this.write(e.subarray(i))):await o(e);else{const{value:i,done:o}=await t.next();if(o&&!i)throw new Error("Writer iterator completed too soon");r=i,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await ye(r),s=i.writable,a=s.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await c())},async abort(t){a&&await a.abort(t)}});async function o(t){const e=t.length;e&&(await a.ready,await a.write(t),r.size+=e,n.availableSize-=e)}async function c(){await a.close()}Object.defineProperty(n,le,{get:()=>i})}}class ge{constructor(t){return Array.isArray(t)&&(t=new we(t)),t instanceof ReadableStream&&(t={readable:t}),t}}class me{constructor(t){return void 0===t.writable&&typeof t.next==f&&(t=new pe(t)),t instanceof WritableStream&&(t={writable:t}),void 0===t.size&&(t.size=0),t instanceof pe||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:l,maxSize:l}),t}}async function ye(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}function be(t,e,n,r){return t.readUint8Array(e,n,r)}const ze="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Se=256==ze.length;function ke(t,e){return e&&"cp437"==e.trim().toLowerCase()?function(t){if(Se){let e="";for(let n=0;n<t.length;n++)e+=ze[t[n]];return e}return(new TextDecoder).decode(t)}(t):new TextDecoder(e,{ignoreBOM:!0}).decode(t)}const Ue="filename",ve="rawFilename",xe="comment",Me="rawComment",Oe="uncompressedSize",Fe="compressedSize",je="diskNumberStart",We="lastModDate",De="rawLastModDate",qe="lastAccessDate",Le="creationDate",Ve="rawCreationDate",Ee=[Ue,ve,Oe,Fe,We,De,xe,Me,qe,Le,Ve,"offset",je,"internalFileAttributes","externalFileAttributes","msdosAttributesRaw","msdosAttributes","msDosCompatible","zip64","encrypted","version","versionMadeBy","zipCrypto","directory","executable","compressionMethod","signature","extraField","extraFieldUnix","extraFieldInfoZip","uid","gid","unixMode","setuid","setgid","sticky","bitFlag","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Re{constructor(t){Ee.forEach(e=>this[e]=t[e])}}const Ie="checkAmbiguity",Te="strictness",Ne="tolerant",Ze="File format is not recognized",Ce="Compression method not supported",Pe="Split zip file",Ae="utf-8",Be="cp437",Xe=[[Oe,r],[Fe,r],["offset",r],[je,65535]],He={65535:{getValue:dn,bytes:4},[r]:{getValue:hn,bytes:8}};class Ge{constructor(t,e={}){Object.assign(this,{reader:new ge(t),options:e,config:g,readRanges:new Map})}async*getEntriesGenerator(t={}){const e=this;let{reader:n}=e;const{config:a}=e;if(await ye(n),void 0!==n.size&&n.readUint8Array||(n=new de(await new Response(n.readable).blob()),await ye(n)),n.size<22)throw new Error(Ze);const l=tn(on(e,t,Te),on(e,t,Ie)),u="strict"==l,f=l!=Ne,h=function(t,e){return void 0!==t?t:"strict"==e?0:e==Ne?1/0:65535}(on(e,t,"maxAppendedDataSize"),l),{endOfDirectoryInfo:w,endOfDirectoryReachingEndCount:p}=await async function(t,e,n){const{size:r}=t,s=Math.min(r,65557),a={count:64};let i,o,c=0;for await(const[n,l,u,f,d]of en(t,s))if(d+22+fn(n,f+20)==r){const s=await rn(t,n,l,f,d,r,a);if(2==s){if(i||(i=nn(u,f,d)),c++,!e||c>1)break}else 1!=s||o||(o=nn(u,f,d))}return i||(i=o),i||(i=await async function(t,e,n){const{size:r}=t,s=Math.min(r,e==1/0?r:65557+e);let a,i;for await(const[e,o,c,l,u]of en(t,s)){const s=nn(c,l,u);a||(a=s);const f=await rn(t,e,o,l,u,r,n);if(2==f)return s;1!=f||i||(i=s)}return i||a}(t,n,a)),{endOfDirectoryInfo:i,endOfDirectoryReachingEndCount:c}}(n,f,h);if(!w)throw dn(wn(await be(n,0,4)))==s?new Error(Pe):new Error("End of central directory not found");f&&p>1&&an("multiple end of central directory records");const g=wn(w);let m=dn(g,12),y=dn(g,16);const b=w.offset,z=fn(g,20),S=b+22+z;n.size-S>h&&an("appended data");let k=fn(g,4);const U=n.lastDiskNumber||0;let v,x,M=fn(g,6),O=fn(g,10),F=0;if(y==r||m==r||65535==O||65535==M){const t=w.offset>=20?await be(n,w.offset-20,20):d,e=wn(t);if(20==t.length&&dn(e,0)==c){y=hn(e,8);let t=await be(n,y,56,-1),s=wn(t);const a=w.offset-20-56-(n.lastDiskOffset||0);if((t.length<56||dn(s,0)!=o)&&y!=a&&a>=0){const e=y;y=a,y>e&&(F=y-e),t=await be(n,y,56,-1),s=wn(t)}if(t.length<56||dn(s,0)!=o)throw new Error("End of Zip64 central directory locator not found");x=!0,65535==k?k=dn(s,16):u&&k!=dn(s,16)&&an("mismatched zip64 end of central directory record"),65535==M?M=dn(s,20):u&&M!=dn(s,20)&&an("mismatched zip64 end of central directory record"),65535==O?O=hn(s,32):u&&O!=hn(s,32)&&an("mismatched zip64 end of central directory record"),m==r?m=hn(s,40):u&&m!=hn(s,40)&&an("mismatched zip64 end of central directory record"),y=hn(s,48)+F}}const j=m,W=w.offset-(x?76:0);if(y>=n.size&&(F=n.size-y-m-22,y=n.size-m-22),U!=k)throw new Error(Pe);if(y<0)throw new Error(Ze);let D=0,q=await be(n,y,m,M),L=wn(q);if(m){if(q.length<4)throw new Error(Ze);const t=W-m-(n.lastDiskOffset||0);if(y!=t&&M==k){let e=!(dn(L,D)==i);if(!e&&t>=0&&t+4<=n.size&&(e=dn(wn(await be(n,t,4,M)),0)==i),e){const e=y;y=t,y>e&&(F+=y-e),q=await be(n,y,m,M),L=wn(q)}}}const V=W-y-(n.lastDiskOffset||0);if(m!=V&&V>=0&&M==k&&(m=V,q=await be(n,y,m,M),L=wn(q)),y<0||y>=n.size)throw new Error(Ze);v=y;const E=on(e,t,"filenameEncoding"),R=on(e,t,"commentEncoding"),I=u?new Set:void 0;let T;for(let r=0;r<O;r++){const s=new Ye(n,a,e.options);if(D+46>q.length||dn(L,D)!=i)throw new Error("Central directory header not found");Ke(s,L,D+6);const o=Boolean(s.bitFlag.languageEncodingFlag),c=D+46,l=c+s.filenameLength,f=l+s.extraFieldLength,d=fn(L,D+4),h=!(d>>8),w=d>>8==3,p=q.subarray(c,l),g=fn(L,D+32),m=f+g,y=q.subarray(f,m),b=o,z=o,S=dn(L,D+38),k=255&S,U={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},x=dn(L,D+42),M=on(e,t,"decodeText")||ke,j=b?Ae:E||Be,W=z?Ae:R||Be;let V=M(p,j);void 0===V&&(V=ke(p,j));let N=M(y,W);void 0===N&&(N=ke(y,W)),Object.assign(s,{index:r,versionMadeBy:d,msDosCompatible:h,compressedSize:0,uncompressedSize:0,commentLength:g,offset:x,diskNumberStart:fn(L,D+34),internalFileAttributes:fn(L,D+36),externalFileAttributes:S,msdosAttributesRaw:k,msdosAttributes:U,rawFilename:p,filenameUTF8:b,commentUTF8:z,rawExtraField:q.subarray(l,f),rawComment:y,filename:V,comment:N}),Qe(s,s,L,D+6),s.offset+=F,v=Math.min(s.offset,v),u&&(I.has(s.filename)&&(T=!0),I.add(s.filename));const Z=s.externalFileAttributes>>16&65535;void 0===s.unixMode&&16877&Z&&(s.unixMode=Z);const C=Boolean(2048&s.unixMode),P=Boolean(1024&s.unixMode),A=Boolean(512&s.unixMode),B=void 0!==s.unixMode?!!(73&s.unixMode):w&&!!(73&Z),X=void 0!==s.unixMode&&16384==(61440&s.unixMode),H=16384==(61440&Z);Object.assign(s,{setuid:C,setgid:P,sticky:A,unixExternalUpper:Z,internalFileAttribute:s.internalFileAttributes,externalFileAttribute:s.externalFileAttributes,executable:B,directory:X||H||h&&U.directory||s.filename.endsWith("/")&&!s.uncompressedSize,zipCrypto:s.encrypted&&!s.extraFieldAES});const G=new Re(s);G.getData=(t,n)=>s.getData(t,G,e.readRanges,n),G.arrayBuffer=async t=>{const n=new TransformStream,[r]=await Promise.all([new Response(n.readable).arrayBuffer(),s.getData(n,G,e.readRanges,t)]);return r},D=m;const{onprogress:Y}=t;if(Y)try{await Y(r+1,O,new Re(s))}catch{}yield G}u&&D!=j&&an("trailing central directory data"),T&&an("duplicate filename"),u&&(F||O&&v>0)&&an("prepended data");const N=on(e,t,"extractPrependedData"),Z=on(e,t,"extractAppendedData");return N&&(e.prependedData=v>0?await be(n,0,v):d),e.comment=z?await be(n,b+22,z):d,Z&&(e.appendedData=S<n.size?await be(n,S,n.size-S):d),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){}}class Ye{constructor(t,e,n){Object.assign(this,{reader:t,config:e,options:n})}async getData(t,e,n,r={}){const s=this,{reader:i,index:o,offset:c,diskNumberStart:l,extraFieldAES:u,extraFieldZip64:f,compressionMethod:h,config:w,bitFlag:p,signature:g,rawLastModDate:y,uncompressedSize:b,compressedSize:z}=s,{dataDescriptor:S}=p,k=e.localDirectory={},U=await be(i,c,30,l),v=wn(U);let x=on(s,r,"password"),M=on(s,r,"rawPassword");const O=on(s,r,"passThrough");if(x=x&&x.length&&x,M=M&&M.length&&M,u&&99!=u.originalCompressionMethod)throw new Error(Ce);if(0!=h&&8!=h&&9!=h&&!O)throw new Error(Ce);if(U.length<30||67324752!=dn(v,0))throw new Error("Local file header not found");Ke(k,v,4);const{extraFieldLength:F,filenameLength:j}=k,W="strict"==tn(on(s,r,Te),on(s,r,Ie));let D=d;if(W&&(j||F)){const t=await be(i,c+30,j+F,l);D=t.subarray(0,j),k.rawExtraField=t.subarray(j)}else k.rawExtraField=F?await be(i,c+30+j,F,l):d;Qe(s,k,v,4,!0),W&&function(t,e,n){const{rawFilename:r}=t;(n.length!=r.length||n.some((t,e)=>t!=r[e]))&&an("mismatched local file header (filename)"),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&an("mismatched local file header (general purpose bit flag)"),e.compressionMethod!=t.compressionMethod&&an("mismatched local file header (compression method)"),e.bitFlag.dataDescriptor||!(e.signature||e.compressedSize||e.uncompressedSize)||e.signature==t.signature&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||an("mismatched local file header (signature or sizes)")}(s,k,D);const{lastAccessDate:q,creationDate:L}=k;q&&(e.lastAccessDate=q),L&&(e.creationDate=L);const V=s.encrypted&&k.encrypted&&!O,E=V&&!u;if(O||(e.zipCrypto=E),V){if(!E&&void 0===u.strength)throw new Error("Encryption method not supported");if(!x&&!M)throw new Error("File contains encrypted entry")}const R=c+30+j+F,I=z,T=i.createReadable({offset:R,size:I,diskNumberStart:l,chunkSize:m(w)}),Z=on(s,r,"signal"),C=on(s,r,"checkPasswordOnly");let P=on(s,r,"checkOverlappingEntry");const A=on(s,r,"checkOverlappingEntryOnly");A&&(P=!0);const{onstart:B,onprogress:X,onend:H}=r,G=9==h;let Y=on(s,r,"useCompressionStream");G&&(Y=!1);const K={options:{codecType:Lt,password:x,rawPassword:M,zipCrypto:E,encryptionStrength:u&&u.strength,signed:on(s,r,"checkSignature")&&!O,passwordVerification:E&&(S?y>>>8&255:g>>>24&255),outputSize:O?z:b,signature:g,compressed:0!=h&&!O,encrypted:V,useWebWorkers:on(s,r,"useWebWorkers"),useCompressionStream:Y,transferStreams:on(s,r,"transferStreams"),deflate64:G,checkPasswordOnly:C},config:w,streamOptions:{signal:Z,size:I,onstart:B,onprogress:X,onend:H}};let Q;P&&await async function({reader:t,fileEntry:e,index:n,offset:r,diskNumberStart:s,signature:i,compressedSize:o,uncompressedSize:c,dataOffset:l,dataDescriptor:u,extraFieldZip64:f,readRanges:d}){let h=0;if(s&&t.readers)for(let e=0;e<Math.min(s,t.readers.length);e++)h+=t.readers[e].size;let w=0;if(u&&(w=f?20:12),w){const n=await be(t,l+o,w+4,s);if(n.length==w+4&&dn(wn(n),0)==a){const t=dn(wn(n),4);let r,s;f?(r=hn(wn(n),8),s=hn(wn(n),16)):(r=dn(wn(n),8),s=dn(wn(n),12)),(e.encrypted&&!e.zipCrypto||t==i)&&r==o&&s==c&&(w+=4)}}const p={start:h+r,end:h+l+o+w,fileEntry:e};for(const[t,e]of d)if(t!=n&&p.start<e.end&&e.start<p.end){const t=new Error("Overlapping entry found");throw t.overlappingEntry=e.fileEntry,t}d.set(n,p)}({reader:i,fileEntry:e,index:o,offset:c,diskNumberStart:l,signature:g,compressedSize:z,uncompressedSize:b,dataOffset:R,dataDescriptor:S||k.bitFlag.dataDescriptor,extraFieldZip64:f||k.extraFieldZip64,readRanges:n});try{if(!A){C&&(t=new WritableStream),t=new me(t),await ye(t,O?z:b),({writable:Q}=t);const{outputSize:e}=await async function(t,e){const{options:n,config:r}=e,{transferStreams:s,useWebWorkers:a,useCompressionStream:i,compressed:o,signed:c,encrypted:l}=n,{workerURI:u,maxWorkers:f}=r;e.transferStreams=s||void 0===s;const d=!(o||c||l||e.transferStreams);return e.useWebWorkers=!d&&(a||void 0===a&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&u?u:void 0,n.useCompressionStream=i||void 0===i&&r.useCompressionStream,(await async function(){const n=$t.find(t=>!t.busy);if(n)return ce(n),new Bt(n,t,e,h);if($t.length<f){const n={indexWorker:re};return re++,$t.push(n),new Bt(n,t,e,h)}return new Promise(n=>{te.push({resolve:n,stream:t,workerOptions:e}),ne=r.workerStarvationTimeout,se()})}()).run();function h(t){if(ae(),te.length){const[{resolve:e,stream:n,workerOptions:r}]=te.splice(0,1);e(new Bt(t,n,r,h)),se()}else t.worker?(ce(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(t.terminated?t.terminated=!1:t.terminateTimeout=setTimeout(async()=>{$t=$t.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):$t=$t.filter(e=>e!=t)}}({readable:T,writable:Q},K);if(t.size+=e,e!=(O?z:b))throw new Error(vt)}}catch(e){if(void 0!==e.outputSize&&(t.size+=e.outputSize),!C||e.message!=N)throw e}finally{on(s,r,"preventClose")||!Q||Q.locked||await Q.getWriter().close()}return C||A?void 0:t.getData?t.getData():Q}}function Ke(t,e,n){const r=t.rawBitFlag=fn(e,n+2),s=!(1&~r),a=dn(e,n+6);Object.assign(t,{encrypted:s,version:fn(e,n),bitFlag:{level:(6&r)>>1,dataDescriptor:!(8&~r),languageEncodingFlag:!(2048&~r)},rawLastModDate:a,lastModDate:cn(a),filenameLength:fn(e,n+22),extraFieldLength:fn(e,n+24)})}function Qe(t,e,n,r,s){const{rawExtraField:a}=e,i=e.extraField=new Map,o=wn(new Uint8Array(a));let c=0;try{for(;c<a.length;){const t=fn(o,c),e=fn(o,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{}const l=fn(n,r+4);Object.assign(e,{signature:dn(n,r+10),compressedSize:dn(n,r+14),uncompressedSize:dn(n,r+18)});const u=i.get(1);u&&(function(t,e){e.zip64=!0;const n=wn(t.data),r=Xe.filter(([t,n])=>e[t]==n),s=r.reduce((t,[,e])=>t+He[e].bytes,0);if(t.data.length<s)throw new Error("Zip64 extra field not found");for(let s=0,a=0;s<r.length;s++){const[i,o]=r[s],c=He[o];e[i]=t[i]=c.getValue(n,a),a+=c.bytes}}(u,e),e.extraFieldZip64=u);const f=i.get(28789);f&&(Je(f,Ue,ve,e,t),e.extraFieldUnicodePath=f);const d=i.get(25461);d&&(Je(d,xe,Me,e,t),e.extraFieldUnicodeComment=d);const h=i.get(39169);h&&h.data.length>=7?(function(t,e,n){const r=wn(t.data),s=un(r,4);Object.assign(t,{vendorVersion:un(r,0),vendorId:un(r,2),strength:s,originalCompressionMethod:n,compressionMethod:fn(r,5)}),e.compressionMethod=t.compressionMethod}(h,e,l),e.extraFieldAES=h):e.compressionMethod=l;const w=i.get(10);w&&(function(t,e){const n=wn(t.data);let r,s=4;try{for(;s<t.data.length&&!r;){const e=fn(n,s),a=fn(n,s+2);1==e&&(r=t.data.slice(s+4,s+4+a)),s+=4+a}}catch{}try{if(r&&24==r.length){const n=wn(r),s=n.getBigUint64(0,!0),a=n.getBigUint64(8,!0),i=n.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:i});const o=ln(s),c={lastModDate:o,lastAccessDate:ln(a),creationDate:ln(i)};Object.assign(t,c),Object.assign(e,c)}}catch{}}(w,e),e.extraFieldNTFS=w);const p=i.get(30805);if(p)_e(p,e,!1),e.extraFieldUnix=p;else{const t=i.get(30837);t&&(_e(t,e,!0),e.extraFieldInfoZip=t)}const g=i.get(21589);g&&(function(t,e,n){if(!t.data.length)return;const r=wn(t.data),s=un(r,0),a=[],i=[];n?(1&~s||(a.push(We),i.push(De)),2&~s||(a.push(qe),i.push("rawLastAccessDate")),4&~s||(a.push(Le),i.push(Ve))):t.data.length>=5&&(a.push(We),i.push(De));let o=1;a.forEach((n,s)=>{if(t.data.length>=o+4){const a=dn(r,o);e[n]=t[n]=new Date(1e3*(0|a));const c=i[s];t[c]=a}o+=4})}(g,e,s),e.extraFieldExtendedTimestamp=g);const m=i.get(6534);m&&(e.extraFieldUSDZ=m)}function Je(t,e,n,r,s){if(t.data.length<5)return void(t.valid=!1);const a=wn(t.data),i=new F;i.append(s[n]);const o=wn(new Uint8Array(4));o.setUint32(0,i.get(),!0);const c=dn(a,1);Object.assign(t,{version:un(a,0),[e]:ke(t.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&c==dn(o,0)}),t.valid&&(r[e]=t[e],r[e+"UTF8"]=!0)}function _e(t,e,n){try{const r=wn(new Uint8Array(t.data));let s,a;if(n){let e=0;const n=un(r,e++),i=un(r,e++);s=$e(t.data.subarray(e,e+i)),e+=i;const o=un(r,e++);a=$e(t.data.subarray(e,e+o)),Object.assign(t,{version:n,uid:s,gid:a})}else t.data.length>=4&&(s=fn(r,0),a=fn(r,2),Object.assign(t,{uid:s,gid:a}));void 0!==s&&(e.uid=s),void 0!==a&&(e.gid=a)}catch{}}function $e(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function tn(t,e){return void 0===t?e?"strict":"balanced":t}async function*en(t,e){const n=t.size-e,r=await be(t,n,e),s=wn(r);for(let t=r.length-22;t>=0;t--)101010256==dn(s,t)&&(yield[s,n,r,t,n+t])}function nn(t,e,n){return{offset:n,buffer:t.slice(e,e+22).buffer}}async function rn(t,e,n,s,a,o,l){const u=fn(e,s+10),f=dn(e,s+12),d=dn(e,s+16);if(65535==u||f==r||d==r)return await sn(t,e,n,a-20,o,l)==c?2:0;if(!u&&!f)return 1;for(const r of[a-f,d])if(await sn(t,e,n,r,o,l)==i)return 2;return 0}async function sn(t,e,n,r,s,a){if(!(r<0||r+4>s)){if(r>=n)return dn(e,r-n);if(a.count>0)return a.count--,dn(wn(await be(t,r,4)),0)}}function an(t){const e=new Error("Ambiguous archive");throw e.reason=t,e}function on(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function cn(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch{}}function ln(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function un(t,e){return t.getUint8(e)}function fn(t,e){return t.getUint16(e,!0)}function dn(t,e){return t.getUint32(e,!0)}function hn(t,e){return Number(t.getBigUint64(e,!0))}function wn(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}new Uint8Array([7,0,2,0,65,69,3,0,0]);try{y({baseURI:"file:///__w/arcgis-js-api/arcgis-js-api/node_modules/.pnpm/@zip.js+zip.js@2.8.34/node_modules/@zip.js/zip.js/lib/zip-core-base.js"})}catch{}const pn=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],gn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],mn=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],yn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],zn=new Uint8Array(288);zn.fill(8,0,144),zn.fill(9,144,256),zn.fill(7,256,280),zn.fill(8,280,288);const Sn=new Uint8Array(30).fill(5);function kn(t){const e=new Uint16Array(16);for(const n of t)e[n]++;e[0]=0;const n=new Uint16Array(17);for(let t=1;15>=t;t++)n[t+1]=n[t]+e[t];const r=new Uint16Array(t.length);for(let e=0;e<t.length;e++)t[e]&&(r[n[t[e]]++]=e);return{t:e,symbols:r}}const Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";let vn,xn,Mn,On;function Fn(t,e,n={}){const r="number"==typeof n.level?n.level:-1,s="number"==typeof n.outBuffer?n.outBuffer:65536,a="number"==typeof n.inBufferSize?n.inBufferSize:65536;return new TransformStream({start(){try{let n;if(this.out=xn(s),this.in=xn(a),this.inBufferSize=a,!this.out||!this.in)throw new Error("allocation failed");if(this._scratch=new Uint8Array(s),t?(this._process=vn.deflate_process,this._last_consumed=vn.deflate_last_consumed,this._end=vn.deflate_end,this.streamHandle=vn.deflate_new(),n="gzip"===e?vn.deflate_init_gzip(this.streamHandle,r):"deflate-raw"===e?vn.deflate_init_raw(this.streamHandle,r):vn.deflate_init(this.streamHandle,r)):"deflate64-raw"===e?(this._process=vn.inflate9_process,this._last_consumed=vn.inflate9_last_consumed,this._end=vn.inflate9_end,this.streamHandle=vn.inflate9_new(),n=vn.inflate9_init_raw(this.streamHandle)):(this._process=vn.inflate_process,this._last_consumed=vn.inflate_last_consumed,this._end=vn.inflate_end,this.streamHandle=vn.inflate_new(),n="deflate-raw"===e?vn.inflate_init_raw(this.streamHandle):"gzip"===e?vn.inflate_init_gzip(this.streamHandle):vn.inflate_init(this.streamHandle)),0!==n)throw new Error("init failed:"+n)}catch(t){throw i(this),t}},transform(e,n){try{const r=e,a=new Uint8Array(On.buffer),i=this._process,o=this._last_consumed,c=this.out,l=this._scratch;let u=0;for(;u<r.length;){const e=Math.min(r.length-u,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&Mn&&(Mn(this.in),this.in=0),this.in=xn(e),this.inBufferSize=e,!this.in))throw new Error("allocation failed");a.set(r.subarray(u,u+e),this.in);const f=i(this.streamHandle,this.in,e,c,s,0),d=16777215&f;if(d&&(l.set(a.subarray(c,c+d),0),n.enqueue(l.slice(0,d))),!t){const t=f>>24&255,e=128&t?t-256:t;if(e<0)throw new Error("process error:"+e)}const h=o(this.streamHandle);if(0===h)break;u+=h}}catch(t){i(this),n.error(t)}},flush(e){try{const n=new Uint8Array(On.buffer),r=this._process,a=this.out,i=this._scratch;for(;;){const o=r(this.streamHandle,0,0,a,s,4),c=16777215&o,l=o>>24&255;if(!t){const t=128&l?l-256:l;if(t<0)throw new Error("process error:"+t)}if(c&&(i.set(n.subarray(a,a+c),0),e.enqueue(i.slice(0,c))),1===l||0===c)break}}catch(t){e.error(t)}finally{const t=i(this);0!==t&&e.error(new Error("end error:"+t))}},cancel(){i(this)}});function i(t){let e=0;return t.streamHandle&&t._end&&(e=t._end(t.streamHandle)),t.streamHandle=0,t.in&&Mn&&Mn(t.in),t.in=0,t.out&&Mn&&Mn(t.out),t.out=0,e}}class jn{constructor(t="deflate",e){return Fn(!0,t,e)}}class Wn{constructor(t="deflate",e){return Fn(!1,t,e)}}jn.requiresModule=!0,Wn.requiresModule=!0;let Dn,qn=!1;!function(t){let e;t({wasmURI:()=>(e||(e="data:application/wasm;base64,"+(t=>{let e="";const n=t.length;let r=0;for(;n>r+2;r+=3){const n=t[r]<<16|t[r+1]<<8|t[r+2];e+=Un[n>>18&63]+Un[n>>12&63]+Un[n>>6&63]+Un[63&n]}const s=n-r;if(1===s){const n=t[r]<<16;e+=Un[n>>18&63]+Un[n>>12&63]+"=="}else if(2===s){const n=t[r]<<16|t[r+1]<<8;e+=Un[n>>18&63]+Un[n>>12&63]+Un[n>>6&63]+"="}return e})((t=>{let e=0,n=0,r=0,s=new Uint8Array(1024),a=0,i=0;for(;!i;){i=c(1);const t=c(2);if(0==t)l();else if(1==t)u(kn(zn),kn(Sn));else{if(2!=t)throw Error("invalid deflate block type");u(...f())}}return s.subarray(0,a);function o(){if(e>=t.length)throw Error("unexpected end of deflate data");return t[e++]}function c(t){for(;t>r;)n|=o()<<r,r+=8;const e=n&(1<<t)-1;return n>>>=t,r-=t,e}function l(){n=0,r=0;const t=o()|o()<<8;e+=2,h(a+t);for(let e=0;t>e;e++)s[a++]=o()}function u(t,e){let n=d(t);for(;256!=n;){if(256>n)h(a+1),s[a++]=n;else{const t=n-257,r=pn[t]+c(gn[t]),i=d(e),o=mn[i]+c(yn[i]);h(a+r);const l=a-o;for(let t=0;r>t;t++)s[a++]=s[l+t]}n=d(t)}}function f(){const t=c(5)+257,e=c(5)+1,n=c(4)+4,r=new Uint8Array(19);for(let t=0;n>t;t++)r[bn[t]]=c(3);const s=kn(r),a=new Uint8Array(t+e);let i=0;for(;i<a.length;){const t=d(s);if(16>t)a[i++]=t;else if(16==t){const t=a[i-1];let e=c(2)+3;for(;e--;)a[i++]=t}else i+=17==t?c(3)+3:c(7)+11}return[kn(a.subarray(0,t)),kn(a.subarray(t))]}function d(t){const{t:e,symbols:n}=t;let r=0,s=0,a=0;for(let t=1;15>=t;t++){r|=c(1);const i=e[t];if(i>r-s)return n[a+(r-s)];a+=i,s=s+i<<1,r<<=1}throw Error("invalid huffman code")}function h(t){if(s.length<t){let e=2*s.length;for(;t>e;)e*=2;const n=new Uint8Array(e);n.set(s.subarray(0,a)),s=n}}})((t=>{const e=(t=(t+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,n=[];for(let r=0;e>r;r+=4){const e=Un.indexOf(t[r])<<18|Un.indexOf(t[r+1])<<12|(63&Un.indexOf(t[r+2]))<<6|63&Un.indexOf(t[r+3]);n.push(e>>16&255),"="!==t[r+2]&&n.push(e>>8&255),"="!==t[r+3]&&n.push(255&e)}return new Uint8Array(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Z2jz/0NKFh5e4GnX2/JkLW1ubZwZNV848sjl1O8C1+/ZDpwenRzenu0zo08Ont+gzp8/0VFPt1hkA8OjpwZlHRl98/uz5hy58nrbP/srmGEXcu8EXHtu8yshwf65slO82w3LmwqOPbW1ub5+9cJ4e3Rw8cuEhJf8Vak7tU0qlKlEtFau2ilSmnOooq3Jl1IzSalb5VzvZHzqrnIpUrBKVqpZqq0zlalbNqf3qBtVVR9R71AfVR9Wd6pfUf6HOqG31tPqH6s/U/6GMbtqa/psLf/vC3/7wNx/+DoS/Qm2o7/LOmVECA2DN1Zy6UZXqw8qr0+pJ9SdK6yeRpspqp2Od6o4u9IImfYte0Q9Ott+02bSFNg6qg+oGdYNaUAvqRnWjOqQOqa7qqsPqsLpJ3aRW1Ip6p/23Adc7u/6eDH9Phb+nw98z4e/Z8PfCz6H/eke/Otlu017TznPqOfVr6tfU8+p59evq19VvqN9Qv6l+U31JfUl9WX1ZfUV9RdFdSu2kSmmt1M1aqVml1KU1pVRL+nezknvc13Bvv1IqUf7SXHZSNj/H/8yuf3bXP7frXzT1z7+wL9vcXdXuT5vX4/AvCf/S8K8V/rXDvyz864R/Of/zr+7P3tNUnzQTZ26fSpNW3I4y17G5mdGzyv/1/uzRhNt2KuV/iserUGkox6zVp+EdUGOLYSn4flPGKEmZ3iwrjTJKRisnZaONVkVL+R/PZy06oQWr/x8=")))),e)})}(y),function({initModule:t}){At=t}({initModule:t=>{if(!Dn){let{wasmURI:e}=t;typeof e==f&&(e=e()),Dn=async function(t,{baseURI:e}){if(!qn){let n,r;try{try{r=new URL(t,e)}catch{}const s=await fetch(r);n=await s.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=function(t){const e=t.split(",")[1],n=atob(e),r=n.length,s=new Uint8Array(r);for(let t=0;t<r;++t)s[t]=n.charCodeAt(t);return s.buffer}(t)}!function(t){if(vn=t,({malloc:xn,free:Mn,memory:On}=vn),"function"!=typeof xn||"function"!=typeof Mn||!On)throw vn=xn=Mn=On=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(n)).instance.exports),qn=!0}}(e,t)}return Dn}}),y({CompressionStreamZlib:jn,DecompressionStreamZlib:Wn}),function(t){const e='(t=>{"function"==typeof define&&define.amd?define(t):t()})(function(){"use strict";const{Array:t,Object:e,Number:n,Math:s,Error:r,Uint8Array:o,Uint16Array:i,Uint32Array:a,Int32Array:c,Map:f,DataView:l,Promise:w,TextEncoder:u,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:g,DecompressionStream:S}=self,b=void 0,k="undefined",v="function",z=new o,C=[[],[],[],[],[],[],[],[]];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)e=1&e?e>>>1^3988292384:e>>>1;C[0][t]=e}for(let t=0;256>t;t++)for(let e=1;8>e;e++){const n=C[e-1][t];C[e][t]=n>>>8^C[0][255&n]}const[I,A,x,P,R,U,W,D]=C;class M{constructor(t){this.t=t||-1}append(t){let e=0|this.t;const n=0|t.length;let s=0;if(n>=8&&t.buffer){const r=new l(t.buffer,t.byteOffset,n),o=n-8;for(;o>=s;s+=8){const t=e^r.getInt32(s,!0),n=r.getInt32(s+4,!0);e=D[255&t]^W[t>>>8&255]^U[t>>>16&255]^R[t>>>24&255]^P[255&n]^x[n>>>8&255]^A[n>>>16&255]^I[n>>>24&255]}}for(;n>s;s++)e=e>>>8^I[255&(e^t[s])];this.t=e}get(){return~this.t}}class _ extends d{constructor(){let t;const e=new M;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new o(4);new l(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}const B={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=B.o(n);return 32===s?t.concat(e):B.i(e,s,0|n,t.slice(0,t.length-1))},l(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+B.o(n)},u(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=B.h(e,t[n-1]&2147483648>>e-1,1)),t},h:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,o:t=>s.round(t/1099511627776)||32,i(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,o=B.o(r);return s.push(B.h(e+o&31,e+o>32?n:s.pop(),1)),s}},T={bytes:{p(t){const e=B.l(t)/8,n=new o(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},m(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(B.h(8*(3&n),s)),e}}},V=class{constructor(t){const e=this;e.blockSize=512,e.S=[1732584193,4023233417,2562383102,271733878,3285377520],e.k=[1518500249,1859775393,2400959708,3395469782],t?(e.v=t.v.slice(0),e.C=t.C.slice(0),e.I=t.I):e.reset()}reset(){const t=this;return t.v=t.S.slice(0),t.C=[],t.I=0,t}update(t){const e=this;"string"==typeof t&&(t=T.A.m(t));const n=e.C=B.concat(e.C,t),s=e.I,o=e.I=s+B.l(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const i=new a(n);let c=0;for(let t=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o>=t;t+=e.blockSize)e.P(i.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),e}R(){const t=this;let e=t.C;const n=t.v;e=B.concat(e,[B.h(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.I/4294967296)),e.push(0|t.I);e.length;)t.P(e.splice(0,16));return t.reset(),n}U(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}W(t,e){return e<<t|e>>>32-t}P(e){const n=this,r=n.v,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let i=r[0],a=r[1],c=r[2],f=r[3],l=r[4];for(let t=0;79>=t;t++){16>t||(o[t]=n.W(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.W(5,i)+n.U(t,a,c,f)+l+o[t]+n.k[s.floor(t/20)]|0;l=f,f=c,c=n.W(30,a),a=i,i=e}r[0]=r[0]+i|0,r[1]=r[1]+a|0,r[2]=r[2]+c|0,r[3]=r[3]+f|0,r[4]=r[4]+l|0}},K={importKey:t=>new K.D(T.bytes.m(t)),M(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let i,a,c,f,w;const u=new ArrayBuffer(o),h=new l(u);let p=0;const d=B;for(e=T.bytes.m(e),w=1;(o||1)>p;w++){for(i=a=t.encrypt(d.concat(e,[w])),c=1;n>c;c++)for(a=t.encrypt(a),f=0;f<a.length;f++)i[f]^=a[f];for(c=0;(o||1)>p&&c<i.length;c++)h.setInt32(p,i[c]),p+=4}return u.slice(0,s/8)},D:class{constructor(t){const e=this,n=e._=V,s=[[],[]];e.B=[new n,new n];const r=e.B[0].blockSize/32;t.length>r&&(t=(new n).update(t).R());for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e.B[0].update(s[0]),e.B[1].update(s[1]),e.T=new n(e.B[0])}reset(){const t=this;t.T=new t._(t.B[0]),t.V=!1}update(t){this.V=!0,this.T.update(t)}digest(){const t=this,e=t.T.R(),n=new t._(t.B[1]).update(e).R();return t.reset(),n}encrypt(t){if(this.V)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},j=typeof h!=k&&typeof h.getRandomValues==v,E="Invalid password",L="Invalid signature",O="zipjs-abort-check-password";function H(t){if(j)return h.getRandomValues(t);throw new r("Crypto API not supported")}const Z=16,F={name:"PBKDF2"},N=e.assign({hash:{name:"HMAC"}},F),q=e.assign({iterations:1e3,hash:{name:"SHA-1"}},F),G=["deriveBits"],J=[8,12,16],Q=[16,24,32],X=10,Y=[0,0,0,0],$=typeof h!=k,tt=$&&h.subtle,et=$&&typeof tt!=k,nt=T.bytes,st=class{constructor(t){const e=this;e.K=[[[],[],[],[],[]],[[],[],[],[],[]]],e.K[0][0][0]||e.j();const n=e.K[0][4],s=e.K[1],o=t.length;let i,a,c,f=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.k=[a=t.slice(0),c=[]],i=o;4*o+28>i;i++){let t=a[i-1];(i%o===0||8===o&&i%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],i%o===0&&(t=t<<8^t>>>24^f<<24,f=f<<1^283*(f>>7))),a[i]=a[i-o]^t}for(let t=0;i;t++,i--){const e=a[3&t?i:i-4];c[t]=4>=i||4>t?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this.L(t,0)}decrypt(t){return this.L(t,1)}j(){const t=this.K[0],e=this.K[1],n=t[4],s=e[4],r=[],o=[];let i,a,c,f;for(let t=0;256>t;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=i=0;!n[l];l^=a||1,i=o[i]||1){let o=i^i<<1^i<<2^i<<3^i<<4;o=o>>8^255&o^99,n[l]=o,s[o]=l,f=r[c=r[a=r[l]]];let w=16843009*f^65537*c^257*a^16843008*l,u=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][l]=u=u<<24^u>>>8,e[n][o]=w=w<<24^w>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}L(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.k[e],s=n.length/4-2,o=[0,0,0,0],i=this.K[e],a=i[0],c=i[1],f=i[2],l=i[3],w=i[4];let u,h,p,d=t[0]^n[0],y=t[e?3:1]^n[1],m=t[2]^n[2],g=t[e?1:3]^n[3],S=4;for(let t=0;s>t;t++)u=a[d>>>24]^c[y>>16&255]^f[m>>8&255]^l[255&g]^n[S],h=a[y>>>24]^c[m>>16&255]^f[g>>8&255]^l[255&d]^n[S+1],p=a[m>>>24]^c[g>>16&255]^f[d>>8&255]^l[255&y]^n[S+2],g=a[g>>>24]^c[d>>16&255]^f[y>>8&255]^l[255&m]^n[S+3],S+=4,d=u,y=h,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=w[d>>>24]<<24^w[y>>16&255]<<16^w[m>>8&255]<<8^w[255&g]^n[S++],u=d,d=y,y=m,m=g,g=u;return o}},rt=class{constructor(t,e){this.O=t,this.H=e,this.Z=e}reset(){this.Z=this.H}update(t){return this.F(this.O,t,this.Z)}N(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}q(t){0===(t[0]=this.N(t[0]))&&(t[1]=this.N(t[1]))}F(t,e,n){let s;if(!(s=e.length))return[];const r=B.l(e);for(let r=0;s>r;r+=4){this.q(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return B.u(e,r)}},ot=K.D;let it=$&&et&&typeof tt.importKey==v,at=$&&et&&typeof tt.deriveBits==v;class ct extends d{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:s}){super({start(){lt(this,t,e,n)},async transform(t,e){const n=this,{password:i,G:a,J:c,ready:f}=n;i?(await(async(t,e,n,s)=>{const o=await ut(t,e,n,dt(s,0,J[e])),i=dt(s,J[e]);if(o[0]!=i[0]||o[1]!=i[1])throw new r(E)})(n,a,i,dt(t,0,J[a]+2)),t=dt(t,J[a]+2),s?e.error(new r(O)):c()):await f;const l=new o(t.length-X-(t.length-X)%Z);e.enqueue(wt(n,t,l,0,X,!0))},async flush(t){const{X:e,Y:n,pending:s,ready:o}=this;if(n&&e){await o;const i=dt(s,0,s.length-X),a=dt(s,s.length-X);let c=z;if(i.length){const t=mt(nt,i);n.update(t);const s=e.update(t);c=yt(nt,s)}const f=dt(yt(nt,n.digest()),0,X);let l=s.length<X?1:0;for(let t=0;X>t;t++)l|=f[t]^a[t];if(l)throw new r(L);t.enqueue(c)}}})}}class ft extends d{constructor({password:t,rawPassword:e,encryptionStrength:n}){let s;super({start(){lt(this,t,e,n)},async transform(t,e){const n=this,{password:s,G:r,J:i,ready:a}=n;let c=z;s?(c=await(async(t,e,n)=>{const s=H(new o(J[e]));return pt(s,await ut(t,e,n,s))})(n,r,s),i()):await a;const f=new o(c.length+t.length-t.length%Z);f.set(c,0),e.enqueue(wt(n,t,f,c.length,0))},async flush(t){const{X:e,Y:n,pending:r,ready:o}=this;if(n&&e){await o;let i=z;if(r.length){const t=e.update(mt(nt,r));n.update(t),i=yt(nt,t)}s.signature=yt(nt,n.digest()).slice(0,X),t.enqueue(pt(i,s.signature))}}}),s=this}}function lt(t,n,s,r){e.assign(t,{ready:new w(e=>t.J=e),password:ht(n,s),G:r-1,pending:z})}function wt(t,e,n,s,r,i){const{X:a,Y:c,pending:f}=t;f.length&&(e=pt(f,e));const l=e.length-r;let w;for(n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new o(e)).set(n,0)}return t})(n,s+(l-l%Z)),w=0;l-Z>=w;w+=Z){const t=mt(nt,dt(e,w,w+Z));i&&c.update(t);const r=a.update(t);i||c.update(r),n.set(yt(nt,r),w+s)}return t.pending=dt(e,w),n}async function ut(n,s,r,i){n.password=null;const a=await(async(t,e,n,s,r)=>{if(!it)return K.importKey(e);try{return await tt.importKey("raw",e,n,!1,r)}catch{return it=!1,K.importKey(e)}})(0,r,N,0,G),c=await(async(t,e,n)=>{if(!at)return K.M(e,t.salt,q.iterations,n);try{return await tt.deriveBits(t,e,n)}catch{return at=!1,K.M(e,t.salt,q.iterations,n)}})(e.assign({salt:i},q),a,8*(2*Q[s]+2)),f=new o(c),l=mt(nt,dt(f,0,Q[s])),w=mt(nt,dt(f,Q[s],2*Q[s])),u=dt(f,2*Q[s]);return e.assign(n,{keys:{key:l,$:w,passwordVerification:u},X:new rt(new st(l),t.from(Y)),Y:new ot(w)}),u}function ht(t,e){return e===b?(t=>{if(typeof u==k){const e=new o((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new u).encode(t)})(t):e}function pt(t,e){let n=t;return t.length+e.length&&(n=new o(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function dt(t,e,n){return t.subarray(e,n)}function yt(t,e){return t.p(e)}function mt(t,e){return t.m(e)}class gt extends d{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){bt(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=kt(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e.at(-1)^n.passwordVerification))throw new r(E);t=t.subarray(12)}s?e.error(new r(O)):e.enqueue(kt(n,t))}})}}class St extends d{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){bt(this,t,e,n)},transform(t,e){const n=this;let s,r;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=H(new o(12));e[11]=n.passwordVerification,s=new o(t.length+e.length),s.set(vt(n,e),0),r=12}else s=new o(t.length),r=0;s.set(vt(n,t),r),e.enqueue(s)}})}}function bt(t,n,s,r){e.assign(t,{password:n,rawPassword:s,passwordVerification:r}),((t,n,s)=>{const r=[305419896,591751049,878082192];if(e.assign(t,{keys:r,tt:new M(r[0]),et:new M(r[2])}),s)for(let e=0;e<s.length;e++)zt(t,s[e]);else for(let e=0;e<n.length;e++)zt(t,n.charCodeAt(e))})(t,n,s)}function kt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=Ct(t)^e[s],zt(t,n[s]);return n}function vt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=Ct(t)^e[s],zt(t,e[s]);return n}function zt(t,e){let[,n]=t.keys;t.tt.append([e]);const r=~t.tt.get();n=At(s.imul(At(n+It(r)),134775813)+1),t.et.append([n>>>24]);const o=~t.et.get();t.keys=[r,n,o]}function Ct(t){const e=2|t.keys[2];return It(s.imul(e,1^e)>>>8)}function It(t){return 255&t}function At(t){return 4294967295&t}class xt extends d{constructor(t,{chunkSize:e,nt:n,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:i,zipCrypto:a,signed:c,level:f,deflate64:w}=t,u=this;let h,p,d,y=super.readable;const m=c&&r&&!w&&(!o||a)&&!(!i||!s);o&&!a||!c||m||(h=new _,y=Dt(y,h)),r&&(m?(d=new Pt,y=Mt(y,new s("gzip")),y=Dt(y,d)):y=Wt(y,i,{level:f,chunkSize:e},s,n,s)),o&&(a?y=Dt(y,new St(t)):(p=new ft(t),y=Dt(y,p))),Ut(u,y,()=>{let t;o&&!a&&(t=p.signature),o&&!a||!c||(t=m?d.signature:new l(h.value.buffer).getUint32(0)),u.signature=t})}}class Pt extends d{constructor(){let t,e=10,n=new o(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const i=n.length+t.length;if(8>=i){const e=new o(i);return e.set(n),e.set(t,n.length),void(n=e)}const a=i-8,c=new o(a),f=s.min(a,n.length);c.set(n.subarray(0,f),0),a>f&&c.set(t.subarray(0,a-f),f),r.enqueue(c);const l=new o(8),w=n.length-f;w&&l.set(n.subarray(f),0),l.set(t.subarray(a-f),w),n=l},flush(){const e=new l(n.buffer,n.byteOffset,n.byteLength);t.signature=e.getUint32(0,!0),t.st=e.getUint32(4,!0)}}),t=this}}class Rt extends d{constructor(t,{chunkSize:e,rt:n,DecompressionStream:s}){super({});const{zipCrypto:o,encrypted:i,signed:a,signature:c,compressed:f,useCompressionStream:w,deflate64:u}=t;let h,p,d=super.readable;i&&(o?d=Dt(d,new gt(t)):(p=new ct(t),d=Dt(d,p))),f&&(d=Wt(d,w,{chunkSize:e,deflate64:u},s,n,s),d=(t=>{const e=t.getReader();return new y({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new r("Invalid compressed data");throw e.cause=t,e}const{value:s,done:o}=n;o?t.close():t.enqueue(s)},cancel:t=>e.cancel(t)})})(d)),i&&!o||!a||(h=new _,d=Dt(d,h)),Ut(this,d,()=>{if((!i||o)&&a){const t=new l(h.value.buffer);if(c!=t.getUint32(0,!1))throw new r(L)}})}}function Ut(t,n,s){n=Dt(n,new d({flush:s})),e.defineProperty(t,"readable",{get:()=>n})}function Wt(t,e,n,s,r,o){const i=e&&s?s:r||o,a=n.deflate64?"deflate64-raw":"deflate-raw";let c;try{c=new i(a,n)}catch(t){if(!e)throw t;if(r)c=new r(a,n);else{if(!o)throw t;c=new o(a,n)}}return Mt(t,c)}function Dt(t,e){return t.pipeThrough(e)}function Mt(t,e){const n=e.writable.getWriter(),s=t.getReader();return(async()=>{try{for(;;){await n.ready;const t=await s.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await(async(t,e)=>{try{await t.abort(e)}catch{}})(n,t),await(async(t,e)=>{try{await t.cancel(e)}catch{}})(s,t)}})(),e.readable}const _t="data",Bt="close";class Tt extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let i;o.startsWith("deflate")?i=xt:o.startsWith("inflate")&&(i=Rt),s.outputSize=0;let a=0;const c=new i(t,n),f=super.readable,l=new d({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){e.assign(s,{inputSize:a})}}),w=new d({transform(e,n){if(e&&e.length&&(n.enqueue(e),s.outputSize+=e.length,t.outputSize!==b&&s.outputSize>t.outputSize))throw new r("Invalid uncompressed size")},flush(){const{signature:t}=c;e.assign(s,{signature:t,inputSize:a})}});e.defineProperty(s,"readable",{get:()=>f.pipeThrough(l).pipeThrough(c).pipeThrough(w)})}}class Vt extends d{constructor(t){let e;1>t&&(t=65536),super({transform:(n,s)=>{if(e){const t=new o(e.length+n.length);t.set(e),t.set(n,e.length),n=t,e=null}let r=0;for(;n.length-r>t;)s.enqueue(n.slice(r,r+t)),r+=t;e=r?n.slice(r):n},flush(t){e&&e.length&&t.enqueue(e)}})}}let Kt=2;try{typeof navigator!=k&&navigator.hardwareConcurrency&&(Kt=navigator.hardwareConcurrency)}catch{}const jt={ot:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,it:Kt,ct:5e3,ft:5e3,lt:!0,useCompressionStream:!0,CompressionStream:typeof g!=k&&g,DecompressionStream:typeof S!=k&&S};e.assign({},jt);const Et=new f,Lt=new f;let Ot,Ht,Zt,Ft,Nt,qt=0;async function Gt(t){let e,r;try{const{options:o,config:i}=t;if(!o.useCompressionStream)try{await self.initModule(t.config)}catch{o.useCompressionStream=!0}i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream;const a={highWaterMark:1},c=t.readable||new y({async pull(t){const e=new w(t=>Et.set(qt,t));Jt({type:"pull",messageId:qt}),qt=(qt+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await e;t.enqueue(s),r&&t.close()}},a);r=t.writable||new m({async write(t){let e;const s=new w(t=>e=t);Lt.set(qt,e),Jt({type:_t,value:t,messageId:qt}),qt=(qt+1)%n.MAX_SAFE_INTEGER,await s}},a),e=new Tt(o,i),Ot=new AbortController;const{signal:f}=Ot;await c.pipeThrough(e).pipeThrough(new Vt((t=>s.max(t.chunkSize,64))(i))).pipeTo(r,{signal:f,preventClose:!0,preventAbort:!0}),await r.getWriter().close();const{signature:l,inputSize:u,outputSize:h}=e;Jt({type:Bt,result:{signature:l,inputSize:u,outputSize:h}})}catch(t){if(t.outputSize=e?e.outputSize:0,r&&!r.locked)try{await r.getWriter().close()}catch{}Qt(t)}}function Jt(t){let{value:e}=t;if(e)if(e.length)try{e=new o(e),t.value=e.buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t)}function Qt(t=new r("Unknown error")){const{message:e,stack:n,code:s,name:o,outputSize:i}=t;p({error:{message:e,stack:n,code:s,name:o,outputSize:i}})}function Xt(t,e,n={}){const i="number"==typeof n.level?n.level:-1,a="number"==typeof n.outBuffer?n.outBuffer:65536,c="number"==typeof n.inBufferSize?n.inBufferSize:65536;return new d({start(){try{let n;if(this.wt=Zt(a),this.in=Zt(c),this.inBufferSize=c,!this.wt||!this.in)throw new r("allocation failed");if(this.ut=new o(a),t?(this.ht=Ht.deflate_process,this.dt=Ht.deflate_last_consumed,this.yt=Ht.deflate_end,this.gt=Ht.deflate_new(),n="gzip"===e?Ht.deflate_init_gzip(this.gt,i):"deflate-raw"===e?Ht.deflate_init_raw(this.gt,i):Ht.deflate_init(this.gt,i)):"deflate64-raw"===e?(this.ht=Ht.inflate9_process,this.dt=Ht.inflate9_last_consumed,this.yt=Ht.inflate9_end,this.gt=Ht.inflate9_new(),n=Ht.inflate9_init_raw(this.gt)):(this.ht=Ht.inflate_process,this.dt=Ht.inflate_last_consumed,this.yt=Ht.inflate_end,this.gt=Ht.inflate_new(),n="deflate-raw"===e?Ht.inflate_init_raw(this.gt):"gzip"===e?Ht.inflate_init_gzip(this.gt):Ht.inflate_init(this.gt)),0!==n)throw new r("init failed:"+n)}catch(t){throw f(this),t}},transform(e,n){try{const i=e,c=new o(Nt.buffer),f=this.ht,l=this.dt,w=this.wt,u=this.ut;let h=0;for(;h<i.length;){const e=s.min(i.length-h,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&Ft&&(Ft(this.in),this.in=0),this.in=Zt(e),this.inBufferSize=e,!this.in))throw new r("allocation failed");c.set(i.subarray(h,h+e),this.in);const o=f(this.gt,this.in,e,w,a,0),p=16777215&o;if(p&&(u.set(c.subarray(w,w+p),0),n.enqueue(u.slice(0,p))),!t){const t=o>>24&255,e=128&t?t-256:t;if(0>e)throw new r("process error:"+e)}const d=l(this.gt);if(0===d)break;h+=d}}catch(t){f(this),n.error(t)}},flush(e){try{const n=new o(Nt.buffer),s=this.ht,i=this.wt,c=this.ut;for(;;){const o=s(this.gt,0,0,i,a,4),f=16777215&o,l=o>>24&255;if(!t){const t=128&l?l-256:l;if(0>t)throw new r("process error:"+t)}if(f&&(c.set(n.subarray(i,i+f),0),e.enqueue(c.slice(0,f))),1===l||0===f)break}}catch(t){e.error(t)}finally{const t=f(this);0!==t&&e.error(new r("end error:"+t))}},cancel(){f(this)}});function f(t){let e=0;return t.gt&&t.yt&&(e=t.yt(t.gt)),t.gt=0,t.in&&Ft&&Ft(t.in),t.in=0,t.wt&&Ft&&Ft(t.wt),t.wt=0,e}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if("start"==e&&Gt(t),e==_t){const t=Et.get(n);Et.delete(n),t({value:new o(s),done:r})}if("ack"==e){const t=Lt.get(n);Lt.delete(n),t()}e==Bt&&Ot.abort()}catch(t){Qt(t)}});class Yt{constructor(t="deflate",e){return Xt(!0,t,e)}}class $t{constructor(t="deflate",e){return Xt(!1,t,e)}}Yt.St=!0,$t.St=!0;let te=!1;self.initModule=async t=>{try{const e=await(async(t,{baseURI:e})=>{if(!te){let n,s;try{try{s=new URL(t,e)}catch{}const r=await fetch(s);n=await r.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=(t=>{const e=t.split(",")[1],n=atob(e),s=n.length,r=new o(s);for(let t=0;s>t;++t)r[t]=n.charCodeAt(t);return r.buffer})(t)}(t=>{if(Ht=t,({malloc:Zt,free:Ft,memory:Nt}=Ht),"function"!=typeof Zt||"function"!=typeof Ft||!Nt)throw Ht=Zt=Ft=Nt=null,new r("Invalid WASM module")})((await WebAssembly.instantiate(n)).instance.exports),te=!0}})(t.wasmURI,t);return t.nt=Yt,t.rt=$t,e}catch{}}});\n';t({workerURI:t=>{const n="text/javascript";if(t){const t=new Blob([e],{type:n});return URL.createObjectURL(t)}return"data:"+n+","+encodeURIComponent(e)}})}(y)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[88,926],{69540(e,t,s){var i=s(5482),r=s(69622),n=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),l=s(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},l=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,s]of l)e.set(t,s,0)}return u}};return r=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A);s.d(t,["OU",0,h,"Pw",0,c])},60999(e,t,s){s.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var i=s(5482),r=s(69622),n=s(97768),o=s(17676),a=s(10107),l=s(64108);function u(e,t,s){return(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))}async function h(e,t,s){return(await(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function y(e,t){return new m(e,t)}let m=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},75503(e,t,s){s.d(t,{wq:()=>a});var i=s(4576),r=s(21818),n=(s(44208),s(15142)),o=s(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(),b.prune(),w.prune(),C.prune(),I.prune()}all(e){l(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(v(e,s))for(b.clear();s;){for(let r=0,n=s.children.length;r<n;r++){const n=s.children[r],o=s.leaf?i(n):n;v(e,o)&&(s.leaf?t(n):g(e,o)?l(n,t):b.push(n))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!v(e,t))return!1;for(b.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],n=t.leaf?s(r):r;if(v(e,n)){if(t.leaf||g(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;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 F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),I.clear();s||C.length>0;){if(s||(s=C.pop(),n=C.data[C.length-1],o=I.pop()??0,a=!0),s.leaf&&(t=(0,i.qh)(s.children,(0,r.z)(e),s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),C.push(s),this._condense(C),this;a||s.leaf||!g(s,l)?n?(o++,s=n.children[o],a=!1):s=null:(C.push(s),I.push(o),o=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const r=s-t+1;let n=this._maxEntries;if(r<=n){const i=new F(e.slice(t,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(i-1)));const o=new T([]);o.height=i;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,s,l,this._compareMinX);for(let r=t;r<=s;r+=l){const t=Math.min(r+l-1,s);x(e,r,t,a,this._compareMinY);for(let s=r;s<=t;s+=a){const r=Math.min(s+a-1,t);o.children.push(this._build(e,s,r,i-1))}}return u(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,r=s?e:i(e);C.clear();const n=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=f(o),l=m(e,o)-a;l<r?(r=l,i=a<i?a:i,s=o):l===r&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(r,this._data,t,C);for(n.children.push(e),c(n,r);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)c(t.data[i],e)}(r,C,t)}_split(e,t){const s=e.data[t],i=s.children.length,r=this._minEntries;this._chooseSplitAxis(s,r,i);const n=this._chooseSplitIndex(s,r,i);if(!n)return;const o=s.children.splice(n,s.children.length-n),a=s.leaf?new F(o):new T(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,r,n;i=r=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),l=_(t,a),u=f(t)+f(a);l<i?(i=l,n=o,r=u<r?u:r):l===i&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,r)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const r=this._toBBox,n=h(e,0,t,r),o=h(e,s-t,s,r);let a=y(n)+y(o);for(let i=t;i<s-t;i++){const t=e.children[i];c(n,e.leaf?r(t):t),a+=y(n)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];c(o,e.leaf?r(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,i.qh)(n,s,n.length,r.indexHint),1)}else this.clear();else u(s,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 s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t((0,r.z)(e));else w.pushArray(s.children);s=w.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<s;o++)n=e.children[o],c(r,e.leaf?i(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(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 _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-s)*Math.max(0,n-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,r){const n=[t,s];for(;n.length;){const t=n.pop(),s=n.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,a,s,t,r),n.push(s,a,a,t)}}const b=new n.A,w=new n.A,C=new n.A,I=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,s){s.d(t,{C_:()=>d,on:()=>c,wB:()=>l,z7:()=>u});var i=s(37955),r=s(36563),n=s(97768),o=s(17676),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let r=null;const o=s.once?(e,s)=>{i(e)&&((0,n.xt)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return r}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),s(e)}const p=l(e,(e,s)=>{c(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((i,n)=>{a=(0,r.vE)([(0,o.u7)(s,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),i(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559),s.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},48526(e,t,s){s.d(t,{A:()=>m});var i,r=s(5482),n=s(4576),o=s(4718),a=s(91429),l=s(5443),u=s(91075),h=s(86738),c=s(16930),d=s(90634),p=s(47610),f=s(56993),y=s(43937);let m=i=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=c.A.WGS84,{...e,hasM:s,hasZ:i,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,d.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:s,hasZ:r}=this;return new i({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:s,hasZ:r})}equals(e){if(this===e)return!0;if(null==e)return!1;const t=this.spatialReference,s=e.spatialReference;return null!=t==(null!=s)&&!(null!=t&&null!=s&&!t.equals(s))&&(0,n.aI)(this.points,e.points,p.v6)}addPoint(e){return(0,f.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],s={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(s.z=t[2],i=3),this.hasM&&(s.m=t[i]),new h.A(s)}removePoint(e){if(!this._validateInputs(e))return null;const t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,f.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,r.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,r.Cg)([(0,y.K)("points")],m.prototype,"writePoints",null),m=i=(0,r.Cg)([(0,a.$K)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,s){s.d(t,{A:()=>f});var i,r=s(5482),n=s(4718),o=s(91429),a=s(5443),l=s(91075),u=s(86738),h=s(16930),c=s(90634),d=s(56993),p=s(43937);let f=i=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=h.A.WGS84,{...e,hasM:s,hasZ:i,paths:t,spatialReference:r}}(e)),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(e,t){t.curvePaths=(0,n.o8)(e)}get extent(){const e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,n.o8)(this.paths)}addPath(e){if(!e)return;const t=this.paths,s=t.length;if(function(e){return!Array.isArray(e[0])}(e)){const i=[];for(let t=0,s=e.length;t<s;t++)i[t]=e[t].toArray();t[s]=i}else t[s]=e.slice();return this.notifyChange("paths"),this}clone(){const e=new i;return e.spatialReference=this.spatialReference,e.paths=(0,n.o8)(this.paths),e.curvePaths=(0,n.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const s=this.paths[e][t],i=this.hasZ,r=this.hasM;return i&&!r?new u.A(s[0],s[1],s[2],void 0,this.spatialReference):r&&!i?new u.A(s[0],s[1],void 0,s[2],this.spatialReference):i&&r?new u.A(s[0],s[1],s[2],s[3],this.spatialReference):new u.A(s[0],s[1],this.spatialReference)}insertPoint(e,t,s){return this._validateInputs(e,t,!0)?((0,d.h)(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[e].splice(t,0,s),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],s=this.spatialReference,i=t.map(e=>new u.A(e,s));return this.notifyChange("paths"),i}removePoint(e,t){if(!this._validateInputs(e,t))return null;const s=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),s}setPoint(e,t,s){return this._validateInputs(e,t)?((0,d.h)(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[e][t]=s,this.notifyChange("paths"),this):this}_validateInputs(e,t,s=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){const i=this.paths[e];if(s&&(t<0||t>i.length))return!1;if(!s&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],f.prototype,"curvePaths",void 0),(0,r.Cg)([(0,p.K)("curvePaths")],f.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],f.prototype,"paths",void 0),(0,r.Cg)([(0,p.K)("paths")],f.prototype,"writePaths",null),f=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],f),f.prototype.toJSON.isDefaultToJSON=!0},60408(e,t,s){function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":i(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}s.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>i,fT:()=>n,uW:()=>l})},65864(e,t,s){s.d(t,{rS:()=>h,xD:()=>d});var i=s(5443),r=s(91075),n=s(48526),o=s(86738),a=s(39829),l=s(82799),u=s(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?i.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:i.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},6518(e,t,s){s.d(t,{F:()=>a});var i=s(44208),r=s(75503),n=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new 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((s,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,n.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,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(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()))}}},39357(e,t,s){s.d(t,{A:()=>a});var i,r=s(5482),n=s(25482),o=s(91429);let a=i=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,s){s.d(t,{A:()=>h});var i,r=s(5482),n=s(4718),o=s(91429),a=s(39357),l=s(76357),u=s(93223);let h=class extends l.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some(e=>(String(e.code)===s&&(t=e.name),!!t))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,s){s.d(t,{A:()=>u});var i=s(5482),r=s(66552),n=s(25482),o=s(91429),a=s(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,s){s.d(t,{A:()=>f});var i,r=s(5482),n=s(66552),o=s(25482),a=s(91429),l=s(56507),u=s(8631),h=s(98453),c=s(36005),d=s(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let f=class extends o.o{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?p.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],f.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],f.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],f.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],f)},41628(e,t,s){s.d(t,{A:()=>l});var i,r=s(5482),n=s(91429),o=s(76357),a=s(93223);let l=class extends o.A{static{i=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new i({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,s){s.d(t,{r:()=>d,g:()=>c});var i,r=s(53177),n=s(76357),o=s(5482),a=s(91429),l=s(93223);let u=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=s(41628);const c={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":r.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,s){const i=new(s(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"});s.d(t,["m",0,i])},31756(e,t,s){var i=s(86211),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)};s.d(t,["j",0,n])},63746(e,t,s){function i(e){return class{constructor(){for(const t of e)this[t]=null}}}function r(e,t=1){const{transform:s,hasZ:i,hasM:r}=e;if(null==s)return i&&1!==t?e=>{e[2]*=t}:null;const[n,o]=function(e,t,s,i){let{scale:r,translate:n,originPosition:o}=e;return"upperLeft"===o&&(r=r.map((e,t)=>1===t?-e:e)),t&&(r=r.map((e,t)=>2===t?e*i:e),n=n.map((e,t)=>2===t?e*i:e)),!t&&s&&(r=r.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[r,n]}(s,i,r,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}s.d(t,{M:()=>r,_:()=>i})},2272(e,t,s){s.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var i=s(92602),r=s(70333),n=s(4718),o=s(84952),a=s(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,s){const i={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))i[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(s?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?n:JSON.stringify(n);else i[r]=n}return i}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([s.e(7632),s.e(9283),s.e(148)]).then(s.bind(s,50148));const l=await r.id.getCredential(e,n);return l?.token}},926(e,t,s){s.d(t,{Dd:()=>d,Jn:()=>p,Qc:()=>f,getApiKey:()=>h,getSessionToken:()=>c});var i=s(92602),r=s(11254),n=s(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function h(e){if(!f(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),s=i.A.apiKeys;if(Array.isArray(s.scopes))for(const e of s.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return s.basemapStyles&&o.test(e)?s.basemapStyles:i.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?i.A.apiKey:null}async function c(e){if(!i.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=h(e);if(!t)return null;u&&await u;const{styleFamily:s="arcgis",autoRefresh:n,duration:a=43200}=i.A.sessions.basemap,c=`${t}:${s}`,d=l.get(c);if(d&&(!n||d.endTime>Date.now()))return d.sessionToken;let p;u=(0,r.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:s,token:t}});try{p=(await u).data,p.endTime-=5e3,l.set(c,p)}finally{u=null}return p.sessionToken}function d(){return null!=i.A.apiKey||null!=i.A.apiKeys.basemapStyles}function p(e,t){return t?f(e):null!=h(e)}function f(e){const t=(0,n.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},88625(e,t,s){s.d(t,{A:()=>g});var i,r=s(5482),n=s(69540),o=s(66552),a=s(25482),l=s(97768),u=s(91429),h=s(30524);let c=i=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var p=s(16271),f=s(36005),y=s(43937);const m=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),_=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,f.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,y.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:p.KQ,json:{type:String,read:_.read,write:_.write}})],g.prototype,"unit",null),g=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],g)},16271(e,t,s){s.d(t,{Ao:()=>n});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}();s.d(t,["KQ",0,o])},20401(e,t,s){s.r(t),s.d(t,{default:()=>Oe});var i=s(5482),r=s(65529),n=s(17676),o=s(36708),a=s(91429),l=s(79897),u=s(16930),h=s(65864),c=s(4576),d=s(49186),p=s(53966),f=s(87992),y=s(70328),m=s(6518),_=s(50498),g=s(69397),v=s(27647);class x{constructor(e=null,t={},s,i,r=0,n=null){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=r,this.distance=n}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance)}get usedMemory(){return 128+(0,g.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,f.JR)(this.geometry)),this.centroid}}const b={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,s)=>new x((0,f.Nh)(_.gy.fromJSON(s),t),e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry&&(0,f.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var w=s(51441);const C=(0,y.vt)();class I{constructor(e,t,s){this.geometryType=e,this.hasZ=t,this.hasM=s,this._boundsStore=new m.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=b}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,r]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:r,spatialReference:(0,w.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,y.Jt)(C,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,f.NO)(e.geometry,i)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,f.NO)(i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(s)??0,s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var M=s(75752),S=s(87045),F=s(72802),T=s(97552),A=s(88625),P=s(66344),B=s(91869),O=s(86211),R=s(52006),Z=s(16271);function E(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new q(e,s)}return new j}class j{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class q{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new P.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,O.G9)(t),o=i*((0,Z.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o,t.curve&&((0,R.yP)(t.curve)[2]+=o);continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,B.tE)(i,t.objectId,X).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=N(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new Y(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=N(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class Y{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function N(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function X(){return[]}class k{filter(e,t){return t}notifyElevationSourceChange(){}}class V{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(z);return o.sort(H),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":G(i,t,s);continue;case"vertex":L(i,t,s);continue}return e}}function z(e){return e.distance<=1}function J(e=!1){return e?new V:new k}function G(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;if(e.curve)throw new Error("Curves are not yet supported.");e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+r*u,c=s.y+n*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function L(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function H(e,t){return e.distance-t.distance}var $=s(4718),K=s(799);function U(e=!1,t){return e?new Q(t):new D}class D{async fetch(){return[]}notifySymbologyChange(){}}class Q{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new P.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=W(t),n=r.get(e);if(n)for(const e of n)i.push((0,$.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=W(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,$.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function W(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,K.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,K.Wm)(r).toString()}default:return""}}var ee=s(69622),te=s(60999),se=s(3483),ie=s(13069),re=s(5443),ne=s(19419),oe=s(92722),ae=s(54339);class le{constructor(){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 le;return 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}}var ue=s(60694),he=s(62815),ce=s(63746);class de{constructor(e){this._options=e,this.featureSet=new le,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=de._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=(0,ae.W)(e,this._idInfo);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:s}of t)s&&(s.spatialReference=e);this.featureSet.transform=null}feature(){this._attributesClass??=(0,ce._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new x(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(e){const{hasZ:t,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new oe.A([],e,t,s)}geometry(e,t,s){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:i,hasM:r}=this.featureSet;i??=!1,r??=!1,this._vertex=[0,0],i&&this._vertex.push(0),r&&this._vertex.push(0);const n=_.gy.fromJSON(t);this._isPolygon="polygon"===n;const o=Number(this._isPolygon),a="point"===n?1:s.reduce((e,t)=>e+t-o,0),l="point"===n?0:s.length;if(this._geometry=(0,f.V2)(n,a,l,i,r,!1),this._push=i?r?de._pushXYZM:de._pushXYZ:r?de._pushXYM:de._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let e=0;e<l;++e)this._geometry.partOffsets[e+1]=this._geometry.partOffsets[e]+s[e]-o}this._ringEndsAt=o?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=this._geometry}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(t),this._push(this)))}curvedGeometry(e,t,s,i){let{hasZ:r,hasM:n}=this.featureSet;r??=!1,n??=!1,this._i=this._iVertex=this._iPart=0;const o=_.gy.fromJSON(e);this._isPolygon="polygon"===o;const a=Number(!this._isPolygon),l=t.length;let u=0,h=0,c=a*l;for(let e=0;e<s.length;++e)switch(c+=i[e],s[e]){case 1:case 3:u+=i[e];continue;case 2:h+=i[e]}this._geometry=(0,f.V2)(o,c,l,r,n,!0,u,h);const{partOffsets:d}=this._geometry;d[0]=0;for(let e=0,s=0;e<l;++e){d[e+1]=d[e]+a;for(let r=0;r<t[e];++r)d[e+1]+=i[s++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(e){}finishCurvedPart(e){this._isPolygon||(this._transform(e,this._vertex),this._push(this)),++this._iPart}lineSegment(e,t){this._transform(e,this._vertex),this._push(this)}bezierSegment(e,t,s,i){this._transform(e,this._vertex),this._push(this),this._transformXY(t,ye.b[0]),this._transformXY(s,ye.b[1]),this._transformXY(i,ye.b[2]),this._i=(0,f.tr)(this._vertex,ye,this._geometry,this._iVertex-1,this._i)}circularArcSegment(e,t,s){this._transform(e,this._vertex),this._push(this),this._transformXY(t,pe.c[0]),this._transformXY(s,pe.c[1]),this._i=(0,f.e6)(this._vertex,pe,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(e,t,s,i,r,n,o,a){this._transform(e,this._vertex),this._push(this),this._transformXY(t,fe.a[0]),this._transformXY(s,fe.a[1]),fe.a[2]=i,fe.a[3]=r,fe.a[4]=n,fe.a[5]=o,fe.a[6]=a,this._i=(0,f._s)(this._vertex,fe,this._geometry,this._iVertex-1,this._i)}static _pushXY(e){const t=e._iVertex++,{vertexXY:s}=e._geometry;[s[2*t],s[2*t+1]]=e._vertex}static _pushXYZ(e){const t=e._iVertex++,{vertexXY:s,vertexZ:i}=e._geometry;[s[2*t],s[2*t+1],i[t]]=e._vertex}static _pushXYM(e){const t=e._iVertex++,{vertexXY:s,vertexM:i}=e._geometry;[s[2*t],s[2*t+1],i[t]]=e._vertex}static _pushXYZM(e){const t=e._iVertex++,{vertexXY:s,vertexM:i,vertexZ:r}=e._geometry;[s[2*t],s[2*t+1],r[t],i[t]]=e._vertex}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:s,transform:i}=this.featureSet,r=s?(0,he.d)(e,t):1;this._transformInPlace??=(0,ce.M)(this.featureSet,r),this._transformInPlaceXY??=(0,ce.M)({transform:i})}_transform(e,t){for(let s=0;s<e.length;++s)t[s]=e[s];this._transformInPlace?.(t)}_transformXY(e,t){t[0]=e[0],t[1]=e[1],this._transformInPlaceXY?.(t)}}const pe={c:[[0,0],[0,0]]},fe={a:[[0,0],[0,0],0,0,0,0,0]},ye={b:[[0,0],[0,0],[0,0]]};var me=s(80893);class _e{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,te.UT)(async e=>{const s=await(0,te.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,te.UT)(async s=>{const i=await(0,te.DZ)(t.fetchFeatures(this,e.featureCount,s));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,i.ok?i.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let ge=class extends ee.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,se.KC)(e,this._mandatoryOutFields);(0,se.aI)(s,t)||(this._set("outFields",s),(0,se.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this._updatingHandles.addWhen(()=>!this.suspended,()=>this._process())}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},s=(0,te.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,ue.Wo)(this.url))return;const e=(0,te.UT)(async e=>{try{const t=await(0,me.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=re.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.consumePromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const s=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.consumePromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<be}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(we/(s*s))<Ce}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<2&&this._updatingHandles.consumePromise(s.process(e)),s.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new _e(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:xe,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,ie.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,ie.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])}),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this;return await(0,me.IJ)(this.url,e,new de({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:xe,signal:t})}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this;return function({exceededTransferLimit:e,features:t,fields:s,geometryType:i,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const u=new le;u.exceededTransferLimit=e??!1;for(const e of t??[]){let t,s;i&&(t=e.geometry&&(0,f.ME)(e.geometry),s=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l),n=void 0;u.features.push(new x(t,e.attributes,s,r,n,e.distance))}return u.fields=s??u.fields,u.geometryType=i??null,u.hasM=r??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,me.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:xe,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,i=(0,se.KC)((0,se.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,this.capabilities.data.supportsTrueCurve&&(!this.capabilities.query.supportsFormatPBF||this.capabilities.query.supportsFormatPBFWithCurves)&&(t.returnTrueCurves=!0),null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,ne.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||ve);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"url",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"currentVersion",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"globalIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"store",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_minimumVerticesPerFeature",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"_mandatoryOutFields",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"outFields",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"suspended",void 0),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"_historicMoment",void 0),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"filter",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"customParameters",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_configuration",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"tileInfo",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"tileSize",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"tilesOfInterest",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"availability",void 0),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"hasZ",null),ge=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ge);const ve=2e3,xe=6e5,be=1e6,we=25,Ce=1;s(44208);class Ie{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const s=this._priorities.get(e);if(null==s||s<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[s,i]of this._store)if(!t.has(s)&&e(i,s))return!0;for(const[s]of t){const t=this._store.get(s);if(t&&e(t,s))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let Me=class extends ee.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new m.F,this._tiles=new Ie,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,ne.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,se.E$)(e,t),new Set(Object.keys(s[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(s.map(e=>e.objectId)),i),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds)if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||(0,se.Yy)(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new Se(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)1===this._unreferenceFeature(s)&&t.push(s);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const e of i){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,ne.Ie)(this._tmpBoundingRect);const t=(0,f.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.key.id,s.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,ne.HY)((0,ne.VY)(this.extent,this._tmpBoundingRect),e.extent))return new Te(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new Te(e);if(this._hasAttributesForTile(e.id,s))return new Te(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,me.gW)(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new Fe(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new Fe(e.level+1,n,o);s.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<Pe&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s;this._forEachLeaf(e,e=>{const i=this._tiles.get(e.id);if(i){s=s?(0,se.E$)(s,i.attributeKeys):new Set(i.attributeKeys);for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new Ae(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const n=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),n):this._collectMissingTilesRecurse(r,t,n,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],Me.prototype,"featureStore",void 0),(0,i.Cg)([(0,a.MZ)()],Me.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],Me.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],Me.prototype,"maximumByteSize",void 0),Me=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Me);class Se{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class Fe extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class Te{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,ne.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Ae{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new Te(t),null!=s&&(this._extent=(0,ne.VY)(s))}addMissing(e,t,s,i){const r=new F.U(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,ne.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,ne.Wc)(r.extent))}}const Pe=.18751;let Be=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=Promise.withResolvers(),this._elevationAligner=E(),this._elevationFilter=J(),this._symbologyCandidatesFetcher=U(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new I(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new M.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:s},timeInfo:i}),this._featureFetcher=new ge({store:new Me({featureStore:this._featureStore}),url:e.serviceInfo.url,currentVersion:e.serviceInfo.currentVersion,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=E(l,{elevationInfo:null!=e.elevationInfo?A.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=J(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Re}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Re}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Re}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e,t){const s=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:s}};const{distance:i,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:i,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:s,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),i=t?.signal,r=await this._queryEngine.executeQueryForSnapping(s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?S.A.fromJSON(e.tileInfo):null,Re}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Re}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Re}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Re}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Re}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Re}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Re}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=U(e,this._getSymbologyCandidates),Re}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],Be.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)()],Be.prototype,"_isInitializing",void 0),Be=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Be);const Oe=Be,Re={result:{}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[88,926],{69540(e,t,s){var i=s(5482),r=s(69622),n=(s(44208),s(4718)),o=(s(53966),s(97768)),a=s(88620),l=s(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},l=new Map;for(const t in s){const o=s[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,s]of l)e.set(t,s,0)}return u}};return r=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A);s.d(t,["OU",0,h,"Pw",0,c])},60999(e,t,s){s.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var i=s(5482),r=s(69622),n=s(97768),o=s(17676),a=s(10107),l=s(64108);function u(e,t,s){return(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))}async function h(e,t,s){return(await(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function y(e,t){return new m(e,t)}let m=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},75503(e,t,s){s.d(t,{wq:()=>a});var i=s(4576),r=s(21818),n=(s(44208),s(15142)),o=s(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(),b.prune(),w.prune(),C.prune(),I.prune()}all(e){l(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(v(e,s))for(b.clear();s;){for(let r=0,n=s.children.length;r<n;r++){const n=s.children[r],o=s.leaf?i(n):n;v(e,o)&&(s.leaf?t(n):g(e,o)?l(n,t):b.push(n))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!v(e,t))return!1;for(b.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],n=t.leaf?s(r):r;if(v(e,n)){if(t.leaf||g(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;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 F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),I.clear();s||C.length>0;){if(s||(s=C.pop(),n=C.data[C.length-1],o=I.pop()??0,a=!0),s.leaf&&(t=(0,i.qh)(s.children,(0,r.z)(e),s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),C.push(s),this._condense(C),this;a||s.leaf||!g(s,l)?n?(o++,s=n.children[o],a=!1):s=null:(C.push(s),I.push(o),o=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const r=s-t+1;let n=this._maxEntries;if(r<=n){const i=new F(e.slice(t,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(i-1)));const o=new T([]);o.height=i;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,s,l,this._compareMinX);for(let r=t;r<=s;r+=l){const t=Math.min(r+l-1,s);x(e,r,t,a,this._compareMinY);for(let s=r;s<=t;s+=a){const r=Math.min(s+a-1,t);o.children.push(this._build(e,s,r,i-1))}}return u(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,r=s?e:i(e);C.clear();const n=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=f(o),l=m(e,o)-a;l<r?(r=l,i=a<i?a:i,s=o):l===r&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(r,this._data,t,C);for(n.children.push(e),c(n,r);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)c(t.data[i],e)}(r,C,t)}_split(e,t){const s=e.data[t],i=s.children.length,r=this._minEntries;this._chooseSplitAxis(s,r,i);const n=this._chooseSplitIndex(s,r,i);if(!n)return;const o=s.children.splice(n,s.children.length-n),a=s.leaf?new F(o):new T(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,r,n;i=r=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),l=_(t,a),u=f(t)+f(a);l<i?(i=l,n=o,r=u<r?u:r):l===i&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,r)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const r=this._toBBox,n=h(e,0,t,r),o=h(e,s-t,s,r);let a=y(n)+y(o);for(let i=t;i<s-t;i++){const t=e.children[i];c(n,e.leaf?r(t):t),a+=y(n)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];c(o,e.leaf?r(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,i.qh)(n,s,n.length,r.indexHint),1)}else this.clear();else u(s,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 s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t((0,r.z)(e));else w.pushArray(s.children);s=w.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<s;o++)n=e.children[o],c(r,e.leaf?i(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(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 _(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-s)*Math.max(0,n-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,r){const n=[t,s];for(;n.length;){const t=n.pop(),s=n.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,a,s,t,r),n.push(s,a,a,t)}}const b=new n.A,w=new n.A,C=new n.A,I=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,s){s.d(t,{C_:()=>d,on:()=>c,wB:()=>l,z7:()=>u});var i=s(37955),r=s(36563),n=s(97768),o=s(17676),a=s(14012);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let r=null;const o=s.once?(e,s)=>{i(e)&&((0,n.xt)(r),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(r=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return r}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),s(e)}const p=l(e,(e,s)=>{c(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((i,n)=>{a=(0,r.vE)([(0,o.u7)(s,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),i(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559),s.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},48526(e,t,s){s.d(t,{A:()=>m});var i,r=s(5482),n=s(4576),o=s(4718),a=s(91429),l=s(5443),u=s(91075),h=s(86738),c=s(16930),d=s(90634),p=s(47610),f=s(56993),y=s(43937);let m=i=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=c.A.WGS84,{...e,hasM:s,hasZ:i,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=(0,d.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){const{points:e,spatialReference:t,hasM:s,hasZ:r}=this;return new i({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:s,hasZ:r})}equals(e){if(this===e)return!0;if(null==e)return!1;const t=this.spatialReference,s=e.spatialReference;return null!=t==(null!=s)&&!(null!=t&&null!=s&&!t.equals(s))&&(0,n.aI)(this.points,e.points,p.v6)}addPoint(e){return(0,f.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],s={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(s.z=t[2],i=3),this.hasM&&(s.m=t[i]),new h.A(s)}removePoint(e){if(!this._validateInputs(e))return null;const t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?((0,f.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,r.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],m.prototype,"points",void 0),(0,r.Cg)([(0,y.K)("points")],m.prototype,"writePoints",null),m=i=(0,r.Cg)([(0,a.$K)("esri.geometry.Multipoint")],m),m.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,s){s.d(t,{A:()=>f});var i,r=s(5482),n=s(4718),o=s(91429),a=s(5443),l=s(91075),u=s(86738),h=s(16930),c=s(90634),d=s(56993),p=s(43937);let f=i=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:s,hasZ:i,spatialReference:r}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:i??=!0,s??=!0;break;case 3:i??=!0!==s,s??=!i;break;default:i??=!1,s??=!1}return r??=h.A.WGS84,{...e,hasM:s,hasZ:i,paths:t,spatialReference:r}}(e)),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(e,t){t.curvePaths=(0,n.o8)(e)}get extent(){const e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,n.o8)(this.paths)}addPath(e){if(!e)return;const t=this.paths,s=t.length;if(function(e){return!Array.isArray(e[0])}(e)){const i=[];for(let t=0,s=e.length;t<s;t++)i[t]=e[t].toArray();t[s]=i}else t[s]=e.slice();return this.notifyChange("paths"),this}clone(){const e=new i;return e.spatialReference=this.spatialReference,e.paths=(0,n.o8)(this.paths),e.curvePaths=(0,n.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const s=this.paths[e][t],i=this.hasZ,r=this.hasM;return i&&!r?new u.A(s[0],s[1],s[2],void 0,this.spatialReference):r&&!i?new u.A(s[0],s[1],void 0,s[2],this.spatialReference):i&&r?new u.A(s[0],s[1],s[2],s[3],this.spatialReference):new u.A(s[0],s[1],this.spatialReference)}insertPoint(e,t,s){return this._validateInputs(e,t,!0)?((0,d.h)(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[e].splice(t,0,s),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],s=this.spatialReference,i=t.map(e=>new u.A(e,s));return this.notifyChange("paths"),i}removePoint(e,t){if(!this._validateInputs(e,t))return null;const s=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),s}setPoint(e,t,s){return this._validateInputs(e,t)?((0,d.h)(this,s),Array.isArray(s)||(s=s.toArray()),this.paths[e][t]=s,this.notifyChange("paths"),this):this}_validateInputs(e,t,s=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){const i=this.paths[e];if(s&&(t<0||t>i.length))return!1;if(!s&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],f.prototype,"curvePaths",void 0),(0,r.Cg)([(0,p.K)("curvePaths")],f.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],f.prototype,"paths",void 0),(0,r.Cg)([(0,p.K)("paths")],f.prototype,"writePaths",null),f=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],f),f.prototype.toJSON.isDefaultToJSON=!0},60408(e,t,s){function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":i(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}s.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>i,fT:()=>n,uW:()=>l})},65864(e,t,s){s.d(t,{rS:()=>h,xD:()=>d});var i=s(5443),r=s(91075),n=s(48526),o=s(86738),a=s(39829),l=s(82799),u=s(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?i.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:i.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},6518(e,t,s){s.d(t,{F:()=>a});var i=s(44208),r=s(75503),n=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new 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((s,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,n.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,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(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()))}}},39357(e,t,s){s.d(t,{A:()=>a});var i,r=s(5482),n=s(25482),o=s(91429);let a=i=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,s){s.d(t,{A:()=>h});var i,r=s(5482),n=s(4718),o=s(91429),a=s(39357),l=s(76357),u=s(93223);let h=class extends l.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some(e=>(String(e.code)===s&&(t=e.name),!!t))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=i=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,s){s.d(t,{A:()=>u});var i=s(5482),r=s(66552),n=s(25482),o=s(91429),a=s(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,s){s.d(t,{A:()=>f});var i,r=s(5482),n=s(66552),o=s(25482),a=s(91429),l=s(56507),u=s(8631),h=s(98453),c=s(36005),d=s(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let f=class extends o.o{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?p.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],f.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],f.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],f.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],f)},41628(e,t,s){s.d(t,{A:()=>l});var i,r=s(5482),n=s(91429),o=s(76357),a=s(93223);let l=class extends o.A{static{i=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new i({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,s){s.d(t,{r:()=>d,g:()=>c});var i,r=s(53177),n=s(76357),o=s(5482),a=s(91429),l=s(93223);let u=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=s(41628);const c={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":r.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,s){const i=new(s(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"});s.d(t,["m",0,i])},31756(e,t,s){var i=s(86211),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)};s.d(t,["j",0,n])},63746(e,t,s){function i(e){return class{constructor(){for(const t of e)this[t]=null}}}function r(e,t=1){const{transform:s,hasZ:i,hasM:r}=e;if(null==s)return i&&1!==t?e=>{e[2]*=t}:null;const[n,o]=function(e,t,s,i){let{scale:r,translate:n,originPosition:o}=e;return"upperLeft"===o&&(r=r.map((e,t)=>1===t?-e:e)),t&&(r=r.map((e,t)=>2===t?e*i:e),n=n.map((e,t)=>2===t?e*i:e)),!t&&s&&(r=r.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[r,n]}(s,i,r,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}s.d(t,{M:()=>r,_:()=>i})},2272(e,t,s){s.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var i=s(92602),r=s(70333),n=s(4718),o=s(84952),a=s(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,s){const i={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))i[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(s?.[r]);i[r]=t?e:JSON.stringify(e)}else i[r]=t?n:JSON.stringify(n);else i[r]=n}return i}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&i.A.request.useIdentity&&await Promise.all([s.e(7632),s.e(7417),s.e(148)]).then(s.bind(s,50148));const l=await r.id.getCredential(e,n);return l?.token}},926(e,t,s){s.d(t,{Dd:()=>d,Jn:()=>p,Qc:()=>f,getApiKey:()=>h,getSessionToken:()=>c});var i=s(92602),r=s(11254),n=s(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function h(e){if(!f(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),s=i.A.apiKeys;if(Array.isArray(s.scopes))for(const e of s.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return s.basemapStyles&&o.test(e)?s.basemapStyles:i.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?i.A.apiKey:null}async function c(e){if(!i.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=h(e);if(!t)return null;u&&await u;const{styleFamily:s="arcgis",autoRefresh:n,duration:a=43200}=i.A.sessions.basemap,c=`${t}:${s}`,d=l.get(c);if(d&&(!n||d.endTime>Date.now()))return d.sessionToken;let p;u=(0,r.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:s,token:t}});try{p=(await u).data,p.endTime-=5e3,l.set(c,p)}finally{u=null}return p.sessionToken}function d(){return null!=i.A.apiKey||null!=i.A.apiKeys.basemapStyles}function p(e,t){return t?f(e):null!=h(e)}function f(e){const t=(0,n.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},88625(e,t,s){s.d(t,{A:()=>g});var i,r=s(5482),n=s(69540),o=s(66552),a=s(25482),l=s(97768),u=s(91429),h=s(30524);let c=i=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var p=s(16271),f=s(36005),y=s(43937);const m=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),_=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,f.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,y.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:p.KQ,json:{type:String,read:_.read,write:_.write}})],g.prototype,"unit",null),g=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],g)},16271(e,t,s){s.d(t,{Ao:()=>n});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}();s.d(t,["KQ",0,o])},20401(e,t,s){s.r(t),s.d(t,{default:()=>Oe});var i=s(5482),r=s(65529),n=s(17676),o=s(36708),a=s(91429),l=s(79897),u=s(16930),h=s(65864),c=s(4576),d=s(49186),p=s(53966),f=s(87992),y=s(70328),m=s(6518),_=s(50498),g=s(69397),v=s(27647);class x{constructor(e=null,t={},s,i,r=0,n=null){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=r,this.distance=n}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance)}get usedMemory(){return 128+(0,g.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,f.JR)(this.geometry)),this.centroid}}const b={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,s)=>new x((0,f.Nh)(_.gy.fromJSON(s),t),e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry&&(0,f.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var w=s(51441);const C=(0,y.vt)();class I{constructor(e,t,s){this.geometryType=e,this.hasZ=t,this.hasM=s,this._boundsStore=new m.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=b}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,r]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:r,spatialReference:(0,w.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,y.Jt)(C,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,f.NO)(e.geometry,i)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return p.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(s)??0;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,f.NO)(i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(s)??0,s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var M=s(75752),S=s(87045),F=s(72802),T=s(97552),A=s(88625),P=s(66344),B=s(91869),O=s(86211),R=s(52006),Z=s(16271);function E(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new q(e,s)}return new j}class j{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class q{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new P.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,O.G9)(t),o=i*((0,Z.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o,t.curve&&((0,R.yP)(t.curve)[2]+=o);continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,B.tE)(i,t.objectId,X).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=N(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new Y(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=N(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class Y{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function N(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function X(){return[]}class k{filter(e,t){return t}notifyElevationSourceChange(){}}class V{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(z);return o.sort(H),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":G(i,t,s);continue;case"vertex":L(i,t,s);continue}return e}}function z(e){return e.distance<=1}function J(e=!1){return e?new V:new k}function G(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;if(e.curve)throw new Error("Curves are not yet supported.");e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+r*u,c=s.y+n*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function L(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function H(e,t){return e.distance-t.distance}var $=s(4718),K=s(799);function U(e=!1,t){return e?new Q(t):new D}class D{async fetch(){return[]}notifySymbologyChange(){}}class Q{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new P.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=W(t),n=r.get(e);if(n)for(const e of n)i.push((0,$.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=W(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,$.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function W(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,K.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,K.Wm)(r).toString()}default:return""}}var ee=s(69622),te=s(60999),se=s(3483),ie=s(13069),re=s(5443),ne=s(19419),oe=s(92722),ae=s(54339);class le{constructor(){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 le;return 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}}var ue=s(60694),he=s(62815),ce=s(63746);class de{constructor(e){this._options=e,this.featureSet=new le,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=de._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=(0,ae.W)(e,this._idInfo);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:s}of t)s&&(s.spatialReference=e);this.featureSet.transform=null}feature(){this._attributesClass??=(0,ce._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new x(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(e){const{hasZ:t,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new oe.A([],e,t,s)}geometry(e,t,s){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:i,hasM:r}=this.featureSet;i??=!1,r??=!1,this._vertex=[0,0],i&&this._vertex.push(0),r&&this._vertex.push(0);const n=_.gy.fromJSON(t);this._isPolygon="polygon"===n;const o=Number(this._isPolygon),a="point"===n?1:s.reduce((e,t)=>e+t-o,0),l="point"===n?0:s.length;if(this._geometry=(0,f.V2)(n,a,l,i,r,!1),this._push=i?r?de._pushXYZM:de._pushXYZ:r?de._pushXYM:de._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let e=0;e<l;++e)this._geometry.partOffsets[e+1]=this._geometry.partOffsets[e]+s[e]-o}this._ringEndsAt=o?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=this._geometry}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(t),this._push(this)))}curvedGeometry(e,t,s,i){let{hasZ:r,hasM:n}=this.featureSet;r??=!1,n??=!1,this._i=this._iVertex=this._iPart=0;const o=_.gy.fromJSON(e);this._isPolygon="polygon"===o;const a=Number(!this._isPolygon),l=t.length;let u=0,h=0,c=a*l;for(let e=0;e<s.length;++e)switch(c+=i[e],s[e]){case 1:case 3:u+=i[e];continue;case 2:h+=i[e]}this._geometry=(0,f.V2)(o,c,l,r,n,!0,u,h);const{partOffsets:d}=this._geometry;d[0]=0;for(let e=0,s=0;e<l;++e){d[e+1]=d[e]+a;for(let r=0;r<t[e];++r)d[e+1]+=i[s++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(e){}finishCurvedPart(e){this._isPolygon||(this._transform(e,this._vertex),this._push(this)),++this._iPart}lineSegment(e,t){this._transform(e,this._vertex),this._push(this)}bezierSegment(e,t,s,i){this._transform(e,this._vertex),this._push(this),this._transformXY(t,ye.b[0]),this._transformXY(s,ye.b[1]),this._transformXY(i,ye.b[2]),this._i=(0,f.tr)(this._vertex,ye,this._geometry,this._iVertex-1,this._i)}circularArcSegment(e,t,s){this._transform(e,this._vertex),this._push(this),this._transformXY(t,pe.c[0]),this._transformXY(s,pe.c[1]),this._i=(0,f.e6)(this._vertex,pe,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(e,t,s,i,r,n,o,a){this._transform(e,this._vertex),this._push(this),this._transformXY(t,fe.a[0]),this._transformXY(s,fe.a[1]),fe.a[2]=i,fe.a[3]=r,fe.a[4]=n,fe.a[5]=o,fe.a[6]=a,this._i=(0,f._s)(this._vertex,fe,this._geometry,this._iVertex-1,this._i)}static _pushXY(e){const t=e._iVertex++,{vertexXY:s}=e._geometry;[s[2*t],s[2*t+1]]=e._vertex}static _pushXYZ(e){const t=e._iVertex++,{vertexXY:s,vertexZ:i}=e._geometry;[s[2*t],s[2*t+1],i[t]]=e._vertex}static _pushXYM(e){const t=e._iVertex++,{vertexXY:s,vertexM:i}=e._geometry;[s[2*t],s[2*t+1],i[t]]=e._vertex}static _pushXYZM(e){const t=e._iVertex++,{vertexXY:s,vertexM:i,vertexZ:r}=e._geometry;[s[2*t],s[2*t+1],r[t],i[t]]=e._vertex}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:s,transform:i}=this.featureSet,r=s?(0,he.d)(e,t):1;this._transformInPlace??=(0,ce.M)(this.featureSet,r),this._transformInPlaceXY??=(0,ce.M)({transform:i})}_transform(e,t){for(let s=0;s<e.length;++s)t[s]=e[s];this._transformInPlace?.(t)}_transformXY(e,t){t[0]=e[0],t[1]=e[1],this._transformInPlaceXY?.(t)}}const pe={c:[[0,0],[0,0]]},fe={a:[[0,0],[0,0],0,0,0,0,0]},ye={b:[[0,0],[0,0],[0,0]]};var me=s(80893);class _e{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,te.UT)(async e=>{const s=await(0,te.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,te.UT)(async s=>{const i=await(0,te.DZ)(t.fetchFeatures(this,e.featureCount,s));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,i.ok?i.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let ge=class extends ee.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,se.KC)(e,this._mandatoryOutFields);(0,se.aI)(s,t)||(this._set("outFields",s),(0,se.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this._updatingHandles.addWhen(()=>!this.suspended,()=>this._process())}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},s=(0,te.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,ue.Wo)(this.url))return;const e=(0,te.UT)(async e=>{try{const t=await(0,me.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=re.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),p.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.consumePromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const s=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.consumePromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<be}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(we/(s*s))<Ce}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<2&&this._updatingHandles.consumePromise(s.process(e)),s.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new _e(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:xe,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,ie.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,ie.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])}),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this;return await(0,me.IJ)(this.url,e,new de({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:xe,signal:t})}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this;return function({exceededTransferLimit:e,features:t,fields:s,geometryType:i,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const u=new le;u.exceededTransferLimit=e??!1;for(const e of t??[]){let t,s;i&&(t=e.geometry&&(0,f.ME)(e.geometry),s=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l),n=void 0;u.features.push(new x(t,e.attributes,s,r,n,e.distance))}return u.fields=s??u.fields,u.geometryType=i??null,u.hasM=r??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,me.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:xe,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,i=(0,se.KC)((0,se.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,this.capabilities.data.supportsTrueCurve&&(!this.capabilities.query.supportsFormatPBF||this.capabilities.query.supportsFormatPBFWithCurves)&&(t.returnTrueCurves=!0),null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,ne.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||ve);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"url",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"currentVersion",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"globalIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"store",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_minimumVerticesPerFeature",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"_mandatoryOutFields",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"outFields",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"suspended",void 0),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"_historicMoment",void 0),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"filter",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"customParameters",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_configuration",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"tileInfo",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"tileSize",null),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"tilesOfInterest",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"availability",void 0),(0,i.Cg)([(0,a.MZ)()],ge.prototype,"hasZ",null),ge=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ge);const ve=2e3,xe=6e5,be=1e6,we=25,Ce=1;s(44208);class Ie{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const s=this._priorities.get(e);if(null==s||s<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[s,i]of this._store)if(!t.has(s)&&e(i,s))return!0;for(const[s]of t){const t=this._store.get(s);if(t&&e(t,s))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let Me=class extends ee.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new m.F,this._tiles=new Ie,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,ne.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,se.E$)(e,t),new Set(Object.keys(s[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(s.map(e=>e.objectId)),i),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds)if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const s=this._tiles.get(e);if(s)return!s.objectIds.size||(0,se.Yy)(t,s.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new Se(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)1===this._unreferenceFeature(s)&&t.push(s);this.featureStore.removeManyById(t);const s=e.key.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const{features:i}=await t(e,s);for(const e of i){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,ne.Ie)(this._tmpBoundingRect);const t=(0,f.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.key.id,s.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,ne.HY)((0,ne.VY)(this.extent,this._tmpBoundingRect),e.extent))return new Te(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new Te(e);if(this._hasAttributesForTile(e.id,s))return new Te(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,me.gW)(t,s,i),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const s=new Fe(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new Fe(e.level+1,n,o);s.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<Pe&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s;this._forEachLeaf(e,e=>{const i=this._tiles.get(e.id);if(i){s=s?(0,se.E$)(s,i.attributeKeys):new Set(i.attributeKeys);for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new Ae(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,i);if(r&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,s));const n=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),n):this._collectMissingTilesRecurse(r,t,n,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],Me.prototype,"featureStore",void 0),(0,i.Cg)([(0,a.MZ)()],Me.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],Me.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],Me.prototype,"maximumByteSize",void 0),Me=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Me);class Se{constructor(e,t,s){this.key=e,this.objectIds=t,this.attributeKeys=s}}class Fe extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class Te{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,ne.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Ae{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new Te(t),null!=s&&(this._extent=(0,ne.VY)(s))}addMissing(e,t,s,i){const r=new F.U(e,t,s);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,ne.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,ne.Wc)(r.extent))}}const Pe=.18751;let Be=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=Promise.withResolvers(),this._elevationAligner=E(),this._elevationFilter=J(),this._symbologyCandidatesFetcher=U(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new I(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new M.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:s},timeInfo:i}),this._featureFetcher=new ge({store:new Me({featureStore:this._featureStore}),url:e.serviceInfo.url,currentVersion:e.serviceInfo.currentVersion,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=E(l,{elevationInfo:null!=e.elevationInfo?A.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=J(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Re}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Re}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Re}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e,t){const s=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:s}};const{distance:i,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:i,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:s,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),i=t?.signal,r=await this._queryEngine.executeQueryForSnapping(s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?S.A.fromJSON(e.tileInfo):null,Re}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Re}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Re}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Re}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Re}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Re}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Re}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=U(e,this._getSymbologyCandidates),Re}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],Be.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)()],Be.prototype,"_isInitializing",void 0),Be=(0,i.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Be);const Oe=Be,Re={result:{}}}}]);