@arcgis/core 5.2.0-next.82 → 5.2.0-next.83

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 (126) hide show
  1. package/assets/components/assets/icon/deleteAndReplaceFeatures16.json +1 -0
  2. package/assets/components/assets/icon/deleteAndReplaceFeatures24.json +1 -0
  3. package/assets/components/assets/icon/deleteAndReplaceFeatures32.json +1 -0
  4. package/assets/components/assets/icon/moveAndRotate16.json +1 -0
  5. package/assets/components/assets/icon/moveAndRotate24.json +1 -0
  6. package/assets/components/assets/icon/moveAndRotate32.json +1 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/028bee58f7bc19e5e39e.js +1 -0
  9. package/assets/esri/core/workers/chunks/{a2fd945659ce052f99d2.js → 03895d49fbd34ccb3ead.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0775d1e3034d5e7ef7bc.js +1 -0
  11. package/assets/esri/core/workers/chunks/{95ff342e5c29bf91a765.js → 13a43c87d7952facbed4.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{e59101f1d060d0a30a65.js → 14def8f47ae7265dd71b.js} +1 -1
  13. package/assets/esri/core/workers/chunks/1b00789511c9b27da4a7.js +1 -0
  14. package/assets/esri/core/workers/chunks/1b277311a4beb4243bf8.js +2 -0
  15. package/assets/esri/core/workers/chunks/1d03db4df18524cf391c.js +1 -0
  16. package/assets/esri/core/workers/chunks/24bfe759c8848143361e.js +1 -0
  17. package/assets/esri/core/workers/chunks/30dade7bf6032be32599.js +2 -0
  18. package/assets/esri/core/workers/chunks/{865f9adc591056458b6b.js → 33dc93d82407052fafe1.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{0d982abff7c9496f7890.js → 3a6990058f1003bd2812.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{0fd7590e545864f5fff4.js → 3ca0d503ce733088a6c2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/46b3d6814ba4c0a71111.js +1 -0
  22. package/assets/esri/core/workers/chunks/49784f8e8e5fac0cc5a9.js +1 -0
  23. package/assets/esri/core/workers/chunks/{563a4d6788ad66b676e4.js → 5156d94f01b4fbbf8cde.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{cdd4aeaa3f30bc4ea93a.js → 5568448e7f51508ffdf5.js} +1 -1
  25. package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +1 -0
  26. package/assets/esri/core/workers/chunks/{218ddad849745d652a28.js → 5a3c1fe24814a345ab39.js} +1 -1
  27. package/assets/esri/core/workers/chunks/5b292831127bf981c1c5.js +1 -0
  28. package/assets/esri/core/workers/chunks/{bd1c870694edd25bf8aa.js → 5f13ade03500b39c1720.js} +1 -1
  29. package/assets/esri/core/workers/chunks/6154f4d39f9e53fe56cc.js +1 -0
  30. package/assets/esri/core/workers/chunks/62b116307483d5f0e37d.js +2 -0
  31. package/assets/esri/core/workers/chunks/6433a623af765b7e53ab.js +1 -0
  32. package/assets/esri/core/workers/chunks/65eff0ae773505495f21.js +1 -0
  33. package/assets/esri/core/workers/chunks/6d11b922898a8039dbe7.js +1 -0
  34. package/assets/esri/core/workers/chunks/7188559a685e0ba30c4f.js +1 -0
  35. package/assets/esri/core/workers/chunks/{faf14281a74a06fa1f30.js → 724b2631c9ced80a1661.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7493ce5d02224c07a6d5.js +1 -0
  37. package/assets/esri/core/workers/chunks/7ad70c8a56f2481adc82.js +1 -0
  38. package/assets/esri/core/workers/chunks/7ca188f824956a5cac35.js +2 -0
  39. package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +1 -0
  40. package/assets/esri/core/workers/chunks/{ab10388dcc17a665ac3b.js → 8e1b913067b8e88ff365.js} +2 -2
  41. package/assets/esri/core/workers/chunks/{e3eab61815ef1c521a6c.js → 9568932bafe689c38f63.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{c8d83f71326222b98608.js → 996ac351e2322298a17d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{34f6093d2c00e3584037.js → 9be05d32528b395a7d34.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{552d6aecc7d88d16227b.js → 9d41c02601d0bb75b525.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{64a1ffc221e5b63b43fb.js → a4bb0951e1389e7b803c.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{b09e9ac5fd928e69b053.js → aabffe53508730e504ec.js} +1 -1
  47. package/assets/esri/core/workers/chunks/b61c30cdf698b4d1573a.js +1 -0
  48. package/assets/esri/core/workers/chunks/bbb97c38d8670329d07e.js +2 -0
  49. package/assets/esri/core/workers/chunks/bd8b483e70acf0fc601e.js +1 -0
  50. package/assets/esri/core/workers/chunks/bef32acf368b4d5aba37.js +1 -0
  51. package/assets/esri/core/workers/chunks/c90dfdf2302b7db1f6f7.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8a36b999cbd65dd2f16c.js → d8c3bdc3c6be8ba7c5e6.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{40b842d055b87e442156.js → f20b88f5a6d3b988a055.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{f248131df4eaa5291623.js → f6ae0c483579e227a2f2.js} +1 -1
  55. package/config.js +1 -1
  56. package/geometry/support/spatialReferenceUtils.js +1 -1
  57. package/kernel.js +1 -1
  58. package/package.json +2 -2
  59. package/renderers/UniqueValueRenderer.js +1 -1
  60. package/support/revision.js +1 -1
  61. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  62. package/views/2d/engine/vectorTiles/style/GeoJSONLabelUtils.js +2 -0
  63. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  64. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  65. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  66. package/views/3d/GroundView3D.js +1 -1
  67. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  68. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  69. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  70. package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +1 -1
  71. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  72. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  73. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  74. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  75. package/views/3d/input/SceneInputManager.js +1 -1
  76. package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
  77. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  78. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  79. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  80. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  81. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  82. package/views/3d/state/utils/navigationUtils.js +1 -1
  83. package/views/3d/support/GroundAndIMSurface.js +2 -0
  84. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  85. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  86. package/views/3d/support/pointsOfInterest/PointOfInterest.js +1 -1
  87. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  88. package/views/3d/terrain/OverlayManager.js +1 -1
  89. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  90. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  91. package/views/SceneView.js +1 -1
  92. package/views/draw/support/PluginContext.js +1 -1
  93. package/views/draw/support/types.d.ts +6 -0
  94. package/views/interactive/interactiveToolUtils.js +1 -1
  95. package/widgets/Widget.js +1 -1
  96. package/widgets/support/jsxWidgetSupport.js +1 -1
  97. package/assets/esri/core/workers/chunks/0dcfd82a2669df6eb5a0.js +0 -1
  98. package/assets/esri/core/workers/chunks/1352b5c6767e5421bc02.js +0 -1
  99. package/assets/esri/core/workers/chunks/14469f664fd5ede469fc.js +0 -1
  100. package/assets/esri/core/workers/chunks/177c3b23c1cbd4737049.js +0 -1
  101. package/assets/esri/core/workers/chunks/21f763694a41968ac21a.js +0 -1
  102. package/assets/esri/core/workers/chunks/230925079cee040a8d77.js +0 -1
  103. package/assets/esri/core/workers/chunks/25696c194457e42b3bdc.js +0 -1
  104. package/assets/esri/core/workers/chunks/469e72ab6cd44272f474.js +0 -1
  105. package/assets/esri/core/workers/chunks/4f36596280142be1c666.js +0 -1
  106. package/assets/esri/core/workers/chunks/53d80202b5f43542d45b.js +0 -1
  107. package/assets/esri/core/workers/chunks/6c389e9646a48c26da20.js +0 -2
  108. package/assets/esri/core/workers/chunks/6f08c8a1e8e3ffd0a96a.js +0 -1
  109. package/assets/esri/core/workers/chunks/71ee7c51d2c60a180f1e.js +0 -1
  110. package/assets/esri/core/workers/chunks/927582ec15bff2acbb49.js +0 -1
  111. package/assets/esri/core/workers/chunks/98739b6e7904045edbab.js +0 -1
  112. package/assets/esri/core/workers/chunks/a69c10bfd632a5546b34.js +0 -1
  113. package/assets/esri/core/workers/chunks/ac9a3dfd02160e43fc8a.js +0 -2
  114. package/assets/esri/core/workers/chunks/c456abf5ee2a1ad5cc5b.js +0 -1
  115. package/assets/esri/core/workers/chunks/c61e94806b37ca3dd549.js +0 -2
  116. package/assets/esri/core/workers/chunks/c899457f19b749516275.js +0 -1
  117. package/assets/esri/core/workers/chunks/d0c8630177d3a4e316f1.js +0 -2
  118. package/assets/esri/core/workers/chunks/da0ef984509057ec8507.js +0 -1
  119. package/assets/esri/core/workers/chunks/ead4143d811aab610e00.js +0 -2
  120. package/assets/esri/core/workers/chunks/ffe2cbfea38b92a231d6.js +0 -1
  121. /package/assets/esri/core/workers/chunks/{d0c8630177d3a4e316f1.js.LICENSE.txt → 1b277311a4beb4243bf8.js.LICENSE.txt} +0 -0
  122. /package/assets/esri/core/workers/chunks/{ead4143d811aab610e00.js.LICENSE.txt → 30dade7bf6032be32599.js.LICENSE.txt} +0 -0
  123. /package/assets/esri/core/workers/chunks/{ac9a3dfd02160e43fc8a.js.LICENSE.txt → 62b116307483d5f0e37d.js.LICENSE.txt} +0 -0
  124. /package/assets/esri/core/workers/chunks/{6c389e9646a48c26da20.js.LICENSE.txt → 7ca188f824956a5cac35.js.LICENSE.txt} +0 -0
  125. /package/assets/esri/core/workers/chunks/{ab10388dcc17a665ac3b.js.LICENSE.txt → 8e1b913067b8e88ff365.js.LICENSE.txt} +0 -0
  126. /package/assets/esri/core/workers/chunks/{c61e94806b37ca3dd549.js.LICENSE.txt → bbb97c38d8670329d07e.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[579],{83349(t,e,n){function r(t,e,n){n=n||2;var r,s,a,l,h,c,x,y=e&&e.length,f=y?e[0]*n:t.length,d=i(t,0,f,n,!0),g=[];if(!d||d.next===d.prev)return g;if(y&&(d=u(t,e,d,n)),t.length>80*n){r=a=t[0],s=l=t[1];for(var p=n;p<f;p+=n)(h=t[p])<r&&(r=h),(c=t[p+1])<s&&(s=c),h>a&&(a=h),c>l&&(l=c);x=0!==(x=Math.max(a-r,l-s))?1/x:0}return o(d,g,n,r,s,x),g}function i(t,e,n,r,i){var s,o;if(i===L(t,e,n,r)>0)for(s=e;s<n;s+=r)o=V(s,t[s],t[s+1],o);else for(s=n-r;s>=e;s-=r)o=V(s,t[s],t[s+1],o);if(o&&v(o,o.next)){var a=o.next;S(o),o=a}return o}function s(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==b(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(S(r),(r=e=i)===r.next)break;n=!0}}while(n||r!==e);return e}function o(t,e,n,r,i,u,x){if(t){!x&&u&&g(t,r,i,u);for(var y,f,d=t;t.prev!==t.next;)if(y=t.prev,f=t.next,u?l(t,r,i,u):a(t))e.push(y.i/n),e.push(t.i/n),e.push(f.i/n),S(t),t=f.next,d=f.next;else if((t=f)===d){x?1===x?o(t=h(s(t),e,n),e,n,r,i,u,2):2===x&&c(t,e,n,r,i,u):o(s(t),e,n,r,i,u,1);break}}}function a(t){var e=t.prev,n=t,r=t.next;if(b(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&b(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,n,r){var i=t.prev,s=t,o=t.next;if(b(i,s,o)>=0)return!1;for(var a=i.x<s.x?i.x<o.x?i.x:o.x:s.x<o.x?s.x:o.x,l=i.y<s.y?i.y<o.y?i.y:o.y:s.y<o.y?s.y:o.y,h=i.x>s.x?i.x>o.x?i.x:o.x:s.x>o.x?s.x:o.x,c=i.y>s.y?i.y>o.y?i.y:o.y:s.y>o.y?s.y:o.y,u=p(a,l,e,n,r),x=p(h,c,e,n,r),y=t.prevZ,f=t.nextZ;y&&y.z>=u&&f&&f.z<=x;){if(y!==t.prev&&y!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,y.x,y.y)&&b(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,f!==t.prev&&f!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;y&&y.z>=u;){if(y!==t.prev&&y!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,y.x,y.y)&&b(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;f&&f.z<=x;){if(f!==t.prev&&f!==t.next&&m(i.x,i.y,s.x,s.y,o.x,o.y,f.x,f.y)&&b(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function h(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!v(i,o)&&I(i,r,r.next,o)&&P(i,o)&&P(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),S(r),S(r.next),r=t=o),r=r.next}while(r!==t);return s(r)}function c(t,e,n,r,i,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&w(l,h)){var c=T(l,h);return l=s(l,l.next),c=s(c,c.next),o(l,e,n,r,i,a),void o(c,e,n,r,i,a)}h=h.next}l=l.next}while(l!==t)}function u(t,e,n,r){var o,a,l,h=[];for(o=0,a=e.length;o<a;o++)(l=i(t,e[o]*r,o<a-1?e[o+1]*r:t.length,r,!1))===l.next&&(l.steiner=!0),h.push(_(l));for(h.sort(x),o=0;o<h.length;o++)n=s(n=f(h[o],n),n.next);return n}function x(t,e){return t.x-e.x}function y(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function f(t,e){var n=function(t,e){var n,r=e,i=t.x,s=t.y,o=-1/0;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var a=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>o){if(o=a,a===i){if(s===r.y)return r;if(s===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===o)return n;var l,h=n,c=n.x,u=n.y,x=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&m(s<u?i:o,s,c,u,s<u?o:i,s,r.x,r.y)&&(l=Math.abs(s-r.y)/(i-r.x),P(r,t)&&(l<x||l===x&&(r.x>n.x||r.x===n.x&&d(n,r)))&&(n=r,x=l)),r=r.next}while(r!==h);return n}(t,e);if(!n)return e;var r=T(n,t),i=s(n,n.next);let o=y(r);return s(o,o.next),i=y(i),y(e===n?i:e)}function d(t,e){return b(t.prev,t,e.prev)<0&&b(e.next,t,t.next)<0}function g(t,e,n,r){var i=t;do{null===i.z&&(i.z=p(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,s,o,a,l,h=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,r=n,a=0,e=0;e<h&&(a++,r=r.nextZ);e++);for(l=h;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:t=i,i.prevZ=s,s=i;n=r}s.nextZ=null,h*=2}while(o>1)}(i)}function p(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function _(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function m(t,e,n,r,i,s,o,a){return(i-o)*(e-a)-(t-o)*(s-a)>=0&&(t-o)*(r-a)-(n-o)*(e-a)>=0&&(n-o)*(s-a)-(i-o)*(r-a)>=0}function w(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&I(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(P(t,e)&&P(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(b(t.prev,t,e.prev)||b(t,e.prev,e))||v(t,e)&&b(t.prev,t,t.next)>0&&b(e.prev,e,e.next)>0)}function b(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function I(t,e,n,r){var i=k(b(t,e,n)),s=k(b(t,e,r)),o=k(b(n,r,t)),a=k(b(n,r,e));return i!==s&&o!==a||!(0!==i||!M(t,n,e))||!(0!==s||!M(t,r,e))||!(0!==o||!M(n,t,r))||!(0!==a||!M(n,e,r))}function M(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function k(t){return t>0?1:t<0?-1:0}function P(t,e){return b(t.prev,t,t.next)<0?b(t,e,t.next)>=0&&b(t,t.prev,e)>=0:b(t,e,t.prev)<0||b(t,t.next,e)<0}function T(t,e){var n=new A(t.i,t.x,t.y),r=new A(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function V(t,e,n,r){var i=new A(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(t,e,n,r){for(var i=0,s=e,o=n-r;s<n;s+=r)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}n.d(e,{e:()=>r}),r.deviation=function(t,e,n,r){var i=e&&e.length,s=i?e[0]*n:t.length,o=Math.abs(L(t,0,s,n));if(i)for(var a=0,l=e.length;a<l;a++){var h=e[a]*n,c=a<l-1?e[a+1]*n:t.length;o-=Math.abs(L(t,h,c,n))}var u=0;for(a=0;a<r.length;a+=3){var x=r[a]*n,y=r[a+1]*n,f=r[a+2]*n;u+=Math.abs((t[x]-t[f])*(t[y+1]-t[x+1])-(t[x]-t[y])*(t[f+1]-t[x+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++)for(var o=0;o<e;o++)n.vertices.push(t[i][s][o]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},95488(t,e,n){n.d(e,{I:()=>i});var r=n(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},51624(t,e,n){n.d(e,{A:()=>h});var r=n(44208),i=n(69397),s=n(93687);const o=4294967296,a=new TextDecoder("utf-8"),l=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class h{constructor(t,e,n=0,r=t?.byteLength??0){this._tag=0,this._dataType=99,this._init(t,e,n,r)}[Symbol.dispose](){this.release()}_init(t,e,n,r){this._data=t,this._dataView=e,this._pos=n,this._end=r}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}clonePooled(){return h.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(t,e,n=0,r=t?.byteLength??0){const i=h.pool.acquire();return i._init(t,e,n,r),i}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getPackedEnd(){const t=this.getUInt32();return this._pos+t}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getUint32(e+4,!0)*o;return this._skip(8),n}getSFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getInt32(e+4,!0)*o;return this._skip(8),n}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,n=this._toString(this._data,e,e+t);return this._skip(t),n}getBytes(){const t=this._getLength(),e=this._pos,n=this._toBytes(this._data,e,e+t);return this._skip(t),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,n,r){const i=this.getMessage(),s=t(i,e,n,r);return i.release(),s}processMessage(t){const e=this.getMessage(),n=t(e);return e.release(),n}getMessage(){const t=this._getLength(),e=h.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,n=0,r=0;if(this._end-e>=10)do{if(r=t[e++],n|=127&r,!(128&r))break;if(r=t[e++],n|=(127&r)<<7,!(128&r))break;if(r=t[e++],n|=(127&r)<<14,!(128&r))break;if(r=t[e++],n|=(127&r)<<21,!(128&r))break;if(r=t[e++],n+=268435456*(127&r),!(128&r))break;if(r=t[e++],n+=34359738368*(127&r),!(128&r))break;if(r=t[e++],n+=4398046511104*(127&r),!(128&r))break;if(r=t[e++],n+=562949953421312*(127&r),!(128&r))break;if(r=t[e++],n+=72057594037927940*(127&r),!(128&r))break;if(r=t[e++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;e!==this._end&&(r=t[e],128&r);)++e,n+=(127&r)*i,i*=128;if(e===this._end)throw new Error("Varint overrun!");++e,n+=r*i}return this._pos=e,n}_decodeSVarint(){const t=this._data;let e,n=0,r=0;const i=1&t[this._pos];if(r=t[this._pos++],n|=127&r,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<7,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<14,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<21,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=268435456*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=34359738368*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=4398046511104*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(e=BigInt(n),r=t[this._pos++],e+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,n){if((n=Math.min(this._end,n))-e>l){const r=t.subarray(e,n);return a.decode(r)}let r="",i="";for(let s=e;s<n;++s){const e=t[s];128&e?i+="%"+e.toString(16):(r+=decodeURIComponent(i)+String.fromCharCode(e),i="")}return i.length&&(r+=decodeURIComponent(i)),r}_toBytes(t,e,n){return n=Math.min(this._end,n),new Uint8Array(t.buffer,e,n-e)}static{this.pool=new s.A(()=>new h(null,null),void 0,t=>{t._data=null,t._dataView=null})}}},15585(t,e,n){n.d(e,{If:()=>y,O5:()=>p,O9:()=>d,QT:()=>g,l3:()=>f});var r=n(5482),i=n(2741),s=n(49186),o=n(44208),a=n(34727);let l=null,h=null,c=null,u=null;const x=(new Float32Array(0),new Uint32Array(0),new Uint32Array(0),new Uint32Array(0),{vertices:new Float64Array(0),indices:new Uint32Array(0),outlineIndices:new Uint32Array(0),outlineRingLengths:new Uint32Array(0),vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function y(){return l??=async function(){const t=await n.e(2997).then(n.bind(n,42997)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});c=e}(),l}async function f(){return h??=async function(){const t=await n.e(9134).then(n.bind(n,99134)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});u=e}(),h}function d(){return null!==u}function g(t,e,n=2){const i={stack:[],error:void 0,hasError:!1};try{const a=c;if(!a)throw new s.A("libtess:not-loaded","libtessF32 not loaded");const l=(0,r.mS)(i,b.from(a,t),!1),h=(0,r.mS)(i,I.from(a,e),!1),u=t.length/n*4,x=(0,r.mS)(i,new b(a,u*n),!1),y=a.triangulate(l.ptr,h.ptr,h.size,n,x.ptr,u);if((0,o.A)("esri-tessellation-debug")){const t=a.getError();0!==t&&console.warn("libtess:triangulation",M(t))}return{buffer:x.slice(0,y*n),vertexCount:y}}catch(t){i.error=t,i.hasError=!0}finally{(0,r.hk)(i)}}function p(t,e,n=2,i=!0){const l={stack:[],error:void 0,hasError:!1};try{const h=u;if(!h)throw new s.A("libtess:not-loaded","libtessF64 not loaded");const c=(0,r.mS)(l,v.from(h,t),!1),y=(0,r.mS)(l,I.from(h,e),!1),f=(0,r.mS)(l,new I(h,1),!1),d=(0,r.mS)(l,new I(h,1),!1),g=(0,r.mS)(l,new I(h,1),!1),p=(0,r.mS)(l,new I(h,1),!1),{maxVertexCount:_,maxIndexCount:m,maxOutlineIndexCount:b,maxOutlineRingCount:k}=function(t,e){const n=t.reduce((t,e)=>t+e,0),r=t.length,i=Math.max(0,t.length-1),s=Math.max(0,n+2*i-2),o=Math.max(0,Math.ceil(2*n)),l=Math.max(0,Math.ceil(3*s*2)),h=(0,a.mP)(l,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,u=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:o,maxIndexCount:h,maxOutlineIndexCount:e?Math.max(0,n+r+c):0,maxOutlineRingCount:e?Math.max(0,r+u):0}}(e,i);let P=0,T=0,V=0,S=0,A=0;{const t={stack:[],error:void 0,hasError:!1};try{const e=(0,r.mS)(t,new v(h,_*n),!1),s=(0,r.mS)(t,new I(h,m),!1),o=(0,r.mS)(t,i?new I(h,b):null,!1),a=(0,r.mS)(t,i?new I(h,k):null,!1);if(h.triangulateIndexed(c.ptr,y.ptr,y.size,n,e.ptr,_,n,s.ptr,m,f.ptr,d.ptr,o?.ptr??0,b,a?.ptr??0,k,g.ptr,p.ptr),A=h.getError(),P=w(h)[f.ptr/Int32Array.BYTES_PER_ELEMENT],T=w(h)[d.ptr/Int32Array.BYTES_PER_ELEMENT],V=w(h)[g.ptr/Int32Array.BYTES_PER_ELEMENT],S=w(h)[p.ptr/Int32Array.BYTES_PER_ELEMENT],0===A){const t=e.slice(0,P*n);return{vertices:t,indices:s.slice(0,T),outlineIndices:i&&o?o.slice(0,V):x.outlineIndices,outlineRingLengths:i&&a?a.slice(0,S):x.outlineRingLengths,vertexCount:P,indexCount:T,outlineIndexCount:i?V:0,outlineRingCount:i?S:0}}}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}if(100903!==A)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(A)),x;const L=(0,r.mS)(l,new v(h,P*n),!1),D=(0,r.mS)(l,new I(h,T),!1),B=(0,r.mS)(l,i?new I(h,V):null,!1),C=(0,r.mS)(l,i?new I(h,S):null,!1);if(h.triangulateIndexed(c.ptr,y.ptr,y.size,n,L.ptr,P,n,D.ptr,T,f.ptr,d.ptr,B?.ptr??0,i?V:0,C?.ptr??0,i?S:0,g.ptr,p.ptr),A=h.getError(),0!==A)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(A)),x;const E=w(h)[f.ptr/Int32Array.BYTES_PER_ELEMENT],R=w(h)[d.ptr/Int32Array.BYTES_PER_ELEMENT],z=w(h)[g.ptr/Int32Array.BYTES_PER_ELEMENT],U=w(h)[p.ptr/Int32Array.BYTES_PER_ELEMENT],F=L.slice(0,E*n);return{vertices:F,indices:D.slice(0,R),outlineIndices:i&&B?B.slice(0,z):x.outlineIndices,outlineRingLengths:i&&C?C.slice(0,U):x.outlineRingLengths,vertexCount:E,indexCount:R,outlineIndexCount:i?z:0,outlineRingCount:i?U:0}}catch(t){l.error=t,l.hasError=!0}finally{(0,r.hk)(l)}}function _(t){return t.HEAPF64}function m(t){return t.HEAPF32}function w(t){return t.HEAP32}class b{static from(t,e){const n=new b(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(t){m(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return m(this._libtess).slice(n+t,n+e)}}class v{static from(t,e){const n=new v(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(t){_(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return _(this._libtess).slice(n+t,n+e)}}class I{static from(t,e){const n=new I(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateLengthsArray(e)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(t){w(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return function(t){const e=w(t);return new Uint32Array(e.buffer,e.byteOffset,e.length)}(this._libtess).slice(n+t,n+e)}}function M(t){switch(t){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${t}`}}},60408(t,e,n){function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function i(t){return void 0!==t.points}function s(t){return void 0!==t.x&&void 0!==t.y}function o(t){return void 0!==t.paths||void 0!==t.curvePaths}function a(t){return void 0!==t.rings||void 0!==t.curveRings}function l(t){return"object"==typeof t&&"vertexAttributes"in t}function h(t){return t?s(t)?"esriGeometryPoint":o(t)?"esriGeometryPolyline":a(t)?"esriGeometryPolygon":r(t)?"esriGeometryEnvelope":i(t)?"esriGeometryMultipoint":null:null}function c(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function u(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}n.d(e,{$B:()=>h,Bi:()=>a,Pv:()=>c,Rg:()=>o,U9:()=>i,W0:()=>u,ZC:()=>r,fT:()=>s,uW:()=>l})},97770(t,e,n){n.d(e,{Ey:()=>D,F8:()=>L,J2:()=>T,Yq:()=>S,_m:()=>V,iS:()=>A,wj:()=>B});var r=n(66552),i=n(73444),s=n(98623),o=n(92647);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},x={year:"numeric",month:"short",day:"numeric"},y={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},d={...f,second:"numeric"},g={hourCycle:"h23"},p={...f,...g},_={...d,...g},m={"short-date":c,"short-date-short-time":{...c,...f},"short-date-short-time-24":{...c,...p},"short-date-long-time":{...c,...d},"short-date-long-time-24":{...c,..._},"short-date-le":c,"short-date-le-short-time":{...c,...f},"short-date-le-short-time-24":{...c,...p},"short-date-le-long-time":{...c,...d},"short-date-le-long-time-24":{...c,..._},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...f},"long-month-day-year-short-time-24":{...u,...p},"long-month-day-year-long-time":{...u,...d},"long-month-day-year-long-time-24":{...u,..._},"day-short-month-year":x,"day-short-month-year-short-time":{...x,...f},"day-short-month-year-short-time-24":{...x,...p},"day-short-month-year-long-time":{...x,...d},"day-short-month-year-long-time-24":{...x,..._},"long-date":y,"long-date-short-time":{...y,...f},"long-date-short-time-24":{...y,...p},"long-date-long-time":{...y,...d},"long-date-long-time-24":{...y,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":d},w=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),b={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},v=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),I=v.find(({type:t})=>"month"===t)?.value.toLowerCase();function M(){const t=(0,i.lR)();return(t&&b[t])??(0,i.QC)()}"mart"!==I&&(b.bs="sr-Latn-CS");let k=new WeakMap;const P=m["short-date-short-time"];function T(t){return m[t]}function V(t){const{dateStyle:e,timeStyle:n,hour12:r,year:i,month:s}=t,o={};return e?o.dateStyle=e:i&&(o.year=i,o.month=s||void 0),n&&!o.year&&(o.timeStyle=n,o.hour12="auto"===r?void 0:"always"===r),o}function S(t,e=P){return function(t){let e=k.get(t);if(!e){const n=M(),r=B(t.timeZone??"system"),i={...t,timeZone:r};e=new Intl.DateTimeFormat(n,i),k.set(t,e)}return e}(e).format(t)}function A(t,e=P){return S(new Date(t),{...e,...h,...l})}function L(t,e=P){return S(new Date(`1970-01-01T${t}Z`),{...e,...h,...a})}function D(t,e=P){const n=o.c9.fromISO(t,{setZone:!0});if(!n.isValid)return t;if(e.timeZone)return S(n.toJSDate(),e);const r=0===n.offset?"UTC":e.timeZone,i={...e,timeZone:r};return n.toLocaleString(i,{locale:M()})}function B(t){switch(t){case"system":return s.N;case s.L:return"UTC";default:return t}}(0,i.Ml)(()=>{k=new WeakMap}),n.d(e,["_v",0,w])},73444(t,e,n){n.d(e,{JK:()=>l,Ml:()=>g,QC:()=>u,lR:()=>c,oQ:()=>f});var r=n(36563);let i;n(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){const t=o?.getAttribute("lang"),e=globalThis.navigator?.language;return s??t??e??"en"}function l(){return void 0===i&&(i=a()),i}const h=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function c(t=l()){return x(t)?.language}function u(t=l()){const e=x(t);return e?.language&&e?.extlang?t.replace(`${e.language}-`,""):t}function x(t=l()){return h.exec(t)?.groups}const y=[];function f(t){return y.push(t),(0,r.hA)(()=>{y.splice(y.indexOf(t),1)})}new Map;const d=[];function g(t){return d.push(t),(0,r.hA)(()=>d.splice(d.indexOf(t),1))}function p(){const t=a();i!==t&&([...d].forEach(e=>e(t)),i=t,[...y].forEach(e=>e(t)))}globalThis.addEventListener?.("languagechange",p),o&&new MutationObserver(()=>{p()}).observe(o,{attributeFilter:["lang"]})},98623(t,e,n){const r=Intl.DateTimeFormat().resolvedOptions().timeZone;n.d(e,["L",0,"unknown","N",0,r])},36984(t,e,n){n.r(e),n.d(e,{default:()=>X});var r=n(17676),i=n(29953),s=n(6774),o=n(13195);function a(t){return 746===t||747===t||!(t<4352)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103&&!(t>=65097&&t<=65103)||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351&&!(t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=12592&&t<=12687||t>=43360&&t<=43391||t>=55216&&t<=55295||t>=4352&&t<=4607||t>=44032&&t<=55215||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12688&&t<=12703||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543&&12540!==t||t>=65280&&t<=65519&&!(65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||t>=65104&&t<=65135&&!(t>=65112&&t<=65118||t>=65123&&t<=65126)||t>=5120&&t<=5759||t>=6320&&t<=6399||t>=65040&&t<=65055||t>=19904&&t<=19967||t>=40960&&t<=42127||t>=42128&&t<=42191)}function l(t){return!(t<11904)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=65280&&t<=65519||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543||t>=65040&&t<=65055||t>=42128&&t<=42191||t>=40960&&t<=42127)}function h(t){switch(t){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 c(t){switch(t){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);class x{constructor(t,e,n,r,i,s,o){this._glyphItems=t,this._maxWidth=e,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=i,this._vAnchor=s,this._justify=o}getShaping(t,e,n){const r=this._letterSpacing,i=this._lineHeight,s=this._justify,o=this._maxWidth,u=[];let x=0,y=0;for(const e of t){const t=e.codePointAt(0);if(null==t)continue;const i=n&&a(t);let s;for(const e of this._glyphItems)if(s=e[t],s)break;u.push({codePoint:t,x,y,vertical:i,glyphItem:s}),s&&(x+=s.shaping.xAdvance+r)}let f=x;o>0&&(f=x/Math.max(1,Math.ceil(x/o)));const d=t.includes("​"),g=[],p=u.length;for(let t=0;t<p-1;t++){const e=u[t].codePoint,n=l(e);if(h(e)||n){let r=0;if(10===e)r-=1e4;else if(n&&d)r+=150;else{40!==e&&65288!==e||(r+=50);const n=u[t+1].codePoint;41!==n&&65289!==n||(r+=50)}g.push(this._buildBreak(t+1,u[t].x,f,g,r,!1))}}const _=this._optimalBreaks(this._buildBreak(p,x,f,g,0,!0));let m=0;const w=e?-i:i;let b=0;for(let t=0;t<_.length;t++){const e=_[t];let n=b;for(;n<e&&c(u[n].codePoint);)u[n].glyphItem=null,++n;let r=e-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphItem=null,--r;if(n<=r){const t=u[n].x;for(let e=n;e<=r;e++)u[e].x-=t,u[e].y=y;let e=u[r].x;u[r].glyphItem&&(e+=u[r].glyphItem.shaping.xAdvance),m=Math.max(e,m),s&&this._applyJustification(u,n,r)}b=e,y+=w}if(u.length>0){const t=_.length-1,n=(s-this._hAnchor)*m;let r=(-this._vAnchor*(t+1)+.5)*i;e&&t&&(r+=t*i);for(const t of u)t.x+=n,t.y+=r}return u.filter(t=>t.glyphItem)}static getTextBox(t,e){if(!t.length)return null;let n=1/0,r=1/0,i=0,s=0;for(const o of t){const t=o.glyphItem.shaping.xAdvance,a=o.x,l=o.y-17,h=a+t,c=l+e;n=Math.min(n,a),i=Math.max(i,h),r=Math.min(r,l),s=Math.max(s,c)}return{x:n,y:r,width:i-n,height:s-r}}static getBox(t){if(!t.length)return null;let e=1/0,n=1/0,r=0,i=0;for(const s of t){const{height:t,left:o,top:a,width:l}=s.glyphItem.rect,h=s.x,c=s.y-(t-Math.abs(a)),u=h+l+o,x=c+t;e=Math.min(e,h),r=Math.max(r,u),n=Math.min(n,c),i=Math.max(i,x)}return{x:e,y:n,width:r-e,height:i-n}}static addDecoration(t,e){const n=t.length;if(0===n)return;const r={rect:new u.A(4,0,4,8),sdf:!0,page:0};let i=t[0].x+t[0].glyphItem.rect.left,s=t[0].y;for(let o=1;o<n;o++){const n=t[o];if(n.y!==s){const a=t[o-1].x+t[o-1].glyphItem.rect.left+t[o-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:a-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}}),s=n.y,i=n.x+n.glyphItem.rect.left}}const o=t[n-1].x+t[n-1].glyphItem.rect.left+t[n-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:o-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}})}_breakScore(t,e,n,r){const i=(t-e)*(t-e);return r?t<e?i/2:2*i:i+Math.abs(n)*n}_buildBreak(t,e,n,r,i,s){let o=null,a=this._breakScore(e,n,i,s);for(const t of r){const r=e-t.x,l=this._breakScore(r,n,i,s)+t.score;l<=a&&(o=t,a=l)}return{index:t,x:e,score:a,previousBreak:o}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,n){const r=t[n],i=r.vertical?24:r.glyphItem?r.glyphItem.shaping.xAdvance:0,s=(r.x+i)*this._justify;for(let r=e;r<=n;r++)t[r].x-=s}}const y=.5;class f{constructor(t,e,n=0,r=-1,i=y){this.x=t,this.y=e,this.angle=n,this.segment=r,this.minzoom=i}}class d{constructor(t,e,n,r,i,s=y,a=o.MG){this.anchor=t,this.labelAngle=e,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=i,this.minzoom=s,this.maxzoom=a}}class g{constructor(t,e,n,r,i,s,o,a,l,h,c,u){this.tl=t,this.tr=e,this.bl=n,this.br=r,this.mosaicRect=i,this.labelAngle=s,this.minAngle=o,this.maxAngle=a,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class p{constructor(t){this.shapes=t}}class _{getIconPlacement(t,e,n){const r=new s.bR(t.x,t.y),i=0===n.rotationAlignment,a=n.keepUpright;let l=n.rotate*o.os;i&&(l+=t.angle);const h=new p([]);return h.iconColliders=[],this._addIconPlacement(h,r,e,n,l),i&&a&&this._addIconPlacement(h,r,e,n,l+o.Jo),h}_addIconPlacement(t,e,n,r,i){const a=n.rasterizationScale,l=n.width/a,h=n.height/a,c=r.offset;let u=c[0],x=c[1];switch(r.anchor){case 0:u-=l/2,x-=h/2;break;case 1:x-=h/2;break;case 2:u-=l,x-=h/2;break;case 3:u-=l/2;break;case 4:u-=l/2,x-=h;break;case 5:break;case 7:x-=h;break;case 6:u-=l;break;case 8:u-=l,x-=h}const f=n.rect,d=2/a,p=u-d,_=x-d,m=p+f.width/a,w=_+f.height/a,b=new s.bR(p,_),v=new s.bR(m,w),I=new s.bR(p,w),M=new s.bR(m,_);if(0!==i){const t=Math.cos(i),e=Math.sin(i);b.rotate(t,e),v.rotate(t,e),I.rotate(t,e),M.rotate(t,e)}const k=new g(b,M,I,v,f,i,0,256,e,y,o.MG,0);t.shapes.push(k);{const n=r.size,s=r.padding,a={xTile:e.x,yTile:e.y,dxPixels:u*n-s,dyPixels:x*n-s,hard:!r.optional,partIndex:0,width:l*n+2*s,height:h*n+2*s,angle:i,minLod:y,maxLod:o.MG};t.iconColliders.push(a)}}getTextPlacement(t,e,n,r){const i=new s.bR(t.x,t.y),{keepUpright:a,rotate:l,rotationAlignment:h,size:c}=r,u=l*o.os,f=0===h,_=a,m=r.padding;let w=y;const b=f?t.angle:0,v=t.segment>=0&&f,I=[],M=[],k=!v;let P=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,V=P,S=T;const A=(v||f)&&_,L=c/24;let D=!1;for(const t of e)if(t.vertical){D=!0;break}let B,C=0,E=0;if(!v&&D){const t=x.getTextBox(e,24*r.lineHeight);switch(r.anchor){case 1:C=t.height/2,E=-t.width/2;break;case 2:C=-t.height/2,E=t.width/2;break;case 3:C=t.height/2,E=t.width/2;break;case 4:C=-t.height/2,E=-t.width/2;break;case 5:C=t.height;break;case 7:E=-t.width;break;case 6:E=t.width;break;case 8:C=-t.height}}C+=24*r.offset[0],E+=24*r.offset[1];for(const a of e){const e=a.glyphItem?.mosaicItem,l=a.glyphItem?.rect;if(!e||e.rect.isEmpty)continue;const h=e.rect,c=e.page;if(I&&k){if(void 0!==B&&B!==a.y){let e,n,i,s;D?(e=-S+C,n=P+E,i=S-V,s=T-P):(e=P+C,n=V+E,i=T-P,s=S-V);const a={xTile:t.x,yTile:t.y,dxPixels:e*L-m,dyPixels:n*L-m,hard:!r.optional,partIndex:1,width:i*L+2*m,height:s*L+2*m,angle:u,minLod:y,maxLod:o.MG};I.push(a),P=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,V=P,S=T}B=a.y}const x=[];if(v){const e=.5*l.width,r=(a.x+l.left-3+e)*L*8;if(w=this._placeGlyph(t,w,r,n,t.segment,1,a.vertical,c,x),_&&(w=this._placeGlyph(t,w,r,n,t.segment,-1,a.vertical,c,x)),w>=2)break}else x.push(new d(i,b,b,c,!1)),f&&_&&x.push(new d(i,b+o.Jo,b+o.Jo,c,!1));const p=a.x+l.left,R=a.y-17-l.top,z=p+l.width,U=R+l.height;let F,N,G,O,Z,W,Y,j;if(!v&&D)if(a.vertical){const t=(p+z)/2-l.height/2,e=(R+U)/2+l.width/2;F=new s.bR(-e-3+C,t-3+E),N=new s.bR(F.x+h.width,F.y+h.height),G=new s.bR(F.x,N.y),O=new s.bR(N.x,F.y)}else F=new s.bR(3-R+C,p-3+E),N=new s.bR(F.x-h.height,F.y+h.width),G=new s.bR(N.x,F.y),O=new s.bR(F.x,N.y);else F=new s.bR(p-3+C,R-3+E),N=new s.bR(F.x+h.width,F.y+h.height),G=new s.bR(F.x,N.y),O=new s.bR(N.x,F.y);for(const e of x){let n,i,o,c;if(e.alternateVerticalGlyph){if(!Z){const t=(R+U)/2+E;Z=new s.bR((p+z)/2+C-l.height/2-3,t+l.width/2+3),W=new s.bR(Z.x+h.height,Z.y-h.width),Y=new s.bR(W.x,Z.y),j=new s.bR(Z.x,W.y)}n=Z,i=Y,o=j,c=W}else n=F,i=G,o=O,c=N;const x=R,y=U,f=e.glyphAngle+u;if(0!==f){const t=Math.cos(f),e=Math.sin(f);n=n.clone(),i=i?.clone(),o=o?.clone(),c=c?.clone(),n.rotate(t,e),c?.rotate(t,e),i?.rotate(t,e),o?.rotate(t,e)}let d=0,_=256;if(v&&D?a.vertical?e.alternateVerticalGlyph?(d=32,_=96):(d=224,_=32):(d=224,_=96):(d=192,_=64),M.push(new g(n,o,i,c,h,e.labelAngle,d,_,e.anchor,e.minzoom,e.maxzoom,e.page)),I&&(!A||this._legible(e.labelAngle)))if(k)p<P&&(P=p),x<V&&(V=x),z>T&&(T=z),y>S&&(S=y);else if(e.minzoom<2){const n={xTile:t.x,yTile:t.y,dxPixels:(p+C)*L-m,dyPixels:(x+C)*L-m,hard:!r.optional,partIndex:1,width:(z-p)*L+2*m,height:(y-x)*L+2*m,angle:f,minLod:e.minzoom,maxLod:e.maxzoom};I.push(n)}}}if(w>=2)return null;if(I&&k){let e,n,i,s;D?(e=-S+C,n=P+E,i=S-V,s=T-P):(e=P+C,n=V+E,i=T-P,s=S-V);const a={xTile:t.x,yTile:t.y,dxPixels:e*L-m,dyPixels:n*L-m,hard:!r.optional,partIndex:1,width:i*L+2*m,height:s*L+2*m,angle:u,minLod:y,maxLod:o.MG};I.push(a)}const R=new p(M);return I&&I.length>0&&(R.textColliders=I),R}_legible(t){const e=(0,o.z0)(t);return e<65||e>=193}_placeGlyph(t,e,n,r,i,a,l,h,c){let u=a;const x=u<0?(0,o.Wh)(t.angle+o.Jo,o.pJ):t.angle;let y=0;n<0&&(u*=-1,n*=-1,y=o.Jo),u>0&&++i;let f=new s.bR(t.x,t.y),g=r[i],p=o.MG;if(r.length<=i)return p;for(;;){const t=g.x-f.x,s=g.y-f.y,a=Math.sqrt(t*t+s*s),_=Math.max(n/a,e),m=t/a,w=s/a,b=(0,o.Wh)(Math.atan2(w,m)+y,o.pJ);if(c.push(new d(f,x,b,h,!1,_,p)),l&&c.push(new d(f,x,b,h,!0,_,p)),_<=e)return _;f=g.clone();do{if(i+=u,r.length<=i||i<0)return _;g=r[i]}while(f.isEqual(g));let v=g.x-f.x,I=g.y-f.y;const M=Math.sqrt(v*v+I*I);v*=a/M,I*=a/M,f.x-=v,f.y-=I,p=_}}}var m=n(51624),w=n(15585);class b{constructor(t,e,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=e.keys,i=e.values,s=t.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const t=s.getMessage().asUnsafe(),e=this.values;for(;!t.empty();){const n=t.getUInt32(),s=t.getUInt32();e[r[n]]=i[s]}t.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(t){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const e=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,t?t.reset(this.type):n=[];let i,o=1,a=0,l=0,h=0;for(;!e.empty();){if(0===a){const t=e.getUInt32();o=7&t,a=t>>3}switch(a--,o){case 1:l+=e.getSInt32(),h+=e.getSInt32(),t?t.moveTo(l,h):n&&(r&&n.push(r),r=[],r.push(new s.bR(l,h)));break;case 2:l+=e.getSInt32(),h+=e.getSInt32(),t?t.lineTo(l,h):r&&r.push(new s.bR(l,h));break;case 7:t?t.close():r&&!r[0].equals(l,h)&&r.push(r[0].clone());break;default:throw e.release(),new Error("Invalid path operation")}}return t?i=t.result():n&&(r&&n.push(r),i=n),e.release(),this._geometry=i,i}}n(44208);class v{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}}class I extends v{constructor(){super(12)}add(t,e,n){const r=this.array;r.push(t),r.push(e),r.push(n)}}class M{constructor(t){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=t.clone();const e=t.asUnsafe();for(;e.next();)switch(e.tag()){case 1:this.name=e.getString();break;case 3:this.keys.push(e.getString());break;case 4:this.values.push(e.processMessage(M._parseValue));break;case 5:this.extent=e.getUInt32();break;default:e.skip()}}getData(){return this._pbfLayer}static _parseValue(t){for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getInt64();case 5:return t.getUInt64();case 6:return t.getSInt64();case 7:return t.getBool();default:t.skip()}return null}}var k=n(89518);class P extends v{constructor(t){super(t)}add(t,e,n,r,i,s,o,a,l,h,c,u){const x=this.array;let y=(0,k.M9)(t,e);x.push(y);const f=31;y=(0,k.Ss)(Math.round(f*n),Math.round(f*r),Math.round(f*i),Math.round(f*s)),x.push(y),y=(0,k.Ss)(Math.round(f*o),Math.round(f*a),Math.round(f*l),Math.round(f*h)),x.push(y),y=(0,k.M9)(c,0),x.push(y),u&&x.push(...u)}}class T extends v{constructor(t){super(t)}add(t,e,n){const r=this.array;r.push((0,k.M9)(t,e)),n&&r.push(...n)}}class V extends v{constructor(t){super(t)}add(t,e,n,r,i,s,o){const a=this.array,l=this.index;let h=(0,k.M9)(t,e);return a.push(h),h=(0,k.Ss)(Math.round(15*n),Math.round(15*r),i,s),a.push(h),o&&a.push(...o),l}}class S extends v{constructor(t){super(t)}add(t,e,n,r,i,s,a,l,h,c,u,x){const y=this.array;let f=(0,k.M9)(t,e);y.push(f),f=(0,k.M9)(Math.round(8*n),Math.round(8*r)),y.push(f),f=(0,k.M9)((0,k.ws)(i/4,s/4),(0,k.ws)(l,h)),y.push(f),f=(0,k.M9)((0,k.ws)(0,(0,o.z0)(a)),(0,k.ws)(10*c,Math.min(10*u,255))),y.push(f),x&&y.push(...x)}}class A extends v{constructor(t){super(t)}add(t,e,n,r,i){const s=this.array,o=(0,k.M9)(2*t+n,2*e+r);s.push(o),i&&s.push(...i)}}class L{constructor(t,e,n){this.layerExtent=4096,this._features=[],this.layer=t,this.zoom=e,this._spriteInfo=n,this._filter=t.getFeatureFilter()}pushFeature(t){this._filter&&!this._filter.filter(t,this.zoom)||this._features.push(t)}hasFeatures(){return this._features.length>0}getResources(t,e,n){}}class D extends L{constructor(t,e,n,r,i){super(t,e,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(t){const e=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(t);if(!o)continue;const a=r.circleMaterial.encodeAttributes(s,i,r);for(const t of o)if(t)for(const r of t){const t=e.index;e.add(r.x,r.y,0,0,a),e.add(r.x,r.y,0,1,a),e.add(r.x,r.y,1,0,a),e.add(r.x,r.y,1,1,a),n.add(t,t+1,t+2),n.add(t+1,t+2,t+3),this._circleIndexCount+=6}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this._circleVertexBuffer.array.length,t+=this._circleIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._circleIndexStart,e[r++]=this._circleIndexCount,e[r++]=this._circleVertexBuffer.array.length;for(let t=0;t<this._circleVertexBuffer.array.length;t++)n[r++]=this._circleVertexBuffer.array[t];e[r++]=this._circleIndexBuffer.array.length;for(let t=0;t<this._circleIndexBuffer.array.length;t++)e[r++]=this._circleIndexBuffer.array[t];return e.buffer}}var B=n(98291),C=n(83349);class E extends L{constructor(t,e,n,r,i,s,o){super(t,e,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=i,this._outlineVertexBuffer=s,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("fill-pattern");if(s)if(s.isDataDriven)for(const t of this._features)e(s.getValue(i,t),!0);else e(s.getValue(i),!0)}processFeatures(t){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const e=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:i,hasDataDrivenFill:s,hasDataDrivenOutline:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("fill-pattern"),l=a?.isDataDriven;let h=!a&&e.getPaintValue("fill-antialias",n);if(e.outlineUsesFillColor){if(h&&!e.hasDataDrivenOpacity){const t=e.getPaintValue("fill-opacity",n),r=e.getPaintValue("fill-opacity",n+1);t<1&&r<1&&(h=!1)}if(h&&!e.hasDataDrivenColor){const t=e.getPaintValue("fill-color",n),r=e.getPaintValue("fill-color",n+1);t[3]<1&&r[3]<1&&(h=!1)}}const c=this._features,u=t?.validateTessellation;if(l){const s=[];for(const l of c){const c=a.getValue(n,l),u=this._spriteInfo[c];if(!u?.rect)continue;const x=r.encodeAttributes(l,n,e,u),y=h&&o?i.encodeAttributes(l,n,e):[],f=l.getGeometry(t);s.push({ddFillAttributes:x,ddOutlineAttributes:y,page:u.page,geometry:f}),s.sort((t,e)=>t.page-e.page)}for(const{ddFillAttributes:t,ddOutlineAttributes:n,page:r,geometry:i}of s)this._processFeature(i,h,e.outlineUsesFillColor,t,n,u,r)}else for(const a of c){const l=s?r.encodeAttributes(a,n,e):null,c=h&&o?i.encodeAttributes(a,n,e):null,x=a.getGeometry(t);this._processFeature(x,h,e.outlineUsesFillColor,l,c,u)}}serialize(){let t=10;t+=this.layerUIDs.length,t+=this._fillVertexBuffer.array.length,t+=this._fillIndexBuffer.array.length,t+=this._outlineVertexBuffer.array.length,t+=this._outlineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._fillIndexStart,e[r++]=this._fillIndexCount,e[r++]=this._outlineIndexStart,e[r++]=this._outlineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this._fillVertexBuffer.array.length;for(let t=0;t<this._fillVertexBuffer.array.length;t++)n[r++]=this._fillVertexBuffer.array[t];e[r++]=this._fillIndexBuffer.array.length;for(let t=0;t<this._fillIndexBuffer.array.length;t++)e[r++]=this._fillIndexBuffer.array[t];e[r++]=this._outlineVertexBuffer.array.length;for(let t=0;t<this._outlineVertexBuffer.array.length;t++)n[r++]=this._outlineVertexBuffer.array[t];e[r++]=this._outlineIndexBuffer.array.length;for(let t=0;t<this._outlineIndexBuffer.array.length;t++)e[r++]=this._outlineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n,r,i,s,o){if(!t)return;const a=t.length,l=!i||0===i.length;if(e&&(!n||l))for(let e=0;e<a;e++)this._processOutline(t[e],i);let h;for(let e=0;e<a;e++){const n=E._area(t[e]);n>32?(void 0!==h&&this._processFill(t,h,r,s,o),h=[e]):n<-32&&void 0!==h&&h.push(e)}void 0!==h&&this._processFill(t,h,r,s,o)}_processOutline(t,e){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let o,a,l;const h=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let x=-1,y=-1,f=-1,d=-1,g=-1,p=!1,_=t.length;if(_<2)return;const m=t[0];let w=t[_-1];for(;_&&w.isEqual(m);)--_,w=t[_-1];if(!(_-0<2)){for(let i=0;i<_;++i){0===i?(o=t[_-1],a=t[0],l=t[1],h.assignSub(a,o),h.normalize(),h.rightPerpendicular()):(o=a,a=l,l=i!==_-1?t[i+1]:t[0],h.assign(c));const s=this._isClipEdge(o,a);-1===d&&(p=s),c.assignSub(l,a),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const w=-u.x*-h.x+-u.y*-h.y;let b=Math.abs(0!==w?1/w:1);b>8&&(b=8),m>=0?(f=n.add(a.x,a.y,h.x,h.y,0,1,e),-1===d&&(d=f),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f),y=n.add(a.x,a.y,b*-u.x,b*-u.y,0,-1,e),-1===g&&(g=y),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f),x=y,y=f,f=n.add(a.x,a.y,u.x,u.y,0,1,e),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f),y=n.add(a.x,a.y,c.x,c.y,0,1,e),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f)):(f=n.add(a.x,a.y,b*u.x,b*u.y,0,1,e),-1===d&&(d=f),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f),y=n.add(a.x,a.y,-h.x,-h.y,0,-1,e),-1===g&&(g=y),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f),x=y,y=f,f=n.add(a.x,a.y,-u.x,-u.y,0,-1,e),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f),x=n.add(a.x,a.y,-c.x,-c.y,0,-1,e),x>=0&&y>=0&&f>=0&&!s&&r.add(x,y,f))}x>=0&&y>=0&&d>=0&&!p&&r.add(x,y,d),x>=0&&d>=0&&g>=0&&!p&&r.add(x,g,d),this._outlineIndexCount+=3*(r.index-i)}}_processFill(t,e,n,r,i){let s;e.length>1&&(s=[]);let o=0;for(const n of e)0!==o&&s.push(o),o+=t[n].length;const a=2*o,l=B.A.acquire();for(const n of e){const e=t[n],r=e.length;for(let t=0;t<r;++t)l.push(e[t].x,e[t].y)}const h=(0,C.e)(l,s,2);if(C.e.deviation(l,s,2,h)>0){const r=e.map(e=>t[e].length),{buffer:s,vertexCount:o}=(0,w.QT)(l,r);if(o>0){const t=this._fillVertexBuffer.index;for(let t=0;t<o;t++)this._fillVertexBuffer.add(s[2*t],s[2*t+1],n);for(let e=0;e<o;e+=3){const n=t+e;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==i){const t=this._patternMap,e=t.get(i);e?e[1]+=o:t.set(i,[this._fillIndexStart+this._fillIndexCount,o])}this._fillIndexCount+=o}}else{const t=h.length;if(t>0){const e=this._fillVertexBuffer.index;let r=0;for(;r<a;)this._fillVertexBuffer.add(l[r++],l[r++],n);let s=0;for(;s<t;)this._fillIndexBuffer.add(e+h[s++],e+h[s++],e+h[s++]);if(void 0!==i){const e=this._patternMap,n=e.get(i);n?n[1]+=t:e.set(i,[this._fillIndexStart+this._fillIndexCount,t])}this._fillIndexCount+=t}}B.A.release(l)}_isClipEdge(t,e){return t.x===e.x?t.x<=-64||t.x>=4160:t.y===e.y&&(t.y<=-64||t.y>=4160)}static _area(t){let e=0;const n=t.length-1;for(let r=0;r<n;r++)e+=(t[r].x-t[r+1].x)*(t[r].y+t[r+1].y);return e+=(t[n].x-t[0].x)*(t[n].y+t[0].y),.5*e}}var R=n(83773);class z extends L{constructor(t,e,n,r,i){super(t,e,n),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new R.i(U(this.tessellationProperties),F(this.tessellationProperties),t.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("line-pattern"),o=r.getPaintProperty("line-dasharray"),a=r.getLayoutProperty("line-cap");if(!s&&!o)return;const l=a?.getValue(i)||0,h=a?.isDataDriven,c=s?.isDataDriven,u=o?.isDataDriven;if(c||u)for(const t of this._features)e(c?s.getValue(i,t):this._getDashArrayKey(t,i,r,o,h,a,l));else if(s)e(s.getValue(i));else if(o){const t=o.getValue(i);e(r.getDashKey(t,l))}}processFeatures(t){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const e=this.layer,n=this.zoom,r=this._features,i=this._tessellationOptions,{hasDataDrivenLine:s,lineMaterial:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("line-pattern"),l=e.getPaintProperty("line-dasharray"),h=a?.isDataDriven,c=l?.isDataDriven;let u;u=e.getLayoutProperty("line-cap");const x=u?.isDataDriven?u:null,y=x?null:e.getLayoutValue("line-cap",n),f=y||0,d=!!x;u=e.getLayoutProperty("line-join");const g=u?.isDataDriven?u:null,p=g?null:e.getLayoutValue("line-join",n);u=e.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:e.getLayoutValue("line-miter-limit",n);u=e.getLayoutProperty("line-round-limit");const w=u?.isDataDriven?u:null,b=w?null:e.getLayoutValue("line-round-limit",n);u=e.getPaintProperty("line-width");const v=u?.isDataDriven?u:null,I=v?null:e.getPaintValue("line-width",n);u=e.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,k=M?null:e.getPaintValue("line-offset",n);if(h||c){const s=[];for(const i of r){const r=h?a.getValue(n,i):this._getDashArrayKey(i,n,e,l,d,x,f),c=this._spriteInfo[r];if(!c?.rect)continue;const u=o.encodeAttributes(i,n,e,c),P=i.getGeometry(t);s.push({ddAttributes:u,page:c.page,cap:x?x.getValue(n,i):y,join:g?g.getValue(n,i):p,miterLimit:_?_.getValue(n,i):m,roundLimit:w?w.getValue(n,i):b,halfWidth:.5*(v?v.getValue(n,i):I),offset:M?M.getValue(n,i):k,geometry:P})}s.sort((t,e)=>t.page-e.page),i.textured=!0;for(const{ddAttributes:t,page:e,cap:n,join:r,miterLimit:o,roundLimit:a,halfWidth:l,offset:h,geometry:c}of s)i.capType=n,i.joinType=r,i.miterLimit=o,i.roundLimit=a,i.halfWidth=l,i.offset=h,this._processFeature(c,t,e)}else{if(a){const t=a.getValue(n),e=this._spriteInfo[t];if(!e?.rect)return}i.textured=!(!a&&!l),i.capType=y,i.joinType=p,i.miterLimit=m,i.roundLimit=b,i.halfWidth=.5*I,i.offset=k;for(const a of r){const r=s?o.encodeAttributes(a,n,e):null;x&&(i.capType=x.getValue(n,a)),g&&(i.joinType=g.getValue(n,a)),_&&(i.miterLimit=_.getValue(n,a)),w&&(i.roundLimit=w.getValue(n,a)),v&&(i.halfWidth=.5*v.getValue(n,a)),M&&(i.offset=M.getValue(n,a));const l=a.getGeometry(t);this._processFeature(l,r)}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this.tessellationProperties._lineVertexBuffer.array.length,t+=this.tessellationProperties._lineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._lineIndexStart,e[r++]=this._lineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineVertexBuffer.array.length;t++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[t];e[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineIndexBuffer.array.length;t++)e[r++]=this.tessellationProperties._lineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n){if(!t)return;const r=t.length;for(let i=0;i<r;i++)this._processGeometry(t[i],e,n)}_processGeometry(t,e,n){if(t.length<2)return;let r,i,s=t[0],o=1;for(;o<t.length;)r=t[o].x-s.x,i=t[o].y-s.y,r*r+i*i<1e-6?t.splice(o,1):(s=t[o],++o);if(t.length<2)return;const a=this.tessellationProperties._lineIndexBuffer,l=3*a.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=e,this._lineTessellator.tessellate(t,this._tessellationOptions);const h=3*a.index-l;if(void 0!==n){const t=this._patternMap,e=t.get(n);e?e[1]+=h:t.set(n,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(t,e,n,r,i,s,o){const a=i?s.getValue(e,t):o,l=r.getValue(e,t);return n.getDashKey(l,a)}}const U=t=>(e,n,r,i,s,o,a,l,h,c,u)=>(t._lineVertexBuffer.add(e,n,a,l,r,i,s,o,h,c,u,t._ddValues),t._lineVertexBuffer.index-1),F=t=>(e,n,r)=>{t._lineIndexBuffer.add(e,n,r)};var N=n(32488),G=n(97768),O=n(799),Z=n(36745),W=n(78957),Y=n(92722);function j(t){let e=0;for(let n=0,r=t.length-1;n<t.length;r=n++)e+=(t[r].x-t[n].x)*(t[n].y+t[r].y);return.5*e}var K=n(4264);function q(t,e){return t.iconMosaicItem&&e.iconMosaicItem?t.iconMosaicItem.page===e.iconMosaicItem.page?0:t.iconMosaicItem.page-e.iconMosaicItem.page:t.iconMosaicItem&&!e.iconMosaicItem?1:!t.iconMosaicItem&&e.iconMosaicItem?-1:0}class H extends L{constructor(t,e,n,r,i,s,o,a,l){super(e,n,l.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=t,this._iconVertexBuffer=r,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new N.A}getResources(t,e,n){const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);const s=r.getLayoutProperty("icon-image"),o=r.getLayoutProperty("text-field");let a=r.getLayoutProperty("text-transform"),l=r.getLayoutProperty("text-font");const h=[];let c,u,x,y;s&&!s.isDataDriven&&(c=s.getValue(i)),o&&!o.isDataDriven&&(u=o.getValue(i)),a&&a.isDataDriven||(x=r.getLayoutValue("text-transform",i),a=null),l&&l.isDataDriven||(y=r.getLayoutValue("text-font",i),l=null);for(const f of this._features){const d=f.getGeometry(t);if(!d||0===d.length)continue;let g,p;s&&(g=s.isDataDriven?s.getValue(i,f):this._replaceKeys(c,f.values),g&&e(g));let _=!1;if(o&&(p=o.isDataDriven?o.getValue(i,f):this._replaceKeys(u,f.values),p)){switch(p=p.replaceAll("\\n","\n"),a&&(x=a.getValue(i,f)),x){case 2:p=p.toLowerCase();break;case 1:p=p.toUpperCase()}if(H._bidiEngine.hasBidiChar(p)){let t;t="rtl"===H._bidiEngine.checkContextual(p)?"IDNNN":"ICNNN",p=H._bidiEngine.bidiTransform(p,t,"VLYSN"),_=!0}if(p.length>0){l&&(y=l.getValue(i,f));for(const t of y){let e=n[t];e||(e=n[t]=new Set);for(const t of p){const n=t.codePointAt(0);null!=n&&e.add(n)}}}}if(!g&&!p)continue;const m=r.getLayoutValue("symbol-sort-key",i,f),w={feature:f,sprite:g,label:p,rtl:_,geometry:d,hash:(p?(0,O.Wm)(p):0)^(g?(0,O.Wm)(g):0),priority:m,textFont:y};h.push(w)}this._symbolFeatures=h}processFeatures(t){t&&t.setExtent(this.layerExtent);const e=this.layer,n=this.zoom,r=e.getLayoutValue("symbol-placement",n),i=0!==r,s=8*e.getLayoutValue("symbol-spacing",n),a=e.getLayoutProperty("icon-image"),l=e.getLayoutProperty("text-field"),h=a?new K.aR(e,n,i):null,c=l?new K.uU(e,n,i):null,u=this._workerTileHandler;let y;a&&(y=u.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 d=[];let g=1;c?.size&&(g=c.size/24);const p=c?c.maxAngle*o.os:0,_=c?8*c.size:0;for(const t of this._symbolFeatures){let o,a;h&&y&&t.sprite&&(o=y[t.sprite],o&&o.sdf&&(this._isIconSDF=!0)),o&&h.update(n,t.feature);let l=0;const m=t.label;if(m){(0,G.Lw)(c),c.update(n,t.feature);const e=i&&0===c.rotationAlignment?c.keepUpright:c.writingMode&&c.writingMode.includes(1);let r=.5;switch(c.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let s=.5;switch(c.anchor){case 5:case 3:case 6:s=0;break;case 7:case 4:case 8:s=1}let o=.5;switch(c.justify){case 0:o=r;break;case 1:o=0;break;case 3:o=1}const h=24*c.letterSpacing,y=i?0:24*c.maxWidth,f=24*c.lineHeight,d=t.textFont.map(t=>u.getGlyphItems(t));if(a=new x(d,y,f,h,r,s,o).getShaping(m,t.rtl,e),a&&a.length>0){let t=1e30,e=-1e30;for(const n of a)t=Math.min(t,n.x),e=Math.max(e,n.x);l=(e-t+48)*g*8}}const w=H._getPlacementCandidates(e,r,t.feature,t.geometry);for(const e of w){let{vertices:n}=e;const u=[];if(1===r){if(a?.length&&c?.size){const t=8*c.size*(2+Math.min(2,4*Math.abs(c.offset[1])));n=H._smoothVertices(n,t)}H._pushAnchors(u,n,s,l)}else 2===r?H._pushCenterAnchor(u,n):3===t.feature.type?e.anchor?u.push(e.anchor):H._pushCentroid(u,n):u.push(new f(n[0].x,n[0].y));for(const e of u){if(e.x<0||e.x>4096||e.y<0||e.y>4096)continue;if(i&&l>0&&0===c?.rotationAlignment&&!H._honorsTextMaxAngle(n,e,l,p,_))continue;const r={shaping:a,line:n,iconMosaicItem:o,anchor:e,symbolFeature:t,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};d.push(r),this._processFeature(r,h,c)}}}d.sort(q),this._addPlacedGlyphs(),this._symbolInstances=d}serialize(){let t=14;t+=this.layerUIDs.length,t+=3*this.markerPageMap.size,t+=3*this.glyphsPageMap.size,t+=H._symbolsSerializationLength(this._symbolInstances),t+=this._iconVertexBuffer.array.length,t+=this._iconIndexBuffer.array.length,t+=this._textVertexBuffer.array.length,t+=this._textIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer),r=new Float32Array(e.buffer),[i,s,o]=this._sourceTileKey.split("/");let a=0;e[a++]=this.type,e[a++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[a++]=this.layerUIDs[t];e[a++]=this._isIconSDF?1:0,e[a++]=parseFloat(i),e[a++]=parseFloat(s),e[a++]=parseFloat(o),e[a++]=this.markerPageMap.size;for(const[t,[n,r]]of this.markerPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this.glyphsPageMap.size;for(const[t,[n,r]]of this.glyphsPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this._iconVertexBuffer.index/4,e[a++]=this._textVertexBuffer.index/4,a=H.serializeSymbols(e,n,r,a,this._symbolInstances),e[a++]=this._iconVertexBuffer.array.length;for(let t=0;t<this._iconVertexBuffer.array.length;t++)n[a++]=this._iconVertexBuffer.array[t];e[a++]=this._iconIndexBuffer.array.length;for(let t=0;t<this._iconIndexBuffer.array.length;t++)e[a++]=this._iconIndexBuffer.array[t];e[a++]=this._textVertexBuffer.array.length;for(let t=0;t<this._textVertexBuffer.array.length;t++)n[a++]=this._textVertexBuffer.array[t];e[a++]=this._textIndexBuffer.array.length;for(let t=0;t<this._textIndexBuffer.array.length;t++)e[a++]=this._textIndexBuffer.array[t];return e.buffer}static _symbolsSerializationLength(t){let e=0;e+=1;for(const n of t||[]){e+=5,e+=1;for(const t of n.textColliders)e+=10;for(const t of n.iconColliders)e+=10;e+=1,e+=2*n.textVertexRanges.length,e+=1,e+=2*n.iconVertexRanges.length}return e}static serializeSymbols(t,e,n,r,i){i=i||[],e[r++]=i.length;for(const t of i){e[r++]=t.anchor.x,e[r++]=t.anchor.y,e[r++]=t.symbolFeature.hash,e[r++]=t.symbolFeature.priority,e[r++]=t.symbolFeature.feature.featureIndex,e[r++]=t.textColliders.length+t.iconColliders.length;for(const i of t.textColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;for(const i of t.iconColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;e[r++]=t.textVertexRanges.length;for(const[n,i]of t.textVertexRanges)e[r++]=n,e[r++]=i;e[r++]=t.iconVertexRanges.length;for(const[n,i]of t.iconVertexRanges)e[r++]=n,e[r++]=i}return r}_replaceKeys(t,e){return t.replaceAll(/{([^{}]+)}/g,(t,n)=>n in e?e[n]:"")}_processFeature(t,e,n){const{line:r,iconMosaicItem:i,shaping:s,anchor:a}=t,l=this.zoom,h=this.layer,c=!!i;let u=!0;c&&(u=e?.optional||!i);const x=s&&s.length>0,y=!x||n?.optional;let f,d;if(c&&(f=this._placementEngine.getIconPlacement(a,i,e)),(f||u)&&(x&&(d=this._placementEngine.getTextPlacement(a,s,r,n)),d||y)){if(f&&d||(y||u?y||d?u||f||(d=null):f=null:(f=null,d=null)),d){const e=h.hasDataDrivenText?h.textMaterial.encodeAttributes(t.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(t,d.shapes,l,n.rotationAlignment,e),d.textColliders){t.textColliders=d.textColliders;for(const t of d.textColliders){t.minLod=Math.max(l+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(l+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,l=t.dxPixels*n-(t.dyPixels+t.height)*r,h=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,x=Math.min(i,o,l,c),y=Math.max(i,o,l,c),f=Math.min(s,a,h,u),d=Math.max(s,a,h,u);t.dxPixels=x,t.dyPixels=f,t.width=y-x,t.height=d-f}}}}if(f){const n=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(t.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(t,f.shapes,l,i.page,1===e.rotationAlignment,n),f.iconColliders){t.iconColliders=f.iconColliders;for(const t of f.iconColliders){t.minLod=Math.max(l+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(l+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,l=t.dxPixels*n-(t.dyPixels+t.height)*r,h=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,x=Math.min(i,o,l,c),y=Math.max(i,o,l,c),f=Math.min(s,a,h,u),d=Math.max(s,a,h,u);t.dxPixels=x,t.dyPixels=f,t.width=y-x,t.height=d-f}}}}}}_addPlacedIcons(t,e,n,r,i,s){const a=Math.max(n-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of e){const e=i?0:Math.max(n+(0,o.p6)(u.minzoom),a),x=i?25:Math.min(n+(0,o.p6)(u.maxzoom),25);if(x<=e)continue;const y=u.tl,f=u.tr,d=u.bl,g=u.br,p=u.mosaicRect,_=u.labelAngle,m=u.minAngle,w=u.maxAngle,b=u.anchor,v=l.index,I=p.x,M=p.y,k=I+p.width,P=M+p.height,T=l.index;l.add(b.x,b.y,y.x,y.y,I,M,_,m,w,e,x,s),l.add(b.x,b.y,f.x,f.y,k,M,_,m,w,e,x,s),l.add(b.x,b.y,d.x,d.y,I,P,_,m,w,e,x,s),l.add(b.x,b.y,g.x,g.y,k,P,_,m,w,e,x,s),t.iconVertexRanges.length>0&&t.iconVertexRanges[0][0]+t.iconVertexRanges[0][1]===T?t.iconVertexRanges[0][1]+=4:t.iconVertexRanges.push([T,4]),h.add(v,v+1,v+2),h.add(v+1,v+2,v+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const t=this._textVertexBuffer,e=this._textIndexBuffer,n=this._glyphMap;for(const[r,i]of this._glyphBufferDataStorage)for(const s of i){const i=t.index,o=s.symbolInstance,a=s.ddAttributes,l=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===l?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([l,4]),e.add(i,i+1,i+2),e.add(i+1,i+2,i+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(t,e,n,r,i){const s=Math.max(n-1,0),a=1===r;let l,h,c,u,x,y,f,d,g,p,_;for(const r of e)l=a?0:Math.max(n+(0,o.p6)(r.minzoom),s),h=a?25:Math.min(n+(0,o.p6)(r.maxzoom),25),h<=l||(c=r.tl,u=r.tr,x=r.bl,y=r.br,f=r.labelAngle,d=r.minAngle,g=r.maxAngle,p=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[p.x,p.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[x.x,x.y],br:[y.x,y.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:f,minAngle:d,maxAngle:g,minLod:l,maxLod:h,placementLod:s,symbolInstance:t,ddAttributes:i}))}static _pushAnchors(t,e,n,r){n+=r;let i=0;const a=e.length-1;for(let t=0;t<a;t++)i+=s.bR.distance(e[t],e[t+1]);let l=r||n;if(l*=.5,i<=l)return;const h=l/i;let c=0,u=-(n=i/Math.max(Math.round(i/n),1))/2;const x=e.length-1;for(let r=0;r<x;r++){const i=e[r],s=e[r+1],a=s.x-i.x,l=s.y-i.y,x=Math.sqrt(a*a+l*l);let y;for(;u+n<c+x;){u+=n;const e=(u-c)/x,d=(0,o.GW)(i.x,s.x,e),g=(0,o.GW)(i.y,s.y,e);void 0===y&&(y=Math.atan2(l,a)),t.push(new f(d,g,y,r,h))}c+=x}}static _pushCenterAnchor(t,e){let n=0;const r=e.length-1;for(let t=0;t<r;t++)n+=s.bR.distance(e[t],e[t+1]);const i=n/2;let a=0;const l=e.length-1;for(let n=0;n<l;n++){const r=e[n],s=e[n+1],l=s.x-r.x,h=s.y-r.y,c=Math.sqrt(l*l+h*h);if(i<a+c){const e=(i-a)/c,u=(0,o.GW)(r.x,s.x,e),x=(0,o.GW)(r.y,s.y,e),y=Math.atan2(h,l);return void t.push(new f(u,x,y,n,0))}a+=c}}static _deviation(t,e,n){const r=(e.x-t.x)*(n.x-e.x)+(e.y-t.y)*(n.y-e.y),i=(e.x-t.x)*(n.y-e.y)-(e.y-t.y)*(n.x-e.x);return Math.atan2(i,r)}static _honorsTextMaxAngle(t,e,n,r,i){let o=0;const a=n/2;let l=new s.bR(e.x,e.y),h=e.segment+1;for(;o>-a;){if(--h,h<0)return!1;o-=s.bR.distance(t[h],l),l=t[h]}o+=s.bR.distance(t[h],t[h+1]);const c=[];let u=0;const x=t.length;for(;o<a;){const e=t[h];let n,a=h;do{if(++a,a===x)return!1;n=t[a]}while(n.isEqual(e));let l,y=a;do{if(++y,y===x)return!1;l=t[y]}while(l.isEqual(n));const f=this._deviation(e,n,l);for(c.push({deviation:f,distToAnchor:o}),u+=f;o-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;o+=s.bR.distance(n,l),h=a}return!0}static _smoothVertices(t,e){if(e<=0)return t;let n=t.length;if(n<3)return t;const r=[];let i=0,o=0;r.push(0);for(let e=1;e<n;e++){const n=s.bR.distance(t[e],t[e-1]);n>0&&(i+=n,r.push(i),o++,o!==e&&(t[o]=t[e]))}if(n=o+1,n<3)return t;e=Math.min(e,.2*i);const a=t[0].x,l=t[0].y,h=t[n-1].x,c=t[n-1].y,u=s.bR.sub(t[0],t[1]);u.normalize(),t[0].x+=e*u.x,t[0].y+=e*u.y,u.assignSub(t[n-1],t[n-2]),u.normalize(),t[n-1].x+=e*u.x,t[n-1].y+=e*u.y,r[0]-=e,r[n-1]+=e;const x=[];x.push(new s.bR(a,l));const y=1e-6,f=.5*e;for(let i=1;i<n-1;i++){let o=0,a=0,l=0;for(let n=i-1;n>=0;n--){const s=f+r[n+1]-r[i];if(s<0)break;const h=r[n+1]-r[n],c=r[i]-r[n]<f?1:s/h;if(c<y)break;const u=c*c,x=c*s-.5*u*h,d=c*h/e,g=t[n+1],p=t[n].x-g.x,_=t[n].y-g.y;o+=d/x*(g.x*c*s+.5*u*(s*p-h*g.x)-u*c*h*p/3),a+=d/x*(g.y*c*s+.5*u*(s*_-h*g.y)-u*c*h*_/3),l+=d}for(let s=i+1;s<n;s++){const n=f-r[s-1]+r[i];if(n<0)break;const h=r[s]-r[s-1],c=r[s]-r[i]<f?1:n/h;if(c<y)break;const u=c*c,x=c*n-.5*u*h,d=c*h/e,g=t[s-1],p=t[s].x-g.x,_=t[s].y-g.y;o+=d/x*(g.x*c*n+.5*u*(n*p-h*g.x)-u*c*h*p/3),a+=d/x*(g.y*c*n+.5*u*(n*_-h*g.y)-u*c*h*_/3),l+=d}x.push(new s.bR(o/l,a/l))}return x.push(new s.bR(h,c)),t[0].x=a,t[0].y=l,t[n-1].x=h,t[n-1].y=c,x}static _getPlacementCandidates(t,e,n,r){if(0!==e||3!==n.type||"geojson"!==t.sourceType)return r.map(t=>({anchor:null,vertices:t}));const i=function(t){let e=null,n=0,r=[],i=0;for(const s of t){const t=j(s);t>0?(i>n&&(n=i,e=r),r=[s],i=t):t<0&&r.length>0&&(r.push(s),i+=t)}if(i>n&&(e=r),!e)return null;const s=e.map(t=>t.length),o=[];for(const t of e)for(const e of t)o.push(e.x,e.y);const a=Z.z.fromOptimized(new Y.A(s,o),"esriGeometryPolygon"),l=(0,W.R)(a);return l?{x:l[0],y:l[1],vertices:e[0]}:null}(r);return i?[{anchor:new f(i.x,i.y),vertices:i.vertices}]:[]}static _pushCentroid(t,e){const n=4096,r=4096,i=e.length-1;let s=0,o=0,a=0,l=e[0].x,h=e[0].y;l>n&&(l=n),l<0&&(l=0),h>r&&(h=r),h<0&&(h=0);for(let t=1;t<i;t++){let i=e[t].x,c=e[t].y,u=e[t+1].x,x=e[t+1].y;i>n&&(i=n),i<0&&(i=0),c>r&&(c=r),c<0&&(c=0),u>n&&(u=n),u<0&&(u=0),x>r&&(x=r),x<0&&(x=0);const y=(i-l)*(x-h)-(u-l)*(c-h);s+=y*(l+i+u),o+=y*(h+c+x),a+=y}s/=3*a,o/=3*a,isNaN(s)||isNaN(o)||t.push(new f(s,o))}}class J{constructor(t,e,n,r,i,a,l){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=e,this._sourceDataMaxLOD=r,this._baseUrl=l,a){this._styleLayerUIDs=new Set;for(const t of a)this._styleLayerUIDs.add(t)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[h,c,u]=e.tileKey.split("/").map(parseFloat);this._level=h;const x=(0,o.IU)(this._level);for(const e of Object.keys(t)){const n=t[e];if(this._pbfTiles[e]=new m.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[t]=n.refKey.split("/").map(parseFloat),r=h-t;if(r>0){const t=(1<<r)-1,n=c&t,i=u&t;this._tileClippers[e]=new s.O3(r,n,i,8,x)}}this._tileClippers[e]||(this._tileClippers[e]=new s.Ox)}}_canParseStyleLayer(t){return!this._styleLayerUIDs||this._styleLayerUIDs.has(t)}async parse(t){const e=(0,w.If)(),n=this._initialize(t),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const i=[],s=new Set,o=(t,e)=>{s.has(t)||(i.push({name:t,repeat:e}),s.add(t))},a={};for(const t of r)t.getResources(t.tileClipper,o,a);if(4===this._tile.status)return[];const l=this._fetchResources(i,a,t);return Promise.all([...l,e]).then(()=>this._processFeatures(n.returnedBuckets))}_initialize(t){const e=t?.signal;return{signal:e,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(t){const{sourceNameToTileData:e,zoom:n,layers:r,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:l,referencerUIDToReferencedId:h}=t,c=this._sourceDataMaxLOD;for(let t=r.length-1;t>=0;t--){const u=r[t];if(n<c){if(u.minzoom&&n<Math.floor(u.minzoom)||u.maxzoom&&n>=u.maxzoom)continue}else if(u.maxzoom&&n>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!e[u.source]||!i[u.source])continue;const x=e[u.source],y=i[u.source],f=u.sourceLayer,d=x[f];if(d){let t=o[u.source];if(t||(t=o[u.source]=new Set),t.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const t=this._createBucket(u);if(t){t.layerUIDs=[u.uid],t.layerExtent=d.extent,t.tileClipper=y;let e=s[u.source];e||(e=s[u.source]={});let n=e[f];n||(n=e[f]=[]),n.push(t),a.push(t),l[u.id]=t}}}}}_linkReferences(t){const{layerIdToBucket:e,referencerUIDToReferencedId:n}=t;n.forEach((t,n)=>{e[t]&&e[t].layerUIDs.push(n)})}_filterFeatures(t){const{signal:e,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:s}=t,o=10*this._level,a=10*(this._level+1),l=[],h=[];for(const t of Object.keys(s))s[t].forEach(e=>{l.push(e),h.push(t)});for(let t=0;t<l.length;t++){const s=h[t],c=l[t];if(!n[s]||!i[s])continue;const u=n[s][c],x=i[s][c];if(!x||0===x.length)continue;if((0,r.G4)(e))return;let y=0;const f=u.getData();for(;f.nextTag(2);){const t=f.getMessage(),e=new b(t,u,y++);t.release();const n=e.values;if(n){const t=n._minzoom;if(t&&t>=a)continue;const e=n._maxzoom;if(e&&e<=o)continue}for(const t of x)t.pushFeature(e)}}}_fetchResources(t,e,n){const r=[],i=this._tile.getWorkerTileHandler();let s,o;t.length>0&&(s=i.fetchSprites(t,this._client,n),r.push(s));for(const t in e){const s=e[t];s.size>0&&(o=i.fetchGlyphs(this._baseUrl,t,s,n),r.push(o))}return r}_processFeatures(t){const e=t.filter(t=>t.hasFeatures()||this._canParseStyleLayer(t.layer.uid));for(const t of e)t.processFeatures(t.tileClipper);return e}_parseTileData(t){const e={};for(const n of Object.keys(t)){const r=t[n],i={};for(;r.next();)switch(r.tag()){case 3:{const t=r.getMessage(),e=new M(t);t.release(),i[e.name]=e;break}default:r.skip()}e[n]=i}return e}_createBucket(t){switch(t.type){case 0:return null;case 1:return this._createFillBucket(t);case 2:return this._createLineBucket(t);case 4:return this._createCircleBucket(t);case 3:return this._createSymbolBucket(t)}}_createFillBucket(t){return new E(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new T(t.fillMaterial.getStride()),new I,new V(t.outlineMaterial.getStride()),new I)}_createLineBucket(t){return new z(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new P(t.lineMaterial.getStride()),new I)}_createCircleBucket(t){return new D(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new A(t.circleMaterial.getStride()),new I)}_createSymbolBucket(t){const e=this._tile;return new H(e.tileKey,t,this._level,new S(t.iconMaterial.getStride()),new I,new S(t.textMaterial.getStride()),new I,e.placementEngine,e.getWorkerTileHandler())}}class ${constructor(t,e,n,r){this.status=0,this.placementEngine=new _,this.tileKey=t,this.refKeys=e,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(t,e){const n=e?.signal;if(null!=n){const t=()=>{n.removeEventListener("abort",t),this.status=4};n.addEventListener("abort",t)}let i;const s={bucketsWithData:[],emptyBuckets:null};try{i=await this._parse(t,e)}catch(t){if((0,r.zf)(t))throw t;return{result:s,transferList:[]}}this.status=2;const o=s.bucketsWithData,a=[];for(const t of i)if(t.hasFeatures()){const e=t.serialize();o.push(e)}else a.push(t.layer.uid);const l=[...o];let h=null;return a.length>0&&(h=Uint32Array.from(a),l.push(h.buffer)),s.emptyBuckets=h,{result:s,transferList:l}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(t,e){const n=t.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new J(n,this,e.client,t.sourceDataMaxLOD,this._styleRepository,t.styleLayerUIDs,t.baseUrl).parse(e))}}var Q=n(45013);class X{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(t,e){const{key:n}=t,i={};for(const e of Object.keys(t.sourceName2DataAndRefKey)){const n=t.sourceName2DataAndRefKey[e];i[e]=n.refKey}const s=new $(n,i,this,this._styleRepository);this.initializeGlyphWorker(void 0,e);try{return await s.parse({...t,sourceDataMaxLOD:this._sourceDataMaxLOD},e)}catch(t){if(s.setObsolete(),s.release(),!(0,r.zf)(t))throw t;return null}}initializeGlyphWorker(t,e){return this._loaded??=(async()=>{const t=await e.client.invoke("openGlyphPorts"),n=await(0,i.N1)(t,{maxNumberOfConcurrentJobs:20});this._glyphWorker=n.createInvokeProxy()})()}updateStyle(t){if(!t||0===t.length||!this._styleRepository)return;const e=this._styleRepository;for(const n of t){const t=n.type,r=n.data;switch(t){case 0:e.setPaintProperties(r.layer,r.paint);break;case 1:e.setLayoutProperties(r.layer,r.layout);break;case 3:e.deleteStyleLayer(r.layer);break;case 2:e.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(t){const{style:e,sourceDataMaxLOD:n}=t;this._styleRepository=new Q.A(e),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(t,e,n){const r=[],i=this._spriteInfo;for(const e of t)void 0===i[e.name]&&r.push(e);return 0===r.length?Promise.resolve():e.invoke("getSprites",r,{signal:n?.signal}).then(t=>{for(const e in t){const n=t[e];i[e]=n}})}getSpriteItems(){return this._spriteInfo}async fetchGlyphs(t,e,n,r){const i=[];let s=this._glyphInfo[e];if(s?n.forEach(t=>{s[t]||i.push(t)}):(s=this._glyphInfo[e]=[],n.forEach(t=>i.push(t))),0===i.length)return;if(await this._loaded,!this._glyphWorker)return void console.error("Failed to fetch glyphs: no worker connection");const o=String.fromCodePoint(...i),a=await this._glyphWorker.getGlyphItems(o,!1,t,e,!0,r);if(a)for(const t of a.glyphs)s[t.code]=t}getGlyphItems(t){return this._glyphInfo[t]}}},83773(t,e,n){function r(t,e){return t.x===e.x&&t.y===e.y}function i(t){if(!t)return;const e=t.length;if(e<=1)return;let n=0;for(let i=1;i<e;i++)r(t[i],t[n])||++n===i||(t[n]=t[i]);t.length=n+1}function s(t,e){return t.x=e.y,t.y=-e.x,t}function o(t,e){return t.x=-e.y,t.y=e.x,t}function a(t,e){return t.x=e.x,t.y=e.y,t}function l(t,e){return t.x=-e.x,t.y=-e.y,t}function h(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function c(t,e){return t.x*e.y-t.y*e.x}function u(t,e){return t.x*e.x+t.y*e.y}function x(t,e,n,r){return t.x=e.x*n+e.y*r,t.y=e.x*r-e.y*n,t}n.d(e,{i:()=>y});class y{constructor(t,e,n){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=n,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e,n=this._canUseThinTessellation){i(t),n&&e.halfWidth<1.05&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const n=e.wrapDistance||65535;let r=e.initialDistance||0,i=!1,s=t[0].x,o=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,r=0);let a=t[e].x,l=t[e].y,h=a-s,c=l-o,u=Math.sqrt(h*h+c*c);if(h/=u,c/=u,r+u>n){i=!0;const t=(n-r)/u;u=n-r,a=(1-t)*s+t*a,l=(1-t)*o+t*l,--e}const x=this._writeVertex(s,o,0,0,h,c,c,-h,0,-1,r),y=this._writeVertex(s,o,0,0,h,c,-c,h,0,1,r);r+=u;const f=this._writeVertex(a,l,0,0,h,c,c,-h,0,-1,r),d=this._writeVertex(a,l,0,0,h,c,-c,h,0,1,r);this._writeTriangle(x,y,f),this._writeTriangle(y,f,d),s=a,o=l}}_tessellate(t,e){const n=t[0],i=t[t.length-1],y=r(n,i),f=y?3:2;if(t.length<f)return;const d=e.pixelCoordRatio,g=null!=e.capType?e.capType:0,p=null!=e.joinType?e.joinType:2,_=null!=e.miterLimit?Math.min(e.miterLimit,4):2,m=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,w=null!=e.halfWidth?e.halfWidth:2,b=!!e.textured;let v,I,M,k=null;const P=this._prevNormal,T=this._nextNormal;let V=-1,S=-1;const A=this._joinNormal;let L,D;const B=this._textureNormalLeft,C=this._textureNormalRight,E=this._textureNormal;let R=-1,z=-1;const U=e.wrapDistance||65535;let F=e.initialDistance||0;const N=this._writeVertex,G=this._writeTriangle,O=(t,e,n,r,i,s)=>{const o=N(I,M,L,D,n,r,t,e,i,s,F);return R>=0&&z>=0&&o>=0&&G(R,z,o),R=z,z=o,o};y&&(v=t[t.length-2],T.x=i.x-v.x,T.y=i.y-v.y,S=h(T),T.x/=S,T.y/=S);let Z=!1;for(let e=0;e<t.length;++e){if(Z&&(Z=!1,F=0),v&&(P.x=-T.x,P.y=-T.y,V=S,F+V>U&&(Z=!0)),Z){const n=(U-F)/V;V=U-F,v={x:(1-n)*v.x+n*t[e].x,y:(1-n)*v.y+n*t[e].y},--e}else v=t[e];I=v.x,M=v.y;const n=e<=0&&!Z,r=e===t.length-1;if(n||(F+=V),k=r?y?t[1]:null:t[e+1],k?(T.x=k.x-I,T.y=k.y-M,S=h(T),T.x/=S,T.y/=S):(T.x=void 0,T.y=void 0),!y){if(n){o(A,T),L=A.x,D=A.y,2===g&&(O(-T.y-T.x,T.x-T.y,T.x,T.y,0,-1),O(T.y-T.x,-T.x-T.y,T.x,T.y,0,1)),1===g&&(O(-T.y-T.x,T.x-T.y,T.x,T.y,-1,-1),O(T.y-T.x,-T.x-T.y,T.x,T.y,-1,1)),1!==g&&0!==g||(O(-T.y,T.x,T.x,T.y,0,-1),O(T.y,-T.x,T.x,T.y,0,1));continue}if(r){s(A,P),L=A.x,D=A.y,1!==g&&0!==g||(O(P.y,-P.x,-P.x,-P.y,0,-1),O(-P.y,P.x,-P.x,-P.y,0,1)),2===g&&(O(P.y-P.x,-P.x-P.y,-P.x,-P.y,0,-1),O(-P.y-P.x,P.x-P.y,-P.x,-P.y,0,1)),1===g&&(O(P.y-P.x,-P.x-P.y,-P.x,-P.y,1,-1),O(-P.y-P.x,P.x-P.y,-P.x,-P.y,1,1));continue}}let i,f,N=-c(P,T);if(Math.abs(N)<.01)u(P,T)>0?(A.x=P.x,A.y=P.y,N=1,i=Number.MAX_VALUE,f=!0):(o(A,T),N=1,i=1,f=!1);else{A.x=(P.x+T.x)/N,A.y=(P.y+T.y)/N,i=h(A);const t=(i-1)*w*d;f=i>4||t>V&&t>S}L=A.x,D=A.y;let G=p;switch(p){case 0:i<1.05&&(G=2);break;case 1:i<m&&(G=2);break;case 2:i>_&&(G=0)}switch(G){case 2:if(O(A.x,A.y,-P.x,-P.y,0,-1),O(-A.x,-A.y,-P.x,-P.y,0,1),r)break;if(b){const t=Z?0:F;R=this._writeVertex(I,M,L,D,T.x,T.y,A.x,A.y,0,-1,t),z=this._writeVertex(I,M,L,D,T.x,T.y,-A.x,-A.y,0,1,t)}break;case 0:{const t=N<0;let e,n,i,h;if(t){const t=R;R=z,z=t,e=B,n=C}else e=C,n=B;if(f)i=t?o(this._innerPrev,P):s(this._innerPrev,P),h=t?s(this._innerNext,T):o(this._innerNext,T);else{const e=t?l(this._inner,A):a(this._inner,A);i=e,h=e}const c=t?s(this._bevelStart,P):o(this._bevelStart,P);O(i.x,i.y,-P.x,-P.y,e.x,e.y);const u=O(c.x,c.y,-P.x,-P.y,n.x,n.y);if(r)break;const y=t?o(this._bevelEnd,T):s(this._bevelEnd,T);if(f){const t=this._writeVertex(I,M,L,D,-P.x,-P.y,0,0,0,0,F);R=this._writeVertex(I,M,L,D,T.x,T.y,h.x,h.y,e.x,e.y,F),z=this._writeVertex(I,M,L,D,T.x,T.y,y.x,y.y,n.x,n.y,F),this._writeTriangle(u,t,z)}else{if(b){const t=this._bevelMiddle;t.x=(c.x+y.x)/2,t.y=(c.y+y.y)/2,x(E,t,-P.x,-P.y),O(t.x,t.y,-P.x,-P.y,E.x,E.y),x(E,t,T.x,T.y),R=this._writeVertex(I,M,L,D,T.x,T.y,t.x,t.y,E.x,E.y,F),z=this._writeVertex(I,M,L,D,T.x,T.y,h.x,h.y,e.x,e.y,F)}else{const t=R;R=z,z=t}O(y.x,y.y,T.x,T.y,n.x,n.y)}if(t){const t=R;R=z,z=t}break}case 1:{const t=N<0;let e,n;if(t){const t=R;R=z,z=t,e=B,n=C}else e=C,n=B;const h=t?l(this._inner,A):a(this._inner,A);let c,y;f?(c=t?o(this._innerPrev,P):s(this._innerPrev,P),y=t?s(this._innerNext,T):o(this._innerNext,T)):(c=h,y=h);const d=t?s(this._roundStart,P):o(this._roundStart,P),g=t?o(this._roundEnd,T):s(this._roundEnd,T),p=O(c.x,c.y,-P.x,-P.y,e.x,e.y),_=O(d.x,d.y,-P.x,-P.y,n.x,n.y);if(r)break;const m=this._writeVertex(I,M,L,D,-P.x,-P.y,0,0,0,0,F);f||this._writeTriangle(R,z,m);const w=l(this._outer,h),v=this._writeVertex(I,M,L,D,T.x,T.y,g.x,g.y,n.x,n.y,F);let k,V;const S=i>2;if(S){let e;i!==Number.MAX_VALUE?(w.x/=i,w.y/=i,e=u(P,w),e=(i*(e*e-1)+1)/e):e=-1,k=t?s(this._startBreak,P):o(this._startBreak,P),k.x+=P.x*e,k.y+=P.y*e,V=t?o(this._endBreak,T):s(this._endBreak,T),V.x+=T.x*e,V.y+=T.y*e}x(E,w,-P.x,-P.y);const U=this._writeVertex(I,M,L,D,-P.x,-P.y,w.x,w.y,E.x,E.y,F);x(E,w,T.x,T.y);const G=b?this._writeVertex(I,M,L,D,T.x,T.y,w.x,w.y,E.x,E.y,F):U,Z=m,W=b?this._writeVertex(I,M,L,D,T.x,T.y,0,0,0,0,F):m;let Y=-1,j=-1;if(S&&(x(E,k,-P.x,-P.y),Y=this._writeVertex(I,M,L,D,-P.x,-P.y,k.x,k.y,E.x,E.y,F),x(E,V,T.x,T.y),j=this._writeVertex(I,M,L,D,T.x,T.y,V.x,V.y,E.x,E.y,F)),b?S?(this._writeTriangle(Z,_,Y),this._writeTriangle(Z,Y,U),this._writeTriangle(W,G,j),this._writeTriangle(W,j,v)):(this._writeTriangle(Z,_,U),this._writeTriangle(W,G,v)):S?(this._writeTriangle(m,_,Y),this._writeTriangle(m,Y,j),this._writeTriangle(m,j,v)):(this._writeTriangle(m,_,U),this._writeTriangle(m,G,v)),f?(R=this._writeVertex(I,M,L,D,T.x,T.y,y.x,y.y,e.x,e.y,F),z=v):(R=b?this._writeVertex(I,M,L,D,T.x,T.y,y.x,y.y,e.x,e.y,F):p,this._writeTriangle(R,W,v),z=v),t){const t=R;R=z,z=t}break}}}}}}}]);