@reearth/core 0.0.7-alpha.68 → 0.0.7-alpha.69

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/dist/core.js CHANGED
@@ -96328,7 +96328,7 @@ const iXe = ({
96328
96328
  useWebVR: !!n?.scene?.vr || void 0,
96329
96329
  debugShowFramesPerSecond: !!n?.debug?.showFramesPerSecond,
96330
96330
  verticalExaggerationRelativeHeight: n?.scene?.verticalExaggerationRelativeHeight,
96331
- verticalExaggeration: n?.scene?.verticalExaggeration
96331
+ verticalExaggeration: n?.terrain?.enabled ? n?.scene?.verticalExaggeration : 1
96332
96332
  }
96333
96333
  ),
96334
96334
  /* @__PURE__ */ ae.jsx(Aoe, { show: n?.sky?.skyBox?.show ?? !0 }),
@@ -96391,7 +96391,7 @@ function cXe({ error: e, resetErrorBoundary: t }) {
96391
96391
  /* @__PURE__ */ ae.jsx("p", { children: /* @__PURE__ */ ae.jsx("button", { style: { color: "#fff" }, onClick: t, children: "Retry" }) })
96392
96392
  ] });
96393
96393
  }
96394
- const lXe = "0.0.7-alpha.68", uXe = ({ viewerProperty: e }) => {
96394
+ const lXe = "0.0.7-alpha.69", uXe = ({ viewerProperty: e }) => {
96395
96395
  const t = de(e);
96396
96396
  t.current = e;
96397
96397
  const n = he(
package/dist/core.umd.cjs CHANGED
@@ -6728,7 +6728,7 @@ vec3 getTurboColormap(const float v) {
6728
6728
  ${zb}
6729
6729
  ${rPe}
6730
6730
  ${tPe}
6731
- `,uniforms:{...Qr(u,["color","frustumLength","blackPoint","whitePoint","gamma"]),globeDepthTexture:()=>c?.()??d._depthTexture}});if(r){const f=$Le({prefix:e,outputType:s,useGlobeDepth:a,getGlobeDepthTexture:c,uniforms:{textureScale:t,...Qr(u,["frustumLength","normalExponent","depthExponent"])}}),p=new M.PostProcessStageComposite({name:`${e}_ambient_occlusion_generate_and_filter`,stages:[h,f]});return d.uniforms.ambientOcclusionTexture=p.name,new M.PostProcessStageComposite({name:`${e}_ambient_occlusion`,stages:[p,d],inputPreviousStageTexture:!1,uniforms:fE([{stage:h,uniforms:["intensity","maxRadius","bias","frustumLength","focalLength"]},{stage:f,uniforms:["frustumLength","normalExponent","depthExponent"]},{stage:d,uniforms:["color","blackPoint","whitePoint","gamma"]}])})}else return d.uniforms.ambientOcclusionTexture=h.name,new M.PostProcessStageComposite({name:`${e}_ambient_occlusion`,stages:[h,d],inputPreviousStageTexture:!1,uniforms:fE([{stage:h,uniforms:["intensity","maxRadius","bias","frustumLength","focalLength"]},{stage:d,uniforms:["color","blackPoint","whitePoint","gamma"]}])})}const aPe=({enabled:e=!0,textureScale:t,directions:n,steps:i,denoise:r,accurateNormalReconstruction:o,outputType:s,useGlobeDepth:a,...c})=>{const{viewer:l}=Qn(),u=l?.scene,h=fF({owner:u?.postProcessStages,keys:[t,i,n,r,o,s,a],create:()=>{const d=sPe({textureScale:t,steps:i,directions:n,denoise:r,accurateNormalReconstruction:o,outputType:s,useGlobeDepth:a,getGlobeDepthTexture:()=>u.context.uniformState.globeDepthTexture,uniforms:c});return d.enabled=e,d},transferOwnership:(d,f)=>(f?.add(d),()=>{f?.remove(d)})});return h.enabled=e,Object.assign(h.uniforms,c),u?.requestRender(),Gl(()=>{const d=u?.camera.frustum;if(d instanceof M.PerspectiveFrustum&&d.fovy!==void 0&&d.aspectRatio!==void 0){const f=1/Math.tan(d.fovy/2);h.uniforms.focalLength.x=f*d.aspectRatio,h.uniforms.focalLength.y=f}}),null},cPe=e=>{const t=Qn(),[n,i]=R.useState(!1);return Gl(()=>{const r=t.scene;i(!r?.globe.depthTestAgainstTerrain);const{globeHeight:o}=r;if(!r||o==null)return;const s=r.camera.positionCartographic.height-o,a=r?.camera.frustum;a instanceof M.PerspectiveFrustum&&a.fov!==void 0&&(r.camera.frustum.near=M.Math.clamp(s-1,1,5)/Math.tan(a.fov/2))}),ce.jsx(aPe,{...e,useGlobeDepth:n})};var SN=(e=>(e[e.Occlusion=1]="Occlusion",e[e.Normal=2]="Normal",e[e.Depth=3]="Depth",e[e.Weight=4]="Weight",e[e.Shade=5]="Shade",e))(SN||{});const lPe={low:{directions:4,steps:4,textureScale:.5,maxRadius:30},medium:{directions:4,steps:8,textureScale:.5,maxRadius:40},high:{directions:8,steps:8,textureScale:1,maxRadius:40},extreme:{directions:16,steps:16,textureScale:1,maxRadius:40}},uPe="#00bebe",d0="#3B3CD0",hPe="#FF9900",dPe="#3B3CD0";let Jl,fPe,pPe,Ql;const f0=({position:e,clampToGround:t=!1,index:n,isEditing:i,isSelected:r,isAddingPoint:o,isExtrudedControlPoint:s,handleControlPointMouseEvent:a})=>{const c=R.useRef(e);c.current=e;const l=Wo(()=>new wo((f,p)=>"getValue"in c.current?c.current.getValue(f,p):c.current,!1)),u=R.useMemo(()=>({position:l,billboard:{image:i?o?bPe():r?yPe():gPe():mPe(),width:i?16:8,height:i?16:8,heightReference:t?vl.CLAMP_TO_GROUND:vl.NONE,disableDepthTestDistance:1/0}}),[t,l,o,i,r]),h=R.useCallback(()=>{a?.(n,!!s,"mousedown")},[n,s,a]),d=R.useCallback(()=>{a?.(n,!!s,"click")},[n,s,a]);return ce.jsx(uc,{...u,onMouseDown:h,onClick:d})};function mPe(){if(Jl!=null)return Jl;Jl=document.createElement("canvas"),Jl.width=16,Jl.height=16;const e=Jl.getContext("2d");return Vn(e!=null),e.fillStyle="white",e.fillRect(3,3,10,10),e.strokeStyle="black",e.lineWidth=2,e.strokeRect(3,3,10,10),Jl}function gPe(){return EN(fPe,{size:32,color:"white",strokeColor:d0})}function yPe(){return EN(pPe,{size:32,color:"white",strokeColor:hPe})}function bPe(){if(Ql!=null)return Ql;Ql=document.createElement("canvas"),Ql.width=32,Ql.height=32;const e=Ql.getContext("2d");return Vn(e!=null),e.beginPath(),e.arc(16,16,12,0,2*Math.PI),e.fillStyle="white",e.fill(),e.strokeStyle=dPe,e.lineWidth=4,e.stroke(),e.beginPath(),e.moveTo(16,8),e.lineTo(16,24),e.stroke(),e.moveTo(8,16),e.lineTo(24,16),e.stroke(),Ql}function EN(e,t){if(e!=null)return e;e=document.createElement("canvas"),e.width=t.size,e.height=t.size;const n=e.getContext("2d");return Vn(n!=null),n.beginPath(),n.arc(t.size/2,t.size/2,t.size/2-4,0,2*Math.PI),n.fillStyle=t.color,n.fill(),n.strokeStyle=t.strokeColor,n.lineWidth=4,n.stroke(),e}function _Pe(e,t){if(typeof e=="function")return e(t),()=>{e(null)};if(e!=null)return e.current=t,()=>{e.current=null}}const p0=R.memo(R.forwardRef(({entities:e,...t},n)=>{const{viewer:i}=Qn(),r=i?.scene,o=i?.entities,s=e??o,[a,c]=R.useState(()=>new io(t));return R.useEffect(()=>{c(new io(t))},[t.id]),R.useEffect(()=>(s?.add(a),()=>{s?.remove(a),r?.requestRender()}),[r,s,a]),R.useEffect(()=>_Pe(n,a),[n,a]),Object.assign(a,Ka(t,"id")),r?.requestRender(),null})),vPe={padding:"5px",color:"#fff",backgroundColor:"#000",borderRadius:"5px",lineHeight:1},TN=({children:e})=>ce.jsx("div",{style:vPe,children:e}),CN=R.createContext({});function RN(e){const t=R.useRef(null);return t.current===null&&(t.current=e()),t.current}const wPe=typeof window<"u"?R.useLayoutEffect:R.useEffect,pE=R.createContext(null);function mE(e,t){e.indexOf(t)===-1&&e.push(t)}function Nb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ia=(e,t,n)=>n>t?t:n<e?e:n;function gE(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Jh=()=>{},Ua=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Jh=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(gE(t,n))},Ua=(e,t,n)=>{if(!e)throw new Error(gE(t,n))});const Wa={},IN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function MN(e){return typeof e=="object"&&e!==null}const LN=e=>/^0[^.\s]+$/u.test(e);function PN(e){let t;return()=>(t===void 0&&(t=e()),t)}const No=e=>e,xPe=(e,t)=>n=>t(e(n)),m0=(...e)=>e.reduce(xPe),g0=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class yE{constructor(){this.subscriptions=[]}add(t){return mE(this.subscriptions,t),()=>Nb(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let o=0;o<r;o++){const s=this.subscriptions[o];s&&s(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ko=e=>e*1e3,Xo=e=>e/1e3;function ON(e,t){return t?e*(1e3/t):0}const GN=new Set;function bE(e,t,n){e||GN.has(t)||(console.warn(gE(t,n)),GN.add(t))}const VN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,SPe=1e-7,EPe=12;function TPe(e,t,n,i,r){let o,s,a=0;do s=t+(n-t)/2,o=VN(s,i,r)-e,o>0?n=s:t=s;while(Math.abs(o)>SPe&&++a<EPe);return s}function y0(e,t,n,i){if(e===t&&n===i)return No;const r=o=>TPe(o,0,1,e,n);return o=>o===0||o===1?o:VN(r(o),t,i)}const FN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,AN=e=>t=>1-e(1-t),zN=y0(.33,1.53,.69,.99),_E=AN(zN),NN=FN(_E),kN=e=>(e*=2)<1?.5*_E(e):.5*(2-Math.pow(2,-10*(e-1))),vE=e=>1-Math.sin(Math.acos(e)),XN=AN(vE),ZN=FN(vE),CPe=y0(.42,0,1,1),RPe=y0(0,0,.58,1),DN=y0(.42,0,.58,1),IPe=e=>Array.isArray(e)&&typeof e[0]!="number",UN=e=>Array.isArray(e)&&typeof e[0]=="number",WN={linear:No,easeIn:CPe,easeInOut:DN,easeOut:RPe,circIn:vE,circInOut:ZN,circOut:XN,backIn:_E,backInOut:NN,backOut:zN,anticipate:kN},MPe=e=>typeof e=="string",BN=e=>{if(UN(e)){Ua(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,r]=e;return y0(t,n,i,r)}else if(MPe(e))return Ua(WN[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),WN[e];return e},kb=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function LPe(e,t){let n=new Set,i=new Set,r=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){s.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,h=!1,d=!1)=>{const p=d&&r?n:i;return h&&s.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),s.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0,[n,i]=[i,n],n.forEach(c),n.clear(),r=!1,o&&(o=!1,l.process(u))}};return l}const PPe=40;function YN(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=kb.reduce((S,E)=>(S[E]=LPe(o),S),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=s,m=()=>{const S=Wa.useManualTiming?r.timestamp:performance.now();n=!1,Wa.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(S-r.timestamp,PPe),1)),r.timestamp=S,r.isProcessing=!0,a.process(r),c.process(r),l.process(r),u.process(r),h.process(r),d.process(r),f.process(r),p.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))},y=()=>{n=!0,i=!0,r.isProcessing||e(m)};return{schedule:kb.reduce((S,E)=>{const C=s[E];return S[E]=(O,V=!1,A=!1)=>(n||y(),C.schedule(O,V,A)),S},{}),cancel:S=>{for(let E=0;E<kb.length;E++)s[kb[E]].cancel(S)},state:r,steps:s}}const{schedule:Tn,cancel:Bc,state:Xi,steps:wE}=YN(typeof requestAnimationFrame<"u"?requestAnimationFrame:No,!0);let Xb;function OPe(){Xb=void 0}const wr={now:()=>(Xb===void 0&&wr.set(Xi.isProcessing||Wa.useManualTiming?Xi.timestamp:performance.now()),Xb),set:e=>{Xb=e,queueMicrotask(OPe)}},HN=e=>t=>typeof t=="string"&&t.startsWith(e),jN=HN("--"),GPe=HN("var(--"),xE=e=>GPe(e)?VPe.test(e.split("/*")[0].trim()):!1,VPe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function KN(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Qh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},b0={...Qh,transform:e=>ia(0,1,e)},Zb={...Qh,default:1},_0=e=>Math.round(e*1e5)/1e5,SE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function FPe(e){return e==null}const APe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,EE=(e,t)=>n=>!!(typeof n=="string"&&APe.test(n)&&n.startsWith(e)||t&&!FPe(n)&&Object.prototype.hasOwnProperty.call(n,t)),JN=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,o,s,a]=i.match(SE);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},zPe=e=>ia(0,255,e),TE={...Qh,transform:e=>Math.round(zPe(e))},ql={test:EE("rgb","red"),parse:JN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+TE.transform(e)+", "+TE.transform(t)+", "+TE.transform(n)+", "+_0(b0.transform(i))+")"};function NPe(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const CE={test:EE("#"),parse:NPe,transform:ql.transform},v0=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yc=v0("deg"),ra=v0("%"),at=v0("px"),kPe=v0("vh"),XPe=v0("vw"),QN={...ra,parse:e=>ra.parse(e)/100,transform:e=>ra.transform(e*100)},qh={test:EE("hsl","hue"),parse:JN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ra.transform(_0(t))+", "+ra.transform(_0(n))+", "+_0(b0.transform(i))+")"},ui={test:e=>ql.test(e)||CE.test(e)||qh.test(e),parse:e=>ql.test(e)?ql.parse(e):qh.test(e)?qh.parse(e):CE.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ql.transform(e):qh.transform(e),getAnimatableNone:e=>{const t=ui.parse(e);return t.alpha=0,ui.transform(t)}},ZPe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function DPe(e){return isNaN(e)&&typeof e=="string"&&(e.match(SE)?.length||0)+(e.match(ZPe)?.length||0)>0}const qN="number",$N="color",UPe="var",WPe="var(",ek="${}",BPe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function w0(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(BPe,c=>(ui.test(c)?(i.color.push(o),r.push($N),n.push(ui.parse(c))):c.startsWith(WPe)?(i.var.push(o),r.push(UPe),n.push(c)):(i.number.push(o),r.push(qN),n.push(parseFloat(c))),++o,ek)).split(ek);return{values:n,split:a,indexes:i,types:r}}function tk(e){return w0(e).values}function nk(e){const{split:t,types:n}=w0(e),i=t.length;return r=>{let o="";for(let s=0;s<i;s++)if(o+=t[s],r[s]!==void 0){const a=n[s];a===qN?o+=_0(r[s]):a===$N?o+=ui.transform(r[s]):o+=r[s]}return o}}const YPe=e=>typeof e=="number"?0:ui.test(e)?ui.getAnimatableNone(e):e;function HPe(e){const t=tk(e);return nk(e)(t.map(YPe))}const ys={test:DPe,parse:tk,createTransformer:nk,getAnimatableNone:HPe};function RE(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jPe({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,o=0,s=0;if(!t)r=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=RE(c,a,e+1/3),o=RE(c,a,e),s=RE(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:i}}function Db(e,t){return n=>n>0?t:e}const Zn=(e,t,n)=>e+(t-e)*n,IE=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},KPe=[CE,ql,qh],JPe=e=>KPe.find(t=>t.test(e));function ik(e){const t=JPe(e);if(Jh(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===qh&&(n=jPe(n)),n}const rk=(e,t)=>{const n=ik(e),i=ik(t);if(!n||!i)return Db(e,t);const r={...n};return o=>(r.red=IE(n.red,i.red,o),r.green=IE(n.green,i.green,o),r.blue=IE(n.blue,i.blue,o),r.alpha=Zn(n.alpha,i.alpha,o),ql.transform(r))},ME=new Set(["none","hidden"]);function QPe(e,t){return ME.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qPe(e,t){return n=>Zn(e,t,n)}function LE(e){return typeof e=="number"?qPe:typeof e=="string"?xE(e)?Db:ui.test(e)?rk:tOe:Array.isArray(e)?ok:typeof e=="object"?ui.test(e)?rk:$Pe:Db}function ok(e,t){const n=[...e],i=n.length,r=e.map((o,s)=>LE(o)(o,t[s]));return o=>{for(let s=0;s<i;s++)n[s]=r[s](o);return n}}function $Pe(e,t){const n={...e,...t},i={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(i[r]=LE(e[r])(e[r],t[r]));return r=>{for(const o in i)n[o]=i[o](r);return n}}function eOe(e,t){const n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],s=e.indexes[o][i[o]],a=e.values[s]??0;n[r]=a,i[o]++}return n}const tOe=(e,t)=>{const n=ys.createTransformer(t),i=w0(e),r=w0(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?ME.has(e)&&!r.values.length||ME.has(t)&&!i.values.length?QPe(e,t):m0(ok(eOe(i,r),r.values),n):(Jh(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Db(e,t))};function sk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Zn(e,t,n):LE(e)(e,t)}const nOe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Tn.update(t,n),stop:()=>Bc(t),now:()=>Xi.isProcessing?Xi.timestamp:wr.now()}},ak=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)i+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Ub=2e4;function PE(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Ub;)t+=n,i=e.next(t);return t>=Ub?1/0:t}function iOe(e,t=100,n){const i=n({...e,keyframes:[0,t]}),r=Math.min(PE(i),Ub);return{type:"keyframes",ease:o=>i.next(r*o).value/t,duration:Xo(r)}}const rOe=5;function ck(e,t,n){const i=Math.max(t-rOe,0);return ON(n-e(i),t-i)}const Dn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},OE=.001;function oOe({duration:e=Dn.duration,bounce:t=Dn.bounce,velocity:n=Dn.velocity,mass:i=Dn.mass}){let r,o;Jh(e<=ko(Dn.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=ia(Dn.minDamping,Dn.maxDamping,s),e=ia(Dn.minDuration,Dn.maxDuration,Xo(e)),s<1?(r=l=>{const u=l*s,h=u*e,d=u-n,f=GE(l,s),p=Math.exp(-h);return OE-d/f*p},o=l=>{const h=l*s*e,d=h*n+n,f=Math.pow(s,2)*Math.pow(l,2)*e,p=Math.exp(-h),m=GE(Math.pow(l,2),s);return(-r(l)+OE>0?-1:1)*((d-f)*p)/m}):(r=l=>{const u=Math.exp(-l*e),h=(l-n)*e+1;return-OE+u*h},o=l=>{const u=Math.exp(-l*e),h=(n-l)*(e*e);return u*h});const a=5/e,c=aOe(r,o,a);if(e=ko(e),isNaN(c))return{stiffness:Dn.stiffness,damping:Dn.damping,duration:e};{const l=Math.pow(c,2)*i;return{stiffness:l,damping:s*2*Math.sqrt(i*l),duration:e}}}const sOe=12;function aOe(e,t,n){let i=n;for(let r=1;r<sOe;r++)i=i-e(i)/t(i);return i}function GE(e,t){return e*Math.sqrt(1-t*t)}const cOe=["duration","bounce"],lOe=["stiffness","damping","mass"];function lk(e,t){return t.some(n=>e[n]!==void 0)}function uOe(e){let t={velocity:Dn.velocity,stiffness:Dn.stiffness,damping:Dn.damping,mass:Dn.mass,isResolvedFromDuration:!1,...e};if(!lk(e,lOe)&&lk(e,cOe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,o=2*ia(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Dn.mass,stiffness:r,damping:o}}else{const n=oOe({...e,velocity:0});t={...t,...n,mass:Dn.mass},t.isResolvedFromDuration=!0}return t}function Wb(e=Dn.visualDuration,t=Dn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=uOe({...n,velocity:-Xo(n.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(c*u)),y=s-o,g=Xo(Math.sqrt(c/u)),v=Math.abs(y)<5;i||(i=v?Dn.restSpeed.granular:Dn.restSpeed.default),r||(r=v?Dn.restDelta.granular:Dn.restDelta.default);let S;if(m<1){const C=GE(g,m);S=O=>{const V=Math.exp(-m*g*O);return s-V*((p+m*g*y)/C*Math.sin(C*O)+y*Math.cos(C*O))}}else if(m===1)S=C=>s-Math.exp(-g*C)*(y+(p+g*y)*C);else{const C=g*Math.sqrt(m*m-1);S=O=>{const V=Math.exp(-m*g*O),A=Math.min(C*O,300);return s-V*((p+m*g*y)*Math.sinh(A)+C*y*Math.cosh(A))/C}}const E={calculatedDuration:f&&h||null,next:C=>{const O=S(C);if(f)a.done=C>=h;else{let V=C===0?p:0;m<1&&(V=C===0?ko(p):ck(S,C,O));const A=Math.abs(V)<=i,G=Math.abs(s-O)<=r;a.done=A&&G}return a.value=a.done?s:O,a},toString:()=>{const C=Math.min(PE(E),Ub),O=ak(V=>E.next(C*V).value,C,30);return C+"ms "+O},toTransition:()=>{}};return E}Wb.applyToOptions=e=>{const t=iOe(e,100,Wb);return e.ease=t.ease,e.duration=ko(t.duration),e.type="keyframes",e};function VE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=e[0],d={done:!1,value:h},f=A=>a!==void 0&&A<a||c!==void 0&&A>c,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let m=n*t;const y=h+m,g=s===void 0?y:s(y);g!==y&&(m=g-h);const v=A=>-m*Math.exp(-A/i),S=A=>g+v(A),E=A=>{const G=v(A),N=S(A);d.done=Math.abs(G)<=l,d.value=d.done?g:N};let C,O;const V=A=>{f(d.value)&&(C=A,O=Wb({keyframes:[d.value,p(d.value)],velocity:ck(S,A,d.value),damping:r,stiffness:o,restDelta:l,restSpeed:u}))};return V(0),{calculatedDuration:null,next:A=>{let G=!1;return!O&&C===void 0&&(G=!0,E(A),V(A)),C!==void 0&&A>=C?O.next(A-C):(!G&&E(A),d)}}}function hOe(e,t,n){const i=[],r=n||Wa.mix||sk,o=e.length-1;for(let s=0;s<o;s++){let a=r(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||No:t;a=m0(c,a)}i.push(a)}return i}function dOe(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(Ua(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=hOe(t,i,r),c=a.length,l=u=>{if(s&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const d=g0(e[h],e[h+1],u);return a[h](d)};return n?u=>l(ia(e[0],e[o-1],u)):l}function fOe(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=g0(0,t,i);e.push(Zn(n,1,r))}}function pOe(e){const t=[0];return fOe(t,e.length-1),t}function mOe(e,t){return e.map(n=>n*t)}function gOe(e,t){return e.map(()=>t||DN).splice(0,e.length-1)}function $h({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=IPe(i)?i.map(BN):BN(i),o={done:!1,value:t[0]},s=mOe(n&&n.length===t.length?n:pOe(t),e),a=dOe(s,t,{ease:Array.isArray(r)?r:gOe(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const yOe=e=>e!==null;function FE(e,{repeat:t,repeatType:n="loop"},i,r=1){const o=e.filter(yOe),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const bOe={decay:VE,inertia:VE,tween:$h,keyframes:$h,spring:Wb};function uk(e){typeof e.type=="string"&&(e.type=bOe[e.type])}class AE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const _Oe=e=>e/100;class zE extends AE{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==wr.now()&&this.tick(wr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;uk(t);const{type:n=$h,repeat:i=0,repeatDelay:r=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const c=n||$h;process.env.NODE_ENV!=="production"&&c!==$h&&Ua(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==$h&&typeof a[0]!="number"&&(this.mixKeyframes=m0(_Oe,sk(a[0],a[1])),a=[0,100]);const l=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-s})),l.calculatedDuration===null&&(l.calculatedDuration=PE(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:r,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let S=this.currentTime,E=i;if(h){const A=Math.min(this.currentTime,r)/a;let G=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&G--,G=Math.min(G,h+1),G%2&&(d==="reverse"?(N=1-N,f&&(N-=f/a)):d==="mirror"&&(E=s)),S=ia(0,1,N)*a}const C=v?{done:!1,value:u[0]}:E.next(S);o&&!v&&(C.value=o(C.value));let{done:O}=C;!v&&c!==null&&(O=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return V&&p!==VE&&(C.value=FE(u,this.options,y,this.speed)),m&&m(C.value),V&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Xo(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xo(t)}get time(){return Xo(this.currentTime)}set time(t){t=ko(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(wr.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Xo(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=nOe,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(wr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function vOe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $l=e=>e*180/Math.PI,NE=e=>{const t=$l(Math.atan2(e[1],e[0]));return kE(t)},wOe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:NE,rotateZ:NE,skewX:e=>$l(Math.atan(e[1])),skewY:e=>$l(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},kE=e=>(e=e%360,e<0&&(e+=360),e),hk=NE,dk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xOe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dk,scaleY:fk,scale:e=>(dk(e)+fk(e))/2,rotateX:e=>kE($l(Math.atan2(e[6],e[5]))),rotateY:e=>kE($l(Math.atan2(-e[2],e[0]))),rotateZ:hk,rotate:hk,skewX:e=>$l(Math.atan(e[4])),skewY:e=>$l(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function XE(e){return e.includes("scale")?1:0}function ZE(e,t){if(!e||e==="none")return XE(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=xOe,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=wOe,r=a}if(!r)return XE(t);const o=i[t],s=r[1].split(",").map(EOe);return typeof o=="function"?o(s):s[o]}const SOe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ZE(n,t)};function EOe(e){return parseFloat(e.trim())}const ed=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],td=new Set(ed),pk=e=>e===Qh||e===at,TOe=new Set(["x","y","z"]),COe=ed.filter(e=>!TOe.has(e));function ROe(e){const t=[];return COe.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Hc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ZE(t,"x"),y:(e,{transform:t})=>ZE(t,"y")};Hc.translateX=Hc.x,Hc.translateY=Hc.y;const eu=new Set;let DE=!1,UE=!1,WE=!1;function mk(){if(UE){const e=Array.from(eu).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=ROe(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([o,s])=>{i.getValue(o)?.set(s)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}UE=!1,DE=!1,eu.forEach(e=>e.complete(WE)),eu.clear()}function gk(){eu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(UE=!0)})}function IOe(){WE=!0,gk(),mk(),WE=!1}class BE{constructor(t,n,i,r,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(eu.add(this),DE||(DE=!0,Tn.read(gk),Tn.resolveKeyframes(mk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;if(t[0]===null){const o=r?.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),r&&o===void 0&&r.set(t[0])}vOe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),eu.delete(this)}cancel(){this.state==="scheduled"&&(eu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const MOe=e=>e.startsWith("--");function yk(e,t,n){MOe(t)?e.style.setProperty(t,n):e.style[t]=n}const LOe={};function bk(e,t){const n=PN(e);return()=>LOe[t]??n()}const POe=bk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_k=bk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),x0=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,vk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:x0([0,.65,.55,1]),circOut:x0([.55,0,1,.45]),backIn:x0([.31,.01,.66,-.59]),backOut:x0([.33,1.53,.69,.99])};function wk(e,t){if(e)return typeof e=="function"?_k()?ak(e,t):"ease-out":UN(e)?x0(e):Array.isArray(e)?e.map(n=>wk(n,t)||vk.easeOut):vk[e]}function OOe(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const h=wk(a,r);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),e.animate(u,d)}function xk(e){return typeof e=="function"&&"applyToOptions"in e}function GOe({type:e,...t}){return xk(e)&&_k()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Sk extends AE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:r,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,Ua(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=GOe(t);this.animation=OOe(n,i,r,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=FE(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),yk(n,i,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Xo(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xo(t)}get time(){return Xo(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ko(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&POe()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),No):r(this)}}const Ek={anticipate:kN,backInOut:NN,circInOut:ZN};function VOe(e){return e in Ek}function FOe(e){typeof e.ease=="string"&&VOe(e.ease)&&(e.ease=Ek[e.ease])}const YE=10;class AOe extends Sk{constructor(t){FOe(t),uk(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:r,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new zE({...s,autoplay:!1}),c=Math.max(YE,wr.now()-this.startTime),l=ia(0,YE,c-YE),u=a.sample(c).value,{name:h}=this.options;o&&h&&yk(o,h,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const Tk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ys.test(e)||e==="0")&&!e.startsWith("url("));function zOe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function NOe(e,t,n,i){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=Tk(r,t),a=Tk(o,t);return Jh(s===a,`You are trying to animate ${t} from "${r}" to "${o}". "${s?o:r}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:zOe(e)||(n==="spring"||xk(n))&&i}function HE(e){e.duration=0,e.type="keyframes"}const kOe=new Set(["opacity","clipPath","filter","transform"]),XOe=PN(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ZOe(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return XOe()&&n&&kOe.has(n)&&(n!=="transform"||!l)&&!c&&!i&&r!=="mirror"&&o!==0&&s!=="inertia"}const DOe=40;class UOe extends AE{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wr.now();const d={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:o,repeatType:s,name:c,motionValue:l,element:u,...h},f=u?.KeyframeResolver||BE;this.keyframeResolver=new f(a,(p,m,y)=>this.onKeyframesResolved(p,m,d,!y),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,r){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:l,onUpdate:u}=i;this.resolvedAt=wr.now(),NOe(t,o,s,a)||((Wa.instantAnimations||!c)&&u?.(FE(t,i,n)),t[0]=t[t.length-1],HE(i),i.repeat=0);const d={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>DOe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},f=!l&&ZOe(d),p=d.motionValue?.owner?.current,m=f?new AOe({...d,element:p}):new zE(d);m.finished.then(()=>{this.notifyFinished()}).catch(No),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),IOe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ck(e,t,n,i=0,r=1){const o=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*i;return typeof n=="function"?n(o,s):r===1?o*i:a-o*i}const WOe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BOe(e){const t=WOe.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}const YOe=4;function Rk(e,t,n=1){Ua(n<=YOe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=BOe(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const s=o.trim();return IN(s)?parseFloat(s):s}return xE(r)?Rk(r,t,n+1):r}const HOe={type:"spring",stiffness:500,damping:25,restSpeed:10},jOe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KOe={type:"keyframes",duration:.8},JOe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},QOe=(e,{keyframes:t})=>t.length>2?KOe:td.has(e)?e.startsWith("scale")?jOe(t[1]):HOe:JOe,qOe=e=>e!==null;function $Oe(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(qOe),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}function Ik(e,t){if(e?.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function jE(e,t){const n=e?.[t]??e?.default??e;return n!==e?Ik(n,e):n}function eGe({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const KE=(e,t,n,i={},r,o)=>s=>{const a=jE(i,e)||{},c=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-ko(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};eGe(a)||Object.assign(u,QOe(e,u)),u.duration&&(u.duration=ko(u.duration)),u.repeatDelay&&(u.repeatDelay=ko(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(HE(u),u.delay===0&&(h=!0)),(Wa.instantAnimations||Wa.skipAnimations||r?.shouldSkipAnimations)&&(h=!0,HE(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&t.get()!==void 0){const d=$Oe(u.keyframes,a);if(d!==void 0){Tn.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new zE(u):new UOe(u)};function Mk(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function JE(e,t,n,i){if(typeof t=="function"){const[r,o]=Mk(i);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=Mk(i);t=t(n!==void 0?n:e.custom,r,o)}return t}function nd(e,t,n){const i=e.getProps();return JE(i,t,n!==void 0?n:i.custom,e)}const Lk=new Set(["width","height","top","left","right","bottom",...ed]),Pk=30,tGe=e=>!isNaN(parseFloat(e));class nGe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=wr.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=wr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tGe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&bE(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yE);const i=this.events[t].add(n);return t==="change"?()=>{i(),Tn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=wr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pk);return ON(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tu(e,t){return new nGe(e,t)}const QE=e=>Array.isArray(e);function iGe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tu(n))}function rGe(e){return QE(e)?e[e.length-1]||0:e}function oGe(e,t){const n=nd(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o){const a=rGe(o[s]);iGe(e,s,a)}}const ir=e=>!!(e&&e.getVelocity);function sGe(e){return!!(ir(e)&&e.add)}function qE(e,t){const n=e.getValue("willChange");if(sGe(n))return n.add(t);if(!n&&Wa.WillChange){const i=new Wa.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function $E(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ok="data-"+$E("framerAppearId");function Gk(e){return e.props[Ok]}function aGe({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Vk(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o,transitionEnd:s,...a}=t;const c=e.getDefaultTransition();o=o?Ik(o,c):c;const l=o?.reduceMotion;i&&(o=i);const u=[],h=r&&e.animationState&&e.animationState.getState()[r];for(const d in a){const f=e.getValue(d,e.latestValues[d]??null),p=a[d];if(p===void 0||h&&aGe(h,d))continue;const m={delay:n,...jE(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===y&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const E=Gk(e);if(E){const C=window.MotionHandoffAnimation(E,d,Tn);C!==null&&(m.startTime=C,g=!0)}}qE(e,d);const v=l??e.shouldReduceMotion;f.start(KE(d,f,p,v&&Lk.has(d)?{type:!1}:m,e,g));const S=f.animation;S&&u.push(S)}if(s){const d=()=>Tn.update(()=>{s&&oGe(e,s)});u.length?Promise.all(u).then(d):d()}return u}function eT(e,t,n={}){const i=nd(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(Vk(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:h}=r;return cGe(e,t,c,l,u,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,l]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function cGe(e,t,n=0,i=0,r=0,o=1,s){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(eT(c,t,{...s,delay:n+(typeof i=="function"?0:i)+Ck(e.variantChildren,c,i,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function lGe(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(o=>eT(e,o,n));i=Promise.all(r)}else if(typeof t=="string")i=eT(e,t,n);else{const r=typeof t=="function"?nd(e,t,n.custom):t;i=Promise.all(Vk(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const uGe={test:e=>e==="auto",parse:e=>e},Fk=e=>t=>t.test(e),Ak=[Qh,at,ra,Yc,XPe,kPe,uGe],zk=e=>Ak.find(Fk(e));function hGe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||LN(e):!0}const dGe=new Set(["brightness","contrast","saturate","opacity"]);function fGe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(SE)||[];if(!i)return e;const r=n.replace(i,"");let o=dGe.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const pGe=/\b([a-z-]*)\(.*?\)/gu,tT={...ys,getAnimatableNone:e=>{const t=e.match(pGe);return t?t.map(fGe).join(" "):e}},nT={...ys,getAnimatableNone:e=>{const t=ys.parse(e);return ys.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Nk={...Qh,transform:Math.round},iT={borderWidth:at,borderTopWidth:at,borderRightWidth:at,borderBottomWidth:at,borderLeftWidth:at,borderRadius:at,borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomRightRadius:at,borderBottomLeftRadius:at,width:at,maxWidth:at,height:at,maxHeight:at,top:at,right:at,bottom:at,left:at,inset:at,insetBlock:at,insetBlockStart:at,insetBlockEnd:at,insetInline:at,insetInlineStart:at,insetInlineEnd:at,padding:at,paddingTop:at,paddingRight:at,paddingBottom:at,paddingLeft:at,paddingBlock:at,paddingBlockStart:at,paddingBlockEnd:at,paddingInline:at,paddingInlineStart:at,paddingInlineEnd:at,margin:at,marginTop:at,marginRight:at,marginBottom:at,marginLeft:at,marginBlock:at,marginBlockStart:at,marginBlockEnd:at,marginInline:at,marginInlineStart:at,marginInlineEnd:at,fontSize:at,backgroundPositionX:at,backgroundPositionY:at,...{rotate:Yc,rotateX:Yc,rotateY:Yc,rotateZ:Yc,scale:Zb,scaleX:Zb,scaleY:Zb,scaleZ:Zb,skew:Yc,skewX:Yc,skewY:Yc,distance:at,translateX:at,translateY:at,translateZ:at,x:at,y:at,z:at,perspective:at,transformPerspective:at,opacity:b0,originX:QN,originY:QN,originZ:at},zIndex:Nk,fillOpacity:b0,strokeOpacity:b0,numOctaves:Nk},mGe={...iT,color:ui,backgroundColor:ui,outlineColor:ui,fill:ui,stroke:ui,borderColor:ui,borderTopColor:ui,borderRightColor:ui,borderBottomColor:ui,borderLeftColor:ui,filter:tT,WebkitFilter:tT,mask:nT,WebkitMask:nT},kk=e=>mGe[e],gGe=new Set([tT,nT]);function Xk(e,t){let n=kk(e);return gGe.has(n)||(n=ys),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yGe=new Set(["auto","none","0"]);function bGe(e,t,n){let i=0,r;for(;i<e.length&&!r;){const o=e[i];typeof o=="string"&&!yGe.has(o)&&w0(o).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=Xk(n,r)}class _Ge extends BE{constructor(t,n,i,r,o){super(t,n,i,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),xE(h))){const d=Rk(h,n.current);d!==void 0&&(t[u]=d),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Lk.has(i)||t.length!==2)return;const[r,o]=t,s=zk(r),a=zk(o),c=KN(r),l=KN(o);if(c!==l&&Hc[i]){this.needsMeasurement=!0;return}if(s!==a)if(pk(s)&&pk(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else Hc[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||hGe(t[r]))&&i.push(r);i.length&&bGe(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Hc[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Hc[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const vGe=new Set(["opacity","clipPath","filter","transform"]);function Zk(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const r=n?.[e]??i.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(i=>i!=null)}const Dk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function wGe(e){return MN(e)&&"offsetHeight"in e}const{schedule:rT}=YN(queueMicrotask,!1),bs={x:!1,y:!1};function Uk(){return bs.x||bs.y}function xGe(e){return e==="x"||e==="y"?bs[e]?null:(bs[e]=!0,()=>{bs[e]=!1}):bs.x||bs.y?null:(bs.x=bs.y=!0,()=>{bs.x=bs.y=!1})}function Wk(e,t){const n=Zk(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function SGe(e){return!(e.pointerType==="touch"||Uk())}function EGe(e,t,n={}){const[i,r,o]=Wk(e,n);return i.forEach(s=>{let a=!1,c=!1,l;const u=()=>{s.removeEventListener("pointerleave",p)},h=y=>{l&&(l(y),l=void 0),u()},d=y=>{a=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),c&&(c=!1,h(y))},f=()=>{a=!0,window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",d,r)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}h(y)}},m=y=>{if(!SGe(y))return;c=!1;const g=t(s,y);typeof g=="function"&&(l=g,s.addEventListener("pointerleave",p,r))};s.addEventListener("pointerenter",m,r),s.addEventListener("pointerdown",f,r)}),o}const Bk=(e,t)=>t?e===t?!0:Bk(e,t.parentElement):!1,oT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TGe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function CGe(e){return TGe.has(e.tagName)||e.isContentEditable===!0}const RGe=new Set(["INPUT","SELECT","TEXTAREA"]);function IGe(e){return RGe.has(e.tagName)||e.isContentEditable===!0}const Bb=new WeakSet;function Yk(e){return t=>{t.key==="Enter"&&e(t)}}function sT(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const MGe=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Yk(()=>{if(Bb.has(n))return;sT(n,"down");const r=Yk(()=>{sT(n,"up")}),o=()=>sT(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Hk(e){return oT(e)&&!Uk()}const jk=new WeakSet;function LGe(e,t,n={}){const[i,r,o]=Wk(e,n),s=a=>{const c=a.currentTarget;if(!Hk(a)||jk.has(a))return;Bb.add(c),n.stopPropagation&&jk.add(a);const l=t(c,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Bb.has(c)&&Bb.delete(c),Hk(f)&&typeof l=="function"&&l(f,{success:p})},h=f=>{u(f,c===window||c===document||n.useGlobalTarget||Bk(c,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",d,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),wGe(a)&&(a.addEventListener("focus",l=>MGe(l,r)),!CGe(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function aT(e){return MN(e)&&"ownerSVGElement"in e}const Yb=new WeakMap;let Hb;const Kk=(e,t,n)=>(i,r)=>r&&r[0]?r[0][e+"Size"]:aT(i)&&"getBBox"in i?i.getBBox()[t]:i[n],PGe=Kk("inline","width","offsetWidth"),OGe=Kk("block","height","offsetHeight");function GGe({target:e,borderBoxSize:t}){Yb.get(e)?.forEach(n=>{n(e,{get width(){return PGe(e,t)},get height(){return OGe(e,t)}})})}function VGe(e){e.forEach(GGe)}function FGe(){typeof ResizeObserver>"u"||(Hb=new ResizeObserver(VGe))}function AGe(e,t){Hb||FGe();const n=Zk(e);return n.forEach(i=>{let r=Yb.get(i);r||(r=new Set,Yb.set(i,r)),r.add(t),Hb?.observe(i)}),()=>{n.forEach(i=>{const r=Yb.get(i);r?.delete(t),r?.size||Hb?.unobserve(i)})}}const jb=new Set;let id;function zGe(){id=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};jb.forEach(t=>t(e))},window.addEventListener("resize",id)}function NGe(e){return jb.add(e),id||zGe(),()=>{jb.delete(e),!jb.size&&typeof id=="function"&&(window.removeEventListener("resize",id),id=void 0)}}function Jk(e,t){return typeof e=="function"?NGe(e):AGe(e,t)}function kGe(e){return aT(e)&&e.tagName==="svg"}const XGe=[...Ak,ui,ys],ZGe=e=>XGe.find(Fk(e)),Qk=()=>({translate:0,scale:1,origin:0,originPoint:0}),rd=()=>({x:Qk(),y:Qk()}),qk=()=>({min:0,max:0}),_i=()=>({x:qk(),y:qk()}),DGe=new WeakMap;function Kb(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function S0(e){return typeof e=="string"||Array.isArray(e)}const cT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lT=["initial",...cT];function Jb(e){return Kb(e.animate)||lT.some(t=>S0(e[t]))}function $k(e){return!!(Jb(e)||e.variants)}function UGe(e,t,n){for(const i in t){const r=t[i],o=n[i];if(ir(r))e.addValue(i,r);else if(ir(o))e.addValue(i,tu(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const s=e.getValue(i);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=e.getStaticValue(i);e.addValue(i,tu(s!==void 0?s:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const uT={current:null},eX={current:!1},WGe=typeof window<"u";function BGe(){if(eX.current=!0,!!WGe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uT.current=e.matches;e.addEventListener("change",t),t()}else uT.current=!1}const tX=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Qb={};function nX(e){Qb=e}function YGe(){return Qb}class HGe{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=BE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=wr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Tn.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Jb(n),this.isVariantNode=$k(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&ir(p)&&p.set(l[f])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,DGe.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(eX.current||BGe(),this.shouldReduceMotion=uT.current),process.env.NODE_ENV!=="production"&&bE(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Bc(this.notifyUpdate),Bc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&vGe.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,h=new Sk({element:this.current,name:t,keyframes:a,times:c,ease:l,duration:ko(u)}),d=s(h);this.valueSubscriptions.set(t,()=>{d(),h.cancel()});return}const i=td.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Tn.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Qb){const n=Qb[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_i()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<tX.length;i++){const r=tX[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,s=t[o];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=UGe(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=tu(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(IN(i)||LN(i))?i=parseFloat(i):!ZGe(i)&&ys.test(n)&&(i=Xk(t,n)),this.setBaseTarget(t,ir(i)?i.get():i)),ir(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=JE(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ir(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yE),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rT.render(this.render)}}class iX extends HGe{constructor(){super(...arguments),this.KeyframeResolver=_Ge}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ir(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jc{constructor(t){this.isMounted=!1,this.node=t}update(){}}function rX({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function jGe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function KGe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function hT(e){return e===void 0||e===1}function dT({scale:e,scaleX:t,scaleY:n}){return!hT(e)||!hT(t)||!hT(n)}function nu(e){return dT(e)||oX(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oX(e){return sX(e.x)||sX(e.y)}function sX(e){return e&&e!=="0%"}function qb(e,t,n){const i=e-n,r=t*i;return n+r}function aX(e,t,n,i,r){return r!==void 0&&(e=qb(e,r,i)),qb(e,n,i)+t}function fT(e,t=0,n=1,i,r){e.min=aX(e.min,t,n,i,r),e.max=aX(e.max,t,n,i,r)}function cX(e,{x:t,y:n}){fT(e.x,t.translate,t.scale,t.originPoint),fT(e.y,n.translate,n.scale,n.originPoint)}const lX=.999999999999,uX=1.0000000000001;function JGe(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,s;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&sd(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,cX(e,s)),i&&nu(o.latestValues)&&sd(e,o.latestValues))}t.x<uX&&t.x>lX&&(t.x=1),t.y<uX&&t.y>lX&&(t.y=1)}function od(e,t){e.min=e.min+t,e.max=e.max+t}function hX(e,t,n,i,r=.5){const o=Zn(e.min,e.max,r);fT(e,t,n,o,i)}function dX(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function sd(e,t){hX(e.x,dX(t.x,e.x),t.scaleX,t.scale,t.originX),hX(e.y,dX(t.y,e.y),t.scaleY,t.scale,t.originY)}function fX(e,t){return rX(KGe(e.getBoundingClientRect(),t))}function QGe(e,t,n){const i=fX(e,n),{scroll:r}=t;return r&&(od(i.x,r.offset.x),od(i.y,r.offset.y)),i}const qGe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$Ge=ed.length;function eVe(e,t,n){let i="",r=!0;for(let o=0;o<$Ge;o++){const s=ed[o],a=e[s];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(s.startsWith("scale")?1:0);else{const l=parseFloat(a);c=s.startsWith("scale")?l===1:l===0}if(!c||n){const l=Dk(a,iT[s]);if(!c){r=!1;const u=qGe[s]||s;i+=`${u}(${l}) `}n&&(t[s]=l)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}function pT(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const c in t){const l=t[c];if(td.has(c)){s=!0;continue}else if(jN(c)){r[c]=l;continue}else{const u=Dk(l,iT[c]);c.startsWith("origin")?(a=!0,o[c]=u):i[c]=u}}if(t.transform||(s||n?i.transform=eVe(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;i.transformOrigin=`${c} ${l} ${u}`}}function pX(e,{style:t,vars:n},i,r){const o=e.style;let s;for(s in t)o[s]=t[s];r?.applyProjectionStyles(o,i);for(s in n)o.setProperty(s,n[s])}function mX(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const E0={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(at.test(e))e=parseFloat(e);else return e;const n=mX(e,t.target.x),i=mX(e,t.target.y);return`${n}% ${i}%`}},tVe={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=ys.parse(e);if(r.length>5)return i;const o=ys.createTransformer(e),s=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=c;const l=Zn(a,c,.5);return typeof r[2+s]=="number"&&(r[2+s]/=l),typeof r[3+s]=="number"&&(r[3+s]/=l),o(r)}},mT={borderRadius:{...E0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E0,borderTopRightRadius:E0,borderBottomLeftRadius:E0,borderBottomRightRadius:E0,boxShadow:tVe};function gX(e,{layout:t,layoutId:n}){return td.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mT[e]||e==="opacity")}function gT(e,t,n){const i=e.style,r=t?.style,o={};if(!i)return o;for(const s in i)(ir(i[s])||r&&ir(r[s])||gX(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=i[s]);return o}function nVe(e){return window.getComputedStyle(e)}class iVe extends iX{constructor(){super(...arguments),this.type="html",this.renderInstance=pX}readValueFromInstance(t,n){if(td.has(n))return this.projection?.isProjecting?XE(n):SOe(t,n);{const i=nVe(t),r=(jN(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return fX(t,n)}build(t,n,i){pT(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return gT(t,n,i)}}const rVe={offset:"stroke-dashoffset",array:"stroke-dasharray"},oVe={offset:"strokeDashoffset",array:"strokeDasharray"};function sVe(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?rVe:oVe;e[o.offset]=`${-i}`,e[o.array]=`${t} ${n}`}const aVe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yX(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:s=0,...a},c,l,u){if(pT(e,a,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d}=e;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const f of aVe)h[f]!==void 0&&(d[f]=h[f],delete h[f]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),r!==void 0&&sVe(h,r,o,s,!1)}const bX=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),_X=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cVe(e,t,n,i){pX(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(bX.has(r)?r:$E(r),t.attrs[r])}function vX(e,t,n){const i=gT(e,t,n);for(const r in e)if(ir(e[r])||ir(t[r])){const o=ed.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[o]=e[r]}return i}class lVe extends iX{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_i}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(td.has(n)){const i=kk(n);return i&&i.default||0}return n=bX.has(n)?n:$E(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return vX(t,n,i)}build(t,n,i){yX(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,r){cVe(t,n,i,r)}mount(t){this.isSVGTag=_X(t.tagName),super.mount(t)}}const uVe=lT.length;function wX(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?wX(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uVe;n++){const i=lT[n],r=e.props[i];(S0(r)||r===!1)&&(t[i]=r)}return t}function xX(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const hVe=[...cT].reverse(),dVe=cT.length;function fVe(e){return t=>Promise.all(t.map(({animation:n,options:i})=>lGe(e,n,i)))}function pVe(e){let t=fVe(e),n=SX(),i=!0,r=!1;const o=l=>(u,h)=>{const d=nd(e,h,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,h=wX(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let g=0;g<dVe;g++){const v=hVe[g],S=n[v],E=u[v]!==void 0?u[v]:h[v],C=S0(E),O=v===l?S.isActive:null;O===!1&&(m=g);let V=E===h[v]&&E!==u[v]&&C;if(V&&(i||r)&&e.manuallyAnimateOnMount&&(V=!1),S.protectedKeys={...p},!S.isActive&&O===null||!E&&!S.prevProp||Kb(E)||typeof E=="boolean")continue;if(v==="exit"&&S.isActive&&O!==!0){S.prevResolvedValues&&(p={...p,...S.prevResolvedValues});continue}const A=mVe(S.prevProp,E);let G=A||v===l&&S.isActive&&!V&&C||g>m&&C,N=!1;const k=Array.isArray(E)?E:[E];let P=k.reduce(o(v),{});O===!1&&(P={});const{prevResolvedValues:w={}}=S,x={...w,...P},I=Y=>{G=!0,f.has(Y)&&(N=!0,f.delete(Y)),S.needsAnimating[Y]=!0;const H=e.getValue(Y);H&&(H.liveStyle=!1)};for(const Y in x){const H=P[Y],J=w[Y];if(p.hasOwnProperty(Y))continue;let z=!1;QE(H)&&QE(J)?z=!xX(H,J):z=H!==J,z?H!=null?I(Y):f.add(Y):H!==void 0&&f.has(Y)?I(Y):S.protectedKeys[Y]=!0}S.prevProp=E,S.prevResolvedValues=P,S.isActive&&(p={...p,...P}),(i||r)&&e.blockInitialAnimation&&(G=!1);const X=V&&A;G&&(!X||N)&&d.push(...k.map(Y=>{const H={type:v};if(typeof Y=="string"&&(i||r)&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,z=nd(J,Y);if(J.enteringChildren&&z){const{delayChildren:W}=z.transition||{};H.delay=Ck(J.enteringChildren,e,W)}}return{animation:Y,options:H}}))}if(f.size){const g={};if(typeof u.initial!="boolean"){const v=nd(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const S=e.getBaseTarget(v),E=e.getValue(v);E&&(E.liveStyle=!0),g[v]=S??null}),d.push({animation:g})}let y=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),i=!1,r=!1,y?t(d):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const h=a(l);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=SX(),r=!0}}}function mVe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xX(t,e):!1}function iu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function SX(){return{animate:iu(!0),whileInView:iu(),whileHover:iu(),whileTap:iu(),whileDrag:iu(),whileFocus:iu(),exit:iu()}}function EX(e,t){e.min=t.min,e.max=t.max}function _s(e,t){EX(e.x,t.x),EX(e.y,t.y)}function TX(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const CX=1e-4,gVe=1-CX,yVe=1+CX,RX=.01,bVe=0-RX,_Ve=0+RX;function xr(e){return e.max-e.min}function vVe(e,t,n){return Math.abs(e-t)<=n}function IX(e,t,n,i=.5){e.origin=i,e.originPoint=Zn(t.min,t.max,e.origin),e.scale=xr(n)/xr(t),e.translate=Zn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gVe&&e.scale<=yVe||isNaN(e.scale))&&(e.scale=1),(e.translate>=bVe&&e.translate<=_Ve||isNaN(e.translate))&&(e.translate=0)}function T0(e,t,n,i){IX(e.x,t.x,n.x,i?i.originX:void 0),IX(e.y,t.y,n.y,i?i.originY:void 0)}function MX(e,t,n){e.min=n.min+t.min,e.max=e.min+xr(t)}function wVe(e,t,n){MX(e.x,t.x,n.x),MX(e.y,t.y,n.y)}function LX(e,t,n){e.min=t.min-n.min,e.max=e.min+xr(t)}function $b(e,t,n){LX(e.x,t.x,n.x),LX(e.y,t.y,n.y)}function PX(e,t,n,i,r){return e-=t,e=qb(e,1/n,i),r!==void 0&&(e=qb(e,1/r,i)),e}function xVe(e,t=0,n=1,i=.5,r,o=e,s=e){if(ra.test(t)&&(t=parseFloat(t),t=Zn(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Zn(o.min,o.max,i);e===o&&(a-=t),e.min=PX(e.min,t,n,a,r),e.max=PX(e.max,t,n,a,r)}function OX(e,t,[n,i,r],o,s){xVe(e,t[n],t[i],t[r],t.scale,o,s)}const SVe=["x","scaleX","originX"],EVe=["y","scaleY","originY"];function GX(e,t,n,i){OX(e.x,t,SVe,n?n.x:void 0,i?i.x:void 0),OX(e.y,t,EVe,n?n.y:void 0,i?i.y:void 0)}function VX(e){return e.translate===0&&e.scale===1}function FX(e){return VX(e.x)&&VX(e.y)}function AX(e,t){return e.min===t.min&&e.max===t.max}function TVe(e,t){return AX(e.x,t.x)&&AX(e.y,t.y)}function zX(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function NX(e,t){return zX(e.x,t.x)&&zX(e.y,t.y)}function kX(e){return xr(e.x)/xr(e.y)}function XX(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function oa(e){return[e("x"),e("y")]}function CVe(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=n;l&&(i=`perspective(${l}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),d&&(i+=`rotateY(${d}deg) `),f&&(i+=`skewX(${f}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const ZX=["TopLeft","TopRight","BottomLeft","BottomRight"],RVe=ZX.length,DX=e=>typeof e=="string"?parseFloat(e):e,UX=e=>typeof e=="number"||at.test(e);function IVe(e,t,n,i,r,o){r?(e.opacity=Zn(0,n.opacity??1,MVe(i)),e.opacityExit=Zn(t.opacity??1,0,LVe(i))):o&&(e.opacity=Zn(t.opacity??1,n.opacity??1,i));for(let s=0;s<RVe;s++){const a=`border${ZX[s]}Radius`;let c=WX(t,a),l=WX(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||UX(c)===UX(l)?(e[a]=Math.max(Zn(DX(c),DX(l),i),0),(ra.test(l)||ra.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=Zn(t.rotate||0,n.rotate||0,i))}function WX(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const MVe=BX(0,.5,XN),LVe=BX(.5,.95,No);function BX(e,t,n){return i=>i<e?0:i>t?1:n(g0(e,t,i))}function PVe(e,t,n){const i=ir(e)?e:tu(e);return i.start(KE("",i,t,n)),i.animation}function C0(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const OVe=(e,t)=>e.depth-t.depth;class GVe{constructor(){this.children=[],this.isDirty=!1}add(t){mE(this.children,t),this.isDirty=!0}remove(t){Nb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OVe),this.isDirty=!1,this.children.forEach(t)}}function VVe(e,t){const n=wr.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(Bc(i),e(o-t))};return Tn.setup(i,!0),()=>Bc(i)}function e1(e){return ir(e)?e.get():e}class FVe{constructor(){this.members=[]}add(t){mE(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const r=i.instance;(!r||r.isConnected===!1)&&!i.snapshot&&(Nb(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(Nb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=i.options,{layoutDependency:o}=t.options;(r===void 0||r!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const t1={hasAnimatedSinceResize:!0,hasEverUpdated:!1},yT=["","X","Y","Z"],AVe=1e3;let zVe=0;function bT(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function YX(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Tn,!(r||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&YX(i)}function HX({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(s={},a=t?.()){this.id=zVe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XVe),this.nodes.forEach(WVe),this.nodes.forEach(BVe),this.nodes.forEach(ZVe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new GVe)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new yE),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=aT(s)&&!kGe(s),this.instance=s;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;Tn.read(()=>{h=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=VVe(d,250),t1.hasAnimatedSinceResize&&(t1.hasAnimatedSinceResize=!1,this.nodes.forEach(JX)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||l.getDefaultTransition()||JVe,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),g=!this.targetLayout||!NX(this.targetLayout,f),v=!h&&d;if(this.options.layoutRoot||this.resumeFrom||v||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...jE(p,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,v)}else h||JX(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Bc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(YVe),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&YX(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jX);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(KX);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(UVe),this.nodes.forEach(NVe),this.nodes.forEach(kVe)):this.nodes.forEach(KX),this.clearAllSnapshots();const a=wr.now();Xi.delta=ia(0,1e3/60,a-Xi.timestamp),Xi.timestamp=a,Xi.isProcessing=!0,wE.update.process(Xi),wE.preRender.process(Xi),wE.render.process(Xi),Xi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rT.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DVe),this.sharedNodes.forEach(HVe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Tn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Tn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xr(this.snapshot.measuredBox.x)&&!xr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=_i(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!FX(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&this.instance&&(a||nu(this.latestValues)||u)&&(r(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),QVe(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return _i();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(qVe))){const{scroll:l}=this.root;l&&(od(a.x,l.offset.x),od(a.y,l.offset.y))}return a}removeElementScroll(s){const a=_i();if(_s(a,s),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:h}=l;l!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&_s(a,s),od(a.x,u.offset.x),od(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const c=_i();_s(c,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&sd(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nu(u.latestValues)&&sd(c,u.latestValues)}return nu(this.latestValues)&&sd(c,this.latestValues),c}removeTransform(s){const a=_i();_s(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!nu(l.latestValues))continue;dT(l.latestValues)&&l.updateSnapshot();const u=_i(),h=l.measurePageBox();_s(u,h),GX(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return nu(this.latestValues)&&GX(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=Xi.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_i(),this.targetWithTransforms=_i()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wVe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_s(this.target,this.layout.layoutBox),cX(this.target,this.targetDelta)):_s(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||dT(this.parent.latestValues)||oX(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_i(),this.relativeTargetOrigin=_i(),$b(this.relativeTargetOrigin,a,c),_s(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Xi.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;_s(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;JGe(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=_i());const{target:f}=s;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(TX(this.prevProjectionDelta.x,this.projectionDelta.x),TX(this.prevProjectionDelta.y,this.projectionDelta.y)),T0(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!XX(this.projectionDelta.x,this.prevProjectionDelta.x)||!XX(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rd(),this.projectionDelta=rd(),this.projectionDeltaWithTransform=rd()}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},h=rd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=_i(),f=c?c.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,y=this.getStack(),g=!y||y.members.length<=1,v=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(KVe));this.animationProgress=0;let S;this.mixTargetDelta=E=>{const C=E/1e3;QX(h.x,s.x,C),QX(h.y,s.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($b(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jVe(this.relativeTarget,this.relativeTargetOrigin,d,C),S&&TVe(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=_i()),_s(S,this.relativeTarget)),m&&(this.animationValues=u,IVe(u,l,this.latestValues,C,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Bc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Tn.update(()=>{t1.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tu(0)),this.motionValue.jump(0,!1),this.currentAnimation=PVe(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(AVe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&nZ(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||_i();const h=xr(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+h;const d=xr(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+d}_s(a,c),sd(a,u),T0(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new FVe),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&bT("z",s,l,this.animationValues);for(let u=0;u<yT.length;u++)bT(`rotate${yT[u]}`,s,l,this.animationValues),bT(`skew${yT[u]}`,s,l,this.animationValues);s.render();for(const u in l)s.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=e1(a?.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=e1(a?.pointerEvents)||""),this.hasProjected&&!nu(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=CVe(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),s.transform=h;const{x:d,y:f}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,l.animationValues?s.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in mT){if(u[p]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=mT[p],v=h==="none"?u[p]:m(u[p],l);if(y){const S=y.length;for(let E=0;E<S;E++)s[y[E]]=v}else g?this.options.visualElement.renderState.vars[p]=v:s[p]=v}this.options.layoutId&&(s.pointerEvents=l===this?e1(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(jX),this.root.sharedNodes.clear()}}}function NVe(e){e.updateLayout()}function kVe(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?oa(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],d=xr(h);h.min=n[u].min,h.max=h.min+d}):nZ(r,t.layoutBox,n)&&oa(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],d=xr(n[u]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const s=rd();T0(s,n,t.layoutBox);const a=rd();o?T0(a,e.applyTransform(i,!0),t.measuredBox):T0(a,n,t.layoutBox);const c=!FX(s);let l=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:d}=u;if(h&&d){const f=_i();$b(f,t.layoutBox,h.layoutBox);const p=_i();$b(p,n,d.layoutBox),NX(f,p)||(l=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=f,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XVe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZVe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DVe(e){e.clearSnapshot()}function jX(e){e.clearMeasurements()}function KX(e){e.isLayoutDirty=!1}function UVe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function JX(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function WVe(e){e.resolveTargetDelta()}function BVe(e){e.calcProjection()}function YVe(e){e.resetSkewAndRotation()}function HVe(e){e.removeLeadSnapshot()}function QX(e,t,n){e.translate=Zn(t.translate,0,n),e.scale=Zn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qX(e,t,n,i){e.min=Zn(t.min,n.min,i),e.max=Zn(t.max,n.max,i)}function jVe(e,t,n,i){qX(e.x,t.x,n.x,i),qX(e.y,t.y,n.y,i)}function KVe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const JVe={duration:.45,ease:[.4,0,.1,1]},$X=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eZ=$X("applewebkit/")&&!$X("chrome/")?Math.round:No;function tZ(e){e.min=eZ(e.min),e.max=eZ(e.max)}function QVe(e){tZ(e.x),tZ(e.y)}function nZ(e,t,n){return e==="position"||e==="preserve-aspect"&&!vVe(kX(t),kX(n),.2)}function qVe(e){return e!==e.root&&e.scroll?.wasRoot}const $Ve=HX({attachResizeListener:(e,t)=>C0(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),_T={current:void 0},iZ=HX({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_T.current){const e=new $Ve({});e.mount(window),e.setOptions({layoutScroll:!0}),_T.current=e}return _T.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vT=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function e9e(e=!0){const t=R.useContext(pE);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,o=R.useId();R.useEffect(()=>{if(e)return r(o)},[e]);const s=R.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,s]:[!0]}const rZ=R.createContext({strict:!1}),oZ={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let sZ=!1;function t9e(){if(sZ)return;const e={};for(const t in oZ)e[t]={isEnabled:n=>oZ[t].some(i=>!!n[i])};nX(e),sZ=!0}function aZ(){return t9e(),YGe()}function n9e(e){const t=aZ();for(const n in e)t[n]={...t[n],...e[n]};nX(t)}const i9e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function n1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||i9e.has(e)}let cZ=e=>!n1(e);function r9e(e){typeof e=="function"&&(cZ=t=>t.startsWith("on")?!n1(t):e(t))}try{r9e(require("@emotion/is-prop-valid").default)}catch{}function o9e(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(cZ(r)||n===!0&&n1(r)||!t&&!n1(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const i1=R.createContext({});function s9e(e,t){if(Jb(e)){const{initial:n,animate:i}=e;return{initial:n===!1||S0(n)?n:void 0,animate:S0(i)?i:void 0}}return e.inherit!==!1?t:{}}function a9e(e){const{initial:t,animate:n}=s9e(e,R.useContext(i1));return R.useMemo(()=>({initial:t,animate:n}),[lZ(t),lZ(n)])}function lZ(e){return Array.isArray(e)?e.join(" "):e}const wT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uZ(e,t,n){for(const i in t)!ir(t[i])&&!gX(i,n)&&(e[i]=t[i])}function c9e({transformTemplate:e},t){return R.useMemo(()=>{const n=wT();return pT(n,t,e),Object.assign({},n.vars,n.style)},[t])}function l9e(e,t){const n=e.style||{},i={};return uZ(i,n,e),Object.assign(i,c9e(e,t)),i}function u9e(e,t){const n={},i=l9e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const hZ=()=>({...wT(),attrs:{}});function h9e(e,t,n,i){const r=R.useMemo(()=>{const o=hZ();return yX(o,t,_X(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};uZ(o,e.style,e),r.style={...o,...r.style}}return r}const d9e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function xT(e){return typeof e!="string"||e.includes("-")?!1:!!(d9e.indexOf(e)>-1||/[A-Z]/u.test(e))}function f9e(e,t,n,{latestValues:i},r,o=!1,s){const c=(s??xT(e)?h9e:u9e)(t,i,r,e),l=o9e(t,typeof e=="string",o),u=e!==R.Fragment?{...l,...c,ref:n}:{},{children:h}=t,d=R.useMemo(()=>ir(h)?h.get():h,[h]);return R.createElement(e,{...u,children:d})}function p9e({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:m9e(n,i,r,e),renderState:t()}}function m9e(e,t,n,i){const r={},o=i(e,{});for(const d in o)r[d]=e1(o[d]);let{initial:s,animate:a}=e;const c=Jb(e),l=$k(e);t&&l&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const h=u?a:s;if(h&&typeof h!="boolean"&&!Kb(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const p=JE(e,d[f]);if(p){const{transitionEnd:m,transition:y,...g}=p;for(const v in g){let S=g[v];if(Array.isArray(S)){const E=u?S.length-1:0;S=S[E]}S!==null&&(r[v]=S)}for(const v in m)r[v]=m[v]}}}return r}const dZ=e=>(t,n)=>{const i=R.useContext(i1),r=R.useContext(pE),o=()=>p9e(e,t,i,r);return n?o():RN(o)},g9e=dZ({scrapeMotionValuesFromProps:gT,createRenderState:wT}),y9e=dZ({scrapeMotionValuesFromProps:vX,createRenderState:hZ}),b9e=Symbol.for("motionComponentSymbol");function _9e(e,t,n){const i=R.useRef(n);R.useInsertionEffect(()=>{i.current=n});const r=R.useRef(null);return R.useCallback(o=>{o&&e.onMount?.(o);const s=i.current;if(typeof s=="function")if(o){const a=s(o);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):s(o);else s&&(s.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const fZ=R.createContext({});function ad(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v9e(e,t,n,i,r,o){const{visualElement:s}=R.useContext(i1),a=R.useContext(rZ),c=R.useContext(pE),l=R.useContext(vT),u=l.reducedMotion,h=l.skipAnimations,d=R.useRef(null),f=R.useRef(!1);i=i||a.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:o}),f.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));const p=d.current,m=R.useContext(fZ);p&&!p.projection&&r&&(p.type==="html"||p.type==="svg")&&w9e(d.current,n,r,m);const y=R.useRef(!1);R.useInsertionEffect(()=>{p&&y.current&&p.update(n,c)});const g=n[Ok],v=R.useRef(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return wPe(()=>{f.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),R.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),v.current=!1),p.enteringChildren=void 0)}),p}function w9e(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pZ(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&ad(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:c,layoutRoot:l})}function pZ(e){if(e)return e.options.allowProjection!==!1?e.projection:pZ(e.parent)}function ST(e,{forwardMotionProps:t=!1,type:n}={},i,r){i&&n9e(i);const o=n?n==="svg":xT(e),s=o?y9e:g9e;function a(l,u){let h;const d={...R.useContext(vT),...l,layoutId:x9e(l)},{isStatic:f}=d,p=a9e(l),m=s(l,f);if(!f&&typeof window<"u"){S9e(d,i);const y=E9e(d);h=y.MeasureLayout,p.visualElement=v9e(e,m,d,r,y.ProjectionNode,o)}return ce.jsxs(i1.Provider,{value:p,children:[h&&p.visualElement?ce.jsx(h,{visualElement:p.visualElement,...d}):null,f9e(e,l,_9e(m,p.visualElement,u),m,f,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=R.forwardRef(a);return c[b9e]=e,c}function x9e({layoutId:e}){const t=R.useContext(CN).id;return t&&e!==void 0?t+"-"+e:e}function S9e(e,t){const n=R.useContext(rZ).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Jh(!1,i,"lazy-strict-mode"):Ua(!1,i,"lazy-strict-mode")}}function E9e(e){const t=aZ(),{drag:n,layout:i}=t;if(!n&&!i)return{};const r={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function T9e(e,t){if(typeof Proxy>"u")return ST;const n=new Map,i=(o,s)=>ST(o,s,e,t),r=(o,s)=>(process.env.NODE_ENV!=="production"&&bE(!1,"motion() is deprecated. Use motion.create() instead."),i(o,s));return new Proxy(r,{get:(o,s)=>s==="create"?i:(n.has(s)||n.set(s,ST(s,void 0,e,t)),n.get(s))})}const C9e=(e,t)=>t.isSVG??xT(e)?new lVe(t):new iVe(t,{allowProjection:e!==R.Fragment});class R9e extends jc{constructor(t){super(t),t.animationState||(t.animationState=pVe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kb(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let I9e=0;class M9e extends jc{constructor(){super(...arguments),this.id=I9e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const L9e={animation:{Feature:R9e},exit:{Feature:M9e}};function R0(e){return{point:{x:e.pageX,y:e.pageY}}}const P9e=e=>t=>oT(t)&&e(t,R0(t));function I0(e,t,n,i){return C0(e,t,P9e(n),i)}const mZ=({current:e})=>e?e.ownerDocument.defaultView:null,gZ=(e,t)=>Math.abs(e-t);function O9e(e,t){const n=gZ(e.x,t.x),i=gZ(e.y,t.y);return Math.sqrt(n**2+i**2)}const yZ=new Set(["auto","scroll"]);class bZ{constructor(t,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=TT(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=O9e(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:y}=f,{timestamp:g}=Xi;this.history.push({...y,timestamp:g});const{onStart:v,onMove:S}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ET(p,this.transformPagePoint),Tn.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=TT(f.type==="pointercancel"?this.lastMoveEventInfo:ET(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),y&&y(f,v)},!oT(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=r||window;const c=R0(t),l=ET(c,this.transformPagePoint),{point:u}=l,{timestamp:h}=Xi;this.history=[{...u,timestamp:h}];const{onSessionStart:d}=n;d&&d(t,TT(l,this.history)),this.removeListeners=m0(I0(this.contextWindow,"pointermove",this.handlePointerMove),I0(this.contextWindow,"pointerup",this.handlePointerUp),I0(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(yZ.has(i.overflowX)||yZ.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,r=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),Tn.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Bc(this.updatePoint)}}function ET(e,t){return t?{point:t(e.point)}:e}function _Z(e,t){return{x:e.x-t.x,y:e.y-t.y}}function TT({point:e},t){return{point:e,delta:_Z(e,vZ(t)),offset:_Z(e,G9e(t)),velocity:V9e(t,.1)}}function G9e(e){return e[0]}function vZ(e){return e[e.length-1]}function V9e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=vZ(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>ko(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&r.timestamp-i.timestamp>ko(t)*2&&(i=e[1]);const o=Xo(r.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function F9e(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Zn(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Zn(n,e,i.max):Math.min(e,n)),e}function wZ(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function A9e(e,{top:t,left:n,bottom:i,right:r}){return{x:wZ(e.x,n,r),y:wZ(e.y,t,i)}}function xZ(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function z9e(e,t){return{x:xZ(e.x,t.x),y:xZ(e.y,t.y)}}function N9e(e,t){let n=.5;const i=xr(e),r=xr(t);return r>i?n=g0(t.min,t.max-i,e.min):i>r&&(n=g0(e.min,e.max-r,t.min)),ia(0,1,n)}function k9e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const CT=.35;function X9e(e=CT){return e===!1?e=0:e===!0&&(e=CT),{x:SZ(e,"left","right"),y:SZ(e,"top","bottom")}}function SZ(e,t,n){return{min:EZ(e,t),max:EZ(e,n)}}function EZ(e,t){return typeof e=="number"?e:e[t]||0}const Z9e=new WeakMap;class D9e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_i(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=h=>{n&&this.snapToCursor(R0(h).point),this.stopAnimation()},s=(h,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=xGe(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oa(g=>{let v=this.getAxisMotionValue(g).get()||0;if(ra.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const E=S.layout.layoutBox[g];E&&(v=xr(E)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&Tn.update(()=>m(h,d),!1,!0),qE(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=W9e(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),y&&Tn.update(()=>y(h,d),!1,!0)},c=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bZ(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:mZ(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!i)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Tn.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:r}=this.getProps();if(!i||!r1(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=F9e(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&ad(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=A9e(i.layoutBox,t):this.constraints=!1,this.elastic=X9e(n),r!==this.constraints&&!ad(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&oa(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=k9e(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ad(t))return!1;const i=t.current;Ua(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=QGe(i,r.root,this.visualElement.getTransformPagePoint());let s=z9e(r.layout.layoutBox,o);if(n){const a=n(jGe(s));this.hasMutatedConstraints=!!a,a&&(s=rX(a))}return s}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=oa(u=>{if(!r1(u,n,this.currentDirection))return;let h=c&&c[u]||{};s&&(h={min:0,max:0});const d=r?200:1e6,f=r?40:1e7,p={type:"inertia",velocity:i?t[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return qE(this.visualElement,t),i.start(KE(t,i,0,n,this.visualElement,!1))}stopAnimation(){oa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){oa(n=>{const{drag:i}=this.getProps();if(!r1(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-Zn(s,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!ad(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};oa(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();r[s]=N9e({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),oa(s=>{if(!r1(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(Zn(c,l,r[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Z9e.set(this.visualElement,this);const t=this.visualElement.current,n=I0(t,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps(),d=l.target,f=d!==t&&IGe(d);u&&h&&!f&&this.start(l)});let i;const r=()=>{const{dragConstraints:l}=this.getProps();ad(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),i||(i=U9e(t,l.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Tn.read(r);const a=C0(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(oa(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),c&&c(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:s=CT,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function TZ(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function U9e(e,t,n){const i=Jk(e,TZ(n)),r=Jk(t,TZ(n));return()=>{i(),r()}}function r1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function W9e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class B9e extends jc{constructor(t){super(t),this.removeGroupControls=No,this.removeListeners=No,this.controls=new D9e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||No}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const RT=e=>(t,n)=>{e&&Tn.update(()=>e(t,n),!1,!0)};class Y9e extends jc{constructor(){super(...arguments),this.removePointerDownListener=No}onPointerDown(t){this.session=new bZ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mZ(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:RT(t),onStart:RT(n),onMove:RT(i),onEnd:(o,s)=>{delete this.session,r&&Tn.postRender(()=>r(o,s))}}}mount(){this.removePointerDownListener=I0(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let IT=!1;class H9e extends R.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),i&&i.register&&r&&i.register(o),IT&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),t1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:o}=this.props,{projection:s}=i;return s&&(s.isPresent=o,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),IT=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Tn.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rT.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;IT=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function CZ(e){const[t,n]=e9e(),i=R.useContext(CN);return ce.jsx(H9e,{...e,layoutGroup:i,switchLayoutGroup:R.useContext(fZ),isPresent:t,safeToRemove:n})}const j9e={pan:{Feature:Y9e},drag:{Feature:B9e,ProjectionNode:iZ,MeasureLayout:CZ}};function RZ(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=i[r];o&&Tn.postRender(()=>o(t,R0(t)))}class K9e extends jc{mount(){const{current:t}=this.node;t&&(this.unmount=EGe(t,(n,i)=>(RZ(this.node,i,"Start"),r=>RZ(this.node,r,"End"))))}unmount(){}}class J9e extends jc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=m0(C0(this.node.current,"focus",()=>this.onFocus()),C0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function IZ(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=i[r];o&&Tn.postRender(()=>o(t,R0(t)))}class Q9e extends jc{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=LGe(t,(r,o)=>(IZ(this.node,o,"Start"),(s,{success:a})=>IZ(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const MT=new WeakMap,LT=new WeakMap,q9e=e=>{const t=MT.get(e.target);t&&t(e)},$9e=e=>{e.forEach(q9e)};function eFe({root:e,...t}){const n=e||document;LT.has(n)||LT.set(n,{});const i=LT.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver($9e,{root:e,...t})),i[r]}function tFe(e,t,n){const i=eFe(t);return MT.set(e,n),i.observe(e),()=>{MT.delete(e),i.unobserve(e)}}const nFe={some:0,all:1};class iFe extends jc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:nFe[r]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),d=l?u:h;d&&d(c)};return tFe(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(rFe(t,n))&&this.startObserver()}unmount(){}}function rFe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const oFe={...L9e,...{inView:{Feature:iFe},tap:{Feature:Q9e},focus:{Feature:J9e},hover:{Feature:K9e}},...j9e,...{layout:{ProjectionNode:iZ,MeasureLayout:CZ}}},sFe=T9e(oFe,C9e);function MZ(e){const t=RN(()=>tu(e)),{isStatic:n}=R.useContext(vT);if(n){const[,i]=R.useState(e);R.useEffect(()=>t.on("change",i),[])}return t}function PT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function aFe(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=t,n.facade}var cFe=typeof window<"u"?A0.useLayoutEffect:A0.useEffect,LZ=new WeakMap;function lFe(e,t){var n=aFe(null,function(i){return e.forEach(function(r){return PT(r,i)})});return cFe(function(){var i=LZ.get(n);if(i){var r=new Set(i),o=new Set(e),s=n.current;r.forEach(function(a){o.has(a)||PT(a,null)}),o.forEach(function(a){r.has(a)||PT(a,s)})}LZ.set(n,e)},[e]),n}const uFe=new cs(it.WGS84,b.ZERO),OT=R.forwardRef(({position:e,children:t,...n},i)=>{const r=Wo(()=>new b);e?.clone(r);const o=MZ(""),s=MZ("none"),{toWindowPosition:a,getCamera:c,toXYZ:l,isPositionVisible:u}=ci(),h=R.useRef(null);Gl(()=>{if(h.current==null)return;let f;try{const v=a?.([r.x,r.y,r.z]);f=new me(v?.[0],v?.[1])}catch{s.set("none");return}const p=c?.();if(!p)return;const m=l?.(p?.lng,p?.lat,p?.height);if(!m)return;if(uFe.cameraPosition=new b(m[0],m[1],m[2]),f==null||f.x<0||f.y<0||f.x>window.innerWidth||f.y>window.innerHeight||!u?.([r.x,r.y,r.z])){s.set("none");return}const y=`calc(${f.x}px - 50%)`,g=`calc(${f.y}px - 50%)`;o.set(`translate(${y}, ${g})`),s.set("block")});const d=lFe([h,i]);return ce.jsx(sFe.div,{ref:d,...n,style:{...n.style,transform:o,display:s,position:"absolute",pointerEvents:"none",left:0,top:0},children:t})});OT.displayName="ScreenSpaceElement";const hFe=({a:e,b:t,color:n})=>{const i=R.useRef([e,t]);i.current=[e,t];const r=Wo(()=>new wo(()=>i.current,!1)),o=R.useMemo(()=>({polyline:{positions:r,width:1.5,material:new Ol({color:n,dashLength:8})}}),[n,r]);return ce.jsx(p0,{...o})},dFe=({a:e,b:t,extrudedHeight:n,color:i,showLine:r})=>{const o=Wo(()=>new b);return ce.jsxs(ce.Fragment,{children:[ce.jsx(OT,{position:b.midpoint(e,t,o),children:ce.jsx(TN,{children:n<1e3?`${n.toFixed(1)} m`:`${(n/1e3).toFixed(1)} km`})}),r&&ce.jsx(hFe,{a:e,b:t,color:i})]})},PZ=R.memo(({geometryOptions:{controlPoints:e,type:t},extrudedHeight:n,color:i,isEditing:r,extrudedPoint:o,centroidBasePoint:s,centroidExtrudedPoint:a,catchedExtrudedPoint:c,handleControlPointMouseEvent:l})=>{const u=e[e.length-1],h=o?new b(...o):void 0,d=s?new b(...s):void 0,f=a?new b(...a):void 0;return ce.jsxs(ce.Fragment,{children:[h&&ce.jsxs(ce.Fragment,{children:[ce.jsx(f0,{index:-1,position:h,isEditing:r,isExtrudedControlPoint:!0,handleControlPointMouseEvent:l}),(!r||c)&&ce.jsx(dFe,{a:u,b:h,extrudedHeight:n,color:r?B.fromCssColorString(d0):i,showLine:t!=="extrudedPolygon"})]}),d&&ce.jsx(f0,{index:-1,position:d,isEditing:r,isExtrudedControlPoint:!0}),f&&ce.jsx(f0,{index:-1,position:f,isEditing:r,isExtrudedControlPoint:!0})]})});PZ.displayName="ExtrudedControlPoints";const fFe=({id:e,hierarchy:t,extrudedHeight:n,color:i,disableShadow:r=!1,isEditing:o})=>{const s=R.useRef(t);s.current=t;const c=Wo(()=>new wo(()=>s.current,!1)),l=R.useRef(n);l.current=n;const h=Wo(()=>new wo(()=>l.current,!1)),d=R.useMemo(()=>({polygon:{hierarchy:c,heightReference:vl.RELATIVE_TO_TERRAIN,extrudedHeight:h,extrudedHeightReference:vl.RELATIVE_TO_TERRAIN,fill:!0,outline:!0,outlineWidth:1,outlineColor:o?B.fromCssColorString(d0):i?.withAlpha(1),material:new Rl(o?i?.withAlpha(.2):i),classificationType:eo.TERRAIN,shadows:r?Zf.DISABLED:Zf.ENABLED}}),[h,r,c,i,o]),{requestRender:f}=ci();return f?.(),ce.jsx(p0,{id:e,...d})},pFe=({dynamic:e=!1,hierarchy:t,color:n})=>{const i=R.useRef(t);i.current=t;const r=Wo(()=>new wo(()=>i.current,!1)),o=e?r:t,s=R.useMemo(()=>({polygon:{hierarchy:o,fill:!0,material:n?.withAlpha(.5),classificationType:eo.TERRAIN}}),[n,o]),{requestRender:a}=ci();return a?.(),ce.jsx(p0,{...s})},mFe=({dynamic:e=!1,positions:t,color:n,isEditing:i})=>{const r=R.useRef(t);r.current=t;const o=Wo(()=>new wo(()=>r.current,!e)),s=e?o:t,a=R.useMemo(()=>({polyline:{positions:s,width:1.5,material:i?B.fromCssColorString(d0):n,classificationType:eo.TERRAIN,clampToGround:!0}}),[n,s,i]),{requestRender:c}=ci();return c?.(),ce.jsx(p0,{...a})},OZ=new b,GZ=R.memo(({geometryOptions:{type:e,controlPoints:t},isEditing:n,handleAddControlPoint:i})=>{if(!["polyline","polygon","extrudedPolygon"].includes(e))return null;const r=[];for(let o=0;o<t.length-1;o++){const s=t[o+1],a=b.midpoint(t[o],s,OZ);r.push(a.clone())}if(e==="polygon"||e==="extrudedPolygon"){const o=b.midpoint(t[t.length-1],t[0],OZ);r.push(o.clone())}return ce.jsx(ce.Fragment,{children:r.map((o,s)=>ce.jsx(f0,{position:o,isAddingPoint:!0,index:s,clampToGround:!0,isEditing:n,handleControlPointMouseEvent:()=>i?.([o.x,o.y,o.z],s)},s))})});GZ.displayName="SurfaceAddingPoints";const gFe=({a:e,b:t,color:n})=>{const i=R.useRef([e,t]);i.current=[e,t];const r=Wo(()=>new wo(()=>i.current,!1)),o=R.useMemo(()=>({polyline:{positions:r,width:1.5,material:new Ol({color:n,dashLength:8}),classificationType:eo.TERRAIN,clampToGround:!0}}),[n,r]),{requestRender:s}=ci();return s?.(),ce.jsx(p0,{...o})},yFe=({a:e,b:t,color:n,showLine:i=!1})=>{const r=Wo(()=>new b),{getSurfaceDistance:o}=ci(),s=o?.(e,t);return s!==void 0?ce.jsxs(ce.Fragment,{children:[ce.jsx(OT,{position:b.midpoint(e,t,r),children:ce.jsx(TN,{children:s<1e3?`${s.toFixed(1)} m`:`${(s/1e3).toFixed(1)} km`})}),i&&ce.jsx(gFe,{a:e,b:t,color:n})]}):null},VZ=new b,FZ=R.memo(({geometryOptions:{type:e,controlPoints:t},color:n,isEditing:i,catchedControlPointIndex:r,selectedControlPointIndex:o,handleControlPointMouseEvent:s})=>{const a=[];if(t.length>=2)if(i){if(r!==void 0&&r!==-1)switch(e){case"polyline":r>0&&a.push({points:[t[r-1],t[r]],showLine:!1}),r<t.length-1&&a.push({points:[t[r],t[r+1]],showLine:!1});break;case"circle":case"extrudedCircle":r!==2&&a.push({points:[t[0],t[1]],showLine:!0});break;case"rectangle":case"extrudedRectangle":if(r<=1)a.push({points:[t[0],t[1]],showLine:!1});else if(r===2){const[c,l,u]=t,h=b.midpoint(c,l,VZ);a.push({points:[h,u],showLine:!0})}break;case"polygon":case"extrudedPolygon":a.push({points:[t[r],r===0?t[t.length-1]:t[r-1]],showLine:!1}),a.push({points:[t[r],r===t.length-1?t[0]:t[r+1]],showLine:!1});break}}else switch(e){case"rectangle":case"extrudedRectangle":if(t.length===2)a.push({points:t,showLine:!0});else if(t.length===3){const[c,l,u]=t,h=b.midpoint(c,l,VZ);a.push({points:[h,u],showLine:!0})}break;default:a.push({points:t.slice(-2),showLine:e==="circle"});break}return ce.jsxs(ce.Fragment,{children:[t.map((c,l)=>ce.jsx(f0,{position:c,index:l,isSelected:o===l,clampToGround:!0,isEditing:i,handleControlPointMouseEvent:s},l)),a.map(({points:c,showLine:l},u)=>ce.jsx(yFe,{a:c[0],b:c[1],color:i?B.fromCssColorString(d0):n,showLine:l},u))]})});FZ.displayName="SurfaceControlPoints";const AZ=R.memo(({geometryOptions:e,extrudedHeight:t,disableShadow:n,color:i,isEditing:r,extrudedPoint:o,centroidBasePoint:s,centroidExtrudedPoint:a,catchedControlPointIndex:c,catchedExtrudedPoint:l,selectedControlPointIndex:u,handleControlPointMouseEvent:h,handleAddControlPoint:d})=>{const f=R.useMemo(()=>e?{...e,controlPoints:e?.controlPoints.map(v=>new M.Cartesian3(...v))}:null,[e]),p=R.useMemo(()=>f?yN(f):null,[f]),{positionsArray:m,hierarchyArray:y}=R.useMemo(()=>p?.type==="Point"?{}:p?.type==="LineString"?{positionsArray:uF(p)}:p!=null?{positionsArray:uF(p),hierarchyArray:hF(p)}:{},[p]),g=R.useMemo(()=>B.fromCssColorString(i??uPe),[i]);return ce.jsxs(ce.Fragment,{children:[m?.map((v,S)=>ce.jsx(mFe,{dynamic:!0,positions:v,color:g,isEditing:r},S)),y?.map((v,S)=>ce.jsx(pFe,{dynamic:!0,hierarchy:v,color:g},S)),f!=null&&(!t||r)&&ce.jsx(FZ,{geometryOptions:f,color:g,isEditing:r,catchedControlPointIndex:c,selectedControlPointIndex:u,handleControlPointMouseEvent:h}),f!=null&&r&&ce.jsx(GZ,{geometryOptions:f,isEditing:r,handleAddControlPoint:d}),f!=null&&t&&ce.jsx(PZ,{geometryOptions:f,extrudedHeight:t,extrudedPoint:o,centroidBasePoint:s,centroidExtrudedPoint:a,catchedExtrudedPoint:l,color:g,isEditing:r,handleControlPointMouseEvent:h}),t&&y?.map((v,S)=>ce.jsx(fFe,{hierarchy:v,extrudedHeight:t,disableShadow:n,color:g,isEditing:r},S))]})});AZ.displayName="SketchComponent";const bFe=({className:e,style:t,property:n,time:i,camera:r,small:o,ready:s,children:a,selectedLayerId:c,isLayerDraggable:l,isLayerDragging:u,shouldRender:h,layerSelectionReason:d,meta:f,customProvider:p,displayCredits:m,layersRef:y,featureFlags:g,requestingRenderMode:v,timelineManagerRef:S,cameraForceHorizontalRoll:E,onLayerSelect:C,onCameraChange:O,onLayerDrag:V,onLayerDrop:A,onLayerEdit:G,onLayerSelectWithRectStart:N,onLayerSelectWithRectMove:k,onLayerSelectWithRectEnd:P,onMount:w,onLayerVisibility:x,onLayerLoad:I,onCreditsUpdate:X},D)=>{const{cesium:Y,mouseEventHandles:H,cesiumIonAccessToken:J,context:z,layerSelectWithRectEventHandlers:W,sceneLight:Q,sceneBackgroundColor:q,sceneMsaaSamples:oe,sceneMode:Ee,cameraViewBoundaries:be,cameraViewOuterBoundaries:Ae,cameraViewBoundariesMaterial:Pe,handleCameraChange:fe,handleCameraMoveEnd:Xe,handleUpdate:tt,handleClick:nt,handleMount:Z,handleUnmount:pe,handleTilesChange:ue,handleTerrainProviderChange:$}=JLe({ref:D,property:n,time:i,selectedLayerId:c,selectionReason:d,meta:f,customProvider:p,layersRef:y,featureFlags:g,timelineManagerRef:S,isLayerDraggable:l,isLayerDragging:u,shouldRender:h,requestingRenderMode:v,camera:r,cameraForceHorizontalRoll:E,onLayerDrag:V,onLayerDrop:A,onLayerSelect:C,onLayerEdit:G,onLayerSelectWithRectStart:N,onLayerSelectWithRectMove:k,onLayerSelectWithRectEnd:P,onLayerVisibility:x,onLayerLoad:I,onCameraChange:O,onMount:w,onCreditsUpdate:X});return ce.jsxs(gre,{ref:Y,onUpdate:tt,className:e,requestRenderMode:!0,animation:!1,timeline:!1,baseLayer:!1,fullscreenButton:!1,homeButton:!1,geocoder:!1,infoBox:!1,baseLayerPicker:!1,navigationHelpButton:!1,projectionPicker:!1,sceneModePicker:!1,creditContainer:m?void 0:_Fe,style:{width:o?"300px":"auto",height:o?"300px":"100%",display:s?void 0:"none",cursor:u?"grab":void 0,...t},shadows:!!n?.scene?.shadow?.enabled,onClick:nt,onDoubleClick:H.doubleClick,onMouseDown:H.mouseDown,onMouseUp:H.mouseUp,onRightClick:H.rightClick,onRightDown:H.rightDown,onRightUp:H.rightUp,onMiddleClick:H.middleClick,onMiddleDown:H.middleDown,onMiddleUp:H.middleUp,onMouseMove:H.mouseMove,onMouseEnter:H.mouseEnter,onMouseLeave:H.mouseLeave,onWheel:H.wheel,automaticallyTrackDataSourceClocks:!1,children:[ce.jsx(zbe,{onMount:Z,onUnmount:pe}),ce.jsx(Zoe,{timelineManagerRef:S}),ce.jsx(Yye,{tiles:n?.tiles,cesiumIonAccessToken:J,customProvider:p,onTilesChange:ue}),ce.jsx(mF,{tileLabels:n?.tileLabels}),ce.jsx(Kye,{property:n,timelineManagerRef:S}),ce.jsxs(kM,{useDefault:!0,children:[ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_CLICK}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_DOUBLE_CLICK})]}),ce.jsxs(kM,{children:[ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_DOWN,action:W.start.handler}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_DOWN,modifier:M.KeyboardEventModifier.SHIFT,action:W.start.shift}),ce.jsx(hc,{type:M.ScreenSpaceEventType.MOUSE_MOVE,action:W.move.handler}),ce.jsx(hc,{type:M.ScreenSpaceEventType.MOUSE_MOVE,modifier:M.KeyboardEventModifier.SHIFT,action:W.move.shift}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_UP,action:W.end.handler}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_UP,modifier:M.KeyboardEventModifier.SHIFT,action:W.end.shift})]}),ce.jsx(ore,{maximumZoomDistance:n?.camera?.limiter?.enabled?n.camera?.limiter?.targetArea?.height??Number.POSITIVE_INFINITY:Number.POSITIVE_INFINITY,enableCollisionDetection:!n?.camera?.allowEnterGround}),ce.jsx(kne,{percentageChanged:.2,onChange:fe,onMoveEnd:Xe}),be&&n?.camera?.limiter?.showHelper&&ce.jsx(uc,{children:ce.jsx(ml,{positions:be,width:1,material:M.Color.RED,arcType:M.ArcType.RHUMB})}),Ae&&n?.camera?.limiter?.showHelper&&ce.jsx(uc,{children:ce.jsx(ml,{positions:Ae,width:1,material:Pe,arcType:M.ArcType.RHUMB})}),ce.jsx(ire,{backgroundColor:q,light:Q,mode:Ee,msaaSamples:oe,useDepthPicking:!0,useWebVR:!!n?.scene?.vr||void 0,debugShowFramesPerSecond:!!n?.debug?.showFramesPerSecond,verticalExaggerationRelativeHeight:n?.scene?.verticalExaggerationRelativeHeight,verticalExaggeration:n?.scene?.verticalExaggeration}),ce.jsx(lre,{show:n?.sky?.skyBox?.show??!0}),ce.jsx(fie,{enabled:n?.sky?.fog?.enabled??!0,density:n?.sky?.fog?.density}),ce.jsx(hre,{show:n?.sky?.sun?.show??!0}),ce.jsx(kie,{show:n?.sky?.moon?.show??!0}),ce.jsx(are,{show:n?.sky?.skyAtmosphere?.show??!0,atmosphereLightIntensity:n?.sky?.skyAtmosphere?.lightIntensity,saturationShift:n?.sky?.skyAtmosphere?.saturationShift,brightnessShift:n?.sky?.skyAtmosphere?.brightnessShift}),ce.jsx(wse,{property:n,cesiumIonAccessToken:J,onTerrainProviderChange:$}),ce.jsx(EF.Provider,{value:z,children:s?a:null}),ce.jsx(cPe,{...lPe[n?.render?.ambientOcclusion?.quality||"low"],enabled:!!n?.render?.ambientOcclusion?.enabled,intensity:n?.render?.ambientOcclusion?.intensity??100,outputType:n?.render?.ambientOcclusion?.ambientOcclusionOnly?SN.Occlusion:null})]})},_Fe=document.createElement("div"),zZ={cesium:{component:R.forwardRef(bFe),featureComponent:O5e,clusterComponent:Xoe,sketchComponent:AZ,delegatedDataTypes:["czml","wms","mvt","3dtiles","osm-buildings","reearth-buildings","google-photorealistic","kml"]}};function vFe({error:e,resetErrorBoundary:t}){const i=e?.message??String(e);return ce.jsxs("div",{children:[ce.jsx("h1",{children:"Oops! An Error Occurred"}),ce.jsx("p",{children:i}),ce.jsx("p",{children:ce.jsx("button",{style:{color:"#fff"},onClick:t,children:"Retry"})})]})}const wFe="0.0.7-alpha.68",xFe=({viewerProperty:e})=>{const t=R.useRef(e);t.current=e;const n=R.useMemo(()=>({get version(){return wFe},get viewerProperty(){return t.current}}),[]);R.useEffect(()=>{window.reearth_core=n},[n])},SFe=768,EFe=({wrapperRef:e})=>{const t=R.useMemo(()=>TFe(new URLSearchParams(window.location.search)),[]),[n,i]=R.useState({width:void 0,height:void 0,isMobile:void 0,query:t});return R.useEffect(()=>{const r=new ResizeObserver(o=>{const[s]=o;let a,c;if(s.contentBoxSize){const l=Array.isArray(s.contentBoxSize)?s.contentBoxSize[0]:s.contentBoxSize;a=l.inlineSize,c=l.blockSize}else s.contentRect?(a=s.contentRect.width,c=s.contentRect.height):(a=e.current?.clientWidth,c=e.current?.clientHeight);i(l=>({width:a,height:c,isMobile:a?a<=SFe:void 0,query:l.query}))});return e.current&&r.observe(e.current),()=>{r.disconnect()}},[e]),n};function TFe(e){const t={};for(const[n,i]of e)t[n]=i;return t}function CFe({camera:e,interactionMode:t,zoomedLayerId:n,viewerProperty:i,onLayerSelect:r,onCameraChange:o,onInteractionModeChange:s,onZoomToLayer:a,onLayerDrop:c,onSketchTypeChangeProp:l},u){const h=R.useRef(null);R.useImperativeHandle(u,()=>h.current,[]);const d=R.useRef(null),f=EFe({wrapperRef:d}),[p,m]=R.useState({}),[y,g]=R.useState(),[v,S]=R.useState(),E=R.useCallback(async(Ue,St,Dt,xt,mn)=>{const Li=p.layer?.layer?.type==="simple"&&p.layer?.layer?.data?.isSketchLayer;if(p.layerId===Ue&&p.featureId===St&&!Li)return;const $n=await Dt?.(),ei=Ue&&St?(Li?$n?.features?.find(ti=>ti.id===St):h.current?.engine.findComputedFeatureById?.(Ue,St))??mn?.feature:void 0;g(Ue&&St?h.current?.engine.findFeatureById?.(Ue,St):void 0),S(ei),m(ti=>ti.layerId===Ue&&ti.featureId===St?ti:{layerId:Ue,featureId:St,layer:$n,reason:xt}),r?.(Ue,Dt,ei,xt)},[p,r]),C=R.useRef(void 0),[O,V]=NZ(e,o),[A,G]=R.useState(!1),N=R.useCallback(Ue=>{G(!!Ue)},[]),[k,P]=NZ(t||"default",s);R.useEffect(()=>{k==="default"&&h?.current?.engine?.setCursor("auto")},[k]);const w=N0[k??"default"],x=R.useRef(void 0),I=R.useCallback(Ue=>{x.current=Ue},[]),X=R.useCallback(Ue=>{x.current?.(Ue)},[]),D=R.useRef(void 0),Y=R.useCallback(Ue=>{D.current=Ue},[]),H=R.useCallback(Ue=>{D.current?.(Ue)},[]),J=R.useRef(void 0),z=R.useCallback(Ue=>{J.current=Ue},[]),W=R.useCallback(Ue=>{J.current?.(Ue)},[]),Q=R.useRef(void 0),q=R.useCallback(Ue=>{Q.current=Ue},[]),oe=R.useCallback(Ue=>{Q.current?.(Ue)},[]),Ee=R.useRef(void 0),be=R.useCallback(Ue=>{Ee.current=Ue},[]),Ae=R.useCallback(Ue=>{Ee.current?.(Ue)},[]),Pe=R.useRef(void 0),fe=R.useCallback(Ue=>{Pe.current=Ue},[]),Xe=R.useCallback(Ue=>{Pe.current?.(Ue)},[]),tt=R.useRef([]),nt=R.useCallback(Ue=>{tt.current.push(Ue)},[]),Z=R.useCallback(Ue=>{tt.current.forEach(St=>St(Ue))},[]),pe=R.useRef([]),ue=R.useCallback(Ue=>{pe.current.push(Ue)},[]),$=R.useCallback(Ue=>{pe.current.forEach(St=>St(Ue))},[]),j=R.useRef([]),te=R.useCallback(Ue=>{j.current.push(Ue)},[]),le=R.useCallback(Ue=>{j.current.forEach(St=>St(Ue))},[]),ge=R.useRef([]),ee=R.useCallback(Ue=>{ge.current.push(Ue)},[]),he=R.useCallback((Ue,St)=>{ge.current.forEach(Dt=>Dt(Ue)),l?.(Ue,St)},[l]);R.useEffect(()=>{n&&(h.current?.engine?.lookAtLayer(n),a?.(void 0))},[n,a]);const[Ie,_e]=R.useState(!1),De=R.useCallback(()=>{_e(!0)},[]),Be=R.useCallback((Ue,St,Dt)=>{_e(!1);const xt=h.current?.layers.findById(Ue),mn=xt?.property.default.location?"default.location":xt?.property.default.position?"default.position":void 0;Dt&&xt&&xt.propertyId&&mn&&c?.(xt.propertyId,mn,Dt)},[c,h]),Je=R.useMemo(()=>({interactionMode:k,selectedLayer:p,selectedComputedFeature:v,viewport:f,handleCameraForceHorizontalRollChange:N,handleInteractionModeChange:P,onSketchPluginFeatureCreate:nt,onSketchPluginFeatureUpdate:ue,onSketchPluginFeatureDelete:te,onSketchTypeChange:ee,onLayerVisibility:Y,onLayerLoad:z,onLayerEdit:I,onLayerSelectWithRectStart:q,onLayerSelectWithRectMove:be,onLayerSelectWithRectEnd:fe}),[k,p,v,f,P,N,I,nt,ue,te,ee,Y,z,q,be,fe]),Nt=R.useMemo(()=>({position:"relative",width:"100%",height:"100%",overflow:"hidden"}),[]);return xFe({viewerProperty:i}),{mapRef:h,wrapperRef:d,selectedFeature:y,camera:O,featureFlags:w,isLayerDragging:Ie,timelineManagerRef:C,cameraForceHorizontalRoll:A,coreContextValue:Je,containerStyle:Nt,overriddenInteractionMode:k,handleLayerSelect:E,handleLayerDrag:De,handleLayerDrop:Be,handleLayerEdit:X,handleCameraChange:V,handleInteractionModeChange:P,handleSketchPluginFeatureCreate:Z,handleSketchPluginFeatureUpdate:$,handleSketchPluginFeatureDelete:le,handleSketchTypeChange:he,handleLayerVisibility:H,handleLayerLoad:W,handleLayerSelectWithRectStart:oe,handleLayerSelectWithRectMove:Ae,handleLayerSelectWithRectEnd:Xe}}function NZ(e,t){const[n,i]=R.useState(e),r=R.useCallback(o=>{o&&(i(o),t?.(o))},[t]);return R.useEffect(()=>{i(e)},[e]),[n,r]}const RFe=R.memo(R.forwardRef(({engine:e,isBuilt:t,isEditable:n,viewerProperty:i,layers:r,clusters:o,small:s,ready:a,hiddenLayers:c,camera:l,time:u,interactionMode:h,shouldRender:d,meta:f,customProvider:p,displayCredits:m=!0,style:y,zoomedLayerId:g,children:v,onLayerDrop:S,onLayerSelect:E,onCameraChange:C,onZoomToLayer:O,onInteractionModeChange:V,onMount:A,onSketchTypeChangeProp:G,onSketchFeatureCreate:N,onSketchFeatureUpdate:k,onSketchFeatureDelete:P,onAPIReady:w,onCreditsUpdate:x},I)=>{const{mapRef:X,wrapperRef:D,selectedFeature:Y,camera:H,featureFlags:J,isLayerDragging:z,timelineManagerRef:W,cameraForceHorizontalRoll:Q,coreContextValue:q,containerStyle:oe,overriddenInteractionMode:Ee,handleLayerSelect:be,handleLayerDrag:Ae,handleLayerDrop:Pe,handleLayerEdit:fe,handleCameraChange:Xe,handleInteractionModeChange:tt,handleSketchPluginFeatureCreate:nt,handleSketchPluginFeatureUpdate:Z,handleSketchPluginFeatureDelete:pe,handleSketchTypeChange:ue,handleLayerVisibility:$,handleLayerLoad:j,handleLayerSelectWithRectStart:te,handleLayerSelectWithRectMove:le,handleLayerSelectWithRectEnd:ge}=CFe({camera:l,interactionMode:h,zoomedLayerId:g,viewerProperty:i,onLayerSelect:E,onCameraChange:C,onZoomToLayer:O,onLayerDrop:S,onInteractionModeChange:V,onSketchTypeChangeProp:G},I);return ce.jsx(Foe,{FallbackComponent:vFe,children:ce.jsx(koe,{mapRef:X,children:ce.jsxs("div",{ref:D,style:oe,children:[ce.jsx(d5,{ref:X,isBuilt:t,isEditable:n,engine:e,layers:r,engines:zZ,camera:H,cameraForceHorizontalRoll:Q,clusters:o,hiddenLayers:c,isLayerDragging:z,isLayerDraggable:n,meta:f,customProvider:p,displayCredits:m,style:y,featureFlags:J,shouldRender:d,property:i,time:u,small:s,ready:a,timelineManagerRef:W,interactionMode:Ee,selectedFeature:Y,onCameraChange:Xe,onLayerDrag:Ae,onLayerDrop:Pe,onLayerSelect:be,onLayerEdit:fe,overrideInteractionMode:tt,onSketchFeatureCreate:N,onSketchPluginFeatureCreate:nt,onSketchFeatureUpdate:k,onSketchPluginFeatureUpdate:Z,onSketchFeatureDelete:P,onSketchPluginFeatureDelete:pe,onSketchTypeChange:ue,onMount:A,onLayerVisibility:$,onLayerLoad:j,onLayerSelectWithRectStart:te,onLayerSelectWithRectMove:le,onLayerSelectWithRectEnd:ge,onAPIReady:w,onCreditsUpdate:x}),ce.jsx(p5.Provider,{value:q,children:v})]})})})}));var cd=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},sa=[],Zo=[],IFe=typeof Uint8Array<"u"?Uint8Array:Array,GT=!1;function kZ(){GT=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)sa[t]=e[t],Zo[e.charCodeAt(t)]=t;Zo[45]=62,Zo[95]=63}function MFe(e){GT||kZ();var t,n,i,r,o,s,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[a-2]==="="?2:e[a-1]==="="?1:0,s=new IFe(a*3/4-o),i=o>0?a-4:a;var c=0;for(t=0,n=0;t<i;t+=4,n+=3)r=Zo[e.charCodeAt(t)]<<18|Zo[e.charCodeAt(t+1)]<<12|Zo[e.charCodeAt(t+2)]<<6|Zo[e.charCodeAt(t+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=r&255;return o===2?(r=Zo[e.charCodeAt(t)]<<2|Zo[e.charCodeAt(t+1)]>>4,s[c++]=r&255):o===1&&(r=Zo[e.charCodeAt(t)]<<10|Zo[e.charCodeAt(t+1)]<<4|Zo[e.charCodeAt(t+2)]>>2,s[c++]=r>>8&255,s[c++]=r&255),s}function LFe(e){return sa[e>>18&63]+sa[e>>12&63]+sa[e>>6&63]+sa[e&63]}function PFe(e,t,n){for(var i,r=[],o=t;o<n;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],r.push(LFe(i));return r.join("")}function XZ(e){GT||kZ();for(var t,n=e.length,i=n%3,r="",o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(PFe(e,a,a+s>c?c:a+s));return i===1?(t=e[n-1],r+=sa[t>>2],r+=sa[t<<4&63],r+="=="):i===2&&(t=(e[n-2]<<8)+e[n-1],r+=sa[t>>10],r+=sa[t>>4&63],r+=sa[t<<2&63],r+="="),o.push(r),o.join("")}function o1(e,t,n,i,r){var o,s,a=r*8-i-1,c=(1<<a)-1,l=c>>1,u=-7,h=n?r-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=d,u-=8);if(o===0)o=1-l;else{if(o===c)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-l}return(f?-1:1)*s*Math.pow(2,o-i)}function ZZ(e,t,n,i,r,o){var s,a,c,l=o*8-r-1,u=(1<<l)-1,h=u>>1,d=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=d/c:t+=d*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,r),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=a&255,f+=p,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;e[n+f]=s&255,f+=p,s/=256,l-=8);e[n+f-p]|=m*128}var OFe={}.toString,DZ=Array.isArray||function(e){return OFe.call(e)=="[object Array]"},GFe=50;ve.TYPED_ARRAY_SUPPORT=cd.TYPED_ARRAY_SUPPORT!==void 0?cd.TYPED_ARRAY_SUPPORT:!0,s1();function s1(){return ve.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ba(e,t){if(s1()<t)throw new RangeError("Invalid typed array length");return ve.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=ve.prototype):(e===null&&(e=new ve(t)),e.length=t),e}function ve(e,t,n){if(!ve.TYPED_ARRAY_SUPPORT&&!(this instanceof ve))return new ve(e,t,n);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return VT(this,e)}return UZ(this,e,t,n)}ve.poolSize=8192,ve._augment=function(e){return e.__proto__=ve.prototype,e};function UZ(e,t,n,i){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?AFe(e,t,n,i):typeof t=="string"?FFe(e,t,n):zFe(e,t)}ve.from=function(e,t,n){return UZ(null,e,t,n)},ve.TYPED_ARRAY_SUPPORT&&(ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ve[Symbol.species]);function WZ(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function VFe(e,t,n,i){return WZ(t),t<=0?Ba(e,t):n!==void 0?typeof i=="string"?Ba(e,t).fill(n,i):Ba(e,t).fill(n):Ba(e,t)}ve.alloc=function(e,t,n){return VFe(null,e,t,n)};function VT(e,t){if(WZ(t),e=Ba(e,t<0?0:AT(t)|0),!ve.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}ve.allocUnsafe=function(e){return VT(null,e)},ve.allocUnsafeSlow=function(e){return VT(null,e)};function FFe(e,t,n){if((typeof n!="string"||n==="")&&(n="utf8"),!ve.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=BZ(t,n)|0;e=Ba(e,i);var r=e.write(t,n);return r!==i&&(e=e.slice(0,r)),e}function FT(e,t){var n=t.length<0?0:AT(t.length)|0;e=Ba(e,n);for(var i=0;i<n;i+=1)e[i]=t[i]&255;return e}function AFe(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return n===void 0&&i===void 0?t=new Uint8Array(t):i===void 0?t=new Uint8Array(t,n):t=new Uint8Array(t,n,i),ve.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=ve.prototype):e=FT(e,t),e}function zFe(e,t){if(aa(t)){var n=AT(t.length)|0;return e=Ba(e,n),e.length===0||t.copy(e,0,0,n),e}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||n4e(t.length)?Ba(e,0):FT(e,t);if(t.type==="Buffer"&&DZ(t.data))return FT(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function AT(e){if(e>=s1())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s1().toString(16)+" bytes");return e|0}ve.isBuffer=jr;function aa(e){return!!(e!=null&&e._isBuffer)}ve.compare=function(t,n){if(!aa(t)||!aa(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var i=t.length,r=n.length,o=0,s=Math.min(i,r);o<s;++o)if(t[o]!==n[o]){i=t[o],r=n[o];break}return i<r?-1:r<i?1:0},ve.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ve.concat=function(t,n){if(!DZ(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return ve.alloc(0);var i;if(n===void 0)for(n=0,i=0;i<t.length;++i)n+=t[i].length;var r=ve.allocUnsafe(n),o=0;for(i=0;i<t.length;++i){var s=t[i];if(!aa(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r};function BZ(e,t){if(aa(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return l1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return eD(e).length;default:if(i)return l1(e).length;t=(""+t).toLowerCase(),i=!0}}ve.byteLength=BZ;function NFe(e,t,n){var i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return jFe(this,t,n);case"utf8":case"utf-8":return KZ(this,t,n);case"ascii":return YFe(this,t,n);case"latin1":case"binary":return HFe(this,t,n);case"base64":return WFe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return KFe(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}ve.prototype._isBuffer=!0;function ru(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}ve.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)ru(this,n,n+1);return this},ve.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)ru(this,n,n+3),ru(this,n+1,n+2);return this},ve.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)ru(this,n,n+7),ru(this,n+1,n+6),ru(this,n+2,n+5),ru(this,n+3,n+4);return this},ve.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?KZ(this,0,t):NFe.apply(this,arguments)},ve.prototype.equals=function(t){if(!aa(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:ve.compare(this,t)===0},ve.prototype.inspect=function(){var t="",n=GFe;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},ve.prototype.compare=function(t,n,i,r,o){if(!aa(t))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),i===void 0&&(i=t?t.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),n<0||i>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&n>=i)return 0;if(r>=o)return-1;if(n>=i)return 1;if(n>>>=0,i>>>=0,r>>>=0,o>>>=0,this===t)return 0;for(var s=o-r,a=i-n,c=Math.min(s,a),l=this.slice(r,o),u=t.slice(n,i),h=0;h<c;++h)if(l[h]!==u[h]){s=l[h],a=u[h];break}return s<a?-1:a<s?1:0};function YZ(e,t,n,i,r){if(e.length===0)return-1;if(typeof n=="string"?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0)if(r)n=0;else return-1;if(typeof t=="string"&&(t=ve.from(t,i)),aa(t))return t.length===0?-1:HZ(e,t,n,i,r);if(typeof t=="number")return t=t&255,ve.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):HZ(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function HZ(e,t,n,i,r){var o=1,s=e.length,a=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}function c(f,p){return o===1?f[p]:f.readUInt16BE(p*o)}var l;if(r){var u=-1;for(l=n;l<s;l++)if(c(e,l)===c(t,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===a)return u*o}else u!==-1&&(l-=l-u),u=-1}else for(n+a>s&&(n=s-a),l=n;l>=0;l--){for(var h=!0,d=0;d<a;d++)if(c(e,l+d)!==c(t,d)){h=!1;break}if(h)return l}return-1}ve.prototype.includes=function(t,n,i){return this.indexOf(t,n,i)!==-1},ve.prototype.indexOf=function(t,n,i){return YZ(this,t,n,i,!0)},ve.prototype.lastIndexOf=function(t,n,i){return YZ(this,t,n,i,!1)};function kFe(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i),i>r&&(i=r)):i=r;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(s*2,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function XFe(e,t,n,i){return u1(l1(t,e.length-n),e,n,i)}function jZ(e,t,n,i){return u1(e4e(t),e,n,i)}function ZFe(e,t,n,i){return jZ(e,t,n,i)}function DFe(e,t,n,i){return u1(eD(t),e,n,i)}function UFe(e,t,n,i){return u1(t4e(t,e.length-n),e,n,i)}ve.prototype.write=function(t,n,i,r){if(n===void 0)r="utf8",i=this.length,n=0;else if(i===void 0&&typeof n=="string")r=n,i=this.length,n=0;else if(isFinite(n))n=n|0,isFinite(i)?(i=i|0,r===void 0&&(r="utf8")):(r=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-n;if((i===void 0||i>o)&&(i=o),t.length>0&&(i<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return kFe(this,t,n,i);case"utf8":case"utf-8":return XFe(this,t,n,i);case"ascii":return jZ(this,t,n,i);case"latin1":case"binary":return ZFe(this,t,n,i);case"base64":return DFe(this,t,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return UFe(this,t,n,i);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function WFe(e,t,n){return t===0&&n===e.length?XZ(e):XZ(e.slice(t,n))}function KZ(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o=e[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a<=n){var c,l,u,h;switch(a){case 1:o<128&&(s=o);break;case 2:c=e[r+1],(c&192)===128&&(h=(o&31)<<6|c&63,h>127&&(s=h));break;case 3:c=e[r+1],l=e[r+2],(c&192)===128&&(l&192)===128&&(h=(o&15)<<12|(c&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:c=e[r+1],l=e[r+2],u=e[r+3],(c&192)===128&&(l&192)===128&&(u&192)===128&&(h=(o&15)<<18|(c&63)<<12|(l&63)<<6|u&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),r+=a}return BFe(i)}var JZ=4096;function BFe(e){var t=e.length;if(t<=JZ)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=JZ));return n}function YFe(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]&127);return i}function HFe(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function jFe(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=$Fe(e[o]);return r}function KFe(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+i[o+1]*256);return r}ve.prototype.slice=function(t,n){var i=this.length;t=~~t,n=n===void 0?i:~~n,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),n<0?(n+=i,n<0&&(n=0)):n>i&&(n=i),n<t&&(n=t);var r;if(ve.TYPED_ARRAY_SUPPORT)r=this.subarray(t,n),r.__proto__=ve.prototype;else{var o=n-t;r=new ve(o,void 0);for(var s=0;s<o;++s)r[s]=this[s+t]}return r};function Mi(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=this[t],o=1,s=0;++s<n&&(o*=256);)r+=this[t+s]*o;return r},ve.prototype.readUIntBE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=this[t+--n],o=1;n>0&&(o*=256);)r+=this[t+--n]*o;return r},ve.prototype.readUInt8=function(t,n){return n||Mi(t,1,this.length),this[t]},ve.prototype.readUInt16LE=function(t,n){return n||Mi(t,2,this.length),this[t]|this[t+1]<<8},ve.prototype.readUInt16BE=function(t,n){return n||Mi(t,2,this.length),this[t]<<8|this[t+1]},ve.prototype.readUInt32LE=function(t,n){return n||Mi(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},ve.prototype.readUInt32BE=function(t,n){return n||Mi(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},ve.prototype.readIntLE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=this[t],o=1,s=0;++s<n&&(o*=256);)r+=this[t+s]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*n)),r},ve.prototype.readIntBE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=n,o=1,s=this[t+--r];r>0&&(o*=256);)s+=this[t+--r]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*n)),s},ve.prototype.readInt8=function(t,n){return n||Mi(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},ve.prototype.readInt16LE=function(t,n){n||Mi(t,2,this.length);var i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i},ve.prototype.readInt16BE=function(t,n){n||Mi(t,2,this.length);var i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i},ve.prototype.readInt32LE=function(t,n){return n||Mi(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},ve.prototype.readInt32BE=function(t,n){return n||Mi(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},ve.prototype.readFloatLE=function(t,n){return n||Mi(t,4,this.length),o1(this,t,!0,23,4)},ve.prototype.readFloatBE=function(t,n){return n||Mi(t,4,this.length),o1(this,t,!1,23,4)},ve.prototype.readDoubleLE=function(t,n){return n||Mi(t,8,this.length),o1(this,t,!0,52,8)},ve.prototype.readDoubleBE=function(t,n){return n||Mi(t,8,this.length),o1(this,t,!1,52,8)};function Hr(e,t,n,i,r,o){if(!aa(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(t,n,i,r){if(t=+t,n=n|0,i=i|0,!r){var o=Math.pow(2,8*i)-1;Hr(this,t,n,i,o,0)}var s=1,a=0;for(this[n]=t&255;++a<i&&(s*=256);)this[n+a]=t/s&255;return n+i},ve.prototype.writeUIntBE=function(t,n,i,r){if(t=+t,n=n|0,i=i|0,!r){var o=Math.pow(2,8*i)-1;Hr(this,t,n,i,o,0)}var s=i-1,a=1;for(this[n+s]=t&255;--s>=0&&(a*=256);)this[n+s]=t/a&255;return n+i},ve.prototype.writeUInt8=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,1,255,0),ve.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=t&255,n+1};function a1(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>(i?r:1-r)*8}ve.prototype.writeUInt16LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,65535,0),ve.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):a1(this,t,n,!0),n+2},ve.prototype.writeUInt16BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,65535,0),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):a1(this,t,n,!1),n+2};function c1(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>(i?r:3-r)*8&255}ve.prototype.writeUInt32LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,4294967295,0),ve.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255):c1(this,t,n,!0),n+4},ve.prototype.writeUInt32BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,4294967295,0),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):c1(this,t,n,!1),n+4},ve.prototype.writeIntLE=function(t,n,i,r){if(t=+t,n=n|0,!r){var o=Math.pow(2,8*i-1);Hr(this,t,n,i,o-1,-o)}var s=0,a=1,c=0;for(this[n]=t&255;++s<i&&(a*=256);)t<0&&c===0&&this[n+s-1]!==0&&(c=1),this[n+s]=(t/a>>0)-c&255;return n+i},ve.prototype.writeIntBE=function(t,n,i,r){if(t=+t,n=n|0,!r){var o=Math.pow(2,8*i-1);Hr(this,t,n,i,o-1,-o)}var s=i-1,a=1,c=0;for(this[n+s]=t&255;--s>=0&&(a*=256);)t<0&&c===0&&this[n+s+1]!==0&&(c=1),this[n+s]=(t/a>>0)-c&255;return n+i},ve.prototype.writeInt8=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,1,127,-128),ve.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=t&255,n+1},ve.prototype.writeInt16LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,32767,-32768),ve.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):a1(this,t,n,!0),n+2},ve.prototype.writeInt16BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,32767,-32768),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):a1(this,t,n,!1),n+2},ve.prototype.writeInt32LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,2147483647,-2147483648),ve.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):c1(this,t,n,!0),n+4},ve.prototype.writeInt32BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):c1(this,t,n,!1),n+4};function QZ(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function qZ(e,t,n,i,r){return r||QZ(e,t,n,4),ZZ(e,t,n,i,23,4),n+4}ve.prototype.writeFloatLE=function(t,n,i){return qZ(this,t,n,!0,i)},ve.prototype.writeFloatBE=function(t,n,i){return qZ(this,t,n,!1,i)};function $Z(e,t,n,i,r){return r||QZ(e,t,n,8),ZZ(e,t,n,i,52,8),n+8}ve.prototype.writeDoubleLE=function(t,n,i){return $Z(this,t,n,!0,i)},ve.prototype.writeDoubleBE=function(t,n,i){return $Z(this,t,n,!1,i)},ve.prototype.copy=function(t,n,i,r){if(i||(i=0),!r&&r!==0&&(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<i&&(r=i),r===i||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-i&&(r=t.length-n+i);var o=r-i,s;if(this===t&&i<n&&n<r)for(s=o-1;s>=0;--s)t[s+n]=this[s+i];else if(o<1e3||!ve.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+n]=this[s+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+o),n);return o},ve.prototype.fill=function(t,n,i,r){if(typeof t=="string"){if(typeof n=="string"?(r=n,n=0,i=this.length):typeof i=="string"&&(r=i,i=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!ve.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<i)throw new RangeError("Out of range index");if(i<=n)return this;n=n>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);var s;if(typeof t=="number")for(s=n;s<i;++s)this[s]=t;else{var a=aa(t)?t:l1(new ve(t,r).toString()),c=a.length;for(s=0;s<i-n;++s)this[s+n]=a[s%c]}return this};var JFe=/[^+\/0-9A-Za-z-_]/g;function QFe(e){if(e=qFe(e).replace(JFe,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function qFe(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function $Fe(e){return e<16?"0"+e.toString(16):e.toString(16)}function l1(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s<i;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return o}function e4e(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function t4e(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}function eD(e){return MFe(QFe(e))}function u1(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function n4e(e){return e!==e}function jr(e){return e!=null&&(!!e._isBuffer||tD(e)||i4e(e))}function tD(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function i4e(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&tD(e.slice(0,0))}var zT;function Kc(){}Kc.prototype=Object.create(null);function Bt(){Bt.init.call(this)}Bt.EventEmitter=Bt,Bt.usingDomains=!1,Bt.prototype.domain=void 0,Bt.prototype._events=void 0,Bt.prototype._maxListeners=void 0,Bt.defaultMaxListeners=10,Bt.init=function(){this.domain=null,Bt.usingDomains&&zT.active&&!(this instanceof zT.Domain)&&(this.domain=zT.active),(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new Kc,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Bt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this};function nD(e){return e._maxListeners===void 0?Bt.defaultMaxListeners:e._maxListeners}Bt.prototype.getMaxListeners=function(){return nD(this)};function r4e(e,t,n){if(t)e.call(n);else for(var i=e.length,r=M0(e,i),o=0;o<i;++o)r[o].call(n)}function o4e(e,t,n,i){if(t)e.call(n,i);else for(var r=e.length,o=M0(e,r),s=0;s<r;++s)o[s].call(n,i)}function s4e(e,t,n,i,r){if(t)e.call(n,i,r);else for(var o=e.length,s=M0(e,o),a=0;a<o;++a)s[a].call(n,i,r)}function a4e(e,t,n,i,r,o){if(t)e.call(n,i,r,o);else for(var s=e.length,a=M0(e,s),c=0;c<s;++c)a[c].call(n,i,r,o)}function c4e(e,t,n,i){if(t)e.apply(n,i);else for(var r=e.length,o=M0(e,r),s=0;s<r;++s)o[s].apply(n,i)}Bt.prototype.emit=function(t){var n,i,r,o,s,a,c,l=t==="error";if(a=this._events,a)l=l&&a.error==null;else if(!l)return!1;if(c=this.domain,l){if(n=arguments[1],c)n||(n=new Error('Uncaught, unspecified "error" event')),n.domainEmitter=this,n.domain=c,n.domainThrown=!1,c.emit("error",n);else{if(n instanceof Error)throw n;var u=new Error('Uncaught, unspecified "error" event. ('+n+")");throw u.context=n,u}return!1}if(i=a[t],!i)return!1;var h=typeof i=="function";switch(r=arguments.length,r){case 1:r4e(i,h,this);break;case 2:o4e(i,h,this,arguments[1]);break;case 3:s4e(i,h,this,arguments[1],arguments[2]);break;case 4:a4e(i,h,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),s=1;s<r;s++)o[s-1]=arguments[s];c4e(i,h,this,o)}return!0};function iD(e,t,n,i){var r,o,s;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(o=e._events,o?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]):(o=e._events=new Kc,e._eventsCount=0),!s)s=o[t]=n,++e._eventsCount;else if(typeof s=="function"?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(r=nD(e),r&&r>0&&s.length>r)){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,l4e(a)}return e}function l4e(e){typeof console.warn=="function"?console.warn(e):console.log(e)}Bt.prototype.addListener=function(t,n){return iD(this,t,n,!1)},Bt.prototype.on=Bt.prototype.addListener,Bt.prototype.prependListener=function(t,n){return iD(this,t,n,!0)};function rD(e,t,n){var i=!1;function r(){e.removeListener(t,r),i||(i=!0,n.apply(e,arguments))}return r.listener=n,r}Bt.prototype.once=function(t,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,rD(this,t,n)),this},Bt.prototype.prependOnceListener=function(t,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,rD(this,t,n)),this},Bt.prototype.removeListener=function(t,n){var i,r,o,s,a;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(r=this._events,!r)return this;if(i=r[t],!i)return this;if(i===n||i.listener&&i.listener===n)--this._eventsCount===0?this._events=new Kc:(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||n));else if(typeof i!="function"){for(o=-1,s=i.length;s-- >0;)if(i[s]===n||i[s].listener&&i[s].listener===n){a=i[s].listener,o=s;break}if(o<0)return this;if(i.length===1){if(i[0]=void 0,--this._eventsCount===0)return this._events=new Kc,this;delete r[t]}else u4e(i,o);r.removeListener&&this.emit("removeListener",t,a||n)}return this},Bt.prototype.removeAllListeners=function(t){var n,i;if(i=this._events,!i)return this;if(!i.removeListener)return arguments.length===0?(this._events=new Kc,this._eventsCount=0):i[t]&&(--this._eventsCount===0?this._events=new Kc:delete i[t]),this;if(arguments.length===0){for(var r=Object.keys(i),o=0,s;o<r.length;++o)s=r[o],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=new Kc,this._eventsCount=0,this}if(n=i[t],typeof n=="function")this.removeListener(t,n);else if(n)do this.removeListener(t,n[n.length-1]);while(n[0]);return this},Bt.prototype.listeners=function(t){var n,i,r=this._events;return r?(n=r[t],n?typeof n=="function"?i=[n.listener||n]:i=h4e(n):i=[]):i=[],i},Bt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):oD.call(e,t)},Bt.prototype.listenerCount=oD;function oD(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}Bt.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function u4e(e,t){for(var n=t,i=n+1,r=e.length;i<r;n+=1,i+=1)e[n]=e[i];e.pop()}function M0(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function h4e(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function sD(){throw new Error("setTimeout has not been defined")}function aD(){throw new Error("clearTimeout has not been defined")}var Jc=sD,Qc=aD;typeof cd.setTimeout=="function"&&(Jc=setTimeout),typeof cd.clearTimeout=="function"&&(Qc=clearTimeout);function cD(e){if(Jc===setTimeout)return setTimeout(e,0);if((Jc===sD||!Jc)&&setTimeout)return Jc=setTimeout,setTimeout(e,0);try{return Jc(e,0)}catch{try{return Jc.call(null,e,0)}catch{return Jc.call(this,e,0)}}}function d4e(e){if(Qc===clearTimeout)return clearTimeout(e);if((Qc===aD||!Qc)&&clearTimeout)return Qc=clearTimeout,clearTimeout(e);try{return Qc(e)}catch{try{return Qc.call(null,e)}catch{return Qc.call(this,e)}}}var Ya=[],ld=!1,ou,h1=-1;function f4e(){!ld||!ou||(ld=!1,ou.length?Ya=ou.concat(Ya):h1=-1,Ya.length&&lD())}function lD(){if(!ld){var e=cD(f4e);ld=!0;for(var t=Ya.length;t;){for(ou=Ya,Ya=[];++h1<t;)ou&&ou[h1].run();h1=-1,t=Ya.length}ou=null,ld=!1,d4e(e)}}function Do(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ya.push(new uD(e,t)),Ya.length===1&&!ld&&cD(lD)}function uD(e,t){this.fun=e,this.array=t}uD.prototype.run=function(){this.fun.apply(null,this.array)};var p4e={},L0=cd.performance||{};L0.now||L0.mozNow||L0.msNow||L0.oNow||L0.webkitNow;var d1={env:p4e},NT;typeof Object.create=="function"?NT=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:NT=function(t,n){t.super_=n;var i=function(){};i.prototype=n.prototype,t.prototype=new i,t.prototype.constructor=t};var ud=NT,m4e=/%[sdj%]/g;function g4e(e){if(!UT(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(qc(arguments[n]));return t.join(" ")}for(var n=1,i=arguments,r=i.length,o=String(e).replace(m4e,function(a){if(a==="%%")return"%";if(n>=r)return a;switch(a){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return a}}),s=i[n];n<r;s=i[++n])DT(s)||!P0(s)?o+=" "+s:o+=" "+qc(s);return o}function hD(e,t){if($c(cd.process))return function(){return hD(e,t).apply(this,arguments)};if(d1.noDeprecation===!0)return e;var n=!1;function i(){if(!n){if(d1.throwDeprecation)throw new Error(t);d1.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}return i}var f1={},kT;function y4e(e){if($c(kT)&&(kT=d1.env.NODE_DEBUG||""),e=e.toUpperCase(),!f1[e])if(new RegExp("\\b"+e+"\\b","i").test(kT)){var t=0;f1[e]=function(){var n=g4e.apply(null,arguments);console.error("%s %d: %s",e,t,n)}}else f1[e]=function(){};return f1[e]}function qc(e,t){var n={seen:[],stylize:_4e};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),dD(t)?n.showHidden=t:t&&C4e(n,t),$c(n.showHidden)&&(n.showHidden=!1),$c(n.depth)&&(n.depth=2),$c(n.colors)&&(n.colors=!1),$c(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=b4e),p1(n,e,n.depth)}qc.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},qc.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function b4e(e,t){var n=qc.styles[t];return n?"\x1B["+qc.colors[n][0]+"m"+e+"\x1B["+qc.colors[n][1]+"m":e}function _4e(e,t){return e}function v4e(e){var t={};return e.forEach(function(n,i){t[n]=!0}),t}function p1(e,t,n){if(e.customInspect&&t&&YT(t.inspect)&&t.inspect!==qc&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(n,e);return UT(i)||(i=p1(e,i,n)),i}var r=w4e(e,t);if(r)return r;var o=Object.keys(t),s=v4e(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),BT(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return XT(t);if(o.length===0){if(YT(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(WT(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(fD(t))return e.stylize(Date.prototype.toString.call(t),"date");if(BT(t))return XT(t)}var c="",l=!1,u=["{","}"];if(E4e(t)&&(l=!0,u=["[","]"]),YT(t)){var h=t.name?": "+t.name:"";c=" [Function"+h+"]"}if(WT(t)&&(c=" "+RegExp.prototype.toString.call(t)),fD(t)&&(c=" "+Date.prototype.toUTCString.call(t)),BT(t)&&(c=" "+XT(t)),o.length===0&&(!l||t.length==0))return u[0]+c+u[1];if(n<0)return WT(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var d;return l?d=x4e(e,t,n,s,o):d=o.map(function(f){return ZT(e,t,n,s,f,l)}),e.seen.pop(),S4e(d,c,u)}function w4e(e,t){if($c(t))return e.stylize("undefined","undefined");if(UT(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(T4e(t))return e.stylize(""+t,"number");if(dD(t))return e.stylize(""+t,"boolean");if(DT(t))return e.stylize("null","null")}function XT(e){return"["+Error.prototype.toString.call(e)+"]"}function x4e(e,t,n,i,r){for(var o=[],s=0,a=t.length;s<a;++s)pD(t,String(s))?o.push(ZT(e,t,n,i,String(s),!0)):o.push("");return r.forEach(function(c){c.match(/^\d+$/)||o.push(ZT(e,t,n,i,c,!0))}),o}function ZT(e,t,n,i,r,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]},c.get?c.set?a=e.stylize("[Getter/Setter]","special"):a=e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),pD(i,r)||(s="["+r+"]"),a||(e.seen.indexOf(c.value)<0?(DT(n)?a=p1(e,c.value,null):a=p1(e,c.value,n-1),a.indexOf(`
6731
+ `,uniforms:{...Qr(u,["color","frustumLength","blackPoint","whitePoint","gamma"]),globeDepthTexture:()=>c?.()??d._depthTexture}});if(r){const f=$Le({prefix:e,outputType:s,useGlobeDepth:a,getGlobeDepthTexture:c,uniforms:{textureScale:t,...Qr(u,["frustumLength","normalExponent","depthExponent"])}}),p=new M.PostProcessStageComposite({name:`${e}_ambient_occlusion_generate_and_filter`,stages:[h,f]});return d.uniforms.ambientOcclusionTexture=p.name,new M.PostProcessStageComposite({name:`${e}_ambient_occlusion`,stages:[p,d],inputPreviousStageTexture:!1,uniforms:fE([{stage:h,uniforms:["intensity","maxRadius","bias","frustumLength","focalLength"]},{stage:f,uniforms:["frustumLength","normalExponent","depthExponent"]},{stage:d,uniforms:["color","blackPoint","whitePoint","gamma"]}])})}else return d.uniforms.ambientOcclusionTexture=h.name,new M.PostProcessStageComposite({name:`${e}_ambient_occlusion`,stages:[h,d],inputPreviousStageTexture:!1,uniforms:fE([{stage:h,uniforms:["intensity","maxRadius","bias","frustumLength","focalLength"]},{stage:d,uniforms:["color","blackPoint","whitePoint","gamma"]}])})}const aPe=({enabled:e=!0,textureScale:t,directions:n,steps:i,denoise:r,accurateNormalReconstruction:o,outputType:s,useGlobeDepth:a,...c})=>{const{viewer:l}=Qn(),u=l?.scene,h=fF({owner:u?.postProcessStages,keys:[t,i,n,r,o,s,a],create:()=>{const d=sPe({textureScale:t,steps:i,directions:n,denoise:r,accurateNormalReconstruction:o,outputType:s,useGlobeDepth:a,getGlobeDepthTexture:()=>u.context.uniformState.globeDepthTexture,uniforms:c});return d.enabled=e,d},transferOwnership:(d,f)=>(f?.add(d),()=>{f?.remove(d)})});return h.enabled=e,Object.assign(h.uniforms,c),u?.requestRender(),Gl(()=>{const d=u?.camera.frustum;if(d instanceof M.PerspectiveFrustum&&d.fovy!==void 0&&d.aspectRatio!==void 0){const f=1/Math.tan(d.fovy/2);h.uniforms.focalLength.x=f*d.aspectRatio,h.uniforms.focalLength.y=f}}),null},cPe=e=>{const t=Qn(),[n,i]=R.useState(!1);return Gl(()=>{const r=t.scene;i(!r?.globe.depthTestAgainstTerrain);const{globeHeight:o}=r;if(!r||o==null)return;const s=r.camera.positionCartographic.height-o,a=r?.camera.frustum;a instanceof M.PerspectiveFrustum&&a.fov!==void 0&&(r.camera.frustum.near=M.Math.clamp(s-1,1,5)/Math.tan(a.fov/2))}),ce.jsx(aPe,{...e,useGlobeDepth:n})};var SN=(e=>(e[e.Occlusion=1]="Occlusion",e[e.Normal=2]="Normal",e[e.Depth=3]="Depth",e[e.Weight=4]="Weight",e[e.Shade=5]="Shade",e))(SN||{});const lPe={low:{directions:4,steps:4,textureScale:.5,maxRadius:30},medium:{directions:4,steps:8,textureScale:.5,maxRadius:40},high:{directions:8,steps:8,textureScale:1,maxRadius:40},extreme:{directions:16,steps:16,textureScale:1,maxRadius:40}},uPe="#00bebe",d0="#3B3CD0",hPe="#FF9900",dPe="#3B3CD0";let Jl,fPe,pPe,Ql;const f0=({position:e,clampToGround:t=!1,index:n,isEditing:i,isSelected:r,isAddingPoint:o,isExtrudedControlPoint:s,handleControlPointMouseEvent:a})=>{const c=R.useRef(e);c.current=e;const l=Wo(()=>new wo((f,p)=>"getValue"in c.current?c.current.getValue(f,p):c.current,!1)),u=R.useMemo(()=>({position:l,billboard:{image:i?o?bPe():r?yPe():gPe():mPe(),width:i?16:8,height:i?16:8,heightReference:t?vl.CLAMP_TO_GROUND:vl.NONE,disableDepthTestDistance:1/0}}),[t,l,o,i,r]),h=R.useCallback(()=>{a?.(n,!!s,"mousedown")},[n,s,a]),d=R.useCallback(()=>{a?.(n,!!s,"click")},[n,s,a]);return ce.jsx(uc,{...u,onMouseDown:h,onClick:d})};function mPe(){if(Jl!=null)return Jl;Jl=document.createElement("canvas"),Jl.width=16,Jl.height=16;const e=Jl.getContext("2d");return Vn(e!=null),e.fillStyle="white",e.fillRect(3,3,10,10),e.strokeStyle="black",e.lineWidth=2,e.strokeRect(3,3,10,10),Jl}function gPe(){return EN(fPe,{size:32,color:"white",strokeColor:d0})}function yPe(){return EN(pPe,{size:32,color:"white",strokeColor:hPe})}function bPe(){if(Ql!=null)return Ql;Ql=document.createElement("canvas"),Ql.width=32,Ql.height=32;const e=Ql.getContext("2d");return Vn(e!=null),e.beginPath(),e.arc(16,16,12,0,2*Math.PI),e.fillStyle="white",e.fill(),e.strokeStyle=dPe,e.lineWidth=4,e.stroke(),e.beginPath(),e.moveTo(16,8),e.lineTo(16,24),e.stroke(),e.moveTo(8,16),e.lineTo(24,16),e.stroke(),Ql}function EN(e,t){if(e!=null)return e;e=document.createElement("canvas"),e.width=t.size,e.height=t.size;const n=e.getContext("2d");return Vn(n!=null),n.beginPath(),n.arc(t.size/2,t.size/2,t.size/2-4,0,2*Math.PI),n.fillStyle=t.color,n.fill(),n.strokeStyle=t.strokeColor,n.lineWidth=4,n.stroke(),e}function _Pe(e,t){if(typeof e=="function")return e(t),()=>{e(null)};if(e!=null)return e.current=t,()=>{e.current=null}}const p0=R.memo(R.forwardRef(({entities:e,...t},n)=>{const{viewer:i}=Qn(),r=i?.scene,o=i?.entities,s=e??o,[a,c]=R.useState(()=>new io(t));return R.useEffect(()=>{c(new io(t))},[t.id]),R.useEffect(()=>(s?.add(a),()=>{s?.remove(a),r?.requestRender()}),[r,s,a]),R.useEffect(()=>_Pe(n,a),[n,a]),Object.assign(a,Ka(t,"id")),r?.requestRender(),null})),vPe={padding:"5px",color:"#fff",backgroundColor:"#000",borderRadius:"5px",lineHeight:1},TN=({children:e})=>ce.jsx("div",{style:vPe,children:e}),CN=R.createContext({});function RN(e){const t=R.useRef(null);return t.current===null&&(t.current=e()),t.current}const wPe=typeof window<"u"?R.useLayoutEffect:R.useEffect,pE=R.createContext(null);function mE(e,t){e.indexOf(t)===-1&&e.push(t)}function Nb(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ia=(e,t,n)=>n>t?t:n<e?e:n;function gE(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Jh=()=>{},Ua=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Jh=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(gE(t,n))},Ua=(e,t,n)=>{if(!e)throw new Error(gE(t,n))});const Wa={},IN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function MN(e){return typeof e=="object"&&e!==null}const LN=e=>/^0[^.\s]+$/u.test(e);function PN(e){let t;return()=>(t===void 0&&(t=e()),t)}const No=e=>e,xPe=(e,t)=>n=>t(e(n)),m0=(...e)=>e.reduce(xPe),g0=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class yE{constructor(){this.subscriptions=[]}add(t){return mE(this.subscriptions,t),()=>Nb(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let o=0;o<r;o++){const s=this.subscriptions[o];s&&s(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ko=e=>e*1e3,Xo=e=>e/1e3;function ON(e,t){return t?e*(1e3/t):0}const GN=new Set;function bE(e,t,n){e||GN.has(t)||(console.warn(gE(t,n)),GN.add(t))}const VN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,SPe=1e-7,EPe=12;function TPe(e,t,n,i,r){let o,s,a=0;do s=t+(n-t)/2,o=VN(s,i,r)-e,o>0?n=s:t=s;while(Math.abs(o)>SPe&&++a<EPe);return s}function y0(e,t,n,i){if(e===t&&n===i)return No;const r=o=>TPe(o,0,1,e,n);return o=>o===0||o===1?o:VN(r(o),t,i)}const FN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,AN=e=>t=>1-e(1-t),zN=y0(.33,1.53,.69,.99),_E=AN(zN),NN=FN(_E),kN=e=>(e*=2)<1?.5*_E(e):.5*(2-Math.pow(2,-10*(e-1))),vE=e=>1-Math.sin(Math.acos(e)),XN=AN(vE),ZN=FN(vE),CPe=y0(.42,0,1,1),RPe=y0(0,0,.58,1),DN=y0(.42,0,.58,1),IPe=e=>Array.isArray(e)&&typeof e[0]!="number",UN=e=>Array.isArray(e)&&typeof e[0]=="number",WN={linear:No,easeIn:CPe,easeInOut:DN,easeOut:RPe,circIn:vE,circInOut:ZN,circOut:XN,backIn:_E,backInOut:NN,backOut:zN,anticipate:kN},MPe=e=>typeof e=="string",BN=e=>{if(UN(e)){Ua(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,r]=e;return y0(t,n,i,r)}else if(MPe(e))return Ua(WN[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),WN[e];return e},kb=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function LPe(e,t){let n=new Set,i=new Set,r=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){s.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,h=!1,d=!1)=>{const p=d&&r?n:i;return h&&s.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),s.delete(u)},process:u=>{if(a=u,r){o=!0;return}r=!0,[n,i]=[i,n],n.forEach(c),n.clear(),r=!1,o&&(o=!1,l.process(u))}};return l}const PPe=40;function YN(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=kb.reduce((S,E)=>(S[E]=LPe(o),S),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=s,m=()=>{const S=Wa.useManualTiming?r.timestamp:performance.now();n=!1,Wa.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(S-r.timestamp,PPe),1)),r.timestamp=S,r.isProcessing=!0,a.process(r),c.process(r),l.process(r),u.process(r),h.process(r),d.process(r),f.process(r),p.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))},y=()=>{n=!0,i=!0,r.isProcessing||e(m)};return{schedule:kb.reduce((S,E)=>{const C=s[E];return S[E]=(O,V=!1,A=!1)=>(n||y(),C.schedule(O,V,A)),S},{}),cancel:S=>{for(let E=0;E<kb.length;E++)s[kb[E]].cancel(S)},state:r,steps:s}}const{schedule:Tn,cancel:Bc,state:Xi,steps:wE}=YN(typeof requestAnimationFrame<"u"?requestAnimationFrame:No,!0);let Xb;function OPe(){Xb=void 0}const wr={now:()=>(Xb===void 0&&wr.set(Xi.isProcessing||Wa.useManualTiming?Xi.timestamp:performance.now()),Xb),set:e=>{Xb=e,queueMicrotask(OPe)}},HN=e=>t=>typeof t=="string"&&t.startsWith(e),jN=HN("--"),GPe=HN("var(--"),xE=e=>GPe(e)?VPe.test(e.split("/*")[0].trim()):!1,VPe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function KN(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Qh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},b0={...Qh,transform:e=>ia(0,1,e)},Zb={...Qh,default:1},_0=e=>Math.round(e*1e5)/1e5,SE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function FPe(e){return e==null}const APe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,EE=(e,t)=>n=>!!(typeof n=="string"&&APe.test(n)&&n.startsWith(e)||t&&!FPe(n)&&Object.prototype.hasOwnProperty.call(n,t)),JN=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,o,s,a]=i.match(SE);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},zPe=e=>ia(0,255,e),TE={...Qh,transform:e=>Math.round(zPe(e))},ql={test:EE("rgb","red"),parse:JN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+TE.transform(e)+", "+TE.transform(t)+", "+TE.transform(n)+", "+_0(b0.transform(i))+")"};function NPe(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const CE={test:EE("#"),parse:NPe,transform:ql.transform},v0=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yc=v0("deg"),ra=v0("%"),at=v0("px"),kPe=v0("vh"),XPe=v0("vw"),QN={...ra,parse:e=>ra.parse(e)/100,transform:e=>ra.transform(e*100)},qh={test:EE("hsl","hue"),parse:JN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ra.transform(_0(t))+", "+ra.transform(_0(n))+", "+_0(b0.transform(i))+")"},ui={test:e=>ql.test(e)||CE.test(e)||qh.test(e),parse:e=>ql.test(e)?ql.parse(e):qh.test(e)?qh.parse(e):CE.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ql.transform(e):qh.transform(e),getAnimatableNone:e=>{const t=ui.parse(e);return t.alpha=0,ui.transform(t)}},ZPe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function DPe(e){return isNaN(e)&&typeof e=="string"&&(e.match(SE)?.length||0)+(e.match(ZPe)?.length||0)>0}const qN="number",$N="color",UPe="var",WPe="var(",ek="${}",BPe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function w0(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const a=t.replace(BPe,c=>(ui.test(c)?(i.color.push(o),r.push($N),n.push(ui.parse(c))):c.startsWith(WPe)?(i.var.push(o),r.push(UPe),n.push(c)):(i.number.push(o),r.push(qN),n.push(parseFloat(c))),++o,ek)).split(ek);return{values:n,split:a,indexes:i,types:r}}function tk(e){return w0(e).values}function nk(e){const{split:t,types:n}=w0(e),i=t.length;return r=>{let o="";for(let s=0;s<i;s++)if(o+=t[s],r[s]!==void 0){const a=n[s];a===qN?o+=_0(r[s]):a===$N?o+=ui.transform(r[s]):o+=r[s]}return o}}const YPe=e=>typeof e=="number"?0:ui.test(e)?ui.getAnimatableNone(e):e;function HPe(e){const t=tk(e);return nk(e)(t.map(YPe))}const ys={test:DPe,parse:tk,createTransformer:nk,getAnimatableNone:HPe};function RE(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jPe({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,o=0,s=0;if(!t)r=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=RE(c,a,e+1/3),o=RE(c,a,e),s=RE(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:i}}function Db(e,t){return n=>n>0?t:e}const Zn=(e,t,n)=>e+(t-e)*n,IE=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},KPe=[CE,ql,qh],JPe=e=>KPe.find(t=>t.test(e));function ik(e){const t=JPe(e);if(Jh(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===qh&&(n=jPe(n)),n}const rk=(e,t)=>{const n=ik(e),i=ik(t);if(!n||!i)return Db(e,t);const r={...n};return o=>(r.red=IE(n.red,i.red,o),r.green=IE(n.green,i.green,o),r.blue=IE(n.blue,i.blue,o),r.alpha=Zn(n.alpha,i.alpha,o),ql.transform(r))},ME=new Set(["none","hidden"]);function QPe(e,t){return ME.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qPe(e,t){return n=>Zn(e,t,n)}function LE(e){return typeof e=="number"?qPe:typeof e=="string"?xE(e)?Db:ui.test(e)?rk:tOe:Array.isArray(e)?ok:typeof e=="object"?ui.test(e)?rk:$Pe:Db}function ok(e,t){const n=[...e],i=n.length,r=e.map((o,s)=>LE(o)(o,t[s]));return o=>{for(let s=0;s<i;s++)n[s]=r[s](o);return n}}function $Pe(e,t){const n={...e,...t},i={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(i[r]=LE(e[r])(e[r],t[r]));return r=>{for(const o in i)n[o]=i[o](r);return n}}function eOe(e,t){const n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],s=e.indexes[o][i[o]],a=e.values[s]??0;n[r]=a,i[o]++}return n}const tOe=(e,t)=>{const n=ys.createTransformer(t),i=w0(e),r=w0(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?ME.has(e)&&!r.values.length||ME.has(t)&&!i.values.length?QPe(e,t):m0(ok(eOe(i,r),r.values),n):(Jh(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Db(e,t))};function sk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Zn(e,t,n):LE(e)(e,t)}const nOe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Tn.update(t,n),stop:()=>Bc(t),now:()=>Xi.isProcessing?Xi.timestamp:wr.now()}},ak=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)i+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Ub=2e4;function PE(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Ub;)t+=n,i=e.next(t);return t>=Ub?1/0:t}function iOe(e,t=100,n){const i=n({...e,keyframes:[0,t]}),r=Math.min(PE(i),Ub);return{type:"keyframes",ease:o=>i.next(r*o).value/t,duration:Xo(r)}}const rOe=5;function ck(e,t,n){const i=Math.max(t-rOe,0);return ON(n-e(i),t-i)}const Dn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},OE=.001;function oOe({duration:e=Dn.duration,bounce:t=Dn.bounce,velocity:n=Dn.velocity,mass:i=Dn.mass}){let r,o;Jh(e<=ko(Dn.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=ia(Dn.minDamping,Dn.maxDamping,s),e=ia(Dn.minDuration,Dn.maxDuration,Xo(e)),s<1?(r=l=>{const u=l*s,h=u*e,d=u-n,f=GE(l,s),p=Math.exp(-h);return OE-d/f*p},o=l=>{const h=l*s*e,d=h*n+n,f=Math.pow(s,2)*Math.pow(l,2)*e,p=Math.exp(-h),m=GE(Math.pow(l,2),s);return(-r(l)+OE>0?-1:1)*((d-f)*p)/m}):(r=l=>{const u=Math.exp(-l*e),h=(l-n)*e+1;return-OE+u*h},o=l=>{const u=Math.exp(-l*e),h=(n-l)*(e*e);return u*h});const a=5/e,c=aOe(r,o,a);if(e=ko(e),isNaN(c))return{stiffness:Dn.stiffness,damping:Dn.damping,duration:e};{const l=Math.pow(c,2)*i;return{stiffness:l,damping:s*2*Math.sqrt(i*l),duration:e}}}const sOe=12;function aOe(e,t,n){let i=n;for(let r=1;r<sOe;r++)i=i-e(i)/t(i);return i}function GE(e,t){return e*Math.sqrt(1-t*t)}const cOe=["duration","bounce"],lOe=["stiffness","damping","mass"];function lk(e,t){return t.some(n=>e[n]!==void 0)}function uOe(e){let t={velocity:Dn.velocity,stiffness:Dn.stiffness,damping:Dn.damping,mass:Dn.mass,isResolvedFromDuration:!1,...e};if(!lk(e,lOe)&&lk(e,cOe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,o=2*ia(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Dn.mass,stiffness:r,damping:o}}else{const n=oOe({...e,velocity:0});t={...t,...n,mass:Dn.mass},t.isResolvedFromDuration=!0}return t}function Wb(e=Dn.visualDuration,t=Dn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=uOe({...n,velocity:-Xo(n.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(c*u)),y=s-o,g=Xo(Math.sqrt(c/u)),v=Math.abs(y)<5;i||(i=v?Dn.restSpeed.granular:Dn.restSpeed.default),r||(r=v?Dn.restDelta.granular:Dn.restDelta.default);let S;if(m<1){const C=GE(g,m);S=O=>{const V=Math.exp(-m*g*O);return s-V*((p+m*g*y)/C*Math.sin(C*O)+y*Math.cos(C*O))}}else if(m===1)S=C=>s-Math.exp(-g*C)*(y+(p+g*y)*C);else{const C=g*Math.sqrt(m*m-1);S=O=>{const V=Math.exp(-m*g*O),A=Math.min(C*O,300);return s-V*((p+m*g*y)*Math.sinh(A)+C*y*Math.cosh(A))/C}}const E={calculatedDuration:f&&h||null,next:C=>{const O=S(C);if(f)a.done=C>=h;else{let V=C===0?p:0;m<1&&(V=C===0?ko(p):ck(S,C,O));const A=Math.abs(V)<=i,G=Math.abs(s-O)<=r;a.done=A&&G}return a.value=a.done?s:O,a},toString:()=>{const C=Math.min(PE(E),Ub),O=ak(V=>E.next(C*V).value,C,30);return C+"ms "+O},toTransition:()=>{}};return E}Wb.applyToOptions=e=>{const t=iOe(e,100,Wb);return e.ease=t.ease,e.duration=ko(t.duration),e.type="keyframes",e};function VE({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=e[0],d={done:!1,value:h},f=A=>a!==void 0&&A<a||c!==void 0&&A>c,p=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let m=n*t;const y=h+m,g=s===void 0?y:s(y);g!==y&&(m=g-h);const v=A=>-m*Math.exp(-A/i),S=A=>g+v(A),E=A=>{const G=v(A),N=S(A);d.done=Math.abs(G)<=l,d.value=d.done?g:N};let C,O;const V=A=>{f(d.value)&&(C=A,O=Wb({keyframes:[d.value,p(d.value)],velocity:ck(S,A,d.value),damping:r,stiffness:o,restDelta:l,restSpeed:u}))};return V(0),{calculatedDuration:null,next:A=>{let G=!1;return!O&&C===void 0&&(G=!0,E(A),V(A)),C!==void 0&&A>=C?O.next(A-C):(!G&&E(A),d)}}}function hOe(e,t,n){const i=[],r=n||Wa.mix||sk,o=e.length-1;for(let s=0;s<o;s++){let a=r(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||No:t;a=m0(c,a)}i.push(a)}return i}function dOe(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(Ua(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=hOe(t,i,r),c=a.length,l=u=>{if(s&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const d=g0(e[h],e[h+1],u);return a[h](d)};return n?u=>l(ia(e[0],e[o-1],u)):l}function fOe(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=g0(0,t,i);e.push(Zn(n,1,r))}}function pOe(e){const t=[0];return fOe(t,e.length-1),t}function mOe(e,t){return e.map(n=>n*t)}function gOe(e,t){return e.map(()=>t||DN).splice(0,e.length-1)}function $h({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=IPe(i)?i.map(BN):BN(i),o={done:!1,value:t[0]},s=mOe(n&&n.length===t.length?n:pOe(t),e),a=dOe(s,t,{ease:Array.isArray(r)?r:gOe(t,r)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const yOe=e=>e!==null;function FE(e,{repeat:t,repeatType:n="loop"},i,r=1){const o=e.filter(yOe),a=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const bOe={decay:VE,inertia:VE,tween:$h,keyframes:$h,spring:Wb};function uk(e){typeof e.type=="string"&&(e.type=bOe[e.type])}class AE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const _Oe=e=>e/100;class zE extends AE{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==wr.now()&&this.tick(wr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;uk(t);const{type:n=$h,repeat:i=0,repeatDelay:r=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const c=n||$h;process.env.NODE_ENV!=="production"&&c!==$h&&Ua(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==$h&&typeof a[0]!="number"&&(this.mixKeyframes=m0(_Oe,sk(a[0],a[1])),a=[0,100]);const l=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-s})),l.calculatedDuration===null&&(l.calculatedDuration=PE(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:r,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let S=this.currentTime,E=i;if(h){const A=Math.min(this.currentTime,r)/a;let G=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&G--,G=Math.min(G,h+1),G%2&&(d==="reverse"?(N=1-N,f&&(N-=f/a)):d==="mirror"&&(E=s)),S=ia(0,1,N)*a}const C=v?{done:!1,value:u[0]}:E.next(S);o&&!v&&(C.value=o(C.value));let{done:O}=C;!v&&c!==null&&(O=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return V&&p!==VE&&(C.value=FE(u,this.options,y,this.speed)),m&&m(C.value),V&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Xo(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xo(t)}get time(){return Xo(this.currentTime)}set time(t){t=ko(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(wr.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Xo(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=nOe,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(wr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function vOe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const $l=e=>e*180/Math.PI,NE=e=>{const t=$l(Math.atan2(e[1],e[0]));return kE(t)},wOe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:NE,rotateZ:NE,skewX:e=>$l(Math.atan(e[1])),skewY:e=>$l(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},kE=e=>(e=e%360,e<0&&(e+=360),e),hk=NE,dk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xOe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dk,scaleY:fk,scale:e=>(dk(e)+fk(e))/2,rotateX:e=>kE($l(Math.atan2(e[6],e[5]))),rotateY:e=>kE($l(Math.atan2(-e[2],e[0]))),rotateZ:hk,rotate:hk,skewX:e=>$l(Math.atan(e[4])),skewY:e=>$l(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function XE(e){return e.includes("scale")?1:0}function ZE(e,t){if(!e||e==="none")return XE(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=xOe,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=wOe,r=a}if(!r)return XE(t);const o=i[t],s=r[1].split(",").map(EOe);return typeof o=="function"?o(s):s[o]}const SOe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ZE(n,t)};function EOe(e){return parseFloat(e.trim())}const ed=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],td=new Set(ed),pk=e=>e===Qh||e===at,TOe=new Set(["x","y","z"]),COe=ed.filter(e=>!TOe.has(e));function ROe(e){const t=[];return COe.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Hc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ZE(t,"x"),y:(e,{transform:t})=>ZE(t,"y")};Hc.translateX=Hc.x,Hc.translateY=Hc.y;const eu=new Set;let DE=!1,UE=!1,WE=!1;function mk(){if(UE){const e=Array.from(eu).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=ROe(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([o,s])=>{i.getValue(o)?.set(s)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}UE=!1,DE=!1,eu.forEach(e=>e.complete(WE)),eu.clear()}function gk(){eu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(UE=!0)})}function IOe(){WE=!0,gk(),mk(),WE=!1}class BE{constructor(t,n,i,r,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(eu.add(this),DE||(DE=!0,Tn.read(gk),Tn.resolveKeyframes(mk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;if(t[0]===null){const o=r?.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),r&&o===void 0&&r.set(t[0])}vOe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),eu.delete(this)}cancel(){this.state==="scheduled"&&(eu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const MOe=e=>e.startsWith("--");function yk(e,t,n){MOe(t)?e.style.setProperty(t,n):e.style[t]=n}const LOe={};function bk(e,t){const n=PN(e);return()=>LOe[t]??n()}const POe=bk(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_k=bk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),x0=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,vk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:x0([0,.65,.55,1]),circOut:x0([.55,0,1,.45]),backIn:x0([.31,.01,.66,-.59]),backOut:x0([.33,1.53,.69,.99])};function wk(e,t){if(e)return typeof e=="function"?_k()?ak(e,t):"ease-out":UN(e)?x0(e):Array.isArray(e)?e.map(n=>wk(n,t)||vk.easeOut):vk[e]}function OOe(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const h=wk(a,r);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),e.animate(u,d)}function xk(e){return typeof e=="function"&&"applyToOptions"in e}function GOe({type:e,...t}){return xk(e)&&_k()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Sk extends AE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:r,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,Ua(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=GOe(t);this.animation=OOe(n,i,r,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=FE(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),yk(n,i,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Xo(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xo(t)}get time(){return Xo(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ko(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&POe()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),No):r(this)}}const Ek={anticipate:kN,backInOut:NN,circInOut:ZN};function VOe(e){return e in Ek}function FOe(e){typeof e.ease=="string"&&VOe(e.ease)&&(e.ease=Ek[e.ease])}const YE=10;class AOe extends Sk{constructor(t){FOe(t),uk(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:r,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new zE({...s,autoplay:!1}),c=Math.max(YE,wr.now()-this.startTime),l=ia(0,YE,c-YE),u=a.sample(c).value,{name:h}=this.options;o&&h&&yk(o,h,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const Tk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ys.test(e)||e==="0")&&!e.startsWith("url("));function zOe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function NOe(e,t,n,i){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=Tk(r,t),a=Tk(o,t);return Jh(s===a,`You are trying to animate ${t} from "${r}" to "${o}". "${s?o:r}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:zOe(e)||(n==="spring"||xk(n))&&i}function HE(e){e.duration=0,e.type="keyframes"}const kOe=new Set(["opacity","clipPath","filter","transform"]),XOe=PN(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ZOe(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return XOe()&&n&&kOe.has(n)&&(n!=="transform"||!l)&&!c&&!i&&r!=="mirror"&&o!==0&&s!=="inertia"}const DOe=40;class UOe extends AE{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wr.now();const d={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:o,repeatType:s,name:c,motionValue:l,element:u,...h},f=u?.KeyframeResolver||BE;this.keyframeResolver=new f(a,(p,m,y)=>this.onKeyframesResolved(p,m,d,!y),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,r){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:l,onUpdate:u}=i;this.resolvedAt=wr.now(),NOe(t,o,s,a)||((Wa.instantAnimations||!c)&&u?.(FE(t,i,n)),t[0]=t[t.length-1],HE(i),i.repeat=0);const d={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>DOe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},f=!l&&ZOe(d),p=d.motionValue?.owner?.current,m=f?new AOe({...d,element:p}):new zE(d);m.finished.then(()=>{this.notifyFinished()}).catch(No),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),IOe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ck(e,t,n,i=0,r=1){const o=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*i;return typeof n=="function"?n(o,s):r===1?o*i:a-o*i}const WOe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BOe(e){const t=WOe.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}const YOe=4;function Rk(e,t,n=1){Ua(n<=YOe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,r]=BOe(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const s=o.trim();return IN(s)?parseFloat(s):s}return xE(r)?Rk(r,t,n+1):r}const HOe={type:"spring",stiffness:500,damping:25,restSpeed:10},jOe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KOe={type:"keyframes",duration:.8},JOe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},QOe=(e,{keyframes:t})=>t.length>2?KOe:td.has(e)?e.startsWith("scale")?jOe(t[1]):HOe:JOe,qOe=e=>e!==null;function $Oe(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(qOe),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}function Ik(e,t){if(e?.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function jE(e,t){const n=e?.[t]??e?.default??e;return n!==e?Ik(n,e):n}function eGe({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const KE=(e,t,n,i={},r,o)=>s=>{const a=jE(i,e)||{},c=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-ko(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};eGe(a)||Object.assign(u,QOe(e,u)),u.duration&&(u.duration=ko(u.duration)),u.repeatDelay&&(u.repeatDelay=ko(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(HE(u),u.delay===0&&(h=!0)),(Wa.instantAnimations||Wa.skipAnimations||r?.shouldSkipAnimations)&&(h=!0,HE(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&t.get()!==void 0){const d=$Oe(u.keyframes,a);if(d!==void 0){Tn.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new zE(u):new UOe(u)};function Mk(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function JE(e,t,n,i){if(typeof t=="function"){const[r,o]=Mk(i);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=Mk(i);t=t(n!==void 0?n:e.custom,r,o)}return t}function nd(e,t,n){const i=e.getProps();return JE(i,t,n!==void 0?n:i.custom,e)}const Lk=new Set(["width","height","top","left","right","bottom",...ed]),Pk=30,tGe=e=>!isNaN(parseFloat(e));class nGe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=wr.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=wr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tGe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&bE(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yE);const i=this.events[t].add(n);return t==="change"?()=>{i(),Tn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=wr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pk);return ON(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tu(e,t){return new nGe(e,t)}const QE=e=>Array.isArray(e);function iGe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tu(n))}function rGe(e){return QE(e)?e[e.length-1]||0:e}function oGe(e,t){const n=nd(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o){const a=rGe(o[s]);iGe(e,s,a)}}const ir=e=>!!(e&&e.getVelocity);function sGe(e){return!!(ir(e)&&e.add)}function qE(e,t){const n=e.getValue("willChange");if(sGe(n))return n.add(t);if(!n&&Wa.WillChange){const i=new Wa.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function $E(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ok="data-"+$E("framerAppearId");function Gk(e){return e.props[Ok]}function aGe({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Vk(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o,transitionEnd:s,...a}=t;const c=e.getDefaultTransition();o=o?Ik(o,c):c;const l=o?.reduceMotion;i&&(o=i);const u=[],h=r&&e.animationState&&e.animationState.getState()[r];for(const d in a){const f=e.getValue(d,e.latestValues[d]??null),p=a[d];if(p===void 0||h&&aGe(h,d))continue;const m={delay:n,...jE(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===y&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const E=Gk(e);if(E){const C=window.MotionHandoffAnimation(E,d,Tn);C!==null&&(m.startTime=C,g=!0)}}qE(e,d);const v=l??e.shouldReduceMotion;f.start(KE(d,f,p,v&&Lk.has(d)?{type:!1}:m,e,g));const S=f.animation;S&&u.push(S)}if(s){const d=()=>Tn.update(()=>{s&&oGe(e,s)});u.length?Promise.all(u).then(d):d()}return u}function eT(e,t,n={}){const i=nd(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(Vk(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:h}=r;return cGe(e,t,c,l,u,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,l]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function cGe(e,t,n=0,i=0,r=0,o=1,s){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(eT(c,t,{...s,delay:n+(typeof i=="function"?0:i)+Ck(e.variantChildren,c,i,r,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function lGe(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(o=>eT(e,o,n));i=Promise.all(r)}else if(typeof t=="string")i=eT(e,t,n);else{const r=typeof t=="function"?nd(e,t,n.custom):t;i=Promise.all(Vk(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const uGe={test:e=>e==="auto",parse:e=>e},Fk=e=>t=>t.test(e),Ak=[Qh,at,ra,Yc,XPe,kPe,uGe],zk=e=>Ak.find(Fk(e));function hGe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||LN(e):!0}const dGe=new Set(["brightness","contrast","saturate","opacity"]);function fGe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(SE)||[];if(!i)return e;const r=n.replace(i,"");let o=dGe.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const pGe=/\b([a-z-]*)\(.*?\)/gu,tT={...ys,getAnimatableNone:e=>{const t=e.match(pGe);return t?t.map(fGe).join(" "):e}},nT={...ys,getAnimatableNone:e=>{const t=ys.parse(e);return ys.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Nk={...Qh,transform:Math.round},iT={borderWidth:at,borderTopWidth:at,borderRightWidth:at,borderBottomWidth:at,borderLeftWidth:at,borderRadius:at,borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomRightRadius:at,borderBottomLeftRadius:at,width:at,maxWidth:at,height:at,maxHeight:at,top:at,right:at,bottom:at,left:at,inset:at,insetBlock:at,insetBlockStart:at,insetBlockEnd:at,insetInline:at,insetInlineStart:at,insetInlineEnd:at,padding:at,paddingTop:at,paddingRight:at,paddingBottom:at,paddingLeft:at,paddingBlock:at,paddingBlockStart:at,paddingBlockEnd:at,paddingInline:at,paddingInlineStart:at,paddingInlineEnd:at,margin:at,marginTop:at,marginRight:at,marginBottom:at,marginLeft:at,marginBlock:at,marginBlockStart:at,marginBlockEnd:at,marginInline:at,marginInlineStart:at,marginInlineEnd:at,fontSize:at,backgroundPositionX:at,backgroundPositionY:at,...{rotate:Yc,rotateX:Yc,rotateY:Yc,rotateZ:Yc,scale:Zb,scaleX:Zb,scaleY:Zb,scaleZ:Zb,skew:Yc,skewX:Yc,skewY:Yc,distance:at,translateX:at,translateY:at,translateZ:at,x:at,y:at,z:at,perspective:at,transformPerspective:at,opacity:b0,originX:QN,originY:QN,originZ:at},zIndex:Nk,fillOpacity:b0,strokeOpacity:b0,numOctaves:Nk},mGe={...iT,color:ui,backgroundColor:ui,outlineColor:ui,fill:ui,stroke:ui,borderColor:ui,borderTopColor:ui,borderRightColor:ui,borderBottomColor:ui,borderLeftColor:ui,filter:tT,WebkitFilter:tT,mask:nT,WebkitMask:nT},kk=e=>mGe[e],gGe=new Set([tT,nT]);function Xk(e,t){let n=kk(e);return gGe.has(n)||(n=ys),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yGe=new Set(["auto","none","0"]);function bGe(e,t,n){let i=0,r;for(;i<e.length&&!r;){const o=e[i];typeof o=="string"&&!yGe.has(o)&&w0(o).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=Xk(n,r)}class _Ge extends BE{constructor(t,n,i,r,o){super(t,n,i,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),xE(h))){const d=Rk(h,n.current);d!==void 0&&(t[u]=d),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Lk.has(i)||t.length!==2)return;const[r,o]=t,s=zk(r),a=zk(o),c=KN(r),l=KN(o);if(c!==l&&Hc[i]){this.needsMeasurement=!0;return}if(s!==a)if(pk(s)&&pk(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else Hc[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||hGe(t[r]))&&i.push(r);i.length&&bGe(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Hc[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Hc[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const vGe=new Set(["opacity","clipPath","filter","transform"]);function Zk(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const r=n?.[e]??i.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(i=>i!=null)}const Dk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function wGe(e){return MN(e)&&"offsetHeight"in e}const{schedule:rT}=YN(queueMicrotask,!1),bs={x:!1,y:!1};function Uk(){return bs.x||bs.y}function xGe(e){return e==="x"||e==="y"?bs[e]?null:(bs[e]=!0,()=>{bs[e]=!1}):bs.x||bs.y?null:(bs.x=bs.y=!0,()=>{bs.x=bs.y=!1})}function Wk(e,t){const n=Zk(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function SGe(e){return!(e.pointerType==="touch"||Uk())}function EGe(e,t,n={}){const[i,r,o]=Wk(e,n);return i.forEach(s=>{let a=!1,c=!1,l;const u=()=>{s.removeEventListener("pointerleave",p)},h=y=>{l&&(l(y),l=void 0),u()},d=y=>{a=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),c&&(c=!1,h(y))},f=()=>{a=!0,window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",d,r)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}h(y)}},m=y=>{if(!SGe(y))return;c=!1;const g=t(s,y);typeof g=="function"&&(l=g,s.addEventListener("pointerleave",p,r))};s.addEventListener("pointerenter",m,r),s.addEventListener("pointerdown",f,r)}),o}const Bk=(e,t)=>t?e===t?!0:Bk(e,t.parentElement):!1,oT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TGe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function CGe(e){return TGe.has(e.tagName)||e.isContentEditable===!0}const RGe=new Set(["INPUT","SELECT","TEXTAREA"]);function IGe(e){return RGe.has(e.tagName)||e.isContentEditable===!0}const Bb=new WeakSet;function Yk(e){return t=>{t.key==="Enter"&&e(t)}}function sT(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const MGe=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Yk(()=>{if(Bb.has(n))return;sT(n,"down");const r=Yk(()=>{sT(n,"up")}),o=()=>sT(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Hk(e){return oT(e)&&!Uk()}const jk=new WeakSet;function LGe(e,t,n={}){const[i,r,o]=Wk(e,n),s=a=>{const c=a.currentTarget;if(!Hk(a)||jk.has(a))return;Bb.add(c),n.stopPropagation&&jk.add(a);const l=t(c,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Bb.has(c)&&Bb.delete(c),Hk(f)&&typeof l=="function"&&l(f,{success:p})},h=f=>{u(f,c===window||c===document||n.useGlobalTarget||Bk(c,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",d,r)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),wGe(a)&&(a.addEventListener("focus",l=>MGe(l,r)),!CGe(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function aT(e){return MN(e)&&"ownerSVGElement"in e}const Yb=new WeakMap;let Hb;const Kk=(e,t,n)=>(i,r)=>r&&r[0]?r[0][e+"Size"]:aT(i)&&"getBBox"in i?i.getBBox()[t]:i[n],PGe=Kk("inline","width","offsetWidth"),OGe=Kk("block","height","offsetHeight");function GGe({target:e,borderBoxSize:t}){Yb.get(e)?.forEach(n=>{n(e,{get width(){return PGe(e,t)},get height(){return OGe(e,t)}})})}function VGe(e){e.forEach(GGe)}function FGe(){typeof ResizeObserver>"u"||(Hb=new ResizeObserver(VGe))}function AGe(e,t){Hb||FGe();const n=Zk(e);return n.forEach(i=>{let r=Yb.get(i);r||(r=new Set,Yb.set(i,r)),r.add(t),Hb?.observe(i)}),()=>{n.forEach(i=>{const r=Yb.get(i);r?.delete(t),r?.size||Hb?.unobserve(i)})}}const jb=new Set;let id;function zGe(){id=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};jb.forEach(t=>t(e))},window.addEventListener("resize",id)}function NGe(e){return jb.add(e),id||zGe(),()=>{jb.delete(e),!jb.size&&typeof id=="function"&&(window.removeEventListener("resize",id),id=void 0)}}function Jk(e,t){return typeof e=="function"?NGe(e):AGe(e,t)}function kGe(e){return aT(e)&&e.tagName==="svg"}const XGe=[...Ak,ui,ys],ZGe=e=>XGe.find(Fk(e)),Qk=()=>({translate:0,scale:1,origin:0,originPoint:0}),rd=()=>({x:Qk(),y:Qk()}),qk=()=>({min:0,max:0}),_i=()=>({x:qk(),y:qk()}),DGe=new WeakMap;function Kb(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function S0(e){return typeof e=="string"||Array.isArray(e)}const cT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lT=["initial",...cT];function Jb(e){return Kb(e.animate)||lT.some(t=>S0(e[t]))}function $k(e){return!!(Jb(e)||e.variants)}function UGe(e,t,n){for(const i in t){const r=t[i],o=n[i];if(ir(r))e.addValue(i,r);else if(ir(o))e.addValue(i,tu(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const s=e.getValue(i);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=e.getStaticValue(i);e.addValue(i,tu(s!==void 0?s:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const uT={current:null},eX={current:!1},WGe=typeof window<"u";function BGe(){if(eX.current=!0,!!WGe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uT.current=e.matches;e.addEventListener("change",t),t()}else uT.current=!1}const tX=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Qb={};function nX(e){Qb=e}function YGe(){return Qb}class HGe{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=BE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=wr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Tn.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Jb(n),this.isVariantNode=$k(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&ir(p)&&p.set(l[f])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,DGe.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(eX.current||BGe(),this.shouldReduceMotion=uT.current),process.env.NODE_ENV!=="production"&&bE(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Bc(this.notifyUpdate),Bc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&vGe.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,h=new Sk({element:this.current,name:t,keyframes:a,times:c,ease:l,duration:ko(u)}),d=s(h);this.valueSubscriptions.set(t,()=>{d(),h.cancel()});return}const i=td.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Tn.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Qb){const n=Qb[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_i()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<tX.length;i++){const r=tX[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,s=t[o];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=UGe(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=tu(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(IN(i)||LN(i))?i=parseFloat(i):!ZGe(i)&&ys.test(n)&&(i=Xk(t,n)),this.setBaseTarget(t,ir(i)?i.get():i)),ir(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=JE(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ir(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yE),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rT.render(this.render)}}class iX extends HGe{constructor(){super(...arguments),this.KeyframeResolver=_Ge}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ir(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jc{constructor(t){this.isMounted=!1,this.node=t}update(){}}function rX({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function jGe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function KGe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function hT(e){return e===void 0||e===1}function dT({scale:e,scaleX:t,scaleY:n}){return!hT(e)||!hT(t)||!hT(n)}function nu(e){return dT(e)||oX(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function oX(e){return sX(e.x)||sX(e.y)}function sX(e){return e&&e!=="0%"}function qb(e,t,n){const i=e-n,r=t*i;return n+r}function aX(e,t,n,i,r){return r!==void 0&&(e=qb(e,r,i)),qb(e,n,i)+t}function fT(e,t=0,n=1,i,r){e.min=aX(e.min,t,n,i,r),e.max=aX(e.max,t,n,i,r)}function cX(e,{x:t,y:n}){fT(e.x,t.translate,t.scale,t.originPoint),fT(e.y,n.translate,n.scale,n.originPoint)}const lX=.999999999999,uX=1.0000000000001;function JGe(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,s;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&sd(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,cX(e,s)),i&&nu(o.latestValues)&&sd(e,o.latestValues))}t.x<uX&&t.x>lX&&(t.x=1),t.y<uX&&t.y>lX&&(t.y=1)}function od(e,t){e.min=e.min+t,e.max=e.max+t}function hX(e,t,n,i,r=.5){const o=Zn(e.min,e.max,r);fT(e,t,n,o,i)}function dX(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function sd(e,t){hX(e.x,dX(t.x,e.x),t.scaleX,t.scale,t.originX),hX(e.y,dX(t.y,e.y),t.scaleY,t.scale,t.originY)}function fX(e,t){return rX(KGe(e.getBoundingClientRect(),t))}function QGe(e,t,n){const i=fX(e,n),{scroll:r}=t;return r&&(od(i.x,r.offset.x),od(i.y,r.offset.y)),i}const qGe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$Ge=ed.length;function eVe(e,t,n){let i="",r=!0;for(let o=0;o<$Ge;o++){const s=ed[o],a=e[s];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(s.startsWith("scale")?1:0);else{const l=parseFloat(a);c=s.startsWith("scale")?l===1:l===0}if(!c||n){const l=Dk(a,iT[s]);if(!c){r=!1;const u=qGe[s]||s;i+=`${u}(${l}) `}n&&(t[s]=l)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}function pT(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const c in t){const l=t[c];if(td.has(c)){s=!0;continue}else if(jN(c)){r[c]=l;continue}else{const u=Dk(l,iT[c]);c.startsWith("origin")?(a=!0,o[c]=u):i[c]=u}}if(t.transform||(s||n?i.transform=eVe(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;i.transformOrigin=`${c} ${l} ${u}`}}function pX(e,{style:t,vars:n},i,r){const o=e.style;let s;for(s in t)o[s]=t[s];r?.applyProjectionStyles(o,i);for(s in n)o.setProperty(s,n[s])}function mX(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const E0={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(at.test(e))e=parseFloat(e);else return e;const n=mX(e,t.target.x),i=mX(e,t.target.y);return`${n}% ${i}%`}},tVe={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=ys.parse(e);if(r.length>5)return i;const o=ys.createTransformer(e),s=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=c;const l=Zn(a,c,.5);return typeof r[2+s]=="number"&&(r[2+s]/=l),typeof r[3+s]=="number"&&(r[3+s]/=l),o(r)}},mT={borderRadius:{...E0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E0,borderTopRightRadius:E0,borderBottomLeftRadius:E0,borderBottomRightRadius:E0,boxShadow:tVe};function gX(e,{layout:t,layoutId:n}){return td.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mT[e]||e==="opacity")}function gT(e,t,n){const i=e.style,r=t?.style,o={};if(!i)return o;for(const s in i)(ir(i[s])||r&&ir(r[s])||gX(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=i[s]);return o}function nVe(e){return window.getComputedStyle(e)}class iVe extends iX{constructor(){super(...arguments),this.type="html",this.renderInstance=pX}readValueFromInstance(t,n){if(td.has(n))return this.projection?.isProjecting?XE(n):SOe(t,n);{const i=nVe(t),r=(jN(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return fX(t,n)}build(t,n,i){pT(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return gT(t,n,i)}}const rVe={offset:"stroke-dashoffset",array:"stroke-dasharray"},oVe={offset:"strokeDashoffset",array:"strokeDasharray"};function sVe(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?rVe:oVe;e[o.offset]=`${-i}`,e[o.array]=`${t} ${n}`}const aVe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yX(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:s=0,...a},c,l,u){if(pT(e,a,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d}=e;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const f of aVe)h[f]!==void 0&&(d[f]=h[f],delete h[f]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),r!==void 0&&sVe(h,r,o,s,!1)}const bX=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),_X=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cVe(e,t,n,i){pX(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(bX.has(r)?r:$E(r),t.attrs[r])}function vX(e,t,n){const i=gT(e,t,n);for(const r in e)if(ir(e[r])||ir(t[r])){const o=ed.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[o]=e[r]}return i}class lVe extends iX{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_i}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(td.has(n)){const i=kk(n);return i&&i.default||0}return n=bX.has(n)?n:$E(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return vX(t,n,i)}build(t,n,i){yX(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,r){cVe(t,n,i,r)}mount(t){this.isSVGTag=_X(t.tagName),super.mount(t)}}const uVe=lT.length;function wX(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?wX(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uVe;n++){const i=lT[n],r=e.props[i];(S0(r)||r===!1)&&(t[i]=r)}return t}function xX(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const hVe=[...cT].reverse(),dVe=cT.length;function fVe(e){return t=>Promise.all(t.map(({animation:n,options:i})=>lGe(e,n,i)))}function pVe(e){let t=fVe(e),n=SX(),i=!0,r=!1;const o=l=>(u,h)=>{const d=nd(e,h,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,h=wX(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let g=0;g<dVe;g++){const v=hVe[g],S=n[v],E=u[v]!==void 0?u[v]:h[v],C=S0(E),O=v===l?S.isActive:null;O===!1&&(m=g);let V=E===h[v]&&E!==u[v]&&C;if(V&&(i||r)&&e.manuallyAnimateOnMount&&(V=!1),S.protectedKeys={...p},!S.isActive&&O===null||!E&&!S.prevProp||Kb(E)||typeof E=="boolean")continue;if(v==="exit"&&S.isActive&&O!==!0){S.prevResolvedValues&&(p={...p,...S.prevResolvedValues});continue}const A=mVe(S.prevProp,E);let G=A||v===l&&S.isActive&&!V&&C||g>m&&C,N=!1;const k=Array.isArray(E)?E:[E];let P=k.reduce(o(v),{});O===!1&&(P={});const{prevResolvedValues:w={}}=S,x={...w,...P},I=Y=>{G=!0,f.has(Y)&&(N=!0,f.delete(Y)),S.needsAnimating[Y]=!0;const H=e.getValue(Y);H&&(H.liveStyle=!1)};for(const Y in x){const H=P[Y],J=w[Y];if(p.hasOwnProperty(Y))continue;let z=!1;QE(H)&&QE(J)?z=!xX(H,J):z=H!==J,z?H!=null?I(Y):f.add(Y):H!==void 0&&f.has(Y)?I(Y):S.protectedKeys[Y]=!0}S.prevProp=E,S.prevResolvedValues=P,S.isActive&&(p={...p,...P}),(i||r)&&e.blockInitialAnimation&&(G=!1);const X=V&&A;G&&(!X||N)&&d.push(...k.map(Y=>{const H={type:v};if(typeof Y=="string"&&(i||r)&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,z=nd(J,Y);if(J.enteringChildren&&z){const{delayChildren:W}=z.transition||{};H.delay=Ck(J.enteringChildren,e,W)}}return{animation:Y,options:H}}))}if(f.size){const g={};if(typeof u.initial!="boolean"){const v=nd(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{const S=e.getBaseTarget(v),E=e.getValue(v);E&&(E.liveStyle=!0),g[v]=S??null}),d.push({animation:g})}let y=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),i=!1,r=!1,y?t(d):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const h=a(l);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=SX(),r=!0}}}function mVe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xX(t,e):!1}function iu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function SX(){return{animate:iu(!0),whileInView:iu(),whileHover:iu(),whileTap:iu(),whileDrag:iu(),whileFocus:iu(),exit:iu()}}function EX(e,t){e.min=t.min,e.max=t.max}function _s(e,t){EX(e.x,t.x),EX(e.y,t.y)}function TX(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const CX=1e-4,gVe=1-CX,yVe=1+CX,RX=.01,bVe=0-RX,_Ve=0+RX;function xr(e){return e.max-e.min}function vVe(e,t,n){return Math.abs(e-t)<=n}function IX(e,t,n,i=.5){e.origin=i,e.originPoint=Zn(t.min,t.max,e.origin),e.scale=xr(n)/xr(t),e.translate=Zn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gVe&&e.scale<=yVe||isNaN(e.scale))&&(e.scale=1),(e.translate>=bVe&&e.translate<=_Ve||isNaN(e.translate))&&(e.translate=0)}function T0(e,t,n,i){IX(e.x,t.x,n.x,i?i.originX:void 0),IX(e.y,t.y,n.y,i?i.originY:void 0)}function MX(e,t,n){e.min=n.min+t.min,e.max=e.min+xr(t)}function wVe(e,t,n){MX(e.x,t.x,n.x),MX(e.y,t.y,n.y)}function LX(e,t,n){e.min=t.min-n.min,e.max=e.min+xr(t)}function $b(e,t,n){LX(e.x,t.x,n.x),LX(e.y,t.y,n.y)}function PX(e,t,n,i,r){return e-=t,e=qb(e,1/n,i),r!==void 0&&(e=qb(e,1/r,i)),e}function xVe(e,t=0,n=1,i=.5,r,o=e,s=e){if(ra.test(t)&&(t=parseFloat(t),t=Zn(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Zn(o.min,o.max,i);e===o&&(a-=t),e.min=PX(e.min,t,n,a,r),e.max=PX(e.max,t,n,a,r)}function OX(e,t,[n,i,r],o,s){xVe(e,t[n],t[i],t[r],t.scale,o,s)}const SVe=["x","scaleX","originX"],EVe=["y","scaleY","originY"];function GX(e,t,n,i){OX(e.x,t,SVe,n?n.x:void 0,i?i.x:void 0),OX(e.y,t,EVe,n?n.y:void 0,i?i.y:void 0)}function VX(e){return e.translate===0&&e.scale===1}function FX(e){return VX(e.x)&&VX(e.y)}function AX(e,t){return e.min===t.min&&e.max===t.max}function TVe(e,t){return AX(e.x,t.x)&&AX(e.y,t.y)}function zX(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function NX(e,t){return zX(e.x,t.x)&&zX(e.y,t.y)}function kX(e){return xr(e.x)/xr(e.y)}function XX(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function oa(e){return[e("x"),e("y")]}function CVe(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=n;l&&(i=`perspective(${l}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),d&&(i+=`rotateY(${d}deg) `),f&&(i+=`skewX(${f}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const ZX=["TopLeft","TopRight","BottomLeft","BottomRight"],RVe=ZX.length,DX=e=>typeof e=="string"?parseFloat(e):e,UX=e=>typeof e=="number"||at.test(e);function IVe(e,t,n,i,r,o){r?(e.opacity=Zn(0,n.opacity??1,MVe(i)),e.opacityExit=Zn(t.opacity??1,0,LVe(i))):o&&(e.opacity=Zn(t.opacity??1,n.opacity??1,i));for(let s=0;s<RVe;s++){const a=`border${ZX[s]}Radius`;let c=WX(t,a),l=WX(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||UX(c)===UX(l)?(e[a]=Math.max(Zn(DX(c),DX(l),i),0),(ra.test(l)||ra.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=Zn(t.rotate||0,n.rotate||0,i))}function WX(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const MVe=BX(0,.5,XN),LVe=BX(.5,.95,No);function BX(e,t,n){return i=>i<e?0:i>t?1:n(g0(e,t,i))}function PVe(e,t,n){const i=ir(e)?e:tu(e);return i.start(KE("",i,t,n)),i.animation}function C0(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const OVe=(e,t)=>e.depth-t.depth;class GVe{constructor(){this.children=[],this.isDirty=!1}add(t){mE(this.children,t),this.isDirty=!0}remove(t){Nb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(OVe),this.isDirty=!1,this.children.forEach(t)}}function VVe(e,t){const n=wr.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(Bc(i),e(o-t))};return Tn.setup(i,!0),()=>Bc(i)}function e1(e){return ir(e)?e.get():e}class FVe{constructor(){this.members=[]}add(t){mE(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const r=i.instance;(!r||r.isConnected===!1)&&!i.snapshot&&(Nb(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(Nb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=i.options,{layoutDependency:o}=t.options;(r===void 0||r!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const t1={hasAnimatedSinceResize:!0,hasEverUpdated:!1},yT=["","X","Y","Z"],AVe=1e3;let zVe=0;function bT(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function YX(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Tn,!(r||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&YX(i)}function HX({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(s={},a=t?.()){this.id=zVe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XVe),this.nodes.forEach(WVe),this.nodes.forEach(BVe),this.nodes.forEach(ZVe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new GVe)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new yE),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=aT(s)&&!kGe(s),this.instance=s;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;Tn.read(()=>{h=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=VVe(d,250),t1.hasAnimatedSinceResize&&(t1.hasAnimatedSinceResize=!1,this.nodes.forEach(JX)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||l.getDefaultTransition()||JVe,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),g=!this.targetLayout||!NX(this.targetLayout,f),v=!h&&d;if(this.options.layoutRoot||this.resumeFrom||v||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...jE(p,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,v)}else h||JX(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Bc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(YVe),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&YX(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jX);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(KX);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(UVe),this.nodes.forEach(NVe),this.nodes.forEach(kVe)):this.nodes.forEach(KX),this.clearAllSnapshots();const a=wr.now();Xi.delta=ia(0,1e3/60,a-Xi.timestamp),Xi.timestamp=a,Xi.isProcessing=!0,wE.update.process(Xi),wE.preRender.process(Xi),wE.render.process(Xi),Xi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rT.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DVe),this.sharedNodes.forEach(HVe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Tn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Tn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xr(this.snapshot.measuredBox.x)&&!xr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=_i(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!FX(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;s&&this.instance&&(a||nu(this.latestValues)||u)&&(r(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),QVe(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return _i();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(qVe))){const{scroll:l}=this.root;l&&(od(a.x,l.offset.x),od(a.y,l.offset.y))}return a}removeElementScroll(s){const a=_i();if(_s(a,s),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:h}=l;l!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&_s(a,s),od(a.x,u.offset.x),od(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const c=_i();_s(c,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&sd(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nu(u.latestValues)&&sd(c,u.latestValues)}return nu(this.latestValues)&&sd(c,this.latestValues),c}removeTransform(s){const a=_i();_s(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!nu(l.latestValues))continue;dT(l.latestValues)&&l.updateSnapshot();const u=_i(),h=l.measurePageBox();_s(u,h),GX(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return nu(this.latestValues)&&GX(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=Xi.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_i(),this.targetWithTransforms=_i()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wVe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_s(this.target,this.layout.layoutBox),cX(this.target,this.targetDelta)):_s(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||dT(this.parent.latestValues)||oX(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_i(),this.relativeTargetOrigin=_i(),$b(this.relativeTargetOrigin,a,c),_s(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Xi.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;_s(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;JGe(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=_i());const{target:f}=s;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(TX(this.prevProjectionDelta.x,this.projectionDelta.x),TX(this.prevProjectionDelta.y,this.projectionDelta.y)),T0(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!XX(this.projectionDelta.x,this.prevProjectionDelta.x)||!XX(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rd(),this.projectionDelta=rd(),this.projectionDeltaWithTransform=rd()}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},h=rd();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=_i(),f=c?c.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,y=this.getStack(),g=!y||y.members.length<=1,v=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(KVe));this.animationProgress=0;let S;this.mixTargetDelta=E=>{const C=E/1e3;QX(h.x,s.x,C),QX(h.y,s.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($b(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jVe(this.relativeTarget,this.relativeTargetOrigin,d,C),S&&TVe(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=_i()),_s(S,this.relativeTarget)),m&&(this.animationValues=u,IVe(u,l,this.latestValues,C,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Bc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Tn.update(()=>{t1.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=tu(0)),this.motionValue.jump(0,!1),this.currentAnimation=PVe(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(AVe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&nZ(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||_i();const h=xr(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+h;const d=xr(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+d}_s(a,c),sd(a,u),T0(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new FVe),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&bT("z",s,l,this.animationValues);for(let u=0;u<yT.length;u++)bT(`rotate${yT[u]}`,s,l,this.animationValues),bT(`skew${yT[u]}`,s,l,this.animationValues);s.render();for(const u in l)s.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=e1(a?.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=e1(a?.pointerEvents)||""),this.hasProjected&&!nu(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=CVe(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),s.transform=h;const{x:d,y:f}=this.projectionDelta;s.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,l.animationValues?s.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in mT){if(u[p]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:g}=mT[p],v=h==="none"?u[p]:m(u[p],l);if(y){const S=y.length;for(let E=0;E<S;E++)s[y[E]]=v}else g?this.options.visualElement.renderState.vars[p]=v:s[p]=v}this.options.layoutId&&(s.pointerEvents=l===this?e1(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(jX),this.root.sharedNodes.clear()}}}function NVe(e){e.updateLayout()}function kVe(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?oa(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],d=xr(h);h.min=n[u].min,h.max=h.min+d}):nZ(r,t.layoutBox,n)&&oa(u=>{const h=o?t.measuredBox[u]:t.layoutBox[u],d=xr(n[u]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const s=rd();T0(s,n,t.layoutBox);const a=rd();o?T0(a,e.applyTransform(i,!0),t.measuredBox):T0(a,n,t.layoutBox);const c=!FX(s);let l=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:d}=u;if(h&&d){const f=_i();$b(f,t.layoutBox,h.layoutBox);const p=_i();$b(p,n,d.layoutBox),NX(f,p)||(l=!0),u.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=f,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XVe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZVe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DVe(e){e.clearSnapshot()}function jX(e){e.clearMeasurements()}function KX(e){e.isLayoutDirty=!1}function UVe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function JX(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function WVe(e){e.resolveTargetDelta()}function BVe(e){e.calcProjection()}function YVe(e){e.resetSkewAndRotation()}function HVe(e){e.removeLeadSnapshot()}function QX(e,t,n){e.translate=Zn(t.translate,0,n),e.scale=Zn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function qX(e,t,n,i){e.min=Zn(t.min,n.min,i),e.max=Zn(t.max,n.max,i)}function jVe(e,t,n,i){qX(e.x,t.x,n.x,i),qX(e.y,t.y,n.y,i)}function KVe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const JVe={duration:.45,ease:[.4,0,.1,1]},$X=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eZ=$X("applewebkit/")&&!$X("chrome/")?Math.round:No;function tZ(e){e.min=eZ(e.min),e.max=eZ(e.max)}function QVe(e){tZ(e.x),tZ(e.y)}function nZ(e,t,n){return e==="position"||e==="preserve-aspect"&&!vVe(kX(t),kX(n),.2)}function qVe(e){return e!==e.root&&e.scroll?.wasRoot}const $Ve=HX({attachResizeListener:(e,t)=>C0(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),_T={current:void 0},iZ=HX({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_T.current){const e=new $Ve({});e.mount(window),e.setOptions({layoutScroll:!0}),_T.current=e}return _T.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vT=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function e9e(e=!0){const t=R.useContext(pE);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,o=R.useId();R.useEffect(()=>{if(e)return r(o)},[e]);const s=R.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,s]:[!0]}const rZ=R.createContext({strict:!1}),oZ={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let sZ=!1;function t9e(){if(sZ)return;const e={};for(const t in oZ)e[t]={isEnabled:n=>oZ[t].some(i=>!!n[i])};nX(e),sZ=!0}function aZ(){return t9e(),YGe()}function n9e(e){const t=aZ();for(const n in e)t[n]={...t[n],...e[n]};nX(t)}const i9e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function n1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||i9e.has(e)}let cZ=e=>!n1(e);function r9e(e){typeof e=="function"&&(cZ=t=>t.startsWith("on")?!n1(t):e(t))}try{r9e(require("@emotion/is-prop-valid").default)}catch{}function o9e(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(cZ(r)||n===!0&&n1(r)||!t&&!n1(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const i1=R.createContext({});function s9e(e,t){if(Jb(e)){const{initial:n,animate:i}=e;return{initial:n===!1||S0(n)?n:void 0,animate:S0(i)?i:void 0}}return e.inherit!==!1?t:{}}function a9e(e){const{initial:t,animate:n}=s9e(e,R.useContext(i1));return R.useMemo(()=>({initial:t,animate:n}),[lZ(t),lZ(n)])}function lZ(e){return Array.isArray(e)?e.join(" "):e}const wT=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uZ(e,t,n){for(const i in t)!ir(t[i])&&!gX(i,n)&&(e[i]=t[i])}function c9e({transformTemplate:e},t){return R.useMemo(()=>{const n=wT();return pT(n,t,e),Object.assign({},n.vars,n.style)},[t])}function l9e(e,t){const n=e.style||{},i={};return uZ(i,n,e),Object.assign(i,c9e(e,t)),i}function u9e(e,t){const n={},i=l9e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const hZ=()=>({...wT(),attrs:{}});function h9e(e,t,n,i){const r=R.useMemo(()=>{const o=hZ();return yX(o,t,_X(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};uZ(o,e.style,e),r.style={...o,...r.style}}return r}const d9e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function xT(e){return typeof e!="string"||e.includes("-")?!1:!!(d9e.indexOf(e)>-1||/[A-Z]/u.test(e))}function f9e(e,t,n,{latestValues:i},r,o=!1,s){const c=(s??xT(e)?h9e:u9e)(t,i,r,e),l=o9e(t,typeof e=="string",o),u=e!==R.Fragment?{...l,...c,ref:n}:{},{children:h}=t,d=R.useMemo(()=>ir(h)?h.get():h,[h]);return R.createElement(e,{...u,children:d})}function p9e({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:m9e(n,i,r,e),renderState:t()}}function m9e(e,t,n,i){const r={},o=i(e,{});for(const d in o)r[d]=e1(o[d]);let{initial:s,animate:a}=e;const c=Jb(e),l=$k(e);t&&l&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const h=u?a:s;if(h&&typeof h!="boolean"&&!Kb(h)){const d=Array.isArray(h)?h:[h];for(let f=0;f<d.length;f++){const p=JE(e,d[f]);if(p){const{transitionEnd:m,transition:y,...g}=p;for(const v in g){let S=g[v];if(Array.isArray(S)){const E=u?S.length-1:0;S=S[E]}S!==null&&(r[v]=S)}for(const v in m)r[v]=m[v]}}}return r}const dZ=e=>(t,n)=>{const i=R.useContext(i1),r=R.useContext(pE),o=()=>p9e(e,t,i,r);return n?o():RN(o)},g9e=dZ({scrapeMotionValuesFromProps:gT,createRenderState:wT}),y9e=dZ({scrapeMotionValuesFromProps:vX,createRenderState:hZ}),b9e=Symbol.for("motionComponentSymbol");function _9e(e,t,n){const i=R.useRef(n);R.useInsertionEffect(()=>{i.current=n});const r=R.useRef(null);return R.useCallback(o=>{o&&e.onMount?.(o);const s=i.current;if(typeof s=="function")if(o){const a=s(o);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):s(o);else s&&(s.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const fZ=R.createContext({});function ad(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function v9e(e,t,n,i,r,o){const{visualElement:s}=R.useContext(i1),a=R.useContext(rZ),c=R.useContext(pE),l=R.useContext(vT),u=l.reducedMotion,h=l.skipAnimations,d=R.useRef(null),f=R.useRef(!1);i=i||a.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:o}),f.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));const p=d.current,m=R.useContext(fZ);p&&!p.projection&&r&&(p.type==="html"||p.type==="svg")&&w9e(d.current,n,r,m);const y=R.useRef(!1);R.useInsertionEffect(()=>{p&&y.current&&p.update(n,c)});const g=n[Ok],v=R.useRef(!!g&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return wPe(()=>{f.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),R.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),v.current=!1),p.enteringChildren=void 0)}),p}function w9e(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pZ(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!s||a&&ad(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:c,layoutRoot:l})}function pZ(e){if(e)return e.options.allowProjection!==!1?e.projection:pZ(e.parent)}function ST(e,{forwardMotionProps:t=!1,type:n}={},i,r){i&&n9e(i);const o=n?n==="svg":xT(e),s=o?y9e:g9e;function a(l,u){let h;const d={...R.useContext(vT),...l,layoutId:x9e(l)},{isStatic:f}=d,p=a9e(l),m=s(l,f);if(!f&&typeof window<"u"){S9e(d,i);const y=E9e(d);h=y.MeasureLayout,p.visualElement=v9e(e,m,d,r,y.ProjectionNode,o)}return ce.jsxs(i1.Provider,{value:p,children:[h&&p.visualElement?ce.jsx(h,{visualElement:p.visualElement,...d}):null,f9e(e,l,_9e(m,p.visualElement,u),m,f,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=R.forwardRef(a);return c[b9e]=e,c}function x9e({layoutId:e}){const t=R.useContext(CN).id;return t&&e!==void 0?t+"-"+e:e}function S9e(e,t){const n=R.useContext(rZ).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Jh(!1,i,"lazy-strict-mode"):Ua(!1,i,"lazy-strict-mode")}}function E9e(e){const t=aZ(),{drag:n,layout:i}=t;if(!n&&!i)return{};const r={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function T9e(e,t){if(typeof Proxy>"u")return ST;const n=new Map,i=(o,s)=>ST(o,s,e,t),r=(o,s)=>(process.env.NODE_ENV!=="production"&&bE(!1,"motion() is deprecated. Use motion.create() instead."),i(o,s));return new Proxy(r,{get:(o,s)=>s==="create"?i:(n.has(s)||n.set(s,ST(s,void 0,e,t)),n.get(s))})}const C9e=(e,t)=>t.isSVG??xT(e)?new lVe(t):new iVe(t,{allowProjection:e!==R.Fragment});class R9e extends jc{constructor(t){super(t),t.animationState||(t.animationState=pVe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kb(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let I9e=0;class M9e extends jc{constructor(){super(...arguments),this.id=I9e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const L9e={animation:{Feature:R9e},exit:{Feature:M9e}};function R0(e){return{point:{x:e.pageX,y:e.pageY}}}const P9e=e=>t=>oT(t)&&e(t,R0(t));function I0(e,t,n,i){return C0(e,t,P9e(n),i)}const mZ=({current:e})=>e?e.ownerDocument.defaultView:null,gZ=(e,t)=>Math.abs(e-t);function O9e(e,t){const n=gZ(e.x,t.x),i=gZ(e.y,t.y);return Math.sqrt(n**2+i**2)}const yZ=new Set(["auto","scroll"]);class bZ{constructor(t,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=TT(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=O9e(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:y}=f,{timestamp:g}=Xi;this.history.push({...y,timestamp:g});const{onStart:v,onMove:S}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ET(p,this.transformPagePoint),Tn.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=TT(f.type==="pointercancel"?this.lastMoveEventInfo:ET(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),y&&y(f,v)},!oT(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=r||window;const c=R0(t),l=ET(c,this.transformPagePoint),{point:u}=l,{timestamp:h}=Xi;this.history=[{...u,timestamp:h}];const{onSessionStart:d}=n;d&&d(t,TT(l,this.history)),this.removeListeners=m0(I0(this.contextWindow,"pointermove",this.handlePointerMove),I0(this.contextWindow,"pointerup",this.handlePointerUp),I0(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(yZ.has(i.overflowX)||yZ.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,r=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),Tn.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Bc(this.updatePoint)}}function ET(e,t){return t?{point:t(e.point)}:e}function _Z(e,t){return{x:e.x-t.x,y:e.y-t.y}}function TT({point:e},t){return{point:e,delta:_Z(e,vZ(t)),offset:_Z(e,G9e(t)),velocity:V9e(t,.1)}}function G9e(e){return e[0]}function vZ(e){return e[e.length-1]}function V9e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=vZ(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>ko(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&r.timestamp-i.timestamp>ko(t)*2&&(i=e[1]);const o=Xo(r.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function F9e(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Zn(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Zn(n,e,i.max):Math.min(e,n)),e}function wZ(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function A9e(e,{top:t,left:n,bottom:i,right:r}){return{x:wZ(e.x,n,r),y:wZ(e.y,t,i)}}function xZ(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function z9e(e,t){return{x:xZ(e.x,t.x),y:xZ(e.y,t.y)}}function N9e(e,t){let n=.5;const i=xr(e),r=xr(t);return r>i?n=g0(t.min,t.max-i,e.min):i>r&&(n=g0(e.min,e.max-r,t.min)),ia(0,1,n)}function k9e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const CT=.35;function X9e(e=CT){return e===!1?e=0:e===!0&&(e=CT),{x:SZ(e,"left","right"),y:SZ(e,"top","bottom")}}function SZ(e,t,n){return{min:EZ(e,t),max:EZ(e,n)}}function EZ(e,t){return typeof e=="number"?e:e[t]||0}const Z9e=new WeakMap;class D9e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_i(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=h=>{n&&this.snapToCursor(R0(h).point),this.stopAnimation()},s=(h,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=xGe(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oa(g=>{let v=this.getAxisMotionValue(g).get()||0;if(ra.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const E=S.layout.layoutBox[g];E&&(v=xr(E)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&Tn.update(()=>m(h,d),!1,!0),qE(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=W9e(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),y&&Tn.update(()=>y(h,d),!1,!0)},c=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bZ(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:mZ(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!i)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Tn.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:r}=this.getProps();if(!i||!r1(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=F9e(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&ad(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=A9e(i.layoutBox,t):this.constraints=!1,this.elastic=X9e(n),r!==this.constraints&&!ad(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&oa(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=k9e(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ad(t))return!1;const i=t.current;Ua(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=QGe(i,r.root,this.visualElement.getTransformPagePoint());let s=z9e(r.layout.layoutBox,o);if(n){const a=n(jGe(s));this.hasMutatedConstraints=!!a,a&&(s=rX(a))}return s}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=oa(u=>{if(!r1(u,n,this.currentDirection))return;let h=c&&c[u]||{};s&&(h={min:0,max:0});const d=r?200:1e6,f=r?40:1e7,p={type:"inertia",velocity:i?t[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return qE(this.visualElement,t),i.start(KE(t,i,0,n,this.visualElement,!1))}stopAnimation(){oa(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){oa(n=>{const{drag:i}=this.getProps();if(!r1(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-Zn(s,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!ad(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};oa(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();r[s]=N9e({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),oa(s=>{if(!r1(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(Zn(c,l,r[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Z9e.set(this.visualElement,this);const t=this.visualElement.current,n=I0(t,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps(),d=l.target,f=d!==t&&IGe(d);u&&h&&!f&&this.start(l)});let i;const r=()=>{const{dragConstraints:l}=this.getProps();ad(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),i||(i=U9e(t,l.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Tn.read(r);const a=C0(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(oa(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),c&&c(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:s=CT,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function TZ(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function U9e(e,t,n){const i=Jk(e,TZ(n)),r=Jk(t,TZ(n));return()=>{i(),r()}}function r1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function W9e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class B9e extends jc{constructor(t){super(t),this.removeGroupControls=No,this.removeListeners=No,this.controls=new D9e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||No}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const RT=e=>(t,n)=>{e&&Tn.update(()=>e(t,n),!1,!0)};class Y9e extends jc{constructor(){super(...arguments),this.removePointerDownListener=No}onPointerDown(t){this.session=new bZ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mZ(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:RT(t),onStart:RT(n),onMove:RT(i),onEnd:(o,s)=>{delete this.session,r&&Tn.postRender(()=>r(o,s))}}}mount(){this.removePointerDownListener=I0(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let IT=!1;class H9e extends R.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),i&&i.register&&r&&i.register(o),IT&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),t1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:o}=this.props,{projection:s}=i;return s&&(s.isPresent=o,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),IT=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Tn.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rT.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;IT=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function CZ(e){const[t,n]=e9e(),i=R.useContext(CN);return ce.jsx(H9e,{...e,layoutGroup:i,switchLayoutGroup:R.useContext(fZ),isPresent:t,safeToRemove:n})}const j9e={pan:{Feature:Y9e},drag:{Feature:B9e,ProjectionNode:iZ,MeasureLayout:CZ}};function RZ(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=i[r];o&&Tn.postRender(()=>o(t,R0(t)))}class K9e extends jc{mount(){const{current:t}=this.node;t&&(this.unmount=EGe(t,(n,i)=>(RZ(this.node,i,"Start"),r=>RZ(this.node,r,"End"))))}unmount(){}}class J9e extends jc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=m0(C0(this.node.current,"focus",()=>this.onFocus()),C0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function IZ(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=i[r];o&&Tn.postRender(()=>o(t,R0(t)))}class Q9e extends jc{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=LGe(t,(r,o)=>(IZ(this.node,o,"Start"),(s,{success:a})=>IZ(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const MT=new WeakMap,LT=new WeakMap,q9e=e=>{const t=MT.get(e.target);t&&t(e)},$9e=e=>{e.forEach(q9e)};function eFe({root:e,...t}){const n=e||document;LT.has(n)||LT.set(n,{});const i=LT.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver($9e,{root:e,...t})),i[r]}function tFe(e,t,n){const i=eFe(t);return MT.set(e,n),i.observe(e),()=>{MT.delete(e),i.unobserve(e)}}const nFe={some:0,all:1};class iFe extends jc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:nFe[r]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),d=l?u:h;d&&d(c)};return tFe(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(rFe(t,n))&&this.startObserver()}unmount(){}}function rFe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const oFe={...L9e,...{inView:{Feature:iFe},tap:{Feature:Q9e},focus:{Feature:J9e},hover:{Feature:K9e}},...j9e,...{layout:{ProjectionNode:iZ,MeasureLayout:CZ}}},sFe=T9e(oFe,C9e);function MZ(e){const t=RN(()=>tu(e)),{isStatic:n}=R.useContext(vT);if(n){const[,i]=R.useState(e);R.useEffect(()=>t.on("change",i),[])}return t}function PT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function aFe(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=t,n.facade}var cFe=typeof window<"u"?A0.useLayoutEffect:A0.useEffect,LZ=new WeakMap;function lFe(e,t){var n=aFe(null,function(i){return e.forEach(function(r){return PT(r,i)})});return cFe(function(){var i=LZ.get(n);if(i){var r=new Set(i),o=new Set(e),s=n.current;r.forEach(function(a){o.has(a)||PT(a,null)}),o.forEach(function(a){r.has(a)||PT(a,s)})}LZ.set(n,e)},[e]),n}const uFe=new cs(it.WGS84,b.ZERO),OT=R.forwardRef(({position:e,children:t,...n},i)=>{const r=Wo(()=>new b);e?.clone(r);const o=MZ(""),s=MZ("none"),{toWindowPosition:a,getCamera:c,toXYZ:l,isPositionVisible:u}=ci(),h=R.useRef(null);Gl(()=>{if(h.current==null)return;let f;try{const v=a?.([r.x,r.y,r.z]);f=new me(v?.[0],v?.[1])}catch{s.set("none");return}const p=c?.();if(!p)return;const m=l?.(p?.lng,p?.lat,p?.height);if(!m)return;if(uFe.cameraPosition=new b(m[0],m[1],m[2]),f==null||f.x<0||f.y<0||f.x>window.innerWidth||f.y>window.innerHeight||!u?.([r.x,r.y,r.z])){s.set("none");return}const y=`calc(${f.x}px - 50%)`,g=`calc(${f.y}px - 50%)`;o.set(`translate(${y}, ${g})`),s.set("block")});const d=lFe([h,i]);return ce.jsx(sFe.div,{ref:d,...n,style:{...n.style,transform:o,display:s,position:"absolute",pointerEvents:"none",left:0,top:0},children:t})});OT.displayName="ScreenSpaceElement";const hFe=({a:e,b:t,color:n})=>{const i=R.useRef([e,t]);i.current=[e,t];const r=Wo(()=>new wo(()=>i.current,!1)),o=R.useMemo(()=>({polyline:{positions:r,width:1.5,material:new Ol({color:n,dashLength:8})}}),[n,r]);return ce.jsx(p0,{...o})},dFe=({a:e,b:t,extrudedHeight:n,color:i,showLine:r})=>{const o=Wo(()=>new b);return ce.jsxs(ce.Fragment,{children:[ce.jsx(OT,{position:b.midpoint(e,t,o),children:ce.jsx(TN,{children:n<1e3?`${n.toFixed(1)} m`:`${(n/1e3).toFixed(1)} km`})}),r&&ce.jsx(hFe,{a:e,b:t,color:i})]})},PZ=R.memo(({geometryOptions:{controlPoints:e,type:t},extrudedHeight:n,color:i,isEditing:r,extrudedPoint:o,centroidBasePoint:s,centroidExtrudedPoint:a,catchedExtrudedPoint:c,handleControlPointMouseEvent:l})=>{const u=e[e.length-1],h=o?new b(...o):void 0,d=s?new b(...s):void 0,f=a?new b(...a):void 0;return ce.jsxs(ce.Fragment,{children:[h&&ce.jsxs(ce.Fragment,{children:[ce.jsx(f0,{index:-1,position:h,isEditing:r,isExtrudedControlPoint:!0,handleControlPointMouseEvent:l}),(!r||c)&&ce.jsx(dFe,{a:u,b:h,extrudedHeight:n,color:r?B.fromCssColorString(d0):i,showLine:t!=="extrudedPolygon"})]}),d&&ce.jsx(f0,{index:-1,position:d,isEditing:r,isExtrudedControlPoint:!0}),f&&ce.jsx(f0,{index:-1,position:f,isEditing:r,isExtrudedControlPoint:!0})]})});PZ.displayName="ExtrudedControlPoints";const fFe=({id:e,hierarchy:t,extrudedHeight:n,color:i,disableShadow:r=!1,isEditing:o})=>{const s=R.useRef(t);s.current=t;const c=Wo(()=>new wo(()=>s.current,!1)),l=R.useRef(n);l.current=n;const h=Wo(()=>new wo(()=>l.current,!1)),d=R.useMemo(()=>({polygon:{hierarchy:c,heightReference:vl.RELATIVE_TO_TERRAIN,extrudedHeight:h,extrudedHeightReference:vl.RELATIVE_TO_TERRAIN,fill:!0,outline:!0,outlineWidth:1,outlineColor:o?B.fromCssColorString(d0):i?.withAlpha(1),material:new Rl(o?i?.withAlpha(.2):i),classificationType:eo.TERRAIN,shadows:r?Zf.DISABLED:Zf.ENABLED}}),[h,r,c,i,o]),{requestRender:f}=ci();return f?.(),ce.jsx(p0,{id:e,...d})},pFe=({dynamic:e=!1,hierarchy:t,color:n})=>{const i=R.useRef(t);i.current=t;const r=Wo(()=>new wo(()=>i.current,!1)),o=e?r:t,s=R.useMemo(()=>({polygon:{hierarchy:o,fill:!0,material:n?.withAlpha(.5),classificationType:eo.TERRAIN}}),[n,o]),{requestRender:a}=ci();return a?.(),ce.jsx(p0,{...s})},mFe=({dynamic:e=!1,positions:t,color:n,isEditing:i})=>{const r=R.useRef(t);r.current=t;const o=Wo(()=>new wo(()=>r.current,!e)),s=e?o:t,a=R.useMemo(()=>({polyline:{positions:s,width:1.5,material:i?B.fromCssColorString(d0):n,classificationType:eo.TERRAIN,clampToGround:!0}}),[n,s,i]),{requestRender:c}=ci();return c?.(),ce.jsx(p0,{...a})},OZ=new b,GZ=R.memo(({geometryOptions:{type:e,controlPoints:t},isEditing:n,handleAddControlPoint:i})=>{if(!["polyline","polygon","extrudedPolygon"].includes(e))return null;const r=[];for(let o=0;o<t.length-1;o++){const s=t[o+1],a=b.midpoint(t[o],s,OZ);r.push(a.clone())}if(e==="polygon"||e==="extrudedPolygon"){const o=b.midpoint(t[t.length-1],t[0],OZ);r.push(o.clone())}return ce.jsx(ce.Fragment,{children:r.map((o,s)=>ce.jsx(f0,{position:o,isAddingPoint:!0,index:s,clampToGround:!0,isEditing:n,handleControlPointMouseEvent:()=>i?.([o.x,o.y,o.z],s)},s))})});GZ.displayName="SurfaceAddingPoints";const gFe=({a:e,b:t,color:n})=>{const i=R.useRef([e,t]);i.current=[e,t];const r=Wo(()=>new wo(()=>i.current,!1)),o=R.useMemo(()=>({polyline:{positions:r,width:1.5,material:new Ol({color:n,dashLength:8}),classificationType:eo.TERRAIN,clampToGround:!0}}),[n,r]),{requestRender:s}=ci();return s?.(),ce.jsx(p0,{...o})},yFe=({a:e,b:t,color:n,showLine:i=!1})=>{const r=Wo(()=>new b),{getSurfaceDistance:o}=ci(),s=o?.(e,t);return s!==void 0?ce.jsxs(ce.Fragment,{children:[ce.jsx(OT,{position:b.midpoint(e,t,r),children:ce.jsx(TN,{children:s<1e3?`${s.toFixed(1)} m`:`${(s/1e3).toFixed(1)} km`})}),i&&ce.jsx(gFe,{a:e,b:t,color:n})]}):null},VZ=new b,FZ=R.memo(({geometryOptions:{type:e,controlPoints:t},color:n,isEditing:i,catchedControlPointIndex:r,selectedControlPointIndex:o,handleControlPointMouseEvent:s})=>{const a=[];if(t.length>=2)if(i){if(r!==void 0&&r!==-1)switch(e){case"polyline":r>0&&a.push({points:[t[r-1],t[r]],showLine:!1}),r<t.length-1&&a.push({points:[t[r],t[r+1]],showLine:!1});break;case"circle":case"extrudedCircle":r!==2&&a.push({points:[t[0],t[1]],showLine:!0});break;case"rectangle":case"extrudedRectangle":if(r<=1)a.push({points:[t[0],t[1]],showLine:!1});else if(r===2){const[c,l,u]=t,h=b.midpoint(c,l,VZ);a.push({points:[h,u],showLine:!0})}break;case"polygon":case"extrudedPolygon":a.push({points:[t[r],r===0?t[t.length-1]:t[r-1]],showLine:!1}),a.push({points:[t[r],r===t.length-1?t[0]:t[r+1]],showLine:!1});break}}else switch(e){case"rectangle":case"extrudedRectangle":if(t.length===2)a.push({points:t,showLine:!0});else if(t.length===3){const[c,l,u]=t,h=b.midpoint(c,l,VZ);a.push({points:[h,u],showLine:!0})}break;default:a.push({points:t.slice(-2),showLine:e==="circle"});break}return ce.jsxs(ce.Fragment,{children:[t.map((c,l)=>ce.jsx(f0,{position:c,index:l,isSelected:o===l,clampToGround:!0,isEditing:i,handleControlPointMouseEvent:s},l)),a.map(({points:c,showLine:l},u)=>ce.jsx(yFe,{a:c[0],b:c[1],color:i?B.fromCssColorString(d0):n,showLine:l},u))]})});FZ.displayName="SurfaceControlPoints";const AZ=R.memo(({geometryOptions:e,extrudedHeight:t,disableShadow:n,color:i,isEditing:r,extrudedPoint:o,centroidBasePoint:s,centroidExtrudedPoint:a,catchedControlPointIndex:c,catchedExtrudedPoint:l,selectedControlPointIndex:u,handleControlPointMouseEvent:h,handleAddControlPoint:d})=>{const f=R.useMemo(()=>e?{...e,controlPoints:e?.controlPoints.map(v=>new M.Cartesian3(...v))}:null,[e]),p=R.useMemo(()=>f?yN(f):null,[f]),{positionsArray:m,hierarchyArray:y}=R.useMemo(()=>p?.type==="Point"?{}:p?.type==="LineString"?{positionsArray:uF(p)}:p!=null?{positionsArray:uF(p),hierarchyArray:hF(p)}:{},[p]),g=R.useMemo(()=>B.fromCssColorString(i??uPe),[i]);return ce.jsxs(ce.Fragment,{children:[m?.map((v,S)=>ce.jsx(mFe,{dynamic:!0,positions:v,color:g,isEditing:r},S)),y?.map((v,S)=>ce.jsx(pFe,{dynamic:!0,hierarchy:v,color:g},S)),f!=null&&(!t||r)&&ce.jsx(FZ,{geometryOptions:f,color:g,isEditing:r,catchedControlPointIndex:c,selectedControlPointIndex:u,handleControlPointMouseEvent:h}),f!=null&&r&&ce.jsx(GZ,{geometryOptions:f,isEditing:r,handleAddControlPoint:d}),f!=null&&t&&ce.jsx(PZ,{geometryOptions:f,extrudedHeight:t,extrudedPoint:o,centroidBasePoint:s,centroidExtrudedPoint:a,catchedExtrudedPoint:l,color:g,isEditing:r,handleControlPointMouseEvent:h}),t&&y?.map((v,S)=>ce.jsx(fFe,{hierarchy:v,extrudedHeight:t,disableShadow:n,color:g,isEditing:r},S))]})});AZ.displayName="SketchComponent";const bFe=({className:e,style:t,property:n,time:i,camera:r,small:o,ready:s,children:a,selectedLayerId:c,isLayerDraggable:l,isLayerDragging:u,shouldRender:h,layerSelectionReason:d,meta:f,customProvider:p,displayCredits:m,layersRef:y,featureFlags:g,requestingRenderMode:v,timelineManagerRef:S,cameraForceHorizontalRoll:E,onLayerSelect:C,onCameraChange:O,onLayerDrag:V,onLayerDrop:A,onLayerEdit:G,onLayerSelectWithRectStart:N,onLayerSelectWithRectMove:k,onLayerSelectWithRectEnd:P,onMount:w,onLayerVisibility:x,onLayerLoad:I,onCreditsUpdate:X},D)=>{const{cesium:Y,mouseEventHandles:H,cesiumIonAccessToken:J,context:z,layerSelectWithRectEventHandlers:W,sceneLight:Q,sceneBackgroundColor:q,sceneMsaaSamples:oe,sceneMode:Ee,cameraViewBoundaries:be,cameraViewOuterBoundaries:Ae,cameraViewBoundariesMaterial:Pe,handleCameraChange:fe,handleCameraMoveEnd:Xe,handleUpdate:tt,handleClick:nt,handleMount:Z,handleUnmount:pe,handleTilesChange:ue,handleTerrainProviderChange:$}=JLe({ref:D,property:n,time:i,selectedLayerId:c,selectionReason:d,meta:f,customProvider:p,layersRef:y,featureFlags:g,timelineManagerRef:S,isLayerDraggable:l,isLayerDragging:u,shouldRender:h,requestingRenderMode:v,camera:r,cameraForceHorizontalRoll:E,onLayerDrag:V,onLayerDrop:A,onLayerSelect:C,onLayerEdit:G,onLayerSelectWithRectStart:N,onLayerSelectWithRectMove:k,onLayerSelectWithRectEnd:P,onLayerVisibility:x,onLayerLoad:I,onCameraChange:O,onMount:w,onCreditsUpdate:X});return ce.jsxs(gre,{ref:Y,onUpdate:tt,className:e,requestRenderMode:!0,animation:!1,timeline:!1,baseLayer:!1,fullscreenButton:!1,homeButton:!1,geocoder:!1,infoBox:!1,baseLayerPicker:!1,navigationHelpButton:!1,projectionPicker:!1,sceneModePicker:!1,creditContainer:m?void 0:_Fe,style:{width:o?"300px":"auto",height:o?"300px":"100%",display:s?void 0:"none",cursor:u?"grab":void 0,...t},shadows:!!n?.scene?.shadow?.enabled,onClick:nt,onDoubleClick:H.doubleClick,onMouseDown:H.mouseDown,onMouseUp:H.mouseUp,onRightClick:H.rightClick,onRightDown:H.rightDown,onRightUp:H.rightUp,onMiddleClick:H.middleClick,onMiddleDown:H.middleDown,onMiddleUp:H.middleUp,onMouseMove:H.mouseMove,onMouseEnter:H.mouseEnter,onMouseLeave:H.mouseLeave,onWheel:H.wheel,automaticallyTrackDataSourceClocks:!1,children:[ce.jsx(zbe,{onMount:Z,onUnmount:pe}),ce.jsx(Zoe,{timelineManagerRef:S}),ce.jsx(Yye,{tiles:n?.tiles,cesiumIonAccessToken:J,customProvider:p,onTilesChange:ue}),ce.jsx(mF,{tileLabels:n?.tileLabels}),ce.jsx(Kye,{property:n,timelineManagerRef:S}),ce.jsxs(kM,{useDefault:!0,children:[ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_CLICK}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_DOUBLE_CLICK})]}),ce.jsxs(kM,{children:[ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_DOWN,action:W.start.handler}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_DOWN,modifier:M.KeyboardEventModifier.SHIFT,action:W.start.shift}),ce.jsx(hc,{type:M.ScreenSpaceEventType.MOUSE_MOVE,action:W.move.handler}),ce.jsx(hc,{type:M.ScreenSpaceEventType.MOUSE_MOVE,modifier:M.KeyboardEventModifier.SHIFT,action:W.move.shift}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_UP,action:W.end.handler}),ce.jsx(hc,{type:M.ScreenSpaceEventType.LEFT_UP,modifier:M.KeyboardEventModifier.SHIFT,action:W.end.shift})]}),ce.jsx(ore,{maximumZoomDistance:n?.camera?.limiter?.enabled?n.camera?.limiter?.targetArea?.height??Number.POSITIVE_INFINITY:Number.POSITIVE_INFINITY,enableCollisionDetection:!n?.camera?.allowEnterGround}),ce.jsx(kne,{percentageChanged:.2,onChange:fe,onMoveEnd:Xe}),be&&n?.camera?.limiter?.showHelper&&ce.jsx(uc,{children:ce.jsx(ml,{positions:be,width:1,material:M.Color.RED,arcType:M.ArcType.RHUMB})}),Ae&&n?.camera?.limiter?.showHelper&&ce.jsx(uc,{children:ce.jsx(ml,{positions:Ae,width:1,material:Pe,arcType:M.ArcType.RHUMB})}),ce.jsx(ire,{backgroundColor:q,light:Q,mode:Ee,msaaSamples:oe,useDepthPicking:!0,useWebVR:!!n?.scene?.vr||void 0,debugShowFramesPerSecond:!!n?.debug?.showFramesPerSecond,verticalExaggerationRelativeHeight:n?.scene?.verticalExaggerationRelativeHeight,verticalExaggeration:n?.terrain?.enabled?n?.scene?.verticalExaggeration:1}),ce.jsx(lre,{show:n?.sky?.skyBox?.show??!0}),ce.jsx(fie,{enabled:n?.sky?.fog?.enabled??!0,density:n?.sky?.fog?.density}),ce.jsx(hre,{show:n?.sky?.sun?.show??!0}),ce.jsx(kie,{show:n?.sky?.moon?.show??!0}),ce.jsx(are,{show:n?.sky?.skyAtmosphere?.show??!0,atmosphereLightIntensity:n?.sky?.skyAtmosphere?.lightIntensity,saturationShift:n?.sky?.skyAtmosphere?.saturationShift,brightnessShift:n?.sky?.skyAtmosphere?.brightnessShift}),ce.jsx(wse,{property:n,cesiumIonAccessToken:J,onTerrainProviderChange:$}),ce.jsx(EF.Provider,{value:z,children:s?a:null}),ce.jsx(cPe,{...lPe[n?.render?.ambientOcclusion?.quality||"low"],enabled:!!n?.render?.ambientOcclusion?.enabled,intensity:n?.render?.ambientOcclusion?.intensity??100,outputType:n?.render?.ambientOcclusion?.ambientOcclusionOnly?SN.Occlusion:null})]})},_Fe=document.createElement("div"),zZ={cesium:{component:R.forwardRef(bFe),featureComponent:O5e,clusterComponent:Xoe,sketchComponent:AZ,delegatedDataTypes:["czml","wms","mvt","3dtiles","osm-buildings","reearth-buildings","google-photorealistic","kml"]}};function vFe({error:e,resetErrorBoundary:t}){const i=e?.message??String(e);return ce.jsxs("div",{children:[ce.jsx("h1",{children:"Oops! An Error Occurred"}),ce.jsx("p",{children:i}),ce.jsx("p",{children:ce.jsx("button",{style:{color:"#fff"},onClick:t,children:"Retry"})})]})}const wFe="0.0.7-alpha.69",xFe=({viewerProperty:e})=>{const t=R.useRef(e);t.current=e;const n=R.useMemo(()=>({get version(){return wFe},get viewerProperty(){return t.current}}),[]);R.useEffect(()=>{window.reearth_core=n},[n])},SFe=768,EFe=({wrapperRef:e})=>{const t=R.useMemo(()=>TFe(new URLSearchParams(window.location.search)),[]),[n,i]=R.useState({width:void 0,height:void 0,isMobile:void 0,query:t});return R.useEffect(()=>{const r=new ResizeObserver(o=>{const[s]=o;let a,c;if(s.contentBoxSize){const l=Array.isArray(s.contentBoxSize)?s.contentBoxSize[0]:s.contentBoxSize;a=l.inlineSize,c=l.blockSize}else s.contentRect?(a=s.contentRect.width,c=s.contentRect.height):(a=e.current?.clientWidth,c=e.current?.clientHeight);i(l=>({width:a,height:c,isMobile:a?a<=SFe:void 0,query:l.query}))});return e.current&&r.observe(e.current),()=>{r.disconnect()}},[e]),n};function TFe(e){const t={};for(const[n,i]of e)t[n]=i;return t}function CFe({camera:e,interactionMode:t,zoomedLayerId:n,viewerProperty:i,onLayerSelect:r,onCameraChange:o,onInteractionModeChange:s,onZoomToLayer:a,onLayerDrop:c,onSketchTypeChangeProp:l},u){const h=R.useRef(null);R.useImperativeHandle(u,()=>h.current,[]);const d=R.useRef(null),f=EFe({wrapperRef:d}),[p,m]=R.useState({}),[y,g]=R.useState(),[v,S]=R.useState(),E=R.useCallback(async(Ue,St,Dt,xt,mn)=>{const Li=p.layer?.layer?.type==="simple"&&p.layer?.layer?.data?.isSketchLayer;if(p.layerId===Ue&&p.featureId===St&&!Li)return;const $n=await Dt?.(),ei=Ue&&St?(Li?$n?.features?.find(ti=>ti.id===St):h.current?.engine.findComputedFeatureById?.(Ue,St))??mn?.feature:void 0;g(Ue&&St?h.current?.engine.findFeatureById?.(Ue,St):void 0),S(ei),m(ti=>ti.layerId===Ue&&ti.featureId===St?ti:{layerId:Ue,featureId:St,layer:$n,reason:xt}),r?.(Ue,Dt,ei,xt)},[p,r]),C=R.useRef(void 0),[O,V]=NZ(e,o),[A,G]=R.useState(!1),N=R.useCallback(Ue=>{G(!!Ue)},[]),[k,P]=NZ(t||"default",s);R.useEffect(()=>{k==="default"&&h?.current?.engine?.setCursor("auto")},[k]);const w=N0[k??"default"],x=R.useRef(void 0),I=R.useCallback(Ue=>{x.current=Ue},[]),X=R.useCallback(Ue=>{x.current?.(Ue)},[]),D=R.useRef(void 0),Y=R.useCallback(Ue=>{D.current=Ue},[]),H=R.useCallback(Ue=>{D.current?.(Ue)},[]),J=R.useRef(void 0),z=R.useCallback(Ue=>{J.current=Ue},[]),W=R.useCallback(Ue=>{J.current?.(Ue)},[]),Q=R.useRef(void 0),q=R.useCallback(Ue=>{Q.current=Ue},[]),oe=R.useCallback(Ue=>{Q.current?.(Ue)},[]),Ee=R.useRef(void 0),be=R.useCallback(Ue=>{Ee.current=Ue},[]),Ae=R.useCallback(Ue=>{Ee.current?.(Ue)},[]),Pe=R.useRef(void 0),fe=R.useCallback(Ue=>{Pe.current=Ue},[]),Xe=R.useCallback(Ue=>{Pe.current?.(Ue)},[]),tt=R.useRef([]),nt=R.useCallback(Ue=>{tt.current.push(Ue)},[]),Z=R.useCallback(Ue=>{tt.current.forEach(St=>St(Ue))},[]),pe=R.useRef([]),ue=R.useCallback(Ue=>{pe.current.push(Ue)},[]),$=R.useCallback(Ue=>{pe.current.forEach(St=>St(Ue))},[]),j=R.useRef([]),te=R.useCallback(Ue=>{j.current.push(Ue)},[]),le=R.useCallback(Ue=>{j.current.forEach(St=>St(Ue))},[]),ge=R.useRef([]),ee=R.useCallback(Ue=>{ge.current.push(Ue)},[]),he=R.useCallback((Ue,St)=>{ge.current.forEach(Dt=>Dt(Ue)),l?.(Ue,St)},[l]);R.useEffect(()=>{n&&(h.current?.engine?.lookAtLayer(n),a?.(void 0))},[n,a]);const[Ie,_e]=R.useState(!1),De=R.useCallback(()=>{_e(!0)},[]),Be=R.useCallback((Ue,St,Dt)=>{_e(!1);const xt=h.current?.layers.findById(Ue),mn=xt?.property.default.location?"default.location":xt?.property.default.position?"default.position":void 0;Dt&&xt&&xt.propertyId&&mn&&c?.(xt.propertyId,mn,Dt)},[c,h]),Je=R.useMemo(()=>({interactionMode:k,selectedLayer:p,selectedComputedFeature:v,viewport:f,handleCameraForceHorizontalRollChange:N,handleInteractionModeChange:P,onSketchPluginFeatureCreate:nt,onSketchPluginFeatureUpdate:ue,onSketchPluginFeatureDelete:te,onSketchTypeChange:ee,onLayerVisibility:Y,onLayerLoad:z,onLayerEdit:I,onLayerSelectWithRectStart:q,onLayerSelectWithRectMove:be,onLayerSelectWithRectEnd:fe}),[k,p,v,f,P,N,I,nt,ue,te,ee,Y,z,q,be,fe]),Nt=R.useMemo(()=>({position:"relative",width:"100%",height:"100%",overflow:"hidden"}),[]);return xFe({viewerProperty:i}),{mapRef:h,wrapperRef:d,selectedFeature:y,camera:O,featureFlags:w,isLayerDragging:Ie,timelineManagerRef:C,cameraForceHorizontalRoll:A,coreContextValue:Je,containerStyle:Nt,overriddenInteractionMode:k,handleLayerSelect:E,handleLayerDrag:De,handleLayerDrop:Be,handleLayerEdit:X,handleCameraChange:V,handleInteractionModeChange:P,handleSketchPluginFeatureCreate:Z,handleSketchPluginFeatureUpdate:$,handleSketchPluginFeatureDelete:le,handleSketchTypeChange:he,handleLayerVisibility:H,handleLayerLoad:W,handleLayerSelectWithRectStart:oe,handleLayerSelectWithRectMove:Ae,handleLayerSelectWithRectEnd:Xe}}function NZ(e,t){const[n,i]=R.useState(e),r=R.useCallback(o=>{o&&(i(o),t?.(o))},[t]);return R.useEffect(()=>{i(e)},[e]),[n,r]}const RFe=R.memo(R.forwardRef(({engine:e,isBuilt:t,isEditable:n,viewerProperty:i,layers:r,clusters:o,small:s,ready:a,hiddenLayers:c,camera:l,time:u,interactionMode:h,shouldRender:d,meta:f,customProvider:p,displayCredits:m=!0,style:y,zoomedLayerId:g,children:v,onLayerDrop:S,onLayerSelect:E,onCameraChange:C,onZoomToLayer:O,onInteractionModeChange:V,onMount:A,onSketchTypeChangeProp:G,onSketchFeatureCreate:N,onSketchFeatureUpdate:k,onSketchFeatureDelete:P,onAPIReady:w,onCreditsUpdate:x},I)=>{const{mapRef:X,wrapperRef:D,selectedFeature:Y,camera:H,featureFlags:J,isLayerDragging:z,timelineManagerRef:W,cameraForceHorizontalRoll:Q,coreContextValue:q,containerStyle:oe,overriddenInteractionMode:Ee,handleLayerSelect:be,handleLayerDrag:Ae,handleLayerDrop:Pe,handleLayerEdit:fe,handleCameraChange:Xe,handleInteractionModeChange:tt,handleSketchPluginFeatureCreate:nt,handleSketchPluginFeatureUpdate:Z,handleSketchPluginFeatureDelete:pe,handleSketchTypeChange:ue,handleLayerVisibility:$,handleLayerLoad:j,handleLayerSelectWithRectStart:te,handleLayerSelectWithRectMove:le,handleLayerSelectWithRectEnd:ge}=CFe({camera:l,interactionMode:h,zoomedLayerId:g,viewerProperty:i,onLayerSelect:E,onCameraChange:C,onZoomToLayer:O,onLayerDrop:S,onInteractionModeChange:V,onSketchTypeChangeProp:G},I);return ce.jsx(Foe,{FallbackComponent:vFe,children:ce.jsx(koe,{mapRef:X,children:ce.jsxs("div",{ref:D,style:oe,children:[ce.jsx(d5,{ref:X,isBuilt:t,isEditable:n,engine:e,layers:r,engines:zZ,camera:H,cameraForceHorizontalRoll:Q,clusters:o,hiddenLayers:c,isLayerDragging:z,isLayerDraggable:n,meta:f,customProvider:p,displayCredits:m,style:y,featureFlags:J,shouldRender:d,property:i,time:u,small:s,ready:a,timelineManagerRef:W,interactionMode:Ee,selectedFeature:Y,onCameraChange:Xe,onLayerDrag:Ae,onLayerDrop:Pe,onLayerSelect:be,onLayerEdit:fe,overrideInteractionMode:tt,onSketchFeatureCreate:N,onSketchPluginFeatureCreate:nt,onSketchFeatureUpdate:k,onSketchPluginFeatureUpdate:Z,onSketchFeatureDelete:P,onSketchPluginFeatureDelete:pe,onSketchTypeChange:ue,onMount:A,onLayerVisibility:$,onLayerLoad:j,onLayerSelectWithRectStart:te,onLayerSelectWithRectMove:le,onLayerSelectWithRectEnd:ge,onAPIReady:w,onCreditsUpdate:x}),ce.jsx(p5.Provider,{value:q,children:v})]})})})}));var cd=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},sa=[],Zo=[],IFe=typeof Uint8Array<"u"?Uint8Array:Array,GT=!1;function kZ(){GT=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)sa[t]=e[t],Zo[e.charCodeAt(t)]=t;Zo[45]=62,Zo[95]=63}function MFe(e){GT||kZ();var t,n,i,r,o,s,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[a-2]==="="?2:e[a-1]==="="?1:0,s=new IFe(a*3/4-o),i=o>0?a-4:a;var c=0;for(t=0,n=0;t<i;t+=4,n+=3)r=Zo[e.charCodeAt(t)]<<18|Zo[e.charCodeAt(t+1)]<<12|Zo[e.charCodeAt(t+2)]<<6|Zo[e.charCodeAt(t+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=r&255;return o===2?(r=Zo[e.charCodeAt(t)]<<2|Zo[e.charCodeAt(t+1)]>>4,s[c++]=r&255):o===1&&(r=Zo[e.charCodeAt(t)]<<10|Zo[e.charCodeAt(t+1)]<<4|Zo[e.charCodeAt(t+2)]>>2,s[c++]=r>>8&255,s[c++]=r&255),s}function LFe(e){return sa[e>>18&63]+sa[e>>12&63]+sa[e>>6&63]+sa[e&63]}function PFe(e,t,n){for(var i,r=[],o=t;o<n;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],r.push(LFe(i));return r.join("")}function XZ(e){GT||kZ();for(var t,n=e.length,i=n%3,r="",o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(PFe(e,a,a+s>c?c:a+s));return i===1?(t=e[n-1],r+=sa[t>>2],r+=sa[t<<4&63],r+="=="):i===2&&(t=(e[n-2]<<8)+e[n-1],r+=sa[t>>10],r+=sa[t>>4&63],r+=sa[t<<2&63],r+="="),o.push(r),o.join("")}function o1(e,t,n,i,r){var o,s,a=r*8-i-1,c=(1<<a)-1,l=c>>1,u=-7,h=n?r-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=d,u-=8);if(o===0)o=1-l;else{if(o===c)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-l}return(f?-1:1)*s*Math.pow(2,o-i)}function ZZ(e,t,n,i,r,o){var s,a,c,l=o*8-r-1,u=(1<<l)-1,h=u>>1,d=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=d/c:t+=d*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,r),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=a&255,f+=p,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;e[n+f]=s&255,f+=p,s/=256,l-=8);e[n+f-p]|=m*128}var OFe={}.toString,DZ=Array.isArray||function(e){return OFe.call(e)=="[object Array]"},GFe=50;ve.TYPED_ARRAY_SUPPORT=cd.TYPED_ARRAY_SUPPORT!==void 0?cd.TYPED_ARRAY_SUPPORT:!0,s1();function s1(){return ve.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ba(e,t){if(s1()<t)throw new RangeError("Invalid typed array length");return ve.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=ve.prototype):(e===null&&(e=new ve(t)),e.length=t),e}function ve(e,t,n){if(!ve.TYPED_ARRAY_SUPPORT&&!(this instanceof ve))return new ve(e,t,n);if(typeof e=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return VT(this,e)}return UZ(this,e,t,n)}ve.poolSize=8192,ve._augment=function(e){return e.__proto__=ve.prototype,e};function UZ(e,t,n,i){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?AFe(e,t,n,i):typeof t=="string"?FFe(e,t,n):zFe(e,t)}ve.from=function(e,t,n){return UZ(null,e,t,n)},ve.TYPED_ARRAY_SUPPORT&&(ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ve[Symbol.species]);function WZ(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function VFe(e,t,n,i){return WZ(t),t<=0?Ba(e,t):n!==void 0?typeof i=="string"?Ba(e,t).fill(n,i):Ba(e,t).fill(n):Ba(e,t)}ve.alloc=function(e,t,n){return VFe(null,e,t,n)};function VT(e,t){if(WZ(t),e=Ba(e,t<0?0:AT(t)|0),!ve.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}ve.allocUnsafe=function(e){return VT(null,e)},ve.allocUnsafeSlow=function(e){return VT(null,e)};function FFe(e,t,n){if((typeof n!="string"||n==="")&&(n="utf8"),!ve.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=BZ(t,n)|0;e=Ba(e,i);var r=e.write(t,n);return r!==i&&(e=e.slice(0,r)),e}function FT(e,t){var n=t.length<0?0:AT(t.length)|0;e=Ba(e,n);for(var i=0;i<n;i+=1)e[i]=t[i]&255;return e}function AFe(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return n===void 0&&i===void 0?t=new Uint8Array(t):i===void 0?t=new Uint8Array(t,n):t=new Uint8Array(t,n,i),ve.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=ve.prototype):e=FT(e,t),e}function zFe(e,t){if(aa(t)){var n=AT(t.length)|0;return e=Ba(e,n),e.length===0||t.copy(e,0,0,n),e}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||n4e(t.length)?Ba(e,0):FT(e,t);if(t.type==="Buffer"&&DZ(t.data))return FT(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function AT(e){if(e>=s1())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s1().toString(16)+" bytes");return e|0}ve.isBuffer=jr;function aa(e){return!!(e!=null&&e._isBuffer)}ve.compare=function(t,n){if(!aa(t)||!aa(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var i=t.length,r=n.length,o=0,s=Math.min(i,r);o<s;++o)if(t[o]!==n[o]){i=t[o],r=n[o];break}return i<r?-1:r<i?1:0},ve.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ve.concat=function(t,n){if(!DZ(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return ve.alloc(0);var i;if(n===void 0)for(n=0,i=0;i<t.length;++i)n+=t[i].length;var r=ve.allocUnsafe(n),o=0;for(i=0;i<t.length;++i){var s=t[i];if(!aa(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r};function BZ(e,t){if(aa(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return l1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return eD(e).length;default:if(i)return l1(e).length;t=(""+t).toLowerCase(),i=!0}}ve.byteLength=BZ;function NFe(e,t,n){var i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return jFe(this,t,n);case"utf8":case"utf-8":return KZ(this,t,n);case"ascii":return YFe(this,t,n);case"latin1":case"binary":return HFe(this,t,n);case"base64":return WFe(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return KFe(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}ve.prototype._isBuffer=!0;function ru(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}ve.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)ru(this,n,n+1);return this},ve.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)ru(this,n,n+3),ru(this,n+1,n+2);return this},ve.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)ru(this,n,n+7),ru(this,n+1,n+6),ru(this,n+2,n+5),ru(this,n+3,n+4);return this},ve.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?KZ(this,0,t):NFe.apply(this,arguments)},ve.prototype.equals=function(t){if(!aa(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:ve.compare(this,t)===0},ve.prototype.inspect=function(){var t="",n=GFe;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},ve.prototype.compare=function(t,n,i,r,o){if(!aa(t))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),i===void 0&&(i=t?t.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),n<0||i>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&n>=i)return 0;if(r>=o)return-1;if(n>=i)return 1;if(n>>>=0,i>>>=0,r>>>=0,o>>>=0,this===t)return 0;for(var s=o-r,a=i-n,c=Math.min(s,a),l=this.slice(r,o),u=t.slice(n,i),h=0;h<c;++h)if(l[h]!==u[h]){s=l[h],a=u[h];break}return s<a?-1:a<s?1:0};function YZ(e,t,n,i,r){if(e.length===0)return-1;if(typeof n=="string"?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0)if(r)n=0;else return-1;if(typeof t=="string"&&(t=ve.from(t,i)),aa(t))return t.length===0?-1:HZ(e,t,n,i,r);if(typeof t=="number")return t=t&255,ve.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):HZ(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function HZ(e,t,n,i,r){var o=1,s=e.length,a=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}function c(f,p){return o===1?f[p]:f.readUInt16BE(p*o)}var l;if(r){var u=-1;for(l=n;l<s;l++)if(c(e,l)===c(t,u===-1?0:l-u)){if(u===-1&&(u=l),l-u+1===a)return u*o}else u!==-1&&(l-=l-u),u=-1}else for(n+a>s&&(n=s-a),l=n;l>=0;l--){for(var h=!0,d=0;d<a;d++)if(c(e,l+d)!==c(t,d)){h=!1;break}if(h)return l}return-1}ve.prototype.includes=function(t,n,i){return this.indexOf(t,n,i)!==-1},ve.prototype.indexOf=function(t,n,i){return YZ(this,t,n,i,!0)},ve.prototype.lastIndexOf=function(t,n,i){return YZ(this,t,n,i,!1)};function kFe(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i),i>r&&(i=r)):i=r;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(s*2,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function XFe(e,t,n,i){return u1(l1(t,e.length-n),e,n,i)}function jZ(e,t,n,i){return u1(e4e(t),e,n,i)}function ZFe(e,t,n,i){return jZ(e,t,n,i)}function DFe(e,t,n,i){return u1(eD(t),e,n,i)}function UFe(e,t,n,i){return u1(t4e(t,e.length-n),e,n,i)}ve.prototype.write=function(t,n,i,r){if(n===void 0)r="utf8",i=this.length,n=0;else if(i===void 0&&typeof n=="string")r=n,i=this.length,n=0;else if(isFinite(n))n=n|0,isFinite(i)?(i=i|0,r===void 0&&(r="utf8")):(r=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-n;if((i===void 0||i>o)&&(i=o),t.length>0&&(i<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return kFe(this,t,n,i);case"utf8":case"utf-8":return XFe(this,t,n,i);case"ascii":return jZ(this,t,n,i);case"latin1":case"binary":return ZFe(this,t,n,i);case"base64":return DFe(this,t,n,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return UFe(this,t,n,i);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function WFe(e,t,n){return t===0&&n===e.length?XZ(e):XZ(e.slice(t,n))}function KZ(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o=e[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a<=n){var c,l,u,h;switch(a){case 1:o<128&&(s=o);break;case 2:c=e[r+1],(c&192)===128&&(h=(o&31)<<6|c&63,h>127&&(s=h));break;case 3:c=e[r+1],l=e[r+2],(c&192)===128&&(l&192)===128&&(h=(o&15)<<12|(c&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:c=e[r+1],l=e[r+2],u=e[r+3],(c&192)===128&&(l&192)===128&&(u&192)===128&&(h=(o&15)<<18|(c&63)<<12|(l&63)<<6|u&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|s&1023),i.push(s),r+=a}return BFe(i)}var JZ=4096;function BFe(e){var t=e.length;if(t<=JZ)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=JZ));return n}function YFe(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]&127);return i}function HFe(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function jFe(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=$Fe(e[o]);return r}function KFe(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+i[o+1]*256);return r}ve.prototype.slice=function(t,n){var i=this.length;t=~~t,n=n===void 0?i:~~n,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),n<0?(n+=i,n<0&&(n=0)):n>i&&(n=i),n<t&&(n=t);var r;if(ve.TYPED_ARRAY_SUPPORT)r=this.subarray(t,n),r.__proto__=ve.prototype;else{var o=n-t;r=new ve(o,void 0);for(var s=0;s<o;++s)r[s]=this[s+t]}return r};function Mi(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=this[t],o=1,s=0;++s<n&&(o*=256);)r+=this[t+s]*o;return r},ve.prototype.readUIntBE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=this[t+--n],o=1;n>0&&(o*=256);)r+=this[t+--n]*o;return r},ve.prototype.readUInt8=function(t,n){return n||Mi(t,1,this.length),this[t]},ve.prototype.readUInt16LE=function(t,n){return n||Mi(t,2,this.length),this[t]|this[t+1]<<8},ve.prototype.readUInt16BE=function(t,n){return n||Mi(t,2,this.length),this[t]<<8|this[t+1]},ve.prototype.readUInt32LE=function(t,n){return n||Mi(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},ve.prototype.readUInt32BE=function(t,n){return n||Mi(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},ve.prototype.readIntLE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=this[t],o=1,s=0;++s<n&&(o*=256);)r+=this[t+s]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*n)),r},ve.prototype.readIntBE=function(t,n,i){t=t|0,n=n|0,i||Mi(t,n,this.length);for(var r=n,o=1,s=this[t+--r];r>0&&(o*=256);)s+=this[t+--r]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*n)),s},ve.prototype.readInt8=function(t,n){return n||Mi(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},ve.prototype.readInt16LE=function(t,n){n||Mi(t,2,this.length);var i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i},ve.prototype.readInt16BE=function(t,n){n||Mi(t,2,this.length);var i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i},ve.prototype.readInt32LE=function(t,n){return n||Mi(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},ve.prototype.readInt32BE=function(t,n){return n||Mi(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},ve.prototype.readFloatLE=function(t,n){return n||Mi(t,4,this.length),o1(this,t,!0,23,4)},ve.prototype.readFloatBE=function(t,n){return n||Mi(t,4,this.length),o1(this,t,!1,23,4)},ve.prototype.readDoubleLE=function(t,n){return n||Mi(t,8,this.length),o1(this,t,!0,52,8)},ve.prototype.readDoubleBE=function(t,n){return n||Mi(t,8,this.length),o1(this,t,!1,52,8)};function Hr(e,t,n,i,r,o){if(!aa(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(t,n,i,r){if(t=+t,n=n|0,i=i|0,!r){var o=Math.pow(2,8*i)-1;Hr(this,t,n,i,o,0)}var s=1,a=0;for(this[n]=t&255;++a<i&&(s*=256);)this[n+a]=t/s&255;return n+i},ve.prototype.writeUIntBE=function(t,n,i,r){if(t=+t,n=n|0,i=i|0,!r){var o=Math.pow(2,8*i)-1;Hr(this,t,n,i,o,0)}var s=i-1,a=1;for(this[n+s]=t&255;--s>=0&&(a*=256);)this[n+s]=t/a&255;return n+i},ve.prototype.writeUInt8=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,1,255,0),ve.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=t&255,n+1};function a1(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>(i?r:1-r)*8}ve.prototype.writeUInt16LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,65535,0),ve.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):a1(this,t,n,!0),n+2},ve.prototype.writeUInt16BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,65535,0),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):a1(this,t,n,!1),n+2};function c1(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>(i?r:3-r)*8&255}ve.prototype.writeUInt32LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,4294967295,0),ve.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255):c1(this,t,n,!0),n+4},ve.prototype.writeUInt32BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,4294967295,0),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):c1(this,t,n,!1),n+4},ve.prototype.writeIntLE=function(t,n,i,r){if(t=+t,n=n|0,!r){var o=Math.pow(2,8*i-1);Hr(this,t,n,i,o-1,-o)}var s=0,a=1,c=0;for(this[n]=t&255;++s<i&&(a*=256);)t<0&&c===0&&this[n+s-1]!==0&&(c=1),this[n+s]=(t/a>>0)-c&255;return n+i},ve.prototype.writeIntBE=function(t,n,i,r){if(t=+t,n=n|0,!r){var o=Math.pow(2,8*i-1);Hr(this,t,n,i,o-1,-o)}var s=i-1,a=1,c=0;for(this[n+s]=t&255;--s>=0&&(a*=256);)t<0&&c===0&&this[n+s+1]!==0&&(c=1),this[n+s]=(t/a>>0)-c&255;return n+i},ve.prototype.writeInt8=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,1,127,-128),ve.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=t&255,n+1},ve.prototype.writeInt16LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,32767,-32768),ve.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):a1(this,t,n,!0),n+2},ve.prototype.writeInt16BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,2,32767,-32768),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):a1(this,t,n,!1),n+2},ve.prototype.writeInt32LE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,2147483647,-2147483648),ve.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):c1(this,t,n,!0),n+4},ve.prototype.writeInt32BE=function(t,n,i){return t=+t,n=n|0,i||Hr(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),ve.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):c1(this,t,n,!1),n+4};function QZ(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function qZ(e,t,n,i,r){return r||QZ(e,t,n,4),ZZ(e,t,n,i,23,4),n+4}ve.prototype.writeFloatLE=function(t,n,i){return qZ(this,t,n,!0,i)},ve.prototype.writeFloatBE=function(t,n,i){return qZ(this,t,n,!1,i)};function $Z(e,t,n,i,r){return r||QZ(e,t,n,8),ZZ(e,t,n,i,52,8),n+8}ve.prototype.writeDoubleLE=function(t,n,i){return $Z(this,t,n,!0,i)},ve.prototype.writeDoubleBE=function(t,n,i){return $Z(this,t,n,!1,i)},ve.prototype.copy=function(t,n,i,r){if(i||(i=0),!r&&r!==0&&(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<i&&(r=i),r===i||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-i&&(r=t.length-n+i);var o=r-i,s;if(this===t&&i<n&&n<r)for(s=o-1;s>=0;--s)t[s+n]=this[s+i];else if(o<1e3||!ve.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+n]=this[s+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+o),n);return o},ve.prototype.fill=function(t,n,i,r){if(typeof t=="string"){if(typeof n=="string"?(r=n,n=0,i=this.length):typeof i=="string"&&(r=i,i=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(r!==void 0&&typeof r!="string")throw new TypeError("encoding must be a string");if(typeof r=="string"&&!ve.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<i)throw new RangeError("Out of range index");if(i<=n)return this;n=n>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);var s;if(typeof t=="number")for(s=n;s<i;++s)this[s]=t;else{var a=aa(t)?t:l1(new ve(t,r).toString()),c=a.length;for(s=0;s<i-n;++s)this[s+n]=a[s%c]}return this};var JFe=/[^+\/0-9A-Za-z-_]/g;function QFe(e){if(e=qFe(e).replace(JFe,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function qFe(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function $Fe(e){return e<16?"0"+e.toString(16):e.toString(16)}function l1(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s<i;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return o}function e4e(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function t4e(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}function eD(e){return MFe(QFe(e))}function u1(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function n4e(e){return e!==e}function jr(e){return e!=null&&(!!e._isBuffer||tD(e)||i4e(e))}function tD(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function i4e(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&tD(e.slice(0,0))}var zT;function Kc(){}Kc.prototype=Object.create(null);function Bt(){Bt.init.call(this)}Bt.EventEmitter=Bt,Bt.usingDomains=!1,Bt.prototype.domain=void 0,Bt.prototype._events=void 0,Bt.prototype._maxListeners=void 0,Bt.defaultMaxListeners=10,Bt.init=function(){this.domain=null,Bt.usingDomains&&zT.active&&!(this instanceof zT.Domain)&&(this.domain=zT.active),(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new Kc,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Bt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this};function nD(e){return e._maxListeners===void 0?Bt.defaultMaxListeners:e._maxListeners}Bt.prototype.getMaxListeners=function(){return nD(this)};function r4e(e,t,n){if(t)e.call(n);else for(var i=e.length,r=M0(e,i),o=0;o<i;++o)r[o].call(n)}function o4e(e,t,n,i){if(t)e.call(n,i);else for(var r=e.length,o=M0(e,r),s=0;s<r;++s)o[s].call(n,i)}function s4e(e,t,n,i,r){if(t)e.call(n,i,r);else for(var o=e.length,s=M0(e,o),a=0;a<o;++a)s[a].call(n,i,r)}function a4e(e,t,n,i,r,o){if(t)e.call(n,i,r,o);else for(var s=e.length,a=M0(e,s),c=0;c<s;++c)a[c].call(n,i,r,o)}function c4e(e,t,n,i){if(t)e.apply(n,i);else for(var r=e.length,o=M0(e,r),s=0;s<r;++s)o[s].apply(n,i)}Bt.prototype.emit=function(t){var n,i,r,o,s,a,c,l=t==="error";if(a=this._events,a)l=l&&a.error==null;else if(!l)return!1;if(c=this.domain,l){if(n=arguments[1],c)n||(n=new Error('Uncaught, unspecified "error" event')),n.domainEmitter=this,n.domain=c,n.domainThrown=!1,c.emit("error",n);else{if(n instanceof Error)throw n;var u=new Error('Uncaught, unspecified "error" event. ('+n+")");throw u.context=n,u}return!1}if(i=a[t],!i)return!1;var h=typeof i=="function";switch(r=arguments.length,r){case 1:r4e(i,h,this);break;case 2:o4e(i,h,this,arguments[1]);break;case 3:s4e(i,h,this,arguments[1],arguments[2]);break;case 4:a4e(i,h,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),s=1;s<r;s++)o[s-1]=arguments[s];c4e(i,h,this,o)}return!0};function iD(e,t,n,i){var r,o,s;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(o=e._events,o?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]):(o=e._events=new Kc,e._eventsCount=0),!s)s=o[t]=n,++e._eventsCount;else if(typeof s=="function"?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(r=nD(e),r&&r>0&&s.length>r)){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,l4e(a)}return e}function l4e(e){typeof console.warn=="function"?console.warn(e):console.log(e)}Bt.prototype.addListener=function(t,n){return iD(this,t,n,!1)},Bt.prototype.on=Bt.prototype.addListener,Bt.prototype.prependListener=function(t,n){return iD(this,t,n,!0)};function rD(e,t,n){var i=!1;function r(){e.removeListener(t,r),i||(i=!0,n.apply(e,arguments))}return r.listener=n,r}Bt.prototype.once=function(t,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.on(t,rD(this,t,n)),this},Bt.prototype.prependOnceListener=function(t,n){if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(t,rD(this,t,n)),this},Bt.prototype.removeListener=function(t,n){var i,r,o,s,a;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');if(r=this._events,!r)return this;if(i=r[t],!i)return this;if(i===n||i.listener&&i.listener===n)--this._eventsCount===0?this._events=new Kc:(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||n));else if(typeof i!="function"){for(o=-1,s=i.length;s-- >0;)if(i[s]===n||i[s].listener&&i[s].listener===n){a=i[s].listener,o=s;break}if(o<0)return this;if(i.length===1){if(i[0]=void 0,--this._eventsCount===0)return this._events=new Kc,this;delete r[t]}else u4e(i,o);r.removeListener&&this.emit("removeListener",t,a||n)}return this},Bt.prototype.removeAllListeners=function(t){var n,i;if(i=this._events,!i)return this;if(!i.removeListener)return arguments.length===0?(this._events=new Kc,this._eventsCount=0):i[t]&&(--this._eventsCount===0?this._events=new Kc:delete i[t]),this;if(arguments.length===0){for(var r=Object.keys(i),o=0,s;o<r.length;++o)s=r[o],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=new Kc,this._eventsCount=0,this}if(n=i[t],typeof n=="function")this.removeListener(t,n);else if(n)do this.removeListener(t,n[n.length-1]);while(n[0]);return this},Bt.prototype.listeners=function(t){var n,i,r=this._events;return r?(n=r[t],n?typeof n=="function"?i=[n.listener||n]:i=h4e(n):i=[]):i=[],i},Bt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):oD.call(e,t)},Bt.prototype.listenerCount=oD;function oD(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}Bt.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function u4e(e,t){for(var n=t,i=n+1,r=e.length;i<r;n+=1,i+=1)e[n]=e[i];e.pop()}function M0(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function h4e(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function sD(){throw new Error("setTimeout has not been defined")}function aD(){throw new Error("clearTimeout has not been defined")}var Jc=sD,Qc=aD;typeof cd.setTimeout=="function"&&(Jc=setTimeout),typeof cd.clearTimeout=="function"&&(Qc=clearTimeout);function cD(e){if(Jc===setTimeout)return setTimeout(e,0);if((Jc===sD||!Jc)&&setTimeout)return Jc=setTimeout,setTimeout(e,0);try{return Jc(e,0)}catch{try{return Jc.call(null,e,0)}catch{return Jc.call(this,e,0)}}}function d4e(e){if(Qc===clearTimeout)return clearTimeout(e);if((Qc===aD||!Qc)&&clearTimeout)return Qc=clearTimeout,clearTimeout(e);try{return Qc(e)}catch{try{return Qc.call(null,e)}catch{return Qc.call(this,e)}}}var Ya=[],ld=!1,ou,h1=-1;function f4e(){!ld||!ou||(ld=!1,ou.length?Ya=ou.concat(Ya):h1=-1,Ya.length&&lD())}function lD(){if(!ld){var e=cD(f4e);ld=!0;for(var t=Ya.length;t;){for(ou=Ya,Ya=[];++h1<t;)ou&&ou[h1].run();h1=-1,t=Ya.length}ou=null,ld=!1,d4e(e)}}function Do(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ya.push(new uD(e,t)),Ya.length===1&&!ld&&cD(lD)}function uD(e,t){this.fun=e,this.array=t}uD.prototype.run=function(){this.fun.apply(null,this.array)};var p4e={},L0=cd.performance||{};L0.now||L0.mozNow||L0.msNow||L0.oNow||L0.webkitNow;var d1={env:p4e},NT;typeof Object.create=="function"?NT=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:NT=function(t,n){t.super_=n;var i=function(){};i.prototype=n.prototype,t.prototype=new i,t.prototype.constructor=t};var ud=NT,m4e=/%[sdj%]/g;function g4e(e){if(!UT(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(qc(arguments[n]));return t.join(" ")}for(var n=1,i=arguments,r=i.length,o=String(e).replace(m4e,function(a){if(a==="%%")return"%";if(n>=r)return a;switch(a){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return a}}),s=i[n];n<r;s=i[++n])DT(s)||!P0(s)?o+=" "+s:o+=" "+qc(s);return o}function hD(e,t){if($c(cd.process))return function(){return hD(e,t).apply(this,arguments)};if(d1.noDeprecation===!0)return e;var n=!1;function i(){if(!n){if(d1.throwDeprecation)throw new Error(t);d1.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}return i}var f1={},kT;function y4e(e){if($c(kT)&&(kT=d1.env.NODE_DEBUG||""),e=e.toUpperCase(),!f1[e])if(new RegExp("\\b"+e+"\\b","i").test(kT)){var t=0;f1[e]=function(){var n=g4e.apply(null,arguments);console.error("%s %d: %s",e,t,n)}}else f1[e]=function(){};return f1[e]}function qc(e,t){var n={seen:[],stylize:_4e};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),dD(t)?n.showHidden=t:t&&C4e(n,t),$c(n.showHidden)&&(n.showHidden=!1),$c(n.depth)&&(n.depth=2),$c(n.colors)&&(n.colors=!1),$c(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=b4e),p1(n,e,n.depth)}qc.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},qc.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function b4e(e,t){var n=qc.styles[t];return n?"\x1B["+qc.colors[n][0]+"m"+e+"\x1B["+qc.colors[n][1]+"m":e}function _4e(e,t){return e}function v4e(e){var t={};return e.forEach(function(n,i){t[n]=!0}),t}function p1(e,t,n){if(e.customInspect&&t&&YT(t.inspect)&&t.inspect!==qc&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(n,e);return UT(i)||(i=p1(e,i,n)),i}var r=w4e(e,t);if(r)return r;var o=Object.keys(t),s=v4e(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),BT(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return XT(t);if(o.length===0){if(YT(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(WT(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(fD(t))return e.stylize(Date.prototype.toString.call(t),"date");if(BT(t))return XT(t)}var c="",l=!1,u=["{","}"];if(E4e(t)&&(l=!0,u=["[","]"]),YT(t)){var h=t.name?": "+t.name:"";c=" [Function"+h+"]"}if(WT(t)&&(c=" "+RegExp.prototype.toString.call(t)),fD(t)&&(c=" "+Date.prototype.toUTCString.call(t)),BT(t)&&(c=" "+XT(t)),o.length===0&&(!l||t.length==0))return u[0]+c+u[1];if(n<0)return WT(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var d;return l?d=x4e(e,t,n,s,o):d=o.map(function(f){return ZT(e,t,n,s,f,l)}),e.seen.pop(),S4e(d,c,u)}function w4e(e,t){if($c(t))return e.stylize("undefined","undefined");if(UT(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(T4e(t))return e.stylize(""+t,"number");if(dD(t))return e.stylize(""+t,"boolean");if(DT(t))return e.stylize("null","null")}function XT(e){return"["+Error.prototype.toString.call(e)+"]"}function x4e(e,t,n,i,r){for(var o=[],s=0,a=t.length;s<a;++s)pD(t,String(s))?o.push(ZT(e,t,n,i,String(s),!0)):o.push("");return r.forEach(function(c){c.match(/^\d+$/)||o.push(ZT(e,t,n,i,c,!0))}),o}function ZT(e,t,n,i,r,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(t,r)||{value:t[r]},c.get?c.set?a=e.stylize("[Getter/Setter]","special"):a=e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),pD(i,r)||(s="["+r+"]"),a||(e.seen.indexOf(c.value)<0?(DT(n)?a=p1(e,c.value,null):a=p1(e,c.value,n-1),a.indexOf(`
6732
6732
  `)>-1&&(o?a=a.split(`
6733
6733
  `).map(function(l){return" "+l}).join(`
6734
6734
  `).substr(2):a=`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reearth/core",
3
- "version": "0.0.7-alpha.68",
3
+ "version": "0.0.7-alpha.69",
4
4
  "author": "Re:Earth contributors <community@reearth.io>",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A library that abstracts a map engine as one common API.",
@@ -253,7 +253,9 @@ const Cesium: React.ForwardRefRenderFunction<EngineRef, EngineProps> = (
253
253
  useWebVR={!!property?.scene?.vr || undefined} // NOTE: useWebVR={false} will crash Cesium
254
254
  debugShowFramesPerSecond={!!property?.debug?.showFramesPerSecond}
255
255
  verticalExaggerationRelativeHeight={property?.scene?.verticalExaggerationRelativeHeight}
256
- verticalExaggeration={property?.scene?.verticalExaggeration}
256
+ verticalExaggeration={
257
+ property?.terrain?.enabled ? property?.scene?.verticalExaggeration : 1
258
+ }
257
259
  />
258
260
  <SkyBox show={property?.sky?.skyBox?.show ?? true} />
259
261
  <Fog enabled={property?.sky?.fog?.enabled ?? true} density={property?.sky?.fog?.density} />