@arcgis/core 4.34.0-next.21 → 4.34.0-next.22

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 (94) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{bcaf6edf887e4afbbdd2.js → 02dc6e31b1244e5bb785.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{871fae52d2fddc9e7794.js → 04c17957c15234ca0321.js} +1 -1
  4. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +1 -0
  5. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +1 -0
  6. package/assets/esri/core/workers/chunks/{822b32aaeec05a347c84.js → 0ba6177ba118a0f032e2.js} +1 -1
  7. package/assets/esri/core/workers/chunks/12723e79b996969e304e.js +1 -0
  8. package/assets/esri/core/workers/chunks/{bd7b985f7962b1cc7b8a.js → 146520d263b910b5bdc7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{445ddf57d2f503a0b98b.js → 15064c3b21b325d5c2f6.js} +1 -1
  10. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +346 -0
  11. package/assets/esri/core/workers/chunks/{82a5000296134834d1ac.js → 1d75cb1747ffb7b8b050.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{55ce214a10fb6fc2e901.js → 24fe862b607ec927e07f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/30fae1f066dc3cd781f1.js +1 -0
  14. package/assets/esri/core/workers/chunks/{7ec73f63929b1623de72.js → 3793f282ddaccd3465f2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +1 -0
  16. package/assets/esri/core/workers/chunks/{5e7f35bf1aab93cb1c52.js → 4cea5170939c8d363ef7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5253cca467fe9bc0a210.js +1 -0
  18. package/assets/esri/core/workers/chunks/{735d96d2b951cc1df3a3.js → 576e408fb0834f3948e8.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{2a784da5fa3f502d1803.js → 58e74681ddef30ba9cb6.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{27c9d3f6cebca087a123.js → 6136bf09950adc46bc33.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{dfd9ac2e28c96900c53e.js → 6c33ecffbc783cb8f944.js} +1 -1
  22. package/assets/esri/core/workers/chunks/6ca764b4baadef5c1515.js +1 -0
  23. package/assets/esri/core/workers/chunks/{fcdf714339060731fe1c.js → 7051bcc178eb512819f6.js} +1 -1
  24. package/assets/esri/core/workers/chunks/7cfba5cec425221962e8.js +1 -0
  25. package/assets/esri/core/workers/chunks/{3a753ce4de2e6ad40f7b.js → 86d6007c45f2aa643ac8.js} +1 -1
  26. package/assets/esri/core/workers/chunks/92ad9098006568358550.js +1 -0
  27. package/assets/esri/core/workers/chunks/{2ed698579befe73caafd.js → 94d75f3b215e3bd1b4d7.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{15d1ab71aaf6bcf3145b.js → a7a5b89c2bb69f3af59c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/b4512d62b6cb26fc6b25.js +1 -0
  30. package/assets/esri/core/workers/chunks/{63e984a65ee670449a4a.js → b4bb461955a4c2bce072.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{abc75c945f3cfb1629b0.js → ba5b24beebeb703b5919.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{51afd0e71df1825d7593.js → c64fa94cba71ba2794e2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/c94cc026c4ed330408fb.js +1 -0
  34. package/assets/esri/core/workers/chunks/cab1a1067f44ce374673.js +1 -0
  35. package/assets/esri/core/workers/chunks/{3f4a8c874c022dace9be.js → d1b363c418a67b087306.js} +1 -1
  36. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +1 -0
  37. package/assets/esri/core/workers/chunks/{f806e9221dff7fcfc2f9.js → e2cb295104ed2f8cd2ff.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{273ff53a68714e4daad5.js → e49a135a2933306a6105.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{d31fa648497b0af97dc1.js → e9a9174c4d1a0a9effb6.js} +1 -1
  40. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +1 -0
  41. package/assets/esri/core/workers/chunks/{fc8bbc571216edd9ef5a.js → f3e3c2340452c1d60c95.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{85b0e2a898251d048dda.js → f42155b7a4e6c5e80757.js} +1 -1
  43. package/assets/esri/core/workers/chunks/f43110391f124b8a179c.js +1009 -0
  44. package/assets/esri/core/workers/chunks/{080a8a1c6fe2d215142d.js → fb5e2b1ced03eef28e96.js} +1 -1
  45. package/assets/esri/core/workers/chunks/fe73e74e3e4278aedcc3.js +1 -0
  46. package/config.js +1 -1
  47. package/core/Clonable.js +1 -1
  48. package/core/lang.js +1 -1
  49. package/geometry/Mesh.js +1 -1
  50. package/geometry/support/MeshComponent.js +1 -1
  51. package/geometry/support/MeshMaterial.js +1 -1
  52. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  53. package/geometry/support/MeshTexture.js +1 -1
  54. package/geometry/support/MeshTransform.js +1 -1
  55. package/geometry/support/MeshVertexAttributes.js +1 -1
  56. package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
  57. package/geometry/support/meshUtils/merge.js +1 -1
  58. package/geometry/support/meshUtils/meshCloneUtils.js +5 -0
  59. package/interfaces.d.ts +94 -10
  60. package/kernel.js +1 -1
  61. package/package.json +1 -1
  62. package/support/revision.js +1 -1
  63. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  64. package/views/3d/state/GoToOperation.js +1 -1
  65. package/views/3d/state/ViewStateManager.js +1 -1
  66. package/views/3d/support/cameraUtils.js +1 -1
  67. package/views/3d/support/viewingModeUtils.js +5 -0
  68. package/views/3d/support/viewpointUtils.js +1 -1
  69. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  70. package/views/3d/terrain/OverlayManager.js +1 -1
  71. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  72. package/views/3d/terrain/OverlayRenderer.js +1 -1
  73. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  74. package/views/3d/webgl.d.ts +2 -0
  75. package/views/3d/webgl.js +1 -1
  76. package/views/support/layerViewUtils.js +1 -1
  77. package/widgets/Editor/Edits.js +1 -1
  78. package/assets/esri/core/workers/chunks/06c3725d6cc21e7e4bcf.js +0 -1
  79. package/assets/esri/core/workers/chunks/0f5643d5437f48c63225.js +0 -1
  80. package/assets/esri/core/workers/chunks/1c7393bcd6e85ba25e1b.js +0 -1
  81. package/assets/esri/core/workers/chunks/2e3f620c79ec04033a6e.js +0 -1
  82. package/assets/esri/core/workers/chunks/48953ddf0bbcf3d77e04.js +0 -1
  83. package/assets/esri/core/workers/chunks/5b7464137aacf1c5fd78.js +0 -1
  84. package/assets/esri/core/workers/chunks/7925e8ffa8027b59410e.js +0 -1
  85. package/assets/esri/core/workers/chunks/8235a997acb45ab43173.js +0 -1
  86. package/assets/esri/core/workers/chunks/9d2cb559dd9af4e1727c.js +0 -1
  87. package/assets/esri/core/workers/chunks/9eb1a171f5ef1fef42ed.js +0 -346
  88. package/assets/esri/core/workers/chunks/bac5e1d50b69f0d94694.js +0 -1
  89. package/assets/esri/core/workers/chunks/bcefb413d03d59506b5a.js +0 -1009
  90. package/assets/esri/core/workers/chunks/c317819ab0544c50c078.js +0 -1
  91. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +0 -1
  92. package/assets/esri/core/workers/chunks/cb4c49d5b70f9563bc46.js +0 -1
  93. package/assets/esri/core/workers/chunks/e9aa1d9ded8a52a40c57.js +0 -1
  94. package/assets/esri/core/workers/chunks/f65ad6a41c0c69bf1b21.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7346],{431:(t,n,e)=>{e.d(n,{o6:()=>R,HY:()=>P,hx:()=>y,Jb:()=>U});var r=e(9318);function o(t,n,e){const r=n/3,o=new Uint32Array(e+1),i=new Uint32Array(e+1),a=(t,n)=>{t<n?o[t+1]++:i[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];a(e,r),a(r,o),a(o,e)}let s=0,c=0;for(let t=0;t<e;t++){const n=o[t+1],e=i[t+1];o[t+1]=s,i[t+1]=c,s+=n,c+=e}const u=new Uint32Array(6*r),l=o[e],h=(t,n,e)=>{if(t<n){const r=o[t+1]++;u[2*r]=n,u[2*r+1]=e}else{const r=i[n+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];h(e,r,n),h(r,o,n),h(o,e,n)}const f=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=u[e+2*t],r=u[e+2*t+1];let o=t-1;for(;o>=0&&u[e+2*o]>n;o--)u[e+2*o+2]=u[e+2*o],u[e+2*o+3]=u[e+2*o+1];u[e+2*o+2]=n,u[e+2*o+3]=r}};for(let t=0;t<e;t++)f(o[t],o[t+1]),f(l+i[t],l+i[t+1]);const d=new Int32Array(3*r),g=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,M=(t,n)=>{const e=g(t,n);d[3*n+e]=-1},p=(t,n,e,r)=>{const o=g(t,n);d[3*n+o]=r;const i=g(e,r);d[3*r+i]=n};for(let t=0;t<e;t++){let n=o[t];const e=o[t+1];let r=i[t];const a=i[t+1];for(;n<e&&r<a;){const e=u[2*n],o=u[2*l+2*r];e===o?(p(t,u[2*n+1],o,u[2*l+2*r+1]),n++,r++):e<o?(M(t,u[2*n+1]),n++):(M(o,u[2*l+2*r+1]),r++)}for(;n<e;)M(t,u[2*n+1]),n++;for(;r<a;)M(u[2*l+2*r],u[2*l+2*r+1]),r++}return d}var i=e(1843),a=e(46540),s=e(3055),c=e(87811),u=e(38954),l=e(51850),h=e(4431),f=e(34727);function d(t,n,e,r,o,i=2){const a=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),s=e*a,c=r*a,u=o<=0?(s>=0?1:-1)*(1-Math.abs(c)):s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(s)):c,h=n*i;t[h]=g(u),t[h+1]=g(l)}function g(t){return(0,f.qE)(Math.round(32767*t),-32767,32767)}e(11868),e(34275);class M{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:E}write(t,n,e){v.seed=this._edgeHashFunction(e);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,r),t.variantStroke.set(n,o),t.variantExtension.set(n,a)}}const p=new Float32Array(6),m=new Uint32Array(p.buffer),N=new Uint32Array(1);function E(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],N[0]=31*(31*(31*(31*(31*(166811+m[0])+m[1])+m[2])+m[3])+m[4])+m[5],N[0]}function A(t){const n=p;n[0]=O(t.position0[0]),n[1]=O(t.position0[1]),n[2]=O(t.position0[2]),n[3]=O(t.position1[0]),n[4]=O(t.position1[1]),n[5]=O(t.position1[2]),N[0]=5381;for(let t=0;t<m.length;t++)N[0]=31*N[0]+m[t];return N[0]}const I=1e4;function O(t){return Math.round(t*I)/I}class T{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.gr.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,u.f)(b,e.faceNormal0,e.faceNormal1),(0,u.n)(b,b);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,b[0],b[1],b[2],o)}static{this.Layout=s.gr}static{this.glLayout=(0,h.U)(s.gr,1)}}class S{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.In.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;d(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],o)}}static{this.Layout=s.In}static{this.glLayout=(0,h.U)(s.In,1)}}const b=(0,l.vt)(),v=new c.A;var _=e(93406);function R(t){const n=y(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return D.updateSettings(t.writerSettings),w.updateSettings(t.writerSettings),(0,_.K)(n,D,w)}function y(t,n,e,i){if(n){const n=o(e,i,t.count);return new L(e,i,n,t)}const a=(0,r.b)(t.buffer,t.stride/4,{originalIndices:e}),c=o(a.indices,i,a.uniqueCount);return{faces:a.indices,facesLength:a.indices.length,neighbors:c,vertices:s.I$.createView(a.buffer)}}class L{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const D=new T,w=new S,U=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1),P=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1).u16(a.r.COMPONENTINDEX)},3055:(t,n,e)=>{e.d(n,{I$:()=>a,In:()=>u,gr:()=>c});var r=e(4431),o=e(1843),i=e(46540);const a=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),s=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(s),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},3694:(t,n,e)=>{e.d(n,{A:()=>s});var r,o=e(4576),i=e(21818);!function(t){const n=(t,n,e,r)=>{let o=n,i=n;const a=e>>>1,s=t[o-1];for(;i<=a;){i=o<<1,i<e&&r(t[i-1],t[i])<0&&++i;const n=t[i-1];if(r(n,s)<=0)break;t[o-1]=n,o=i}t[o-1]=s},e=(t,n)=>t<n?-1:t>n?1:0;t.sort=function(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i);const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i)}},t.iterableSort=function*(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i),yield;const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i),yield}}}(r||(r={}));const a=r;class s{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new o.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const n=new Array;for(let e=0;e<this._length;e++){const r=this.data[e];t(r)&&n.push(r)}return n}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,n){const e=this.data.indexOf(t,n);return-1!==e&&e<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let n=t;n<this._length;++n)this.data[n]=this._deallocator(this.data[n]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,n=t.length){for(let e=0;e<n;e++)this.data[this._length++]=t[e]}fill(t,n){for(let e=0;e<n;e++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const n=(0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==n)return this.data.splice(n,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,n=t.length,e){this.length=(0,o.mW)(this.data,t,this.length,n,this._hint,e),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,n){if(t>=this.length||n>=this.length||t===n)return;const e=this.data[t];this.data[t]=this.data[n],this.data[n]=e}sort(t){a.sort(this.data,0,this.length,t)}iterableSort(t){return a.iterableSort(this.data,0,this.length,t)}some(t,n){for(let e=0;e<this.length;++e)if(t.call(n,this.data[e],e,this.data))return!0;return!1}find(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)if(t.call(n,e[o]))return e[o]}filterInPlace(t,n){let e=0;for(let r=0;r<this._length;++r){const o=this.data[r];t.call(n,o,r,this.data)&&(this.data[r]=this.data[e],this.data[e]=o,e++)}if(this._deallocator)for(let t=e;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=e,this._shrink(),this}forAll(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)t.call(n,e[o],o,e)}forEach(t,n){this.data.slice(0,this.length).forEach(t,n)}map(t,n){const e=new Array(this.length);for(let r=0;r<this.length;++r)e[r]=t.call(n,this.data[r],r,this.data);return e}reduce(t,n){let e=n;for(let n=0;n<this.length;++n)e=t(e,this.data[n],n,this.data);return e}has(t){const n=this.length,e=this.data;for(let r=0;r<n;++r)if(e[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},4431:(t,n,e)=>{e.d(n,{U:()=>i});var r=e(63907),o=e(74038);function i(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map(r=>{const i=t.fields.get(r),s=i.constructor.ElementCount,c=a(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,s,c,u,e,l,n)})}function a(t){const n=s[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const s={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f16:r.pe.HALF_FLOAT,f32:r.pe.FLOAT}},9318:(t,n,e)=>{e.d(n,{b:()=>i});var r=e(34727),o=e(97146);function i(t,n,e){const i=Array.isArray(t),l=i?t.length/n:t.byteLength/(4*n),h=i?t:new Uint32Array(t,0,l*n),f=e?.minReduction??0,d=e?.originalIndices||null,g=d?d.length:0,M=e?.componentOffsets||null;let p=0;if(M)for(let t=0;t<M.length-1;t++){const n=M[t+1]-M[t];n>p&&(p=n)}else p=l;const m=Math.floor(1.1*p)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,r.cU)(2*m)));for(let t=0;t<2*m;t++)u[t]=0;let N=0;const E=!!M&&!!d,A=E?g:l;let I=(0,o.my)(l);const O=new Uint32Array(g),T=1.96;let S=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):A,b=1,v=M?M[1]:A;for(let t=0;t<A;t++){if(t===S){const n=1-N/t;if(n+T*Math.sqrt(n*(1-n)/t)<f)return null;S*=2}if(t===v){for(let t=0;t<2*m;t++)u[t]=0;if(d)for(let t=M[b-1];t<M[b];t++)O[t]=I[d[t]];v=M[++b]}const e=E?d[t]:t,r=e*n,o=c(h,r,n);let i=o%m,s=N;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(a(h,r,t*n,n)){s=I[t];break}}i++,i>=m&&(i-=m)}s===N&&(u[2*i]=o,u[2*i+1]=e+1,N++),I[e]=s}if(0!==f&&1-N/l<f)return null;if(E){for(let t=M[b-1];t<O.length;t++)O[t]=I[d[t]];I=(0,o.uW)(O)}const _=i?new Array(N):new Uint32Array(N*n);N=0;for(let t=0;t<A;t++)I[t]===N&&(s(h,(E?d[t]:t)*n,_,N*n,n),N++);if(d&&!E){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=I[d[n]];I=(0,o.uW)(t)}return{buffer:Array.isArray(_)?_:_.buffer,indices:I,uniqueCount:N}}function a(t,n,e,r){for(let o=0;o<r;o++)if(t[n+o]!==t[e+o])return!1;return!0}function s(t,n,e,r,o){for(let i=0;i<o;i++)e[r+i]=t[n+i]}function c(t,n,e){let r=0;for(let o=0;o<e;o++)r=t[n+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},34304:(t,n,e)=>{e.d(n,{DF:()=>c,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,a=Math.PI/180,s=180/Math.PI;function c(t){return t*a}function u(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:u,toRadian:c},Symbol.toStringTag,{value:"Module"}))},34727:(t,n,e)=>{e.d(n,{$8:()=>O,Cc:()=>a,Hx:()=>M,Io:()=>I,KJ:()=>u,Sp:()=>f,XM:()=>l,YN:()=>h,ZH:()=>g,cU:()=>o,gg:()=>d,hs:()=>s,kU:()=>c,or:()=>S,pF:()=>v,pq:()=>b,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function a(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return a(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function f(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function d(t,n,e=1e-6){return!f(t,n,e)&&t>n}function g(t,n,e=1e-6){return!f(t,n,e)&&t<n}function M(t,n,e=1e-6){return f(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return p.setFloat64(0,t),p.getBigInt64(0)}const N=BigInt("1000000"),E=A(1);function A(t){const n=m(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=N?N:n-N);return Math.abs(t-e)}function I(t,n,e=E){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&A(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=m(t),o=m(n);return r<0==o<0&&!((r<o?o-r:r-o)>N)}function O(t){return T(Math.max(-b,Math.min(t,b)))}function T(t){return r[0]=t,r[0]}function S(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(f(n,1)&&f(e,1)&&f(r,1))}const b=T(34028234663852886e22);function v(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},38954:(t,n,e)=>{e.d(n,{A:()=>g,B:()=>d,C:()=>l,D:()=>h,E:()=>U,F:()=>F,H:()=>B,a:()=>P,b:()=>m,c:()=>a,d:()=>u,e:()=>S,f:()=>c,g:()=>p,h:()=>b,i:()=>s,j:()=>N,k:()=>A,l:()=>i,m:()=>v,n:()=>T,o:()=>R,q:()=>w,r:()=>O,s:()=>E,t:()=>_,u:()=>I,v:()=>y,w:()=>f,x:()=>V,y:()=>z,z:()=>M});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function c(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function g(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function m(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function N(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function E(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function A(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function I(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function O(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function T(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function b(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2];return t[0]=o*c-i*s,t[1]=i*a-r*c,t[2]=r*s-o*a,t}function v(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function _(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function R(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function y(t,n,e){const r=e[0],o=e[1],i=e[2],a=e[3],s=n[0],c=n[1],u=n[2],l=o*u-i*c,h=i*s-r*u,f=r*c-o*s,d=o*f-i*h,g=i*l-r*f,M=r*h-o*l,p=2*a;return t[0]=s+l*p+2*d,t[1]=c+h*p+2*g,t[2]=u+f*p+2*M,t}const L=(0,r.vt)(),D=(0,r.vt)();function w(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function U(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const P=u,C=l,x=h,F=N,V=E,B=i,z=A;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:c,angle:function(t,n){T(L,t),T(D,n);const e=S(L,D);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const a=1-i,s=a*a,c=i*i,u=s*a,l=3*i*s,h=3*c*a,f=c*i;return t[0]=n[0]*u+e[0]*l+r[0]*h+o[0]*f,t[1]=n[1]*u+e[1]*l+r[1]*h+o[1]*f,t[2]=n[2]*u+e[2]*l+r[2]*h+o[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:b,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=o*c-i*s,l=i*a-r*c,h=r*s-o*a,f=Math.sqrt(u*u+l*l+h*h);return t[0]=u/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:F,distance:N,div:x,divide:h,dot:S,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],s=n[1],c=n[2],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))},exactEquals:w,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const a=i*i,s=a*(2*i-3)+1,c=a*(i-2)+i,u=a*(i-1),l=a*(3-2*i);return t[0]=n[0]*s+e[0]*c+r[0]*u+o[0]*l,t[1]=n[1]*s+e[1]*c+r[1]*u+o[1]*l,t[2]=n[2]*s+e[2]*c+r[2]*u+o[2]*l,t},inverse:O,len:B,length:i,lerp:v,max:M,min:g,mul:C,multiply:l,negate:I,normalize:T,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:m,set:s,sign:d,sqrDist:V,sqrLen:z,squaredDistance:E,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:P,subtract:u,transformMat3:R,transformMat4:_,transformQuat:y},Symbol.toStringTag,{value:"Module"}))},46540:(t,n,e)=>{var r;e.d(n,{r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},48163:(t,n,e)=>{function r(){return[0,0]}function o(t,n){return[t,n]}function i(){return o(1,1)}function a(){return o(1,0)}function s(){return o(0,1)}e.d(n,{Un:()=>c,fA:()=>o,vt:()=>r});const c=i(),u=a(),l=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:l,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:o,ones:i,unitX:a,unitY:s,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,n,e)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function a(t,n,e){return[t,n,e]}function s(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}e.d(n,{CN:()=>a,Cb:()=>p,Cw:()=>g,JP:()=>M,Un:()=>d,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>f,vt:()=>r});const f=[0,0,0],d=c(),g=u(),M=l(),p=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:g,UNIT_Y:M,UNIT_Z:p,ZEROS:f,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},71936:(t,n,e)=>{e.r(n),e.d(n,{default:()=>c});var r=e(1843);function o(t,n){return n.push(t.buffer),{buffer:t.buffer,layout:new r.l5(t.layout)}}var i=e(3055),a=e(93406),s=e(431);class c{async extract(t){const n=u(t),e=(0,s.o6)(n),r=[n.data.buffer];return{result:l(e,r),transferList:r}}async extractComponentsEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,f).regular.instancesData,r),transferList:r}}async extractEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,h).regular.instancesData,r),transferList:r}}}function u(t){return{data:i.I$.createView(t.dataBuffer),indices:"Uint32Array"===t.indicesType?new Uint32Array(t.indices):"Uint16Array"===t.indicesType?new Uint16Array(t.indices):t.indices,indicesLength:t.indicesLength,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}function l(t,n){return n.push(t.regular.lodInfo.lengths.buffer),n.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:o(t.regular.instancesData,n),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:o(t.silhouette.instancesData,n),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}const h=new class{allocate(t){return s.Jb.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1)}},f=new class{allocate(t){return s.HY.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex)}}},74038:(t,n,e)=>{e.d(n,{_:()=>r});class r{constructor(t,n,e,r,o,i=!1,a=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=o,this.normalized=i,this.divisor=a}}},87317:(t,n,e)=>{e.d(n,{a:()=>E,b:()=>g,c:()=>o,d:()=>l,e:()=>A,g:()=>a,h:()=>p,j:()=>d,l:()=>m,n:()=>M,s:()=>i,t:()=>N});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function h(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+i*i)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function d(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function g(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function M(t,n){const e=n[0],r=n[1],o=n[2],i=n[3];let a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a),t}function p(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function m(t,n,e,r){const o=n[0],i=n[1],a=n[2],s=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=s+r*(e[3]-s),t}function N(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function A(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-s)<=h*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-l)<=h*Math.max(1,Math.abs(a),Math.abs(l))}const I=s,O=c,T=u,S=h,b=f,v=d,_=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:S,distance:h,div:T,divide:u,dot:p,equals:A,exactEquals:E,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:v,length:d,lerp:m,max:function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},mul:O,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:M,random:function(t,n=1){const e=r.Ov;let o,i,a,s,c,u;do{o=2*e()-1,i=2*e()-1,c=o*o+i*i}while(c>=1);do{a=2*e()-1,s=2*e()-1,u=a*a+s*s}while(u>=1);const l=Math.sqrt((1-c)/u);return t[0]=n*o,t[1]=n*i,t[2]=n*a*l,t[3]=n*s*l,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:l,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:b,sqrLen:_,squaredDistance:f,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:I,subtract:s,transformMat4:N,transformQuat:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=e[3],l=u*r+s*i-c*o,h=u*o+c*r-a*i,f=u*i+a*o-s*r,d=-a*r-s*o-c*i;return t[0]=l*u+d*-a+h*-c-f*-s,t[1]=h*u+d*-s+f*-a-l*-c,t[2]=f*u+d*-c+l*-s-h*-a,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},91829:(t,n,e)=>{function r(){return[0,0,0,0]}function o(t){return[t[0],t[1],t[2],t[3]]}function i(t,n,e,r){return[t,n,e,r]}function a(t,n,e,r){return[t,n,e,r]}function s(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1,1)}function u(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function h(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}e.d(n,{CN:()=>a,Un:()=>g,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0,0],g=c(),M=u(),p=l(),m=h(),N=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:N,UNIT_X:M,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitW:f,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,n,e)=>{e.d(n,{K:()=>c});var r=e(34727),o=e(3694),i=e(38954),a=e(51850);const s=-1;function c(t,n,e){const r=t.vertices.position,o=t.vertices.componentIndex,a=M.position0,c=M.position1,h=M.faceNormal0,d=M.faceNormal1,{edges:g,normals:p}=l(t),m=g.length/4,N=n.allocate(m);let E=0;const A=m,T=e?.allocate(A);let b=0,v=0,_=0;f.length=0;for(let t=0;t<m;++t){const n=4*t;r.getVec(g.data[n],a),r.getVec(g.data[n+1],c);const e=f.pushNew();e.index=4*t,e.length=(0,i.j)(a,c)}f.sort((t,n)=>n.length-t.length);const R=new Array,y=new Array;f.forAll(({length:t,index:l})=>{const f=g.data[l],m=g.data[l+1],A=g.data[l+2],L=g.data[l+3],D=L===s;if(r.getVec(f,a),r.getVec(m,c),D){const t=3*A;(0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),(0,i.c)(d,h),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d)}else{let t=3*A;if((0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),t=3*L,(0,i.i)(d,p.data[t],p.data[t+1],p.data[t+2]),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d),function(t,n){return t.cosAngle>n}(M,O))return;M.cosAngle<-.9999&&(0,i.c)(d,h)}v+=t,_++,D||function(t,n){return t.cosAngle<n}(M,S)?(n.write(N,E++,M),R.push(t)):u(M,I)&&(T&&e&&e.write(T,b++,M),y.push(t))});const L=new Float32Array(R.reverse()),D=new Float32Array(y.reverse()),w=T&&e?{instancesData:T.slice(0,b),lodInfo:{lengths:D}}:void 0;return{regular:{instancesData:N.slice(0,E),lodInfo:{lengths:L}},silhouette:w,averageEdgeLength:v/_}}function u(t,n){const e=(0,r.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),e*((0,i.e)((0,i.h)(p,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>n}function l(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors,o=t.vertices.position;d.length=g.length=0;for(let t=0;t<n;t++){const n=3*t,a=r[n],c=r[n+1],u=r[n+2],l=e[n],h=e[n+1],f=e[n+2];o.getVec(l,N),o.getVec(h,E),o.getVec(f,A),(0,i.d)(E,E,N),(0,i.d)(A,A,N),(0,i.h)(N,E,A),(0,i.n)(N,N),g.pushArray(N),(a===s||l<h)&&(d.push(l),d.push(h),d.push(t),d.push(a)),(c===s||h<f)&&(d.push(h),d.push(f),d.push(t),d.push(c)),(u===s||f<l)&&(d.push(f),d.push(l),d.push(t),d.push(u))}return{edges:d,normals:g}}class h{constructor(){this.index=0,this.length=0}}const f=new o.A({allocator:t=>t||new h,deallocator:null}),d=new o.A({deallocator:null}),g=new o.A({deallocator:null}),M=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},p=(0,a.vt)(),m=(0,a.vt)(),N=(0,a.vt)(),E=(0,a.vt)(),A=(0,a.vt)(),I=(0,r.kU)(4),O=Math.cos(I),T=(0,r.kU)(35),S=Math.cos(T)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7346],{431:(t,n,e)=>{e.d(n,{o6:()=>R,HY:()=>P,hx:()=>y,Jb:()=>U});var r=e(9318);function o(t,n,e){const r=n/3,o=new Uint32Array(e+1),i=new Uint32Array(e+1),a=(t,n)=>{t<n?o[t+1]++:i[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];a(e,r),a(r,o),a(o,e)}let s=0,c=0;for(let t=0;t<e;t++){const n=o[t+1],e=i[t+1];o[t+1]=s,i[t+1]=c,s+=n,c+=e}const u=new Uint32Array(6*r),l=o[e],h=(t,n,e)=>{if(t<n){const r=o[t+1]++;u[2*r]=n,u[2*r+1]=e}else{const r=i[n+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];h(e,r,n),h(r,o,n),h(o,e,n)}const f=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=u[e+2*t],r=u[e+2*t+1];let o=t-1;for(;o>=0&&u[e+2*o]>n;o--)u[e+2*o+2]=u[e+2*o],u[e+2*o+3]=u[e+2*o+1];u[e+2*o+2]=n,u[e+2*o+3]=r}};for(let t=0;t<e;t++)f(o[t],o[t+1]),f(l+i[t],l+i[t+1]);const d=new Int32Array(3*r),g=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,M=(t,n)=>{const e=g(t,n);d[3*n+e]=-1},p=(t,n,e,r)=>{const o=g(t,n);d[3*n+o]=r;const i=g(e,r);d[3*r+i]=n};for(let t=0;t<e;t++){let n=o[t];const e=o[t+1];let r=i[t];const a=i[t+1];for(;n<e&&r<a;){const e=u[2*n],o=u[2*l+2*r];e===o?(p(t,u[2*n+1],o,u[2*l+2*r+1]),n++,r++):e<o?(M(t,u[2*n+1]),n++):(M(o,u[2*l+2*r+1]),r++)}for(;n<e;)M(t,u[2*n+1]),n++;for(;r<a;)M(u[2*l+2*r],u[2*l+2*r+1]),r++}return d}var i=e(1843),a=e(46540),s=e(3055),c=e(87811),u=e(38954),l=e(51850),h=e(4431),f=e(34727);function d(t,n,e,r,o,i=2){const a=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),s=e*a,c=r*a,u=o<=0?(s>=0?1:-1)*(1-Math.abs(c)):s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(s)):c,h=n*i;t[h]=g(u),t[h+1]=g(l)}function g(t){return(0,f.qE)(Math.round(32767*t),-32767,32767)}e(11868),e(34275);class M{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:E}write(t,n,e){v.seed=this._edgeHashFunction(e);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,r),t.variantStroke.set(n,o),t.variantExtension.set(n,a)}}const p=new Float32Array(6),m=new Uint32Array(p.buffer),N=new Uint32Array(1);function E(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],N[0]=31*(31*(31*(31*(31*(166811+m[0])+m[1])+m[2])+m[3])+m[4])+m[5],N[0]}function A(t){const n=p;n[0]=O(t.position0[0]),n[1]=O(t.position0[1]),n[2]=O(t.position0[2]),n[3]=O(t.position1[0]),n[4]=O(t.position1[1]),n[5]=O(t.position1[2]),N[0]=5381;for(let t=0;t<m.length;t++)N[0]=31*N[0]+m[t];return N[0]}const I=1e4;function O(t){return Math.round(t*I)/I}class T{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.gr.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,u.f)(b,e.faceNormal0,e.faceNormal1),(0,u.n)(b,b);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,b[0],b[1],b[2],o)}static{this.Layout=s.gr}static{this.glLayout=(0,h.U)(s.gr,1)}}class S{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.In.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;d(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],o)}}static{this.Layout=s.In}static{this.glLayout=(0,h.U)(s.In,1)}}const b=(0,l.vt)(),v=new c.A;var _=e(93406);function R(t){const n=y(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return D.updateSettings(t.writerSettings),w.updateSettings(t.writerSettings),(0,_.K)(n,D,w)}function y(t,n,e,i){if(n){const n=o(e,i,t.count);return new L(e,i,n,t)}const a=(0,r.b)(t.buffer,t.stride/4,{originalIndices:e}),c=o(a.indices,i,a.uniqueCount);return{faces:a.indices,facesLength:a.indices.length,neighbors:c,vertices:s.I$.createView(a.buffer)}}class L{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const D=new T,w=new S,U=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1),P=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1).u16(a.r.COMPONENTINDEX)},3055:(t,n,e)=>{e.d(n,{I$:()=>a,In:()=>u,gr:()=>c});var r=e(4431),o=e(1843),i=e(46540);const a=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),s=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(s),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},3694:(t,n,e)=>{e.d(n,{A:()=>s});var r,o=e(4576),i=e(21818);!function(t){const n=(t,n,e,r)=>{let o=n,i=n;const a=e>>>1,s=t[o-1];for(;i<=a;){i=o<<1,i<e&&r(t[i-1],t[i])<0&&++i;const n=t[i-1];if(r(n,s)<=0)break;t[o-1]=n,o=i}t[o-1]=s},e=(t,n)=>t<n?-1:t>n?1:0;t.sort=function(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i);const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i)}},t.iterableSort=function*(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i),yield;const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i),yield}}}(r||(r={}));const a=r;class s{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new o.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const n=new Array;for(let e=0;e<this._length;e++){const r=this.data[e];t(r)&&n.push(r)}return n}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,n){const e=this.data.indexOf(t,n);return-1!==e&&e<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let n=t;n<this._length;++n)this.data[n]=this._deallocator(this.data[n]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,n=t.length){for(let e=0;e<n;e++)this.data[this._length++]=t[e]}fill(t,n){for(let e=0;e<n;e++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const n=(0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==n)return this.data.splice(n,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,n=t.length,e){this.length=(0,o.mW)(this.data,t,this.length,n,this._hint,e),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,n){if(t>=this.length||n>=this.length||t===n)return;const e=this.data[t];this.data[t]=this.data[n],this.data[n]=e}sort(t){a.sort(this.data,0,this.length,t)}iterableSort(t){return a.iterableSort(this.data,0,this.length,t)}some(t,n){for(let e=0;e<this.length;++e)if(t.call(n,this.data[e],e,this.data))return!0;return!1}find(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)if(t.call(n,e[o]))return e[o]}filterInPlace(t,n){let e=0;for(let r=0;r<this._length;++r){const o=this.data[r];t.call(n,o,r,this.data)&&(this.data[r]=this.data[e],this.data[e]=o,e++)}if(this._deallocator)for(let t=e;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=e,this._shrink(),this}forAll(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)t.call(n,e[o],o,e)}forEach(t,n){this.data.slice(0,this.length).forEach(t,n)}map(t,n){const e=new Array(this.length);for(let r=0;r<this.length;++r)e[r]=t.call(n,this.data[r],r,this.data);return e}reduce(t,n){let e=n;for(let n=0;n<this.length;++n)e=t(e,this.data[n],n,this.data);return e}has(t){const n=this.length,e=this.data;for(let r=0;r<n;++r)if(e[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},4431:(t,n,e)=>{e.d(n,{U:()=>i});var r=e(63907),o=e(74038);function i(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map(r=>{const i=t.fields.get(r),s=i.constructor.ElementCount,c=a(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,s,c,u,e,l,n)})}function a(t){const n=s[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const s={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f16:r.pe.HALF_FLOAT,f32:r.pe.FLOAT}},9318:(t,n,e)=>{e.d(n,{b:()=>i});var r=e(34727),o=e(97146);function i(t,n,e){const i=Array.isArray(t),l=i?t.length/n:t.byteLength/(4*n),h=i?t:new Uint32Array(t,0,l*n),f=e?.minReduction??0,d=e?.originalIndices||null,g=d?d.length:0,M=e?.componentOffsets||null;let p=0;if(M)for(let t=0;t<M.length-1;t++){const n=M[t+1]-M[t];n>p&&(p=n)}else p=l;const m=Math.floor(1.1*p)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,r.cU)(2*m)));for(let t=0;t<2*m;t++)u[t]=0;let N=0;const E=!!M&&!!d,A=E?g:l;let I=(0,o.my)(l);const O=new Uint32Array(g),T=1.96;let S=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):A,b=1,v=M?M[1]:A;for(let t=0;t<A;t++){if(t===S){const n=1-N/t;if(n+T*Math.sqrt(n*(1-n)/t)<f)return null;S*=2}if(t===v){for(let t=0;t<2*m;t++)u[t]=0;if(d)for(let t=M[b-1];t<M[b];t++)O[t]=I[d[t]];v=M[++b]}const e=E?d[t]:t,r=e*n,o=c(h,r,n);let i=o%m,s=N;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(a(h,r,t*n,n)){s=I[t];break}}i++,i>=m&&(i-=m)}s===N&&(u[2*i]=o,u[2*i+1]=e+1,N++),I[e]=s}if(0!==f&&1-N/l<f)return null;if(E){for(let t=M[b-1];t<O.length;t++)O[t]=I[d[t]];I=(0,o.uW)(O)}const _=i?new Array(N):new Uint32Array(N*n);N=0;for(let t=0;t<A;t++)I[t]===N&&(s(h,(E?d[t]:t)*n,_,N*n,n),N++);if(d&&!E){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=I[d[n]];I=(0,o.uW)(t)}return{buffer:Array.isArray(_)?_:_.buffer,indices:I,uniqueCount:N}}function a(t,n,e,r){for(let o=0;o<r;o++)if(t[n+o]!==t[e+o])return!1;return!0}function s(t,n,e,r,o){for(let i=0;i<o;i++)e[r+i]=t[n+i]}function c(t,n,e){let r=0;for(let o=0;o<e;o++)r=t[n+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},34304:(t,n,e)=>{e.d(n,{DF:()=>c,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,a=Math.PI/180,s=180/Math.PI;function c(t){return t*a}function u(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:u,toRadian:c},Symbol.toStringTag,{value:"Module"}))},34727:(t,n,e)=>{e.d(n,{$8:()=>O,Cc:()=>a,Hx:()=>M,Io:()=>I,KJ:()=>u,Sp:()=>f,XM:()=>l,YN:()=>h,ZH:()=>g,cU:()=>o,gg:()=>d,hs:()=>s,kU:()=>c,or:()=>S,pF:()=>v,pq:()=>b,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function a(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return a(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function f(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function d(t,n,e=1e-6){return!f(t,n,e)&&t>n}function g(t,n,e=1e-6){return!f(t,n,e)&&t<n}function M(t,n,e=1e-6){return f(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return p.setFloat64(0,t),p.getBigInt64(0)}const N=BigInt("1000000"),E=A(1);function A(t){const n=m(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=N?N:n-N);return Math.abs(t-e)}function I(t,n,e=E){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&A(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=m(t),o=m(n);return r<0==o<0&&!((r<o?o-r:r-o)>N)}function O(t){return T(Math.max(-b,Math.min(t,b)))}function T(t){return r[0]=t,r[0]}function S(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(f(n,1)&&f(e,1)&&f(r,1))}const b=T(34028234663852886e22);function v(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},38954:(t,n,e)=>{e.d(n,{A:()=>g,B:()=>d,C:()=>l,D:()=>h,E:()=>U,F:()=>F,H:()=>B,a:()=>P,b:()=>m,c:()=>a,d:()=>u,e:()=>S,f:()=>c,g:()=>p,h:()=>b,i:()=>s,j:()=>N,k:()=>A,l:()=>i,m:()=>v,n:()=>T,o:()=>R,q:()=>w,r:()=>O,s:()=>E,t:()=>_,u:()=>I,v:()=>y,w:()=>f,x:()=>V,y:()=>z,z:()=>M});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function c(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function g(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function m(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function N(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function E(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function A(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function I(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function O(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function T(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function b(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2];return t[0]=o*c-i*s,t[1]=i*a-r*c,t[2]=r*s-o*a,t}function v(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function _(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function R(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function y(t,n,e){const r=e[0],o=e[1],i=e[2],a=e[3],s=n[0],c=n[1],u=n[2],l=o*u-i*c,h=i*s-r*u,f=r*c-o*s,d=o*f-i*h,g=i*l-r*f,M=r*h-o*l,p=2*a;return t[0]=s+l*p+2*d,t[1]=c+h*p+2*g,t[2]=u+f*p+2*M,t}const L=(0,r.vt)(),D=(0,r.vt)();function w(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function U(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const P=u,C=l,x=h,F=N,V=E,B=i,z=A;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:c,angle:function(t,n){T(L,t),T(D,n);const e=S(L,D);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const a=1-i,s=a*a,c=i*i,u=s*a,l=3*i*s,h=3*c*a,f=c*i;return t[0]=n[0]*u+e[0]*l+r[0]*h+o[0]*f,t[1]=n[1]*u+e[1]*l+r[1]*h+o[1]*f,t[2]=n[2]*u+e[2]*l+r[2]*h+o[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:b,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=o*c-i*s,l=i*a-r*c,h=r*s-o*a,f=Math.sqrt(u*u+l*l+h*h);return t[0]=u/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:F,distance:N,div:x,divide:h,dot:S,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],s=n[1],c=n[2],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))},exactEquals:w,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const a=i*i,s=a*(2*i-3)+1,c=a*(i-2)+i,u=a*(i-1),l=a*(3-2*i);return t[0]=n[0]*s+e[0]*c+r[0]*u+o[0]*l,t[1]=n[1]*s+e[1]*c+r[1]*u+o[1]*l,t[2]=n[2]*s+e[2]*c+r[2]*u+o[2]*l,t},inverse:O,len:B,length:i,lerp:v,max:M,min:g,mul:C,multiply:l,negate:I,normalize:T,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:m,set:s,sign:d,sqrDist:V,sqrLen:z,squaredDistance:E,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:P,subtract:u,transformMat3:R,transformMat4:_,transformQuat:y},Symbol.toStringTag,{value:"Module"}))},46540:(t,n,e)=>{var r;e.d(n,{r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},48163:(t,n,e)=>{function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function a(){return i(1,1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{Un:()=>u,fA:()=>i,o8:()=>o,vt:()=>r});const u=a(),l=s(),h=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:l,UNIT_Y:h,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,ones:a,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,n,e)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function a(t,n,e){return[t,n,e]}function s(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}e.d(n,{CN:()=>a,Cb:()=>p,Cw:()=>g,JP:()=>M,Un:()=>d,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>f,vt:()=>r});const f=[0,0,0],d=c(),g=u(),M=l(),p=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:g,UNIT_Y:M,UNIT_Z:p,ZEROS:f,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},71936:(t,n,e)=>{e.r(n),e.d(n,{default:()=>c});var r=e(1843);function o(t,n){return n.push(t.buffer),{buffer:t.buffer,layout:new r.l5(t.layout)}}var i=e(3055),a=e(93406),s=e(431);class c{async extract(t){const n=u(t),e=(0,s.o6)(n),r=[n.data.buffer];return{result:l(e,r),transferList:r}}async extractComponentsEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,f).regular.instancesData,r),transferList:r}}async extractEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,h).regular.instancesData,r),transferList:r}}}function u(t){return{data:i.I$.createView(t.dataBuffer),indices:"Uint32Array"===t.indicesType?new Uint32Array(t.indices):"Uint16Array"===t.indicesType?new Uint16Array(t.indices):t.indices,indicesLength:t.indicesLength,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}function l(t,n){return n.push(t.regular.lodInfo.lengths.buffer),n.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:o(t.regular.instancesData,n),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:o(t.silhouette.instancesData,n),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}const h=new class{allocate(t){return s.Jb.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1)}},f=new class{allocate(t){return s.HY.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex)}}},74038:(t,n,e)=>{e.d(n,{_:()=>r});class r{constructor(t,n,e,r,o,i=!1,a=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=o,this.normalized=i,this.divisor=a}}},87317:(t,n,e)=>{e.d(n,{a:()=>E,b:()=>g,c:()=>o,d:()=>l,e:()=>A,f:()=>f,g:()=>a,h:()=>p,j:()=>d,l:()=>m,n:()=>M,s:()=>i,t:()=>N});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function h(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+i*i)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function d(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function g(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function M(t,n){const e=n[0],r=n[1],o=n[2],i=n[3];let a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a),t}function p(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function m(t,n,e,r){const o=n[0],i=n[1],a=n[2],s=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=s+r*(e[3]-s),t}function N(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function A(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-s)<=h*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-l)<=h*Math.max(1,Math.abs(a),Math.abs(l))}const I=s,O=c,T=u,S=h,b=f,v=d,_=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:S,distance:h,div:T,divide:u,dot:p,equals:A,exactEquals:E,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:v,length:d,lerp:m,max:function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},mul:O,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:M,random:function(t,n=1){const e=r.Ov;let o,i,a,s,c,u;do{o=2*e()-1,i=2*e()-1,c=o*o+i*i}while(c>=1);do{a=2*e()-1,s=2*e()-1,u=a*a+s*s}while(u>=1);const l=Math.sqrt((1-c)/u);return t[0]=n*o,t[1]=n*i,t[2]=n*a*l,t[3]=n*s*l,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:l,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:b,sqrLen:_,squaredDistance:f,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:I,subtract:s,transformMat4:N,transformQuat:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=e[3],l=u*r+s*i-c*o,h=u*o+c*r-a*i,f=u*i+a*o-s*r,d=-a*r-s*o-c*i;return t[0]=l*u+d*-a+h*-c-f*-s,t[1]=h*u+d*-s+f*-a-l*-c,t[2]=f*u+d*-c+l*-s-h*-a,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},91829:(t,n,e)=>{function r(){return[0,0,0,0]}function o(t){return[t[0],t[1],t[2],t[3]]}function i(t,n,e,r){return[t,n,e,r]}function a(t,n,e,r){return[t,n,e,r]}function s(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1,1)}function u(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function h(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}e.d(n,{CN:()=>a,Un:()=>g,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0,0],g=c(),M=u(),p=l(),m=h(),N=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:N,UNIT_X:M,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitW:f,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,n,e)=>{e.d(n,{K:()=>c});var r=e(34727),o=e(3694),i=e(38954),a=e(51850);const s=-1;function c(t,n,e){const r=t.vertices.position,o=t.vertices.componentIndex,a=M.position0,c=M.position1,h=M.faceNormal0,d=M.faceNormal1,{edges:g,normals:p}=l(t),m=g.length/4,N=n.allocate(m);let E=0;const A=m,T=e?.allocate(A);let b=0,v=0,_=0;f.length=0;for(let t=0;t<m;++t){const n=4*t;r.getVec(g.data[n],a),r.getVec(g.data[n+1],c);const e=f.pushNew();e.index=4*t,e.length=(0,i.j)(a,c)}f.sort((t,n)=>n.length-t.length);const R=new Array,y=new Array;f.forAll(({length:t,index:l})=>{const f=g.data[l],m=g.data[l+1],A=g.data[l+2],L=g.data[l+3],D=L===s;if(r.getVec(f,a),r.getVec(m,c),D){const t=3*A;(0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),(0,i.c)(d,h),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d)}else{let t=3*A;if((0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),t=3*L,(0,i.i)(d,p.data[t],p.data[t+1],p.data[t+2]),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d),function(t,n){return t.cosAngle>n}(M,O))return;M.cosAngle<-.9999&&(0,i.c)(d,h)}v+=t,_++,D||function(t,n){return t.cosAngle<n}(M,S)?(n.write(N,E++,M),R.push(t)):u(M,I)&&(T&&e&&e.write(T,b++,M),y.push(t))});const L=new Float32Array(R.reverse()),D=new Float32Array(y.reverse()),w=T&&e?{instancesData:T.slice(0,b),lodInfo:{lengths:D}}:void 0;return{regular:{instancesData:N.slice(0,E),lodInfo:{lengths:L}},silhouette:w,averageEdgeLength:v/_}}function u(t,n){const e=(0,r.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),e*((0,i.e)((0,i.h)(p,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>n}function l(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors,o=t.vertices.position;d.length=g.length=0;for(let t=0;t<n;t++){const n=3*t,a=r[n],c=r[n+1],u=r[n+2],l=e[n],h=e[n+1],f=e[n+2];o.getVec(l,N),o.getVec(h,E),o.getVec(f,A),(0,i.d)(E,E,N),(0,i.d)(A,A,N),(0,i.h)(N,E,A),(0,i.n)(N,N),g.pushArray(N),(a===s||l<h)&&(d.push(l),d.push(h),d.push(t),d.push(a)),(c===s||h<f)&&(d.push(h),d.push(f),d.push(t),d.push(c)),(u===s||f<l)&&(d.push(f),d.push(l),d.push(t),d.push(u))}return{edges:d,normals:g}}class h{constructor(){this.index=0,this.length=0}}const f=new o.A({allocator:t=>t||new h,deallocator:null}),d=new o.A({deallocator:null}),g=new o.A({deallocator:null}),M=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},p=(0,a.vt)(),m=(0,a.vt)(),N=(0,a.vt)(),E=(0,a.vt)(),A=(0,a.vt)(),I=(0,r.kU)(4),O=Math.cos(I),T=(0,r.kU)(35),S=Math.cos(T)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(42837),l(89390),l(98619),l(22393),l(59469),l(39168),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(43616),l(60517),l(14113);var s=l(57323)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(53802),l(89390),l(98619),l(22393),l(59469),l(39168),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(43616),l(60517),l(14113);var s=l(57323)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7937],{4341:(t,n,r)=>{r.d(n,{I:()=>o});var e=r(26390);class o{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,e.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},9093:(t,n,r)=>{function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(n,{o8:()=>o,vt:()=>e,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:e,fromValues:function(t,n,r,e,o,i,u,c,a,s,f,h,M,l,m,d){return[t,n,r,e,o,i,u,c,a,s,f,h,M,l,m,d]}},Symbol.toStringTag,{value:"Module"}))},29242:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,r,e,o,i,u,c,a){return[t,n,r,e,o,i,u,c,a]}r.d(n,{fA:()=>o,vt:()=>e,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:o},Symbol.toStringTag,{value:"Module"}))},32114:(t,n,r)=>{r.d(n,{Rc:()=>l,J8:()=>m,rq:()=>h,Km:()=>M}),r(44208);var e=r(26390),o=r(29242),i=r(9093),u=r(82534),c=r(48163),a=r(51850),s=r(91829);class f{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,e.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new f(c.vt)}static createVec3f64(){return new f(a.vt)}static createVec4f64(){return new f(s.vt)}static createMat3f64(){return new f(o.vt)}static createMat4f64(){return new f(i.vt)}static createQuatf64(){return new f(u.vt)}get test(){}}f.createVec2f64();const h=f.createVec3f64(),M=f.createVec4f64(),l=(f.createMat3f64(),f.createMat4f64()),m=f.createQuatf64()},38954:(t,n,r)=>{r.d(n,{A:()=>m,B:()=>l,C:()=>f,D:()=>h,E:()=>I,F:()=>D,H:()=>k,a:()=>V,b:()=>b,c:()=>u,d:()=>s,e:()=>P,f:()=>a,g:()=>g,h:()=>S,i:()=>c,j:()=>_,k:()=>p,l:()=>i,m:()=>j,n:()=>x,o:()=>A,q:()=>C,r:()=>y,s:()=>v,t:()=>O,u:()=>q,v:()=>T,w:()=>M,x:()=>N,y:()=>F,z:()=>d});var e=r(51850),o=r(34304);function i(t){const n=t[0],r=t[1],e=t[2];return Math.sqrt(n*n+r*r+e*e)}function u(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function c(t,n,r,e){return t[0]=n,t[1]=r,t[2]=e,t}function a(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function s(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function g(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t}function _(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+e*e+o*o)}function v(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return r*r+e*e+o*o}function p(t){const n=t[0],r=t[1],e=t[2];return n*n+r*r+e*e}function q(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function x(t,n){const r=n[0],e=n[1],o=n[2];let i=r*r+e*e+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function S(t,n,r){const e=n[0],o=n[1],i=n[2],u=r[0],c=r[1],a=r[2];return t[0]=o*a-i*c,t[1]=i*u-e*a,t[2]=e*c-o*u,t}function j(t,n,r,e){const o=n[0],i=n[1],u=n[2];return t[0]=o+e*(r[0]-o),t[1]=i+e*(r[1]-i),t[2]=u+e*(r[2]-u),t}function O(t,n,r){const e=n[0],o=n[1],i=n[2];return t[0]=r[0]*e+r[4]*o+r[8]*i+r[12],t[1]=r[1]*e+r[5]*o+r[9]*i+r[13],t[2]=r[2]*e+r[6]*o+r[10]*i+r[14],t}function A(t,n,r){const e=n[0],o=n[1],i=n[2];return t[0]=e*r[0]+o*r[3]+i*r[6],t[1]=e*r[1]+o*r[4]+i*r[7],t[2]=e*r[2]+o*r[5]+i*r[8],t}function T(t,n,r){const e=r[0],o=r[1],i=r[2],u=r[3],c=n[0],a=n[1],s=n[2],f=o*s-i*a,h=i*c-e*s,M=e*a-o*c,l=o*M-i*h,m=i*f-e*M,d=e*h-o*f,g=2*u;return t[0]=c+f*g+2*l,t[1]=a+h*g+2*m,t[2]=s+M*g+2*d,t}const w=(0,e.vt)(),z=(0,e.vt)();function C(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function I(t,n,r){const e=r[0]-n[0],o=r[1]-n[1],i=r[2]-n[2];let u=e*e+o*o+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=e*u,t[1]=o*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const V=s,E=f,R=h,D=_,N=v,k=i,F=p;Object.freeze(Object.defineProperty({__proto__:null,abs:M,add:a,angle:function(t,n){x(w,t),x(z,n);const r=P(w,z);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,n,r,e,o,i){const u=1-i,c=u*u,a=i*i,s=c*u,f=3*i*c,h=3*a*u,M=a*i;return t[0]=n[0]*s+r[0]*f+e[0]*h+o[0]*M,t[1]=n[1]*s+r[1]*f+e[1]*h+o[1]*M,t[2]=n[2]*s+r[2]*f+e[2]*h+o[2]*M,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t},copy:u,cross:S,crossAndNormalize:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=r[0],c=r[1],a=r[2],s=o*a-i*c,f=i*u-e*a,h=e*c-o*u,M=Math.sqrt(s*s+f*f+h*h);return t[0]=s/M,t[1]=f/M,t[2]=h/M,t},direction:I,dist:D,distance:_,div:R,divide:h,dot:P,equals:function(t,n){if(t===n)return!0;const r=t[0],e=t[1],i=t[2],u=n[0],c=n[1],a=n[2],s=(0,o.FD)();return Math.abs(r-u)<=s*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-c)<=s*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(i-a)<=s*Math.max(1,Math.abs(i),Math.abs(a))},exactEquals:C,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,r,e,o,i){const u=i*i,c=u*(2*i-3)+1,a=u*(i-2)+i,s=u*(i-1),f=u*(3-2*i);return t[0]=n[0]*c+r[0]*a+e[0]*s+o[0]*f,t[1]=n[1]*c+r[1]*a+e[1]*s+o[1]*f,t[2]=n[2]*c+r[2]*a+e[2]*s+o[2]*f,t},inverse:y,len:k,length:i,lerp:j,max:d,min:m,mul:E,multiply:f,negate:q,normalize:x,random:function(t,n=1){const r=o.Ov,e=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(e)*u,t[1]=Math.sin(e)*u,t[2]=i*n,t},rotateX:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(e)-o[2]*Math.sin(e),i[2]=o[1]*Math.sin(e)+o[2]*Math.cos(e),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[2]*Math.sin(e)+o[0]*Math.cos(e),i[1]=o[1],i[2]=o[2]*Math.cos(e)-o[0]*Math.sin(e),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[0]*Math.cos(e)-o[1]*Math.sin(e),i[1]=o[0]*Math.sin(e)+o[1]*Math.cos(e),i[2]=o[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:b,set:c,sign:l,sqrDist:N,sqrLen:F,squaredDistance:v,squaredLength:p,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:V,subtract:s,transformMat3:A,transformMat4:O,transformQuat:T},Symbol.toStringTag,{value:"Module"}))},44280:(t,n,r)=>{r.d(n,{EJ:()=>a,g7:()=>c,gr:()=>u});var e=r(34727),o=r(38954),i=r(51850);function u(t,n){return(0,o.e)(t,n)/(0,o.l)(t)}function c(t,n){const r=(0,o.e)(t,n)/((0,o.l)(t)*(0,o.l)(n));return-(0,e.XM)(r)}function a(t,n,r){(0,o.n)(s,t),(0,o.n)(f,n);const i=(0,o.e)(s,f),u=(0,e.XM)(i),c=(0,o.h)(s,s,f);return(0,o.e)(c,r)<0?2*Math.PI-u:u}const s=(0,i.vt)(),f=(0,i.vt)()},48163:(t,n,r)=>{function e(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function u(){return i(1,1)}function c(){return i(1,0)}function a(){return i(0,1)}r.d(n,{Un:()=>s,fA:()=>i,o8:()=>o,vt:()=>e});const s=u(),f=c(),h=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:s,UNIT_X:f,UNIT_Y:h,ZEROS:[0,0],clone:o,create:e,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const r=Math.min(2,t.length);for(let e=0;e<r;++e)n[e]=t[e];return n},fromValues:i,ones:u,unitX:c,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},71351:(t,n,r)=>{r.d(n,{C:()=>h,Cr:()=>M,LV:()=>f,fA:()=>l,kb:()=>m,oC:()=>d,vt:()=>a}),r(4576);var e=r(4341),o=(r(77690),r(29242)),i=r(38954),u=r(51850),c=r(32114);function a(t){return t?s((0,u.o8)(t.origin),(0,u.o8)(t.direction)):s((0,u.vt)(),(0,u.vt)())}function s(t,n){return{origin:t,direction:n}}function f(t,n){const r=g.get();return r.origin=t,r.direction=n,r}function h(t,n=a()){return l(t.origin,t.direction,n)}function M(t,n,r=a()){return(0,i.c)(r.origin,t),(0,i.d)(r.direction,n,t),r}function l(t,n,r=a()){return(0,i.c)(r.origin,t),(0,i.c)(r.direction,n),r}function m(t,n){const r=(0,i.h)(c.rq.get(),(0,i.n)(c.rq.get(),t.direction),(0,i.d)(c.rq.get(),n,t.origin));return(0,i.e)(r,r)}function d(t,n,r){const e=(0,i.e)(t.direction,(0,i.d)(r,n,t.origin));return(0,i.f)(r,t.origin,(0,i.g)(r,t.direction,e)),r}const g=new e.I(()=>a());(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,o.vt)()},77690:(t,n,r)=>{r.d(n,{B8:()=>c,Ge:()=>M,I0:()=>h,KC:()=>a,hZ:()=>i,hs:()=>f,lw:()=>s,mg:()=>u,z0:()=>o});var e=r(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function i(t,n,r,e,o,i,u,c,a,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=i,t[5]=u,t[6]=c,t[7]=a,t[8]=s,t}function u(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function c(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8],h=f*u-c*s,M=-f*i+c*a,l=s*i-u*a;let m=r*h+e*M+o*l;return m?(m=1/m,t[0]=h*m,t[1]=(-f*e+o*s)*m,t[2]=(c*e-o*u)*m,t[3]=M*m,t[4]=(f*r-o*a)*m,t[5]=(-c*r+o*i)*m,t[6]=l*m,t[7]=(-s*r+e*a)*m,t[8]=(u*r-e*i)*m,t):null}function a(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8];return t[0]=u*f-c*s,t[1]=o*s-e*f,t[2]=e*c-o*u,t[3]=c*a-i*f,t[4]=r*f-o*a,t[5]=o*i-r*c,t[6]=i*s-u*a,t[7]=e*a-r*s,t[8]=r*u-e*i,t}function s(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=r[0],l=r[1],m=r[2],d=r[3],g=r[4],b=r[5],_=r[6],v=r[7],p=r[8];return t[0]=M*e+l*u+m*s,t[1]=M*o+l*c+m*f,t[2]=M*i+l*a+m*h,t[3]=d*e+g*u+b*s,t[4]=d*o+g*c+b*f,t[5]=d*i+g*a+b*h,t[6]=_*e+v*u+p*s,t[7]=_*o+v*c+p*f,t[8]=_*i+v*a+p*h,t}function f(t,n,r){const e=r[0],o=r[1],i=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function h(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=r+r,c=e+e,a=o+o,s=r*u,f=e*u,h=e*c,M=o*u,l=o*c,m=o*a,d=i*u,g=i*c,b=i*a;return t[0]=1-h-m,t[3]=f-b,t[6]=M+g,t[1]=f+b,t[4]=1-s-m,t[7]=l-d,t[2]=M-g,t[5]=l+d,t[8]=1-s-h,t}function M(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],m=n[12],d=n[13],g=n[14],b=n[15],_=r*c-e*u,v=r*a-o*u,p=r*s-i*u,q=e*a-o*c,y=e*s-i*c,x=o*s-i*a,P=f*d-h*m,S=f*g-M*m,j=f*b-l*m,O=h*g-M*d,A=h*b-l*d,T=M*b-l*g;let w=_*T-v*A+p*O+q*j-y*S+x*P;return w?(w=1/w,t[0]=(c*T-a*A+s*O)*w,t[1]=(a*j-u*T-s*S)*w,t[2]=(u*A-c*j+s*P)*w,t[3]=(o*A-e*T-i*O)*w,t[4]=(r*T-o*j+i*S)*w,t[5]=(e*j-r*A-i*P)*w,t[6]=(d*x-g*y+b*q)*w,t[7]=(g*p-m*x-b*v)*w,t[8]=(m*y-d*p+b*_)*w,t):null}function l(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const m=s,d=l;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:a,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],i=t[4],u=t[5],c=t[6],a=t[7],s=t[8];return n*(s*i-u*a)+r*(-s*o+u*c)+e*(a*o-i*c)},equals:function(t,n){const r=t[0],o=t[1],i=t[2],u=t[3],c=t[4],a=t[5],s=t[6],f=t[7],h=t[8],M=n[0],l=n[1],m=n[2],d=n[3],g=n[4],b=n[5],_=n[6],v=n[7],p=n[8],q=(0,e.FD)();return Math.abs(r-M)<=q*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(o-l)<=q*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(i-m)<=q*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(u-d)<=q*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-g)<=q*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(a-b)<=q*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-_)<=q*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(f-v)<=q*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-p)<=q*Math.max(1,Math.abs(h),Math.abs(p))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:h,fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:c,isOrthoNormal:function(t){const n=(0,e.FD)(),r=t[0],o=t[1],i=t[2],u=t[3],c=t[4],a=t[5],s=t[6],f=t[7],h=t[8];return Math.abs(1-(r*r+u*u+s*s))<=n&&Math.abs(1-(o*o+c*c+f*f))<=n&&Math.abs(1-(i*i+a*a+h*h))<=n},mul:m,multiply:s,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],i=n[4],u=n[5],c=n[6],a=n[8],s=n[9],f=n[10],h=f*u-c*s,M=-f*i+c*a,l=s*i-u*a,m=r*h+e*M+o*l;if(!m)return null;const d=1/m;return t[0]=h*d,t[1]=(-f*e+o*s)*d,t[2]=(c*e-o*u)*d,t[3]=M*d,t[4]=(f*r-o*a)*d,t[5]=(-c*r+o*i)*d,t[6]=l*d,t[7]=(-s*r+e*a)*d,t[8]=(u*r-e*i)*d,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=Math.sin(r),l=Math.cos(r);return t[0]=l*e+M*u,t[1]=l*o+M*c,t[2]=l*i+M*a,t[3]=l*u-M*e,t[4]=l*c-M*o,t[5]=l*a-M*i,t[6]=s,t[7]=f,t[8]=h,t},scale:f,scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:l,translate:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=r[0],l=r[1];return t[0]=e,t[1]=o,t[2]=i,t[3]=u,t[4]=c,t[5]=a,t[6]=M*e+l*u+s,t[7]=M*o+l*c+f,t[8]=M*i+l*a+h,t},transpose:u},Symbol.toStringTag,{value:"Module"}))},82534:(t,n,r)=>{function e(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}r.d(n,{o8:()=>o,vt:()=>e,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:e,fromValues:function(t,n,r,e){return[t,n,r,e]}},Symbol.toStringTag,{value:"Module"}))},97937:(t,n,r)=>{r.d(n,{a:()=>y,b:()=>p,c:()=>g,d:()=>w,f:()=>x,g:()=>q,h:()=>v,k:()=>A,o:()=>R,s:()=>k}),r(44208),r(53966);var e=r(34727),o=r(58083),i=r(38954),u=r(51850),c=r(87317),a=r(91829),s=r(34304),f=r(88582),h=r(71351);function M(t,n){const r=(0,i.l)(t),o=(0,e.YN)(t[2]/r),u=Math.atan2(t[1]/r,t[0]/r);return(0,i.i)(n,r,o,u),n}var l=r(44280),m=r(32114);const d=g();function g(){return(0,a.vt)()}const b=c.e,_=c.e;function v(t,n){return(0,c.c)(n,t)}function p(t,n){return t[0]=t[1]=t[2]=0,t[3]=n,t}function q(t){return t[3]}function y(t){return t}function x(t,n,r,e){return(0,a.fA)(t,n,r,e)}function P(t,n,r){if(null==n)return!1;if(!j(t,n,S))return!1;let{t0:e,t1:o}=S;if((e<0||o<e&&o>0)&&(e=o),e<0)return!1;if(r){const{origin:t,direction:o}=n;r[0]=t[0]+o[0]*e,r[1]=t[1]+o[1]*e,r[2]=t[2]+o[2]*e}return!0}const S={t0:0,t1:0};function j(t,n,r){const{origin:e,direction:o}=n,i=O;i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2];const u=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===u)return!1;const c=2*(o[0]*i[0]+o[1]*i[1]+o[2]*i[2]),a=c*c-4*u*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(a<0)return!1;const s=Math.sqrt(a);return r.t0=(-c-s)/(2*u),r.t1=(-c+s)/(2*u),!0}const O=(0,u.vt)();function A(t,n){return P(t,n,null)}function T(t,n,r){const e=m.rq.get(),u=m.Rc.get();(0,i.h)(e,n.origin,n.direction);const c=q(t);(0,i.h)(r,e,n.origin),(0,i.g)(r,r,1/(0,i.l)(r)*c);const a=C(t,n.origin),s=(0,l.g7)(n.origin,r);return(0,o.$0)(u,s+a,e),(0,i.t)(r,r,u),r}function w(t,n,r,e){const o=q(t),i=o*o,u=n+.5*Math.PI,c=r*r+i-2*Math.cos(u)*r*o,a=Math.sqrt(c),s=c-i;if(s<=0)return.5;const f=Math.sqrt(s),h=Math.acos(f/a)-Math.asin(o/(a/Math.sin(u)));return Math.min(1,(h+.5*e)/e)}function z(t,n,r){const e=(0,i.d)(m.rq.get(),n,t),o=(0,i.g)(m.rq.get(),e,t[3]/(0,i.l)(e));return(0,i.f)(r,o,t)}function C(t,n){const r=(0,i.d)(m.rq.get(),n,t),o=(0,i.l)(r),u=q(t),c=u+Math.abs(u-o);return(0,e.XM)(u/c)}const I=(0,u.vt)();function V(t,n,r,e){const o=(0,i.d)(I,n,t);switch(r){case f._.X:{const t=M(o,I)[2];return(0,i.i)(e,-Math.sin(t),Math.cos(t),0)}case f._.Y:{const t=M(o,I),n=t[1],r=t[2],u=Math.sin(n);return(0,i.i)(e,-u*Math.cos(r),-u*Math.sin(r),Math.cos(n))}case f._.Z:return(0,i.n)(e,o);default:return}}function E(t,n){const r=(0,i.d)(D,n,t);return(0,i.l)(r)-t[3]}function R(t,n){const r=(0,i.s)(t,n),e=q(t);return r<=e*e}const D=(0,u.vt)(),N=g(),k=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:d,altitudeAt:E,angleToSilhouette:C,axisAt:V,cameraFrustumCoverage:w,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,n,r){return P(t,n,r)?r:((0,h.oC)(n,t,r),z(t,r,r))},closestPointOnSilhouette:T,containsPoint:R,copy:v,create:g,distanceToSilhouette:function(t,n){const r=(0,i.d)(m.rq.get(),n,t),e=(0,i.k)(r),o=t[3]*t[3];return Math.sqrt(Math.abs(e-o))},elevate:function(t,n,r){return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=t[3]+n,r},equals:_,exactEquals:b,fromCenterAndRadius:function(t,n){return(0,a.fA)(t[0],t[1],t[2],n)},fromRadius:p,fromValues:x,getCenter:y,getExtent:function(t,n){return n},getRadius:q,intersectLine:function(t,n,r){const e=(0,h.Cr)(n,r);if(!j(t,e,S))return[];const{origin:o,direction:c}=e,{t0:a,t1:f}=S,M=n=>{const r=(0,u.vt)();return(0,i.b)(r,o,c,n),z(t,r,r)};return Math.abs(a-f)<(0,s.FD)()?[M(a)]:[M(a),M(f)]},intersectRay:P,intersectRayClosestSilhouette:function(t,n,r){if(P(t,n,r))return r;const e=T(t,n,m.rq.get());return(0,i.f)(r,n.origin,(0,i.g)(m.rq.get(),n.direction,(0,i.j)(n.origin,e)/(0,i.l)(n.direction))),r},intersectsRay:A,projectPoint:z,setAltitudeAt:function(t,n,r,e){const o=E(t,n),u=V(t,n,f._.Z,D),c=(0,i.g)(D,u,r-o);return(0,i.f)(e,n,c)},setExtent:function(t,n,r){return t!==r&&v(t,r),r},tmpSphere:N,union:function(t,n,r=(0,a.vt)()){const e=(0,i.j)(t,n),o=t[3],u=n[3];return e+u<o?((0,c.c)(r,t),r):e+o<u?((0,c.c)(r,n),r):((0,i.m)(r,t,n,(e+u-o)/(2*e)),r[3]=(e+o+u)/2,r)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3379],{11764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ee});var i=s(74887),n=s(89640),r=s(6774),a=s(83027),o=s(13195);function l(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function h(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function c(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function u(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var f=s(18989);const d=24;class g{constructor(e,t,s,i,n,r,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=n,this._vAnchor=r,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,n=this._lineHeight,r=this._justify,a=this._maxWidth,o=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const n=s&&l(e);let r;for(const t of this._glyphItems)if(r=t[e],r)break;o.push({codePoint:e,x:f,y:d,vertical:n,glyphMosaicItem:r}),r&&(f+=r.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const p=e.includes("​"),y=[],x=o.length;for(let e=0;e<x-1;e++){const t=o[e].codePoint,s=h(t);if(c(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&p)i+=150;else{40!==t&&65288!==t||(i+=50);const s=o[e+1].codePoint;41!==s&&65289!==s||(i+=50)}y.push(this._buildBreak(e+1,o[e].x,g,y,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,y,0,!0));let m=0;const I=t?-n:n;let b=0;for(let e=0;e<_.length;e++){const t=_[e];let s=b;for(;s<t&&u(o[s].codePoint);)o[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&u(o[i].codePoint);)o[i].glyphMosaicItem=null,--i;if(s<=i){const e=o[s].x;for(let t=s;t<=i;t++)o[t].x-=e,o[t].y=d;let t=o[i].x;o[i].glyphMosaicItem&&(t+=o[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),r&&this._applyJustification(o,s,i)}b=t,d+=I}if(o.length>0){const e=_.length-1,s=(r-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*n;t&&e&&(i+=e*n);for(const e of o)e.x+=s,e.y+=i}return o.filter(e=>e.glyphMosaicItem)}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,n=0,r=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,h=o+e,c=l+t;s=Math.min(s,o),n=Math.max(n,h),i=Math.min(i,l),r=Math.max(r,c)}return{x:s,y:i,width:n-s,height:r-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,n=0;for(const r of e){const{height:e,left:a,top:o,width:l}=r.glyphMosaicItem.metrics,h=r.x,c=r.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),i=Math.max(i,u),s=Math.min(s,c),n=Math.max(n,f)}return{x:t,y:s,width:i-t,height:n-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,n=e[0].y;for(let r=1;r<s;r++){const s=e[r];if(s.y!==n){const a=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),n=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const r=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:r-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const n=(e-t)*(e-t);return i?e<t?n/2:2*n:n+Math.abs(s)*s}_buildBreak(e,t,s,i,n,r){let a=null,o=this._breakScore(t,s,n,r);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,n,r)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,s){const i=e[s],n=i.vertical?d:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,r=(i.x+n)*this._justify;for(let i=t;i<=s;i++)e[i].x-=r}}var p=s(4272);const y=.5;class x{constructor(e,t,s=0,i=-1,n=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=n}}class _{constructor(e,t,s,i,n,r=y,a=o.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=n,this.minzoom=r,this.maxzoom=a}}class m{constructor(e,t,s,i,n,r,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=n,this.labelAngle=r,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class I{constructor(e){this.shapes=e}}class b{getIconPlacement(e,t,s){const i=new r.bR(e.x,e.y),n=s.rotationAlignment===p.I5.MAP,a=s.keepUpright;let l=s.rotate*o.os;n&&(l+=e.angle);const h=new I([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),n&&a&&this._addIconPlacement(h,i,t,s,l+o.Jo),h}_addIconPlacement(e,t,s,i,n){const a=s.rasterizationScale,l=s.width/a,h=s.height/a,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case p.KI.CENTER:u-=l/2,f-=h/2;break;case p.KI.LEFT:f-=h/2;break;case p.KI.RIGHT:u-=l,f-=h/2;break;case p.KI.TOP:u-=l/2;break;case p.KI.BOTTOM:u-=l/2,f-=h;break;case p.KI.TOP_LEFT:break;case p.KI.BOTTOM_LEFT:f-=h;break;case p.KI.TOP_RIGHT:u-=l;break;case p.KI.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,g=2/a,x=u-g,_=f-g,I=x+d.width/a,b=_+d.height/a,M=new r.bR(x,_),w=new r.bR(I,b),k=new r.bR(x,b),T=new r.bR(I,_);if(0!==n){const e=Math.cos(n),t=Math.sin(n);M.rotate(e,t),w.rotate(e,t),k.rotate(e,t),T.rotate(e,t)}const A=new m(M,T,k,w,d,n,0,256,t,y,o.MG,0);if(e.shapes.push(A),!i.allowOverlap||!i.ignorePlacement){const s=i.size,r=i.padding,a={xTile:t.x,yTile:t.y,dxPixels:u*s-r,dyPixels:f*s-r,hard:!i.optional,partIndex:0,width:l*s+2*r,height:h*s+2*r,angle:n,minLod:y,maxLod:o.MG};e.iconColliders.push(a)}}getTextPlacement(e,t,s,i){const n=new r.bR(e.x,e.y),l=i.rotate*o.os,h=i.rotationAlignment===p.I5.MAP,c=i.keepUpright,u=i.padding;let f=y;const x=h?e.angle:0,b=e.segment>=0&&h,M=i.allowOverlap&&i.ignorePlacement?null:[],w=[],k=!b;let T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A;const L=(b||h)&&c,V=i.size/d;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let v,R=0,S=0;if(!b&&B){const e=g.getTextBox(t,i.lineHeight*d);switch(i.anchor){case p.KI.LEFT:R=e.height/2,S=-e.width/2;break;case p.KI.RIGHT:R=-e.height/2,S=e.width/2;break;case p.KI.TOP:R=e.height/2,S=e.width/2;break;case p.KI.BOTTOM:R=-e.height/2,S=-e.width/2;break;case p.KI.TOP_LEFT:R=e.height;break;case p.KI.BOTTOM_LEFT:S=-e.width;break;case p.KI.TOP_RIGHT:S=e.width;break;case p.KI.BOTTOM_RIGHT:R=-e.height}}R+=i.offset[0]*d,S+=i.offset[1]*d;for(const d of t){const t=d.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const g=t.rect,p=t.metrics,I=t.page;if(M&&k){if(void 0!==v&&v!==d.y){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a),T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A}v=d.y}const C=[];if(b){const i=.5*t.metrics.width,n=(d.x+p.left-4+i)*V*a.ih;if(f=this._placeGlyph(e,f,n,s,e.segment,1,d.vertical,I,C),c&&(f=this._placeGlyph(e,f,n,s,e.segment,-1,d.vertical,I,C)),f>=2)break}else C.push(new _(n,x,x,I,!1)),h&&c&&C.push(new _(n,x+o.Jo,x+o.Jo,I,!1));const E=d.x+p.left,O=d.y-17-p.top,F=E+p.width,N=O+p.height;let U,z,G,K,q,H,W,j;if(!b&&B)if(d.vertical){const e=(E+F)/2-p.height/2,t=(O+N)/2+p.width/2;U=new r.bR(-t-4+R,e-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y)}else U=new r.bR(4-O+R,E-4+S),z=new r.bR(U.x-g.height,U.y+g.width),G=new r.bR(z.x,U.y),K=new r.bR(U.x,z.y);else U=new r.bR(E-4+R,O-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y);for(const t of C){let s,n,a,o;if(t.alternateVerticalGlyph){if(!q){const e=(O+N)/2+S;q=new r.bR((E+F)/2+R-p.height/2-4,e+p.width/2+4),H=new r.bR(q.x+g.height,q.y-g.width),W=new r.bR(H.x,q.y),j=new r.bR(q.x,H.y)}s=q,n=W,a=j,o=H}else s=U,n=G,a=K,o=z;const h=O,c=N,f=t.glyphAngle+l;if(0!==f){const e=Math.cos(f),t=Math.sin(f);s=s.clone(),n=n?.clone(),a=a?.clone(),o=o?.clone(),s.rotate(e,t),o?.rotate(e,t),n?.rotate(e,t),a?.rotate(e,t)}let y=0,x=256;if(b&&B?d.vertical?t.alternateVerticalGlyph?(y=32,x=96):(y=224,x=32):(y=224,x=96):(y=192,x=64),w.push(new m(s,a,n,o,g,t.labelAngle,y,x,t.anchor,t.minzoom,t.maxzoom,t.page)),M&&(!L||this._legible(t.labelAngle)))if(k)E<T&&(T=E),h<P&&(P=h),F>A&&(A=F),c>D&&(D=c);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(E+R)*V-u,dyPixels:(h+R)*V-u,hard:!i.optional,partIndex:1,width:(F-E)*V+2*u,height:(c-h)*V+2*u,angle:f,minLod:t.minzoom,maxLod:t.maxzoom};M.push(s)}}}if(f>=2)return null;if(M&&k){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a)}const C=new I(w);return M&&M.length>0&&(C.textColliders=M),C}_legible(e){const t=(0,o.z0)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,n,a,l,h,c){let u=a;const f=u<0?(0,o.Wh)(e.angle+o.Jo,o.pJ):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=o.Jo),u>0&&++n;let g=new r.bR(e.x,e.y),p=i[n],y=o.MG;if(i.length<=n)return y;for(;;){const e=p.x-g.x,r=p.y-g.y,a=Math.sqrt(e*e+r*r),x=Math.max(s/a,t),m=e/a,I=r/a,b=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new _(g,f,b,h,!1,x,y)),l&&c.push(new _(g,f,b,h,!0,x,y)),x<=t)return x;g=p.clone();do{if(n+=u,i.length<=n||n<0)return x;p=i[n]}while(g.isEqual(p));let M=p.x-g.x,w=p.y-g.y;const k=Math.sqrt(M*M+w*w);M*=a/k,w*=a/k,g.x-=M,g.y-=w,y=x}}}var M,w,k=s(51624),T=s(15585);(w=M||(M={}))[w.moveTo=1]="moveTo",w[w.lineTo=2]="lineTo",w[w.close=7]="close";class A{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,n=t.values,r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:this.id=r.getUInt64();break;case 2:{const e=r.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),r=e.getUInt32();t[i[s]]=n[r]}e.release();break}case 3:this.type=r.getUInt32();break;case 4:this._pbfGeometry=r.getMessage();break;default:r.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let s,i;this._pbfGeometry=null,e?e.reset(this.type):s=[];let n,a=M.moveTo,o=0,l=0,h=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case M.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new r.bR(l,h)));break;case M.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new r.bR(l,h));break;case M.close:e?e.close():i&&!i[0].equals(l,h)&&i.push(i[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?n=e.result():s&&(i&&s.push(i),n=s),t.release(),this._geometry=n,n}}var P=s(80081);class D extends P.A{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}P.A;class L{constructor(e){this.extent=a.vA,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(L._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class V extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,o,l,h,c,u){const f=this.array;let d=P.A.i1616to32(e,t);f.push(d);const g=31;d=P.A.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*n),Math.round(g*r)),f.push(d),d=P.A.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=P.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends P.A{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(P.A.i1616to32(e,t)),s&&i.push(...s)}}class v extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a){const o=this.array,l=this.index;let h=P.A.i1616to32(e,t);return o.push(h),h=P.A.i8888to32(Math.round(15*s),Math.round(15*i),n,r),o.push(h),a&&o.push(...a),l}}class R extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,l,h,c,u,f){const d=this.array;let g=P.A.i1616to32(e,t);d.push(g),g=P.A.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=P.A.i8888to32(n/4,r/4,l,h),d.push(g),g=P.A.i8888to32(0,(0,o.z0)(a),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class S extends P.A{constructor(e){super(e)}add(e,t,s,i,n){const r=this.array,a=P.A.i1616to32(2*e+s,2*t+i);r.push(a),n&&r.push(...n)}}class C{constructor(e,t,s){this.layerExtent=a.vA,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=s,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,s){}}class E extends C{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=r}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,s=this._circleIndexBuffer;this._circleIndexStart=3*s.index,this._circleIndexCount=0;const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);for(const r of this._features){const a=r.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(r,n,i);for(const e of a)if(e)for(const i of e){const e=t.index;t.add(i.x,i.y,0,0,o),t.add(i.x,i.y,0,1,o),t.add(i.x,i.y,1,0,o),t.add(i.x,i.y,1,1,o),s.add(e,e+1,e+2),s.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._circleIndexStart,t[i++]=this._circleIndexCount,t[i++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)s[i++]=this._circleVertexBuffer.array[e];t[i++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[i++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=s(98291),F=s(83349);class N extends C{constructor(e,t,s,i,r,a,o){super(e,t,s),this.type=n.NP.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=r,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("fill-pattern");if(r)if(r.isDataDriven)for(const e of this._features)t(r.getValue(n,e),!0);else t(r.getValue(n),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,s=this.zoom,{fillMaterial:i,outlineMaterial:n,hasDataDrivenFill:r,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",s);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",s),i=t.getPaintValue("fill-opacity",s+1);e<1&&i<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",s),i=t.getPaintValue("fill-color",s+1);e[3]<1&&i[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const r=[];for(const l of c){const c=o.getValue(s,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=i.encodeAttributes(l,s,t,f),g=h&&a?n.encodeAttributes(l,s,t):[],p=l.getGeometry(e);r.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:p}),r.sort((e,t)=>e.page-t.page);for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:n}of r)this._processFeature(n,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=r?i.encodeAttributes(o,s,t):null,c=h&&a?n.encodeAttributes(o,s,t):null,f=o.getGeometry(e);this._processFeature(f,h,t.outlineUsesFillColor,l,c,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._fillIndexStart,t[i++]=this._fillIndexCount,t[i++]=this._outlineIndexStart,t[i++]=this._outlineIndexCount;const n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;t[i++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)s[i++]=this._fillVertexBuffer.array[e];t[i++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[i++]=this._fillIndexBuffer.array[e];t[i++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)s[i++]=this._outlineVertexBuffer.array[e];t[i++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[i++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s,i,n,r,a){if(!e)return;const o=e.length,l=!n||0===n.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],n);let h;for(let t=0;t<o;t++){const s=N._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,r,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,r,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,n=i.index;let a,o,l;const h=new r.bR(0,0),c=new r.bR(0,0),u=new r.bR(0,0);let f=-1,d=-1,g=-1,p=-1,y=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let I=e[_-1];for(;_&&I.isEqual(m);)--_,I=e[_-1];if(!(_-0<2)){for(let n=0;n<_;++n){0===n?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=n!==_-1?e[n+1]:e[0],h.assign(c));const r=this._isClipEdge(a,o);-1===p&&(x=r),c.assignSub(l,o),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const I=-u.x*-h.x+-u.y*-h.y;let b=Math.abs(0!==I?1/I:1);b>8&&(b=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,b*-u.x,b*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g)):(g=s.add(o.x,o.y,b*u.x,b*u.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=s.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g))}f>=0&&d>=0&&p>=0&&!x&&i.add(f,d,p),f>=0&&p>=0&&y>=0&&!x&&i.add(f,y,p),this._outlineIndexCount+=3*(i.index-n)}}_processFill(e,t,s,i,n){let r;t.length>1&&(r=[]);let a=0;for(const s of t)0!==a&&r.push(a),a+=e[s].length;const o=2*a,l=O.A.acquire();for(const s of t){const t=e[s],i=t.length;for(let e=0;e<i;++e)l.push(t[e].x,t[e].y)}const h=(0,F.e)(l,r,2);if(F.e.deviation(l,r,2,h)>0){const i=t.map(t=>e[t].length),{buffer:r,vertexCount:a}=(0,T.l)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(r[2*e],r[2*e+1],s);for(let t=0;t<a;t+=3){const s=e+t;this._fillIndexBuffer.add(s,s+1,s+2)}if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=a:e.set(n,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let i=0;for(;i<o;)this._fillVertexBuffer.add(l[i++],l[i++],s);let r=0;for(;r<e;)this._fillIndexBuffer.add(t+h[r++],t+h[r++],t+h[r++]);if(void 0!==n){const t=this._patternMap,s=t.get(n);s?s[1]+=e:t.set(n,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const s=e.length-1;for(let i=0;i<s;i++)t+=(e[i].x-e[i+1].x)*(e[i].y+e[i+1].y);return t+=(e[s].x-e[0].x)*(e[s].y+e[0].y),.5*t}}var U=s(83773);class z extends C{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=i,this.tessellationProperties._lineIndexBuffer=r,this._lineTessellator=new U.i(G(this.tessellationProperties),K(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!r&&!a)return;const l=o?.getValue(n)||0,h=o?.isDataDriven,c=r?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?r.getValue(n,e):this._getDashArrayKey(e,n,i,a,h,o,l));else if(r)t(r.getValue(n));else if(a){const e=a.getValue(n);t(i.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,s=this.zoom,i=this._features,n=this._tessellationOptions,{hasDataDrivenLine:r,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),h=o?.isDataDriven,c=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",s),g=d||0,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,x=y?null:t.getLayoutValue("line-join",s);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",s);u=t.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,b=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const M=u?.isDataDriven?u:null,w=M?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,T=k?null:t.getPaintValue("line-offset",s);if(h||c){const r=[];for(const n of i){const i=h?o.getValue(s,n):this._getDashArrayKey(n,s,t,l,p,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(n,s,t,c),A=n.getGeometry(e);r.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,n):d,join:y?y.getValue(s,n):x,miterLimit:_?_.getValue(s,n):m,roundLimit:I?I.getValue(s,n):b,halfWidth:.5*(M?M.getValue(s,n):w),offset:k?k.getValue(s,n):T,geometry:A})}r.sort((e,t)=>e.page-t.page),n.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of r)n.capType=s,n.joinType=i,n.miterLimit=a,n.roundLimit=o,n.halfWidth=l,n.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}n.textured=!(!o&&!l),n.capType=d,n.joinType=x,n.miterLimit=m,n.roundLimit=b,n.halfWidth=.5*w,n.offset=T;for(const o of i){const i=r?a.encodeAttributes(o,s,t):null;f&&(n.capType=f.getValue(s,o)),y&&(n.joinType=y.getValue(s,o)),_&&(n.miterLimit=_.getValue(s,o)),I&&(n.roundLimit=I.getValue(s,o)),M&&(n.halfWidth=.5*M.getValue(s,o)),k&&(n.offset=k.getValue(s,o));const l=o.getGeometry(e);this._processFeature(l,i)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._lineIndexStart,t[i++]=this._lineIndexCount;const n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;t[i++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)s[i++]=this.tessellationProperties._lineVertexBuffer.array[e];t[i++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[i++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s){if(!e)return;const i=e.length;for(let n=0;n<i;n++)this._processGeometry(e[n],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,n,r=e[0],a=1;for(;a<e.length;)i=e[a].x-r.x,n=e[a].y-r.y,i*i+n*n<1e-6?e.splice(a,1):(r=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const h=3*o.index-l;if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=h:e.set(s,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,s,i,n,r,a){const o=n?r.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const G=e=>(t,s,i,n,r,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,n,r,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),K=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var q,H=s(32488),W=s(97768),j=s(799),Y=s(3057);function J(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class Z extends C{constructor(e,t,s,i,r,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=n.NP.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=r,this._textVertexBuffer=a,this._textIndexBuffer=o,this._placementEngine=l,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new H.A}getResources(e,t,s){const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);const r=i.getLayoutProperty("icon-image"),a=i.getLayoutProperty("text-field");let o=i.getLayoutProperty("text-transform"),l=i.getLayoutProperty("text-font");const h=[];let c,u,f,d;r&&!r.isDataDriven&&(c=r.getValue(n)),a&&!a.isDataDriven&&(u=a.getValue(n)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",n),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",n),l=null);for(const g of this._features){const y=g.getGeometry(e);if(!y||0===y.length)continue;let x,_;r&&(x=r.isDataDriven?r.getValue(n,g):this._replaceKeys(c,g.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(n,g):this._replaceKeys(u,g.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(n,g)),f){case p.Ms.LOWERCASE:_=_.toLowerCase();break;case p.Ms.UPPERCASE:_=_.toUpperCase()}if(Z._bidiEngine.hasBidiChar(_)){let e;e="rtl"===Z._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=Z._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}if(_.length>0){l&&(d=l.getValue(n,g));for(const e of d){let t=s[e];t||(t=s[e]=new Set);for(const e of _){const s=e.codePointAt(0);null!=s&&t.add(s)}}}}if(!x&&!_)continue;const I=i.getLayoutValue("symbol-sort-key",n,g),b={feature:g,sprite:x,label:_,rtl:m,geometry:y,hash:(_?(0,j.Wm)(_):0)^(x?(0,j.Wm)(x):0),priority:I,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),n=i!==p.kt.POINT,l=t.getLayoutValue("symbol-spacing",s)*a.ih,h=t.getLayoutProperty("icon-image"),c=t.getLayoutProperty("text-field"),u=h?new Y.aR(t,s,n):null,f=c?new Y.uU(t,s,n):null,y=this._workerTileHandler;let _;h&&(_=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const m=[];let I=1;f?.size&&(I=f.size/d);const b=f?f.maxAngle*o.os:0,M=f?f.size*a.ih:0;for(const e of this._symbolFeatures){let t,o;u&&_&&e.sprite&&(t=_[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&u.update(s,e.feature);let h=0;const c=e.label;if(c){(0,W.Lw)(f),f.update(s,e.feature);const t=n&&f.rotationAlignment===p.I5.MAP?f.keepUpright:f.writingMode&&f.writingMode.includes(p.v9.VERTICAL);let i=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.LEFT:case p.KI.BOTTOM_LEFT:i=0;break;case p.KI.TOP_RIGHT:case p.KI.RIGHT:case p.KI.BOTTOM_RIGHT:i=1}let r=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.TOP:case p.KI.TOP_RIGHT:r=0;break;case p.KI.BOTTOM_LEFT:case p.KI.BOTTOM:case p.KI.BOTTOM_RIGHT:r=1}let l=.5;switch(f.justify){case p.O6.AUTO:l=i;break;case p.O6.LEFT:l=0;break;case p.O6.RIGHT:l=1}const u=f.letterSpacing*d,x=n?0:f.maxWidth*d,_=f.lineHeight*d,m=e.textFont.map(e=>y.getGlyphItems(e));if(o=new g(m,x,_,u,i,r,l).getShaping(c,e.rtl,t),o&&o.length>0){let e=1e30,t=-1e30;for(const s of o)e=Math.min(e,s.x),t=Math.max(t,s.x);h=(t-e+48)*I*a.ih}}for(let s of e.geometry){const c=[];if(i===p.kt.LINE){if(o?.length&&f?.size){const e=f.size*a.ih*(2+Math.min(2,4*Math.abs(f.offset[1])));s=Z._smoothVertices(s,e)}Z._pushAnchors(c,s,l,h)}else i===p.kt.LINE_CENTER?Z._pushCenterAnchor(c,s):e.feature.type===r.dC.Polygon?Z._pushCentroid(c,s):c.push(new x(s[0].x,s[0].y));for(const i of c){if(i.x<0||i.x>a.vA||i.y<0||i.y>a.vA)continue;if(n&&h>0&&f?.rotationAlignment===p.I5.MAP&&!Z._honorsTextMaxAngle(s,i,h,b,M))continue;const r={shaping:o,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};m.push(r),this._processFeature(r,u,f)}}}m.sort(J),this._addPlacedGlyphs(),this._symbolInstances=m}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=Z._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer),i=new Float32Array(t.buffer),[n,r,a]=this._sourceTileKey.split("/");let o=0;t[o++]=this.type,t[o++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[o++]=this.layerUIDs[e];t[o++]=this._isIconSDF?1:0,t[o++]=parseFloat(n),t[o++]=parseFloat(r),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[s,i]]of this.markerPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this.glyphsPageMap.size;for(const[e,[s,i]]of this.glyphsPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=Z.serializeSymbols(t,s,i,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)s[o++]=this._iconVertexBuffer.array[e];t[o++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[o++]=this._iconIndexBuffer.array[e];t[o++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)s[o++]=this._textVertexBuffer.array[e];t[o++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[o++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const s of e||[]){t+=5,t+=1;for(const e of s.textColliders)t+=10;for(const e of s.iconColliders)t+=10;t+=1,t+=2*s.textVertexRanges.length,t+=1,t+=2*s.iconVertexRanges.length}return t}static serializeSymbols(e,t,s,i,n){n=n||[],t[i++]=n.length;for(const e of n){t[i++]=e.anchor.x,t[i++]=e.anchor.y,t[i++]=e.symbolFeature.hash,t[i++]=e.symbolFeature.priority,t[i++]=e.symbolFeature.feature.featureIndex,t[i++]=e.textColliders.length+e.iconColliders.length;for(const n of e.textColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;for(const n of e.iconColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;t[i++]=e.textVertexRanges.length;for(const[s,n]of e.textVertexRanges)t[i++]=s,t[i++]=n;t[i++]=e.iconVertexRanges.length;for(const[s,n]of e.iconVertexRanges)t[i++]=s,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,(e,s)=>s in t?t[s]:"")}_processFeature(e,t,s){const{line:i,iconMosaicItem:n,shaping:r,anchor:a}=e,l=this.zoom,h=this.layer,c=!!n;let u=!0;c&&(u=t?.optional||!n);const f=r&&r.length>0,d=!f||s?.optional;let g,y;if(c&&(g=this._placementEngine.getIconPlacement(a,n,t)),(g||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,r,i,s)),y||d)){if(g&&y||(d||u?d||y?u||g||(y=null):g=null:(g=null,y=null)),y){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,y.shapes,l,s.rotationAlignment,t),y.textColliders){e.textColliders=y.textColliders;for(const e of y.textColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}if(g){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,g.shapes,l,n.page,t.rotationAlignment===p.I5.VIEWPORT,s),g.iconColliders){e.iconColliders=g.iconColliders;for(const e of g.iconColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}}}_addPlacedIcons(e,t,s,i,n,r){const a=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=n?0:Math.max(s+(0,o.p6)(u.minzoom),a),f=n?25:Math.min(s+(0,o.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,p=u.bl,y=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,b=u.anchor,M=l.index,w=x.x,k=x.y,T=w+x.width,A=k+x.height,P=l.index;l.add(b.x,b.y,d.x,d.y,w,k,_,m,I,t,f,r),l.add(b.x,b.y,g.x,g.y,T,k,_,m,I,t,f,r),l.add(b.x,b.y,p.x,p.y,w,A,_,m,I,t,f,r),l.add(b.x,b.y,y.x,y.y,T,A,_,m,I,t,f,r),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),h.add(M,M+1,M+2),h.add(M+1,M+2,M+3),c.has(i)?c.get(i)[1]+=6:c.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,s=this._glyphMap;for(const[i,n]of this._glyphBufferDataStorage)for(const r of n){const n=e.index,a=r.symbolInstance,o=r.ddAttributes,l=e.index;e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tl[0],r.tl[1],r.xmin,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tr[0],r.tr[1],r.xmax,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.bl[0],r.bl[1],r.xmin,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.br[0],r.br[1],r.xmax,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(n,n+1,n+2),t.add(n+1,n+2,n+3),s.has(i)?s.get(i)[1]+=6:s.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,s,i,n){const r=Math.max(s-1,0),a=i===p.I5.VIEWPORT;let l,h,c,u,f,d,g,y,x,_,m;for(const i of t)l=a?0:Math.max(s+(0,o.p6)(i.minzoom),r),h=a?25:Math.min(s+(0,o.p6)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,g=i.labelAngle,y=i.minAngle,x=i.maxAngle,_=i.anchor,m=i.mosaicRect,this._glyphBufferDataStorage.has(i.page)||this._glyphBufferDataStorage.set(i.page,[]),this._glyphBufferDataStorage.get(i.page).push({glyphAnchor:[_.x,_.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:g,minAngle:y,maxAngle:x,minLod:l,maxLod:h,placementLod:r,symbolInstance:e,ddAttributes:n}))}static _pushAnchors(e,t,s,i){s+=i;let n=0;const a=t.length-1;for(let e=0;e<a;e++)n+=r.bR.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,n<=l)return;const h=l/n;let c=0,u=-(s=n/Math.max(Math.round(n/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const n=t[i],r=t[i+1],a=r.x-n.x,l=r.y-n.y,f=Math.sqrt(a*a+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,o.GW)(n.x,r.x,t),p=(0,o.GW)(n.y,r.y,t);void 0===d&&(d=Math.atan2(l,a)),e.push(new x(g,p,d,i,h))}c+=f}}static _pushCenterAnchor(e,t){let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=r.bR.distance(t[e],t[e+1]);const n=s/2;let a=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],r=t[s+1],l=r.x-i.x,h=r.y-i.y,c=Math.sqrt(l*l+h*h);if(n<a+c){const t=(n-a)/c,u=(0,o.GW)(i.x,r.x,t),f=(0,o.GW)(i.y,r.y,t),d=Math.atan2(h,l);return void e.push(new x(u,f,d,s,0))}a+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),n=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(n,i)}static _honorsTextMaxAngle(e,t,s,i,n){let a=0;const o=s/2;let l=new r.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=r.bR.distance(e[h],l),l=e[h]}a+=r.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let s,o=h;do{if(++o,o===f)return!1;s=e[o]}while(s.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(s));const g=this._deviation(t,s,l);for(c.push({deviation:g,distToAnchor:a}),u+=g;a-c[0].distToAnchor>n;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=r.bR.distance(s,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let s=e.length;if(s<3)return e;const i=[];let n=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=r.bR.distance(e[t],e[t-1]);s>0&&(n+=s,i.push(n),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*n);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=r.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[s-1],e[s-2]),u.normalize(),e[s-1].x+=t*u.x,e[s-1].y+=t*u.y,i[0]-=t,i[s-1]+=t;const f=[];f.push(new r.bR(o,l));const d=1e-6,g=.5*t;for(let n=1;n<s-1;n++){let a=0,o=0,l=0;for(let s=n-1;s>=0;s--){const r=g+i[s+1]-i[n];if(r<0)break;const h=i[s+1]-i[s],c=i[n]-i[s]<g?1:r/h;if(c<d)break;const u=c*c,f=c*r-.5*u*h,p=c*h/t,y=e[s+1],x=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*r+.5*u*(r*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*r+.5*u*(r*_-h*y.y)-u*c*h*_/3),l+=p}for(let r=n+1;r<s;r++){const s=g-i[r-1]+i[n];if(s<0)break;const h=i[r]-i[r-1],c=i[r]-i[n]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[r-1],x=e[r].x-y.x,_=e[r].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new r.bR(a/l,o/l))}return f.push(new r.bR(h,c)),e[0].x=o,e[0].y=l,e[s-1].x=h,e[s-1].y=c,f}static _pushCentroid(e,t){const s=a.vA,i=a.vA,n=t.length-1;let r=0,o=0,l=0,h=t[0].x,c=t[0].y;h>s&&(h=s),h<0&&(h=0),c>i&&(c=i),c<0&&(c=0);for(let e=1;e<n;e++){let n=t[e].x,a=t[e].y,u=t[e+1].x,f=t[e+1].y;n>s&&(n=s),n<0&&(n=0),a>i&&(a=i),a<0&&(a=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(n-h)*(f-c)-(u-h)*(a-c);r+=d*(h+n+u),o+=d*(c+a+f),l+=d}r/=3*l,o/=3*l,isNaN(r)||isNaN(o)||e.push(new x(r,o))}}!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(q||(q={}));class ${constructor(e,t,s,i,n,a){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,a){this._styleLayerUIDs=new Set;for(const e of a)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,o.IU)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new k.A(new Uint8Array(s.protobuff),new DataView(s.protobuff)),s.refKey){const[e]=s.refKey.split("/").map(parseFloat),i=l-e;if(i>0){const e=(1<<i)-1,s=h&e,n=c&e;this._tileClippers[t]=new r.O3(i,s,n,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new r.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.F)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const n=[],r=new Set,a=(e,t)=>{r.has(e)||(n.push({name:e,repeat:t}),r.add(e))},o={};for(const e of i)e.getResources(e.tileClipper,a,o);if(this._tile.status===q.INVALID)return[];const l=this._fetchResources(n,o,e);return Promise.all([...l,t]).then(()=>this._processFeatures(s.returnedBuckets))}_initialize(e){const t=e?.signal;return{signal:t,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,zoom:s,layers:i,sourceNameToTileClipper:n,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=i.length-1;e>=0;e--){const u=i[e];if(s<c){if(u.minzoom&&s<Math.floor(u.minzoom)||u.maxzoom&&s>=u.maxzoom)continue}else if(u.maxzoom&&s>=u.maxzoom)continue;if(u.type===p.Dc.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!n[u.source])continue;const f=t[u.source],d=n[u.source],g=u.sourceLayer,y=f[g];if(y){let e=a[u.source];if(e||(e=a[u.source]=new Set),e.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const e=this._createBucket(u);if(e){e.layerUIDs=[u.uid],e.layerExtent=y.extent,e.tileClipper=d;let t=r[u.source];t||(t=r[u.source]={});let s=t[g];s||(s=t[g]=[]),s.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:s}=e;s.forEach((e,s)=>{t[e]&&t[e].layerUIDs.push(s)})}_filterFeatures(e){const{signal:t,sourceNameToTileData:s,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:r}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(r))r[e].forEach(t=>{l.push(t),h.push(e)});for(let e=0;e<l.length;e++){const r=h[e],c=l[e];if(!s[r]||!n[r])continue;const u=s[r][c],f=n[r][c];if(!f||0===f.length)continue;if((0,i.G4)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new A(e,u,d++);e.release();const s=t.values;if(s){const e=s._minzoom;if(e&&e>=o)continue;const t=s._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,s){const i=[],n=this._tile.getWorkerTileHandler();let r,a;e.length>0&&(r=n.fetchSprites(e,this._client,s),i.push(r));for(const e in t){const r=t[e];r.size>0&&(a=n.fetchGlyphs(this._tile.tileKey,e,r,this._client,s),i.push(a))}return i}_processFeatures(e){const t=e.filter(e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const s of Object.keys(e)){const i=e[s],n={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new L(e);e.release(),n[t.name]=t;break}default:i.skip()}t[s]=n}return t}_createBucket(e){switch(e.type){case p.Dc.BACKGROUND:return null;case p.Dc.FILL:return this._createFillBucket(e);case p.Dc.LINE:return this._createLineBucket(e);case p.Dc.CIRCLE:return this._createCircleBucket(e);case p.Dc.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new D,new v(e.outlineMaterial.getStride()),new D)}_createLineBucket(e){return new z(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new D)}_createCircleBucket(e){return new E(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new D)}_createSymbolBucket(e){const t=this._tile;return new Z(t.tileKey,e,this._level,new R(e.iconMaterial.getStride()),new D,new R(e.textMaterial.getStride()),new D,t.placementEngine,t.getWorkerTileHandler())}}class Q{constructor(e,t,s,i){this.status=q.INITIALIZED,this.placementEngine=new b,this.tileKey=e,this.refKeys=t,this._workerTileHandler=s,this._styleRepository=i}release(){this.tileKey="",this.refKeys=null,this.status=q.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const s=t?.signal;if(null!=s){const e=()=>{s.removeEventListener("abort",e),this.status=q.INVALID};s.addEventListener("abort",e)}let n;const r={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(e,t)}catch(e){if((0,i.zf)(e))throw e;return{result:r,transferList:[]}}this.status=q.READY;const a=r.bucketsWithData,o=[];for(const e of n)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let h=null;return o.length>0&&(h=Uint32Array.from(o),l.push(h.buffer)),r.emptyBuckets=h,{result:r,transferList:l}}setObsolete(){this.status=q.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const s=e.sourceName2DataAndRefKey;return 0===Object.keys(s).length?[]:(this.status=q.MODIFIED,new $(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=s(45013);class ee{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:s}=e,n={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];n[t]=s.refKey}const r=new Q(s,n,this,this._styleRepository);try{return await r.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(r.setObsolete(),r.release(),!(0,i.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const s of e){const e=s.type,i=s.data;switch(e){case n.$q.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case n.$q.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case n.$q.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case n.$q.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case n.$q.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new X.A(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],n=this._spriteInfo;for(const t of e)void 0===n[t.name]&&i.push(t);return 0===i.length?Promise.resolve():t.invoke("getSprites",i,{signal:s?.signal}).then(e=>{for(const t in e){const s=e[t];n[t]=s}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,n){const r=[];let a=this._glyphInfo[t];return a?s.forEach(e=>{a[e]||r.push(e)}):(a=this._glyphInfo[t]=[],s.forEach(e=>r.push(e))),0===r.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:r},n).then(e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])})}getGlyphItems(e){return this._glyphInfo[e]}}},34304:(e,t,s)=>{s.d(t,{DF:()=>l,FD:()=>n,Ov:()=>r,ct:()=>h});let i=1e-6;function n(){return i}const r=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:r,equals:function(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:n,setEpsilon:function(e){i=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,s)=>{s.d(t,{Eq:()=>d,G1:()=>p,TS:()=>r,Tf:()=>_,V6:()=>n,Vm:()=>g,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function r(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...r(e)]}function o(e,t,s){s<0&&++s,s>1&&--s;const i=6*s;return i<1?e+(t-e)*i:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function l(e,t,s,i=1){const n=(e%360+360)%360/360,r=s<=.5?s*(t+1):s+t-s*t,a=2*s-r;return[Math.round(255*o(a,r,n+1/3)),Math.round(255*o(a,r,n)),Math.round(255*o(a,r,n-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,n=t?1:17,r=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return r&&(l=a&i,a>>=s,o[3]=n*l/255),l=a&i,a>>=s,o[2]=n*l,l=a&i,a>>=s,o[1]=n*l,l=a&i,a>>=s,o[0]=n*l,o}function c(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),s=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=5===e.length?15:parseInt(e.slice(4),16);return[t+16*t,s+16*s,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function u(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),s=t[1];if("rgb"===s&&3===e.length||"rgba"===s&&4===e.length){const t=e[0];if("%"===t.charAt(t.length-1)){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map(e=>parseFloat(e)))}if("hsl"===s&&3===e.length||"hsla"===s&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]))}return null}function f(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?p(e[3]):1,e}function d(e){let t=n(e)?r(e):null;return t??=u(e),t??=c(e),t}function g(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return x(e,0,1)}function y(e){return Math.round(x(e,0,255))}function x(e,t,s){return e=Number(e),isNaN(e)?s:e<t?t:e>s?s:e}const _=2.2},51624:(e,t,s)=>{s.d(t,{A:()=>u});var i,n,r=s(44208),a=s(69397),o=s(93687);(n=i||(i={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const l=4294967296,h=new TextDecoder("utf-8"),c=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class u{constructor(e,t,s=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,n)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const n=this.getMessage(),r=e(n,t,s,i);return n.release(),r}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*n}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const n=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>c){const i=e.subarray(t,s);return h.decode(i)}let i="",n="";for(let r=t;r<s;++r){const t=e[r];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}static{this.pool=new o.A(u,void 0,e=>{e._data=null,e._dataView=null})}}},87317:(e,t,s)=>{s.d(t,{a:()=>m,b:()=>g,c:()=>n,d:()=>c,e:()=>I,g:()=>a,h:()=>y,j:()=>d,l:()=>x,n:()=>p,s:()=>r,t:()=>_});var i=s(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function r(e,t,s,i,n){return e[0]=t,e[1]=s,e[2]=i,e[3]=n,e}function a(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e}function o(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e}function l(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e[3]=t[3]*s[3],e}function h(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e[3]=t[3]/s[3],e}function c(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e}function u(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return Math.sqrt(s*s+i*i+n*n+r*r)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return s*s+i*i+n*n+r*r}function d(e){const t=e[0],s=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+s*s+i*i+n*n)}function g(e){const t=e[0],s=e[1],i=e[2],n=e[3];return t*t+s*s+i*i+n*n}function p(e,t){const s=t[0],i=t[1],n=t[2],r=t[3];let a=s*s+i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=n*a,e[3]=r*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,s,i){const n=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n+i*(s[0]-n),e[1]=r+i*(s[1]-r),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],n=t[1],r=t[2],a=t[3];return e[0]=s[0]*i+s[4]*n+s[8]*r+s[12]*a,e[1]=s[1]*i+s[5]*n+s[9]*r+s[13]*a,e[2]=s[2]*i+s[6]*n+s[10]*r+s[14]*a,e[3]=s[3]*i+s[7]*n+s[11]*r+s[15]*a,e}function m(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function I(e,t){const s=e[0],n=e[1],r=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.FD)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-h)<=u*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const b=o,M=l,w=h,k=u,T=f,A=d,P=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:w,divide:h,dot:y,equals:I,exactEquals:m,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:A,length:d,lerp:x,max:function(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e[2]=Math.max(t[2],s[2]),e[3]=Math.max(t[3],s[3]),e},min:function(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e[2]=Math.min(t[2],s[2]),e[3]=Math.min(t[3],s[3]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:p,random:function(e,t=1){const s=i.Ov;let n,r,a,o,l,h;do{n=2*s()-1,r=2*s()-1,l=n*n+r*r}while(l>=1);do{a=2*s()-1,o=2*s()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*n,e[1]=t*r,e[2]=t*a*c,e[3]=t*o*c,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,s,i){return e[0]=t[0]+s[0]*i,e[1]=t[1]+s[1]*i,e[2]=t[2]+s[2]*i,e[3]=t[3]+s[3]*i,e},set:r,sqrDist:T,sqrLen:P,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],n=t[1],r=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*r-l*n,u=h*n+l*i-a*r,f=h*r+a*n-o*i,d=-a*i-o*n-l*r;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},91829:(e,t,s)=>{function i(){return[0,0,0,0]}function n(e){return[e[0],e[1],e[2],e[3]]}function r(e,t,s,i){return[e,t,s,i]}function a(e,t,s,i){return[e,t,s,i]}function o(e,t=[0,0,0,0]){const s=Math.min(4,e.length);for(let i=0;i<s;++i)t[i]=e[i];return t}function l(){return r(1,1,1,1)}function h(){return r(1,0,0,0)}function c(){return r(0,1,0,0)}function u(){return r(0,0,1,0)}function f(){return r(0,0,0,1)}s.d(t,{CN:()=>a,Un:()=>g,ci:()=>o,fA:()=>r,o8:()=>n,uY:()=>d,vt:()=>i});const d=[0,0,0,0],g=l(),p=h(),y=c(),x=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:x,ZEROS:d,clone:n,create:i,freeze:a,fromArray:o,fromValues:r,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3379],{11764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ee});var i=s(74887),n=s(89640),r=s(6774),a=s(83027),o=s(13195);function l(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function h(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function c(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function u(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var f=s(18989);const d=24;class g{constructor(e,t,s,i,n,r,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=n,this._vAnchor=r,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,n=this._lineHeight,r=this._justify,a=this._maxWidth,o=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const n=s&&l(e);let r;for(const t of this._glyphItems)if(r=t[e],r)break;o.push({codePoint:e,x:f,y:d,vertical:n,glyphMosaicItem:r}),r&&(f+=r.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const p=e.includes("​"),y=[],x=o.length;for(let e=0;e<x-1;e++){const t=o[e].codePoint,s=h(t);if(c(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&p)i+=150;else{40!==t&&65288!==t||(i+=50);const s=o[e+1].codePoint;41!==s&&65289!==s||(i+=50)}y.push(this._buildBreak(e+1,o[e].x,g,y,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,y,0,!0));let m=0;const I=t?-n:n;let b=0;for(let e=0;e<_.length;e++){const t=_[e];let s=b;for(;s<t&&u(o[s].codePoint);)o[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&u(o[i].codePoint);)o[i].glyphMosaicItem=null,--i;if(s<=i){const e=o[s].x;for(let t=s;t<=i;t++)o[t].x-=e,o[t].y=d;let t=o[i].x;o[i].glyphMosaicItem&&(t+=o[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),r&&this._applyJustification(o,s,i)}b=t,d+=I}if(o.length>0){const e=_.length-1,s=(r-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*n;t&&e&&(i+=e*n);for(const e of o)e.x+=s,e.y+=i}return o.filter(e=>e.glyphMosaicItem)}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,n=0,r=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,h=o+e,c=l+t;s=Math.min(s,o),n=Math.max(n,h),i=Math.min(i,l),r=Math.max(r,c)}return{x:s,y:i,width:n-s,height:r-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,n=0;for(const r of e){const{height:e,left:a,top:o,width:l}=r.glyphMosaicItem.metrics,h=r.x,c=r.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),i=Math.max(i,u),s=Math.min(s,c),n=Math.max(n,f)}return{x:t,y:s,width:i-t,height:n-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,n=e[0].y;for(let r=1;r<s;r++){const s=e[r];if(s.y!==n){const a=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),n=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const r=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:r-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const n=(e-t)*(e-t);return i?e<t?n/2:2*n:n+Math.abs(s)*s}_buildBreak(e,t,s,i,n,r){let a=null,o=this._breakScore(t,s,n,r);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,n,r)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,s){const i=e[s],n=i.vertical?d:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,r=(i.x+n)*this._justify;for(let i=t;i<=s;i++)e[i].x-=r}}var p=s(4272);const y=.5;class x{constructor(e,t,s=0,i=-1,n=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=n}}class _{constructor(e,t,s,i,n,r=y,a=o.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=n,this.minzoom=r,this.maxzoom=a}}class m{constructor(e,t,s,i,n,r,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=n,this.labelAngle=r,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class I{constructor(e){this.shapes=e}}class b{getIconPlacement(e,t,s){const i=new r.bR(e.x,e.y),n=s.rotationAlignment===p.I5.MAP,a=s.keepUpright;let l=s.rotate*o.os;n&&(l+=e.angle);const h=new I([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),n&&a&&this._addIconPlacement(h,i,t,s,l+o.Jo),h}_addIconPlacement(e,t,s,i,n){const a=s.rasterizationScale,l=s.width/a,h=s.height/a,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case p.KI.CENTER:u-=l/2,f-=h/2;break;case p.KI.LEFT:f-=h/2;break;case p.KI.RIGHT:u-=l,f-=h/2;break;case p.KI.TOP:u-=l/2;break;case p.KI.BOTTOM:u-=l/2,f-=h;break;case p.KI.TOP_LEFT:break;case p.KI.BOTTOM_LEFT:f-=h;break;case p.KI.TOP_RIGHT:u-=l;break;case p.KI.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,g=2/a,x=u-g,_=f-g,I=x+d.width/a,b=_+d.height/a,M=new r.bR(x,_),w=new r.bR(I,b),k=new r.bR(x,b),T=new r.bR(I,_);if(0!==n){const e=Math.cos(n),t=Math.sin(n);M.rotate(e,t),w.rotate(e,t),k.rotate(e,t),T.rotate(e,t)}const A=new m(M,T,k,w,d,n,0,256,t,y,o.MG,0);if(e.shapes.push(A),!i.allowOverlap||!i.ignorePlacement){const s=i.size,r=i.padding,a={xTile:t.x,yTile:t.y,dxPixels:u*s-r,dyPixels:f*s-r,hard:!i.optional,partIndex:0,width:l*s+2*r,height:h*s+2*r,angle:n,minLod:y,maxLod:o.MG};e.iconColliders.push(a)}}getTextPlacement(e,t,s,i){const n=new r.bR(e.x,e.y),l=i.rotate*o.os,h=i.rotationAlignment===p.I5.MAP,c=i.keepUpright,u=i.padding;let f=y;const x=h?e.angle:0,b=e.segment>=0&&h,M=i.allowOverlap&&i.ignorePlacement?null:[],w=[],k=!b;let T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A;const L=(b||h)&&c,V=i.size/d;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let v,R=0,S=0;if(!b&&B){const e=g.getTextBox(t,i.lineHeight*d);switch(i.anchor){case p.KI.LEFT:R=e.height/2,S=-e.width/2;break;case p.KI.RIGHT:R=-e.height/2,S=e.width/2;break;case p.KI.TOP:R=e.height/2,S=e.width/2;break;case p.KI.BOTTOM:R=-e.height/2,S=-e.width/2;break;case p.KI.TOP_LEFT:R=e.height;break;case p.KI.BOTTOM_LEFT:S=-e.width;break;case p.KI.TOP_RIGHT:S=e.width;break;case p.KI.BOTTOM_RIGHT:R=-e.height}}R+=i.offset[0]*d,S+=i.offset[1]*d;for(const d of t){const t=d.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const g=t.rect,p=t.metrics,I=t.page;if(M&&k){if(void 0!==v&&v!==d.y){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a),T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A}v=d.y}const C=[];if(b){const i=.5*t.metrics.width,n=(d.x+p.left-4+i)*V*a.ih;if(f=this._placeGlyph(e,f,n,s,e.segment,1,d.vertical,I,C),c&&(f=this._placeGlyph(e,f,n,s,e.segment,-1,d.vertical,I,C)),f>=2)break}else C.push(new _(n,x,x,I,!1)),h&&c&&C.push(new _(n,x+o.Jo,x+o.Jo,I,!1));const E=d.x+p.left,O=d.y-17-p.top,F=E+p.width,N=O+p.height;let U,z,G,K,q,H,W,j;if(!b&&B)if(d.vertical){const e=(E+F)/2-p.height/2,t=(O+N)/2+p.width/2;U=new r.bR(-t-4+R,e-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y)}else U=new r.bR(4-O+R,E-4+S),z=new r.bR(U.x-g.height,U.y+g.width),G=new r.bR(z.x,U.y),K=new r.bR(U.x,z.y);else U=new r.bR(E-4+R,O-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y);for(const t of C){let s,n,a,o;if(t.alternateVerticalGlyph){if(!q){const e=(O+N)/2+S;q=new r.bR((E+F)/2+R-p.height/2-4,e+p.width/2+4),H=new r.bR(q.x+g.height,q.y-g.width),W=new r.bR(H.x,q.y),j=new r.bR(q.x,H.y)}s=q,n=W,a=j,o=H}else s=U,n=G,a=K,o=z;const h=O,c=N,f=t.glyphAngle+l;if(0!==f){const e=Math.cos(f),t=Math.sin(f);s=s.clone(),n=n?.clone(),a=a?.clone(),o=o?.clone(),s.rotate(e,t),o?.rotate(e,t),n?.rotate(e,t),a?.rotate(e,t)}let y=0,x=256;if(b&&B?d.vertical?t.alternateVerticalGlyph?(y=32,x=96):(y=224,x=32):(y=224,x=96):(y=192,x=64),w.push(new m(s,a,n,o,g,t.labelAngle,y,x,t.anchor,t.minzoom,t.maxzoom,t.page)),M&&(!L||this._legible(t.labelAngle)))if(k)E<T&&(T=E),h<P&&(P=h),F>A&&(A=F),c>D&&(D=c);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(E+R)*V-u,dyPixels:(h+R)*V-u,hard:!i.optional,partIndex:1,width:(F-E)*V+2*u,height:(c-h)*V+2*u,angle:f,minLod:t.minzoom,maxLod:t.maxzoom};M.push(s)}}}if(f>=2)return null;if(M&&k){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a)}const C=new I(w);return M&&M.length>0&&(C.textColliders=M),C}_legible(e){const t=(0,o.z0)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,n,a,l,h,c){let u=a;const f=u<0?(0,o.Wh)(e.angle+o.Jo,o.pJ):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=o.Jo),u>0&&++n;let g=new r.bR(e.x,e.y),p=i[n],y=o.MG;if(i.length<=n)return y;for(;;){const e=p.x-g.x,r=p.y-g.y,a=Math.sqrt(e*e+r*r),x=Math.max(s/a,t),m=e/a,I=r/a,b=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new _(g,f,b,h,!1,x,y)),l&&c.push(new _(g,f,b,h,!0,x,y)),x<=t)return x;g=p.clone();do{if(n+=u,i.length<=n||n<0)return x;p=i[n]}while(g.isEqual(p));let M=p.x-g.x,w=p.y-g.y;const k=Math.sqrt(M*M+w*w);M*=a/k,w*=a/k,g.x-=M,g.y-=w,y=x}}}var M,w,k=s(51624),T=s(15585);(w=M||(M={}))[w.moveTo=1]="moveTo",w[w.lineTo=2]="lineTo",w[w.close=7]="close";class A{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,n=t.values,r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:this.id=r.getUInt64();break;case 2:{const e=r.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),r=e.getUInt32();t[i[s]]=n[r]}e.release();break}case 3:this.type=r.getUInt32();break;case 4:this._pbfGeometry=r.getMessage();break;default:r.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let s,i;this._pbfGeometry=null,e?e.reset(this.type):s=[];let n,a=M.moveTo,o=0,l=0,h=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case M.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new r.bR(l,h)));break;case M.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new r.bR(l,h));break;case M.close:e?e.close():i&&!i[0].equals(l,h)&&i.push(i[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?n=e.result():s&&(i&&s.push(i),n=s),t.release(),this._geometry=n,n}}var P=s(80081);class D extends P.A{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}P.A;class L{constructor(e){this.extent=a.vA,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(L._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class V extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,o,l,h,c,u){const f=this.array;let d=P.A.i1616to32(e,t);f.push(d);const g=31;d=P.A.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*n),Math.round(g*r)),f.push(d),d=P.A.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=P.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends P.A{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(P.A.i1616to32(e,t)),s&&i.push(...s)}}class v extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a){const o=this.array,l=this.index;let h=P.A.i1616to32(e,t);return o.push(h),h=P.A.i8888to32(Math.round(15*s),Math.round(15*i),n,r),o.push(h),a&&o.push(...a),l}}class R extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,l,h,c,u,f){const d=this.array;let g=P.A.i1616to32(e,t);d.push(g),g=P.A.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=P.A.i8888to32(n/4,r/4,l,h),d.push(g),g=P.A.i8888to32(0,(0,o.z0)(a),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class S extends P.A{constructor(e){super(e)}add(e,t,s,i,n){const r=this.array,a=P.A.i1616to32(2*e+s,2*t+i);r.push(a),n&&r.push(...n)}}class C{constructor(e,t,s){this.layerExtent=a.vA,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=s,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,s){}}class E extends C{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=r}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,s=this._circleIndexBuffer;this._circleIndexStart=3*s.index,this._circleIndexCount=0;const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);for(const r of this._features){const a=r.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(r,n,i);for(const e of a)if(e)for(const i of e){const e=t.index;t.add(i.x,i.y,0,0,o),t.add(i.x,i.y,0,1,o),t.add(i.x,i.y,1,0,o),t.add(i.x,i.y,1,1,o),s.add(e,e+1,e+2),s.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._circleIndexStart,t[i++]=this._circleIndexCount,t[i++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)s[i++]=this._circleVertexBuffer.array[e];t[i++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[i++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=s(98291),F=s(83349);class N extends C{constructor(e,t,s,i,r,a,o){super(e,t,s),this.type=n.NP.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=r,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("fill-pattern");if(r)if(r.isDataDriven)for(const e of this._features)t(r.getValue(n,e),!0);else t(r.getValue(n),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,s=this.zoom,{fillMaterial:i,outlineMaterial:n,hasDataDrivenFill:r,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",s);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",s),i=t.getPaintValue("fill-opacity",s+1);e<1&&i<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",s),i=t.getPaintValue("fill-color",s+1);e[3]<1&&i[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const r=[];for(const l of c){const c=o.getValue(s,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=i.encodeAttributes(l,s,t,f),g=h&&a?n.encodeAttributes(l,s,t):[],p=l.getGeometry(e);r.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:p}),r.sort((e,t)=>e.page-t.page);for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:n}of r)this._processFeature(n,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=r?i.encodeAttributes(o,s,t):null,c=h&&a?n.encodeAttributes(o,s,t):null,f=o.getGeometry(e);this._processFeature(f,h,t.outlineUsesFillColor,l,c,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._fillIndexStart,t[i++]=this._fillIndexCount,t[i++]=this._outlineIndexStart,t[i++]=this._outlineIndexCount;const n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;t[i++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)s[i++]=this._fillVertexBuffer.array[e];t[i++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[i++]=this._fillIndexBuffer.array[e];t[i++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)s[i++]=this._outlineVertexBuffer.array[e];t[i++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[i++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s,i,n,r,a){if(!e)return;const o=e.length,l=!n||0===n.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],n);let h;for(let t=0;t<o;t++){const s=N._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,r,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,r,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,n=i.index;let a,o,l;const h=new r.bR(0,0),c=new r.bR(0,0),u=new r.bR(0,0);let f=-1,d=-1,g=-1,p=-1,y=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let I=e[_-1];for(;_&&I.isEqual(m);)--_,I=e[_-1];if(!(_-0<2)){for(let n=0;n<_;++n){0===n?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=n!==_-1?e[n+1]:e[0],h.assign(c));const r=this._isClipEdge(a,o);-1===p&&(x=r),c.assignSub(l,o),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const I=-u.x*-h.x+-u.y*-h.y;let b=Math.abs(0!==I?1/I:1);b>8&&(b=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,b*-u.x,b*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g)):(g=s.add(o.x,o.y,b*u.x,b*u.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),f=s.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g))}f>=0&&d>=0&&p>=0&&!x&&i.add(f,d,p),f>=0&&p>=0&&y>=0&&!x&&i.add(f,y,p),this._outlineIndexCount+=3*(i.index-n)}}_processFill(e,t,s,i,n){let r;t.length>1&&(r=[]);let a=0;for(const s of t)0!==a&&r.push(a),a+=e[s].length;const o=2*a,l=O.A.acquire();for(const s of t){const t=e[s],i=t.length;for(let e=0;e<i;++e)l.push(t[e].x,t[e].y)}const h=(0,F.e)(l,r,2);if(F.e.deviation(l,r,2,h)>0){const i=t.map(t=>e[t].length),{buffer:r,vertexCount:a}=(0,T.l)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(r[2*e],r[2*e+1],s);for(let t=0;t<a;t+=3){const s=e+t;this._fillIndexBuffer.add(s,s+1,s+2)}if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=a:e.set(n,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let i=0;for(;i<o;)this._fillVertexBuffer.add(l[i++],l[i++],s);let r=0;for(;r<e;)this._fillIndexBuffer.add(t+h[r++],t+h[r++],t+h[r++]);if(void 0!==n){const t=this._patternMap,s=t.get(n);s?s[1]+=e:t.set(n,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const s=e.length-1;for(let i=0;i<s;i++)t+=(e[i].x-e[i+1].x)*(e[i].y+e[i+1].y);return t+=(e[s].x-e[0].x)*(e[s].y+e[0].y),.5*t}}var U=s(83773);class z extends C{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=i,this.tessellationProperties._lineIndexBuffer=r,this._lineTessellator=new U.i(G(this.tessellationProperties),K(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!r&&!a)return;const l=o?.getValue(n)||0,h=o?.isDataDriven,c=r?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?r.getValue(n,e):this._getDashArrayKey(e,n,i,a,h,o,l));else if(r)t(r.getValue(n));else if(a){const e=a.getValue(n);t(i.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,s=this.zoom,i=this._features,n=this._tessellationOptions,{hasDataDrivenLine:r,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),h=o?.isDataDriven,c=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",s),g=d||0,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,x=y?null:t.getLayoutValue("line-join",s);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",s);u=t.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,b=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const M=u?.isDataDriven?u:null,w=M?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,T=k?null:t.getPaintValue("line-offset",s);if(h||c){const r=[];for(const n of i){const i=h?o.getValue(s,n):this._getDashArrayKey(n,s,t,l,p,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(n,s,t,c),A=n.getGeometry(e);r.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,n):d,join:y?y.getValue(s,n):x,miterLimit:_?_.getValue(s,n):m,roundLimit:I?I.getValue(s,n):b,halfWidth:.5*(M?M.getValue(s,n):w),offset:k?k.getValue(s,n):T,geometry:A})}r.sort((e,t)=>e.page-t.page),n.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of r)n.capType=s,n.joinType=i,n.miterLimit=a,n.roundLimit=o,n.halfWidth=l,n.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}n.textured=!(!o&&!l),n.capType=d,n.joinType=x,n.miterLimit=m,n.roundLimit=b,n.halfWidth=.5*w,n.offset=T;for(const o of i){const i=r?a.encodeAttributes(o,s,t):null;f&&(n.capType=f.getValue(s,o)),y&&(n.joinType=y.getValue(s,o)),_&&(n.miterLimit=_.getValue(s,o)),I&&(n.roundLimit=I.getValue(s,o)),M&&(n.halfWidth=.5*M.getValue(s,o)),k&&(n.offset=k.getValue(s,o));const l=o.getGeometry(e);this._processFeature(l,i)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._lineIndexStart,t[i++]=this._lineIndexCount;const n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;t[i++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)s[i++]=this.tessellationProperties._lineVertexBuffer.array[e];t[i++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[i++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s){if(!e)return;const i=e.length;for(let n=0;n<i;n++)this._processGeometry(e[n],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,n,r=e[0],a=1;for(;a<e.length;)i=e[a].x-r.x,n=e[a].y-r.y,i*i+n*n<1e-6?e.splice(a,1):(r=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const h=3*o.index-l;if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=h:e.set(s,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,s,i,n,r,a){const o=n?r.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const G=e=>(t,s,i,n,r,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,n,r,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),K=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var q,H=s(32488),W=s(97768),j=s(799),Y=s(3057);function J(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class Z extends C{constructor(e,t,s,i,r,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=n.NP.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=r,this._textVertexBuffer=a,this._textIndexBuffer=o,this._placementEngine=l,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new H.A}getResources(e,t,s){const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);const r=i.getLayoutProperty("icon-image"),a=i.getLayoutProperty("text-field");let o=i.getLayoutProperty("text-transform"),l=i.getLayoutProperty("text-font");const h=[];let c,u,f,d;r&&!r.isDataDriven&&(c=r.getValue(n)),a&&!a.isDataDriven&&(u=a.getValue(n)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",n),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",n),l=null);for(const g of this._features){const y=g.getGeometry(e);if(!y||0===y.length)continue;let x,_;r&&(x=r.isDataDriven?r.getValue(n,g):this._replaceKeys(c,g.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(n,g):this._replaceKeys(u,g.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(n,g)),f){case p.Ms.LOWERCASE:_=_.toLowerCase();break;case p.Ms.UPPERCASE:_=_.toUpperCase()}if(Z._bidiEngine.hasBidiChar(_)){let e;e="rtl"===Z._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=Z._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}if(_.length>0){l&&(d=l.getValue(n,g));for(const e of d){let t=s[e];t||(t=s[e]=new Set);for(const e of _){const s=e.codePointAt(0);null!=s&&t.add(s)}}}}if(!x&&!_)continue;const I=i.getLayoutValue("symbol-sort-key",n,g),b={feature:g,sprite:x,label:_,rtl:m,geometry:y,hash:(_?(0,j.Wm)(_):0)^(x?(0,j.Wm)(x):0),priority:I,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),n=i!==p.kt.POINT,l=t.getLayoutValue("symbol-spacing",s)*a.ih,h=t.getLayoutProperty("icon-image"),c=t.getLayoutProperty("text-field"),u=h?new Y.aR(t,s,n):null,f=c?new Y.uU(t,s,n):null,y=this._workerTileHandler;let _;h&&(_=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const m=[];let I=1;f?.size&&(I=f.size/d);const b=f?f.maxAngle*o.os:0,M=f?f.size*a.ih:0;for(const e of this._symbolFeatures){let t,o;u&&_&&e.sprite&&(t=_[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&u.update(s,e.feature);let h=0;const c=e.label;if(c){(0,W.Lw)(f),f.update(s,e.feature);const t=n&&f.rotationAlignment===p.I5.MAP?f.keepUpright:f.writingMode&&f.writingMode.includes(p.v9.VERTICAL);let i=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.LEFT:case p.KI.BOTTOM_LEFT:i=0;break;case p.KI.TOP_RIGHT:case p.KI.RIGHT:case p.KI.BOTTOM_RIGHT:i=1}let r=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.TOP:case p.KI.TOP_RIGHT:r=0;break;case p.KI.BOTTOM_LEFT:case p.KI.BOTTOM:case p.KI.BOTTOM_RIGHT:r=1}let l=.5;switch(f.justify){case p.O6.AUTO:l=i;break;case p.O6.LEFT:l=0;break;case p.O6.RIGHT:l=1}const u=f.letterSpacing*d,x=n?0:f.maxWidth*d,_=f.lineHeight*d,m=e.textFont.map(e=>y.getGlyphItems(e));if(o=new g(m,x,_,u,i,r,l).getShaping(c,e.rtl,t),o&&o.length>0){let e=1e30,t=-1e30;for(const s of o)e=Math.min(e,s.x),t=Math.max(t,s.x);h=(t-e+48)*I*a.ih}}for(let s of e.geometry){const c=[];if(i===p.kt.LINE){if(o?.length&&f?.size){const e=f.size*a.ih*(2+Math.min(2,4*Math.abs(f.offset[1])));s=Z._smoothVertices(s,e)}Z._pushAnchors(c,s,l,h)}else i===p.kt.LINE_CENTER?Z._pushCenterAnchor(c,s):e.feature.type===r.dC.Polygon?Z._pushCentroid(c,s):c.push(new x(s[0].x,s[0].y));for(const i of c){if(i.x<0||i.x>a.vA||i.y<0||i.y>a.vA)continue;if(n&&h>0&&f?.rotationAlignment===p.I5.MAP&&!Z._honorsTextMaxAngle(s,i,h,b,M))continue;const r={shaping:o,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};m.push(r),this._processFeature(r,u,f)}}}m.sort(J),this._addPlacedGlyphs(),this._symbolInstances=m}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=Z._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer),i=new Float32Array(t.buffer),[n,r,a]=this._sourceTileKey.split("/");let o=0;t[o++]=this.type,t[o++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[o++]=this.layerUIDs[e];t[o++]=this._isIconSDF?1:0,t[o++]=parseFloat(n),t[o++]=parseFloat(r),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[s,i]]of this.markerPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this.glyphsPageMap.size;for(const[e,[s,i]]of this.glyphsPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=Z.serializeSymbols(t,s,i,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)s[o++]=this._iconVertexBuffer.array[e];t[o++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[o++]=this._iconIndexBuffer.array[e];t[o++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)s[o++]=this._textVertexBuffer.array[e];t[o++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[o++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const s of e||[]){t+=5,t+=1;for(const e of s.textColliders)t+=10;for(const e of s.iconColliders)t+=10;t+=1,t+=2*s.textVertexRanges.length,t+=1,t+=2*s.iconVertexRanges.length}return t}static serializeSymbols(e,t,s,i,n){n=n||[],t[i++]=n.length;for(const e of n){t[i++]=e.anchor.x,t[i++]=e.anchor.y,t[i++]=e.symbolFeature.hash,t[i++]=e.symbolFeature.priority,t[i++]=e.symbolFeature.feature.featureIndex,t[i++]=e.textColliders.length+e.iconColliders.length;for(const n of e.textColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;for(const n of e.iconColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;t[i++]=e.textVertexRanges.length;for(const[s,n]of e.textVertexRanges)t[i++]=s,t[i++]=n;t[i++]=e.iconVertexRanges.length;for(const[s,n]of e.iconVertexRanges)t[i++]=s,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,(e,s)=>s in t?t[s]:"")}_processFeature(e,t,s){const{line:i,iconMosaicItem:n,shaping:r,anchor:a}=e,l=this.zoom,h=this.layer,c=!!n;let u=!0;c&&(u=t?.optional||!n);const f=r&&r.length>0,d=!f||s?.optional;let g,y;if(c&&(g=this._placementEngine.getIconPlacement(a,n,t)),(g||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,r,i,s)),y||d)){if(g&&y||(d||u?d||y?u||g||(y=null):g=null:(g=null,y=null)),y){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,y.shapes,l,s.rotationAlignment,t),y.textColliders){e.textColliders=y.textColliders;for(const e of y.textColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}if(g){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,g.shapes,l,n.page,t.rotationAlignment===p.I5.VIEWPORT,s),g.iconColliders){e.iconColliders=g.iconColliders;for(const e of g.iconColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}}}_addPlacedIcons(e,t,s,i,n,r){const a=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=n?0:Math.max(s+(0,o.p6)(u.minzoom),a),f=n?25:Math.min(s+(0,o.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,p=u.bl,y=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,b=u.anchor,M=l.index,w=x.x,k=x.y,T=w+x.width,A=k+x.height,P=l.index;l.add(b.x,b.y,d.x,d.y,w,k,_,m,I,t,f,r),l.add(b.x,b.y,g.x,g.y,T,k,_,m,I,t,f,r),l.add(b.x,b.y,p.x,p.y,w,A,_,m,I,t,f,r),l.add(b.x,b.y,y.x,y.y,T,A,_,m,I,t,f,r),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),h.add(M,M+1,M+2),h.add(M+1,M+2,M+3),c.has(i)?c.get(i)[1]+=6:c.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,s=this._glyphMap;for(const[i,n]of this._glyphBufferDataStorage)for(const r of n){const n=e.index,a=r.symbolInstance,o=r.ddAttributes,l=e.index;e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tl[0],r.tl[1],r.xmin,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tr[0],r.tr[1],r.xmax,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.bl[0],r.bl[1],r.xmin,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.br[0],r.br[1],r.xmax,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(n,n+1,n+2),t.add(n+1,n+2,n+3),s.has(i)?s.get(i)[1]+=6:s.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,s,i,n){const r=Math.max(s-1,0),a=i===p.I5.VIEWPORT;let l,h,c,u,f,d,g,y,x,_,m;for(const i of t)l=a?0:Math.max(s+(0,o.p6)(i.minzoom),r),h=a?25:Math.min(s+(0,o.p6)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,g=i.labelAngle,y=i.minAngle,x=i.maxAngle,_=i.anchor,m=i.mosaicRect,this._glyphBufferDataStorage.has(i.page)||this._glyphBufferDataStorage.set(i.page,[]),this._glyphBufferDataStorage.get(i.page).push({glyphAnchor:[_.x,_.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:g,minAngle:y,maxAngle:x,minLod:l,maxLod:h,placementLod:r,symbolInstance:e,ddAttributes:n}))}static _pushAnchors(e,t,s,i){s+=i;let n=0;const a=t.length-1;for(let e=0;e<a;e++)n+=r.bR.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,n<=l)return;const h=l/n;let c=0,u=-(s=n/Math.max(Math.round(n/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const n=t[i],r=t[i+1],a=r.x-n.x,l=r.y-n.y,f=Math.sqrt(a*a+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,o.GW)(n.x,r.x,t),p=(0,o.GW)(n.y,r.y,t);void 0===d&&(d=Math.atan2(l,a)),e.push(new x(g,p,d,i,h))}c+=f}}static _pushCenterAnchor(e,t){let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=r.bR.distance(t[e],t[e+1]);const n=s/2;let a=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],r=t[s+1],l=r.x-i.x,h=r.y-i.y,c=Math.sqrt(l*l+h*h);if(n<a+c){const t=(n-a)/c,u=(0,o.GW)(i.x,r.x,t),f=(0,o.GW)(i.y,r.y,t),d=Math.atan2(h,l);return void e.push(new x(u,f,d,s,0))}a+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),n=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(n,i)}static _honorsTextMaxAngle(e,t,s,i,n){let a=0;const o=s/2;let l=new r.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=r.bR.distance(e[h],l),l=e[h]}a+=r.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let s,o=h;do{if(++o,o===f)return!1;s=e[o]}while(s.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(s));const g=this._deviation(t,s,l);for(c.push({deviation:g,distToAnchor:a}),u+=g;a-c[0].distToAnchor>n;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=r.bR.distance(s,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let s=e.length;if(s<3)return e;const i=[];let n=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=r.bR.distance(e[t],e[t-1]);s>0&&(n+=s,i.push(n),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*n);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=r.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[s-1],e[s-2]),u.normalize(),e[s-1].x+=t*u.x,e[s-1].y+=t*u.y,i[0]-=t,i[s-1]+=t;const f=[];f.push(new r.bR(o,l));const d=1e-6,g=.5*t;for(let n=1;n<s-1;n++){let a=0,o=0,l=0;for(let s=n-1;s>=0;s--){const r=g+i[s+1]-i[n];if(r<0)break;const h=i[s+1]-i[s],c=i[n]-i[s]<g?1:r/h;if(c<d)break;const u=c*c,f=c*r-.5*u*h,p=c*h/t,y=e[s+1],x=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*r+.5*u*(r*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*r+.5*u*(r*_-h*y.y)-u*c*h*_/3),l+=p}for(let r=n+1;r<s;r++){const s=g-i[r-1]+i[n];if(s<0)break;const h=i[r]-i[r-1],c=i[r]-i[n]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[r-1],x=e[r].x-y.x,_=e[r].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new r.bR(a/l,o/l))}return f.push(new r.bR(h,c)),e[0].x=o,e[0].y=l,e[s-1].x=h,e[s-1].y=c,f}static _pushCentroid(e,t){const s=a.vA,i=a.vA,n=t.length-1;let r=0,o=0,l=0,h=t[0].x,c=t[0].y;h>s&&(h=s),h<0&&(h=0),c>i&&(c=i),c<0&&(c=0);for(let e=1;e<n;e++){let n=t[e].x,a=t[e].y,u=t[e+1].x,f=t[e+1].y;n>s&&(n=s),n<0&&(n=0),a>i&&(a=i),a<0&&(a=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(n-h)*(f-c)-(u-h)*(a-c);r+=d*(h+n+u),o+=d*(c+a+f),l+=d}r/=3*l,o/=3*l,isNaN(r)||isNaN(o)||e.push(new x(r,o))}}!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(q||(q={}));class ${constructor(e,t,s,i,n,a){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,a){this._styleLayerUIDs=new Set;for(const e of a)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,o.IU)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new k.A(new Uint8Array(s.protobuff),new DataView(s.protobuff)),s.refKey){const[e]=s.refKey.split("/").map(parseFloat),i=l-e;if(i>0){const e=(1<<i)-1,s=h&e,n=c&e;this._tileClippers[t]=new r.O3(i,s,n,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new r.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.F)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const n=[],r=new Set,a=(e,t)=>{r.has(e)||(n.push({name:e,repeat:t}),r.add(e))},o={};for(const e of i)e.getResources(e.tileClipper,a,o);if(this._tile.status===q.INVALID)return[];const l=this._fetchResources(n,o,e);return Promise.all([...l,t]).then(()=>this._processFeatures(s.returnedBuckets))}_initialize(e){const t=e?.signal;return{signal:t,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,zoom:s,layers:i,sourceNameToTileClipper:n,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=i.length-1;e>=0;e--){const u=i[e];if(s<c){if(u.minzoom&&s<Math.floor(u.minzoom)||u.maxzoom&&s>=u.maxzoom)continue}else if(u.maxzoom&&s>=u.maxzoom)continue;if(u.type===p.Dc.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!n[u.source])continue;const f=t[u.source],d=n[u.source],g=u.sourceLayer,y=f[g];if(y){let e=a[u.source];if(e||(e=a[u.source]=new Set),e.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const e=this._createBucket(u);if(e){e.layerUIDs=[u.uid],e.layerExtent=y.extent,e.tileClipper=d;let t=r[u.source];t||(t=r[u.source]={});let s=t[g];s||(s=t[g]=[]),s.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:s}=e;s.forEach((e,s)=>{t[e]&&t[e].layerUIDs.push(s)})}_filterFeatures(e){const{signal:t,sourceNameToTileData:s,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:r}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(r))r[e].forEach(t=>{l.push(t),h.push(e)});for(let e=0;e<l.length;e++){const r=h[e],c=l[e];if(!s[r]||!n[r])continue;const u=s[r][c],f=n[r][c];if(!f||0===f.length)continue;if((0,i.G4)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new A(e,u,d++);e.release();const s=t.values;if(s){const e=s._minzoom;if(e&&e>=o)continue;const t=s._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,s){const i=[],n=this._tile.getWorkerTileHandler();let r,a;e.length>0&&(r=n.fetchSprites(e,this._client,s),i.push(r));for(const e in t){const r=t[e];r.size>0&&(a=n.fetchGlyphs(this._tile.tileKey,e,r,this._client,s),i.push(a))}return i}_processFeatures(e){const t=e.filter(e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const s of Object.keys(e)){const i=e[s],n={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new L(e);e.release(),n[t.name]=t;break}default:i.skip()}t[s]=n}return t}_createBucket(e){switch(e.type){case p.Dc.BACKGROUND:return null;case p.Dc.FILL:return this._createFillBucket(e);case p.Dc.LINE:return this._createLineBucket(e);case p.Dc.CIRCLE:return this._createCircleBucket(e);case p.Dc.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new D,new v(e.outlineMaterial.getStride()),new D)}_createLineBucket(e){return new z(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new D)}_createCircleBucket(e){return new E(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new D)}_createSymbolBucket(e){const t=this._tile;return new Z(t.tileKey,e,this._level,new R(e.iconMaterial.getStride()),new D,new R(e.textMaterial.getStride()),new D,t.placementEngine,t.getWorkerTileHandler())}}class Q{constructor(e,t,s,i){this.status=q.INITIALIZED,this.placementEngine=new b,this.tileKey=e,this.refKeys=t,this._workerTileHandler=s,this._styleRepository=i}release(){this.tileKey="",this.refKeys=null,this.status=q.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const s=t?.signal;if(null!=s){const e=()=>{s.removeEventListener("abort",e),this.status=q.INVALID};s.addEventListener("abort",e)}let n;const r={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(e,t)}catch(e){if((0,i.zf)(e))throw e;return{result:r,transferList:[]}}this.status=q.READY;const a=r.bucketsWithData,o=[];for(const e of n)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let h=null;return o.length>0&&(h=Uint32Array.from(o),l.push(h.buffer)),r.emptyBuckets=h,{result:r,transferList:l}}setObsolete(){this.status=q.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const s=e.sourceName2DataAndRefKey;return 0===Object.keys(s).length?[]:(this.status=q.MODIFIED,new $(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=s(45013);class ee{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:s}=e,n={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];n[t]=s.refKey}const r=new Q(s,n,this,this._styleRepository);try{return await r.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(r.setObsolete(),r.release(),!(0,i.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const s of e){const e=s.type,i=s.data;switch(e){case n.$q.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case n.$q.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case n.$q.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case n.$q.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case n.$q.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new X.A(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],n=this._spriteInfo;for(const t of e)void 0===n[t.name]&&i.push(t);return 0===i.length?Promise.resolve():t.invoke("getSprites",i,{signal:s?.signal}).then(e=>{for(const t in e){const s=e[t];n[t]=s}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,n){const r=[];let a=this._glyphInfo[t];return a?s.forEach(e=>{a[e]||r.push(e)}):(a=this._glyphInfo[t]=[],s.forEach(e=>r.push(e))),0===r.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:r},n).then(e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])})}getGlyphItems(e){return this._glyphInfo[e]}}},34304:(e,t,s)=>{s.d(t,{DF:()=>l,FD:()=>n,Ov:()=>r,ct:()=>h});let i=1e-6;function n(){return i}const r=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:r,equals:function(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:n,setEpsilon:function(e){i=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,s)=>{s.d(t,{Eq:()=>d,G1:()=>p,TS:()=>r,Tf:()=>_,V6:()=>n,Vm:()=>g,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function r(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...r(e)]}function o(e,t,s){s<0&&++s,s>1&&--s;const i=6*s;return i<1?e+(t-e)*i:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function l(e,t,s,i=1){const n=(e%360+360)%360/360,r=s<=.5?s*(t+1):s+t-s*t,a=2*s-r;return[Math.round(255*o(a,r,n+1/3)),Math.round(255*o(a,r,n)),Math.round(255*o(a,r,n-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,n=t?1:17,r=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return r&&(l=a&i,a>>=s,o[3]=n*l/255),l=a&i,a>>=s,o[2]=n*l,l=a&i,a>>=s,o[1]=n*l,l=a&i,a>>=s,o[0]=n*l,o}function c(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),s=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=5===e.length?15:parseInt(e.slice(4),16);return[t+16*t,s+16*s,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function u(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),s=t[1];if("rgb"===s&&3===e.length||"rgba"===s&&4===e.length){const t=e[0];if("%"===t.charAt(t.length-1)){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map(e=>parseFloat(e)))}if("hsl"===s&&3===e.length||"hsla"===s&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]))}return null}function f(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?p(e[3]):1,e}function d(e){let t=n(e)?r(e):null;return t??=u(e),t??=c(e),t}function g(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return x(e,0,1)}function y(e){return Math.round(x(e,0,255))}function x(e,t,s){return e=Number(e),isNaN(e)?s:e<t?t:e>s?s:e}const _=2.2},51624:(e,t,s)=>{s.d(t,{A:()=>u});var i,n,r=s(44208),a=s(69397),o=s(93687);(n=i||(i={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const l=4294967296,h=new TextDecoder("utf-8"),c=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class u{constructor(e,t,s=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,n)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const n=this.getMessage(),r=e(n,t,s,i);return n.release(),r}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*n}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const n=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>c){const i=e.subarray(t,s);return h.decode(i)}let i="",n="";for(let r=t;r<s;++r){const t=e[r];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}static{this.pool=new o.A(u,void 0,e=>{e._data=null,e._dataView=null})}}},87317:(e,t,s)=>{s.d(t,{a:()=>m,b:()=>g,c:()=>n,d:()=>c,e:()=>I,f:()=>f,g:()=>a,h:()=>y,j:()=>d,l:()=>x,n:()=>p,s:()=>r,t:()=>_});var i=s(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function r(e,t,s,i,n){return e[0]=t,e[1]=s,e[2]=i,e[3]=n,e}function a(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e}function o(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e}function l(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e[3]=t[3]*s[3],e}function h(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e[3]=t[3]/s[3],e}function c(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e}function u(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return Math.sqrt(s*s+i*i+n*n+r*r)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return s*s+i*i+n*n+r*r}function d(e){const t=e[0],s=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+s*s+i*i+n*n)}function g(e){const t=e[0],s=e[1],i=e[2],n=e[3];return t*t+s*s+i*i+n*n}function p(e,t){const s=t[0],i=t[1],n=t[2],r=t[3];let a=s*s+i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=n*a,e[3]=r*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,s,i){const n=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n+i*(s[0]-n),e[1]=r+i*(s[1]-r),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],n=t[1],r=t[2],a=t[3];return e[0]=s[0]*i+s[4]*n+s[8]*r+s[12]*a,e[1]=s[1]*i+s[5]*n+s[9]*r+s[13]*a,e[2]=s[2]*i+s[6]*n+s[10]*r+s[14]*a,e[3]=s[3]*i+s[7]*n+s[11]*r+s[15]*a,e}function m(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function I(e,t){const s=e[0],n=e[1],r=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.FD)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-h)<=u*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const b=o,M=l,w=h,k=u,T=f,A=d,P=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:w,divide:h,dot:y,equals:I,exactEquals:m,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:A,length:d,lerp:x,max:function(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e[2]=Math.max(t[2],s[2]),e[3]=Math.max(t[3],s[3]),e},min:function(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e[2]=Math.min(t[2],s[2]),e[3]=Math.min(t[3],s[3]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:p,random:function(e,t=1){const s=i.Ov;let n,r,a,o,l,h;do{n=2*s()-1,r=2*s()-1,l=n*n+r*r}while(l>=1);do{a=2*s()-1,o=2*s()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*n,e[1]=t*r,e[2]=t*a*c,e[3]=t*o*c,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,s,i){return e[0]=t[0]+s[0]*i,e[1]=t[1]+s[1]*i,e[2]=t[2]+s[2]*i,e[3]=t[3]+s[3]*i,e},set:r,sqrDist:T,sqrLen:P,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],n=t[1],r=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*r-l*n,u=h*n+l*i-a*r,f=h*r+a*n-o*i,d=-a*i-o*n-l*r;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},91829:(e,t,s)=>{function i(){return[0,0,0,0]}function n(e){return[e[0],e[1],e[2],e[3]]}function r(e,t,s,i){return[e,t,s,i]}function a(e,t,s,i){return[e,t,s,i]}function o(e,t=[0,0,0,0]){const s=Math.min(4,e.length);for(let i=0;i<s;++i)t[i]=e[i];return t}function l(){return r(1,1,1,1)}function h(){return r(1,0,0,0)}function c(){return r(0,1,0,0)}function u(){return r(0,0,1,0)}function f(){return r(0,0,0,1)}s.d(t,{CN:()=>a,Un:()=>g,ci:()=>o,fA:()=>r,o8:()=>n,uY:()=>d,vt:()=>i});const d=[0,0,0,0],g=l(),p=h(),y=c(),x=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:x,ZEROS:d,clone:n,create:i,freeze:a,fromArray:o,fromValues:r,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))}}]);