@mappedin/mappedin-js 6.32.0 → 6.33.0
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/THIRD_PARTY_LICENSES.txt +929 -116
- package/lib/esm/{chunk-SAPR7Z5M.js → chunk-DC7JFA2T.js} +104 -84
- package/lib/esm/{chunk-PQ2OLSSS.js → chunk-GTWQKKFE.js} +33 -30
- package/lib/esm/{chunk-J5TYCDYA.js → chunk-IMDMEZEU.js} +1 -1
- package/lib/esm/chunk-N3AVUTI4.js +2 -0
- package/lib/esm/chunk-O74CKEFP.js +1 -0
- package/lib/esm/{chunk-ZJEQSG7Y.js → chunk-TFGILZUF.js} +1 -1
- package/lib/esm/{chunk-7B7J4IXM.js → chunk-XBKEAHSJ.js} +1 -1
- package/lib/esm/index.d.ts +125 -10
- package/lib/esm/index.js +3 -3
- package/lib/esm/{inspector-BXOUWL5H.js → inspector-ZUQ77RHW.js} +2 -2
- package/lib/esm/{internal-WXG4ZPV3.js → internal-UFSDJP46.js} +1 -1
- package/lib/esm/{src-Q2KNMHOD.js → src-LANFAOHL.js} +1 -1
- package/lib/esm/{text3d-PIWYZMWH.js → text3d-5HITM4H2.js} +1 -1
- package/package.json +5 -1
- package/lib/esm/chunk-EXOCWBOF.js +0 -1
- package/lib/esm/chunk-TWRTSPVQ.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as Ce,R as Ie,S as Le,U as De,V as Me,W as Oe,Y as ve,Z as B,_ as Ne,aa as ke,ba as Ge,w as L}from"./chunk-N3AVUTI4.js";import{H as V,L as ce,M as ue,N as Fe,Q as we,W as fe,c as se,g as je,h as Ue,i as ze,j as Xe,q as de,r as w}from"./chunk-TFGILZUF.js";import{a as S,b as g,g as U}from"./chunk-XBKEAHSJ.js";S();import{z as He}from"zod";function Ye(e){try{let o=e.shape;if("type"in o){let t=o.type;if(t instanceof He.ZodOptional&&(t=t._def.innerType),"value"in t)return String(t.value);if(t instanceof He.ZodDefault&&"value"in t._def.innerType)return String(t._def.innerType.value)}return"unknown"}catch{return"unknown"}}function We(e){if(e.success)return{};let o={};for(let t of e.error.issues)if(t.path.length>0){let i=String(t.path[0]);o[i]||(o[i]=[]),o[i].push(t.message)}return o}function Be(e,o){let t=Object.entries(e);if(t.length>0){let i=t.map(([n,f])=>`${n}: ${f.join(", ")}`).join("; ");U.warn(`${t.length} invalid field(s) in ${o??"unknown"} state: [${i}]`)}}function Ve(e,o,t){if(t?.disableValidation)return o;if(o==null||typeof o!="object")return{};let i=e.safeParse(o);if(i.success){let d={};for(let c of Object.keys(o))c in i.data&&(d[c]=o[c]);return d}let n=We(i);t?.warn&&Be(n,Ye(e));let f={};for(let d of Object.keys(o))!(d in n)&&d in e.shape&&(f[d]=o[d]);return f}function _(e,o,t){if(t?.disableValidation)return o;let i=e.safeParse(o);if(i.success)return i.data;if(t?.warn===!0){let n=We(i);Be(n,Ye(e))}return o}S();import a from"zod";var $e="path",P={color:"#4b90e2",width:1,completeFraction:0,visible:!0,interactive:!1,verticalOffset:.1,xrayOpacity:.25,smoothingTension:de.tension,smoothingCornerRadius:de.cornerRadius,dashed:!1,dashDiscrete:!1,dashCornerRadius:0,endcapExtension:[.5,.5],billboarding:80},me={enabled:a.boolean().optional(),cornerRadius:a.number().min(0).max(1).default(P.dashCornerRadius)},Ze=a.union([a.object({mode:a.literal("length-scaling").optional(),length:a.number().min(0).max(1).default(.1),gap:a.number().min(0).max(1).default(.1),...me}),a.object({mode:a.literal("width-scaling").optional(),size:a.number().min(0).default(w.size),gapSize:a.number().min(0).default(w.gapSize),...me}),a.object({mode:a.literal("absolute"),meters:a.number().min(0).default(1),gapMeters:a.number().min(0).default(.5),...me})]),Se={__EXPERIMENTAL_DASH_CORNER_RADIUS:a.number().min(0).max(1).optional()},gt=a.discriminatedUnion("__EXPERIMENTAL_DASH_MODE",[a.object({__EXPERIMENTAL_DASH_MODE:a.literal("length-scaling"),__EXPERIMENTAL_DASH_LENGTH:a.number().min(0).max(1).optional(),__EXPERIMENTAL_DASH_GAP:a.number().min(0).max(1).optional(),...Se}),a.object({__EXPERIMENTAL_DASH_MODE:a.literal("width-scaling"),__EXPERIMENTAL_DASH_SIZE:a.number().min(0).optional(),__EXPERIMENTAL_GAP_SIZE:a.number().min(0).optional(),...Se}),a.object({__EXPERIMENTAL_DASH_MODE:a.literal("absolute"),__EXPERIMENTAL_DASH_METERS:a.number().min(0).optional(),__EXPERIMENTAL_GAP_METERS:a.number().min(0).optional(),...Se})]),be=a.object({type:a.literal($e).default($e),color:a.string().default(P.color),width:a.union([a.number(),a.string().regex(se),a.object({on:a.literal("zoom-level"),input:a.array(a.number()).nonempty(),output:a.union([a.array(a.number()).nonempty(),a.array(a.string().regex(se)).nonempty()]),easing:a.string().optional()})]),completeFraction:a.number().default(P.completeFraction),visible:a.boolean().default(P.visible),interactive:a.boolean().default(P.interactive),verticalOffset:a.number().default(P.verticalOffset),highlightStartFraction:a.number().default(0),highlightEndFraction:a.number().default(0),highlightColor:a.string().default("red"),highlightWidthMultiplier:a.number().default(1.1),highlightCompleteFraction:a.number().default(1),highlightDisplayArrowsOnPath:a.boolean().default(!1),xrayOpacity:a.number().min(0).max(1).default(P.xrayOpacity),travelledEndFraction:a.number().default(0),travelledColor:a.string().default("#999"),smoothing:a.object({tension:a.number().default(P.smoothingTension),cornerRadius:a.number().default(P.smoothingCornerRadius)}).optional(),dashed:a.boolean().default(P.dashed),dashDiscrete:a.boolean().default(P.dashDiscrete),dashCornerRadius:a.number().min(0).max(1).default(P.dashCornerRadius),dash:Ze.optional(),geometry:a.enum(["tube","ribbon"]).default("tube"),endcapExtension:a.tuple([a.number(),a.number()]).default(P.endcapExtension),billboarding:a.union([a.boolean(),a.number().min(0).max(90)]).default(P.billboarding),border:a.object({enabled:a.boolean(),color:a.custom(e=>typeof e=="string"),width:a.number().optional()}).optional(),xray:a.object({opacity:a.number().min(0).max(1).optional(),color:a.string().optional(),tint:a.number().min(0).max(1).optional(),dithering:a.number().min(0).optional()}).optional()}),_t={__EXPERIMENTAL_GEOMETRY:a.enum(["tube","ribbon"]).optional(),__EXPERIMENTAL_ENDCAP_EXTENSION:a.tuple([a.number(),a.number()]).optional(),__EXPERIMENTAL_BILLBOARDING:a.union([a.boolean(),a.number().min(0).max(90)]).optional(),__EXPERIMENTAL_BORDER:a.object({enabled:a.boolean(),color:a.custom(e=>typeof e=="string"),width:a.number().optional()}).optional(),__EXPERIMENTAL_SMOOTHING_TENSION:a.number().optional(),__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:a.number().optional(),__EXPERIMENTAL_XRAY_STYLE:a.object({opacity:a.number().min(0).max(1).optional(),color:a.string().optional(),tint:a.number().min(0).max(1).optional(),dithering:a.number().min(0).optional()}).optional(),__EXPERIMENTAL_DASH_OPTIONS:a.union([Ze,gt]).optional()},zt=be.omit({dashDiscrete:!0}).partial().extend(_t),Xt=a.strictObject(be.shape);function Ft(e){let{color:o,visible:t,interactive:i,width:n,verticalOffset:f,completeFraction:d,highlightStartFraction:c,highlightEndFraction:T,highlightColor:x,highlightWidthMultiplier:m,highlightCompleteFraction:u,highlightDisplayArrowsOnPath:b,travelledEndFraction:M,travelledColor:O,xrayOpacity:A,xrayStyle:R,smoothingTension:I,smoothingCornerRadius:j,dashed:p,dashDiscrete:h,dashCornerRadius:C,dashLength:Y,dashGap:W,dashRelativeToWidth:ne,dashSize:le,gapSize:pe,dashAbsolute:F,dashMeters:z,gapMeters:Ae,geometryType:St,endcapExtension:bt,billboarding:ht,border:Tt}=e,X={};A!==void 0&&(X.opacity=A),R?.color!==void 0&&(X.color=R.color),R?.tint!==void 0&&(X.tint=R.tint),R?.dithering!==void 0&&(X.dithering=R.dithering);let Et=Object.keys(X).length>0?X:void 0,yt={enabled:p,cornerRadius:C,...F?{mode:"absolute",meters:z,gapMeters:Ae}:ne?{mode:"width-scaling",size:le,gapSize:pe}:{mode:"length-scaling",length:Y,gap:W}};return _(be,{color:o,visible:t,interactive:i,width:n,verticalOffset:f,completeFraction:d,highlightStartFraction:c,highlightEndFraction:T,highlightColor:x,highlightWidthMultiplier:m,highlightCompleteFraction:u,highlightDisplayArrowsOnPath:b,travelledEndFraction:M,travelledColor:O,xrayOpacity:A,xray:Et,smoothing:{tension:I,cornerRadius:j},dashed:p,dashDiscrete:h,dashCornerRadius:C,dash:yt,geometry:St,endcapExtension:bt,billboarding:ht,border:Tt})}function xt(e,o){g.env.NODE_ENV!=="production"&&U.warn(`${e} takes precedence over deprecated ${o}`)}function wt(e){let o=e.geometry??e.__EXPERIMENTAL_GEOMETRY,t=e.endcapExtension??e.__EXPERIMENTAL_ENDCAP_EXTENSION,i=e.billboarding??e.__EXPERIMENTAL_BILLBOARDING,n=e.border??e.__EXPERIMENTAL_BORDER,f=e.smoothing,d=f?.tension??e.__EXPERIMENTAL_SMOOTHING_TENSION,c=f?.cornerRadius??e.__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS,T=e.xray,x=e.__EXPERIMENTAL_XRAY_STYLE,m=T??x,u=e.dash??e.__EXPERIMENTAL_DASH_OPTIONS,b=u?{enabled:u.enabled,mode:u.mode??u.__EXPERIMENTAL_DASH_MODE,length:u.length??u.__EXPERIMENTAL_DASH_LENGTH,gap:u.gap??u.__EXPERIMENTAL_DASH_GAP,size:u.size??u.__EXPERIMENTAL_DASH_SIZE,gapSize:u.gapSize??u.__EXPERIMENTAL_GAP_SIZE,meters:u.meters??u.__EXPERIMENTAL_DASH_METERS,gapMeters:u.gapMeters??u.__EXPERIMENTAL_GAP_METERS,cornerRadius:u.cornerRadius??u.__EXPERIMENTAL_DASH_CORNER_RADIUS}:void 0,M=typeof e.dashed=="boolean"?e.dashed:void 0,O=b?.enabled??M;b?.enabled!==void 0&&M!==void 0&&xt("dash.enabled","dashed");let A=o==="ribbon",R=t!==void 0&&(t[0]!==0||t[1]!==0)&&(t[0]!==P.endcapExtension[0]||t[1]!==P.endcapExtension[1]),I=i!==void 0&&i!==!1,j=n?.enabled===!0;!A&&(R||I||j)&&g.env.NODE_ENV!=="production"&&U.warn('Ribbon-only path options (endcapExtension, billboarding, border) have no effect with tube geometry. Set geometry: "ribbon" to apply them.'),b?.cornerRadius!==void 0&&!A&&g.env.NODE_ENV!=="production"&&U.warn("dash.cornerRadius has no effect on tube geometry");let p={};for(let h in e)if(h==="geometry"||h==="__EXPERIMENTAL_GEOMETRY")o!==void 0&&(p.geometryType=o);else if(h==="endcapExtension"||h==="__EXPERIMENTAL_ENDCAP_EXTENSION")t!==void 0&&(p.endcapExtension=t);else if(h==="billboarding"||h==="__EXPERIMENTAL_BILLBOARDING")i!==void 0&&(p.billboarding=i);else if(h==="border"||h==="__EXPERIMENTAL_BORDER")n!==void 0&&(p.border=n);else if(h==="smoothing"||h==="__EXPERIMENTAL_SMOOTHING_TENSION"||h==="__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS")d!==void 0&&(p.smoothingTension=d),c!==void 0&&(p.smoothingCornerRadius=c);else if(h==="dash"||h==="__EXPERIMENTAL_DASH_OPTIONS"){if(b){let C=O===!0?b.mode??"width-scaling":b.mode;C==="length-scaling"?(p.dashRelativeToWidth=!1,p.dashAbsolute=!1,b.length!==void 0&&(p.dashLength=b.length),b.gap!==void 0&&(p.dashGap=b.gap)):C==="width-scaling"?(p.dashRelativeToWidth=!0,p.dashAbsolute=!1,p.dashSize=b.size??w.size,p.gapSize=b.gapSize??w.gapSize):C==="absolute"&&(p.dashAbsolute=!0,p.dashRelativeToWidth=!1,b.meters!==void 0&&(p.dashMeters=b.meters),b.gapMeters!==void 0&&(p.gapMeters=b.gapMeters)),b.cornerRadius!==void 0&&(p.dashCornerRadius=b.cornerRadius)}}else if(h==="xray"||h==="__EXPERIMENTAL_XRAY_STYLE"){if(m){m.opacity!==void 0&&(p.xrayOpacity=m.opacity);let C={};m.color!==void 0&&(C.color=m.color),m.tint!==void 0&&(C.tint=m.tint),m.dithering!==void 0&&(C.dithering=m.dithering),Object.keys(C).length>0&&(p.xrayStyle=C)}}else h==="xrayOpacity"?m?.opacity===void 0&&(p[h]=e[h]):p[h]=e[h];return O!==void 0&&(p.dashed=O),p}S();import N from"zod";var Ke="doors",he=N.object({type:N.literal(Ke).default(Ke),color:N.string().default("#ffffff"),topColor:N.string().optional(),texture:N.object({url:N.string().optional()}).optional(),topTexture:N.object({url:N.string().optional()}).optional(),visible:N.boolean().default(!1),opacity:N.number().default(1)}),Vt=he.partial(),$t=N.strictObject(he.shape);function Zt(e,o){let{color:t,topColor:i,texture:n,topTexture:f,opacity:d}=e,c=o?.visible??!1;return _(he,{visible:c,color:t,topColor:i,opacity:d,texture:n?{url:n}:void 0,topTexture:f?{url:f}:void 0})}function Kt(e,o){let t={featureCollection:{},container:{}};return e.visible!==void 0&&(t.container.visible=e.visible),e.color&&(e.color==="initial"?t.featureCollection.color=o?.initialColor:t.featureCollection.color=e.color),e.topColor&&(e.topColor==="initial"?t.featureCollection.topColor=o?.initialTopColor:t.featureCollection.topColor=e.topColor),e.texture?.url!==void 0&&(t.featureCollection.texture=e.texture.url),e.topTexture?.url!==void 0&&(t.featureCollection.topTexture=e.topTexture.url),e.opacity!==void 0&&(t.featureCollection.opacity=e.opacity),t}function Jt(e,o){let t={};return o==null||(e.color&&(e.color==="initial"?t.color=o.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=o.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),e.texture?.url!==void 0&&(t.texture=e.texture.url),e.topTexture?.url!==void 0&&(t.topTexture=e.topTexture.url),e.opacity!==void 0&&(t.opacity=e.opacity)),t}S();import{z as H}from"zod";var Je="facade",Te=H.object({type:H.literal(Je).default(Je),opacity:H.number().default(1),visible:H.boolean().default(!0)}),oo=Te.partial(),ao=H.strictObject(Te.shape);function ro(e){return _(Te,{opacity:e.opacity,visible:e.visible})}S();import{z as r}from"zod";var k="floor",qe=`${k}.footprint`,Qe=`${k}.geometry`,et=`${k}.labels`,tt=`${k}.markers`,ot=`${k}.images`,at=`${k}.occlusion`,rt=`${k}.paths`,it=`${k}.areas`,nt=`${k}.models`,$=r.object({type:r.literal(qe).default(qe),altitude:r.number().default(0),visible:r.boolean().default(!1),height:r.number().default(0),opacity:r.number().default(1),side:r.enum(["double","front","back"]).default("double"),color:r.string().default("#ffffff"),ceilingVisible:r.boolean().default(!0),basementMaskEnabled:r.boolean().default(!1),outline:r.boolean().default(!0),ceilingThickness:r.number().default(.2)}),uo=$.partial(),Z=r.object({type:r.literal(Qe).default(Qe),opacity:r.number().default(1),visible:r.boolean().default(!0),heightScale:r.number().default(1),maskId:r.number().nullable().default(null),maskEffect:r.enum(["hide","reveal"]).default("hide"),maskMode:r.enum(["mask","masked-object"]).default("mask"),maskEnabled:r.boolean().default(!1),effectStart:r.number().default(0),effectDistance:r.number().default(0),darkenAmount:r.number().default(0),darkenUseDepth:r.boolean().default(!0),desaturateAmount:r.number().default(0),desaturateUseDepth:r.boolean().default(!0),washOutAmount:r.number().default(0),washOutUseDepth:r.boolean().default(!1)}),fo=Z.partial(),K=r.object({type:r.literal(et).default(et),enabled:r.boolean().default(!0)}),mo=K.partial(),J=r.object({type:r.literal(tt).default(tt),enabled:r.boolean().default(!0)}),So=J.partial(),q=r.object({type:r.literal(ot).default(ot),visible:r.boolean().default(!0),collisionsEnabled:r.boolean().default(!1)}),bo=q.partial(),Q=r.object({type:r.literal(at).default(at),enabled:r.boolean().default(!0)}),ho=Q.partial(),ee=r.object({type:r.literal(rt).default(rt),visible:r.boolean().default(!0)}),To=ee.partial(),te=r.object({type:r.literal(k).default(k),visible:r.boolean().default(!1),altitude:r.number().default(0)}),oe=r.object({type:r.literal(it).default(it),visible:r.boolean().default(!0)}),Eo=oe.partial(),Rt=r.object({visible:r.boolean().default(!0)}),Pt=r.object({visible:r.boolean().default(!0)}),ae=r.object({visible:r.boolean().default(!0),geometryText:Rt.default({visible:!0}),floorText:Pt.default({visible:!0})}),yo=ae.partial(),re=r.object({type:r.literal(nt).default(nt),visible:r.boolean().default(!0)}),go=re.partial(),At=r.object({...te.shape,geometry:Z,labels:K,markers:J,images:q,footprint:$,occlusion:Q,paths:ee,areas:oe,text3d:ae,models:re}),_o=te.partial(),xo=r.object({...te.shape,geometry:Z.partial(),labels:K.partial(),markers:J.partial(),images:q.partial(),footprint:$.partial(),occlusion:Q.partial(),paths:ee.partial(),areas:oe.partial(),text3d:ae.partial(),models:re.partial()}).partial(),Ro=r.strictObject({...te.shape,geometry:r.strictObject(Z.shape),labels:r.strictObject(K.shape),markers:r.strictObject(J.shape),images:r.strictObject(q.shape),footprint:r.strictObject($.shape),occlusion:r.strictObject(Q.shape),paths:r.strictObject(ee.shape),areas:r.strictObject(oe.shape),text3d:r.strictObject(ae.shape),models:r.strictObject(re.shape)});function lt(e,o){let t=e?.getInternalState().geometry3DMap.get(o);if(t?.type!=="group-container")return!0;let i=t,n=e?.getSystems().text3DSystem;return n?.getBatchedText(i)?.visible??n?.getBatchVisible(i)??!0}function Po(e,o,t){if(!o){U.error("Floor is not defined. Cannot get floor state.");return}let i=o.layers.get(Ce),n=i?t?.getState(i.containerId):void 0,f=o.layers.get(Ie),d=o.layers.get(Le),c=o.footprintObject?.getState(),T=o.layers.get(De),x=T?t?.getState(T.containerId):void 0,m=o.layers.get(Oe),u=m?t?.getState(m.containerId):void 0,b=!1;if(i?.layers)for(let F of i.layers.values()){let z=t?.getState(F);if(z?.children?.[0]){b=t?.getState(z.children[0])?.enableImageCollisions??!1;break}}let M=o.layers.get(ve),O=M?t?.getState(M.containerId):void 0,A=o.layers.get(Me),R=A?t?.getState(A.containerId):void 0,I=o.layers.get(B),j=I?t?.getState(I.containerId):void 0,p=!0,h=!0,C=!0,Y=!0;for(let[,F]of i.layers){let z=t?.getState(F);z?.maskId||(p=!1),z?.maskEffect||(h=!1),z?.maskMode||(C=!1),z?.maskEnabled||(Y=!1)}let W=o.layers.get(Ne),ne=W?t?.getState(W.containerId):void 0,le=lt(t,ke(o.id)),pe=lt(t,Ge(o.id));return _(At,{geometry:{opacity:n?.opacity,visible:n?.visible,maskId:p,maskEffect:h,maskMode:C,maskEnabled:Y},labels:{enabled:f?.visible},markers:{enabled:d?.visible},footprint:{altitude:c?.altitude,visible:c?.visible,height:c?.height,opacity:c?.opacity,side:c?.side,color:c?.color,ceilingVisible:c?.ceilingVisible,basementMaskEnabled:c?.basementMaskEnabled,outline:c?.outline,ceilingThickness:c?.ceilingThickness},images:{visible:u?.visible,collisionsEnabled:b},occlusion:{enabled:x?.visible},paths:{visible:O?.visible},areas:{visible:R?.visible},text3d:{visible:ne?.visible,geometryText:{visible:le},floorText:{visible:pe}},models:{visible:j?.visible},visible:e.visible,altitude:e.altitude})}S();import{z as s}from"zod";var pt="geometry",Ee=s.object({type:s.literal(pt).default(pt),visible:s.boolean().default(!0),color:s.union([s.string(),s.literal("initial")]).default("#ffffff"),topColor:s.union([s.string(),s.literal("initial")]).optional(),hoverColor:s.union([s.string(),s.literal("initial")]).optional(),interactive:s.union([s.boolean(),s.literal("pass-through")]).default(!1),opacity:s.number().default(1),height:s.number().default(0),slopeBearing:s.number().min(0).max(360).default(0),slopeFactor:s.number().min(-1).max(1).default(0),slopeEnabled:s.boolean().default(!1),altitude:s.number().default(0),texture:s.object({url:s.string()}).optional(),topTexture:s.object({url:s.string()}).optional(),flipImageToFaceCamera:s.boolean().default(!1),enableImageCollisions:s.boolean().default(!1),borderVisible:s.boolean().default(!1),borderColor:s.string().optional(),borderWidth:s.number().optional(),EXPERIMENTAL_surfaceEffect:s.object({id:s.string(),params:s.object({amount:s.number()})}).nullable().optional()}),Do=Ee.partial(),Mo=s.strictObject(Ee.shape);function Oo(e){let{altitude:o,interactive:t,hoverColor:i,color:n,visible:f,opacity:d,height:c,slope:T,slopeEnabled:x,texture:m,topTexture:u,flipImageToFaceCamera:b,enableImageCollisions:M,topColor:O,borderVisible:A,borderColor:R,borderWidth:I}=e;return _(Ee,{interactive:t,hoverColor:i,color:n,visible:f,opacity:d,height:c,slopeBearing:T?.bearing??0,slopeFactor:T?.factor??0,slopeEnabled:x??!1,texture:m?{url:e.texture}:void 0,topTexture:u?{url:u}:void 0,flipImageToFaceCamera:b,enableImageCollisions:M,topColor:O,altitude:o,borderVisible:A,borderColor:R,borderWidth:I})}function vo(e,o){let t={};return o==null||(e.color&&(e.color==="initial"?t.color=o.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=o.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),e.texture?.url!==void 0&&(t.texture=e.texture.url),e.topTexture?.url!==void 0&&(t.topTexture=e.topTexture.url),e.hoverColor!==void 0&&(t.hoverColor=e.hoverColor),e.interactive!==void 0&&(t.interactive=e.interactive),e.height!==void 0&&(t.height=e.height),(e.slopeBearing!==void 0||e.slopeFactor!==void 0)&&(t.slope={bearing:e.slopeBearing??o.slope?.bearing??0,factor:e.slopeFactor??o.slope?.factor??0}),e.slopeEnabled!==void 0&&(t.slopeEnabled=e.slopeEnabled),e.opacity!==void 0&&(t.opacity=e.opacity),e.flipImageToFaceCamera!==void 0&&(t.flipImageToFaceCamera=e.flipImageToFaceCamera),e.enableImageCollisions!==void 0&&(t.enableImageCollisions=e.enableImageCollisions),e.altitude!==void 0&&(t.altitude=e.altitude),e.borderVisible!==void 0&&(t.borderVisible=e.borderVisible),e.borderColor!==void 0&&(t.borderColor=e.borderColor),e.borderWidth!==void 0&&(t.borderWidth=e.borderWidth),e.EXPERIMENTAL_surfaceEffect!==void 0&&(t.EXPERIMENTAL_surfaceEffect=e.EXPERIMENTAL_surfaceEffect)),t}S();import v from"zod";var ye="label",Ct=v.object({type:v.literal(ye).default(ye),text:v.string(),rank:v.custom(e=>V.safeParse(e).success||e==="initial"),appearance:v.custom(e=>Fe.safeParse(e).success),interactive:v.boolean().default(!1),enabled:v.boolean().default(!0),textPlacement:v.union([v.enum(ce),v.array(v.enum(ce))]).default(ue),occlude:v.boolean().default(!0)}),Uo=Ct.partial();function zo(e){let{text:o,enabled:t,options:i}=e;return{type:ye,text:o??"",appearance:we(i?.appearance??{}),rank:i?.rank??"medium",enabled:t??!0,interactive:i?.interactive??!1,textPlacement:i?.textPlacement??ue,occlude:i?.occlude??!0}}function Xo(e,o){let t={options:{}};if(!t.options)throw new Error("options should exist");return e.text&&(t.text=e.text),e.appearance&&(t.options.appearance=e.appearance),e.textPlacement&&(t.options.textPlacement=e.textPlacement),e.rank!=null&&(e.rank==="initial"?t.options.rank=o.initialRank||2:t.options.rank=e.rank),e.enabled!==void 0&&(t.enabled=e.enabled),e.interactive!==void 0&&(t.options.interactive=e.interactive),e.occlude!==void 0&&(t.options.occlude=e.occlude),e.enabled!==void 0&&(t.enabled=e.enabled),t}S();import E from"zod";var ge="marker",It=E.object({type:E.literal(ge).default(ge),rank:E.custom(e=>V.safeParse(e).success||e==="initial"),placement:E.union([E.enum(fe),E.array(E.enum(fe))]).optional(),interactive:E.union([E.boolean(),E.literal("pointer-events-auto")]).default(!1),dynamicResize:E.boolean().default(!0),enabled:E.boolean().default(!0),zIndex:E.number().optional(),lowPriorityPin:E.object({enabled:E.boolean().optional(),size:E.number().positive().optional(),color:E.string().optional()}).optional(),element:E.custom(e=>e instanceof HTMLElement,{error:"Must be an HTMLElement instance"}),contentHTML:E.string(),occlude:E.boolean().default(!0),animated:E.boolean().default(!0)}),Bo=It.omit({element:!0}).partial();function Vo(e,o){let t=o?.target?o.target.anchorTarget:void 0,{enabled:i,placement:n,element:f,dynamicResize:d,contentHTML:c,options:T,position:x,parent:m}=e,u=typeof m=="object"?m.id:m;return t==null&&(t=new L({latitude:x?.[1]??0,longitude:x?.[0]??0,floorId:u?.toString()})),{type:ge,rank:T?.rank??"medium",interactive:T?.interactive??!1,enabled:i??!0,element:f,placement:n??[],zIndex:T?.zIndex,dynamicResize:d??!0,lowPriorityPin:T?.lowPriorityPin,contentHTML:c??"",occlude:T?.occlude??!0,animated:T?.animated??!0}}function $o(e,o){let t={};return t.options={},e.rank!=null&&(e.rank==="initial"?t.options.rank=o.initialRank||2:t.options.rank=e.rank),e.dynamicResize!=null&&(t.options.dynamicResize=e.dynamicResize),e.enabled!=null&&(t.enabled=e.enabled),e.interactive!=null&&(t.options.interactive=e.interactive),e.enabled!=null&&(t.enabled=e.enabled),e.contentHTML!=null&&(t.contentHTML=e.contentHTML),e.placement!=null&&(t.placement=e.placement),e.occlude!=null&&(t.options.occlude=e.occlude),"zIndex"in e&&(t.options.zIndex=e.zIndex),e.animated!=null&&(t.options.animated=e.animated),t}S();import{z as y}from"zod";var st="shape",_e=y.object({type:y.literal(st).default(st),visible:y.boolean().default(!0),altitude:y.number().default(0),color:y.string().default("#ffffff"),hoverColor:y.string().optional(),height:y.number().default(0),opacity:y.number().default(1),interactive:y.union([y.boolean(),y.literal("pass-through")]).default(!1),bevel:y.object({enabled:y.boolean().optional(),thickness:y.number().optional(),size:y.number().optional(),offset:y.number().optional(),segments:y.number().optional()}).optional(),visibleThroughGeometry:y.boolean().default(!1),position:y.custom(e=>L.is(e))}),Lt=_e.partial(),ta=y.strictObject(_e.shape);function oa(e){let{children:o,bevel:t,position:i}=e;if(o==null||o.length<1){U.error(`Expected at least one child for Shape (${e.id}). Cannot get shape state.`);return}let{color:n,hoverColor:f,opacity:d,interactive:c,height:T,visible:x,altitude:m,visibleThroughGeometry:u}=e;return _(_e,{altitude:m,visible:x,color:n,hoverColor:f,height:T,opacity:d,interactive:c,bevel:t,visibleThroughGeometry:u,position:new L({latitude:i[1],longitude:i[0],verticalOffset:m??0})})}function aa(e){let o=Ve(Lt,e,{warn:!0}),t={};return o.visible!==void 0&&(t.visible=o.visible),o.altitude!==void 0&&(t.altitude=o.altitude),o.color!==void 0&&(t.color=o.color),o.hoverColor!==void 0&&(t.hoverColor=o.hoverColor),o.opacity!==void 0&&(t.opacity=o.opacity),o.height!==void 0&&(t.height=o.height),o.interactive!==void 0&&(t.interactive=o.interactive),o.bevel!==void 0&&(t.bevel={enabled:o.bevel.enabled||!1,thickness:o.bevel.thickness,size:o.bevel.size,offset:o.bevel.offset,segments:o.bevel.segments}),o.visibleThroughGeometry!==void 0&&(t.visibleThroughGeometry=o.visibleThroughGeometry),o.position!==void 0&&(t.position=[o.position.longitude,o.position.latitude],t.altitude=o.position.verticalOffset),{mergedShapeState:t}}S();var na=["visible","altitude","opacity","interactive","preloadGeometry","focusable"];function la(e,o){let t=e,i={};for(let n of o)t[n]!==void 0&&(i[n]=t[n]);return i}function pa(e,o){let t=e,i=o,n=0;for(let f in t){let d=t[f];if(d!==void 0){if(typeof d=="object"&&d!==null||typeof d=="function"||i[f]!==d)return!1;n++}}return n>0}S();import ie from"zod";var dt="text3d",ct=ie.object({type:ie.literal(dt).default(dt),position:ie.custom(e=>e instanceof L,{error:"Must be a Coordinate instance"})}),ut=ze.extend({...ct.shape}),Sa=Xe.extend({...ct.shape}).partial(),ba=ie.strictObject(ut.shape);function ha(e){let{position:o,type:t,...i}=e;return{...i,...o?{position:[o.longitude,o.latitude,o.verticalOffset]}:{}}}function Ta(e){let{position:o,visible:t,color:i,flipToFaceCamera:n,font:f,fontSize:d,outlineColor:c,outlineOpacity:T,outlineBlur:x,outlineWidth:m,outlineOffsetX:u,outlineOffsetY:b,strokeWidth:M,strokeOpacity:O,strokeColor:A,fillOpacity:R,hoverColor:I,rotation:j,content:p}=e;return _(ut,{position:new L({latitude:o?.[1]??0,longitude:o?.[0]??0}),visible:t,color:i,flipToFaceCamera:n,font:f,fontSize:d,outlineColor:c,outlineOpacity:T,outlineBlur:x,outlineWidth:m,outlineOffsetX:u,outlineOffsetY:b,strokeWidth:M,strokeOpacity:O,strokeColor:A,fillOpacity:R,hoverColor:I,rotation:j,content:p})}S();import D from"zod";var ft="walls",xe=D.object({type:D.literal(ft).default(ft),color:D.string().default("#ffffff"),topColor:D.string().optional(),texture:D.object({url:D.string()}).or(D.undefined()),topTexture:D.object({url:D.string()}).or(D.undefined()),visible:D.boolean().default(!0),height:D.number().default(0),opacity:D.number().default(1)}),xa=xe.partial(),Ra=D.strictObject(xe.shape);function Pa(e){let{color:o,topColor:t,texture:i,topTexture:n,visible:f,height:d,opacity:c}=e;return _(xe,{visible:f,color:o,topColor:t,texture:i?{url:i}:void 0,topTexture:n?{url:n}:void 0,height:d,opacity:c})}function Aa(e,o){let t={};return o==null||(e.color&&(e.color==="initial"?t.color=o.initialColor:t.color=e.color),e.topColor&&(e.topColor==="initial"?t.topColor=o.initialTopColor:t.topColor=e.topColor),e.visible!==void 0&&(t.visible=e.visible),e.texture?.url!==void 0&&(t.texture=e.texture.url),e.topTexture?.url!==void 0&&(t.topTexture=e.topTexture.url),e.height!==void 0&&(t.height=e.height),e.opacity!==void 0&&(t.opacity=e.opacity)),t}S();import{z as G}from"zod";var Re="image3d",Dt=G.object({type:G.literal(Re).default(Re),visible:G.boolean().default(!0),opacity:G.number().min(0).max(1).default(1),position:G.custom(e=>e instanceof L,{error:"Must be a Coordinate instance"}),width:G.number().default(1),height:G.number().default(1),rotation:G.number().default(0),verticalOffset:G.number().default(0),flipImagesToFaceCamera:G.boolean().default(!1),interactive:G.boolean().default(!1)}),Ma=Dt.partial();function Oa(e){let{position:o,flipImagesToFaceCamera:t,type:i,...n}=e;return{...n,...o?{position:[o.longitude,o.latitude]}:{},...t!=null?{flipImageToFaceCamera:t}:{}}}function va(e){let{position:o}=e;return{type:Re,visible:e.visible??!0,opacity:e.opacity??1,position:new L({latitude:o?.[1]??0,longitude:o?.[0]??0,verticalOffset:o?.[2]}),width:e.width??1,height:e.height??1,rotation:e.rotation??0,verticalOffset:e.verticalOffset??0,flipImagesToFaceCamera:e.flipImageToFaceCamera??!1,interactive:e.interactive??!1}}S();import{z as l}from"zod";var mt="model",Pe=je.extend({type:l.literal(mt).default(mt),color:l.string().optional(),position:l.custom(e=>L.is(e),{error:"Expected a Coordinate"}),visible:l.boolean().default(!0),rotation:l.tuple([l.number(),l.number(),l.number()]).default([0,0,0]),scale:l.tuple([l.number(),l.number(),l.number()]).default([1,1,1]),verticalOffset:l.number().default(0),opacity:l.number().default(1),material:l.record(l.string(),Ue).optional(),interactive:l.boolean().default(!1),clippingPlaneZOffset:l.custom(e=>typeof e=="number"&&!Number.isNaN(e),{message:"Must be a valid number (including Infinity)"}).default(1/0),clippingPlaneTopColor:l.string().default("#E67B5B"),clippingPlaneTopVisible:l.boolean().default(!0),castShadow:l.boolean().default(!0),receiveShadow:l.boolean().default(!0),clippingEnabled:l.boolean().default(!1)}),Fa=Pe.extend({scale:l.union([l.number(),l.tuple([l.number(),l.number(),l.number()])]),rotation:l.union([l.number(),l.tuple([l.number(),l.number(),l.number()])])}).omit({castShadow:!0,receiveShadow:!0,clippingEnabled:!0}).partial(),wa=l.strictObject(Pe.shape);function Ha(e){let{color:o,position:t,rotation:i,scale:n,visible:f,interactive:d,opacity:c,material:T,verticalOffset:x,parent:m,clippingPlaneZOffset:u,clippingPlaneTopColor:b,clippingPlaneTopVisible:M,castShadow:O,receiveShadow:A,clippingEnabled:R}=e,I=typeof m=="object"?m?.id?.toString():m?.toString(),j=`${B}-`,p=I?.startsWith(j)?I.slice(j.length):I;return _(Pe,{color:o,position:new L({latitude:t?.[1]??0,longitude:t?.[0]??0,verticalOffset:t?.[2],floorId:p}),rotation:i,scale:n,visible:f,interactive:d,opacity:c,material:T,verticalOffset:x,clippingPlaneZOffset:u,clippingPlaneTopColor:b,clippingPlaneTopVisible:M,castShadow:O,receiveShadow:A,clippingEnabled:R})}S();export{Ve as a,zt as b,Ft as c,wt as d,Vt as e,Zt as f,Kt as g,Jt as h,oo as i,ro as j,$ as k,fo as l,mo as m,So as n,bo as o,ho as p,To as q,Eo as r,yo as s,go as t,_o as u,Po as v,Do as w,Oo as x,vo as y,ye as z,Uo as A,zo as B,Xo as C,ge as D,Bo as E,Vo as F,$o as G,Lt as H,oa as I,aa as J,na as K,la as L,pa as M,Sa as N,ha as O,Ta as P,xa as Q,Pa as R,Aa as S,Ma as T,Oa as U,va as V,Fa as W,Ha as X};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as h,g as hn,h as nt,l as pe,m as pn}from"./chunk-7B7J4IXM.js";import{b as Xi,d as qi}from"./chunk-PWEV3AFA.js";var Ti=Xi((We,Pe)=>{h();var sa=200,ai="__lodash_hash_undefined__",oa=800,la=16,si=9007199254740991,oi="[object Arguments]",ua="[object Array]",ca="[object AsyncFunction]",ha="[object Boolean]",pa="[object Date]",da="[object Error]",li="[object Function]",fa="[object GeneratorFunction]",ma="[object Map]",ba="[object Number]",ga="[object Null]",ui="[object Object]",ya="[object Proxy]",_a="[object RegExp]",xa="[object Set]",va="[object String]",Ca="[object Undefined]",Sa="[object WeakMap]",Ta="[object ArrayBuffer]",wa="[object DataView]",Ia="[object Float32Array]",Ea="[object Float64Array]",Pa="[object Int8Array]",Aa="[object Int16Array]",Ra="[object Int32Array]",Oa="[object Uint8Array]",Ma="[object Uint8ClampedArray]",Da="[object Uint16Array]",La="[object Uint32Array]",ka=/[\\^$.*+?()[\]{}|]/g,Fa=/^\[object .+?Constructor\]$/,Na=/^(?:0|[1-9]\d*)$/,D={};D[Ia]=D[Ea]=D[Pa]=D[Aa]=D[Ra]=D[Oa]=D[Ma]=D[Da]=D[La]=!0;D[oi]=D[ua]=D[Ta]=D[ha]=D[wa]=D[pa]=D[da]=D[li]=D[ma]=D[ba]=D[ui]=D[_a]=D[xa]=D[va]=D[Sa]=!1;var ci=typeof global=="object"&&global&&global.Object===Object&&global,Ba=typeof self=="object"&&self&&self.Object===Object&&self,Ve=ci||Ba||Function("return this")(),hi=typeof We=="object"&&We&&!We.nodeType&&We,Ue=hi&&typeof Pe=="object"&&Pe&&!Pe.nodeType&&Pe,pi=Ue&&Ue.exports===hi,Ut=pi&&ci.process,Kn=(function(){try{var t=Ue&&Ue.require&&Ue.require("util").types;return t||Ut&&Ut.binding&&Ut.binding("util")}catch{}})(),Zn=Kn&&Kn.isTypedArray;function za(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ha(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Wa(t){return function(e){return t(e)}}function Ua(t,e){return t?.[e]}function ja(t,e){return function(n){return t(e(n))}}var Va=Array.prototype,Ga=Function.prototype,pt=Object.prototype,jt=Ve["__core-js_shared__"],dt=Ga.toString,se=pt.hasOwnProperty,Qn=(function(){var t=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),di=pt.toString,Xa=dt.call(Object),qa=RegExp("^"+dt.call(se).replace(ka,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=pi?Ve.Buffer:void 0,Jn=Ve.Symbol,ei=Ve.Uint8Array,ti=ct?ct.allocUnsafe:void 0,fi=ja(Object.getPrototypeOf,Object),ni=Object.create,$a=pt.propertyIsEnumerable,Ya=Va.splice,ye=Jn?Jn.toStringTag:void 0,ht=(function(){try{var t=Yt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Ka=ct?ct.isBuffer:void 0,ii=Math.max,Za=Date.now,mi=Yt(Ve,"Map"),je=Yt(Object,"create"),Qa=(function(){function t(){}return function(e){if(!xe(e))return{};if(ni)return ni(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function _e(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Ja(){this.__data__=je?je(null):{},this.size=0}function es(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ts(t){var e=this.__data__;if(je){var n=e[t];return n===ai?void 0:n}return se.call(e,t)?e[t]:void 0}function ns(t){var e=this.__data__;return je?e[t]!==void 0:se.call(e,t)}function is(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=je&&e===void 0?ai:e,this}_e.prototype.clear=Ja;_e.prototype.delete=es;_e.prototype.get=ts;_e.prototype.has=ns;_e.prototype.set=is;function oe(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function rs(){this.__data__=[],this.size=0}function as(t){var e=this.__data__,n=ft(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Ya.call(e,n,1),--this.size,!0}function ss(t){var e=this.__data__,n=ft(e,t);return n<0?void 0:e[n][1]}function os(t){return ft(this.__data__,t)>-1}function ls(t,e){var n=this.__data__,i=ft(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}oe.prototype.clear=rs;oe.prototype.delete=as;oe.prototype.get=ss;oe.prototype.has=os;oe.prototype.set=ls;function Ae(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function us(){this.size=0,this.__data__={hash:new _e,map:new(mi||oe),string:new _e}}function cs(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e}function hs(t){return bt(this,t).get(t)}function ps(t){return bt(this,t).has(t)}function ds(t,e){var n=bt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}Ae.prototype.clear=us;Ae.prototype.delete=cs;Ae.prototype.get=hs;Ae.prototype.has=ps;Ae.prototype.set=ds;function Re(t){var e=this.__data__=new oe(t);this.size=e.size}function fs(){this.__data__=new oe,this.size=0}function ms(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function bs(t){return this.__data__.get(t)}function gs(t){return this.__data__.has(t)}function ys(t,e){var n=this.__data__;if(n instanceof oe){var i=n.__data__;if(!mi||i.length<sa-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ae(i)}return n.set(t,e),this.size=n.size,this}Re.prototype.clear=fs;Re.prototype.delete=ms;Re.prototype.get=bs;Re.prototype.has=gs;Re.prototype.set=ys;function _s(t,e){var n=qt(t),i=!n&&Xt(t),r=!n&&!i&&_i(t),a=!n&&!i&&!r&&vi(t),s=n||i||r||a,o=s?Ha(t.length,String):[],l=o.length;for(var c in t)(e||se.call(t,c))&&!(s&&(c=="length"||r&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gi(c,l)))&&o.push(c);return o}function Vt(t,e,n){(n!==void 0&&!gt(t[e],n)||n===void 0&&!(e in t))&&$t(t,e,n)}function xs(t,e,n){var i=t[e];(!(se.call(t,e)&>(i,n))||n===void 0&&!(e in t))&&$t(t,e,n)}function ft(t,e){for(var n=t.length;n--;)if(gt(t[n][0],e))return n;return-1}function $t(t,e,n){e=="__proto__"&&ht?ht(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var vs=Ls();function mt(t){return t==null?t===void 0?Ca:ga:ye&&ye in Object(t)?ks(t):Ws(t)}function ri(t){return Ge(t)&&mt(t)==oi}function Cs(t){if(!xe(t)||zs(t))return!1;var e=Zt(t)?qa:Fa;return e.test(Gs(t))}function Ss(t){return Ge(t)&&xi(t.length)&&!!D[mt(t)]}function Ts(t){if(!xe(t))return Hs(t);var e=yi(t),n=[];for(var i in t)i=="constructor"&&(e||!se.call(t,i))||n.push(i);return n}function bi(t,e,n,i,r){t!==e&&vs(e,function(a,s){if(r||(r=new Re),xe(a))ws(t,e,s,n,bi,i,r);else{var o=i?i(Gt(t,s),a,s+"",t,e,r):void 0;o===void 0&&(o=a),Vt(t,s,o)}},Ci)}function ws(t,e,n,i,r,a,s){var o=Gt(t,n),l=Gt(e,n),c=s.get(l);if(c){Vt(t,n,c);return}var u=a?a(o,l,n+"",t,e,s):void 0,d=u===void 0;if(d){var b=qt(l),p=!b&&_i(l),f=!b&&!p&&vi(l);u=l,b||p||f?qt(o)?u=o:Xs(o)?u=Os(o):p?(d=!1,u=Ps(l,!0)):f?(d=!1,u=Rs(l,!0)):u=[]:qs(l)||Xt(l)?(u=o,Xt(o)?u=$s(o):(!xe(o)||Zt(o))&&(u=Fs(l))):d=!1}d&&(s.set(l,u),r(u,l,i,a,s),s.delete(l)),Vt(t,n,u)}function Is(t,e){return js(Us(t,e,Si),t+"")}var Es=ht?function(t,e){return ht(t,"toString",{configurable:!0,enumerable:!1,value:Ks(e),writable:!0})}:Si;function Ps(t,e){if(e)return t.slice();var n=t.length,i=ti?ti(n):new t.constructor(n);return t.copy(i),i}function As(t){var e=new t.constructor(t.byteLength);return new ei(e).set(new ei(t)),e}function Rs(t,e){var n=e?As(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Os(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function Ms(t,e,n,i){var r=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var o=e[a],l=i?i(n[o],t[o],o,n,t):void 0;l===void 0&&(l=t[o]),r?$t(n,o,l):xs(n,o,l)}return n}function Ds(t){return Is(function(e,n){var i=-1,r=n.length,a=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(r--,a):void 0,s&&Ns(n[0],n[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++i<r;){var o=n[i];o&&t(e,o,i,a)}return e})}function Ls(t){return function(e,n,i){for(var r=-1,a=Object(e),s=i(e),o=s.length;o--;){var l=s[t?o:++r];if(n(a[l],l,a)===!1)break}return e}}function bt(t,e){var n=t.__data__;return Bs(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Yt(t,e){var n=Ua(t,e);return Cs(n)?n:void 0}function ks(t){var e=se.call(t,ye),n=t[ye];try{t[ye]=void 0;var i=!0}catch{}var r=di.call(t);return i&&(e?t[ye]=n:delete t[ye]),r}function Fs(t){return typeof t.constructor=="function"&&!yi(t)?Qa(fi(t)):{}}function gi(t,e){var n=typeof t;return e=e??si,!!e&&(n=="number"||n!="symbol"&&Na.test(t))&&t>-1&&t%1==0&&t<e}function Ns(t,e,n){if(!xe(n))return!1;var i=typeof e;return(i=="number"?Kt(n)&&gi(e,n.length):i=="string"&&e in n)?gt(n[e],t):!1}function Bs(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function zs(t){return!!Qn&&Qn in t}function yi(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||pt;return t===n}function Hs(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Ws(t){return di.call(t)}function Us(t,e,n){return e=ii(e===void 0?t.length-1:e,0),function(){for(var i=arguments,r=-1,a=ii(i.length-e,0),s=Array(a);++r<a;)s[r]=i[e+r];r=-1;for(var o=Array(e+1);++r<e;)o[r]=i[r];return o[e]=n(s),za(t,this,o)}}function Gt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var js=Vs(Es);function Vs(t){var e=0,n=0;return function(){var i=Za(),r=la-(i-n);if(n=i,r>0){if(++e>=oa)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Gs(t){if(t!=null){try{return dt.call(t)}catch{}try{return t+""}catch{}}return""}function gt(t,e){return t===e||t!==t&&e!==e}var Xt=ri((function(){return arguments})())?ri:function(t){return Ge(t)&&se.call(t,"callee")&&!$a.call(t,"callee")},qt=Array.isArray;function Kt(t){return t!=null&&xi(t.length)&&!Zt(t)}function Xs(t){return Ge(t)&&Kt(t)}var _i=Ka||Zs;function Zt(t){if(!xe(t))return!1;var e=mt(t);return e==li||e==fa||e==ca||e==ya}function xi(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=si}function xe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ge(t){return t!=null&&typeof t=="object"}function qs(t){if(!Ge(t)||mt(t)!=ui)return!1;var e=fi(t);if(e===null)return!0;var n=se.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&dt.call(n)==Xa}var vi=Zn?Wa(Zn):Ss;function $s(t){return Ms(t,Ci(t))}function Ci(t){return Kt(t)?_s(t,!0):Ts(t)}var Ys=Ds(function(t,e,n){bi(t,e,n)});function Ks(t){return function(){return t}}function Si(t){return t}function Zs(){return!1}Pe.exports=Ys});h();var dn=["ease-in","ease-out","ease-in-out","linear","ease-out-cubic"];var it=t=>t,$i=t=>t*t,Et=t=>1-Math.cos(t*Math.PI/2),Yi=t=>1-(1-t)*(1-t),Ki=t=>1-Math.pow(1-t,3),fn={linear:it,"ease-in":$i,"ease-out":Yi,"ease-in-out":Et,"ease-out-cubic":Ki};function Pt(t,e,n,i,r,a=it){if(e===n)return r;t=Math.max(e,Math.min(t,n));let s=(t-Math.min(e,n))/Math.abs(n-e),o=typeof a=="function"?a(s):fn[a](s);return i+o*(r-i)}function Zi(t,e){let n=0;if(e.length<2)return n;let r=e[0]<e[1]?(a,s)=>a>s:(a,s)=>a<s;for(;n<e.length-1&&r(t,e[n+1]);)n++;return n>e.length-2?Math.max(0,e.length-2):n}function mn(t,e,n,i="ease-in"){if(e.length!==n.length)throw new pn("Input and output ranges must have the same number of values.");t=Math.max(e[0],Math.min(t,e[e.length-1]));let r=Zi(t,e),a=(t-e[r])/(e[r+1]-e[r]),s=typeof i=="function"?i(a):fn[i](a);return n[r]+s*(n[r+1]-n[r])}h();h();var ee=Object.freeze({Linear:Object.freeze({None:function(t){return t},In:function(t){return t},Out:function(t){return t},InOut:function(t){return t}}),Quadratic:Object.freeze({In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}}),Cubic:Object.freeze({In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}}),Quartic:Object.freeze({In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}}),Quintic:Object.freeze({In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}}),Sinusoidal:Object.freeze({In:function(t){return 1-Math.sin((1-t)*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.sin(Math.PI*(.5-t)))}}),Exponential:Object.freeze({In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}}),Circular:Object.freeze({In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}}),Elastic:Object.freeze({In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(t){var e=1.70158;return t===1?1:t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return t===0?0:--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}}),Bounce:Object.freeze({In:function(t){return 1-ee.Bounce.Out(1-t)},Out:function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375},InOut:function(t){return t<.5?ee.Bounce.In(t*2)*.5:ee.Bounce.Out(t*2-1)*.5+.5}}),generatePow:function(t){return t===void 0&&(t=4),t=t<Number.EPSILON?Number.EPSILON:t,t=t>1e4?1e4:t,{In:function(e){return Math.pow(e,t)},Out:function(e){return 1-Math.pow(1-e,t)},InOut:function(e){return e<.5?Math.pow(e*2,t)/2:(1-Math.pow(2-e*2,t))/2+.5}}}}),Fe=function(){return performance.now()},Qi=(function(){function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return t.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var r=0,a=n;r<a.length;r++){var s=a[r];(e=s._group)===null||e===void 0||e.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},t.prototype.remove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var i=0,r=e;i<r.length;i++){var a=r[i];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},t.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},t.prototype.update=function(e,n){e===void 0&&(e=Fe()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<i.length;r++){var a=this._tweens[i[r]],s=!n;a&&a.update(e,s)===!1&&!n&&this.remove(a)}i=Object.keys(this._tweensAddedDuringUpdate)}},t})(),we={Linear:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),a=we.Utils.Linear;return e<0?a(t[0],t[1],i):e>1?a(t[n],t[n-1],n-i):a(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){for(var n=0,i=t.length-1,r=Math.pow,a=we.Utils.Bernstein,s=0;s<=i;s++)n+=r(1-e,i-s)*r(e,s)*t[s]*a(i,s);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),a=we.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),a(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):a(t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2],i-r)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=we.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(function(){var t=[1];return function(e){var n=1;if(t[e])return t[e];for(var i=e;i>1;i--)n*=i;return t[e]=n,n}})(),CatmullRom:function(t,e,n,i,r){var a=(n-t)*.5,s=(i-e)*.5,o=r*r,l=r*o;return(2*e-2*n+a+s)*l+(-3*e+3*n-2*a-s)*o+a*r+e}}},bn=(function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t})(),At=new Qi,_o=(function(){function t(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ee.Linear.None,this._interpolationFunction=we.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=bn.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=At,At.add(this))}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.getDuration=function(){return this._duration},t.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},t.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},t.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},t.prototype.start=function(e,n){if(e===void 0&&(e=Fe()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var r={};for(var a in this._valuesEnd)r[a]=this._valuesEnd[a];this._valuesEnd=r}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},t.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},t.prototype._setupProperties=function(e,n,i,r,a){for(var s in i){var o=e[s],l=Array.isArray(o),c=l?"array":typeof o,u=!l&&Array.isArray(i[s]);if(!(c==="undefined"||c==="function")){if(u){var d=i[s];if(d.length===0)continue;for(var b=[o],p=0,f=d.length;p<f;p+=1){var T=this._handleRelativeValue(o,d[p]);if(isNaN(T)){u=!1,console.warn("Found invalid interpolation list. Skipping.");break}b.push(T)}u&&(i[s]=b)}if((c==="object"||l)&&o&&!u){n[s]=l?[]:{};var y=o;for(var m in y)n[s][m]=y[m];r[s]=l?[]:{};var d=i[s];if(!this._isDynamic){var _={};for(var m in d)_[m]=d[m];i[s]=d=_}this._setupProperties(y,n[s],d,r[s],a)}else(typeof n[s]>"u"||a)&&(n[s]=o),l||(n[s]*=1),u?r[s]=i[s].slice().reverse():r[s]=n[s]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},t.prototype.pause=function(e){return e===void 0&&(e=Fe()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},t.prototype.resume=function(e){return e===void 0&&(e=Fe()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},t.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},t.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},t.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},t.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},t.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},t.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},t.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},t.prototype.easing=function(e){return e===void 0&&(e=ee.Linear.None),this._easingFunction=e,this},t.prototype.interpolation=function(e){return e===void 0&&(e=we.Linear),this._interpolationFunction=e,this},t.prototype.chain=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._chainedTweens=e,this},t.prototype.onStart=function(e){return this._onStartCallback=e,this},t.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},t.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},t.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},t.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},t.prototype.onStop=function(e){return this._onStopCallback=e,this},t.prototype.update=function(e,n){var i=this,r;if(e===void 0&&(e=Fe()),n===void 0&&(n=t.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=e-this._startTime,o=this._duration+((r=this._repeatDelayTime)!==null&&r!==void 0?r:this._delayTime),l=this._duration+this._repeat*o,c=function(){if(i._duration===0||s>l)return 1;var T=Math.trunc(s/o),y=s-T*o,m=Math.min(y/i._duration,1);return m===0&&s===i._duration?1:m},u=c(),d=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),this._duration===0||s>=this._duration)if(this._repeat>0){var b=Math.min(Math.trunc((s-this._duration)/o)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=b);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=o*b,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,f=this._chainedTweens.length;p<f;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(e,n,i,r){for(var a in i)if(n[a]!==void 0){var s=n[a]||0,o=i[a],l=Array.isArray(e[a]),c=Array.isArray(o),u=!l&&c;u?e[a]=this._interpolationFunction(o,r):typeof o=="object"&&o?this._updateProperties(e[a],s,o,r):(o=this._handleRelativeValue(s,o),typeof o=="number"&&(e[a]=s+(o-s)*r))}},t.prototype._handleRelativeValue=function(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)},t.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],i=this._valuesEnd[e];typeof i=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(i):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},t.autoStartOnUpdate=!1,t})();var xo=bn.nextId,te=At,vo=te.getAll.bind(te),Co=te.removeAll.bind(te),So=te.add.bind(te),To=te.remove.bind(te),wo=te.update.bind(te);h();var rt=null,gn=new WeakMap;function yn(t){rt=t}function Ne(){return rt!==null}function ne(t,e){if(!rt)return e===void 0?t.getContext("2d"):t.getContext("2d",e);let n=gn.get(t);if(n)return n;let i=rt(t,e);return i&&gn.set(t,i),i}h();var Ji=Symbol.for("mappedin.headless-context-2d"),er=.6,tr="10px sans-serif",Rt=()=>({font:tr,fillStyle:"#000000",strokeStyle:"#000000",globalAlpha:1,globalCompositeOperation:"source-over",lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,lineDashOffset:0,textAlign:"start",textBaseline:"alphabetic",direction:"inherit",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0)",shadowOffsetX:0,shadowOffsetY:0,imageSmoothingEnabled:!0,filter:"none",lineDash:[]}),nr=["clearRect","fillRect","strokeRect","fillText","strokeText","drawImage","putImageData","beginPath","closePath","moveTo","lineTo","bezierCurveTo","quadraticCurveTo","arc","arcTo","ellipse","rect","roundRect","fill","stroke","clip","drawFocusIfNeeded","translate","rotate","scale","transform","setTransform","resetTransform"];function ir(t){let e=/(\d*\.?\d+)px/.exec(t);return e?Number(e[1]):10}function Ot(t,e){let n=Math.max(0,Math.floor(Math.abs(t))),i=Math.max(0,Math.floor(Math.abs(e)));return{width:n,height:i,data:new Uint8ClampedArray(n*i*4),colorSpace:"srgb"}}var Dt=()=>{},Mt=()=>({addColorStop:Dt}),rr=()=>({a:1,b:0,c:0,d:1,e:0,f:0});function _n(t){let e=Rt(),n=[],i={[Ji]:!0,canvas:t,save:()=>n.push({...e,lineDash:[...e.lineDash]}),restore:()=>{e=n.pop()??e},reset:()=>{e=Rt(),n.length=0},measureText:r=>{let a=ir(e.font),s=a*er*r.length;return{width:s,actualBoundingBoxLeft:0,actualBoundingBoxRight:s,actualBoundingBoxAscent:a*.8,actualBoundingBoxDescent:a*.2,fontBoundingBoxAscent:a*.8,fontBoundingBoxDescent:a*.2,emHeightAscent:a*.8,emHeightDescent:a*.2,alphabeticBaseline:0,hangingBaseline:a*.8,ideographicBaseline:-a*.2}},getImageData:(r,a,s,o)=>Ot(s,o),createImageData:(r,a)=>typeof r=="number"?Ot(r,a??0):Ot(r.width,r.height),createLinearGradient:Mt,createRadialGradient:Mt,createConicGradient:Mt,createPattern:()=>({setTransform:Dt}),getLineDash:()=>[...e.lineDash],setLineDash:r=>{e.lineDash=[...r]},getTransform:rr,isPointInPath:()=>!1,isPointInStroke:()=>!1,getContextAttributes:()=>({alpha:!0,desynchronized:!1,colorSpace:"srgb",willReadFrequently:!1}),isContextLost:()=>!1};for(let r of nr)i[r]=Dt;for(let r of Object.keys(Rt()))r!=="lineDash"&&Object.defineProperty(i,r,{enumerable:!0,get:()=>e[r],set:a=>{e[r]=a}});return i}var ar={linear:ee.Linear.None,"ease-in":ee.Quadratic.In,"ease-out":ee.Quadratic.Out,"ease-in-out":ee.Quadratic.InOut};var sr={tension:0,cornerRadius:.5},or={size:1.2,gapSize:.6},lr="mappedin",ur="collision-worker.csp.js",cr="maplibre-worker.csp.js",xn="";function hr(t){xn=t}var vn="";function pr(t){vn=t}var Lt=!1,Cn=!0;function dr(t){Lt=!0,Cn=t?.standalone??!0,yn(_n)}function fr(){return Lt}function mr(){return Lt&&Cn}var Sn={width:1920,height:1080};function br(){return{...Sn}}function gr(t){let{width:e,height:n}=t;if(!(Number.isFinite(e)&&e>0&&Number.isFinite(n)&&n>0))throw new Error("[MappedinJS] setHeadlessViewport: width and height must be positive finite numbers");Sn={width:e,height:n}}var Tn=!0;function yr(t){Tn=t}function _r(){return Tn}h();h();h();import H from"zod";var kt=H.enum(dn),xr=t=>{let e=t[0];for(let n=1;n<t.length;n++){let i=t[n];if(i<=e)return!1;e=i}return!0},vr=t=>{let e=t[0];for(let n=1;n<t.length;n++){let i=t[n];if(i>=e)return!1;e=i}return!0},wn=t=>xr(t)||vr(t),Cr=H.object({on:H.literal("zoom-level"),input:H.tuple([H.number()]).rest(H.number()).refine(wn,{message:"input array must be strictly increasing or decreasing"}),output:H.tuple([H.number()]).rest(H.number()),easing:kt.default("linear")}).refine(t=>t.input.length===t.output.length,{message:"input and output must have the same length"}),at=/^\d+(\.\d+)?px$/;function Ft(t){return typeof t=="string"&&at.test(t)}function Sr(t){return parseFloat(t)}function In(t){return typeof t=="object"&&t!==null&&"output"in t&&Array.isArray(t.output)&&t.output.length>0&&Ft(t.output[0])}function Tr(t){return Ft(t)||In(t)}var wr=H.object({on:H.literal("zoom-level"),input:H.tuple([H.number()]).rest(H.number()).refine(wn,{message:"input array must be strictly increasing or decreasing"}),output:H.tuple([H.string().regex(at)]).rest(H.string().regex(at)),easing:kt.default("linear")}).refine(t=>t.input.length===t.output.length,{message:"input and output must have the same length"});h();h();h();h();h();h();h();import{z as W}from"zod";var En=W.object({rotation:W.array(W.number()).length(3).optional(),altitude:W.number().optional(),scale:W.array(W.number()).length(3).optional(),interactive:W.boolean().optional(),verticalOffset:W.number().optional(),id:W.union([W.number(),W.string()]).optional()}),Pn=W.object({color:W.string()});h();import{z as I}from"zod";var Nt=I.object({visible:I.boolean(),color:I.string(),flipToFaceCamera:I.boolean(),font:I.string().optional(),fontSize:I.number(),margin:I.union([I.number(),I.tuple([I.number(),I.number(),I.number(),I.number()])]),outlineColor:I.string(),outlineOpacity:I.number(),outlineBlur:I.union([I.number(),I.string()]),outlineWidth:I.number(),outlineOffsetX:I.number(),outlineOffsetY:I.number(),strokeWidth:I.number(),maxWidth:I.number().optional(),maxHeight:I.number().optional(),strokeOpacity:I.number(),strokeColor:I.string(),fillOpacity:I.number(),hoverColor:I.string().optional(),id:I.union([I.string(),I.number()]),type:I.literal("text3d"),position:I.tuple([I.number(),I.number(),I.number()]),content:I.string(),rotation:I.number(),align:I.enum(["left","center","right"]).optional()}),Bt=I.strictObject(Nt.partial().omit({id:!0,type:!0}).shape),An=I.strictObject(Bt.omit({margin:!0,maxWidth:!0,maxHeight:!0}).shape);h();import*as Ee from"zod";h();var Pr=Ee.union([Ee.enum(["low","medium","high","always-visible"]),Ee.number()]),Rn=["","","low","medium","high","always-visible"];function On(t){return Math.min(5,Math.max(2,t))}function Be(t){if(typeof t=="number")return On(t);let e=Rn.indexOf(t);return e===-1?3:e}function Ar(t){let e=On(t);return Rn[e]}h();function st(t){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(t)}var Rr=/^\s+/,Or=/\s+$/;function g(t,e){if(t=t||"",e=e||{},t instanceof g)return t;if(!(this instanceof g))return new g(t,e);var n=Mr(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}g.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,i,r,a,s,o;return n=e.r/255,i=e.g/255,r=e.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),.2126*a+.7152*s+.0722*o},setAlpha:function(e){return this._a=Bn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Dn(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Dn(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+i+"%, "+r+"%)":"hsva("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Mn(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Mn(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+i+"%, "+r+"%)":"hsla("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Ln(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Fr(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(k(this._r,255)*100)+"%",g:Math.round(k(this._g,255)*100)+"%",b:Math.round(k(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(k(this._r,255)*100)+"%, "+Math.round(k(this._g,255)*100)+"%, "+Math.round(k(this._b,255)*100)+"%)":"rgba("+Math.round(k(this._r,255)*100)+"%, "+Math.round(k(this._g,255)*100)+"%, "+Math.round(k(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:$r[Ln(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+kn(this._r,this._g,this._b,this._a),i=n,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=g(e);i="#"+kn(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+i+")"},toString:function(e){var n=!!e;e=e||this._format;var i=!1,r=this._a<1&&this._a>=0,a=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return a?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return g(this.toString())},_applyModification:function(e,n){var i=e.apply(null,[this].concat([].slice.call(n)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Hr,arguments)},brighten:function(){return this._applyModification(Wr,arguments)},darken:function(){return this._applyModification(Ur,arguments)},desaturate:function(){return this._applyModification(Nr,arguments)},saturate:function(){return this._applyModification(Br,arguments)},greyscale:function(){return this._applyModification(zr,arguments)},spin:function(){return this._applyModification(jr,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Xr,arguments)},complement:function(){return this._applyCombination(Vr,arguments)},monochromatic:function(){return this._applyCombination(qr,arguments)},splitcomplement:function(){return this._applyCombination(Gr,arguments)},triad:function(){return this._applyCombination(Fn,[3])},tetrad:function(){return this._applyCombination(Fn,[4])}};g.fromRatio=function(t,e){if(st(t)=="object"){var n={};for(var i in t)t.hasOwnProperty(i)&&(i==="a"?n[i]=t[i]:n[i]=ze(t[i]));t=n}return g(t,e)};function Mr(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,a=null,s=!1,o=!1;return typeof t=="string"&&(t=Qr(t)),st(t)=="object"&&(ae(t.r)&&ae(t.g)&&ae(t.b)?(e=Dr(t.r,t.g,t.b),s=!0,o=String(t.r).substr(-1)==="%"?"prgb":"rgb"):ae(t.h)&&ae(t.s)&&ae(t.v)?(i=ze(t.s),r=ze(t.v),e=kr(t.h,i,r),s=!0,o="hsv"):ae(t.h)&&ae(t.s)&&ae(t.l)&&(i=ze(t.s),a=ze(t.l),e=Lr(t.h,i,a),s=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Bn(n),{ok:s,format:t.format||o,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function Dr(t,e,n){return{r:k(t,255)*255,g:k(e,255)*255,b:k(n,255)*255}}function Mn(t,e,n){t=k(t,255),e=k(e,255),n=k(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),a,s,o=(i+r)/2;if(i==r)a=s=0;else{var l=i-r;switch(s=o>.5?l/(2-i-r):l/(i+r),i){case t:a=(e-n)/l+(e<n?6:0);break;case e:a=(n-t)/l+2;break;case n:a=(t-e)/l+4;break}a/=6}return{h:a,s,l:o}}function Lr(t,e,n){var i,r,a;t=k(t,360),e=k(e,100),n=k(n,100);function s(c,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?c+(u-c)*6*d:d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}if(e===0)i=r=a=n;else{var o=n<.5?n*(1+e):n+e-n*e,l=2*n-o;i=s(l,o,t+1/3),r=s(l,o,t),a=s(l,o,t-1/3)}return{r:i*255,g:r*255,b:a*255}}function Dn(t,e,n){t=k(t,255),e=k(e,255),n=k(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),a,s,o=i,l=i-r;if(s=i===0?0:l/i,i==r)a=0;else{switch(i){case t:a=(e-n)/l+(e<n?6:0);break;case e:a=(n-t)/l+2;break;case n:a=(t-e)/l+4;break}a/=6}return{h:a,s,v:o}}function kr(t,e,n){t=k(t,360)*6,e=k(e,100),n=k(n,100);var i=Math.floor(t),r=t-i,a=n*(1-e),s=n*(1-r*e),o=n*(1-(1-r)*e),l=i%6,c=[n,s,a,a,o,n][l],u=[o,n,n,s,a,a][l],d=[a,a,o,n,n,s][l];return{r:c*255,g:u*255,b:d*255}}function Ln(t,e,n,i){var r=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(n).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Fr(t,e,n,i,r){var a=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(n).toString(16)),Q(zn(i))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function kn(t,e,n,i){var r=[Q(zn(i)),Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(n).toString(16))];return r.join("")}g.equals=function(t,e){return!t||!e?!1:g(t).toRgbString()==g(e).toRgbString()};g.random=function(){return g.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Nr(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.s-=e/100,n.s=ot(n.s),g(n)}function Br(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.s+=e/100,n.s=ot(n.s),g(n)}function zr(t){return g(t).desaturate(100)}function Hr(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.l+=e/100,n.l=ot(n.l),g(n)}function Wr(t,e){e=e===0?0:e||10;var n=g(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),g(n)}function Ur(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.l-=e/100,n.l=ot(n.l),g(n)}function jr(t,e){var n=g(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,g(n)}function Vr(t){var e=g(t).toHsl();return e.h=(e.h+180)%360,g(e)}function Fn(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=g(t).toHsl(),i=[g(t)],r=360/e,a=1;a<e;a++)i.push(g({h:(n.h+a*r)%360,s:n.s,l:n.l}));return i}function Gr(t){var e=g(t).toHsl(),n=e.h;return[g(t),g({h:(n+72)%360,s:e.s,l:e.l}),g({h:(n+216)%360,s:e.s,l:e.l})]}function Xr(t,e,n){e=e||6,n=n||30;var i=g(t).toHsl(),r=360/n,a=[g(t)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,a.push(g(i));return a}function qr(t,e){e=e||6;for(var n=g(t).toHsv(),i=n.h,r=n.s,a=n.v,s=[],o=1/e;e--;)s.push(g({h:i,s:r,v:a})),a=(a+o)%1;return s}g.mix=function(t,e,n){n=n===0?0:n||50;var i=g(t).toRgb(),r=g(e).toRgb(),a=n/100,s={r:(r.r-i.r)*a+i.r,g:(r.g-i.g)*a+i.g,b:(r.b-i.b)*a+i.b,a:(r.a-i.a)*a+i.a};return g(s)};g.readability=function(t,e){var n=g(t),i=g(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)};g.isReadable=function(t,e,n){var i=g.readability(t,e),r,a;switch(a=!1,r=Jr(n),r.level+r.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};g.mostReadable=function(t,e,n){var i=null,r=0,a,s,o,l;n=n||{},s=n.includeFallbackColors,o=n.level,l=n.size;for(var c=0;c<e.length;c++)a=g.readability(t,e[c]),a>r&&(r=a,i=g(e[c]));return g.isReadable(t,i,{level:o,size:l})||!s?i:(n.includeFallbackColors=!1,g.mostReadable(t,["#fff","#000"],n))};var zt=g.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},$r=g.hexNames=Yr(zt);function Yr(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Bn(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){Kr(t)&&(t="100%");var n=Zr(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function ot(t){return Math.min(1,Math.max(0,t))}function U(t){return parseInt(t,16)}function Kr(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Zr(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Q(t){return t.length==1?"0"+t:""+t}function ze(t){return t<=1&&(t=t*100+"%"),t}function zn(t){return Math.round(parseFloat(t)*255).toString(16)}function Nn(t){return U(t)/255}var Z=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ae(t){return!!Z.CSS_UNIT.exec(t)}function Qr(t){t=t.replace(Rr,"").replace(Or,"").toLowerCase();var e=!1;if(zt[t])t=zt[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Z.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Z.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Z.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Z.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Z.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Z.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Z.hex8.exec(t))?{r:U(n[1]),g:U(n[2]),b:U(n[3]),a:Nn(n[4]),format:e?"name":"hex8"}:(n=Z.hex6.exec(t))?{r:U(n[1]),g:U(n[2]),b:U(n[3]),format:e?"name":"hex"}:(n=Z.hex4.exec(t))?{r:U(n[1]+""+n[1]),g:U(n[2]+""+n[2]),b:U(n[3]+""+n[3]),a:Nn(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Z.hex3.exec(t))?{r:U(n[1]+""+n[1]),g:U(n[2]+""+n[2]),b:U(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Jr(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}h();import*as x from"zod";var N={RIGHT:"right",LEFT:"left",TOP:"top",HIDDEN:"hidden",CENTER:"center"},de="low-priority",ea=Object.values(N),Ht=[N.RIGHT,N.LEFT,N.TOP,N.HIDDEN],Hn={MAX_WIDTH:"max-width",BALANCE:"balance"},Wn=Object.values(Hn),ta=x.string(),na=x.object({on:x.literal("zoom-level"),input:x.tuple([x.number()]).rest(x.number()),output:x.tuple([x.number()]).rest(x.number()),easing:ta.default("linear")}).refine(t=>t.input.length===t.output.length,{message:"input and output must have the same length"}),Un=x.object({margin:x.number().min(2).default(6),maxLines:x.number().min(1).default(2),textSize:x.number().min(0).default(11.5),maxWidth:x.number().min(0).default(150),lineHeight:x.number().min(0).default(1.2),textWrap:x.enum(Wn).default("max-width"),color:x.string().default("#333"),outlineColor:x.string().default("white"),textColor:x.string().optional(),textOutlineColor:x.string().optional(),pinColor:x.string().optional(),pinOutlineColor:x.string().optional(),pinColorInactive:x.string().optional(),pinOutlineColorInactive:x.string().optional(),icon:x.string().optional(),iconSize:x.number().min(0).default(20),iconScale:x.union([x.number(),na]).default(1),iconPadding:x.number().min(0).default(2),iconBorderRadiusFactor:x.number().min(0).max(1).default(1),iconFit:x.enum(["fill","contain","cover"]).default("cover"),iconOverflow:x.enum(["visible","hidden"]).default("hidden"),iconVisible:x.union([x.boolean(),x.number()]).default(!0),opacity:x.number().min(0).max(1).default(1),__EXPERIMENTAL_wrapperBackgroundColor:x.string().optional(),__EXPERIMENTAL_wrapperPaddingX:x.number().min(0).default(0),__EXPERIMENTAL_wrapperPaddingY:x.number().min(0).default(0),__EXPERIMENTAL_wrapperBorderRadius:x.number().min(0).default(0),__EXPERIMENTAL_wrapperDotSize:x.number().min(0).default(0),__EXPERIMENTAL_wrapperShadowColor:x.string().optional(),__EXPERIMENTAL_wrapperShadowOffsetX:x.number().default(0),__EXPERIMENTAL_wrapperShadowOffsetY:x.number().default(0),__EXPERIMENTAL_wrapperShadowBlur:x.number().min(0).default(0),__EXPERIMENTAL_wrapperOpacity:x.number().min(0).max(1).default(1)}),jn=t=>{let e={...t};e.color!=null&&(e.textColor==null&&(e.textColor=e.color),e.pinColor==null&&(e.pinColor=e.color)),e.outlineColor!=null&&(e.textOutlineColor==null&&(e.textOutlineColor=e.outlineColor),e.pinOutlineColor==null&&(e.pinOutlineColor=e.outlineColor));let n=e.pinColor??e.color,i=e.pinOutlineColor??e.outlineColor;return n!=null&&e.pinColorInactive==null&&(e.pinColorInactive=g(n).toRgbString()),i!=null&&e.pinOutlineColorInactive==null&&(e.pinOutlineColorInactive=g(i).toRgbString()),e},Vn=Un.transform(t=>jn(t)),Wt=t=>Vn.parse(t);var ia=(t,e)=>["color","outlineColor","maxLines","lineHeight","textSize","maxWidth","textWrap","textColor","textOutlineColor"].some(i=>e[i]!=null&&t[i]!==e[i]),ra=(t,e)=>["color","outlineColor","icon","iconSize","iconScale","iconVisible","iconPadding","iconBorderRadiusFactor","pinColor","pinOutlineColor","pinColorInactive","pinOutlineColorInactive"].some(i=>e[i]!=null&&t[i]!==e[i]),aa=(t,e)=>e.textPlacement!=null&&t.textPlacement!==e.textPlacement||e.appearance?.margin!=null&&t.appearance?.margin!==e.appearance.margin;h();h();var Gn=4,Yn=6.5,lt=Yn/2,Xn=[lt,lt,lt,lt],X=class t{lines=0;id;rank;type="label";initialRank;contextConfigured=!1;fillText=void 0;newStyle={};currentOpacity=0;visibilityNeedsUpdate=!1;activePlacement=N.RIGHT;text;style={top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"};projection={x:0,y:0};labelCacheId;labelCacheKeyInputs={};iconScaleCache={zoom:NaN,input:void 0,output:void 0,easing:void 0,value:1};pinIconKeyInputs={sprite:null};_cache={};appearance;options;visible=!0;enabled=!0;interactive=!1;isOccluded=!1;offscreen=!1;disposed=!1;canShow=!1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};currentStrategyIndex=-1;totalPinSize=0;iconScale=1;get scaledPinSize(){return this.totalPinSize*this.iconScale}iconPadding;get scaledIconPadding(){return this.appearance.iconPadding*this.iconScale}get textVisible(){return this.offscreen||!this.visible||!this.canShow||!this.enabled?!1:this.style.textLabelVisible===!0&&this.style.textAlign!=null&&this.style.left!=null&&this.style.top!=null}dirty=!0;textDirty=!0;pinDirty=!0;attachedDirty=!0;collisionDirty=!0;lastTextAlign;imageHash;pinSize=0;iconVisible=!1;static testId=0;pixelRatio;dp=(e=1)=>e*this.pixelRatio;constructor(e,n,i){if(this.id=n.id??nt(),this.options=n??{},this.text=e,this.pixelRatio=i,typeof n.rank=="string")this.rank=Be(n.rank),this.initialRank=this.rank;else if(n.rank!=null&&n.rank>0)this.rank=n.rank,this.initialRank=n.rank;else{let a=Math.trunc(t.testId*10)/10;t.testId+=.001,this.rank=a,this.initialRank=a}this.options.textPlacement=n.textPlacement??Ht;let r=Wt(n.appearance??{});this.appearance=r,this.iconPadding=r.iconPadding}setPixelRatio(e){e!==this.pixelRatio&&(this.pixelRatio=e,this.dirty=!0,this.pinDirty=!0,this.textDirty=!0,this.collisionDirty=!0)}calculatePinSize(){let e=this.dp();this.iconVisible&&typeof this.appearance.iconSize<"u"&&this.imageHash?this.pinSize=this.dp(this.appearance.iconSize):this.pinSize=this.dp(Yn),this.totalPinSize=Math.ceil((this.pinSize+2.5)/e)}getNoTextBbox(e){let n=this.scaledPinSize/2+e;return[n,n,n,n]}getHiddenTextPlacementBbox(e){return this.iconVisible?this.getNoTextBbox(e):Xn}getBoundingBoxForPlacement(e){let{width:n,height:i}=this.dimensions,{margin:r}=this.appearance;if(this.text==="")return this.getNoTextBbox(r);let a=Math.max(this.scaledPinSize,i);switch(e){case N.RIGHT:return[a/2+r,a/2+r,this.scaledPinSize/2+r,this.scaledPinSize/2+n+r];case N.LEFT:return[a/2+r,a/2+r,this.scaledPinSize/2+n+r,this.scaledPinSize/2+r];case N.TOP:{let s=this.dp();return[i+this.scaledPinSize/2/s+r,this.scaledPinSize/2+r,n/2+r,n/2+r]}case N.CENTER:return[i/2+r,i/2+r,n/2+r,n/2+r];case N.HIDDEN:return this.getHiddenTextPlacementBbox(r);case de:return Xn;default:return this.getNoTextBbox(r)}}getStrategyStyleForPlacement(e){let{width:n,height:i}=this.dimensions;switch(e){case N.TOP:this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-i-this.scaledPinSize/2,this.newStyle.left=-n/2;return;case N.LEFT:this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-i/2,this.newStyle.left=-n-this.scaledPinSize/2-Gn,this.newStyle.textLabelVisible=!0;return;case N.RIGHT:this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-i/2,this.newStyle.left=this.scaledPinSize/2+Gn,this.newStyle.textLabelVisible=!0;return;case N.CENTER:this.newStyle.pinVisibility=0,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-i/2,this.newStyle.left=-n/2;return;case N.HIDDEN:this.newStyle.pinVisibility=this.iconVisible?1:.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0;return;case de:default:this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0;return}}_cachedStrategies=null;invalidateStrategies(){this._cachedStrategies=null}get strategies(){if(this._cachedStrategies)return this._cachedStrategies;let e=Array.isArray(this.options.textPlacement)?this.options.textPlacement:[this.options.textPlacement],n=[],i=!1;for(let r of e){if(r===N.HIDDEN){i=!0;continue}n.push({name:r,getBoundingBox:()=>this.getBoundingBoxForPlacement(r),onStrategySelected:()=>this.getStrategyStyleForPlacement(r)})}return i&&(this.options.rank!=="always-visible"||n.length===0)&&(n.push({name:N.HIDDEN,getBoundingBox:()=>this.getBoundingBoxForPlacement(N.HIDDEN),onStrategySelected:()=>this.getStrategyStyleForPlacement(N.HIDDEN)}),n.push({name:de,getBoundingBox:()=>this.getBoundingBoxForPlacement(de),onStrategySelected:()=>this.getStrategyStyleForPlacement(de)})),this._cachedStrategies=n,n}animate=!0;recomputeCurrentStrategy(e=this.iconScale){let n=this.iconScale!==e;if(n||this.dirty){let i=this.pinDirty,r=this.strategies[this.currentStrategyIndex];if(this.iconScale=e,this.collisionDirty=!0,n&&!i&&this.calculatePinSize(),r){r.onStrategySelected();let a=this.style;this.style=this.newStyle,this.newStyle=a}this.dirty=!1}}onStrategySelected=e=>{if(this.currentStrategyIndex===e)return;this.currentStrategyIndex=e;let n=this.strategies[e];if(this.activePlacement=n?.name??this.activePlacement,n){n.onStrategySelected();let i=this.style;this.style=this.newStyle,this.newStyle=i}};collisionExtent=-1;packedMessage={x:0,y:0,enabled:!1,rank:0,bboxes:[],shouldCollideWithScreenEdges:!1,lockedToStrategyIndex:-1};_validMemoIndex=NaN;_validMemoText;_validMemoStrategies=null;_validMemoValue=!1;toPackedMessage(e=!1){let n=this.currentStrategyIndex,i=this._cachedStrategies,r;if(i!=null&&this._validMemoIndex===n&&this._validMemoText===this.text&&this._validMemoStrategies===i)r=this._validMemoValue;else{let c=this.strategies[n];r=n!=null&&n!==-1&&this.text!==""&&c!=null&&c.name!==N.HIDDEN&&c.name!==de,this._validMemoIndex=n,this._validMemoText=this.text,this._validMemoStrategies=this._cachedStrategies,this._validMemoValue=r}if(this.visible&&e&&this.collisionDirty===!1&&r?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,r&&this.currentStrategyIndex!==this.packedMessage.bboxes[0]?.[4]){let c=this.packedMessage.bboxes;for(let u=1;u<c.length;u++)if(c[u][4]===this.currentStrategyIndex){let d=c[0];c[0]=c[u],c[u]=d;break}}if(!this.collisionDirty)return this.packedMessage;let a=[],s=this.strategies,o=-1,l=0;for(let c=0;c<s.length;c++){let u=s[c].getBoundingBox();a.push([u[0],u[1],u[2],u[3],c]),u[0]>l&&(l=u[0]),u[1]>l&&(l=u[1]),u[2]>l&&(l=u[2]),u[3]>l&&(l=u[3]),r&&c===this.currentStrategyIndex&&(o=a.length-1)}if(o>0){let c=a[0];a[0]=a[o],a[o]=c}return this.packedMessage.bboxes=a,this.collisionExtent=l,this.packedMessage.shouldCollideWithScreenEdges=!1,this.collisionDirty=!1,this.packedMessage}destroy(){}},ut=X;h();var Ii=qi(Ti());h();var O={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",CENTER:"center",TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",HIDDEN:"hidden"},Qs=Object.values(O),Qt=[O.CENTER,O.HIDDEN],wi=Object.freeze({size:8,color:"#666"});var le=class t{id;type="marker";static testId=0;rank=0;initialRank=0;activePlacement="center";pointerEvents="none";options={rank:"low",interactive:!1,id:"",placement:[...Qt],dynamicResize:!1,occlude:!0,occluderId:0,zIndex:void 0,verticalOffset:0,lowPriorityPin:{...wi},animated:!0};projection={x:0,y:0};enabled=!0;interactive=!1;canShow=!1;visible=!0;isOccluded=!1;offscreen=!1;strategyIndex=-1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};markerContainer;containerEl;contentEl=null;contentHtml="";style={top:"0px",left:"0px"};dirty=!1;attachedDirty=!0;collisionDirty=!0;visibilityNeedsUpdate="show";constructor(e,n={}){if(this.id=n?.id||nt(),this.options=(0,Ii.default)(this.options,n),this.options.placement=n.placement??this.options.placement,typeof n.rank=="string")this.rank=Be(n.rank);else if(n.rank!=null&&n.rank>0)this.rank=n.rank;else{let i=Math.trunc(t.testId*10)/10;t.testId+=.001,this.rank=i}typeof n.interactive=="string"&&(this.pointerEvents=n.interactive==="pointer-events-auto"?"auto":"none"),this.contentHtml=e,this.initialRank=this.rank,this.markerContainer=document.createElement("div"),this.markerContainer.className="mappedin-marker",this.markerContainer.style.opacity="0",this.markerContainer.innerHTML=`<div class="mappedin-marker-content">${this.contentHtml}</div>`,this.markerContainer.setAttribute("data-marker-id",this.id.toString()),this.markerContainer.setAttribute("data-animated",String(this.options.animated)),this.containerEl=this.markerContainer.firstElementChild??null,this.contentEl=this.markerContainer.firstElementChild?.firstElementChild??null,this.applyZIndex()}applyZIndex(){this.options.zIndex!=null?this.markerContainer.style.zIndex=String(this.options.zIndex):this.markerContainer.style.removeProperty("z-index")}updateDimensionsIfZeroWidthHeight(e,n){this.dimensions.width===0&&this.dimensions.height===0&&this.updateDimensions(e,n)}updateDimensions(e,n){if(e!=null&&n!=null)this.dimensions={width:e,height:n};else{let{width:i,height:r}=this.markerContainer.getBoundingClientRect();this.dimensions={width:i,height:r}}this.currentStrategyIndex=-1,this.invalidateStrategies()}animation=null;currentStrategyIndex=-1;onStrategySelected=(e,n=!1)=>{if(this.currentStrategyIndex===e&&!n)return;this.currentStrategyIndex=e;let i=this.strategies[e];if(this.activePlacement=i?.name??"center",this.activePlacement===O.HIDDEN){this.markerContainer.setAttribute("data-placement",O.HIDDEN);let r=this.options.lowPriorityPin,a=r.size,s=r.color;this.markerContainer.style.setProperty("--mappedin-pin-size",`${a}px`),this.markerContainer.style.setProperty("--pin-color",s),this.markerContainer.style.opacity="0.6",this.style.top=-a/2+"px",this.style.left=-a/2+"px"}else{this.markerContainer.setAttribute("data-placement",this.activePlacement),this.markerContainer.style.removeProperty("--mappedin-pin-size"),this.markerContainer.style.removeProperty("--pin-color"),this.markerContainer.style.opacity="1";let{width:r,height:a}=this.dimensions,s=-a/2+"px",o=-r/2+"px";switch(this.style.top=s,this.style.left=o,this.activePlacement){case O.TOP:this.style.top=-a+"px";break;case O.BOTTOM:this.style.top="0px";break;case O.LEFT:this.style.left=-r+"px";break;case O.RIGHT:this.style.left="0px";break;case O.TOP_LEFT:this.style.top=-a+"px",this.style.left=-r+"px";break;case O.TOP_RIGHT:this.style.top=-a+"px",this.style.left="0px";break;case O.BOTTOM_LEFT:this.style.top="0px",this.style.left=-r+"px";break;case O.BOTTOM_RIGHT:this.style.top="0px",this.style.left="0px";break;case O.CENTER:default:this.style.top=s,this.style.left=o}}this.markerContainer.style.top=this.style.top,this.markerContainer.style.left=this.style.left};_cachedStrategies=null;invalidateStrategies(){this._cachedStrategies=null,this._cachedLowPriorityPinIndex=null}getBoundingBoxForPlacement(e){let{width:n,height:i}=this.dimensions;switch(e){case O.TOP:return[i+4,4,n/2+4,n/2+4];case O.BOTTOM:return[4,i+4,n/2+4,n/2+4];case O.LEFT:return[i/2+4,i/2+4,n+4,4];case O.RIGHT:return[i/2+4,i/2+4,4,n+4];case O.TOP_LEFT:return[i+4,4,n+4,4];case O.TOP_RIGHT:return[i+4,4,4,n+4];case O.BOTTOM_LEFT:return[4,i+4,n+4,4];case O.BOTTOM_RIGHT:return[4,i+4,4,n+4];case O.HIDDEN:{let r=Math.max(2,4/2),a=this.options.lowPriorityPin.size/2+r;return[a,a,a,a]}default:return[i/2+4,i/2+4,n/2+4,n/2+4]}}get strategies(){if(this._cachedStrategies)return this._cachedStrategies;let{width:e,height:n}=this.dimensions;if(e===0||n===0)return[];let i=Array.isArray(this.options.placement)?this.options.placement:[this.options.placement],r=[],a=!1;for(let s of i){if(s===O.HIDDEN){a=!0;continue}r.push({name:s,getBoundingBox:()=>this.getBoundingBoxForPlacement(s)})}return a&&(this.options.rank!=="always-visible"||r.length===0)&&r.push({name:O.HIDDEN,getBoundingBox:()=>this.getBoundingBoxForPlacement(O.HIDDEN)}),this._cachedStrategies=r,r}collisionExtent=-1;packedMessage={x:0,y:0,enabled:!1,rank:0,bboxes:[],lockedToStrategyIndex:-1,shouldCollideWithScreenEdges:!0};toPackedMessage(e=!1){this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.packedMessage.shouldCollideWithScreenEdges=!0;let n=this.currentStrategyIndex!==-1&&this.currentStrategyIndex!==this.lowPriorityPinStrategyIndex;if(this.visible&&e&&n&&this.collisionDirty===!1?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,n&&this.currentStrategyIndex!==this.packedMessage.bboxes[0]?.[4]){let o=this.packedMessage.bboxes;for(let l=1;l<o.length;l++)if(o[l][4]===this.currentStrategyIndex){let c=o[0];o[0]=o[l],o[l]=c;break}}if(!this.collisionDirty)return this.packedMessage;let i=[],r=this.strategies,a=-1,s=0;for(let o=0;o<r.length;o++){let l=r[o].getBoundingBox();i.push([l[0],l[1],l[2],l[3],o]),l[0]>s&&(s=l[0]),l[1]>s&&(s=l[1]),l[2]>s&&(s=l[2]),l[3]>s&&(s=l[3]),o===this.currentStrategyIndex&&n&&(a=i.length-1)}if(a>0){let o=i[0];i[0]=i[a],i[a]=o}return this.packedMessage.bboxes=i,this.collisionExtent=s,this.collisionDirty=!1,this.packedMessage}_cachedLowPriorityPinIndex=null;get lowPriorityPinStrategyIndex(){return this._cachedLowPriorityPinIndex!=null?this._cachedLowPriorityPinIndex:this.options.rank==="always-visible"?(this._cachedLowPriorityPinIndex=-1,-1):(this._cachedLowPriorityPinIndex=this.strategies.findIndex(e=>e.name===O.HIDDEN),this._cachedLowPriorityPinIndex)}destroy(){}};h();h();h();function Ei(t,e){return e.x+e.w<t.x+t.w&&e.x>t.x&&e.y>t.y&&e.y+e.h<t.y+t.h}h();function Pi(t,e){let[n,i]=e;return n>=t.x&&n<=t.x+t.w&&i>=t.y&&i<=t.y+t.h}h();function Ai(t,e){let n=e.x,i=e.y,r=e.x+e.w,a=e.y+e.h,s=t.x,o=t.y,l=t.x+t.w,c=t.y+t.h;return n<l&&s<r&&i<c&&o<a}h();function ue(t,e){for(let n=0;n<e.length;n++)t.push(e[n])}var F=class{x;y;w;h;userData;constructor(e,n,i,r,a){this.userData=typeof a>"u"?null:a,this.x=e,this.y=n,this.w=i,this.h=r}contains(e){return e===this?!1:Ei(this,e)}intersects(e){return Ai(this,e)}intersectsPoint(e){return Pi(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.8)",e.fillRect(this.x,this.y,this.w,this.h)}};h();h();var ce=class t{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(e,n){this.parent=n,this.boundary=e}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:e,y:n,w:i,h:r}=this.boundary;this.topLeft=new t(new F(e,n,i/2,r/2),this),this.topRight=new t(new F(e+i/2,n,i/2,r/2),this),this.bottomLeft=new t(new F(e,n+r/2,i/2,r/2),this),this.bottomRight=new t(new F(e+i/2,n+r/2,i/2,r/2),this),this.divided=!0}queryRect(e){let n=[];if(this.boundary.intersects(e))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryRect(e)),ue(n,this.topRight.queryRect(e)),ue(n,this.bottomLeft.queryRect(e)),ue(n,this.bottomRight.queryRect(e))),n}queryPoint(e){let n=[];if(this.boundary.intersectsPoint(e))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryPoint(e)),ue(n,this.topRight.queryPoint(e)),ue(n,this.bottomLeft.queryPoint(e)),ue(n,this.bottomRight.queryPoint(e))),n}insert(e){return(this.parent?!this.boundary.contains(e):!this.boundary.intersects(e))?!1:this.objects.length<this.capacity?(this.objects.push(e),!0):(this.divided||this.subdivide(),(this.topLeft.insert(e)||this.topRight.insert(e)||this.bottomLeft.insert(e)||this.bottomRight.insert(e))===!1&&this.objects.push(e),!0)}drawObjects(e){this.objects.forEach(n=>n.draw(e)),this.divided&&(this.topLeft.drawObjects(e),this.topRight.drawObjects(e),this.bottomLeft.drawObjects(e),this.bottomRight.drawObjects(e))}draw(e){e.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(e),this.topRight.draw(e),this.bottomLeft.draw(e),this.bottomRight.draw(e)),e.strokeStyle="black",e.lineWidth=4,e.stroke()}};h();h();h();h();var Jt=class{id;type;component;worldPosition;verticalOffset;disposed=!1;positionDirty=!0;parentId;constructor(e,n,i=0,r){this.id=e.id,this.component=e,this.type=e.type,this.worldPosition={x:n.x,y:n.y,z:n.z+i},this.verticalOffset=i,this.parentId=r}updatePosition(e,n,i){this.worldPosition.x=e,this.worldPosition.y=n,this.worldPosition.z=i,this.positionDirty=!0}setAltitude(e){this.worldPosition.z=e,this.positionDirty=!0}};h();h();h();var Ri=["bottom-left","top-left","top-right","bottom-right","center","top","bottom","left","right"];function Oi(t){let e=Ri.indexOf(t);return e===-1?0:e}function en(t){return Ri[t]??"bottom-left"}var yt=class{buffer;length=0;constructor(e=4096){this.buffer=new Float64Array(e)}reserve(e){let n=this.length+e;if(n<=this.buffer.length)return;let i=Math.max(16,this.buffer.length);for(;i<n;)i*=2;let r=new Float64Array(i);r.set(this.buffer.subarray(0,this.length)),this.buffer=r}push(e){this.buffer[this.length++]=e}reset(e){e&&(this.buffer=e),this.length=0}};h();h();h();function Mi(t,e,n,i,r){switch(r){case"top-left":return new F(0,0,n,i);case"top-right":return new F(t-n,0,n,i);case"bottom-left":return new F(0,e-i,n,i);case"bottom-right":return new F(t-n,e-i,n,i);case"center":return new F((t-n)/2,(e-i)/2,n,i);case"top":return new F((t-n)/2,0,n,i);case"bottom":return new F((t-n)/2,e-i,n,i);case"left":return new F(0,(e-i)/2,n,i);case"right":return new F(t-n,(e-i)/2,n,i);default:return new F(0,e-i,n,i)}}h();var eo=.0078125,Di=-64,Li=192;function Ce(t,e,n,i,r,a,s,o){return r<t+n&&t<r+s&&a<e+i&&e<a+o}function tn(t,e,n,i,r,a,s,o){return r+s<t+n&&r>t&&a>e&&a+o<e+i}function fe(t){let e=Math.floor(t*eo);return e<Di?Di:e>Li?Li:e}var _t=class{xs=new Float64Array(1024);ys=new Float64Array(1024);ws=new Float64Array(1024);hs=new Float64Array(1024);stamps=new Uint32Array(1024);count=0;_stamp=0;_cells=new Map;_used=[];reset(){this.count=0;for(let e=0;e<this._used.length;e++)this._used[e].length=0;this._used.length=0}_grow(){let e=this.xs.length*2,n=r=>{let a=new Float64Array(e);return a.set(r),a};this.xs=n(this.xs),this.ys=n(this.ys),this.ws=n(this.ws),this.hs=n(this.hs);let i=new Uint32Array(e);i.set(this.stamps),this.stamps=i}insert(e,n,i,r){if(!(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(r)))return;this.count===this.xs.length&&this._grow();let a=this.count++;this.xs[a]=e,this.ys[a]=n,this.ws[a]=i,this.hs[a]=r,this.stamps[a]=0;let s=fe(e),o=fe(n),l=fe(e+i),c=fe(n+r);for(let u=s;u<=l;u++)for(let d=o;d<=c;d++){let b=u*1024+d,p=this._cells.get(b);p===void 0&&(p=[],this._cells.set(b,p)),p.length===0&&this._used.push(p),p.push(a)}}countIntersections(e,n,i,r){if(this.count===0||!(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(r)))return 0;let a=++this._stamp;a>=4294967280&&(this.stamps.fill(0),this._stamp=a=1);let s=0,o=fe(e),l=fe(n),c=fe(e+i),u=fe(n+r),{xs:d,ys:b,ws:p,hs:f,stamps:T}=this;for(let y=o;y<=c;y++)for(let m=l;m<=u;m++){let _=this._cells.get(y*1024+m);if(_!==void 0)for(let C=0;C<_.length;C++){let S=_[C];T[S]!==a&&(T[S]=a,Ce(e,n,i,r,d[S],b[S],p[S],f[S])&&s++)}}return s}};var Oe=200,xt=10;function vt(t){return Number.isInteger(t)&&t>=0}function ki(t,e=t.length){if(!vt(e)||e>t.length||e<7)return!1;let n=t[5],i=t[6];if(!vt(n)||!vt(i))return!1;let r=7+n*4;if(r>e)return!1;for(let a=0;a<i;a++){if(r+7>e)return!1;let s=t[r+6];if(!vt(s)||(r+=7+s*5,r>e))return!1}return!0}var to=new _t;function Fi(t,e){let n=t[0],i=t[1],r=t[5],a=t[6],s=Mi(n,i,t[2],t[3],en(t[4])),o=s.x,l=s.y,c=s.w,u=s.h,d=a*7;(e==null||e.length<d)&&(e=new Float64Array(Math.max(d*2,64)));let b=to;b.reset();let p=-Oe,f=-Oe,T=n+Oe,y=i+Oe,m=n+Oe*2,_=i+Oe*2,C=7;for(let S=0;S<r;S++){let R=t[C],w=t[C+1],E=R-t[C+2]/2,L=w-t[C+3]/2;b.insert(E,L,R+t[C+2]/2-E,w+t[C+3]/2-L),C+=4}for(let S=0;S<a;S++){let R=t[C],w=t[C+1]===1,E=t[C+2],L=t[C+3],q=t[C+4]===1,M=t[C+5],B=t[C+6],z=C+7;C=z+B*5;let P=S*7,$=E<p||E>T||L<f||L>y?1:0;if(e[P]=-1,e[P+1]=$,e[P+2]=0,e[P+3]=0,e[P+4]=0,e[P+5]=0,e[P+6]=0,R!==1)continue;let j=1/0,J=-1,ie=0,re=0,me=0,be=0,Le=!1;for(let Te=0;Te<B;Te++){let ke=z+Te*5,It=t[ke+4];if(M!==-1&&It!==M)continue;let V=E-t[ke+2],G=L-t[ke],Y=E+t[ke+3]-V,K=L+t[ke+1]-G,ge=b.countIntersections(V,G,Y,K);if(q&&(Ce(V,G,Y,K,-xt,0,5,i)&&ge++,Ce(V,G,Y,K,-xt,0,n,5)&&ge++,Ce(V,G,Y,K,n-5,0,n+xt,i)&&ge++,Ce(V,G,Y,K,0,i-5,n,i+xt)&&ge++),Ce(V,G,Y,K,o,l,c,u)){e[P]=-1,e[P+1]=$,e[P+2]=1,e[P+3]=V,e[P+4]=G,e[P+5]=Y,e[P+6]=K;break}if(ge<j&&(ie=V,re=G,me=Y,be=K,Le=!0,J=It,j=ge),ge===0){b.insert(V,G,Y,K),e[P]=It,e[P+1]=tn(p,f,m,_,V,G,Y,K)?0:1,e[P+2]=1,e[P+3]=V,e[P+4]=G,e[P+5]=Y,e[P+6]=K;break}}w&&Le&&(b.insert(ie,re,me,be),e[P]=J,e[P+1]=tn(p,f,m,_,ie,re,me,be)?0:1,e[P+2]=1,e[P+3]=ie,e[P+4]=re,e[P+5]=me,e[P+6]=be)}return e}var he=class{onerror=()=>{};onmessage=()=>{};postMessage=e=>{let n=ki(e.input,e.length),i=n?Fi(e.input,e.output):e.output??new Float64Array(0);this.onmessage({data:{id:e.id,input:e.input,output:i,colliderCount:n?e.input[6]:0}})};terminate=()=>{}};h();var on=`"use strict";(()=>{function se(t,e){return e.x+e.w<t.x+t.w&&e.x>t.x&&e.y>t.y&&e.y+e.h<t.y+t.h}function oe(t,e){let[s,n]=e;return s>=t.x&&s<=t.x+t.w&&n>=t.y&&n<=t.y+t.h}function re(t,e){let s=e.x,n=e.y,r=e.x+e.w,o=e.y+e.h,c=t.x,b=t.y,I=t.x+t.w,g=t.y+t.h;return s<I&&c<r&&n<g&&b<o}var u=class{x;y;w;h;userData;constructor(e,s,n,r,o){this.userData=typeof o>"u"?null:o,this.x=e,this.y=s,this.w=n,this.h=r}contains(e){return e===this?!1:se(this,e)}intersects(e){return re(this,e)}intersectsPoint(e){return oe(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.8)",e.fillRect(this.x,this.y,this.w,this.h)}};var xe=["bottom-left","top-left","top-right","bottom-right","center","top","bottom","left","right"];function ie(t){return xe[t]??"bottom-left"}function le(t,e,s,n,r){switch(r){case"top-left":return new u(0,0,s,n);case"top-right":return new u(t-s,0,s,n);case"bottom-left":return new u(0,e-n,s,n);case"bottom-right":return new u(t-s,e-n,s,n);case"center":return new u((t-s)/2,(e-n)/2,s,n);case"top":return new u((t-s)/2,0,s,n);case"bottom":return new u((t-s)/2,e-n,s,n);case"left":return new u(0,(e-n)/2,s,n);case"right":return new u(t-s,(e-n)/2,s,n);default:return new u(0,e-n,s,n)}}var Ie=.0078125,ue=-64,be=192;function S(t,e,s,n,r,o,c,b){return r<t+s&&t<r+c&&o<e+n&&e<o+b}function G(t,e,s,n,r,o,c,b){return r+c<t+s&&r>t&&o>e&&o+b<e+n}function R(t){let e=Math.floor(t*Ie);return e<ue?ue:e>be?be:e}var j=class{xs=new Float64Array(1024);ys=new Float64Array(1024);ws=new Float64Array(1024);hs=new Float64Array(1024);stamps=new Uint32Array(1024);count=0;_stamp=0;_cells=new Map;_used=[];reset(){this.count=0;for(let e=0;e<this._used.length;e++)this._used[e].length=0;this._used.length=0}_grow(){let e=this.xs.length*2,s=r=>{let o=new Float64Array(e);return o.set(r),o};this.xs=s(this.xs),this.ys=s(this.ys),this.ws=s(this.ws),this.hs=s(this.hs);let n=new Uint32Array(e);n.set(this.stamps),this.stamps=n}insert(e,s,n,r){if(!(Number.isFinite(e)&&Number.isFinite(s)&&Number.isFinite(n)&&Number.isFinite(r)))return;this.count===this.xs.length&&this._grow();let o=this.count++;this.xs[o]=e,this.ys[o]=s,this.ws[o]=n,this.hs[o]=r,this.stamps[o]=0;let c=R(e),b=R(s),I=R(e+n),g=R(s+r);for(let _=c;_<=I;_++)for(let x=b;x<=g;x++){let y=_*1024+x,f=this._cells.get(y);f===void 0&&(f=[],this._cells.set(y,f)),f.length===0&&this._used.push(f),f.push(o)}}countIntersections(e,s,n,r){if(this.count===0||!(Number.isFinite(e)&&Number.isFinite(s)&&Number.isFinite(n)&&Number.isFinite(r)))return 0;let o=++this._stamp;o>=4294967280&&(this.stamps.fill(0),this._stamp=o=1);let c=0,b=R(e),I=R(s),g=R(e+n),_=R(s+r),{xs:x,ys:y,ws:f,hs:F,stamps:O}=this;for(let D=b;D<=g;D++)for(let L=I;L<=_;L++){let w=this._cells.get(D*1024+L);if(w!==void 0)for(let l=0;l<w.length;l++){let a=w[l];O[a]!==o&&(O[a]=o,S(e,s,n,r,x[a],y[a],f[a],F[a])&&c++)}}return c}};var A=200,z=10;function V(t){return Number.isInteger(t)&&t>=0}function he(t,e=t.length){if(!V(e)||e>t.length||e<7)return!1;let s=t[5],n=t[6];if(!V(s)||!V(n))return!1;let r=7+s*4;if(r>e)return!1;for(let o=0;o<n;o++){if(r+7>e)return!1;let c=t[r+6];if(!V(c)||(r+=7+c*5,r>e))return!1}return!0}var Se=new j;function me(t,e){let s=t[0],n=t[1],r=t[5],o=t[6],c=le(s,n,t[2],t[3],ie(t[4])),b=c.x,I=c.y,g=c.w,_=c.h,x=o*7;(e==null||e.length<x)&&(e=new Float64Array(Math.max(x*2,64)));let y=Se;y.reset();let f=-A,F=-A,O=s+A,D=n+A,L=s+A*2,w=n+A*2,l=7;for(let a=0;a<r;a++){let P=t[l],M=t[l+1],T=P-t[l+2]/2,C=M-t[l+3]/2;y.insert(T,C,P+t[l+2]/2-T,M+t[l+3]/2-C),l+=4}for(let a=0;a<o;a++){let P=t[l],M=t[l+1]===1,T=t[l+2],C=t[l+3],pe=t[l+4]===1,H=t[l+5],Z=t[l+6],J=l+7;l=J+Z*5;let i=a*7,$=T<f||T>O||C<F||C>D?1:0;if(e[i]=-1,e[i+1]=$,e[i+2]=0,e[i+3]=0,e[i+4]=0,e[i+5]=0,e[i+6]=0,P!==1)continue;let ee=1/0,te=-1,v=0,q=0,B=0,X=0,ne=!1;for(let W=0;W<Z;W++){let N=J+W*5,Y=t[N+4];if(H!==-1&&Y!==H)continue;let d=T-t[N+2],h=C-t[N],m=T+t[N+3]-d,p=C+t[N+1]-h,E=y.countIntersections(d,h,m,p);if(pe&&(S(d,h,m,p,-z,0,5,n)&&E++,S(d,h,m,p,-z,0,s,5)&&E++,S(d,h,m,p,s-5,0,s+z,n)&&E++,S(d,h,m,p,0,n-5,s,n+z)&&E++),S(d,h,m,p,b,I,g,_)){e[i]=-1,e[i+1]=$,e[i+2]=1,e[i+3]=d,e[i+4]=h,e[i+5]=m,e[i+6]=p;break}if(E<ee&&(v=d,q=h,B=m,X=p,ne=!0,te=Y,ee=E),E===0){y.insert(d,h,m,p),e[i]=Y,e[i+1]=G(f,F,L,w,d,h,m,p)?0:1,e[i+2]=1,e[i+3]=d,e[i+4]=h,e[i+5]=m,e[i+6]=p;break}}M&&ne&&(y.insert(v,q,B,X),e[i]=te,e[i+1]=G(f,F,L,w,v,q,B,X)?0:1,e[i+2]=1,e[i+3]=v,e[i+4]=q,e[i+5]=B,e[i+6]=X)}return e}self.onmessage=t=>{let e=t.data;if(e==null||!(e.input instanceof Float64Array))return;let{id:s,input:n}=e,r=e.output instanceof Float64Array?e.output:new Float64Array(0),o=he(n,e.length),c=o?me(n,r):r,b={id:s,input:n,output:c,colliderCount:o?n[6]:0};self.postMessage(b,[n.buffer,c.buffer])};})();
|
|
1
|
+
import{a as h,g as hn,h as nt,l as pe,m as pn}from"./chunk-XBKEAHSJ.js";import{b as Xi,d as qi}from"./chunk-PWEV3AFA.js";var Ti=Xi((We,Pe)=>{h();var sa=200,ai="__lodash_hash_undefined__",oa=800,la=16,si=9007199254740991,oi="[object Arguments]",ua="[object Array]",ca="[object AsyncFunction]",ha="[object Boolean]",pa="[object Date]",da="[object Error]",li="[object Function]",fa="[object GeneratorFunction]",ma="[object Map]",ba="[object Number]",ga="[object Null]",ui="[object Object]",ya="[object Proxy]",_a="[object RegExp]",xa="[object Set]",va="[object String]",Ca="[object Undefined]",Sa="[object WeakMap]",Ta="[object ArrayBuffer]",wa="[object DataView]",Ia="[object Float32Array]",Ea="[object Float64Array]",Pa="[object Int8Array]",Aa="[object Int16Array]",Ra="[object Int32Array]",Oa="[object Uint8Array]",Ma="[object Uint8ClampedArray]",Da="[object Uint16Array]",La="[object Uint32Array]",ka=/[\\^$.*+?()[\]{}|]/g,Fa=/^\[object .+?Constructor\]$/,Na=/^(?:0|[1-9]\d*)$/,D={};D[Ia]=D[Ea]=D[Pa]=D[Aa]=D[Ra]=D[Oa]=D[Ma]=D[Da]=D[La]=!0;D[oi]=D[ua]=D[Ta]=D[ha]=D[wa]=D[pa]=D[da]=D[li]=D[ma]=D[ba]=D[ui]=D[_a]=D[xa]=D[va]=D[Sa]=!1;var ci=typeof global=="object"&&global&&global.Object===Object&&global,Ba=typeof self=="object"&&self&&self.Object===Object&&self,Ve=ci||Ba||Function("return this")(),hi=typeof We=="object"&&We&&!We.nodeType&&We,Ue=hi&&typeof Pe=="object"&&Pe&&!Pe.nodeType&&Pe,pi=Ue&&Ue.exports===hi,Ut=pi&&ci.process,Kn=(function(){try{var t=Ue&&Ue.require&&Ue.require("util").types;return t||Ut&&Ut.binding&&Ut.binding("util")}catch{}})(),Zn=Kn&&Kn.isTypedArray;function za(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ha(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Wa(t){return function(e){return t(e)}}function Ua(t,e){return t?.[e]}function ja(t,e){return function(n){return t(e(n))}}var Va=Array.prototype,Ga=Function.prototype,pt=Object.prototype,jt=Ve["__core-js_shared__"],dt=Ga.toString,se=pt.hasOwnProperty,Qn=(function(){var t=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),di=pt.toString,Xa=dt.call(Object),qa=RegExp("^"+dt.call(se).replace(ka,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=pi?Ve.Buffer:void 0,Jn=Ve.Symbol,ei=Ve.Uint8Array,ti=ct?ct.allocUnsafe:void 0,fi=ja(Object.getPrototypeOf,Object),ni=Object.create,$a=pt.propertyIsEnumerable,Ya=Va.splice,ye=Jn?Jn.toStringTag:void 0,ht=(function(){try{var t=Yt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Ka=ct?ct.isBuffer:void 0,ii=Math.max,Za=Date.now,mi=Yt(Ve,"Map"),je=Yt(Object,"create"),Qa=(function(){function t(){}return function(e){if(!xe(e))return{};if(ni)return ni(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function _e(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Ja(){this.__data__=je?je(null):{},this.size=0}function es(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ts(t){var e=this.__data__;if(je){var n=e[t];return n===ai?void 0:n}return se.call(e,t)?e[t]:void 0}function ns(t){var e=this.__data__;return je?e[t]!==void 0:se.call(e,t)}function is(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=je&&e===void 0?ai:e,this}_e.prototype.clear=Ja;_e.prototype.delete=es;_e.prototype.get=ts;_e.prototype.has=ns;_e.prototype.set=is;function oe(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function rs(){this.__data__=[],this.size=0}function as(t){var e=this.__data__,n=ft(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Ya.call(e,n,1),--this.size,!0}function ss(t){var e=this.__data__,n=ft(e,t);return n<0?void 0:e[n][1]}function os(t){return ft(this.__data__,t)>-1}function ls(t,e){var n=this.__data__,i=ft(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}oe.prototype.clear=rs;oe.prototype.delete=as;oe.prototype.get=ss;oe.prototype.has=os;oe.prototype.set=ls;function Ae(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function us(){this.size=0,this.__data__={hash:new _e,map:new(mi||oe),string:new _e}}function cs(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e}function hs(t){return bt(this,t).get(t)}function ps(t){return bt(this,t).has(t)}function ds(t,e){var n=bt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}Ae.prototype.clear=us;Ae.prototype.delete=cs;Ae.prototype.get=hs;Ae.prototype.has=ps;Ae.prototype.set=ds;function Re(t){var e=this.__data__=new oe(t);this.size=e.size}function fs(){this.__data__=new oe,this.size=0}function ms(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function bs(t){return this.__data__.get(t)}function gs(t){return this.__data__.has(t)}function ys(t,e){var n=this.__data__;if(n instanceof oe){var i=n.__data__;if(!mi||i.length<sa-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ae(i)}return n.set(t,e),this.size=n.size,this}Re.prototype.clear=fs;Re.prototype.delete=ms;Re.prototype.get=bs;Re.prototype.has=gs;Re.prototype.set=ys;function _s(t,e){var n=qt(t),i=!n&&Xt(t),r=!n&&!i&&_i(t),a=!n&&!i&&!r&&vi(t),s=n||i||r||a,o=s?Ha(t.length,String):[],l=o.length;for(var c in t)(e||se.call(t,c))&&!(s&&(c=="length"||r&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gi(c,l)))&&o.push(c);return o}function Vt(t,e,n){(n!==void 0&&!gt(t[e],n)||n===void 0&&!(e in t))&&$t(t,e,n)}function xs(t,e,n){var i=t[e];(!(se.call(t,e)&>(i,n))||n===void 0&&!(e in t))&&$t(t,e,n)}function ft(t,e){for(var n=t.length;n--;)if(gt(t[n][0],e))return n;return-1}function $t(t,e,n){e=="__proto__"&&ht?ht(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var vs=Ls();function mt(t){return t==null?t===void 0?Ca:ga:ye&&ye in Object(t)?ks(t):Ws(t)}function ri(t){return Ge(t)&&mt(t)==oi}function Cs(t){if(!xe(t)||zs(t))return!1;var e=Zt(t)?qa:Fa;return e.test(Gs(t))}function Ss(t){return Ge(t)&&xi(t.length)&&!!D[mt(t)]}function Ts(t){if(!xe(t))return Hs(t);var e=yi(t),n=[];for(var i in t)i=="constructor"&&(e||!se.call(t,i))||n.push(i);return n}function bi(t,e,n,i,r){t!==e&&vs(e,function(a,s){if(r||(r=new Re),xe(a))ws(t,e,s,n,bi,i,r);else{var o=i?i(Gt(t,s),a,s+"",t,e,r):void 0;o===void 0&&(o=a),Vt(t,s,o)}},Ci)}function ws(t,e,n,i,r,a,s){var o=Gt(t,n),l=Gt(e,n),c=s.get(l);if(c){Vt(t,n,c);return}var u=a?a(o,l,n+"",t,e,s):void 0,d=u===void 0;if(d){var b=qt(l),p=!b&&_i(l),f=!b&&!p&&vi(l);u=l,b||p||f?qt(o)?u=o:Xs(o)?u=Os(o):p?(d=!1,u=Ps(l,!0)):f?(d=!1,u=Rs(l,!0)):u=[]:qs(l)||Xt(l)?(u=o,Xt(o)?u=$s(o):(!xe(o)||Zt(o))&&(u=Fs(l))):d=!1}d&&(s.set(l,u),r(u,l,i,a,s),s.delete(l)),Vt(t,n,u)}function Is(t,e){return js(Us(t,e,Si),t+"")}var Es=ht?function(t,e){return ht(t,"toString",{configurable:!0,enumerable:!1,value:Ks(e),writable:!0})}:Si;function Ps(t,e){if(e)return t.slice();var n=t.length,i=ti?ti(n):new t.constructor(n);return t.copy(i),i}function As(t){var e=new t.constructor(t.byteLength);return new ei(e).set(new ei(t)),e}function Rs(t,e){var n=e?As(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Os(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function Ms(t,e,n,i){var r=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var o=e[a],l=i?i(n[o],t[o],o,n,t):void 0;l===void 0&&(l=t[o]),r?$t(n,o,l):xs(n,o,l)}return n}function Ds(t){return Is(function(e,n){var i=-1,r=n.length,a=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(r--,a):void 0,s&&Ns(n[0],n[1],s)&&(a=r<3?void 0:a,r=1),e=Object(e);++i<r;){var o=n[i];o&&t(e,o,i,a)}return e})}function Ls(t){return function(e,n,i){for(var r=-1,a=Object(e),s=i(e),o=s.length;o--;){var l=s[t?o:++r];if(n(a[l],l,a)===!1)break}return e}}function bt(t,e){var n=t.__data__;return Bs(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Yt(t,e){var n=Ua(t,e);return Cs(n)?n:void 0}function ks(t){var e=se.call(t,ye),n=t[ye];try{t[ye]=void 0;var i=!0}catch{}var r=di.call(t);return i&&(e?t[ye]=n:delete t[ye]),r}function Fs(t){return typeof t.constructor=="function"&&!yi(t)?Qa(fi(t)):{}}function gi(t,e){var n=typeof t;return e=e??si,!!e&&(n=="number"||n!="symbol"&&Na.test(t))&&t>-1&&t%1==0&&t<e}function Ns(t,e,n){if(!xe(n))return!1;var i=typeof e;return(i=="number"?Kt(n)&&gi(e,n.length):i=="string"&&e in n)?gt(n[e],t):!1}function Bs(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function zs(t){return!!Qn&&Qn in t}function yi(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||pt;return t===n}function Hs(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Ws(t){return di.call(t)}function Us(t,e,n){return e=ii(e===void 0?t.length-1:e,0),function(){for(var i=arguments,r=-1,a=ii(i.length-e,0),s=Array(a);++r<a;)s[r]=i[e+r];r=-1;for(var o=Array(e+1);++r<e;)o[r]=i[r];return o[e]=n(s),za(t,this,o)}}function Gt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var js=Vs(Es);function Vs(t){var e=0,n=0;return function(){var i=Za(),r=la-(i-n);if(n=i,r>0){if(++e>=oa)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Gs(t){if(t!=null){try{return dt.call(t)}catch{}try{return t+""}catch{}}return""}function gt(t,e){return t===e||t!==t&&e!==e}var Xt=ri((function(){return arguments})())?ri:function(t){return Ge(t)&&se.call(t,"callee")&&!$a.call(t,"callee")},qt=Array.isArray;function Kt(t){return t!=null&&xi(t.length)&&!Zt(t)}function Xs(t){return Ge(t)&&Kt(t)}var _i=Ka||Zs;function Zt(t){if(!xe(t))return!1;var e=mt(t);return e==li||e==fa||e==ca||e==ya}function xi(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=si}function xe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ge(t){return t!=null&&typeof t=="object"}function qs(t){if(!Ge(t)||mt(t)!=ui)return!1;var e=fi(t);if(e===null)return!0;var n=se.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&dt.call(n)==Xa}var vi=Zn?Wa(Zn):Ss;function $s(t){return Ms(t,Ci(t))}function Ci(t){return Kt(t)?_s(t,!0):Ts(t)}var Ys=Ds(function(t,e,n){bi(t,e,n)});function Ks(t){return function(){return t}}function Si(t){return t}function Zs(){return!1}Pe.exports=Ys});h();var dn=["ease-in","ease-out","ease-in-out","linear","ease-out-cubic"];var it=t=>t,$i=t=>t*t,Et=t=>1-Math.cos(t*Math.PI/2),Yi=t=>1-(1-t)*(1-t),Ki=t=>1-Math.pow(1-t,3),fn={linear:it,"ease-in":$i,"ease-out":Yi,"ease-in-out":Et,"ease-out-cubic":Ki};function Pt(t,e,n,i,r,a=it){if(e===n)return r;t=Math.max(e,Math.min(t,n));let s=(t-Math.min(e,n))/Math.abs(n-e),o=typeof a=="function"?a(s):fn[a](s);return i+o*(r-i)}function Zi(t,e){let n=0;if(e.length<2)return n;let r=e[0]<e[1]?(a,s)=>a>s:(a,s)=>a<s;for(;n<e.length-1&&r(t,e[n+1]);)n++;return n>e.length-2?Math.max(0,e.length-2):n}function mn(t,e,n,i="ease-in"){if(e.length!==n.length)throw new pn("Input and output ranges must have the same number of values.");t=Math.max(e[0],Math.min(t,e[e.length-1]));let r=Zi(t,e),a=(t-e[r])/(e[r+1]-e[r]),s=typeof i=="function"?i(a):fn[i](a);return n[r]+s*(n[r+1]-n[r])}h();h();var ee=Object.freeze({Linear:Object.freeze({None:function(t){return t},In:function(t){return t},Out:function(t){return t},InOut:function(t){return t}}),Quadratic:Object.freeze({In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}}),Cubic:Object.freeze({In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}}),Quartic:Object.freeze({In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}}),Quintic:Object.freeze({In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}}),Sinusoidal:Object.freeze({In:function(t){return 1-Math.sin((1-t)*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.sin(Math.PI*(.5-t)))}}),Exponential:Object.freeze({In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}}),Circular:Object.freeze({In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}}),Elastic:Object.freeze({In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(t){var e=1.70158;return t===1?1:t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return t===0?0:--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}}),Bounce:Object.freeze({In:function(t){return 1-ee.Bounce.Out(1-t)},Out:function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375},InOut:function(t){return t<.5?ee.Bounce.In(t*2)*.5:ee.Bounce.Out(t*2-1)*.5+.5}}),generatePow:function(t){return t===void 0&&(t=4),t=t<Number.EPSILON?Number.EPSILON:t,t=t>1e4?1e4:t,{In:function(e){return Math.pow(e,t)},Out:function(e){return 1-Math.pow(1-e,t)},InOut:function(e){return e<.5?Math.pow(e*2,t)/2:(1-Math.pow(2-e*2,t))/2+.5}}}}),Fe=function(){return performance.now()},Qi=(function(){function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return t.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var r=0,a=n;r<a.length;r++){var s=a[r];(e=s._group)===null||e===void 0||e.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},t.prototype.remove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var i=0,r=e;i<r.length;i++){var a=r[i];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},t.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},t.prototype.update=function(e,n){e===void 0&&(e=Fe()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<i.length;r++){var a=this._tweens[i[r]],s=!n;a&&a.update(e,s)===!1&&!n&&this.remove(a)}i=Object.keys(this._tweensAddedDuringUpdate)}},t})(),we={Linear:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),a=we.Utils.Linear;return e<0?a(t[0],t[1],i):e>1?a(t[n],t[n-1],n-i):a(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){for(var n=0,i=t.length-1,r=Math.pow,a=we.Utils.Bernstein,s=0;s<=i;s++)n+=r(1-e,i-s)*r(e,s)*t[s]*a(i,s);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),a=we.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),a(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(a(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(a(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):a(t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2],i-r)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=we.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(function(){var t=[1];return function(e){var n=1;if(t[e])return t[e];for(var i=e;i>1;i--)n*=i;return t[e]=n,n}})(),CatmullRom:function(t,e,n,i,r){var a=(n-t)*.5,s=(i-e)*.5,o=r*r,l=r*o;return(2*e-2*n+a+s)*l+(-3*e+3*n-2*a-s)*o+a*r+e}}},bn=(function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t})(),At=new Qi,_o=(function(){function t(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ee.Linear.None,this._interpolationFunction=we.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=bn.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=At,At.add(this))}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.getDuration=function(){return this._duration},t.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},t.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},t.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},t.prototype.start=function(e,n){if(e===void 0&&(e=Fe()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var r={};for(var a in this._valuesEnd)r[a]=this._valuesEnd[a];this._valuesEnd=r}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},t.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},t.prototype._setupProperties=function(e,n,i,r,a){for(var s in i){var o=e[s],l=Array.isArray(o),c=l?"array":typeof o,u=!l&&Array.isArray(i[s]);if(!(c==="undefined"||c==="function")){if(u){var d=i[s];if(d.length===0)continue;for(var b=[o],p=0,f=d.length;p<f;p+=1){var T=this._handleRelativeValue(o,d[p]);if(isNaN(T)){u=!1,console.warn("Found invalid interpolation list. Skipping.");break}b.push(T)}u&&(i[s]=b)}if((c==="object"||l)&&o&&!u){n[s]=l?[]:{};var y=o;for(var m in y)n[s][m]=y[m];r[s]=l?[]:{};var d=i[s];if(!this._isDynamic){var _={};for(var m in d)_[m]=d[m];i[s]=d=_}this._setupProperties(y,n[s],d,r[s],a)}else(typeof n[s]>"u"||a)&&(n[s]=o),l||(n[s]*=1),u?r[s]=i[s].slice().reverse():r[s]=n[s]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},t.prototype.pause=function(e){return e===void 0&&(e=Fe()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},t.prototype.resume=function(e){return e===void 0&&(e=Fe()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},t.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},t.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},t.prototype.remove=function(){var e;return(e=this._group)===null||e===void 0||e.remove(this),this},t.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},t.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},t.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},t.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},t.prototype.easing=function(e){return e===void 0&&(e=ee.Linear.None),this._easingFunction=e,this},t.prototype.interpolation=function(e){return e===void 0&&(e=we.Linear),this._interpolationFunction=e,this},t.prototype.chain=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._chainedTweens=e,this},t.prototype.onStart=function(e){return this._onStartCallback=e,this},t.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},t.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},t.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},t.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},t.prototype.onStop=function(e){return this._onStopCallback=e,this},t.prototype.update=function(e,n){var i=this,r;if(e===void 0&&(e=Fe()),n===void 0&&(n=t.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(e,!0);else return!1;if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=e-this._startTime,o=this._duration+((r=this._repeatDelayTime)!==null&&r!==void 0?r:this._delayTime),l=this._duration+this._repeat*o,c=function(){if(i._duration===0||s>l)return 1;var T=Math.trunc(s/o),y=s-T*o,m=Math.min(y/i._duration,1);return m===0&&s===i._duration?1:m},u=c(),d=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),this._duration===0||s>=this._duration)if(this._repeat>0){var b=Math.min(Math.trunc((s-this._duration)/o)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=b);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=o*b,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,f=this._chainedTweens.length;p<f;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(e,n,i,r){for(var a in i)if(n[a]!==void 0){var s=n[a]||0,o=i[a],l=Array.isArray(e[a]),c=Array.isArray(o),u=!l&&c;u?e[a]=this._interpolationFunction(o,r):typeof o=="object"&&o?this._updateProperties(e[a],s,o,r):(o=this._handleRelativeValue(s,o),typeof o=="number"&&(e[a]=s+(o-s)*r))}},t.prototype._handleRelativeValue=function(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)},t.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],i=this._valuesEnd[e];typeof i=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(i):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},t.autoStartOnUpdate=!1,t})();var xo=bn.nextId,te=At,vo=te.getAll.bind(te),Co=te.removeAll.bind(te),So=te.add.bind(te),To=te.remove.bind(te),wo=te.update.bind(te);h();var rt=null,gn=new WeakMap;function yn(t){rt=t}function Ne(){return rt!==null}function ne(t,e){if(!rt)return e===void 0?t.getContext("2d"):t.getContext("2d",e);let n=gn.get(t);if(n)return n;let i=rt(t,e);return i&&gn.set(t,i),i}h();var Ji=Symbol.for("mappedin.headless-context-2d"),er=.6,tr="10px sans-serif",Rt=()=>({font:tr,fillStyle:"#000000",strokeStyle:"#000000",globalAlpha:1,globalCompositeOperation:"source-over",lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,lineDashOffset:0,textAlign:"start",textBaseline:"alphabetic",direction:"inherit",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0)",shadowOffsetX:0,shadowOffsetY:0,imageSmoothingEnabled:!0,filter:"none",lineDash:[]}),nr=["clearRect","fillRect","strokeRect","fillText","strokeText","drawImage","putImageData","beginPath","closePath","moveTo","lineTo","bezierCurveTo","quadraticCurveTo","arc","arcTo","ellipse","rect","roundRect","fill","stroke","clip","drawFocusIfNeeded","translate","rotate","scale","transform","setTransform","resetTransform"];function ir(t){let e=/(\d*\.?\d+)px/.exec(t);return e?Number(e[1]):10}function Ot(t,e){let n=Math.max(0,Math.floor(Math.abs(t))),i=Math.max(0,Math.floor(Math.abs(e)));return{width:n,height:i,data:new Uint8ClampedArray(n*i*4),colorSpace:"srgb"}}var Dt=()=>{},Mt=()=>({addColorStop:Dt}),rr=()=>({a:1,b:0,c:0,d:1,e:0,f:0});function _n(t){let e=Rt(),n=[],i={[Ji]:!0,canvas:t,save:()=>n.push({...e,lineDash:[...e.lineDash]}),restore:()=>{e=n.pop()??e},reset:()=>{e=Rt(),n.length=0},measureText:r=>{let a=ir(e.font),s=a*er*r.length;return{width:s,actualBoundingBoxLeft:0,actualBoundingBoxRight:s,actualBoundingBoxAscent:a*.8,actualBoundingBoxDescent:a*.2,fontBoundingBoxAscent:a*.8,fontBoundingBoxDescent:a*.2,emHeightAscent:a*.8,emHeightDescent:a*.2,alphabeticBaseline:0,hangingBaseline:a*.8,ideographicBaseline:-a*.2}},getImageData:(r,a,s,o)=>Ot(s,o),createImageData:(r,a)=>typeof r=="number"?Ot(r,a??0):Ot(r.width,r.height),createLinearGradient:Mt,createRadialGradient:Mt,createConicGradient:Mt,createPattern:()=>({setTransform:Dt}),getLineDash:()=>[...e.lineDash],setLineDash:r=>{e.lineDash=[...r]},getTransform:rr,isPointInPath:()=>!1,isPointInStroke:()=>!1,getContextAttributes:()=>({alpha:!0,desynchronized:!1,colorSpace:"srgb",willReadFrequently:!1}),isContextLost:()=>!1};for(let r of nr)i[r]=Dt;for(let r of Object.keys(Rt()))r!=="lineDash"&&Object.defineProperty(i,r,{enumerable:!0,get:()=>e[r],set:a=>{e[r]=a}});return i}var ar={linear:ee.Linear.None,"ease-in":ee.Quadratic.In,"ease-out":ee.Quadratic.Out,"ease-in-out":ee.Quadratic.InOut};var sr={tension:0,cornerRadius:.5},or={size:1.2,gapSize:.6},lr="mappedin",ur="collision-worker.csp.js",cr="maplibre-worker.csp.js",xn="";function hr(t){xn=t}var vn="";function pr(t){vn=t}var Lt=!1,Cn=!0;function dr(t){Lt=!0,Cn=t?.standalone??!0,yn(_n)}function fr(){return Lt}function mr(){return Lt&&Cn}var Sn={width:1920,height:1080};function br(){return{...Sn}}function gr(t){let{width:e,height:n}=t;if(!(Number.isFinite(e)&&e>0&&Number.isFinite(n)&&n>0))throw new Error("[MappedinJS] setHeadlessViewport: width and height must be positive finite numbers");Sn={width:e,height:n}}var Tn=!0;function yr(t){Tn=t}function _r(){return Tn}h();h();h();import H from"zod";var kt=H.enum(dn),xr=t=>{let e=t[0];for(let n=1;n<t.length;n++){let i=t[n];if(i<=e)return!1;e=i}return!0},vr=t=>{let e=t[0];for(let n=1;n<t.length;n++){let i=t[n];if(i>=e)return!1;e=i}return!0},wn=t=>xr(t)||vr(t),Cr=H.object({on:H.literal("zoom-level"),input:H.tuple([H.number()]).rest(H.number()).refine(wn,{message:"input array must be strictly increasing or decreasing"}),output:H.tuple([H.number()]).rest(H.number()),easing:kt.default("linear")}).refine(t=>t.input.length===t.output.length,{message:"input and output must have the same length"}),at=/^\d+(\.\d+)?px$/;function Ft(t){return typeof t=="string"&&at.test(t)}function Sr(t){return parseFloat(t)}function In(t){return typeof t=="object"&&t!==null&&"output"in t&&Array.isArray(t.output)&&t.output.length>0&&Ft(t.output[0])}function Tr(t){return Ft(t)||In(t)}var wr=H.object({on:H.literal("zoom-level"),input:H.tuple([H.number()]).rest(H.number()).refine(wn,{message:"input array must be strictly increasing or decreasing"}),output:H.tuple([H.string().regex(at)]).rest(H.string().regex(at)),easing:kt.default("linear")}).refine(t=>t.input.length===t.output.length,{message:"input and output must have the same length"});h();h();h();h();h();h();h();import{z as W}from"zod";var En=W.object({rotation:W.array(W.number()).length(3).optional(),altitude:W.number().optional(),scale:W.array(W.number()).length(3).optional(),interactive:W.boolean().optional(),verticalOffset:W.number().optional(),id:W.union([W.number(),W.string()]).optional()}),Pn=W.object({color:W.string()});h();import{z as I}from"zod";var Nt=I.object({visible:I.boolean(),color:I.string(),flipToFaceCamera:I.boolean(),font:I.string().optional(),fontSize:I.number(),margin:I.union([I.number(),I.tuple([I.number(),I.number(),I.number(),I.number()])]),outlineColor:I.string(),outlineOpacity:I.number(),outlineBlur:I.union([I.number(),I.string()]),outlineWidth:I.number(),outlineOffsetX:I.number(),outlineOffsetY:I.number(),strokeWidth:I.number(),maxWidth:I.number().optional(),maxHeight:I.number().optional(),strokeOpacity:I.number(),strokeColor:I.string(),fillOpacity:I.number(),hoverColor:I.string().optional(),id:I.union([I.string(),I.number()]),type:I.literal("text3d"),position:I.tuple([I.number(),I.number(),I.number()]),content:I.string(),rotation:I.number(),align:I.enum(["left","center","right"]).optional()}),Bt=I.strictObject(Nt.partial().omit({id:!0,type:!0}).shape),An=I.strictObject(Bt.omit({margin:!0,maxWidth:!0,maxHeight:!0}).shape);h();import*as Ee from"zod";h();var Pr=Ee.union([Ee.enum(["low","medium","high","always-visible"]),Ee.number()]),Rn=["","","low","medium","high","always-visible"];function On(t){return Math.min(5,Math.max(2,t))}function Be(t){if(typeof t=="number")return On(t);let e=Rn.indexOf(t);return e===-1?3:e}function Ar(t){let e=On(t);return Rn[e]}h();function st(t){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(t)}var Rr=/^\s+/,Or=/\s+$/;function g(t,e){if(t=t||"",e=e||{},t instanceof g)return t;if(!(this instanceof g))return new g(t,e);var n=Mr(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}g.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,i,r,a,s,o;return n=e.r/255,i=e.g/255,r=e.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),.2126*a+.7152*s+.0722*o},setAlpha:function(e){return this._a=Bn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Dn(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Dn(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+i+"%, "+r+"%)":"hsva("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Mn(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Mn(this._r,this._g,this._b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+i+"%, "+r+"%)":"hsla("+n+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Ln(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Fr(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(k(this._r,255)*100)+"%",g:Math.round(k(this._g,255)*100)+"%",b:Math.round(k(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(k(this._r,255)*100)+"%, "+Math.round(k(this._g,255)*100)+"%, "+Math.round(k(this._b,255)*100)+"%)":"rgba("+Math.round(k(this._r,255)*100)+"%, "+Math.round(k(this._g,255)*100)+"%, "+Math.round(k(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:$r[Ln(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+kn(this._r,this._g,this._b,this._a),i=n,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=g(e);i="#"+kn(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+i+")"},toString:function(e){var n=!!e;e=e||this._format;var i=!1,r=this._a<1&&this._a>=0,a=!n&&r&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return a?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return g(this.toString())},_applyModification:function(e,n){var i=e.apply(null,[this].concat([].slice.call(n)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Hr,arguments)},brighten:function(){return this._applyModification(Wr,arguments)},darken:function(){return this._applyModification(Ur,arguments)},desaturate:function(){return this._applyModification(Nr,arguments)},saturate:function(){return this._applyModification(Br,arguments)},greyscale:function(){return this._applyModification(zr,arguments)},spin:function(){return this._applyModification(jr,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Xr,arguments)},complement:function(){return this._applyCombination(Vr,arguments)},monochromatic:function(){return this._applyCombination(qr,arguments)},splitcomplement:function(){return this._applyCombination(Gr,arguments)},triad:function(){return this._applyCombination(Fn,[3])},tetrad:function(){return this._applyCombination(Fn,[4])}};g.fromRatio=function(t,e){if(st(t)=="object"){var n={};for(var i in t)t.hasOwnProperty(i)&&(i==="a"?n[i]=t[i]:n[i]=ze(t[i]));t=n}return g(t,e)};function Mr(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,a=null,s=!1,o=!1;return typeof t=="string"&&(t=Qr(t)),st(t)=="object"&&(ae(t.r)&&ae(t.g)&&ae(t.b)?(e=Dr(t.r,t.g,t.b),s=!0,o=String(t.r).substr(-1)==="%"?"prgb":"rgb"):ae(t.h)&&ae(t.s)&&ae(t.v)?(i=ze(t.s),r=ze(t.v),e=kr(t.h,i,r),s=!0,o="hsv"):ae(t.h)&&ae(t.s)&&ae(t.l)&&(i=ze(t.s),a=ze(t.l),e=Lr(t.h,i,a),s=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Bn(n),{ok:s,format:t.format||o,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function Dr(t,e,n){return{r:k(t,255)*255,g:k(e,255)*255,b:k(n,255)*255}}function Mn(t,e,n){t=k(t,255),e=k(e,255),n=k(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),a,s,o=(i+r)/2;if(i==r)a=s=0;else{var l=i-r;switch(s=o>.5?l/(2-i-r):l/(i+r),i){case t:a=(e-n)/l+(e<n?6:0);break;case e:a=(n-t)/l+2;break;case n:a=(t-e)/l+4;break}a/=6}return{h:a,s,l:o}}function Lr(t,e,n){var i,r,a;t=k(t,360),e=k(e,100),n=k(n,100);function s(c,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?c+(u-c)*6*d:d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}if(e===0)i=r=a=n;else{var o=n<.5?n*(1+e):n+e-n*e,l=2*n-o;i=s(l,o,t+1/3),r=s(l,o,t),a=s(l,o,t-1/3)}return{r:i*255,g:r*255,b:a*255}}function Dn(t,e,n){t=k(t,255),e=k(e,255),n=k(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),a,s,o=i,l=i-r;if(s=i===0?0:l/i,i==r)a=0;else{switch(i){case t:a=(e-n)/l+(e<n?6:0);break;case e:a=(n-t)/l+2;break;case n:a=(t-e)/l+4;break}a/=6}return{h:a,s,v:o}}function kr(t,e,n){t=k(t,360)*6,e=k(e,100),n=k(n,100);var i=Math.floor(t),r=t-i,a=n*(1-e),s=n*(1-r*e),o=n*(1-(1-r)*e),l=i%6,c=[n,s,a,a,o,n][l],u=[o,n,n,s,a,a][l],d=[a,a,o,n,n,s][l];return{r:c*255,g:u*255,b:d*255}}function Ln(t,e,n,i){var r=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(n).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Fr(t,e,n,i,r){var a=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(n).toString(16)),Q(zn(i))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function kn(t,e,n,i){var r=[Q(zn(i)),Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(n).toString(16))];return r.join("")}g.equals=function(t,e){return!t||!e?!1:g(t).toRgbString()==g(e).toRgbString()};g.random=function(){return g.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Nr(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.s-=e/100,n.s=ot(n.s),g(n)}function Br(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.s+=e/100,n.s=ot(n.s),g(n)}function zr(t){return g(t).desaturate(100)}function Hr(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.l+=e/100,n.l=ot(n.l),g(n)}function Wr(t,e){e=e===0?0:e||10;var n=g(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),g(n)}function Ur(t,e){e=e===0?0:e||10;var n=g(t).toHsl();return n.l-=e/100,n.l=ot(n.l),g(n)}function jr(t,e){var n=g(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,g(n)}function Vr(t){var e=g(t).toHsl();return e.h=(e.h+180)%360,g(e)}function Fn(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=g(t).toHsl(),i=[g(t)],r=360/e,a=1;a<e;a++)i.push(g({h:(n.h+a*r)%360,s:n.s,l:n.l}));return i}function Gr(t){var e=g(t).toHsl(),n=e.h;return[g(t),g({h:(n+72)%360,s:e.s,l:e.l}),g({h:(n+216)%360,s:e.s,l:e.l})]}function Xr(t,e,n){e=e||6,n=n||30;var i=g(t).toHsl(),r=360/n,a=[g(t)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,a.push(g(i));return a}function qr(t,e){e=e||6;for(var n=g(t).toHsv(),i=n.h,r=n.s,a=n.v,s=[],o=1/e;e--;)s.push(g({h:i,s:r,v:a})),a=(a+o)%1;return s}g.mix=function(t,e,n){n=n===0?0:n||50;var i=g(t).toRgb(),r=g(e).toRgb(),a=n/100,s={r:(r.r-i.r)*a+i.r,g:(r.g-i.g)*a+i.g,b:(r.b-i.b)*a+i.b,a:(r.a-i.a)*a+i.a};return g(s)};g.readability=function(t,e){var n=g(t),i=g(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)};g.isReadable=function(t,e,n){var i=g.readability(t,e),r,a;switch(a=!1,r=Jr(n),r.level+r.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};g.mostReadable=function(t,e,n){var i=null,r=0,a,s,o,l;n=n||{},s=n.includeFallbackColors,o=n.level,l=n.size;for(var c=0;c<e.length;c++)a=g.readability(t,e[c]),a>r&&(r=a,i=g(e[c]));return g.isReadable(t,i,{level:o,size:l})||!s?i:(n.includeFallbackColors=!1,g.mostReadable(t,["#fff","#000"],n))};var zt=g.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},$r=g.hexNames=Yr(zt);function Yr(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Bn(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function k(t,e){Kr(t)&&(t="100%");var n=Zr(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function ot(t){return Math.min(1,Math.max(0,t))}function U(t){return parseInt(t,16)}function Kr(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Zr(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Q(t){return t.length==1?"0"+t:""+t}function ze(t){return t<=1&&(t=t*100+"%"),t}function zn(t){return Math.round(parseFloat(t)*255).toString(16)}function Nn(t){return U(t)/255}var Z=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ae(t){return!!Z.CSS_UNIT.exec(t)}function Qr(t){t=t.replace(Rr,"").replace(Or,"").toLowerCase();var e=!1;if(zt[t])t=zt[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Z.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Z.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Z.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Z.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Z.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Z.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Z.hex8.exec(t))?{r:U(n[1]),g:U(n[2]),b:U(n[3]),a:Nn(n[4]),format:e?"name":"hex8"}:(n=Z.hex6.exec(t))?{r:U(n[1]),g:U(n[2]),b:U(n[3]),format:e?"name":"hex"}:(n=Z.hex4.exec(t))?{r:U(n[1]+""+n[1]),g:U(n[2]+""+n[2]),b:U(n[3]+""+n[3]),a:Nn(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Z.hex3.exec(t))?{r:U(n[1]+""+n[1]),g:U(n[2]+""+n[2]),b:U(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Jr(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}h();import*as x from"zod";var N={RIGHT:"right",LEFT:"left",TOP:"top",HIDDEN:"hidden",CENTER:"center"},de="low-priority",ea=Object.values(N),Ht=[N.RIGHT,N.LEFT,N.TOP,N.HIDDEN],Hn={MAX_WIDTH:"max-width",BALANCE:"balance"},Wn=Object.values(Hn),ta=x.string(),na=x.object({on:x.literal("zoom-level"),input:x.tuple([x.number()]).rest(x.number()),output:x.tuple([x.number()]).rest(x.number()),easing:ta.default("linear")}).refine(t=>t.input.length===t.output.length,{message:"input and output must have the same length"}),Un=x.object({margin:x.number().min(2).default(6),maxLines:x.number().min(1).default(2),textSize:x.number().min(0).default(11.5),maxWidth:x.number().min(0).default(150),lineHeight:x.number().min(0).default(1.2),textWrap:x.enum(Wn).default("max-width"),color:x.string().default("#333"),outlineColor:x.string().default("white"),textColor:x.string().optional(),textOutlineColor:x.string().optional(),pinColor:x.string().optional(),pinOutlineColor:x.string().optional(),pinColorInactive:x.string().optional(),pinOutlineColorInactive:x.string().optional(),icon:x.string().optional(),iconSize:x.number().min(0).default(20),iconScale:x.union([x.number(),na]).default(1),iconPadding:x.number().min(0).default(2),iconBorderRadiusFactor:x.number().min(0).max(1).default(1),iconFit:x.enum(["fill","contain","cover"]).default("cover"),iconOverflow:x.enum(["visible","hidden"]).default("hidden"),iconVisible:x.union([x.boolean(),x.number()]).default(!0),opacity:x.number().min(0).max(1).default(1),__EXPERIMENTAL_wrapperBackgroundColor:x.string().optional(),__EXPERIMENTAL_wrapperPaddingX:x.number().min(0).default(0),__EXPERIMENTAL_wrapperPaddingY:x.number().min(0).default(0),__EXPERIMENTAL_wrapperBorderRadius:x.number().min(0).default(0),__EXPERIMENTAL_wrapperDotSize:x.number().min(0).default(0),__EXPERIMENTAL_wrapperShadowColor:x.string().optional(),__EXPERIMENTAL_wrapperShadowOffsetX:x.number().default(0),__EXPERIMENTAL_wrapperShadowOffsetY:x.number().default(0),__EXPERIMENTAL_wrapperShadowBlur:x.number().min(0).default(0),__EXPERIMENTAL_wrapperOpacity:x.number().min(0).max(1).default(1)}),jn=t=>{let e={...t};e.color!=null&&(e.textColor==null&&(e.textColor=e.color),e.pinColor==null&&(e.pinColor=e.color)),e.outlineColor!=null&&(e.textOutlineColor==null&&(e.textOutlineColor=e.outlineColor),e.pinOutlineColor==null&&(e.pinOutlineColor=e.outlineColor));let n=e.pinColor??e.color,i=e.pinOutlineColor??e.outlineColor;return n!=null&&e.pinColorInactive==null&&(e.pinColorInactive=g(n).toRgbString()),i!=null&&e.pinOutlineColorInactive==null&&(e.pinOutlineColorInactive=g(i).toRgbString()),e},Vn=Un.transform(t=>jn(t)),Wt=t=>Vn.parse(t);var ia=(t,e)=>["color","outlineColor","maxLines","lineHeight","textSize","maxWidth","textWrap","textColor","textOutlineColor"].some(i=>e[i]!=null&&t[i]!==e[i]),ra=(t,e)=>["color","outlineColor","icon","iconSize","iconScale","iconVisible","iconPadding","iconBorderRadiusFactor","pinColor","pinOutlineColor","pinColorInactive","pinOutlineColorInactive"].some(i=>e[i]!=null&&t[i]!==e[i]),aa=(t,e)=>e.textPlacement!=null&&t.textPlacement!==e.textPlacement||e.appearance?.margin!=null&&t.appearance?.margin!==e.appearance.margin;h();h();var Gn=4,Yn=6.5,lt=Yn/2,Xn=[lt,lt,lt,lt],X=class t{lines=0;id;rank;type="label";initialRank;contextConfigured=!1;fillText=void 0;newStyle={};currentOpacity=0;visibilityNeedsUpdate=!1;activePlacement=N.RIGHT;text;style={top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"};projection={x:0,y:0};labelCacheId;labelCacheKeyInputs={};iconScaleCache={zoom:NaN,input:void 0,output:void 0,easing:void 0,value:1};pinIconKeyInputs={sprite:null};_cache={};appearance;options;visible=!0;enabled=!0;interactive=!1;isOccluded=!1;offscreen=!1;disposed=!1;canShow=!1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};currentStrategyIndex=-1;totalPinSize=0;iconScale=1;get scaledPinSize(){return this.totalPinSize*this.iconScale}iconPadding;get scaledIconPadding(){return this.appearance.iconPadding*this.iconScale}get textVisible(){return this.offscreen||!this.visible||!this.canShow||!this.enabled?!1:this.style.textLabelVisible===!0&&this.style.textAlign!=null&&this.style.left!=null&&this.style.top!=null}dirty=!0;textDirty=!0;pinDirty=!0;attachedDirty=!0;collisionDirty=!0;lastTextAlign;imageHash;pinSize=0;iconVisible=!1;static testId=0;pixelRatio;dp=(e=1)=>e*this.pixelRatio;constructor(e,n,i){if(this.id=n.id??nt(),this.options=n??{},this.text=e,this.pixelRatio=i,typeof n.rank=="string")this.rank=Be(n.rank),this.initialRank=this.rank;else if(n.rank!=null&&n.rank>0)this.rank=n.rank,this.initialRank=n.rank;else{let a=Math.trunc(t.testId*10)/10;t.testId+=.001,this.rank=a,this.initialRank=a}this.options.textPlacement=n.textPlacement??Ht;let r=Wt(n.appearance??{});this.appearance=r,this.iconPadding=r.iconPadding}setPixelRatio(e){e!==this.pixelRatio&&(this.pixelRatio=e,this.dirty=!0,this.pinDirty=!0,this.textDirty=!0,this.collisionDirty=!0)}calculatePinSize(){let e=this.dp();this.iconVisible&&typeof this.appearance.iconSize<"u"&&this.imageHash?this.pinSize=this.dp(this.appearance.iconSize):this.pinSize=this.dp(Yn),this.totalPinSize=Math.ceil((this.pinSize+2.5)/e)}getNoTextBbox(e){let n=this.scaledPinSize/2+e;return[n,n,n,n]}getHiddenTextPlacementBbox(e){return this.iconVisible?this.getNoTextBbox(e):Xn}getBoundingBoxForPlacement(e){let{width:n,height:i}=this.dimensions,{margin:r}=this.appearance;if(this.text==="")return this.getNoTextBbox(r);let a=Math.max(this.scaledPinSize,i);switch(e){case N.RIGHT:return[a/2+r,a/2+r,this.scaledPinSize/2+r,this.scaledPinSize/2+n+r];case N.LEFT:return[a/2+r,a/2+r,this.scaledPinSize/2+n+r,this.scaledPinSize/2+r];case N.TOP:{let s=this.dp();return[i+this.scaledPinSize/2/s+r,this.scaledPinSize/2+r,n/2+r,n/2+r]}case N.CENTER:return[i/2+r,i/2+r,n/2+r,n/2+r];case N.HIDDEN:return this.getHiddenTextPlacementBbox(r);case de:return Xn;default:return this.getNoTextBbox(r)}}getStrategyStyleForPlacement(e){let{width:n,height:i}=this.dimensions;switch(e){case N.TOP:this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-i-this.scaledPinSize/2,this.newStyle.left=-n/2;return;case N.LEFT:this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-i/2,this.newStyle.left=-n-this.scaledPinSize/2-Gn,this.newStyle.textLabelVisible=!0;return;case N.RIGHT:this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-i/2,this.newStyle.left=this.scaledPinSize/2+Gn,this.newStyle.textLabelVisible=!0;return;case N.CENTER:this.newStyle.pinVisibility=0,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-i/2,this.newStyle.left=-n/2;return;case N.HIDDEN:this.newStyle.pinVisibility=this.iconVisible?1:.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0;return;case de:default:this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0;return}}_cachedStrategies=null;invalidateStrategies(){this._cachedStrategies=null}get strategies(){if(this._cachedStrategies)return this._cachedStrategies;let e=Array.isArray(this.options.textPlacement)?this.options.textPlacement:[this.options.textPlacement],n=[],i=!1;for(let r of e){if(r===N.HIDDEN){i=!0;continue}n.push({name:r,getBoundingBox:()=>this.getBoundingBoxForPlacement(r),onStrategySelected:()=>this.getStrategyStyleForPlacement(r)})}return i&&(this.options.rank!=="always-visible"||n.length===0)&&(n.push({name:N.HIDDEN,getBoundingBox:()=>this.getBoundingBoxForPlacement(N.HIDDEN),onStrategySelected:()=>this.getStrategyStyleForPlacement(N.HIDDEN)}),n.push({name:de,getBoundingBox:()=>this.getBoundingBoxForPlacement(de),onStrategySelected:()=>this.getStrategyStyleForPlacement(de)})),this._cachedStrategies=n,n}animate=!0;recomputeCurrentStrategy(e=this.iconScale){let n=this.iconScale!==e;if(n||this.dirty){let i=this.pinDirty,r=this.strategies[this.currentStrategyIndex];if(this.iconScale=e,this.collisionDirty=!0,n&&!i&&this.calculatePinSize(),r){r.onStrategySelected();let a=this.style;this.style=this.newStyle,this.newStyle=a}this.dirty=!1}}onStrategySelected=e=>{if(this.currentStrategyIndex===e)return;this.currentStrategyIndex=e;let n=this.strategies[e];if(this.activePlacement=n?.name??this.activePlacement,n){n.onStrategySelected();let i=this.style;this.style=this.newStyle,this.newStyle=i}};collisionExtent=-1;packedMessage={x:0,y:0,enabled:!1,rank:0,bboxes:[],shouldCollideWithScreenEdges:!1,lockedToStrategyIndex:-1};_validMemoIndex=NaN;_validMemoText;_validMemoStrategies=null;_validMemoValue=!1;toPackedMessage(e=!1){let n=this.currentStrategyIndex,i=this._cachedStrategies,r;if(i!=null&&this._validMemoIndex===n&&this._validMemoText===this.text&&this._validMemoStrategies===i)r=this._validMemoValue;else{let c=this.strategies[n];r=n!=null&&n!==-1&&this.text!==""&&c!=null&&c.name!==N.HIDDEN&&c.name!==de,this._validMemoIndex=n,this._validMemoText=this.text,this._validMemoStrategies=this._cachedStrategies,this._validMemoValue=r}if(this.visible&&e&&this.collisionDirty===!1&&r?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,r&&this.currentStrategyIndex!==this.packedMessage.bboxes[0]?.[4]){let c=this.packedMessage.bboxes;for(let u=1;u<c.length;u++)if(c[u][4]===this.currentStrategyIndex){let d=c[0];c[0]=c[u],c[u]=d;break}}if(!this.collisionDirty)return this.packedMessage;let a=[],s=this.strategies,o=-1,l=0;for(let c=0;c<s.length;c++){let u=s[c].getBoundingBox();a.push([u[0],u[1],u[2],u[3],c]),u[0]>l&&(l=u[0]),u[1]>l&&(l=u[1]),u[2]>l&&(l=u[2]),u[3]>l&&(l=u[3]),r&&c===this.currentStrategyIndex&&(o=a.length-1)}if(o>0){let c=a[0];a[0]=a[o],a[o]=c}return this.packedMessage.bboxes=a,this.collisionExtent=l,this.packedMessage.shouldCollideWithScreenEdges=!1,this.collisionDirty=!1,this.packedMessage}destroy(){}},ut=X;h();var Ii=qi(Ti());h();var O={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right",CENTER:"center",TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",HIDDEN:"hidden"},Qs=Object.values(O),Qt=[O.CENTER,O.HIDDEN],wi=Object.freeze({size:8,color:"#666"});var le=class t{id;type="marker";static testId=0;rank=0;initialRank=0;activePlacement="center";pointerEvents="none";options={rank:"low",interactive:!1,id:"",placement:[...Qt],dynamicResize:!1,occlude:!0,occluderId:0,zIndex:void 0,verticalOffset:0,lowPriorityPin:{...wi},animated:!0};projection={x:0,y:0};enabled=!0;interactive=!1;canShow=!1;visible=!0;isOccluded=!1;offscreen=!1;strategyIndex=-1;activeBoundingBox={x:0,y:0,w:0,h:0};dimensions={width:0,height:0};markerContainer;containerEl;contentEl=null;contentHtml="";style={top:"0px",left:"0px"};dirty=!1;attachedDirty=!0;collisionDirty=!0;visibilityNeedsUpdate="show";constructor(e,n={}){if(this.id=n?.id||nt(),this.options=(0,Ii.default)(this.options,n),this.options.placement=n.placement??this.options.placement,typeof n.rank=="string")this.rank=Be(n.rank);else if(n.rank!=null&&n.rank>0)this.rank=n.rank;else{let i=Math.trunc(t.testId*10)/10;t.testId+=.001,this.rank=i}typeof n.interactive=="string"&&(this.pointerEvents=n.interactive==="pointer-events-auto"?"auto":"none"),this.contentHtml=e,this.initialRank=this.rank,this.markerContainer=document.createElement("div"),this.markerContainer.className="mappedin-marker",this.markerContainer.style.opacity="0",this.markerContainer.innerHTML=`<div class="mappedin-marker-content">${this.contentHtml}</div>`,this.markerContainer.setAttribute("data-marker-id",this.id.toString()),this.markerContainer.setAttribute("data-animated",String(this.options.animated)),this.containerEl=this.markerContainer.firstElementChild??null,this.contentEl=this.markerContainer.firstElementChild?.firstElementChild??null,this.applyZIndex()}applyZIndex(){this.options.zIndex!=null?this.markerContainer.style.zIndex=String(this.options.zIndex):this.markerContainer.style.removeProperty("z-index")}updateDimensionsIfZeroWidthHeight(e,n){this.dimensions.width===0&&this.dimensions.height===0&&this.updateDimensions(e,n)}updateDimensions(e,n){if(e!=null&&n!=null)this.dimensions={width:e,height:n};else{let{width:i,height:r}=this.markerContainer.getBoundingClientRect();this.dimensions={width:i,height:r}}this.currentStrategyIndex=-1,this.invalidateStrategies()}animation=null;currentStrategyIndex=-1;onStrategySelected=(e,n=!1)=>{if(this.currentStrategyIndex===e&&!n)return;this.currentStrategyIndex=e;let i=this.strategies[e];if(this.activePlacement=i?.name??"center",this.activePlacement===O.HIDDEN){this.markerContainer.setAttribute("data-placement",O.HIDDEN);let r=this.options.lowPriorityPin,a=r.size,s=r.color;this.markerContainer.style.setProperty("--mappedin-pin-size",`${a}px`),this.markerContainer.style.setProperty("--pin-color",s),this.markerContainer.style.opacity="0.6",this.style.top=-a/2+"px",this.style.left=-a/2+"px"}else{this.markerContainer.setAttribute("data-placement",this.activePlacement),this.markerContainer.style.removeProperty("--mappedin-pin-size"),this.markerContainer.style.removeProperty("--pin-color"),this.markerContainer.style.opacity="1";let{width:r,height:a}=this.dimensions,s=-a/2+"px",o=-r/2+"px";switch(this.style.top=s,this.style.left=o,this.activePlacement){case O.TOP:this.style.top=-a+"px";break;case O.BOTTOM:this.style.top="0px";break;case O.LEFT:this.style.left=-r+"px";break;case O.RIGHT:this.style.left="0px";break;case O.TOP_LEFT:this.style.top=-a+"px",this.style.left=-r+"px";break;case O.TOP_RIGHT:this.style.top=-a+"px",this.style.left="0px";break;case O.BOTTOM_LEFT:this.style.top="0px",this.style.left=-r+"px";break;case O.BOTTOM_RIGHT:this.style.top="0px",this.style.left="0px";break;case O.CENTER:default:this.style.top=s,this.style.left=o}}this.markerContainer.style.top=this.style.top,this.markerContainer.style.left=this.style.left};_cachedStrategies=null;invalidateStrategies(){this._cachedStrategies=null,this._cachedLowPriorityPinIndex=null}getBoundingBoxForPlacement(e){let{width:n,height:i}=this.dimensions;switch(e){case O.TOP:return[i+4,4,n/2+4,n/2+4];case O.BOTTOM:return[4,i+4,n/2+4,n/2+4];case O.LEFT:return[i/2+4,i/2+4,n+4,4];case O.RIGHT:return[i/2+4,i/2+4,4,n+4];case O.TOP_LEFT:return[i+4,4,n+4,4];case O.TOP_RIGHT:return[i+4,4,4,n+4];case O.BOTTOM_LEFT:return[4,i+4,n+4,4];case O.BOTTOM_RIGHT:return[4,i+4,4,n+4];case O.HIDDEN:{let r=Math.max(2,4/2),a=this.options.lowPriorityPin.size/2+r;return[a,a,a,a]}default:return[i/2+4,i/2+4,n/2+4,n/2+4]}}get strategies(){if(this._cachedStrategies)return this._cachedStrategies;let{width:e,height:n}=this.dimensions;if(e===0||n===0)return[];let i=Array.isArray(this.options.placement)?this.options.placement:[this.options.placement],r=[],a=!1;for(let s of i){if(s===O.HIDDEN){a=!0;continue}r.push({name:s,getBoundingBox:()=>this.getBoundingBoxForPlacement(s)})}return a&&(this.options.rank!=="always-visible"||r.length===0)&&r.push({name:O.HIDDEN,getBoundingBox:()=>this.getBoundingBoxForPlacement(O.HIDDEN)}),this._cachedStrategies=r,r}collisionExtent=-1;packedMessage={x:0,y:0,enabled:!1,rank:0,bboxes:[],lockedToStrategyIndex:-1,shouldCollideWithScreenEdges:!0};toPackedMessage(e=!1){this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.packedMessage.shouldCollideWithScreenEdges=!0;let n=this.currentStrategyIndex!==-1&&this.currentStrategyIndex!==this.lowPriorityPinStrategyIndex;if(this.visible&&e&&n&&this.collisionDirty===!1?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,n&&this.currentStrategyIndex!==this.packedMessage.bboxes[0]?.[4]){let o=this.packedMessage.bboxes;for(let l=1;l<o.length;l++)if(o[l][4]===this.currentStrategyIndex){let c=o[0];o[0]=o[l],o[l]=c;break}}if(!this.collisionDirty)return this.packedMessage;let i=[],r=this.strategies,a=-1,s=0;for(let o=0;o<r.length;o++){let l=r[o].getBoundingBox();i.push([l[0],l[1],l[2],l[3],o]),l[0]>s&&(s=l[0]),l[1]>s&&(s=l[1]),l[2]>s&&(s=l[2]),l[3]>s&&(s=l[3]),o===this.currentStrategyIndex&&n&&(a=i.length-1)}if(a>0){let o=i[0];i[0]=i[a],i[a]=o}return this.packedMessage.bboxes=i,this.collisionExtent=s,this.collisionDirty=!1,this.packedMessage}_cachedLowPriorityPinIndex=null;get lowPriorityPinStrategyIndex(){return this._cachedLowPriorityPinIndex!=null?this._cachedLowPriorityPinIndex:this.options.rank==="always-visible"?(this._cachedLowPriorityPinIndex=-1,-1):(this._cachedLowPriorityPinIndex=this.strategies.findIndex(e=>e.name===O.HIDDEN),this._cachedLowPriorityPinIndex)}destroy(){}};h();h();h();function Ei(t,e){return e.x+e.w<t.x+t.w&&e.x>t.x&&e.y>t.y&&e.y+e.h<t.y+t.h}h();function Pi(t,e){let[n,i]=e;return n>=t.x&&n<=t.x+t.w&&i>=t.y&&i<=t.y+t.h}h();function Ai(t,e){let n=e.x,i=e.y,r=e.x+e.w,a=e.y+e.h,s=t.x,o=t.y,l=t.x+t.w,c=t.y+t.h;return n<l&&s<r&&i<c&&o<a}h();function ue(t,e){for(let n=0;n<e.length;n++)t.push(e[n])}var F=class{x;y;w;h;userData;constructor(e,n,i,r,a){this.userData=typeof a>"u"?null:a,this.x=e,this.y=n,this.w=i,this.h=r}contains(e){return e===this?!1:Ei(this,e)}intersects(e){return Ai(this,e)}intersectsPoint(e){return Pi(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.8)",e.fillRect(this.x,this.y,this.w,this.h)}};h();h();var ce=class t{topLeft;topRight;bottomLeft;bottomRight;divided=!1;boundary;capacity=16;objects=[];parent;constructor(e,n){this.parent=n,this.boundary=e}getSize(){return this.divided?this.objects.length+this.topLeft.getSize()+this.topRight.getSize()+this.bottomLeft.getSize()+this.bottomRight.getSize():this.objects.length}subdivide(){let{x:e,y:n,w:i,h:r}=this.boundary;this.topLeft=new t(new F(e,n,i/2,r/2),this),this.topRight=new t(new F(e+i/2,n,i/2,r/2),this),this.bottomLeft=new t(new F(e,n+r/2,i/2,r/2),this),this.bottomRight=new t(new F(e+i/2,n+r/2,i/2,r/2),this),this.divided=!0}queryRect(e){let n=[];if(this.boundary.intersects(e))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryRect(e)),ue(n,this.topRight.queryRect(e)),ue(n,this.bottomLeft.queryRect(e)),ue(n,this.bottomRight.queryRect(e))),n}queryPoint(e){let n=[];if(this.boundary.intersectsPoint(e))n.push(...this.objects);else return[];return this.divided&&(ue(n,this.topLeft.queryPoint(e)),ue(n,this.topRight.queryPoint(e)),ue(n,this.bottomLeft.queryPoint(e)),ue(n,this.bottomRight.queryPoint(e))),n}insert(e){return(this.parent?!this.boundary.contains(e):!this.boundary.intersects(e))?!1:this.objects.length<this.capacity?(this.objects.push(e),!0):(this.divided||this.subdivide(),(this.topLeft.insert(e)||this.topRight.insert(e)||this.bottomLeft.insert(e)||this.bottomRight.insert(e))===!1&&this.objects.push(e),!0)}drawObjects(e){this.objects.forEach(n=>n.draw(e)),this.divided&&(this.topLeft.drawObjects(e),this.topRight.drawObjects(e),this.bottomLeft.drawObjects(e),this.bottomRight.drawObjects(e))}draw(e){e.rect(this.boundary.x,this.boundary.y,this.boundary.w,this.boundary.h),this.divided&&(this.topLeft.draw(e),this.topRight.draw(e),this.bottomLeft.draw(e),this.bottomRight.draw(e)),e.strokeStyle="black",e.lineWidth=4,e.stroke()}};h();h();h();h();var Jt=class{id;type;component;worldPosition;verticalOffset;disposed=!1;positionDirty=!0;parentId;constructor(e,n,i=0,r){this.id=e.id,this.component=e,this.type=e.type,this.worldPosition={x:n.x,y:n.y,z:n.z+i},this.verticalOffset=i,this.parentId=r}updatePosition(e,n,i){this.worldPosition.x=e,this.worldPosition.y=n,this.worldPosition.z=i,this.positionDirty=!0}setAltitude(e){this.worldPosition.z=e,this.positionDirty=!0}};h();h();h();var Ri=["bottom-left","top-left","top-right","bottom-right","center","top","bottom","left","right"];function Oi(t){let e=Ri.indexOf(t);return e===-1?0:e}function en(t){return Ri[t]??"bottom-left"}var yt=class{buffer;length=0;constructor(e=4096){this.buffer=new Float64Array(e)}reserve(e){let n=this.length+e;if(n<=this.buffer.length)return;let i=Math.max(16,this.buffer.length);for(;i<n;)i*=2;let r=new Float64Array(i);r.set(this.buffer.subarray(0,this.length)),this.buffer=r}push(e){this.buffer[this.length++]=e}reset(e){e&&(this.buffer=e),this.length=0}};h();h();h();function Mi(t,e,n,i,r){switch(r){case"top-left":return new F(0,0,n,i);case"top-right":return new F(t-n,0,n,i);case"bottom-left":return new F(0,e-i,n,i);case"bottom-right":return new F(t-n,e-i,n,i);case"center":return new F((t-n)/2,(e-i)/2,n,i);case"top":return new F((t-n)/2,0,n,i);case"bottom":return new F((t-n)/2,e-i,n,i);case"left":return new F(0,(e-i)/2,n,i);case"right":return new F(t-n,(e-i)/2,n,i);default:return new F(0,e-i,n,i)}}h();var eo=.0078125,Di=-64,Li=192;function Ce(t,e,n,i,r,a,s,o){return r<t+n&&t<r+s&&a<e+i&&e<a+o}function tn(t,e,n,i,r,a,s,o){return r+s<t+n&&r>t&&a>e&&a+o<e+i}function fe(t){let e=Math.floor(t*eo);return e<Di?Di:e>Li?Li:e}var _t=class{xs=new Float64Array(1024);ys=new Float64Array(1024);ws=new Float64Array(1024);hs=new Float64Array(1024);stamps=new Uint32Array(1024);count=0;_stamp=0;_cells=new Map;_used=[];reset(){this.count=0;for(let e=0;e<this._used.length;e++)this._used[e].length=0;this._used.length=0}_grow(){let e=this.xs.length*2,n=r=>{let a=new Float64Array(e);return a.set(r),a};this.xs=n(this.xs),this.ys=n(this.ys),this.ws=n(this.ws),this.hs=n(this.hs);let i=new Uint32Array(e);i.set(this.stamps),this.stamps=i}insert(e,n,i,r){if(!(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(r)))return;this.count===this.xs.length&&this._grow();let a=this.count++;this.xs[a]=e,this.ys[a]=n,this.ws[a]=i,this.hs[a]=r,this.stamps[a]=0;let s=fe(e),o=fe(n),l=fe(e+i),c=fe(n+r);for(let u=s;u<=l;u++)for(let d=o;d<=c;d++){let b=u*1024+d,p=this._cells.get(b);p===void 0&&(p=[],this._cells.set(b,p)),p.length===0&&this._used.push(p),p.push(a)}}countIntersections(e,n,i,r){if(this.count===0||!(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(r)))return 0;let a=++this._stamp;a>=4294967280&&(this.stamps.fill(0),this._stamp=a=1);let s=0,o=fe(e),l=fe(n),c=fe(e+i),u=fe(n+r),{xs:d,ys:b,ws:p,hs:f,stamps:T}=this;for(let y=o;y<=c;y++)for(let m=l;m<=u;m++){let _=this._cells.get(y*1024+m);if(_!==void 0)for(let C=0;C<_.length;C++){let S=_[C];T[S]!==a&&(T[S]=a,Ce(e,n,i,r,d[S],b[S],p[S],f[S])&&s++)}}return s}};var Oe=200,xt=10;function vt(t){return Number.isInteger(t)&&t>=0}function ki(t,e=t.length){if(!vt(e)||e>t.length||e<7)return!1;let n=t[5],i=t[6];if(!vt(n)||!vt(i))return!1;let r=7+n*4;if(r>e)return!1;for(let a=0;a<i;a++){if(r+7>e)return!1;let s=t[r+6];if(!vt(s)||(r+=7+s*5,r>e))return!1}return!0}var to=new _t;function Fi(t,e){let n=t[0],i=t[1],r=t[5],a=t[6],s=Mi(n,i,t[2],t[3],en(t[4])),o=s.x,l=s.y,c=s.w,u=s.h,d=a*7;(e==null||e.length<d)&&(e=new Float64Array(Math.max(d*2,64)));let b=to;b.reset();let p=-Oe,f=-Oe,T=n+Oe,y=i+Oe,m=n+Oe*2,_=i+Oe*2,C=7;for(let S=0;S<r;S++){let R=t[C],w=t[C+1],E=R-t[C+2]/2,L=w-t[C+3]/2;b.insert(E,L,R+t[C+2]/2-E,w+t[C+3]/2-L),C+=4}for(let S=0;S<a;S++){let R=t[C],w=t[C+1]===1,E=t[C+2],L=t[C+3],q=t[C+4]===1,M=t[C+5],B=t[C+6],z=C+7;C=z+B*5;let P=S*7,$=E<p||E>T||L<f||L>y?1:0;if(e[P]=-1,e[P+1]=$,e[P+2]=0,e[P+3]=0,e[P+4]=0,e[P+5]=0,e[P+6]=0,R!==1)continue;let j=1/0,J=-1,ie=0,re=0,me=0,be=0,Le=!1;for(let Te=0;Te<B;Te++){let ke=z+Te*5,It=t[ke+4];if(M!==-1&&It!==M)continue;let V=E-t[ke+2],G=L-t[ke],Y=E+t[ke+3]-V,K=L+t[ke+1]-G,ge=b.countIntersections(V,G,Y,K);if(q&&(Ce(V,G,Y,K,-xt,0,5,i)&&ge++,Ce(V,G,Y,K,-xt,0,n,5)&&ge++,Ce(V,G,Y,K,n-5,0,n+xt,i)&&ge++,Ce(V,G,Y,K,0,i-5,n,i+xt)&&ge++),Ce(V,G,Y,K,o,l,c,u)){e[P]=-1,e[P+1]=$,e[P+2]=1,e[P+3]=V,e[P+4]=G,e[P+5]=Y,e[P+6]=K;break}if(ge<j&&(ie=V,re=G,me=Y,be=K,Le=!0,J=It,j=ge),ge===0){b.insert(V,G,Y,K),e[P]=It,e[P+1]=tn(p,f,m,_,V,G,Y,K)?0:1,e[P+2]=1,e[P+3]=V,e[P+4]=G,e[P+5]=Y,e[P+6]=K;break}}w&&Le&&(b.insert(ie,re,me,be),e[P]=J,e[P+1]=tn(p,f,m,_,ie,re,me,be)?0:1,e[P+2]=1,e[P+3]=ie,e[P+4]=re,e[P+5]=me,e[P+6]=be)}return e}var he=class{onerror=()=>{};onmessage=()=>{};postMessage=e=>{let n=ki(e.input,e.length),i=n?Fi(e.input,e.output):e.output??new Float64Array(0);this.onmessage({data:{id:e.id,input:e.input,output:i,colliderCount:n?e.input[6]:0}})};terminate=()=>{}};h();var on=`"use strict";(()=>{function se(t,e){return e.x+e.w<t.x+t.w&&e.x>t.x&&e.y>t.y&&e.y+e.h<t.y+t.h}function oe(t,e){let[s,n]=e;return s>=t.x&&s<=t.x+t.w&&n>=t.y&&n<=t.y+t.h}function re(t,e){let s=e.x,n=e.y,r=e.x+e.w,o=e.y+e.h,c=t.x,b=t.y,I=t.x+t.w,g=t.y+t.h;return s<I&&c<r&&n<g&&b<o}var u=class{x;y;w;h;userData;constructor(e,s,n,r,o){this.userData=typeof o>"u"?null:o,this.x=e,this.y=s,this.w=n,this.h=r}contains(e){return e===this?!1:se(this,e)}intersects(e){return re(this,e)}intersectsPoint(e){return oe(this,e)}draw(e){e.fillStyle="rgba(123,222,26, 0.8)",e.fillRect(this.x,this.y,this.w,this.h)}};var xe=["bottom-left","top-left","top-right","bottom-right","center","top","bottom","left","right"];function ie(t){return xe[t]??"bottom-left"}function le(t,e,s,n,r){switch(r){case"top-left":return new u(0,0,s,n);case"top-right":return new u(t-s,0,s,n);case"bottom-left":return new u(0,e-n,s,n);case"bottom-right":return new u(t-s,e-n,s,n);case"center":return new u((t-s)/2,(e-n)/2,s,n);case"top":return new u((t-s)/2,0,s,n);case"bottom":return new u((t-s)/2,e-n,s,n);case"left":return new u(0,(e-n)/2,s,n);case"right":return new u(t-s,(e-n)/2,s,n);default:return new u(0,e-n,s,n)}}var Ie=.0078125,ue=-64,be=192;function S(t,e,s,n,r,o,c,b){return r<t+s&&t<r+c&&o<e+n&&e<o+b}function G(t,e,s,n,r,o,c,b){return r+c<t+s&&r>t&&o>e&&o+b<e+n}function R(t){let e=Math.floor(t*Ie);return e<ue?ue:e>be?be:e}var j=class{xs=new Float64Array(1024);ys=new Float64Array(1024);ws=new Float64Array(1024);hs=new Float64Array(1024);stamps=new Uint32Array(1024);count=0;_stamp=0;_cells=new Map;_used=[];reset(){this.count=0;for(let e=0;e<this._used.length;e++)this._used[e].length=0;this._used.length=0}_grow(){let e=this.xs.length*2,s=r=>{let o=new Float64Array(e);return o.set(r),o};this.xs=s(this.xs),this.ys=s(this.ys),this.ws=s(this.ws),this.hs=s(this.hs);let n=new Uint32Array(e);n.set(this.stamps),this.stamps=n}insert(e,s,n,r){if(!(Number.isFinite(e)&&Number.isFinite(s)&&Number.isFinite(n)&&Number.isFinite(r)))return;this.count===this.xs.length&&this._grow();let o=this.count++;this.xs[o]=e,this.ys[o]=s,this.ws[o]=n,this.hs[o]=r,this.stamps[o]=0;let c=R(e),b=R(s),I=R(e+n),g=R(s+r);for(let _=c;_<=I;_++)for(let x=b;x<=g;x++){let y=_*1024+x,f=this._cells.get(y);f===void 0&&(f=[],this._cells.set(y,f)),f.length===0&&this._used.push(f),f.push(o)}}countIntersections(e,s,n,r){if(this.count===0||!(Number.isFinite(e)&&Number.isFinite(s)&&Number.isFinite(n)&&Number.isFinite(r)))return 0;let o=++this._stamp;o>=4294967280&&(this.stamps.fill(0),this._stamp=o=1);let c=0,b=R(e),I=R(s),g=R(e+n),_=R(s+r),{xs:x,ys:y,ws:f,hs:F,stamps:O}=this;for(let D=b;D<=g;D++)for(let L=I;L<=_;L++){let w=this._cells.get(D*1024+L);if(w!==void 0)for(let l=0;l<w.length;l++){let a=w[l];O[a]!==o&&(O[a]=o,S(e,s,n,r,x[a],y[a],f[a],F[a])&&c++)}}return c}};var A=200,z=10;function V(t){return Number.isInteger(t)&&t>=0}function he(t,e=t.length){if(!V(e)||e>t.length||e<7)return!1;let s=t[5],n=t[6];if(!V(s)||!V(n))return!1;let r=7+s*4;if(r>e)return!1;for(let o=0;o<n;o++){if(r+7>e)return!1;let c=t[r+6];if(!V(c)||(r+=7+c*5,r>e))return!1}return!0}var Se=new j;function me(t,e){let s=t[0],n=t[1],r=t[5],o=t[6],c=le(s,n,t[2],t[3],ie(t[4])),b=c.x,I=c.y,g=c.w,_=c.h,x=o*7;(e==null||e.length<x)&&(e=new Float64Array(Math.max(x*2,64)));let y=Se;y.reset();let f=-A,F=-A,O=s+A,D=n+A,L=s+A*2,w=n+A*2,l=7;for(let a=0;a<r;a++){let P=t[l],M=t[l+1],T=P-t[l+2]/2,C=M-t[l+3]/2;y.insert(T,C,P+t[l+2]/2-T,M+t[l+3]/2-C),l+=4}for(let a=0;a<o;a++){let P=t[l],M=t[l+1]===1,T=t[l+2],C=t[l+3],pe=t[l+4]===1,H=t[l+5],Z=t[l+6],J=l+7;l=J+Z*5;let i=a*7,$=T<f||T>O||C<F||C>D?1:0;if(e[i]=-1,e[i+1]=$,e[i+2]=0,e[i+3]=0,e[i+4]=0,e[i+5]=0,e[i+6]=0,P!==1)continue;let ee=1/0,te=-1,v=0,q=0,B=0,X=0,ne=!1;for(let W=0;W<Z;W++){let N=J+W*5,Y=t[N+4];if(H!==-1&&Y!==H)continue;let d=T-t[N+2],h=C-t[N],m=T+t[N+3]-d,p=C+t[N+1]-h,E=y.countIntersections(d,h,m,p);if(pe&&(S(d,h,m,p,-z,0,5,n)&&E++,S(d,h,m,p,-z,0,s,5)&&E++,S(d,h,m,p,s-5,0,s+z,n)&&E++,S(d,h,m,p,0,n-5,s,n+z)&&E++),S(d,h,m,p,b,I,g,_)){e[i]=-1,e[i+1]=$,e[i+2]=1,e[i+3]=d,e[i+4]=h,e[i+5]=m,e[i+6]=p;break}if(E<ee&&(v=d,q=h,B=m,X=p,ne=!0,te=Y,ee=E),E===0){y.insert(d,h,m,p),e[i]=Y,e[i+1]=G(f,F,L,w,d,h,m,p)?0:1,e[i+2]=1,e[i+3]=d,e[i+4]=h,e[i+5]=m,e[i+6]=p;break}}M&&ne&&(y.insert(v,q,B,X),e[i]=te,e[i+1]=G(f,F,L,w,v,q,B,X)?0:1,e[i+2]=1,e[i+3]=v,e[i+4]=q,e[i+5]=B,e[i+6]=X)}return e}self.onmessage=t=>{let e=t.data;if(e==null||!(e.input instanceof Float64Array))return;let{id:s,input:n}=e,r=e.output instanceof Float64Array?e.output:new Float64Array(0),o=he(n,e.length),c=o?me(n,r):r,b={id:s,input:n,output:c,colliderCount:o?n[6]:0};self.postMessage(b,[n.buffer,c.buffer])};})();
|
|
2
2
|
`;var Ye=class extends pe{worker;collidersDirty=!0;_writer=new yt(8192);_spareOutput=new Float64Array(1024);_bufferInFlight=!1;_requestId=0;_inFlight=[];_snapshotA=[];_snapshotB=[];_sentInput=new Float64Array(0);_sentLength=-1;_appliedInput=new Float64Array(0);_appliedLength=-1;_appliedResults=new Float64Array(0);_appliedCount=0;_appliedComponents=[];_sendList=[];visibleCollidersQTree=new ce(new F(0,0,0,0));interactiveCollidersQTree=new ce(new F(0,0,0,0));_state;_canvasWidth;_canvasHeight;_debug=!1;_debugCanvas=null;_debugCtx=null;constructor(e,n,i,r,a=!0,s){if(super(),this._state=e,this._canvasWidth=n,this._canvasHeight=i,!a)this.worker=new he;else if(r)this.worker=new Worker(r);else if(on)try{this.worker=new Worker(URL.createObjectURL(new Blob([on])))}catch{this.worker=new he}else this.worker=new he;this.worker.onerror=()=>{this.working=!1,this.worker=new he,this.worker.onmessage=o=>this.resolve(o)},this.worker.onmessage=o=>this.resolve(o),s&&(this._debugCanvas=document.createElement("canvas"),this._debugCanvas.classList.add("mappedin__smart-collision-engine-debug__container"),this._debugCanvas.style.display="none",this._debugCanvas.width=n,this._debugCanvas.height=i,this._debugCanvas.style.width=n+"px",this._debugCanvas.style.height=i+"px",s.appendChild(this._debugCanvas),this._debugCtx=ne(this._debugCanvas))}working=!1;componentArray=[];resizeCanvas(e,n){this._canvasWidth=e,this._canvasHeight=n,this._debugCanvas&&(this._debugCanvas.width=e,this._debugCanvas.height=n,this._debugCanvas.style.width=e+"px",this._debugCanvas.style.height=n+"px")}update=(e,n,i="bottom-left",r=!1,a=[])=>{let s=!1;if(this.collidersDirty){this.componentArray=[];for(let m of this._state.entities)this.componentArray.push(m.component);this.collidersDirty=!1,s=!0}else for(let m=0;m<this.componentArray.length;m++)if(this.componentArray[m].collisionDirty){s=!0;break}if(s&&this.componentArray.sort((m,_)=>_.rank-m.rank),this.working)return;let o=this.componentArray,l=this._sendList;l.length=0;let c=-200,u=-200,d=this._canvasWidth+200,b=this._canvasHeight+200;for(let m=0;m<o.length;m++){let _=o[m];if(_.offscreen&&!_.collisionDirty&&_.collisionExtent>=0){let C=_.collisionExtent,S=_.projection.x,R=_.projection.y;if(S+C<c||S-C>d||R+C<u||R-C>b)continue}l.push(_)}let p=this._writer;p.reset(),p.reserve(7+a.length*4);let f=p.buffer;f[0]=this._canvasWidth,f[1]=this._canvasHeight,f[2]=e,f[3]=n,f[4]=Oi(i),f[5]=a.length,f[6]=l.length,p.length=7;for(let m=0;m<a.length;m++){let _=a[m];p.push(_.x),p.push(_.y),p.push(_.w),p.push(_.h)}for(let m=0;m<l.length;m++){let _=l[m],C=_.toPackedMessage(r),S=C.bboxes,R=S.length;p.reserve(7+R*5);let w=p.buffer,E=p.length,L=C.rank===5;w[E++]=C.enabled&&_.visible&&(L||!_.isOccluded)?1:0,w[E++]=L?1:0,w[E++]=C.x,w[E++]=C.y,w[E++]=C.shouldCollideWithScreenEdges?1:0,w[E++]=C.lockedToStrategyIndex??-1,w[E++]=R;for(let q=0;q<R;q++){let M=S[q];w[E++]=M[0],w[E++]=M[1],w[E++]=M[2],w[E++]=M[3],w[E++]=M[4]}p.length=E}if(this._tryReuseLastResult(p.buffer,p.length,l))return;this._sentInput.length<p.length&&(this._sentInput=new Float64Array(p.buffer.length)),this._sentInput.set(p.buffer.subarray(0,p.length)),this._sentLength=p.length;let T=this._snapshotA===this._inFlight?this._snapshotB:this._snapshotA;T.length=l.length;for(let m=0;m<l.length;m++)T[m]=l[m];this._inFlight=T,this.working=!0;let y={id:++this._requestId,input:p.buffer,length:p.length,output:this._spareOutput};if(this._spareOutput=void 0,this.worker instanceof he)this.worker.postMessage(y);else{this._bufferInFlight=!0;let m=[y.input.buffer];y.output&&m.push(y.output.buffer),this.worker.postMessage(y,m)}};resolve=e=>{this.working=!1;let n=e.data;if(n==null)return;this._bufferInFlight&&(this._writer.reset(n.input),this._bufferInFlight=!1);let i=n.output;if(this._spareOutput=i,this.collidersDirty){this._sentLength=-1,this._appliedLength=-1;return}let r=this._inFlight,a=Math.min(n.colliderCount,r.length);if(this._sentLength>=0){let s=this._appliedInput;this._appliedInput=this._sentInput,this._sentInput=s,this._appliedLength=this._sentLength,this._sentLength=-1;let o=a*7;this._appliedResults.length<o&&(this._appliedResults=new Float64Array(Math.max(o,64))),this._appliedResults.set(i.subarray(0,o)),this._appliedCount=a,this._appliedComponents.length=a;for(let l=0;l<a;l++)this._appliedComponents[l]=r[l]}else this._appliedLength=-1;this._applyResults(i,r,a),this.publish("visibility-changed")};_tryReuseLastResult(e,n,i){if(this._appliedLength!==n||this._appliedCount!==i.length)return!1;let r=this._appliedInput;for(let o=0;o<n;o++)if(e[o]!==r[o])return!1;let a=this._appliedComponents;for(let o=0;o<i.length;o++)if(i[o]!==a[o])return!1;return this._applyResults(this._appliedResults,i,this._appliedCount)&&this.publish("visibility-changed"),!0}_applyResults(e,n,i){let r=!1,a,s=new F(0,0,this._canvasWidth,this._canvasHeight);this.visibleCollidersQTree=new ce(s),this.interactiveCollidersQTree=new ce(s);for(let o=0;o<i;o++){let l=n[o],c=o*7,u=e[c],d=e[c+2]===1,b=l.offscreen,p=e[c+1]===1;l.offscreen=p,b!==p&&(r=!0),u!==-1&&d?(a=new F(e[c+3],e[c+4],e[c+5],e[c+6],{entityId:l.id}),this.visibleCollidersQTree.insert(a),l.interactive&&this.interactiveCollidersQTree.insert(a),(l.canShow===!1||l.visibilityNeedsUpdate!==!1||b&&!p)&&"visibilityNeedsUpdate"in l&&(l.visibilityNeedsUpdate="show"),u!==l.currentStrategyIndex&&(l.activeBoundingBox=a,l.onStrategySelected(u),r=!0)):((l.canShow===!0||l.visibilityNeedsUpdate!==!1)&&"visibilityNeedsUpdate"in l&&(l.visibilityNeedsUpdate="hide"),u!==-1&&u!==l.currentStrategyIndex&&(l.onStrategySelected(u),r=!0)),l.visibilityNeedsUpdate!==!1&&(r=!0)}return this._drawDebug(),r}showCollisionBoxes(){this._debug=!0,this._debugCanvas&&(this._debugCanvas.style.display="block")}hideCollisionBoxes(){this._debug=!1,this._debugCtx&&this._debugCanvas&&(this._debugCtx.clearRect(0,0,this._debugCanvas.width,this._debugCanvas.height),this._debugCanvas.style.display="none")}_drawDebug(){!this._debug||!this._debugCtx||!this._debugCanvas||(this._debugCtx.clearRect(0,0,this._debugCanvas.width,this._debugCanvas.height),this.visibleCollidersQTree.drawObjects(this._debugCtx))}destroy=()=>{this.worker.terminate(),this._debugCanvas?.remove()}};h();h();h();var no=/[\p{L}\u061C\u200E\u200F]/u,io=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF\u200F\u{10800}-\u{10FFF}\u{1E800}-\u{1EFFF}]/u,Ni=t=>{let e=no.exec(t);return e!=null&&io.test(e[0])},ro=(function(){let e,n;return i=>{if((!n||!n)&&(e=document.createElement("canvas"),e.width=500*i,e.height=500*i,e.style.width="500px",e.style.height="500px",n=ne(e)),!n)throw new Error("Could not get 2D context");return{measureCanvas:e,measureCanvasContext:n}}})(),Bi=({text:t,size:e,maxWidth:n,pixelRatio:i,maxLines:r=2,lineHeight:a=1.2,balance:s=!1,options:o={strokeText:!0}})=>{let l=`bold ${e*i}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,{measureCanvasContext:c}=ro(i);c.font=l;let u=t.split(" "),d=0,b=(S,R)=>{let w=[],E=0,L=0,q=!1;for(;L<u.length;){let M=u[L];if(E===R&&E>0){w[E-1]+="...",q=!0;break}if(w[E]==null&&(w[E]=M,L++),u.length===1){w[E]=M;break}if(u[L]==null)break;let{width:B}=c.measureText(w[E]+" "+u[L]);B<=S?(w[E]+=" "+u[L],L++):E++}return{lines:w,truncated:q}},p=n*i,{lines:f,truncated:T}=b(p,r);if(s&&!T&&f.length>1){let S=f.length,R=0,w=Math.ceil(p);for(;w-R>1;){let E=R+w>>1;b(E,S).truncated?R=E:w=E}f=b(w,S).lines}let y=[];f.forEach(S=>{let{width:R}=c.measureText(S);y.push(R),d=Math.max(R,d)});let m=e*i*a,_=f.length*m;return{maxWidth:d,maxHeight:_,lines:f.length,lineWidths:y,lineStrings:f,draw:(S,R,w)=>{f.length===1?(o.strokeText&&S.strokeText(f[0],R,w),S.fillText(f[0],R,w)):(o.strokeText&&(S.strokeText(f[0],R,w-m/2),S.strokeText(f[1],R,w+m/2)),S.fillText(f[0],R,w-m/2),S.fillText(f[1],R,w+m/2))}}};h();var ao=(()=>{let t;return{getDeviceType(){if(t)return t;let{userAgent:e,platform:n,maxTouchPoints:i}=window.navigator,r=/(iphone|ipod|ipad)/i.test(e),a=n==="iPad"||n.indexOf("Mac")===0&&i>0&&!window.MSStream,s=/android/i.test(e);return t={isIpad:a,isMobile:s||r||a,isIOS:r,isAndroid:s,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},t},_reset(){t=void 0}}})(),zi=ao.getDeviceType,Hi=(()=>{let t,e,n;function i(){if(e!==void 0)return e;t||(t=document.createElement("canvas"));let a=t.getContext("webgl")||t.getContext("experimental-webgl");if(!a)return e;try{let s=zi().isFirefox?null:a.getExtension("WEBGL_debug_renderer_info");return e=s?a.getParameter(s.UNMASKED_RENDERER_WEBGL):a.getParameter(a.RENDERER),e}catch{let o=new Error("Failed getting device info");throw o.name="FailedGettingDeviceInfo",o}}function r(){if(!zi().isWindows)return!1;if(n!==void 0)return n;let a=so()?.toLowerCase()??"";return n=a.includes("intel")&&(a.includes("uhd")||a.includes("iris")),n}return{getInfo:i,shouldDisableOffscreenCanvas:r,_setCanvas(a){t=a,e=void 0,n=void 0}}})(),so=Hi.getInfo,ln=Hi.shouldDisableOffscreenCanvas;h();function Wi(t){let e=new Image;return t&&(/<svg[\s\S]*>/i.test(t)?e.src=`data:image/svg+xml;base64,${btoa(t)}`:e.src=t),e}function ji(t){return(t*100|0)/100}var Vi;function wt(t,e,n,i,r){if(t.beginPath(),r>=1){t.arc(e,n,i,0,2*Math.PI);return}Vi??=typeof t.roundRect=="function";let a=i*2,s=i*r;s>0&&Vi?t.roundRect(e-i,n-i,a,a,s):t.rect(e-i,n-i,a,a)}function uo(t,e=0){let n=3735928559^e,i=1103547991^e;for(let r=0,a;r<t.length;r++)a=t.charCodeAt(r),n=Math.imul(n^a,2654435761),i=Math.imul(i^a,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&i)+(n>>>0)}var co=64,Ke=class t extends pe{dirty=!1;state;colliderContext;colliderCanvas;transformRequestFunc;constructor(e,n,i){super(),this.state=e,this.colliderCanvas=n,this.colliderContext=ne(n),this.transformRequestFunc=i}transformRequest=async e=>this.transformRequestFunc?await this.transformRequestFunc(e):{url:e};pinCache={};wrapperCache={};imageCache={};imagePromiseCache={};imageDimensionsCache={};textCache={};drawCount=0;projectionCount=0;animatingCount=0;drawAttemptCount=0;statsElement;pinIconCache=new Map;pinIconGeneration=0;_drawList=[];_drawListIds=[];update=e=>{this.dirty&&(this.wrapperCache={},this.pinCache={},this.pinIconCache.clear(),this.pinIconGeneration++),Se&&(this.drawCount=0,this.drawAttemptCount=0);let i=this._drawList,r=this._drawListIds,a=0,s=this.state.pixelRatio,o=this.colliderCanvas.width,l=this.colliderCanvas.height,c=o/s,u=l/s,d;for(let p of this.state.entities)if(p?.component instanceof ut&&!p.disposed){let f=p.component;if(d=this._prepareLabel(f,e),d==null||!f.canShow||!f.visible||f.currentOpacity<=0)continue;let T=f.appearance,y=f.dimensions.width+f.dimensions.height+f.scaledPinSize*2+(T.__EXPERIMENTAL_wrapperBackgroundColor?T.__EXPERIMENTAL_wrapperPaddingX+T.__EXPERIMENTAL_wrapperPaddingY+T.__EXPERIMENTAL_wrapperShadowBlur+Math.abs(T.__EXPERIMENTAL_wrapperShadowOffsetX)+Math.abs(T.__EXPERIMENTAL_wrapperShadowOffsetY):0)+32,m=f.projection.x,_=f.projection.y;if(T.iconOverflow!=="visible"&&(m<-y||_<-y||m>c+y||_>u+y))continue;i[a]=f,r[a]=d,a++}this.dirty=!1;let b=this.colliderContext;b.clearRect(0,0,o,l);for(let p=0;p<a;p++)this.draw(i[p],r[p],b);b.globalAlpha=1,Se&&this.updateStatsOverlay()};_prepareLabel(e,n){let i=this.state.pixelRatio,r=e.appearance.iconVisible;if(e.appearance.icon!=null&&r!=null){let b=typeof r=="boolean"?r:n>=r;b!==e.iconVisible&&(e.iconVisible=b,e.dirty=!0)}if((e.pinDirty||e.dirty||this.dirty)&&e.calculatePinSize(),e.offscreen||!e.visible)return null;let a=e.appearance,s=ji(e.pinSize),o,l=e.labelCacheKeyInputs;if(e.labelCacheId!=null&&l.pinColor===a.pinColor&&l.pinColorInactive===a.pinColorInactive&&l.pinOutlineColor===a.pinOutlineColor&&l.pinOutlineColorInactive===a.pinOutlineColorInactive&&l.pinSize===s&&l.iconVisible===e.iconVisible&&l.iconBorderRadiusFactor===a.iconBorderRadiusFactor?o=e.labelCacheId:(o=`${a.pinColor}-${a.pinColorInactive}-${a.pinOutlineColor}-${a.pinOutlineColorInactive}-${s}-${e.iconVisible}-${a.iconBorderRadiusFactor}`,l.pinColor=a.pinColor,l.pinColorInactive=a.pinColorInactive,l.pinOutlineColor=a.pinOutlineColor,l.pinOutlineColorInactive=a.pinOutlineColorInactive,l.pinSize=s,l.iconVisible=e.iconVisible,l.iconBorderRadiusFactor=a.iconBorderRadiusFactor),e.labelCacheId=o,(!this.pinCache[o]||this.dirty)&&(this.prepare(e,o,this.colliderContext),e.dirty=!0),(e.appearance.icon&&(!e.imageHash||e.pinDirty)||this.dirty)&&this.cacheImage(e),e.text!==""&&(this.textCache[e.id]==null||e.textDirty||this.dirty)){e.dirty=!0;let{lineStrings:b,lineWidths:p,width:f,height:T}=this.processText(e.text,e.appearance.textSize,e.appearance.maxWidth,e.appearance.maxLines,e.appearance.lineHeight,e.appearance.textWrap==="balance");this.textCache[e.id]=this.bakeTextCanvas(e,b,p,f,T),e.dimensions={width:Math.ceil(f/i),height:Math.ceil(T/i)}}let c=1,u=e.appearance.iconScale;if(u)if(typeof u=="number")c=u;else{let{on:b,input:p,output:f,easing:T}=u;if(b==="zoom-level"){let y=e.iconScaleCache;y.zoom===n&&y.input===p&&y.output===f&&y.easing===T?c=y.value:(c=ji(mn(n,p,f,T??"linear")),y.zoom=n,y.input=p,y.output=f,y.easing=T,y.value=c)}else hn.warn(`Unsupported interpolation property: ${b}`)}Se&&this.drawAttemptCount++,e.recomputeCurrentStrategy(e.iconVisible?c:1);let d=e.canShow&&(e.enabled||e.visibilityNeedsUpdate!==!1);return e.textDirty=!1,e.pinDirty=!1,d?o:null}processText=(e,n,i,r,a,s=!1)=>{let o=this.state.pixelRatio,{lineStrings:l,lineWidths:c,maxWidth:u,maxHeight:d}=Bi({text:e,size:n,pixelRatio:o,maxWidth:i,maxLines:r,lineHeight:a,balance:s});return{lineStrings:l,lineWidths:c,width:u+2.5*o*2,height:d+2.5*o*2}};bakeTextCanvas=(e,n,i,r,a)=>{let s=this.state.pixelRatio,o,l=r,c=a;window.OffscreenCanvas!=null&&!Ne()&&!ln()?o=new OffscreenCanvas(l,c):(o=document.createElement("canvas"),o.width=l,o.height=c,o.style.width=l+"px",o.style.height=c+"px");let u=ne(o,{willReadFrequently:!0});if(!u)throw new Error("Could not get a 2D context for the label text cache");let d=2.5*s,b=e.appearance.textSize*s*(e.appearance.lineHeight??1.2);u.textAlign="left",u.direction=Ni(e.text)?"rtl":"ltr",u.font=`bold ${e.appearance.textSize*s}px 'InterUI-Regular', Helvetica Neue, Arial, sans-serif`,u.textBaseline="middle",u.lineJoin="miter",u.miterLimit=2,u.lineWidth=d,u.fillStyle=e.appearance.textColor,u.strokeStyle=e.appearance.textOutlineColor;let p=d/2,f=(c+d/2)/2,T=[],y=n.length;for(let m=0;m<y;m++){let _=f+(m-(y-1)/2)*b;T.push(_-b/2),u.strokeText(n[m],p,_),u.fillText(n[m],p,_)}return{canvas:o,lineWidths:i,lineTops:T,lineHeightPx:b,strokePx:d,width:l,height:c}};cacheImage=e=>{if(!e.appearance.icon)return;let n=uo(e.appearance.icon);this.imagePromiseCache[n]||(this.imagePromiseCache[n]=new Promise(i=>{this.transformRequest(e.appearance.icon).then(r=>{let a=Wi(r.url);a.onload=()=>{this.imageCache[n]=a,this.publish("img:loaded"),i(a)}})})),e.imageHash!==n&&(e.imageHash=n,this.imagePromiseCache[n].then(()=>{e.dirty=!0}))};static canvasBytes(e){return e?e.width*e.height*4:0}static imageBytes(e){let n=e.naturalWidth??e.width??0,i=e.naturalHeight??e.height??0;return n*i*4}getCacheStats(){let e={entryCount:0,canvasCount:0,memoryBytes:0};for(let l of Object.values(this.textCache))e.entryCount++,e.canvasCount++,e.memoryBytes+=t.canvasBytes(l.canvas);let n={entryCount:0,canvasCount:0,memoryBytes:0};for(let l of Object.values(this.pinCache)){n.entryCount++;for(let c of l)c&&(n.canvasCount++,n.memoryBytes+=t.canvasBytes(c))}let i={entryCount:0,canvasCount:0,memoryBytes:0};for(let l of Object.values(this.wrapperCache))i.entryCount++,i.canvasCount++,i.memoryBytes+=t.canvasBytes(l);let r={entryCount:0,canvasCount:0,memoryBytes:0};for(let l of Object.values(this.imageCache))r.entryCount++,r.memoryBytes+=t.imageBytes(l);let a={entryCount:0,canvasCount:0,memoryBytes:0};for(let l of this.pinIconCache.values())a.entryCount++,a.canvasCount++,a.memoryBytes+=t.canvasBytes(l);let s=t.canvasBytes(this.colliderCanvas),o=e.memoryBytes+n.memoryBytes+i.memoryBytes+r.memoryBytes+a.memoryBytes+s;return{textCache:e,pinCache:n,wrapperCache:i,imageCache:r,pinIconCache:a,labelCanvasBytes:s,totalMemoryBytes:o}}createPinCanvas=(e,n,i,r,a=1)=>{let s,o=this.state.pixelRatio,l=e.totalPinSize*2*o*a;window.OffscreenCanvas!=null&&!Ne()?s=new OffscreenCanvas(l,l):(s=document.createElement("canvas"),s.width=l,s.height=l,s.style.width=l/o+"px",s.style.height=l/o+"px");let c=ne(s);c.shadowColor="rgba(0,0,0,0.3)",c.shadowOffsetY=2*o,c.shadowBlur=5*o;let u=l/2,d=l/2,b=n/2*a,p=b+2.5*o/2*a,f=e.appearance.iconBorderRadiusFactor;return wt(c,u,d,p,f),c.fillStyle=i,c.fill(),wt(c,u,d,b,f),c.shadowColor="transparent",c.fillStyle=r,c.fill(),s};prepare=(e,n,i)=>{let r=this.state.pixelRatio;i.lineWidth=4*r;let a=typeof e.appearance.iconScale=="number"?[e.appearance.iconScale]:e.appearance.iconScale==null?[]:e.appearance.iconScale.output,s=a.length>0?Math.max(...a):void 0,o=this.createPinCanvas(e,e.pinSize,e.appearance.pinOutlineColor,e.appearance.pinColor,s),l=this.createPinCanvas(e,3.5*r,e.appearance.pinOutlineColorInactive,e.appearance.pinColorInactive,s);this.pinCache[n]=[o,l]};updateStatsOverlay(){let e=this.colliderCanvas.parentElement;if(!(!e||typeof document>"u")){if(!this.statsElement){let n=document.createElement("div");n.className="mi-2d-draw-stats",n.style.cssText=["position: absolute","bottom: 8px","left: 8px","padding: 6px 10px","background: rgba(0, 0, 0, 0.6)","color: #fff","font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace","border-radius: 4px","pointer-events: none","z-index: 1000","user-select: none","white-space: pre"].join(";"),e.appendChild(n),this.statsElement=n}this.statsElement.textContent=`projections: ${this.projectionCount}
|
|
3
3
|
draw-attempts: ${this.drawAttemptCount}
|
|
4
4
|
draws: ${this.drawCount}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as G}from"./chunk-PWEV3AFA.js";var m,c=G(()=>{m={env:{NODE_ENV:"production",npm_package_version:"6.
|
|
1
|
+
import{a as G}from"./chunk-PWEV3AFA.js";var m,c=G(()=>{m={env:{NODE_ENV:"production",npm_package_version:"6.33.0"}}});c();var _="[MappedinJS]",B=(a=>(a[a.LOG=0]="LOG",a[a.DEBUG=0]="DEBUG",a[a.INFO=1]="INFO",a[a.WARN=2]="WARN",a[a.ERROR=3]="ERROR",a[a.SILENT=4]="SILENT",a))(B||{}),$={log:0,debug:0,info:1,warn:2,error:3,silent:4};function Y(n){return $[n.toLowerCase()]}function I(n="",{prefix:t=_}={}){let e=`${t}${n?`-${n}`:""}`,r=(i,o)=>{if(typeof window<"u"&&window.rnDebug){let a=o.map(s=>s instanceof Error&&s.stack?`${s.message}
|
|
2
2
|
${s.stack}`:s);window.rnDebug(`${n} ${i}: ${a.join(" ")}`)}};return{logState:m.env.NODE_ENV==="test"?4:1,debug(...i){this.logState<=0&&(console.debug(e,...i),r("debug",i))},log(...i){this.debug(...i)},info(...i){this.logState<=1&&(console.info(e,...i),r("info",i))},warn(...i){this.logState<=2&&(console.warn(e,...i),r("warn",i))},error(...i){this.logState<=3&&(console.error(e,...i),r("error",i))},assert(...i){console.assert(...i)},time(i){console.time(i)},timeEnd(i){console.timeEnd(i)},setLevel(i){let o=typeof i=="string"?Y(i):i;if(o===void 0||!(o>=0&&o<=4)){console.warn(e,`setLevel: unknown log level "${i}"`);return}this.logState=o}}}var V=I();function U(n){V.setLevel(n)}var Q=V;c();function j(n,t,e=!1){let r=null,i=0,o=function(...a){i++,i===1&&e===!0&&n(...a);let s=()=>{(!e||i>1)&&n(...a),r=null,i=0};clearTimeout(r),r=setTimeout(s,t)};return o.cancel=function(){r&&(clearTimeout(r),r=null),i=0},o}function ee(n,t,e){let r=null,i=null,o,a=null,s=0;e||(e={});let l=function(){s=e.leading===!1?0:Date.now(),a=null,i&&(o=n.apply(r,i)),a||(r=i=null)};return function(...u){let d=Date.now();!s&&e.leading===!1&&(s=d);let f=t-(d-s);return f<=0||f>t?(a&&(clearTimeout(a),a=null),s=d,o=n.apply(this,u),a||(r=i=null)):!a&&e.trailing!==!1&&(r=this,i=u,a=setTimeout(l,f)),o}}c();var x=[0,4,6,8,10],ne=()=>{let n=new Array(16).fill(0),t=Math.random()*4294967296;for(let r=0;r<n.length;r++)r>0&&(r&3)===0&&(t=Math.random()*4294967296),n[r]=t>>>((r&3)<<3)&255;let e=n.map(r=>r.toString(16).padStart(2,"0"));return e[6]="4"+e[6][1],e[8]=["8","9","a","b"].includes(e[7][0])?e[7]:"a"+e[7][1],x.map((r,i)=>e.slice(r,i===x.length-1?void 0:x[i+1]).join("")).join("-")};function ie(n,t=0){let e=3735928559^t,r=1103547991^t;for(let i=0,o;i<n.length;i++)o=n.charCodeAt(i),e=Math.imul(e^o,2654435761),r=Math.imul(r^o,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),4294967296*(2097151&r)+(e>>>0)}c();var k=class{_subscribers={};_abortController=new AbortController;get signal(){return this._abortController.signal}getSubscribers(t){if(!(!this._subscribers||!this._subscribers[t]||this.signal.aborted))return this._subscribers[t]}publish(t,e){let r=this.getSubscribers(t);r&&r.forEach(function(i){typeof i=="function"&&i(e)})}hasSubscribers(t){return!!this.getSubscribers(t)?.length}onAbort(t){this.signal.addEventListener("abort",()=>t(),{once:!0})}on(t,e,r){let i=r?.signal;if(i?.aborted||this._abortController&&this._abortController.signal.aborted)return()=>{};this._subscribers||(this._subscribers={}),this._subscribers[t]=this._subscribers[t]||[],this._subscribers[t].push(e);let o=()=>{this.off(t,e)};return i&&i.addEventListener("abort",o,{once:!0}),o}off(t,e){let r=this.getSubscribers(t);if(!r)return;let i=r.indexOf(e);i!==-1&&r.splice(i,1)}destroy(){this.signal.aborted||(this._subscribers={},this._abortController.abort())}};c();function K(n,t){return`${t} ${n}`}var A=class extends Error{constructor(t,e=_){super(K(t,e)),this.name="MappedinError"}},O=class extends A{constructor(t,e=_){super(t,e),this.name="MappedinRenderError"}};c();var de=63710088e-1;c();var g=63710088e-1,R={centimeters:g*100,centimetres:g*100,degrees:g/111325,feet:g*3.28084,inches:g*39.37,kilometers:g/1e3,kilometres:g/1e3,meters:g,metres:g,miles:g/1609.344,millimeters:g*1e3,millimetres:g*1e3,nauticalmiles:g/1852,radians:1,yards:g*1.0936},he={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/g,yards:1.0936133};function p(n,t,e){e===void 0&&(e={});var r={type:"Feature"};return(e.id===0||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=t||{},r.geometry=n,r}function q(n,t,e){if(e===void 0&&(e={}),!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!D(n[0])||!D(n[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:n};return p(r,t,e)}function me(n,t,e){e===void 0&&(e={});for(var r=0,i=n;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var s={type:"Polygon",coordinates:n};return p(s,t,e)}function C(n,t,e){if(e===void 0&&(e={}),n.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:n};return p(r,t,e)}function ve(n,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}function be(n,t,e){e===void 0&&(e={});var r={type:"MultiLineString",coordinates:n};return p(r,t,e)}function ye(n,t,e){e===void 0&&(e={});var r={type:"MultiPolygon",coordinates:n};return p(r,t,e)}function pe(n,t){t===void 0&&(t="kilometers");var e=R[t];if(!e)throw new Error(t+" units is invalid");return n*e}function we(n,t){t===void 0&&(t="kilometers");var e=R[t];if(!e)throw new Error(t+" units is invalid");return n/e}function Le(n){var t=n%(2*Math.PI);return t*180/Math.PI}function Ne(n){var t=n%360;return t*Math.PI/180}function D(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}c();function M(n,t,e){if(n!==null)for(var r,i,o,a,s,l,u,d=0,f=0,v,b=n.type,E=b==="FeatureCollection",w=b==="Feature",P=E?n.features.length:1,L=0;L<P;L++){u=E?n.features[L].geometry:w?n.geometry:n,v=u?u.type==="GeometryCollection":!1,s=v?u.geometries.length:1;for(var T=0;T<s;T++){var h=0,N=0;if(a=v?u.geometries[T]:u,a!==null){l=a.coordinates;var y=a.type;switch(d=e&&(y==="Polygon"||y==="MultiPolygon")?1:0,y){case null:break;case"Point":if(t(l,f,L,h,N)===!1)return!1;f++,h++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(t(l[r],f,L,h,N)===!1)return!1;f++,y==="MultiPoint"&&h++}y==="LineString"&&h++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-d;i++){if(t(l[r][i],f,L,h,N)===!1)return!1;f++}y==="MultiLineString"&&h++,y==="Polygon"&&N++}y==="Polygon"&&h++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(N=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-d;o++){if(t(l[r][i][o],f,L,h,N)===!1)return!1;f++}N++}h++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(M(a.geometries[r],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function xe(n,t){if(n.type==="Feature")t(n,0);else if(n.type==="FeatureCollection")for(var e=0;e<n.features.length&&t(n.features[e],e)!==!1;e++);}function J(n,t){var e,r,i,o,a,s,l,u,d,f,v=0,b=n.type==="FeatureCollection",E=n.type==="Feature",w=b?n.features.length:1;for(e=0;e<w;e++){for(s=b?n.features[e].geometry:E?n.geometry:n,u=b?n.features[e].properties:E?n.properties:{},d=b?n.features[e].bbox:E?n.bbox:void 0,f=b?n.features[e].id:E?n.id:void 0,l=s?s.type==="GeometryCollection":!1,a=l?s.geometries.length:1,i=0;i<a;i++){if(o=l?s.geometries[i]:s,o===null){if(t(null,v,u,d,f)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(o,v,u,d,f)===!1)return!1;break}case"GeometryCollection":{for(r=0;r<o.geometries.length;r++)if(t(o.geometries[r],v,u,d,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}v++}}function W(n,t){J(n,function(e,r,i,o,a){var s=e===null?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return t(p(e,i,{bbox:o,id:a}),r,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<e.coordinates.length;u++){var d=e.coordinates[u],f={type:l,coordinates:d};if(t(p(f,i),r,u)===!1)return!1}})}function z(n,t){W(n,function(e,r,i){var o=0;if(e.geometry){var a=e.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var s,l=0,u=0,d=0;if(M(e,function(f,v,b,E,w){if(s===void 0||r>l||E>u||w>d){s=f,l=r,u=E,d=w,o=0;return}var P=C([s,f],e.properties);if(t(P,r,i,w,o)===!1)return!1;o++,s=f})===!1)return!1}}})}function Ae(n,t,e){var r=e,i=!1;return z(n,function(o,a,s,l,u){i===!1&&e===void 0?r=o:r=t(r,o,a,s,l,u),i=!0}),r}c();function S(n){var t=[1/0,1/0,-1/0,-1/0];return M(n,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}S.default=S;var Oe=S;export{c as a,m as b,B as c,Y as d,I as e,U as f,Q as g,ne as h,ie as i,j,ee as k,k as l,A as m,O as n,p as o,q as p,me as q,C as r,ve as s,be as t,ye as u,pe as v,we as w,Le as x,Ne as y,M as z,xe as A,W as B,Ae as C,Oe as D,de as E};
|