@arcgis/core 5.0.0-next.35 → 5.0.0-next.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06462b267ff8d5984882.js +1 -0
- package/assets/esri/core/workers/chunks/{b48bb38e5d60fc7a9097.js → 08ef90e3fcfd4eda4301.js} +1 -1
- package/assets/esri/core/workers/chunks/0a58b57e1777a8b0ea23.js +1 -0
- package/assets/esri/core/workers/chunks/{7115c52e22b7becff8de.js → 103153951ba312dc5e9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f55328aabf84770c8e6a.js → 1817cf11e85afca947d3.js} +1 -1
- package/assets/esri/core/workers/chunks/20e4243ea563d05a5256.js +1 -0
- package/assets/esri/core/workers/chunks/24a3c6f0154787968724.js +1 -0
- package/assets/esri/core/workers/chunks/{fafbacf2467e6883b6c9.js → 28db329528def851efd7.js} +1 -1
- package/assets/esri/core/workers/chunks/{2367bd1cb34799a3f08a.js → 30184e39129d9c66ea54.js} +1 -1
- package/assets/esri/core/workers/chunks/3f03165487c1c2340fff.js +1 -0
- package/assets/esri/core/workers/chunks/48e2737182c75005fb8f.js +1 -0
- package/assets/esri/core/workers/chunks/{05e55118dc0023d500fc.js → 5000a37fba27464d10ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa01d1813fa78034526e.js → 51355866a0dcf41cfded.js} +1 -1
- package/assets/esri/core/workers/chunks/{a372d9af43ade7c6314c.js → 52c8687b473c9953c2f2.js} +1 -1
- package/assets/esri/core/workers/chunks/640085b5ade5c7f16228.js +1 -0
- package/assets/esri/core/workers/chunks/727804cf901094b1d620.js +1 -0
- package/assets/esri/core/workers/chunks/{0446562aee0639c61485.js → 7420fa18ba12014b22ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9c2e00fed979c21e2f0.js → 8a946cbc816f373c136b.js} +1 -1
- package/assets/esri/core/workers/chunks/8c271e9272e4eaf1325a.js +1 -0
- package/assets/esri/core/workers/chunks/{2a0fe1aede5c68374ccf.js → 8ec238b5b59ef18a1713.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1dfb1323d50247e80f9.js → 9110287f272141f60c35.js} +1 -1
- package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +1 -0
- package/assets/esri/core/workers/chunks/9664d9e679abc41f6c42.js +1 -0
- package/assets/esri/core/workers/chunks/{2921f05a40fda12f9f81.js → a00bba1c7cbf8cd7892c.js} +1 -1
- package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +1 -0
- package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +1 -0
- package/assets/esri/core/workers/chunks/{483dc4ee5d73cdfe6229.js → b075d3714fab0591d67c.js} +1 -1
- package/assets/esri/core/workers/chunks/{82cc758bddd9f8397b9f.js → b451dc416eebd0931ef8.js} +4 -4
- package/assets/esri/core/workers/chunks/b59be95949445ff5afab.js +1 -0
- package/assets/esri/core/workers/chunks/b6dec5dfdeca54bae88d.js +1 -0
- package/assets/esri/core/workers/chunks/{4356274cfa477eb6d749.js → bfb9cbe59d36d18f9157.js} +1 -1
- package/assets/esri/core/workers/chunks/{6afd59412bfc134bdf75.js → c052fb8c952cda0b5d13.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2ebd6471e1259a6eac0.js → c9e7cc5d853908ab5b2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{97650ee3d0eecb69ccbb.js → d8623f5f13a084e439c2.js} +5 -5
- package/assets/esri/core/workers/chunks/dd105d6e0fcedee32644.js +1 -0
- package/assets/esri/core/workers/chunks/e1148067ceae7d9eaaf8.js +1 -0
- package/assets/esri/core/workers/chunks/{b536fdb655ad293d9024.js → eb6218634a492667506a.js} +1 -1
- package/assets/esri/core/workers/chunks/{7804be2f5b3d86188a24.js → edc3d98f33d7bf959154.js} +1 -1
- package/assets/esri/core/workers/chunks/eefad79be500667af96e.js +1 -0
- package/assets/esri/core/workers/chunks/{63933cbcb5c12df09715.js → f1ac1c8b1331ec79e898.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b7f9a57a2cfbc108673.js → f1b99529e2055873b65a.js} +1 -1
- package/assets/esri/core/workers/chunks/f693a4d97b2762d0e6ff.js +1 -0
- package/assets/esri/core/workers/chunks/f8caceeaa14d99c35526.js +1 -0
- package/assets/esri/core/workers/chunks/febce0d80f019dc2a427.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Magnifier.glsl.js +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/buffer/internals/Vec4.js +1 -1
- package/interfaces.d.ts +108 -0
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraph/DataModel.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.d.ts +4 -0
- package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.js +5 -0
- package/rest/knowledgeGraph/GraphProperty.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/knowledgeGraphService.d.ts +3 -0
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/ScaleRangeQueries.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TextureFader.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ensureColor4.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +5 -5
- package/views/SceneView.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/support/GroundElevationSampler.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/032444974011118127d7.js +0 -1
- package/assets/esri/core/workers/chunks/089221bac1f019692f48.js +0 -1
- package/assets/esri/core/workers/chunks/1bfe0b2bf38d4dee7fd6.js +0 -1
- package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +0 -1
- package/assets/esri/core/workers/chunks/53d95ba86d010231fc4e.js +0 -1
- package/assets/esri/core/workers/chunks/7d3e665613927904ba4f.js +0 -1
- package/assets/esri/core/workers/chunks/a5f2da24497349239648.js +0 -1
- package/assets/esri/core/workers/chunks/a7b1b42bdb9cb9ecac45.js +0 -1
- package/assets/esri/core/workers/chunks/acaaefd4997316d319b8.js +0 -1
- package/assets/esri/core/workers/chunks/ad138b989c2c7a1168ac.js +0 -1
- package/assets/esri/core/workers/chunks/cc7c37f9ed3f831fd25c.js +0 -1
- package/assets/esri/core/workers/chunks/d14bd320f72d8e8a0ad8.js +0 -1
- package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +0 -1
- package/assets/esri/core/workers/chunks/de99c4fd1582a8e610cf.js +0 -1
- package/assets/esri/core/workers/chunks/ded3ef385d5a3a2ec8ca.js +0 -1
- package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +0 -1
- package/assets/esri/core/workers/chunks/eab0938d4ad7d7cc7309.js +0 -1
- package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +0 -1
- package/assets/esri/core/workers/chunks/ef5b13ee3362763c1096.js +0 -1
- package/assets/esri/core/workers/chunks/effbc4d240752e8ba0ab.js +0 -1
- package/assets/esri/core/workers/chunks/f403d8e414766fab2936.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5294],{31635:(e,t,n)=>{function r(e,t,n,r){var s,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(s=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");s&&(r=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>a,mS:()=>s}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function a(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function s(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(s);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(s,function(e){return t(e),s()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},34304:(e,t,n)=>{n.d(t,{DF:()=>l,FD:()=>s,Ov:()=>i,ct:()=>h});let r=1e-6;function s(){return r}const i=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:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:s,setEpsilon:function(e){r=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,n)=>{n.d(t,{Eq:()=>d,G1:()=>p,TS:()=>i,Tf:()=>_,V6:()=>s,Vm:()=>x,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c,xV:()=>b});const r={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 s(e){return!!r[e]||!!r[e.toLowerCase()]}function i(e){return r[e]??r[e.toLowerCase()]}function a(e){return[...i(e)]}function o(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,r=1){const s=(e%360+360)%360/360,i=n<=.5?n*(t+1):n+t-n*t,a=2*n-i;return[Math.round(255*o(a,i,s+1/3)),Math.round(255*o(a,i,s)),Math.round(255*o(a,i,s-1/3)),r]}function h(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,s=t?1:17,i=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 i&&(l=a&r,a>>=n,o[3]=s*l/255),l=a&r,a>>=n,o[2]=s*l,l=a&r,a>>=n,o[1]=s*l,l=a&r,a>>=n,o[0]=s*l,o}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),s=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(s+16*s)/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*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function 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=s(e)?i(e):null;return t??=u(e),t??=c(e),t}function x(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return g(e,0,1)}function y(e){return Math.round(g(e,0,255))}function g(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const _=2.2,m=1/_;function b(e){return e**m}},51624:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(44208),s=n(69397),i=n(93687);const a=4294967296,o=new TextDecoder("utf-8"),l=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class h{constructor(e,t,n=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,n,r)}_init(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}get usedMemory(){return 64+(0,s.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(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,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),n}getSFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),n}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,n=this._toString(this._data,t,t+e);return this._skip(e),n}getBytes(){const e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,n,r){const s=this.getMessage(),i=e(s,t,n,r);return s.release(),i}processMessage(e){const t=this.getMessage(),n=e(t);return t.release(),n}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}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!")}}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,n=0,r=0;if(this._end-t>=10)do{if(r=e[t++],n|=127&r,!(128&r))break;if(r=e[t++],n|=(127&r)<<7,!(128&r))break;if(r=e[t++],n|=(127&r)<<14,!(128&r))break;if(r=e[t++],n|=(127&r)<<21,!(128&r))break;if(r=e[t++],n+=268435456*(127&r),!(128&r))break;if(r=e[t++],n+=34359738368*(127&r),!(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),!(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),!(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),!(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],128&r);)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,n}_decodeSVarint(){const e=this._data;let t,n=0,r=0;const s=1&e[this._pos];if(r=e[this._pos++],n|=127&r,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<7,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<14,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<21,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=268435456*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=34359738368*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=4398046511104*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(t=BigInt(n),r=e[this._pos++],t+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/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(e,t,n){if((n=Math.min(this._end,n))-t>l){const r=e.subarray(t,n);return o.decode(r)}let r="",s="";for(let i=t;i<n;++i){const t=e[i];128&t?s+="%"+t.toString(16):(r+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(r+=decodeURIComponent(s)),r}_toBytes(e,t,n){return n=Math.min(this._end,n),new Uint8Array(e.buffer,t,n-t)}static{this.pool=new i.A(()=>new h(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},69286:(e,t,n)=>{n.r(t),n.d(t,{default:()=>J});var r=n(74887),s=n(6774),i=n(5408),a=n(13195);function o(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 l(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 h(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 c(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);const f=24;class d{constructor(e,t,n,r,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,n){const r=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const s=n&&o(e);let i;for(const t of this._glyphItems)if(i=t[e],i)break;u.push({codePoint:e,x:f,y:d,vertical:s,glyphMosaicItem:i}),i&&(f+=i.metrics.advance+r)}let x=f;a>0&&(x=f/Math.max(1,Math.ceil(f/a)));const p=e.includes(""),y=[],g=u.length;for(let e=0;e<g-1;e++){const t=u[e].codePoint,n=l(t);if(h(t)||n){let r=0;if(10===t)r-=1e4;else if(n&&p)r+=150;else{40!==t&&65288!==t||(r+=50);const n=u[e+1].codePoint;41!==n&&65289!==n||(r+=50)}y.push(this._buildBreak(e+1,u[e].x,x,y,r,!1))}}const _=this._optimalBreaks(this._buildBreak(g,f,x,y,0,!0));let m=0;const b=t?-s:s;let I=0;for(let e=0;e<_.length;e++){const t=_[e];let n=I;for(;n<t&&c(u[n].codePoint);)u[n].glyphMosaicItem=null,++n;let r=t-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphMosaicItem=null,--r;if(n<=r){const e=u[n].x;for(let t=n;t<=r;t++)u[t].x-=e,u[t].y=d;let t=u[r].x;u[r].glyphMosaicItem&&(t+=u[r].glyphMosaicItem.metrics.advance),m=Math.max(t,m),i&&this._applyJustification(u,n,r)}I=t,d+=b}if(u.length>0){const e=_.length-1,n=(i-this._hAnchor)*m;let r=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(r+=e*s);for(const e of u)e.x+=n,e.y+=r}return u.filter(e=>e.glyphMosaicItem)}static getTextBox(e,t){if(!e.length)return null;let n=1/0,r=1/0,s=0,i=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;n=Math.min(n,o),s=Math.max(s,h),r=Math.min(r,l),i=Math.max(i,c)}return{x:n,y:r,width:s-n,height:i-r}}static getBox(e){if(!e.length)return null;let t=1/0,n=1/0,r=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,h=i.x,c=i.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),r=Math.max(r,u),n=Math.min(n,c),s=Math.max(s,f)}return{x:t,y:n,width:r-t,height:s-n}}static addDecoration(e,t){const n=e.length;if(0===n)return;let r=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<n;i++){const n=e[i];if(n.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:a-r,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=n.y,r=n.x+n.glyphMosaicItem.metrics.left}}const i=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:i-r,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,n,r){const s=(e-t)*(e-t);return r?e<t?s/2:2*s:s+Math.abs(n)*n}_buildBreak(e,t,n,r,s,i){let a=null,o=this._breakScore(t,n,s,i);for(const e of r){const r=t-e.x,l=this._breakScore(r,n,s,i)+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,n){const r=e[n],s=r.vertical?f:r.glyphMosaicItem?r.glyphMosaicItem.metrics.advance:0,i=(r.x+s)*this._justify;for(let r=t;r<=n;r++)e[r].x-=i}}const x=.5;class p{constructor(e,t,n=0,r=-1,s=x){this.x=e,this.y=t,this.angle=n,this.segment=r,this.minzoom=s}}class y{constructor(e,t,n,r,s,i=x,o=a.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class g{constructor(e,t,n,r,s,i,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=n,this.br=r,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class _{constructor(e){this.shapes=e}}class m{getIconPlacement(e,t,n){const r=new s.bR(e.x,e.y),i=0===n.rotationAlignment,o=n.keepUpright;let l=n.rotate*a.os;i&&(l+=e.angle);const h=new _([]);return n.allowOverlap&&n.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,r,t,n,l),i&&o&&this._addIconPlacement(h,r,t,n,l+a.Jo),h}_addIconPlacement(e,t,n,r,i){const o=n.rasterizationScale,l=n.width/o,h=n.height/o,c=r.offset;let u=c[0],f=c[1];switch(r.anchor){case 0:u-=l/2,f-=h/2;break;case 1:f-=h/2;break;case 2:u-=l,f-=h/2;break;case 3:u-=l/2;break;case 4:u-=l/2,f-=h;break;case 5:break;case 7:f-=h;break;case 6:u-=l;break;case 8:u-=l,f-=h}const d=n.rect,p=2/o,y=u-p,_=f-p,m=y+d.width/o,b=_+d.height/o,I=new s.bR(y,_),w=new s.bR(m,b),v=new s.bR(y,b),M=new s.bR(m,_);if(0!==i){const e=Math.cos(i),t=Math.sin(i);I.rotate(e,t),w.rotate(e,t),v.rotate(e,t),M.rotate(e,t)}const k=new g(I,M,v,w,d,i,0,256,t,x,a.MG,0);if(e.shapes.push(k),!r.allowOverlap||!r.ignorePlacement){const n=r.size,s=r.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*n-s,dyPixels:f*n-s,hard:!r.optional,partIndex:0,width:l*n+2*s,height:h*n+2*s,angle:i,minLod:x,maxLod:a.MG};e.iconColliders.push(o)}}getTextPlacement(e,t,n,r){const o=new s.bR(e.x,e.y),l=r.rotate*a.os,h=0===r.rotationAlignment,c=r.keepUpright,u=r.padding;let p=x;const m=h?e.angle:0,b=e.segment>=0&&h,I=r.allowOverlap&&r.ignorePlacement?null:[],w=[],v=!b;let M=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,P=M,V=k;const A=(b||h)&&c,D=r.size/f;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let L,S=0,T=0;if(!b&&B){const e=d.getTextBox(t,r.lineHeight*f);switch(r.anchor){case 1:S=e.height/2,T=-e.width/2;break;case 2:S=-e.height/2,T=e.width/2;break;case 3:S=e.height/2,T=e.width/2;break;case 4:S=-e.height/2,T=-e.width/2;break;case 5:S=e.height;break;case 7:T=-e.width;break;case 6:T=e.width;break;case 8:S=-e.height}}S+=r.offset[0]*f,T+=r.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,_=t.metrics,R=t.page;if(I&&v){if(void 0!==L&&L!==f.y){let t,n,s,i;B?(t=-V+S,n=M+T,s=V-P,i=k-M):(t=M+S,n=P+T,s=k-M,i=V-P);const o={xTile:e.x,yTile:e.y,dxPixels:t*D-u,dyPixels:n*D-u,hard:!r.optional,partIndex:1,width:s*D+2*u,height:i*D+2*u,angle:l,minLod:x,maxLod:a.MG};I.push(o),M=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,P=M,V=k}L=f.y}const C=[];if(b){const r=.5*t.metrics.width,s=(f.x+_.left-4+r)*D*i.ih;if(p=this._placeGlyph(e,p,s,n,e.segment,1,f.vertical,R,C),c&&(p=this._placeGlyph(e,p,s,n,e.segment,-1,f.vertical,R,C)),p>=2)break}else C.push(new y(o,m,m,R,!1)),h&&c&&C.push(new y(o,m+a.Jo,m+a.Jo,R,!1));const z=f.x+_.left,U=f.y-17-_.top,F=z+_.width,E=U+_.height;let N,O,G,q,j,W,Z,K;if(!b&&B)if(f.vertical){const e=(z+F)/2-_.height/2,t=(U+E)/2+_.width/2;N=new s.bR(-t-4+S,e-4+T),O=new s.bR(N.x+d.width,N.y+d.height),G=new s.bR(N.x,O.y),q=new s.bR(O.x,N.y)}else N=new s.bR(4-U+S,z-4+T),O=new s.bR(N.x-d.height,N.y+d.width),G=new s.bR(O.x,N.y),q=new s.bR(N.x,O.y);else N=new s.bR(z-4+S,U-4+T),O=new s.bR(N.x+d.width,N.y+d.height),G=new s.bR(N.x,O.y),q=new s.bR(O.x,N.y);for(const t of C){let n,i,a,o;if(t.alternateVerticalGlyph){if(!j){const e=(U+E)/2+T;j=new s.bR((z+F)/2+S-_.height/2-4,e+_.width/2+4),W=new s.bR(j.x+d.height,j.y-d.width),Z=new s.bR(W.x,j.y),K=new s.bR(j.x,W.y)}n=j,i=Z,a=K,o=W}else n=N,i=G,a=q,o=O;const h=U,c=E,x=t.glyphAngle+l;if(0!==x){const e=Math.cos(x),t=Math.sin(x);n=n.clone(),i=i?.clone(),a=a?.clone(),o=o?.clone(),n.rotate(e,t),o?.rotate(e,t),i?.rotate(e,t),a?.rotate(e,t)}let p=0,y=256;if(b&&B?f.vertical?t.alternateVerticalGlyph?(p=32,y=96):(p=224,y=32):(p=224,y=96):(p=192,y=64),w.push(new g(n,a,i,o,d,t.labelAngle,p,y,t.anchor,t.minzoom,t.maxzoom,t.page)),I&&(!A||this._legible(t.labelAngle)))if(v)z<M&&(M=z),h<P&&(P=h),F>k&&(k=F),c>V&&(V=c);else if(t.minzoom<2){const n={xTile:e.x,yTile:e.y,dxPixels:(z+S)*D-u,dyPixels:(h+S)*D-u,hard:!r.optional,partIndex:1,width:(F-z)*D+2*u,height:(c-h)*D+2*u,angle:x,minLod:t.minzoom,maxLod:t.maxzoom};I.push(n)}}}if(p>=2)return null;if(I&&v){let t,n,s,i;B?(t=-V+S,n=M+T,s=V-P,i=k-M):(t=M+S,n=P+T,s=k-M,i=V-P);const o={xTile:e.x,yTile:e.y,dxPixels:t*D-u,dyPixels:n*D-u,hard:!r.optional,partIndex:1,width:s*D+2*u,height:i*D+2*u,angle:l,minLod:x,maxLod:a.MG};I.push(o)}const R=new _(w);return I&&I.length>0&&(R.textColliders=I),R}_legible(e){const t=(0,a.z0)(e);return t<65||t>=193}_placeGlyph(e,t,n,r,i,o,l,h,c){let u=o;const f=u<0?(0,a.Wh)(e.angle+a.Jo,a.pJ):e.angle;let d=0;n<0&&(u*=-1,n*=-1,d=a.Jo),u>0&&++i;let x=new s.bR(e.x,e.y),p=r[i],g=a.MG;if(r.length<=i)return g;for(;;){const e=p.x-x.x,s=p.y-x.y,o=Math.sqrt(e*e+s*s),_=Math.max(n/o,t),m=e/o,b=s/o,I=(0,a.Wh)(Math.atan2(b,m)+d,a.pJ);if(c.push(new y(x,f,I,h,!1,_,g)),l&&c.push(new y(x,f,I,h,!0,_,g)),_<=t)return _;x=p.clone();do{if(i+=u,r.length<=i||i<0)return _;p=r[i]}while(x.isEqual(p));let w=p.x-x.x,v=p.y-x.y;const M=Math.sqrt(w*w+v*v);w*=o/M,v*=o/M,x.x-=w,x.y-=v,g=_}}}var b=n(51624),I=n(15585);class w{constructor(e,t,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=t.keys,s=t.values,i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:this.id=i.getUInt64();break;case 2:{const e=i.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const n=e.getUInt32(),i=e.getUInt32();t[r[n]]=s[i]}e.release();break}case 3:this.type=i.getUInt32();break;case 4:this._pbfGeometry=i.getMessage();break;default:i.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,e?e.reset(this.type):n=[];let i,a=1,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 1:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):n&&(r&&n.push(r),r=[],r.push(new s.bR(l,h)));break;case 2:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):r&&r.push(new s.bR(l,h));break;case 7:e?e.close():r&&!r[0].equals(l,h)&&r.push(r[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?i=e.result():n&&(r&&n.push(r),i=n),t.release(),this._geometry=i,i}}var v=n(80081);class M extends v.A{constructor(){super(12)}add(e,t,n){const r=this.array;r.push(e),r.push(t),r.push(n)}}v.A;class k{constructor(e){this.extent=i.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(k._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 P extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,a,o,l,h,c,u){const f=this.array;let d=v.A.i1616to32(e,t);f.push(d);const x=31;d=v.A.i8888to32(Math.round(x*n),Math.round(x*r),Math.round(x*s),Math.round(x*i)),f.push(d),d=v.A.i8888to32(Math.round(x*a),Math.round(x*o),Math.round(x*l),Math.round(x*h)),f.push(d),d=v.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class V extends v.A{constructor(e){super(e)}add(e,t,n){const r=this.array;r.push(v.A.i1616to32(e,t)),n&&r.push(...n)}}class A extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,a){const o=this.array,l=this.index;let h=v.A.i1616to32(e,t);return o.push(h),h=v.A.i8888to32(Math.round(15*n),Math.round(15*r),s,i),o.push(h),a&&o.push(...a),l}}class D extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,o,l,h,c,u,f){const d=this.array;let x=v.A.i1616to32(e,t);d.push(x),x=v.A.i1616to32(Math.round(8*n),Math.round(8*r)),d.push(x),x=v.A.i8888to32(s/4,i/4,l,h),d.push(x),x=v.A.i8888to32(0,(0,a.z0)(o),10*c,Math.min(10*u,255)),d.push(x),f&&d.push(...f)}}class B extends v.A{constructor(e){super(e)}add(e,t,n,r,s){const i=this.array,a=v.A.i1616to32(2*e+n,2*t+r);i.push(a),s&&i.push(...s)}}class L{constructor(e,t,n){this.layerExtent=i.vA,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=n,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,n){}}class S extends L{constructor(e,t,n,r,s){super(e,t,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=s}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=r.circleMaterial.encodeAttributes(i,s,r);for(const e of a)if(e)for(const r of e){const e=t.index;t.add(r.x,r.y,0,0,o),t.add(r.x,r.y,0,1,o),t.add(r.x,r.y,1,0,o),t.add(r.x,r.y,1,1,o),n.add(e,e+1,e+2),n.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),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._circleIndexStart,t[r++]=this._circleIndexCount,t[r++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)n[r++]=this._circleVertexBuffer.array[e];t[r++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[r++]=this._circleIndexBuffer.array[e];return t.buffer}}var T=n(98291),R=n(83349);class C extends L{constructor(e,t,n,r,s,i,a){super(e,t,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=s,this._outlineVertexBuffer=i,this._outlineIndexBuffer=a}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!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,n=this.zoom,{fillMaterial:r,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",n);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",n),r=t.getPaintValue("fill-opacity",n+1);e<1&&r<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",n),r=t.getPaintValue("fill-color",n+1);e[3]<1&&r[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of c){const c=o.getValue(n,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=r.encodeAttributes(l,n,t,f),x=h&&a?s.encodeAttributes(l,n,t):[],p=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:x,page:f.page,geometry:p}),i.sort((e,t)=>e.page-t.page);for(const{ddFillAttributes:e,ddOutlineAttributes:n,page:r,geometry:s}of i)this._processFeature(s,h,t.outlineUsesFillColor,e,n,u,r)}}else for(const o of c){const l=i?r.encodeAttributes(o,n,t):null,c=h&&a?s.encodeAttributes(o,n,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),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._fillIndexStart,t[r++]=this._fillIndexCount,t[r++]=this._outlineIndexStart,t[r++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)n[r++]=this._fillVertexBuffer.array[e];t[r++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[r++]=this._fillIndexBuffer.array[e];t[r++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)n[r++]=this._outlineVertexBuffer.array[e];t[r++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[r++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n,r,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!n||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let h;for(let t=0;t<o;t++){const n=C._area(e[t]);n>32?(void 0!==h&&this._processFill(e,h,r,i,a),h=[t]):n<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,r,i,a)}_processOutline(e,t){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let a,o,l;const h=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let f=-1,d=-1,x=-1,p=-1,y=-1,g=!1,_=e.length;if(_<2)return;const m=e[0];let b=e[_-1];for(;_&&b.isEqual(m);)--_,b=e[_-1];if(!(_-0<2)){for(let s=0;s<_;++s){0===s?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=s!==_-1?e[s+1]:e[0],h.assign(c));const i=this._isClipEdge(a,o);-1===p&&(g=i),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 b=-u.x*-h.x+-u.y*-h.y;let I=Math.abs(0!==b?1/b:1);I>8&&(I=8),m>=0?(x=n.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=x),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,I*-u.x,I*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=d,d=x,x=n.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x)):(x=n.add(o.x,o.y,I*u.x,I*u.y,0,1,t),-1===p&&(p=x),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=d,d=x,x=n.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=n.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x))}f>=0&&d>=0&&p>=0&&!g&&r.add(f,d,p),f>=0&&p>=0&&y>=0&&!g&&r.add(f,y,p),this._outlineIndexCount+=3*(r.index-i)}}_processFill(e,t,n,r,s){let i;t.length>1&&(i=[]);let a=0;for(const n of t)0!==a&&i.push(a),a+=e[n].length;const o=2*a,l=T.A.acquire();for(const n of t){const t=e[n],r=t.length;for(let e=0;e<r;++e)l.push(t[e].x,t[e].y)}const h=(0,R.e)(l,i,2);if(R.e.deviation(l,i,2,h)>0){const r=t.map(t=>e[t].length),{buffer:i,vertexCount:a}=(0,I.l)(l,r);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],n);for(let t=0;t<a;t+=3){const n=e+t;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let r=0;for(;r<o;)this._fillVertexBuffer.add(l[r++],l[r++],n);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+h[i++],t+h[i++],t+h[i++]);if(void 0!==s){const t=this._patternMap,n=t.get(s);n?n[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}T.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 n=e.length-1;for(let r=0;r<n;r++)t+=(e[r].x-e[r+1].x)*(e[r].y+e[r+1].y);return t+=(e[n].x-e[0].x)*(e[n].y+e[0].y),.5*t}}var z=n(83773);class U extends L{constructor(e,t,n,r,s){super(e,t,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=s,this._lineTessellator=new z.i(F(this.tessellationProperties),E(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("line-pattern"),a=r.getPaintProperty("line-dasharray"),o=r.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(s)||0,h=o?.isDataDriven,c=i?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?i.getValue(s,e):this._getDashArrayKey(e,s,r,a,h,o,l));else if(i)t(i.getValue(s));else if(a){const e=a.getValue(s);t(r.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,n=this.zoom,r=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,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",n),x=d||0,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,g=y?null:t.getLayoutValue("line-join",n);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",n);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,I=b?null:t.getLayoutValue("line-round-limit",n);u=t.getPaintProperty("line-width");const w=u?.isDataDriven?u:null,v=w?null:t.getPaintValue("line-width",n);u=t.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,k=M?null:t.getPaintValue("line-offset",n);if(h||c){const i=[];for(const s of r){const r=h?o.getValue(n,s):this._getDashArrayKey(s,n,t,l,p,f,x),c=this._spriteInfo[r];if(!c?.rect)continue;const u=a.encodeAttributes(s,n,t,c),P=s.getGeometry(e);i.push({ddAttributes:u,page:c.page,cap:f?f.getValue(n,s):d,join:y?y.getValue(n,s):g,miterLimit:_?_.getValue(n,s):m,roundLimit:b?b.getValue(n,s):I,halfWidth:.5*(w?w.getValue(n,s):v),offset:M?M.getValue(n,s):k,geometry:P})}i.sort((e,t)=>e.page-t.page),s.textured=!0;for(const{ddAttributes:e,page:t,cap:n,join:r,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of i)s.capType=n,s.joinType=r,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(n),t=this._spriteInfo[e];if(!t?.rect)return}s.textured=!(!o&&!l),s.capType=d,s.joinType=g,s.miterLimit=m,s.roundLimit=I,s.halfWidth=.5*v,s.offset=k;for(const o of r){const r=i?a.encodeAttributes(o,n,t):null;f&&(s.capType=f.getValue(n,o)),y&&(s.joinType=y.getValue(n,o)),_&&(s.miterLimit=_.getValue(n,o)),b&&(s.roundLimit=b.getValue(n,o)),w&&(s.halfWidth=.5*w.getValue(n,o)),M&&(s.offset=M.getValue(n,o));const l=o.getGeometry(e);this._processFeature(l,r)}}}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),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._lineIndexStart,t[r++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[e];t[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[r++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n){if(!e)return;const r=e.length;for(let s=0;s<r;s++)this._processGeometry(e[s],t,n)}_processGeometry(e,t,n){if(e.length<2)return;let r,s,i=e[0],a=1;for(;a<e.length;)r=e[a].x-i.x,s=e[a].y-i.y,r*r+s*s<1e-6?e.splice(a,1):(i=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!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=h:e.set(n,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,n,r,s,i,a){const o=s?i.getValue(t,e):a,l=r.getValue(t,e);return n.getDashKey(l,o)}}const F=e=>(t,n,r,s,i,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,n,o,l,r,s,i,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),E=e=>(t,n,r)=>{e._lineIndexBuffer.add(t,n,r)};var N=n(32488),O=n(97768),G=n(799),q=n(4264);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 W extends L{constructor(e,t,n,r,s,i,a,o,l){super(t,n,l.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=r,this._iconIndexBuffer=s,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,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(e,t,n){const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=r.getLayoutProperty("icon-image"),a=r.getLayoutProperty("text-field");let o=r.getLayoutProperty("text-transform"),l=r.getLayoutProperty("text-font");const h=[];let c,u,f,d;i&&!i.isDataDriven&&(c=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=r.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=r.getLayoutValue("text-font",s),l=null);for(const x of this._features){const p=x.getGeometry(e);if(!p||0===p.length)continue;let y,g;i&&(y=i.isDataDriven?i.getValue(s,x):this._replaceKeys(c,x.values),y&&t(y));let _=!1;if(a&&(g=a.isDataDriven?a.getValue(s,x):this._replaceKeys(u,x.values),g)){switch(g=g.replaceAll("\\n","\n"),o&&(f=o.getValue(s,x)),f){case 2:g=g.toLowerCase();break;case 1:g=g.toUpperCase()}if(W._bidiEngine.hasBidiChar(g)){let e;e="rtl"===W._bidiEngine.checkContextual(g)?"IDNNN":"ICNNN",g=W._bidiEngine.bidiTransform(g,e,"VLYSN"),_=!0}if(g.length>0){l&&(d=l.getValue(s,x));for(const e of d){let t=n[e];t||(t=n[e]=new Set);for(const e of g){const n=e.codePointAt(0);null!=n&&t.add(n)}}}}if(!y&&!g)continue;const m=r.getLayoutValue("symbol-sort-key",s,x),b={feature:x,sprite:y,label:g,rtl:_,geometry:p,hash:(g?(0,G.Wm)(g):0)^(y?(0,G.Wm)(y):0),priority:m,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,n=this.zoom,r=t.getLayoutValue("symbol-placement",n),s=0!==r,o=t.getLayoutValue("symbol-spacing",n)*i.ih,l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new q.aR(t,n,s):null,u=h?new q.uU(t,n,s):null,x=this._workerTileHandler;let y;l&&(y=x.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 g=[];let _=1;u?.size&&(_=u.size/f);const m=u?u.maxAngle*a.os:0,b=u?u.size*i.ih:0;for(const e of this._symbolFeatures){let t,a;c&&y&&e.sprite&&(t=y[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(n,e.feature);let l=0;const h=e.label;if(h){(0,O.Lw)(u),u.update(n,e.feature);const t=s&&0===u.rotationAlignment?u.keepUpright:u.writingMode&&u.writingMode.includes(1);let r=.5;switch(u.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let o=.5;switch(u.anchor){case 5:case 3:case 6:o=0;break;case 7:case 4:case 8:o=1}let c=.5;switch(u.justify){case 0:c=r;break;case 1:c=0;break;case 3:c=1}const p=u.letterSpacing*f,y=s?0:u.maxWidth*f,g=u.lineHeight*f,m=e.textFont.map(e=>x.getGlyphItems(e));if(a=new d(m,y,g,p,r,o,c).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const n of a)e=Math.min(e,n.x),t=Math.max(t,n.x);l=(t-e+48)*_*i.ih}}for(let n of e.geometry){const h=[];if(1===r){if(a?.length&&u?.size){const e=u.size*i.ih*(2+Math.min(2,4*Math.abs(u.offset[1])));n=W._smoothVertices(n,e)}W._pushAnchors(h,n,o,l)}else 2===r?W._pushCenterAnchor(h,n):3===e.feature.type?W._pushCentroid(h,n):h.push(new p(n[0].x,n[0].y));for(const r of h){if(r.x<0||r.x>i.vA||r.y<0||r.y>i.vA)continue;if(s&&l>0&&0===u?.rotationAlignment&&!W._honorsTextMaxAngle(n,r,l,m,b))continue;const o={shaping:a,line:n,iconMosaicItem:t,anchor:r,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};g.push(o),this._processFeature(o,c,u)}}}g.sort(j),this._addPlacedGlyphs(),this._symbolInstances=g}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._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),n=new Int32Array(t.buffer),r=new Float32Array(t.buffer),[s,i,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(s),t[o++]=parseFloat(i),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[n,r]]of this.markerPageMap)t[o++]=e,t[o++]=n,t[o++]=r;t[o++]=this.glyphsPageMap.size;for(const[e,[n,r]]of this.glyphsPageMap)t[o++]=e,t[o++]=n,t[o++]=r;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=W.serializeSymbols(t,n,r,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)n[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++)n[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 n of e||[]){t+=5,t+=1;for(const e of n.textColliders)t+=10;for(const e of n.iconColliders)t+=10;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,r,s){s=s||[],t[r++]=s.length;for(const e of s){t[r++]=e.anchor.x,t[r++]=e.anchor.y,t[r++]=e.symbolFeature.hash,t[r++]=e.symbolFeature.priority,t[r++]=e.symbolFeature.feature.featureIndex,t[r++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;for(const s of e.iconColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;t[r++]=e.textVertexRanges.length;for(const[n,s]of e.textVertexRanges)t[r++]=n,t[r++]=s;t[r++]=e.iconVertexRanges.length;for(const[n,s]of e.iconVertexRanges)t[r++]=n,t[r++]=s}return r}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,(e,n)=>n in t?t[n]:"")}_processFeature(e,t,n){const{line:r,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,h=this.layer,c=!!s;let u=!0;c&&(u=t?.optional||!s);const f=i&&i.length>0,d=!f||n?.optional;let x,p;if(c&&(x=this._placementEngine.getIconPlacement(o,s,t)),(x||u)&&(f&&(p=this._placementEngine.getTextPlacement(o,i,r,n)),p||d)){if(x&&p||(d||u?d||p?u||x||(p=null):x=null:(x=null,p=null)),p){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,p.shapes,l,n.rotationAlignment,t),p.textColliders){e.textColliders=p.textColliders;for(const e of p.textColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,h=e.dxPixels*r+(e.dyPixels+e.height)*n,c=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,c),d=Math.max(s,a,l,c),x=Math.min(i,o,h,u),p=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=x,e.width=d-f,e.height=p-x}}}}if(x){const n=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,x.shapes,l,s.page,1===t.rotationAlignment,n),x.iconColliders){e.iconColliders=x.iconColliders;for(const e of x.iconColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,h=e.dxPixels*r+(e.dyPixels+e.height)*n,c=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,c),d=Math.max(s,a,l,c),x=Math.min(i,o,h,u),p=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=x,e.width=d-f,e.height=p-x}}}}}}_addPlacedIcons(e,t,n,r,s,i){const o=Math.max(n-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=s?0:Math.max(n+(0,a.p6)(u.minzoom),o),f=s?25:Math.min(n+(0,a.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,x=u.tr,p=u.bl,y=u.br,g=u.mosaicRect,_=u.labelAngle,m=u.minAngle,b=u.maxAngle,I=u.anchor,w=l.index,v=g.x,M=g.y,k=v+g.width,P=M+g.height,V=l.index;l.add(I.x,I.y,d.x,d.y,v,M,_,m,b,t,f,i),l.add(I.x,I.y,x.x,x.y,k,M,_,m,b,t,f,i),l.add(I.x,I.y,p.x,p.y,v,P,_,m,b,t,f,i),l.add(I.x,I.y,y.x,y.y,k,P,_,m,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===V?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([V,4]),h.add(w,w+1,w+2),h.add(w+1,w+2,w+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[r,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.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(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,r,s){const i=Math.max(n-1,0),o=1===r;let l,h,c,u,f,d,x,p,y,g,_;for(const r of t)l=o?0:Math.max(n+(0,a.p6)(r.minzoom),i),h=o?25:Math.min(n+(0,a.p6)(r.maxzoom),25),h<=l||(c=r.tl,u=r.tr,f=r.bl,d=r.br,x=r.labelAngle,p=r.minAngle,y=r.maxAngle,g=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[g.x,g.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:x,minAngle:p,maxAngle:y,minLod:l,maxLod:h,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,n,r){n+=r;let i=0;const o=t.length-1;for(let e=0;e<o;e++)i+=s.bR.distance(t[e],t[e+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 f=t.length-1;for(let r=0;r<f;r++){const s=t[r],i=t[r+1],o=i.x-s.x,l=i.y-s.y,f=Math.sqrt(o*o+l*l);let d;for(;u+n<c+f;){u+=n;const t=(u-c)/f,x=(0,a.GW)(s.x,i.x,t),y=(0,a.GW)(s.y,i.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new p(x,y,d,r,h))}c+=f}}static _pushCenterAnchor(e,t){let n=0;const r=t.length-1;for(let e=0;e<r;e++)n+=s.bR.distance(t[e],t[e+1]);const i=n/2;let o=0;const l=t.length-1;for(let n=0;n<l;n++){const r=t[n],s=t[n+1],l=s.x-r.x,h=s.y-r.y,c=Math.sqrt(l*l+h*h);if(i<o+c){const t=(i-o)/c,u=(0,a.GW)(r.x,s.x,t),f=(0,a.GW)(r.y,s.y,t),d=Math.atan2(h,l);return void e.push(new p(u,f,d,n,0))}o+=c}}static _deviation(e,t,n){const r=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,r)}static _honorsTextMaxAngle(e,t,n,r,i){let a=0;const o=n/2;let l=new s.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=s.bR.distance(e[h],l),l=e[h]}a+=s.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let n,o=h;do{if(++o,o===f)return!1;n=e[o]}while(n.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(n));const x=this._deviation(t,n,l);for(c.push({deviation:x,distToAnchor:a}),u+=x;a-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;a+=s.bR.distance(n,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const r=[];let i=0,a=0;r.push(0);for(let t=1;t<n;t++){const n=s.bR.distance(e[t],e[t-1]);n>0&&(i+=n,r.push(i),a++,a!==t&&(e[a]=e[t]))}if(n=a+1,n<3)return e;t=Math.min(t,.2*i);const o=e[0].x,l=e[0].y,h=e[n-1].x,c=e[n-1].y,u=s.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[n-1],e[n-2]),u.normalize(),e[n-1].x+=t*u.x,e[n-1].y+=t*u.y,r[0]-=t,r[n-1]+=t;const f=[];f.push(new s.bR(o,l));const d=1e-6,x=.5*t;for(let i=1;i<n-1;i++){let a=0,o=0,l=0;for(let n=i-1;n>=0;n--){const s=x+r[n+1]-r[i];if(s<0)break;const h=r[n+1]-r[n],c=r[i]-r[n]<x?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[n+1],g=e[n].x-y.x,_=e[n].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*g-h*y.x)-u*c*h*g/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}for(let s=i+1;s<n;s++){const n=x-r[s-1]+r[i];if(n<0)break;const h=r[s]-r[s-1],c=r[s]-r[i]<x?1:n/h;if(c<d)break;const u=c*c,f=c*n-.5*u*h,p=c*h/t,y=e[s-1],g=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*n+.5*u*(n*g-h*y.x)-u*c*h*g/3),o+=p/f*(y.y*c*n+.5*u*(n*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new s.bR(a/l,o/l))}return f.push(new s.bR(h,c)),e[0].x=o,e[0].y=l,e[n-1].x=h,e[n-1].y=c,f}static _pushCentroid(e,t){const n=i.vA,r=i.vA,s=t.length-1;let a=0,o=0,l=0,h=t[0].x,c=t[0].y;h>n&&(h=n),h<0&&(h=0),c>r&&(c=r),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,i=t[e].y,u=t[e+1].x,f=t[e+1].y;s>n&&(s=n),s<0&&(s=0),i>r&&(i=r),i<0&&(i=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(s-h)*(f-c)-(u-h)*(i-c);a+=d*(h+s+u),o+=d*(c+i+f),l+=d}a/=3*l,o/=3*l,isNaN(a)||isNaN(o)||e.push(new p(a,o))}}class Z{constructor(e,t,n,r,i,o){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=t,this._sourceDataMaxLOD=r,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.IU)(this._level);for(const t of Object.keys(e)){const n=e[t];if(this._pbfTiles[t]=new b.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[e]=n.refKey.split("/").map(parseFloat),r=l-e;if(r>0){const e=(1<<r)-1,n=h&e,i=c&e;this._tileClippers[t]=new s.O3(r,n,i,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new s.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,I.F)(),n=this._initialize(e),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of r)e.getResources(e.tileClipper,a,o);if(4===this._tile.status)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then(()=>this._processFeatures(n.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:n,layers:r,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=r.length-1;e>=0;e--){const u=r[e];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)||!t[u.source]||!s[u.source])continue;const f=t[u.source],d=s[u.source],x=u.sourceLayer,p=f[x];if(p){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=p.extent,e.tileClipper=d;let t=i[u.source];t||(t=i[u.source]={});let n=t[x];n||(n=t[x]=[]),n.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:n}=e;n.forEach((e,n)=>{t[e]&&t[e].layerUIDs.push(n)})}_filterFeatures(e){const{signal:t,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(i))i[e].forEach(t=>{l.push(t),h.push(e)});for(let e=0;e<l.length;e++){const i=h[e],c=l[e];if(!n[i]||!s[i])continue;const u=n[i][c],f=s[i][c];if(!f||0===f.length)continue;if((0,r.G4)(t))return;let d=0;const x=u.getData();for(;x.nextTag(2);){const e=x.getMessage(),t=new w(e,u,d++);e.release();const n=t.values;if(n){const e=n._minzoom;if(e&&e>=o)continue;const t=n._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,n){const r=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,n),r.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,n),r.push(a))}return r}_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 n of Object.keys(e)){const r=e[n],s={};for(;r.next();)switch(r.tag()){case 3:{const e=r.getMessage(),t=new k(e);e.release(),s[t.name]=t;break}default:r.skip()}t[n]=s}return t}_createBucket(e){switch(e.type){case 0:return null;case 1:return this._createFillBucket(e);case 2:return this._createLineBucket(e);case 4:return this._createCircleBucket(e);case 3:return this._createSymbolBucket(e)}}_createFillBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.fillMaterial.getStride()),new M,new A(e.outlineMaterial.getStride()),new M)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new P(e.lineMaterial.getStride()),new M)}_createCircleBucket(e){return new S(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.circleMaterial.getStride()),new M)}_createSymbolBucket(e){const t=this._tile;return new W(t.tileKey,e,this._level,new D(e.iconMaterial.getStride()),new M,new D(e.textMaterial.getStride()),new M,t.placementEngine,t.getWorkerTileHandler())}}class K{constructor(e,t,n,r){this.status=0,this.placementEngine=new m,this.tileKey=e,this.refKeys=t,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(e,t){const n=t?.signal;if(null!=n){const e=()=>{n.removeEventListener("abort",e),this.status=4};n.addEventListener("abort",e)}let s;const i={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,r.zf)(e))throw e;return{result:i,transferList:[]}}this.status=2;const a=i.bucketsWithData,o=[];for(const e of s)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)),i.emptyBuckets=h,{result:i,transferList:l}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const n=e.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new Z(n,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var H=n(45013);class J{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:n}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const n=e.sourceName2DataAndRefKey[t];s[t]=n.refKey}const i=new K(n,s,this,this._styleRepository);try{return await i.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(i.setObsolete(),i.release(),!(0,r.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const n of e){const e=n.type,r=n.data;switch(e){case 0:t.setPaintProperties(r.layer,r.paint);break;case 1:t.setLayoutProperties(r.layer,r.layout);break;case 3:t.deleteStyleLayer(r.layer);break;case 2:t.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:n}=e;this._styleRepository=new H.A(t),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,n){const r=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&r.push(t);return 0===r.length?Promise.resolve():t.invoke("getSprites",r,{signal:n?.signal}).then(e=>{for(const t in e){const n=e[t];s[t]=n}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,n,r,s){const i=[];let a=this._glyphInfo[t];return a?n.forEach(e=>{a[e]||i.push(e)}):(a=this._glyphInfo[t]=[],n.forEach(e=>i.push(e))),0===i.length?Promise.resolve():r.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then(e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])})}getGlyphItems(e){return this._glyphInfo[e]}}},83349:(e,t,n)=>{function r(e,t,n){n=n||2;var r,i,o,l,h,c,f,d=t&&t.length,x=d?t[0]*n:e.length,p=s(e,0,x,n,!0),y=[];if(!p||p.next===p.prev)return y;if(d&&(p=u(e,t,p,n)),e.length>80*n){r=o=e[0],i=l=e[1];for(var g=n;g<x;g+=n)(h=e[g])<r&&(r=h),(c=e[g+1])<i&&(i=c),h>o&&(o=h),c>l&&(l=c);f=0!==(f=Math.max(o-r,l-i))?1/f:0}return a(p,y,n,r,i,f),y}function s(e,t,n,r,s){var i,a;if(s===L(e,t,n,r)>0)for(i=t;i<n;i+=r)a=A(i,e[i],e[i+1],a);else for(i=n-r;i>=t;i-=r)a=A(i,e[i],e[i+1],a);if(a&&w(a,a.next)){var o=a.next;D(a),a=o}return a}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!w(r,r.next)&&0!==I(r.prev,r,r.next))r=r.next;else{var s=r.prev;if(D(r),(r=t=s)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,s,u,f){if(e){!f&&u&&y(e,r,s,u);for(var d,x,p=e;e.prev!==e.next;)if(d=e.prev,x=e.next,u?l(e,r,s,u):o(e))t.push(d.i/n),t.push(e.i/n),t.push(x.i/n),D(e),e=x.next,p=x.next;else if((e=x)===p){f?1===f?a(e=h(i(e),t,n),t,n,r,s,u,2):2===f&&c(e,t,n,r,s,u):a(i(e),t,n,r,s,u,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(I(t,n,r)>=0)return!1;for(var s=e.next.next;s!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,s.x,s.y)&&I(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function l(e,t,n,r){var s=e.prev,i=e,a=e.next;if(I(s,i,a)>=0)return!1;for(var o=s.x<i.x?s.x<a.x?s.x:a.x:i.x<a.x?i.x:a.x,l=s.y<i.y?s.y<a.y?s.y:a.y:i.y<a.y?i.y:a.y,h=s.x>i.x?s.x>a.x?s.x:a.x:i.x>a.x?i.x:a.x,c=s.y>i.y?s.y>a.y?s.y:a.y:i.y>a.y?i.y:a.y,u=g(o,l,t,n,r),f=g(h,c,t,n,r),d=e.prevZ,x=e.nextZ;d&&d.z>=u&&x&&x.z<=f;){if(d!==e.prev&&d!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,x!==e.prev&&x!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,x.x,x.y)&&I(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;x&&x.z<=f;){if(x!==e.prev&&x!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,x.x,x.y)&&I(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function h(e,t,n){var r=e;do{var s=r.prev,a=r.next.next;!w(s,a)&&v(s,r,r.next,a)&&P(s,a)&&P(a,s)&&(t.push(s.i/n),t.push(r.i/n),t.push(a.i/n),D(r),D(r.next),r=e=a),r=r.next}while(r!==e);return i(r)}function c(e,t,n,r,s,o){var l=e;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&b(l,h)){var c=V(l,h);return l=i(l,l.next),c=i(c,c.next),a(l,t,n,r,s,o),void a(c,t,n,r,s,o)}h=h.next}l=l.next}while(l!==e)}function u(e,t,n,r){var a,o,l,h=[];for(a=0,o=t.length;a<o;a++)(l=s(e,t[a]*r,a<o-1?t[a+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),h.push(_(l));for(h.sort(f),a=0;a<h.length;a++)n=i(n=x(h[a],n),n.next);return n}function f(e,t){return e.x-t.x}function d(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function x(e,t){var n=function(e,t){var n,r=t,s=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=s&&o>a){if(a=o,o===s){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(s===a)return n;var l,h=n,c=n.x,u=n.y,f=1/0;r=n;do{s>=r.x&&r.x>=c&&s!==r.x&&m(i<u?s:a,i,c,u,i<u?a:s,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(s-r.x),P(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&p(n,r)))&&(n=r,f=l)),r=r.next}while(r!==h);return n}(e,t);if(!n)return t;var r=V(n,e),s=i(n,n.next);let a=d(r);return i(a,a.next),s=d(s),d(t===n?s:t)}function p(e,t){return I(e.prev,e,t.prev)<0&&I(t.next,e,e.next)<0}function y(e,t,n,r){var s=e;do{null===s.z&&(s.z=g(s.x,s.y,t,n,r)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==e);s.prevZ.nextZ=null,s.prevZ=null,function(e){var t,n,r,s,i,a,o,l,h=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,o=0,t=0;t<h&&(o++,r=r.nextZ);t++);for(l=h;o>0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(s=n,n=n.nextZ,o--):(s=r,r=r.nextZ,l--),i?i.nextZ=s:e=s,s.prevZ=i,i=s;n=r}i.nextZ=null,h*=2}while(a>1)}(s)}function g(e,t,n,r,s){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*s)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function _(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,s,i,a,o){return(s-a)*(t-o)-(e-a)*(i-o)>=0&&(e-a)*(r-o)-(n-a)*(t-o)>=0&&(n-a)*(i-o)-(s-a)*(r-o)>=0}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&v(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(P(e,t)&&P(t,e)&&function(e,t){var n=e,r=!1,s=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&s<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(I(e.prev,e,t.prev)||I(e,t.prev,t))||w(e,t)&&I(e.prev,e,e.next)>0&&I(t.prev,t,t.next)>0)}function I(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function w(e,t){return e.x===t.x&&e.y===t.y}function v(e,t,n,r){var s=k(I(e,t,n)),i=k(I(e,t,r)),a=k(I(n,r,e)),o=k(I(n,r,t));return s!==i&&a!==o||!(0!==s||!M(e,n,t))||!(0!==i||!M(e,r,t))||!(0!==a||!M(n,e,r))||!(0!==o||!M(n,t,r))}function M(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k(e){return e>0?1:e<0?-1:0}function P(e,t){return I(e.prev,e,e.next)<0?I(e,t,e.next)>=0&&I(e,e.prev,t)>=0:I(e,t,e.prev)<0||I(e,e.next,t)<0}function V(e,t){var n=new B(e.i,e.x,e.y),r=new B(t.i,t.x,t.y),s=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=s,s.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function A(e,t,n,r){var s=new B(e,t,n);return r?(s.next=r.next,s.prev=r,r.next.prev=s,r.next=s):(s.prev=s,s.next=s),s}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(e,t,n,r){for(var s=0,i=t,a=n-r;i<n;i+=r)s+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return s}n.d(t,{e:()=>r}),r.deviation=function(e,t,n,r){var s=t&&t.length,i=s?t[0]*n:e.length,a=Math.abs(L(e,0,i,n));if(s)for(var o=0,l=t.length;o<l;o++){var h=t[o]*n,c=o<l-1?t[o+1]*n:e.length;a-=Math.abs(L(e,h,c,n))}var u=0;for(o=0;o<r.length;o+=3){var f=r[o]*n,d=r[o+1]*n,x=r[o+2]*n;u+=Math.abs((e[f]-e[x])*(e[d+1]-e[f+1])-(e[f]-e[d])*(e[x+1]-e[f+1]))}return 0===a&&0===u?0:Math.abs((u-a)/a)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,s=0;s<e.length;s++){for(var i=0;i<e[s].length;i++)for(var a=0;a<t;a++)n.vertices.push(e[s][i][a]);s>0&&(r+=e[s-1].length,n.holes.push(r))}return n}},87317:(e,t,n)=>{n.d(t,{a:()=>m,b:()=>x,c:()=>c,d:()=>s,e:()=>b,f:()=>f,g:()=>y,h:()=>a,i:()=>d,l:()=>g,n:()=>p,s:()=>i,t:()=>_});var r=n(34304);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function o(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function c(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function u(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(n*n+r*r+s*s+i*i)}function f(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return n*n+r*r+s*s+i*i}function d(e){const t=e[0],n=e[1],r=e[2],s=e[3];return Math.sqrt(t*t+n*n+r*r+s*s)}function x(e){const t=e[0],n=e[1],r=e[2],s=e[3];return t*t+n*n+r*r+s*s}function p(e,t){const n=t[0],r=t[1],s=t[2],i=t[3];let a=n*n+r*r+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=s*a,e[3]=i*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function g(e,t,n,r){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e[3]=o+r*(n[3]-o),e}function _(e,t,n){const r=t[0],s=t[1],i=t[2],a=t[3];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12]*a,e[1]=n[1]*r+n[5]*s+n[9]*i+n[13]*a,e[2]=n[2]*r+n[6]*s+n[10]*i+n[14]*a,e[3]=n[3]*r+n[7]*s+n[11]*i+n[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 b(e,t){const n=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,r.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-h)<=u*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const I=o,w=l,v=h,M=u,k=f,P=d,V=x;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:s,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:M,distance:u,div:v,divide:h,dot:y,equals:b,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:P,length:d,lerp:g,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e},mul:w,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 n=r.Ov;let s,i,a,o,l,h;do{s=2*n()-1,i=2*n()-1,l=s*s+i*i}while(l>=1);do{a=2*n()-1,o=2*n()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*s,e[1]=t*i,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,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},set:i,sqrDist:k,sqrLen:V,squaredDistance:f,squaredLength:x,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:I,subtract:o,transformMat4:_,transformQuat:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2],h=n[3],c=h*r+o*i-l*s,u=h*s+l*r-a*i,f=h*i+a*s-o*r,d=-a*r-o*s-l*i;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,n)=>{function r(){return[0,0,0,0]}function s(e){return[e[0],e[1],e[2],e[3]]}function i(e,t,n,r){return[e,t,n,r]}function a(e,t,n,r){return[e,t,n,r]}function o(e,t=[0,0,0,0]){const n=Math.min(4,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function l(){return i(1,1,1,1)}function h(){return i(1,0,0,0)}function c(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}n.d(t,{CN:()=>a,Un:()=>x,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>d,vt:()=>r});const d=[0,0,0,0],x=l(),p=h(),y=c(),g=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:x,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:g,ZEROS:d,clone:s,create:r,freeze:a,fromArray:o,fromValues:i,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},95108:(e,t,n)=>{n.d(t,{$3:()=>h,Ng:()=>a,R3:()=>s,Yl:()=>l,gR:()=>i,m3:()=>u,t9:()=>o});var r=n(4576);function s(e,t){const n=t[0]-e[0],r=t[1]-e[1];if(e.length>2&&t.length>2){const s=e[2]-t[2];return Math.sqrt(n*n+r*r+s*s)}return Math.sqrt(n*n+r*r)}function i(e,t,n,r){const[s,i]=t,[a,o]=n,[l,h]=r,c=l-a,u=h-o,f=c*c+u*u,d=(s-a)*c+(i-o)*u,x=Math.min(1,Math.max(0,d/f));return e[0]=a+c*x,e[1]=o+u*x,e}function a(e,t,n,r,s,i){let a=n,o=r,l=s-a,h=i-o;if(0!==l||0!==h){const n=((e-a)*l+(t-o)*h)/(l*l+h*h);n>1?(a=s,o=i):n>0&&(a+=l*n,o+=h*n)}return l=e-a,h=t-o,l*l+h*h}function o(e,t){return function(e,t,n){const r=e[0]+n*(t[0]-e[0]),s=e[1]+n*(t[1]-e[1]);return e.length>2&&t.length>2?[r,s,e[2]+n*(t[2]-e[2])]:[r,s]}(e,t,.5)}function l(e){const t=e.length;let n=0;for(let r=0;r<t-1;++r)n+=s(e[r],e[r+1]);return n}function h(e,t=0,n=1){let r=0;const s=e.length;let i=e[0];for(let a=1;a<s;a++){const s=e[a];r+=(s[t]-i[t])*(s[n]+i[n]),i=s}if(c(e)){const s=e[0];r+=(s[t]-i[t])*(s[n]+i[n])}return r>=0}function c(e){const t=e.length;return t>0&&!(0,r.aI)(e[0],e[t-1])}function u(e){if("rings"in e)for(const t of e.rings)c(t)&&t.push(t[0].slice())}n(21325)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5294],{31635:(e,t,n)=>{function r(e,t,n,r){var s,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(s=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");s&&(r=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>a,mS:()=>s}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function a(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function s(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(s);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(s,function(e){return t(e),s()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},34304:(e,t,n)=>{n.d(t,{DF:()=>l,FD:()=>s,Ov:()=>i,ct:()=>h});let r=1e-6;function s(){return r}const i=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:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:s,setEpsilon:function(e){r=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,n)=>{n.d(t,{Eq:()=>d,G1:()=>p,TS:()=>i,Tf:()=>_,V6:()=>s,Vm:()=>x,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c,xV:()=>b});const r={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 s(e){return!!r[e]||!!r[e.toLowerCase()]}function i(e){return r[e]??r[e.toLowerCase()]}function a(e){return[...i(e)]}function o(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,r=1){const s=(e%360+360)%360/360,i=n<=.5?n*(t+1):n+t-n*t,a=2*n-i;return[Math.round(255*o(a,i,s+1/3)),Math.round(255*o(a,i,s)),Math.round(255*o(a,i,s-1/3)),r]}function h(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,s=t?1:17,i=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 i&&(l=a&r,a>>=n,o[3]=s*l/255),l=a&r,a>>=n,o[2]=s*l,l=a&r,a>>=n,o[1]=s*l,l=a&r,a>>=n,o[0]=s*l,o}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),s=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(s+16*s)/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*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function 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=s(e)?i(e):null;return t??=u(e),t??=c(e),t}function x(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return g(e,0,1)}function y(e){return Math.round(g(e,0,255))}function g(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const _=2.2,m=1/_;function b(e){return e**m}},51624:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(44208),s=n(69397),i=n(93687);const a=4294967296,o=new TextDecoder("utf-8"),l=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class h{constructor(e,t,n=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,n,r)}_init(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}get usedMemory(){return 64+(0,s.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(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,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),n}getSFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),n}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,n=this._toString(this._data,t,t+e);return this._skip(e),n}getBytes(){const e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,n,r){const s=this.getMessage(),i=e(s,t,n,r);return s.release(),i}processMessage(e){const t=this.getMessage(),n=e(t);return t.release(),n}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}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!")}}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,n=0,r=0;if(this._end-t>=10)do{if(r=e[t++],n|=127&r,!(128&r))break;if(r=e[t++],n|=(127&r)<<7,!(128&r))break;if(r=e[t++],n|=(127&r)<<14,!(128&r))break;if(r=e[t++],n|=(127&r)<<21,!(128&r))break;if(r=e[t++],n+=268435456*(127&r),!(128&r))break;if(r=e[t++],n+=34359738368*(127&r),!(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),!(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),!(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),!(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],128&r);)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,n}_decodeSVarint(){const e=this._data;let t,n=0,r=0;const s=1&e[this._pos];if(r=e[this._pos++],n|=127&r,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<7,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<14,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<21,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=268435456*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=34359738368*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=4398046511104*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(t=BigInt(n),r=e[this._pos++],t+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/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(e,t,n){if((n=Math.min(this._end,n))-t>l){const r=e.subarray(t,n);return o.decode(r)}let r="",s="";for(let i=t;i<n;++i){const t=e[i];128&t?s+="%"+t.toString(16):(r+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(r+=decodeURIComponent(s)),r}_toBytes(e,t,n){return n=Math.min(this._end,n),new Uint8Array(e.buffer,t,n-t)}static{this.pool=new i.A(()=>new h(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},69286:(e,t,n)=>{n.r(t),n.d(t,{default:()=>J});var r=n(74887),s=n(6774),i=n(5408),a=n(13195);function o(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 l(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 h(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 c(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);const f=24;class d{constructor(e,t,n,r,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,n){const r=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const s=n&&o(e);let i;for(const t of this._glyphItems)if(i=t[e],i)break;u.push({codePoint:e,x:f,y:d,vertical:s,glyphMosaicItem:i}),i&&(f+=i.metrics.advance+r)}let x=f;a>0&&(x=f/Math.max(1,Math.ceil(f/a)));const p=e.includes(""),y=[],g=u.length;for(let e=0;e<g-1;e++){const t=u[e].codePoint,n=l(t);if(h(t)||n){let r=0;if(10===t)r-=1e4;else if(n&&p)r+=150;else{40!==t&&65288!==t||(r+=50);const n=u[e+1].codePoint;41!==n&&65289!==n||(r+=50)}y.push(this._buildBreak(e+1,u[e].x,x,y,r,!1))}}const _=this._optimalBreaks(this._buildBreak(g,f,x,y,0,!0));let m=0;const b=t?-s:s;let I=0;for(let e=0;e<_.length;e++){const t=_[e];let n=I;for(;n<t&&c(u[n].codePoint);)u[n].glyphMosaicItem=null,++n;let r=t-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphMosaicItem=null,--r;if(n<=r){const e=u[n].x;for(let t=n;t<=r;t++)u[t].x-=e,u[t].y=d;let t=u[r].x;u[r].glyphMosaicItem&&(t+=u[r].glyphMosaicItem.metrics.advance),m=Math.max(t,m),i&&this._applyJustification(u,n,r)}I=t,d+=b}if(u.length>0){const e=_.length-1,n=(i-this._hAnchor)*m;let r=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(r+=e*s);for(const e of u)e.x+=n,e.y+=r}return u.filter(e=>e.glyphMosaicItem)}static getTextBox(e,t){if(!e.length)return null;let n=1/0,r=1/0,s=0,i=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;n=Math.min(n,o),s=Math.max(s,h),r=Math.min(r,l),i=Math.max(i,c)}return{x:n,y:r,width:s-n,height:i-r}}static getBox(e){if(!e.length)return null;let t=1/0,n=1/0,r=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,h=i.x,c=i.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),r=Math.max(r,u),n=Math.min(n,c),s=Math.max(s,f)}return{x:t,y:n,width:r-t,height:s-n}}static addDecoration(e,t){const n=e.length;if(0===n)return;let r=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<n;i++){const n=e[i];if(n.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:a-r,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=n.y,r=n.x+n.glyphMosaicItem.metrics.left}}const i=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:i-r,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,n,r){const s=(e-t)*(e-t);return r?e<t?s/2:2*s:s+Math.abs(n)*n}_buildBreak(e,t,n,r,s,i){let a=null,o=this._breakScore(t,n,s,i);for(const e of r){const r=t-e.x,l=this._breakScore(r,n,s,i)+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,n){const r=e[n],s=r.vertical?f:r.glyphMosaicItem?r.glyphMosaicItem.metrics.advance:0,i=(r.x+s)*this._justify;for(let r=t;r<=n;r++)e[r].x-=i}}const x=.5;class p{constructor(e,t,n=0,r=-1,s=x){this.x=e,this.y=t,this.angle=n,this.segment=r,this.minzoom=s}}class y{constructor(e,t,n,r,s,i=x,o=a.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class g{constructor(e,t,n,r,s,i,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=n,this.br=r,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class _{constructor(e){this.shapes=e}}class m{getIconPlacement(e,t,n){const r=new s.bR(e.x,e.y),i=0===n.rotationAlignment,o=n.keepUpright;let l=n.rotate*a.os;i&&(l+=e.angle);const h=new _([]);return n.allowOverlap&&n.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,r,t,n,l),i&&o&&this._addIconPlacement(h,r,t,n,l+a.Jo),h}_addIconPlacement(e,t,n,r,i){const o=n.rasterizationScale,l=n.width/o,h=n.height/o,c=r.offset;let u=c[0],f=c[1];switch(r.anchor){case 0:u-=l/2,f-=h/2;break;case 1:f-=h/2;break;case 2:u-=l,f-=h/2;break;case 3:u-=l/2;break;case 4:u-=l/2,f-=h;break;case 5:break;case 7:f-=h;break;case 6:u-=l;break;case 8:u-=l,f-=h}const d=n.rect,p=2/o,y=u-p,_=f-p,m=y+d.width/o,b=_+d.height/o,I=new s.bR(y,_),w=new s.bR(m,b),v=new s.bR(y,b),M=new s.bR(m,_);if(0!==i){const e=Math.cos(i),t=Math.sin(i);I.rotate(e,t),w.rotate(e,t),v.rotate(e,t),M.rotate(e,t)}const k=new g(I,M,v,w,d,i,0,256,t,x,a.MG,0);if(e.shapes.push(k),!r.allowOverlap||!r.ignorePlacement){const n=r.size,s=r.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*n-s,dyPixels:f*n-s,hard:!r.optional,partIndex:0,width:l*n+2*s,height:h*n+2*s,angle:i,minLod:x,maxLod:a.MG};e.iconColliders.push(o)}}getTextPlacement(e,t,n,r){const o=new s.bR(e.x,e.y),l=r.rotate*a.os,h=0===r.rotationAlignment,c=r.keepUpright,u=r.padding;let p=x;const m=h?e.angle:0,b=e.segment>=0&&h,I=r.allowOverlap&&r.ignorePlacement?null:[],w=[],v=!b;let M=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,P=M,V=k;const A=(b||h)&&c,D=r.size/f;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let L,S=0,T=0;if(!b&&B){const e=d.getTextBox(t,r.lineHeight*f);switch(r.anchor){case 1:S=e.height/2,T=-e.width/2;break;case 2:S=-e.height/2,T=e.width/2;break;case 3:S=e.height/2,T=e.width/2;break;case 4:S=-e.height/2,T=-e.width/2;break;case 5:S=e.height;break;case 7:T=-e.width;break;case 6:T=e.width;break;case 8:S=-e.height}}S+=r.offset[0]*f,T+=r.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,_=t.metrics,R=t.page;if(I&&v){if(void 0!==L&&L!==f.y){let t,n,s,i;B?(t=-V+S,n=M+T,s=V-P,i=k-M):(t=M+S,n=P+T,s=k-M,i=V-P);const o={xTile:e.x,yTile:e.y,dxPixels:t*D-u,dyPixels:n*D-u,hard:!r.optional,partIndex:1,width:s*D+2*u,height:i*D+2*u,angle:l,minLod:x,maxLod:a.MG};I.push(o),M=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,P=M,V=k}L=f.y}const C=[];if(b){const r=.5*t.metrics.width,s=(f.x+_.left-4+r)*D*i.ih;if(p=this._placeGlyph(e,p,s,n,e.segment,1,f.vertical,R,C),c&&(p=this._placeGlyph(e,p,s,n,e.segment,-1,f.vertical,R,C)),p>=2)break}else C.push(new y(o,m,m,R,!1)),h&&c&&C.push(new y(o,m+a.Jo,m+a.Jo,R,!1));const z=f.x+_.left,U=f.y-17-_.top,F=z+_.width,E=U+_.height;let N,O,G,q,j,W,Z,K;if(!b&&B)if(f.vertical){const e=(z+F)/2-_.height/2,t=(U+E)/2+_.width/2;N=new s.bR(-t-4+S,e-4+T),O=new s.bR(N.x+d.width,N.y+d.height),G=new s.bR(N.x,O.y),q=new s.bR(O.x,N.y)}else N=new s.bR(4-U+S,z-4+T),O=new s.bR(N.x-d.height,N.y+d.width),G=new s.bR(O.x,N.y),q=new s.bR(N.x,O.y);else N=new s.bR(z-4+S,U-4+T),O=new s.bR(N.x+d.width,N.y+d.height),G=new s.bR(N.x,O.y),q=new s.bR(O.x,N.y);for(const t of C){let n,i,a,o;if(t.alternateVerticalGlyph){if(!j){const e=(U+E)/2+T;j=new s.bR((z+F)/2+S-_.height/2-4,e+_.width/2+4),W=new s.bR(j.x+d.height,j.y-d.width),Z=new s.bR(W.x,j.y),K=new s.bR(j.x,W.y)}n=j,i=Z,a=K,o=W}else n=N,i=G,a=q,o=O;const h=U,c=E,x=t.glyphAngle+l;if(0!==x){const e=Math.cos(x),t=Math.sin(x);n=n.clone(),i=i?.clone(),a=a?.clone(),o=o?.clone(),n.rotate(e,t),o?.rotate(e,t),i?.rotate(e,t),a?.rotate(e,t)}let p=0,y=256;if(b&&B?f.vertical?t.alternateVerticalGlyph?(p=32,y=96):(p=224,y=32):(p=224,y=96):(p=192,y=64),w.push(new g(n,a,i,o,d,t.labelAngle,p,y,t.anchor,t.minzoom,t.maxzoom,t.page)),I&&(!A||this._legible(t.labelAngle)))if(v)z<M&&(M=z),h<P&&(P=h),F>k&&(k=F),c>V&&(V=c);else if(t.minzoom<2){const n={xTile:e.x,yTile:e.y,dxPixels:(z+S)*D-u,dyPixels:(h+S)*D-u,hard:!r.optional,partIndex:1,width:(F-z)*D+2*u,height:(c-h)*D+2*u,angle:x,minLod:t.minzoom,maxLod:t.maxzoom};I.push(n)}}}if(p>=2)return null;if(I&&v){let t,n,s,i;B?(t=-V+S,n=M+T,s=V-P,i=k-M):(t=M+S,n=P+T,s=k-M,i=V-P);const o={xTile:e.x,yTile:e.y,dxPixels:t*D-u,dyPixels:n*D-u,hard:!r.optional,partIndex:1,width:s*D+2*u,height:i*D+2*u,angle:l,minLod:x,maxLod:a.MG};I.push(o)}const R=new _(w);return I&&I.length>0&&(R.textColliders=I),R}_legible(e){const t=(0,a.z0)(e);return t<65||t>=193}_placeGlyph(e,t,n,r,i,o,l,h,c){let u=o;const f=u<0?(0,a.Wh)(e.angle+a.Jo,a.pJ):e.angle;let d=0;n<0&&(u*=-1,n*=-1,d=a.Jo),u>0&&++i;let x=new s.bR(e.x,e.y),p=r[i],g=a.MG;if(r.length<=i)return g;for(;;){const e=p.x-x.x,s=p.y-x.y,o=Math.sqrt(e*e+s*s),_=Math.max(n/o,t),m=e/o,b=s/o,I=(0,a.Wh)(Math.atan2(b,m)+d,a.pJ);if(c.push(new y(x,f,I,h,!1,_,g)),l&&c.push(new y(x,f,I,h,!0,_,g)),_<=t)return _;x=p.clone();do{if(i+=u,r.length<=i||i<0)return _;p=r[i]}while(x.isEqual(p));let w=p.x-x.x,v=p.y-x.y;const M=Math.sqrt(w*w+v*v);w*=o/M,v*=o/M,x.x-=w,x.y-=v,g=_}}}var b=n(51624),I=n(15585);class w{constructor(e,t,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=t.keys,s=t.values,i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:this.id=i.getUInt64();break;case 2:{const e=i.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const n=e.getUInt32(),i=e.getUInt32();t[r[n]]=s[i]}e.release();break}case 3:this.type=i.getUInt32();break;case 4:this._pbfGeometry=i.getMessage();break;default:i.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,e?e.reset(this.type):n=[];let i,a=1,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 1:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):n&&(r&&n.push(r),r=[],r.push(new s.bR(l,h)));break;case 2:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):r&&r.push(new s.bR(l,h));break;case 7:e?e.close():r&&!r[0].equals(l,h)&&r.push(r[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?i=e.result():n&&(r&&n.push(r),i=n),t.release(),this._geometry=i,i}}var v=n(80081);class M extends v.A{constructor(){super(12)}add(e,t,n){const r=this.array;r.push(e),r.push(t),r.push(n)}}v.A;class k{constructor(e){this.extent=i.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(k._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 P extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,a,o,l,h,c,u){const f=this.array;let d=v.A.i1616to32(e,t);f.push(d);const x=31;d=v.A.i8888to32(Math.round(x*n),Math.round(x*r),Math.round(x*s),Math.round(x*i)),f.push(d),d=v.A.i8888to32(Math.round(x*a),Math.round(x*o),Math.round(x*l),Math.round(x*h)),f.push(d),d=v.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class V extends v.A{constructor(e){super(e)}add(e,t,n){const r=this.array;r.push(v.A.i1616to32(e,t)),n&&r.push(...n)}}class A extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,a){const o=this.array,l=this.index;let h=v.A.i1616to32(e,t);return o.push(h),h=v.A.i8888to32(Math.round(15*n),Math.round(15*r),s,i),o.push(h),a&&o.push(...a),l}}class D extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,o,l,h,c,u,f){const d=this.array;let x=v.A.i1616to32(e,t);d.push(x),x=v.A.i1616to32(Math.round(8*n),Math.round(8*r)),d.push(x),x=v.A.i8888to32(s/4,i/4,l,h),d.push(x),x=v.A.i8888to32(0,(0,a.z0)(o),10*c,Math.min(10*u,255)),d.push(x),f&&d.push(...f)}}class B extends v.A{constructor(e){super(e)}add(e,t,n,r,s){const i=this.array,a=v.A.i1616to32(2*e+n,2*t+r);i.push(a),s&&i.push(...s)}}class L{constructor(e,t,n){this.layerExtent=i.vA,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=n,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,n){}}class S extends L{constructor(e,t,n,r,s){super(e,t,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=s}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=r.circleMaterial.encodeAttributes(i,s,r);for(const e of a)if(e)for(const r of e){const e=t.index;t.add(r.x,r.y,0,0,o),t.add(r.x,r.y,0,1,o),t.add(r.x,r.y,1,0,o),t.add(r.x,r.y,1,1,o),n.add(e,e+1,e+2),n.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),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._circleIndexStart,t[r++]=this._circleIndexCount,t[r++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)n[r++]=this._circleVertexBuffer.array[e];t[r++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[r++]=this._circleIndexBuffer.array[e];return t.buffer}}var T=n(98291),R=n(83349);class C extends L{constructor(e,t,n,r,s,i,a){super(e,t,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=s,this._outlineVertexBuffer=i,this._outlineIndexBuffer=a}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!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,n=this.zoom,{fillMaterial:r,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",n);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",n),r=t.getPaintValue("fill-opacity",n+1);e<1&&r<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",n),r=t.getPaintValue("fill-color",n+1);e[3]<1&&r[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of c){const c=o.getValue(n,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=r.encodeAttributes(l,n,t,f),x=h&&a?s.encodeAttributes(l,n,t):[],p=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:x,page:f.page,geometry:p}),i.sort((e,t)=>e.page-t.page);for(const{ddFillAttributes:e,ddOutlineAttributes:n,page:r,geometry:s}of i)this._processFeature(s,h,t.outlineUsesFillColor,e,n,u,r)}}else for(const o of c){const l=i?r.encodeAttributes(o,n,t):null,c=h&&a?s.encodeAttributes(o,n,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),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._fillIndexStart,t[r++]=this._fillIndexCount,t[r++]=this._outlineIndexStart,t[r++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)n[r++]=this._fillVertexBuffer.array[e];t[r++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[r++]=this._fillIndexBuffer.array[e];t[r++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)n[r++]=this._outlineVertexBuffer.array[e];t[r++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[r++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n,r,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!n||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let h;for(let t=0;t<o;t++){const n=C._area(e[t]);n>32?(void 0!==h&&this._processFill(e,h,r,i,a),h=[t]):n<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,r,i,a)}_processOutline(e,t){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let a,o,l;const h=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let f=-1,d=-1,x=-1,p=-1,y=-1,g=!1,_=e.length;if(_<2)return;const m=e[0];let b=e[_-1];for(;_&&b.isEqual(m);)--_,b=e[_-1];if(!(_-0<2)){for(let s=0;s<_;++s){0===s?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=s!==_-1?e[s+1]:e[0],h.assign(c));const i=this._isClipEdge(a,o);-1===p&&(g=i),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 b=-u.x*-h.x+-u.y*-h.y;let I=Math.abs(0!==b?1/b:1);I>8&&(I=8),m>=0?(x=n.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=x),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,I*-u.x,I*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=d,d=x,x=n.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x)):(x=n.add(o.x,o.y,I*u.x,I*u.y,0,1,t),-1===p&&(p=x),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=d,d=x,x=n.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=n.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x))}f>=0&&d>=0&&p>=0&&!g&&r.add(f,d,p),f>=0&&p>=0&&y>=0&&!g&&r.add(f,y,p),this._outlineIndexCount+=3*(r.index-i)}}_processFill(e,t,n,r,s){let i;t.length>1&&(i=[]);let a=0;for(const n of t)0!==a&&i.push(a),a+=e[n].length;const o=2*a,l=T.A.acquire();for(const n of t){const t=e[n],r=t.length;for(let e=0;e<r;++e)l.push(t[e].x,t[e].y)}const h=(0,R.e)(l,i,2);if(R.e.deviation(l,i,2,h)>0){const r=t.map(t=>e[t].length),{buffer:i,vertexCount:a}=(0,I.l)(l,r);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],n);for(let t=0;t<a;t+=3){const n=e+t;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let r=0;for(;r<o;)this._fillVertexBuffer.add(l[r++],l[r++],n);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+h[i++],t+h[i++],t+h[i++]);if(void 0!==s){const t=this._patternMap,n=t.get(s);n?n[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}T.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 n=e.length-1;for(let r=0;r<n;r++)t+=(e[r].x-e[r+1].x)*(e[r].y+e[r+1].y);return t+=(e[n].x-e[0].x)*(e[n].y+e[0].y),.5*t}}var z=n(83773);class U extends L{constructor(e,t,n,r,s){super(e,t,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=s,this._lineTessellator=new z.i(F(this.tessellationProperties),E(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("line-pattern"),a=r.getPaintProperty("line-dasharray"),o=r.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(s)||0,h=o?.isDataDriven,c=i?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?i.getValue(s,e):this._getDashArrayKey(e,s,r,a,h,o,l));else if(i)t(i.getValue(s));else if(a){const e=a.getValue(s);t(r.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,n=this.zoom,r=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,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",n),x=d||0,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,g=y?null:t.getLayoutValue("line-join",n);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",n);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,I=b?null:t.getLayoutValue("line-round-limit",n);u=t.getPaintProperty("line-width");const w=u?.isDataDriven?u:null,v=w?null:t.getPaintValue("line-width",n);u=t.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,k=M?null:t.getPaintValue("line-offset",n);if(h||c){const i=[];for(const s of r){const r=h?o.getValue(n,s):this._getDashArrayKey(s,n,t,l,p,f,x),c=this._spriteInfo[r];if(!c?.rect)continue;const u=a.encodeAttributes(s,n,t,c),P=s.getGeometry(e);i.push({ddAttributes:u,page:c.page,cap:f?f.getValue(n,s):d,join:y?y.getValue(n,s):g,miterLimit:_?_.getValue(n,s):m,roundLimit:b?b.getValue(n,s):I,halfWidth:.5*(w?w.getValue(n,s):v),offset:M?M.getValue(n,s):k,geometry:P})}i.sort((e,t)=>e.page-t.page),s.textured=!0;for(const{ddAttributes:e,page:t,cap:n,join:r,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of i)s.capType=n,s.joinType=r,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(n),t=this._spriteInfo[e];if(!t?.rect)return}s.textured=!(!o&&!l),s.capType=d,s.joinType=g,s.miterLimit=m,s.roundLimit=I,s.halfWidth=.5*v,s.offset=k;for(const o of r){const r=i?a.encodeAttributes(o,n,t):null;f&&(s.capType=f.getValue(n,o)),y&&(s.joinType=y.getValue(n,o)),_&&(s.miterLimit=_.getValue(n,o)),b&&(s.roundLimit=b.getValue(n,o)),w&&(s.halfWidth=.5*w.getValue(n,o)),M&&(s.offset=M.getValue(n,o));const l=o.getGeometry(e);this._processFeature(l,r)}}}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),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._lineIndexStart,t[r++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[e];t[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[r++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n){if(!e)return;const r=e.length;for(let s=0;s<r;s++)this._processGeometry(e[s],t,n)}_processGeometry(e,t,n){if(e.length<2)return;let r,s,i=e[0],a=1;for(;a<e.length;)r=e[a].x-i.x,s=e[a].y-i.y,r*r+s*s<1e-6?e.splice(a,1):(i=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!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=h:e.set(n,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,n,r,s,i,a){const o=s?i.getValue(t,e):a,l=r.getValue(t,e);return n.getDashKey(l,o)}}const F=e=>(t,n,r,s,i,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,n,o,l,r,s,i,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),E=e=>(t,n,r)=>{e._lineIndexBuffer.add(t,n,r)};var N=n(32488),O=n(97768),G=n(799),q=n(4264);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 W extends L{constructor(e,t,n,r,s,i,a,o,l){super(t,n,l.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=r,this._iconIndexBuffer=s,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,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(e,t,n){const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=r.getLayoutProperty("icon-image"),a=r.getLayoutProperty("text-field");let o=r.getLayoutProperty("text-transform"),l=r.getLayoutProperty("text-font");const h=[];let c,u,f,d;i&&!i.isDataDriven&&(c=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=r.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=r.getLayoutValue("text-font",s),l=null);for(const x of this._features){const p=x.getGeometry(e);if(!p||0===p.length)continue;let y,g;i&&(y=i.isDataDriven?i.getValue(s,x):this._replaceKeys(c,x.values),y&&t(y));let _=!1;if(a&&(g=a.isDataDriven?a.getValue(s,x):this._replaceKeys(u,x.values),g)){switch(g=g.replaceAll("\\n","\n"),o&&(f=o.getValue(s,x)),f){case 2:g=g.toLowerCase();break;case 1:g=g.toUpperCase()}if(W._bidiEngine.hasBidiChar(g)){let e;e="rtl"===W._bidiEngine.checkContextual(g)?"IDNNN":"ICNNN",g=W._bidiEngine.bidiTransform(g,e,"VLYSN"),_=!0}if(g.length>0){l&&(d=l.getValue(s,x));for(const e of d){let t=n[e];t||(t=n[e]=new Set);for(const e of g){const n=e.codePointAt(0);null!=n&&t.add(n)}}}}if(!y&&!g)continue;const m=r.getLayoutValue("symbol-sort-key",s,x),b={feature:x,sprite:y,label:g,rtl:_,geometry:p,hash:(g?(0,G.Wm)(g):0)^(y?(0,G.Wm)(y):0),priority:m,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,n=this.zoom,r=t.getLayoutValue("symbol-placement",n),s=0!==r,o=t.getLayoutValue("symbol-spacing",n)*i.ih,l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new q.aR(t,n,s):null,u=h?new q.uU(t,n,s):null,x=this._workerTileHandler;let y;l&&(y=x.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 g=[];let _=1;u?.size&&(_=u.size/f);const m=u?u.maxAngle*a.os:0,b=u?u.size*i.ih:0;for(const e of this._symbolFeatures){let t,a;c&&y&&e.sprite&&(t=y[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(n,e.feature);let l=0;const h=e.label;if(h){(0,O.Lw)(u),u.update(n,e.feature);const t=s&&0===u.rotationAlignment?u.keepUpright:u.writingMode&&u.writingMode.includes(1);let r=.5;switch(u.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let o=.5;switch(u.anchor){case 5:case 3:case 6:o=0;break;case 7:case 4:case 8:o=1}let c=.5;switch(u.justify){case 0:c=r;break;case 1:c=0;break;case 3:c=1}const p=u.letterSpacing*f,y=s?0:u.maxWidth*f,g=u.lineHeight*f,m=e.textFont.map(e=>x.getGlyphItems(e));if(a=new d(m,y,g,p,r,o,c).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const n of a)e=Math.min(e,n.x),t=Math.max(t,n.x);l=(t-e+48)*_*i.ih}}for(let n of e.geometry){const h=[];if(1===r){if(a?.length&&u?.size){const e=u.size*i.ih*(2+Math.min(2,4*Math.abs(u.offset[1])));n=W._smoothVertices(n,e)}W._pushAnchors(h,n,o,l)}else 2===r?W._pushCenterAnchor(h,n):3===e.feature.type?W._pushCentroid(h,n):h.push(new p(n[0].x,n[0].y));for(const r of h){if(r.x<0||r.x>i.vA||r.y<0||r.y>i.vA)continue;if(s&&l>0&&0===u?.rotationAlignment&&!W._honorsTextMaxAngle(n,r,l,m,b))continue;const o={shaping:a,line:n,iconMosaicItem:t,anchor:r,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};g.push(o),this._processFeature(o,c,u)}}}g.sort(j),this._addPlacedGlyphs(),this._symbolInstances=g}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._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),n=new Int32Array(t.buffer),r=new Float32Array(t.buffer),[s,i,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(s),t[o++]=parseFloat(i),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[n,r]]of this.markerPageMap)t[o++]=e,t[o++]=n,t[o++]=r;t[o++]=this.glyphsPageMap.size;for(const[e,[n,r]]of this.glyphsPageMap)t[o++]=e,t[o++]=n,t[o++]=r;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=W.serializeSymbols(t,n,r,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)n[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++)n[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 n of e||[]){t+=5,t+=1;for(const e of n.textColliders)t+=10;for(const e of n.iconColliders)t+=10;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,r,s){s=s||[],t[r++]=s.length;for(const e of s){t[r++]=e.anchor.x,t[r++]=e.anchor.y,t[r++]=e.symbolFeature.hash,t[r++]=e.symbolFeature.priority,t[r++]=e.symbolFeature.feature.featureIndex,t[r++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;for(const s of e.iconColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;t[r++]=e.textVertexRanges.length;for(const[n,s]of e.textVertexRanges)t[r++]=n,t[r++]=s;t[r++]=e.iconVertexRanges.length;for(const[n,s]of e.iconVertexRanges)t[r++]=n,t[r++]=s}return r}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,(e,n)=>n in t?t[n]:"")}_processFeature(e,t,n){const{line:r,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,h=this.layer,c=!!s;let u=!0;c&&(u=t?.optional||!s);const f=i&&i.length>0,d=!f||n?.optional;let x,p;if(c&&(x=this._placementEngine.getIconPlacement(o,s,t)),(x||u)&&(f&&(p=this._placementEngine.getTextPlacement(o,i,r,n)),p||d)){if(x&&p||(d||u?d||p?u||x||(p=null):x=null:(x=null,p=null)),p){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,p.shapes,l,n.rotationAlignment,t),p.textColliders){e.textColliders=p.textColliders;for(const e of p.textColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,h=e.dxPixels*r+(e.dyPixels+e.height)*n,c=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,c),d=Math.max(s,a,l,c),x=Math.min(i,o,h,u),p=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=x,e.width=d-f,e.height=p-x}}}}if(x){const n=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,x.shapes,l,s.page,1===t.rotationAlignment,n),x.iconColliders){e.iconColliders=x.iconColliders;for(const e of x.iconColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,h=e.dxPixels*r+(e.dyPixels+e.height)*n,c=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,c),d=Math.max(s,a,l,c),x=Math.min(i,o,h,u),p=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=x,e.width=d-f,e.height=p-x}}}}}}_addPlacedIcons(e,t,n,r,s,i){const o=Math.max(n-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=s?0:Math.max(n+(0,a.p6)(u.minzoom),o),f=s?25:Math.min(n+(0,a.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,x=u.tr,p=u.bl,y=u.br,g=u.mosaicRect,_=u.labelAngle,m=u.minAngle,b=u.maxAngle,I=u.anchor,w=l.index,v=g.x,M=g.y,k=v+g.width,P=M+g.height,V=l.index;l.add(I.x,I.y,d.x,d.y,v,M,_,m,b,t,f,i),l.add(I.x,I.y,x.x,x.y,k,M,_,m,b,t,f,i),l.add(I.x,I.y,p.x,p.y,v,P,_,m,b,t,f,i),l.add(I.x,I.y,y.x,y.y,k,P,_,m,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===V?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([V,4]),h.add(w,w+1,w+2),h.add(w+1,w+2,w+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[r,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.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(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,r,s){const i=Math.max(n-1,0),o=1===r;let l,h,c,u,f,d,x,p,y,g,_;for(const r of t)l=o?0:Math.max(n+(0,a.p6)(r.minzoom),i),h=o?25:Math.min(n+(0,a.p6)(r.maxzoom),25),h<=l||(c=r.tl,u=r.tr,f=r.bl,d=r.br,x=r.labelAngle,p=r.minAngle,y=r.maxAngle,g=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[g.x,g.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:x,minAngle:p,maxAngle:y,minLod:l,maxLod:h,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,n,r){n+=r;let i=0;const o=t.length-1;for(let e=0;e<o;e++)i+=s.bR.distance(t[e],t[e+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 f=t.length-1;for(let r=0;r<f;r++){const s=t[r],i=t[r+1],o=i.x-s.x,l=i.y-s.y,f=Math.sqrt(o*o+l*l);let d;for(;u+n<c+f;){u+=n;const t=(u-c)/f,x=(0,a.GW)(s.x,i.x,t),y=(0,a.GW)(s.y,i.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new p(x,y,d,r,h))}c+=f}}static _pushCenterAnchor(e,t){let n=0;const r=t.length-1;for(let e=0;e<r;e++)n+=s.bR.distance(t[e],t[e+1]);const i=n/2;let o=0;const l=t.length-1;for(let n=0;n<l;n++){const r=t[n],s=t[n+1],l=s.x-r.x,h=s.y-r.y,c=Math.sqrt(l*l+h*h);if(i<o+c){const t=(i-o)/c,u=(0,a.GW)(r.x,s.x,t),f=(0,a.GW)(r.y,s.y,t),d=Math.atan2(h,l);return void e.push(new p(u,f,d,n,0))}o+=c}}static _deviation(e,t,n){const r=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,r)}static _honorsTextMaxAngle(e,t,n,r,i){let a=0;const o=n/2;let l=new s.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=s.bR.distance(e[h],l),l=e[h]}a+=s.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let n,o=h;do{if(++o,o===f)return!1;n=e[o]}while(n.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(n));const x=this._deviation(t,n,l);for(c.push({deviation:x,distToAnchor:a}),u+=x;a-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;a+=s.bR.distance(n,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const r=[];let i=0,a=0;r.push(0);for(let t=1;t<n;t++){const n=s.bR.distance(e[t],e[t-1]);n>0&&(i+=n,r.push(i),a++,a!==t&&(e[a]=e[t]))}if(n=a+1,n<3)return e;t=Math.min(t,.2*i);const o=e[0].x,l=e[0].y,h=e[n-1].x,c=e[n-1].y,u=s.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[n-1],e[n-2]),u.normalize(),e[n-1].x+=t*u.x,e[n-1].y+=t*u.y,r[0]-=t,r[n-1]+=t;const f=[];f.push(new s.bR(o,l));const d=1e-6,x=.5*t;for(let i=1;i<n-1;i++){let a=0,o=0,l=0;for(let n=i-1;n>=0;n--){const s=x+r[n+1]-r[i];if(s<0)break;const h=r[n+1]-r[n],c=r[i]-r[n]<x?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[n+1],g=e[n].x-y.x,_=e[n].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*g-h*y.x)-u*c*h*g/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}for(let s=i+1;s<n;s++){const n=x-r[s-1]+r[i];if(n<0)break;const h=r[s]-r[s-1],c=r[s]-r[i]<x?1:n/h;if(c<d)break;const u=c*c,f=c*n-.5*u*h,p=c*h/t,y=e[s-1],g=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*n+.5*u*(n*g-h*y.x)-u*c*h*g/3),o+=p/f*(y.y*c*n+.5*u*(n*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new s.bR(a/l,o/l))}return f.push(new s.bR(h,c)),e[0].x=o,e[0].y=l,e[n-1].x=h,e[n-1].y=c,f}static _pushCentroid(e,t){const n=i.vA,r=i.vA,s=t.length-1;let a=0,o=0,l=0,h=t[0].x,c=t[0].y;h>n&&(h=n),h<0&&(h=0),c>r&&(c=r),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,i=t[e].y,u=t[e+1].x,f=t[e+1].y;s>n&&(s=n),s<0&&(s=0),i>r&&(i=r),i<0&&(i=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(s-h)*(f-c)-(u-h)*(i-c);a+=d*(h+s+u),o+=d*(c+i+f),l+=d}a/=3*l,o/=3*l,isNaN(a)||isNaN(o)||e.push(new p(a,o))}}class Z{constructor(e,t,n,r,i,o){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=t,this._sourceDataMaxLOD=r,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.IU)(this._level);for(const t of Object.keys(e)){const n=e[t];if(this._pbfTiles[t]=new b.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[e]=n.refKey.split("/").map(parseFloat),r=l-e;if(r>0){const e=(1<<r)-1,n=h&e,i=c&e;this._tileClippers[t]=new s.O3(r,n,i,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new s.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,I.F)(),n=this._initialize(e),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of r)e.getResources(e.tileClipper,a,o);if(4===this._tile.status)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then(()=>this._processFeatures(n.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:n,layers:r,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=r.length-1;e>=0;e--){const u=r[e];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)||!t[u.source]||!s[u.source])continue;const f=t[u.source],d=s[u.source],x=u.sourceLayer,p=f[x];if(p){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=p.extent,e.tileClipper=d;let t=i[u.source];t||(t=i[u.source]={});let n=t[x];n||(n=t[x]=[]),n.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:n}=e;n.forEach((e,n)=>{t[e]&&t[e].layerUIDs.push(n)})}_filterFeatures(e){const{signal:t,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(i))i[e].forEach(t=>{l.push(t),h.push(e)});for(let e=0;e<l.length;e++){const i=h[e],c=l[e];if(!n[i]||!s[i])continue;const u=n[i][c],f=s[i][c];if(!f||0===f.length)continue;if((0,r.G4)(t))return;let d=0;const x=u.getData();for(;x.nextTag(2);){const e=x.getMessage(),t=new w(e,u,d++);e.release();const n=t.values;if(n){const e=n._minzoom;if(e&&e>=o)continue;const t=n._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,n){const r=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,n),r.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,n),r.push(a))}return r}_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 n of Object.keys(e)){const r=e[n],s={};for(;r.next();)switch(r.tag()){case 3:{const e=r.getMessage(),t=new k(e);e.release(),s[t.name]=t;break}default:r.skip()}t[n]=s}return t}_createBucket(e){switch(e.type){case 0:return null;case 1:return this._createFillBucket(e);case 2:return this._createLineBucket(e);case 4:return this._createCircleBucket(e);case 3:return this._createSymbolBucket(e)}}_createFillBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.fillMaterial.getStride()),new M,new A(e.outlineMaterial.getStride()),new M)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new P(e.lineMaterial.getStride()),new M)}_createCircleBucket(e){return new S(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.circleMaterial.getStride()),new M)}_createSymbolBucket(e){const t=this._tile;return new W(t.tileKey,e,this._level,new D(e.iconMaterial.getStride()),new M,new D(e.textMaterial.getStride()),new M,t.placementEngine,t.getWorkerTileHandler())}}class K{constructor(e,t,n,r){this.status=0,this.placementEngine=new m,this.tileKey=e,this.refKeys=t,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(e,t){const n=t?.signal;if(null!=n){const e=()=>{n.removeEventListener("abort",e),this.status=4};n.addEventListener("abort",e)}let s;const i={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,r.zf)(e))throw e;return{result:i,transferList:[]}}this.status=2;const a=i.bucketsWithData,o=[];for(const e of s)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)),i.emptyBuckets=h,{result:i,transferList:l}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const n=e.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new Z(n,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var H=n(45013);class J{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:n}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const n=e.sourceName2DataAndRefKey[t];s[t]=n.refKey}const i=new K(n,s,this,this._styleRepository);try{return await i.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(i.setObsolete(),i.release(),!(0,r.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const n of e){const e=n.type,r=n.data;switch(e){case 0:t.setPaintProperties(r.layer,r.paint);break;case 1:t.setLayoutProperties(r.layer,r.layout);break;case 3:t.deleteStyleLayer(r.layer);break;case 2:t.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:n}=e;this._styleRepository=new H.A(t),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,n){const r=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&r.push(t);return 0===r.length?Promise.resolve():t.invoke("getSprites",r,{signal:n?.signal}).then(e=>{for(const t in e){const n=e[t];s[t]=n}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,n,r,s){const i=[];let a=this._glyphInfo[t];return a?n.forEach(e=>{a[e]||i.push(e)}):(a=this._glyphInfo[t]=[],n.forEach(e=>i.push(e))),0===i.length?Promise.resolve():r.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then(e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])})}getGlyphItems(e){return this._glyphInfo[e]}}},83349:(e,t,n)=>{function r(e,t,n){n=n||2;var r,i,o,l,h,c,f,d=t&&t.length,x=d?t[0]*n:e.length,p=s(e,0,x,n,!0),y=[];if(!p||p.next===p.prev)return y;if(d&&(p=u(e,t,p,n)),e.length>80*n){r=o=e[0],i=l=e[1];for(var g=n;g<x;g+=n)(h=e[g])<r&&(r=h),(c=e[g+1])<i&&(i=c),h>o&&(o=h),c>l&&(l=c);f=0!==(f=Math.max(o-r,l-i))?1/f:0}return a(p,y,n,r,i,f),y}function s(e,t,n,r,s){var i,a;if(s===L(e,t,n,r)>0)for(i=t;i<n;i+=r)a=A(i,e[i],e[i+1],a);else for(i=n-r;i>=t;i-=r)a=A(i,e[i],e[i+1],a);if(a&&w(a,a.next)){var o=a.next;D(a),a=o}return a}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!w(r,r.next)&&0!==I(r.prev,r,r.next))r=r.next;else{var s=r.prev;if(D(r),(r=t=s)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,s,u,f){if(e){!f&&u&&y(e,r,s,u);for(var d,x,p=e;e.prev!==e.next;)if(d=e.prev,x=e.next,u?l(e,r,s,u):o(e))t.push(d.i/n),t.push(e.i/n),t.push(x.i/n),D(e),e=x.next,p=x.next;else if((e=x)===p){f?1===f?a(e=h(i(e),t,n),t,n,r,s,u,2):2===f&&c(e,t,n,r,s,u):a(i(e),t,n,r,s,u,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(I(t,n,r)>=0)return!1;for(var s=e.next.next;s!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,s.x,s.y)&&I(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function l(e,t,n,r){var s=e.prev,i=e,a=e.next;if(I(s,i,a)>=0)return!1;for(var o=s.x<i.x?s.x<a.x?s.x:a.x:i.x<a.x?i.x:a.x,l=s.y<i.y?s.y<a.y?s.y:a.y:i.y<a.y?i.y:a.y,h=s.x>i.x?s.x>a.x?s.x:a.x:i.x>a.x?i.x:a.x,c=s.y>i.y?s.y>a.y?s.y:a.y:i.y>a.y?i.y:a.y,u=g(o,l,t,n,r),f=g(h,c,t,n,r),d=e.prevZ,x=e.nextZ;d&&d.z>=u&&x&&x.z<=f;){if(d!==e.prev&&d!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,x!==e.prev&&x!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,x.x,x.y)&&I(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;x&&x.z<=f;){if(x!==e.prev&&x!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,x.x,x.y)&&I(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function h(e,t,n){var r=e;do{var s=r.prev,a=r.next.next;!w(s,a)&&v(s,r,r.next,a)&&P(s,a)&&P(a,s)&&(t.push(s.i/n),t.push(r.i/n),t.push(a.i/n),D(r),D(r.next),r=e=a),r=r.next}while(r!==e);return i(r)}function c(e,t,n,r,s,o){var l=e;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&b(l,h)){var c=V(l,h);return l=i(l,l.next),c=i(c,c.next),a(l,t,n,r,s,o),void a(c,t,n,r,s,o)}h=h.next}l=l.next}while(l!==e)}function u(e,t,n,r){var a,o,l,h=[];for(a=0,o=t.length;a<o;a++)(l=s(e,t[a]*r,a<o-1?t[a+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),h.push(_(l));for(h.sort(f),a=0;a<h.length;a++)n=i(n=x(h[a],n),n.next);return n}function f(e,t){return e.x-t.x}function d(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function x(e,t){var n=function(e,t){var n,r=t,s=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=s&&o>a){if(a=o,o===s){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(s===a)return n;var l,h=n,c=n.x,u=n.y,f=1/0;r=n;do{s>=r.x&&r.x>=c&&s!==r.x&&m(i<u?s:a,i,c,u,i<u?a:s,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(s-r.x),P(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&p(n,r)))&&(n=r,f=l)),r=r.next}while(r!==h);return n}(e,t);if(!n)return t;var r=V(n,e),s=i(n,n.next);let a=d(r);return i(a,a.next),s=d(s),d(t===n?s:t)}function p(e,t){return I(e.prev,e,t.prev)<0&&I(t.next,e,e.next)<0}function y(e,t,n,r){var s=e;do{null===s.z&&(s.z=g(s.x,s.y,t,n,r)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==e);s.prevZ.nextZ=null,s.prevZ=null,function(e){var t,n,r,s,i,a,o,l,h=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,o=0,t=0;t<h&&(o++,r=r.nextZ);t++);for(l=h;o>0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(s=n,n=n.nextZ,o--):(s=r,r=r.nextZ,l--),i?i.nextZ=s:e=s,s.prevZ=i,i=s;n=r}i.nextZ=null,h*=2}while(a>1)}(s)}function g(e,t,n,r,s){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*s)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function _(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,s,i,a,o){return(s-a)*(t-o)-(e-a)*(i-o)>=0&&(e-a)*(r-o)-(n-a)*(t-o)>=0&&(n-a)*(i-o)-(s-a)*(r-o)>=0}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&v(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(P(e,t)&&P(t,e)&&function(e,t){var n=e,r=!1,s=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&s<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(I(e.prev,e,t.prev)||I(e,t.prev,t))||w(e,t)&&I(e.prev,e,e.next)>0&&I(t.prev,t,t.next)>0)}function I(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function w(e,t){return e.x===t.x&&e.y===t.y}function v(e,t,n,r){var s=k(I(e,t,n)),i=k(I(e,t,r)),a=k(I(n,r,e)),o=k(I(n,r,t));return s!==i&&a!==o||!(0!==s||!M(e,n,t))||!(0!==i||!M(e,r,t))||!(0!==a||!M(n,e,r))||!(0!==o||!M(n,t,r))}function M(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k(e){return e>0?1:e<0?-1:0}function P(e,t){return I(e.prev,e,e.next)<0?I(e,t,e.next)>=0&&I(e,e.prev,t)>=0:I(e,t,e.prev)<0||I(e,e.next,t)<0}function V(e,t){var n=new B(e.i,e.x,e.y),r=new B(t.i,t.x,t.y),s=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=s,s.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function A(e,t,n,r){var s=new B(e,t,n);return r?(s.next=r.next,s.prev=r,r.next.prev=s,r.next=s):(s.prev=s,s.next=s),s}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(e,t,n,r){for(var s=0,i=t,a=n-r;i<n;i+=r)s+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return s}n.d(t,{e:()=>r}),r.deviation=function(e,t,n,r){var s=t&&t.length,i=s?t[0]*n:e.length,a=Math.abs(L(e,0,i,n));if(s)for(var o=0,l=t.length;o<l;o++){var h=t[o]*n,c=o<l-1?t[o+1]*n:e.length;a-=Math.abs(L(e,h,c,n))}var u=0;for(o=0;o<r.length;o+=3){var f=r[o]*n,d=r[o+1]*n,x=r[o+2]*n;u+=Math.abs((e[f]-e[x])*(e[d+1]-e[f+1])-(e[f]-e[d])*(e[x+1]-e[f+1]))}return 0===a&&0===u?0:Math.abs((u-a)/a)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,s=0;s<e.length;s++){for(var i=0;i<e[s].length;i++)for(var a=0;a<t;a++)n.vertices.push(e[s][i][a]);s>0&&(r+=e[s-1].length,n.holes.push(r))}return n}},87317:(e,t,n)=>{n.d(t,{a:()=>w,b:()=>u,c:()=>i,d:()=>g,e:()=>v,f:()=>s,g:()=>p,h:()=>m,i:()=>a,j:()=>y,l:()=>b,m:()=>c,n:()=>_,r:()=>f,s:()=>d,t:()=>I});var r=n(34304);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function o(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function c(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}function u(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}function f(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}function d(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function x(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(n*n+r*r+s*s+i*i)}function p(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return n*n+r*r+s*s+i*i}function y(e){const t=e[0],n=e[1],r=e[2],s=e[3];return Math.sqrt(t*t+n*n+r*r+s*s)}function g(e){const t=e[0],n=e[1],r=e[2],s=e[3];return t*t+n*n+r*r+s*s}function _(e,t){const n=t[0],r=t[1],s=t[2],i=t[3];let a=n*n+r*r+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=s*a,e[3]=i*a),e}function m(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function b(e,t,n,r){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e[3]=o+r*(n[3]-o),e}function I(e,t,n){const r=t[0],s=t[1],i=t[2],a=t[3];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12]*a,e[1]=n[1]*r+n[5]*s+n[9]*i+n[13]*a,e[2]=n[2]*r+n[6]*s+n[10]*i+n[14]*a,e[3]=n[3]*r+n[7]*s+n[11]*i+n[15]*a,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function v(e,t){const n=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,r.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-h)<=u*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const M=o,k=l,P=h,V=x,A=p,D=y,B=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:s,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:V,distance:x,div:P,divide:h,dot:m,equals:v,exactEquals:w,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:D,length:y,lerp:b,max:u,min:c,mul:k,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:_,random:function(e,t=1){const n=r.Ov;let s,i,a,o,l,h;do{s=2*n()-1,i=2*n()-1,l=s*s+i*i}while(l>=1);do{a=2*n()-1,o=2*n()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*s,e[1]=t*i,e[2]=t*a*c,e[3]=t*o*c,e},round:f,scale:d,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},set:i,sqrDist:A,sqrLen:B,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:M,subtract:o,transformMat4:I,transformQuat:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2],h=n[3],c=h*r+o*i-l*s,u=h*s+l*r-a*i,f=h*i+a*s-o*r,d=-a*r-o*s-l*i;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,n)=>{function r(){return[0,0,0,0]}function s(e){return[e[0],e[1],e[2],e[3]]}function i(e,t,n,r){return[e,t,n,r]}function a(e,t,n,r){return[e,t,n,r]}function o(e,t=[0,0,0,0]){const n=Math.min(4,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function l(){return i(1,1,1,1)}function h(){return i(1,0,0,0)}function c(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}n.d(t,{CN:()=>a,Un:()=>x,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>d,vt:()=>r});const d=[0,0,0,0],x=l(),p=h(),y=c(),g=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:x,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:g,ZEROS:d,clone:s,create:r,freeze:a,fromArray:o,fromValues:i,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},95108:(e,t,n)=>{n.d(t,{$3:()=>h,Ng:()=>a,R3:()=>s,Yl:()=>l,gR:()=>i,m3:()=>u,t9:()=>o});var r=n(4576);function s(e,t){const n=t[0]-e[0],r=t[1]-e[1];if(e.length>2&&t.length>2){const s=e[2]-t[2];return Math.sqrt(n*n+r*r+s*s)}return Math.sqrt(n*n+r*r)}function i(e,t,n,r){const[s,i]=t,[a,o]=n,[l,h]=r,c=l-a,u=h-o,f=c*c+u*u,d=(s-a)*c+(i-o)*u,x=Math.min(1,Math.max(0,d/f));return e[0]=a+c*x,e[1]=o+u*x,e}function a(e,t,n,r,s,i){let a=n,o=r,l=s-a,h=i-o;if(0!==l||0!==h){const n=((e-a)*l+(t-o)*h)/(l*l+h*h);n>1?(a=s,o=i):n>0&&(a+=l*n,o+=h*n)}return l=e-a,h=t-o,l*l+h*h}function o(e,t){return function(e,t,n){const r=e[0]+n*(t[0]-e[0]),s=e[1]+n*(t[1]-e[1]);return e.length>2&&t.length>2?[r,s,e[2]+n*(t[2]-e[2])]:[r,s]}(e,t,.5)}function l(e){const t=e.length;let n=0;for(let r=0;r<t-1;++r)n+=s(e[r],e[r+1]);return n}function h(e,t=0,n=1){let r=0;const s=e.length;let i=e[0];for(let a=1;a<s;a++){const s=e[a];r+=(s[t]-i[t])*(s[n]+i[n]),i=s}if(c(e)){const s=e[0];r+=(s[t]-i[t])*(s[n]+i[n])}return r>=0}function c(e){const t=e.length;return t>0&&!(0,r.aI)(e[0],e[t-1])}function u(e){if("rings"in e)for(const t of e.rings)c(t)&&t.push(t[0].slice())}n(21325)}}]);
|