dsh-code-server-app 0.1.32 → 0.1.37
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/README.en.md +134 -90
- package/README.md +123 -88
- package/lib/client.js +3 -3
- package/lib/index.js +159 -90
- package/lib/native.js +86 -0
- package/lib/vendor.js +107 -0
- package/package.json +59 -11
- package/scripts/vendor-code-server-pkg.mjs +137 -0
- package/scripts/vendor-code-server.mjs +293 -0
- package/scripts/vendor-repacks.mjs +449 -0
- package/vendor/VENDOR.json +9 -0
- package/scripts/setup-code-server.mjs +0 -239
package/lib/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({id:'dsh-code-server-app',factory:function(require){var module={exports:{}};var exports=module.exports;
|
|
2
|
-
var Si=Object.defineProperty;var Ac=Object.getOwnPropertyDescriptor;var Dc=Object.getOwnPropertyNames;var kc=Object.prototype.hasOwnProperty;var Rc=(e,t)=>{for(var r in t)Si(e,r,{get:t[r],enumerable:!0})},Lc=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Dc(t))!kc.call(e,i)&&i!==r&&Si(e,i,{get:()=>t[i],enumerable:!(n=Ac(t,i))||n.enumerable});return e};var Ic=e=>Lc(Si({},"__esModule",{value:!0}),e);var $m={};Rc($m,{apply:()=>Hm,inject:()=>_m,name:()=>Ym});module.exports=Ic($m);var es=require("react"),Hr=(0,es.createContext)({});var ts=require("react");function rs(e){let t=(0,ts.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Kr=require("react");var ns=typeof window!="undefined";var is=ns?Kr.useLayoutEffect:Kr.useEffect;var os=require("react"),Tt=(0,os.createContext)(null);function nt(e,t){e.indexOf(t)===-1&&e.push(t)}function Ge(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Z=(e,t,r)=>r>t?t:r<e?e:r;var Re=()=>{},ce=()=>{};var oe={};var $t=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var Xt=e=>typeof e=="object"&&e!==null;var qt=e=>/^0[^.\s]+$/u.test(e);function Zt(e){let t;return()=>(t===void 0&&(t=e()),t)}var z=e=>e;var be=(...e)=>e.reduce((t,r)=>n=>r(t(n)));var Se=(e,t,r)=>{let n=t-e;return n?(r-e)/n:1};var Le=class{constructor(){this.subscriptions=[]}add(t){return nt(this.subscriptions,t),()=>Ge(this.subscriptions,t)}notify(t,r,n){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let s=0;s<i;s++){let o=this.subscriptions[s];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var K=e=>e*1e3,te=e=>e/1e3;var Jt=(e,t)=>t?e*(1e3/t):0;var ss=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Oc=1e-7,Nc=12;function Bc(e,t,r,n,i){let s,o,a=0;do o=t+(r-t)/2,s=ss(o,n,i)-e,s>0?r=o:t=o;while(Math.abs(s)>Oc&&++a<Nc);return o}function We(e,t,r,n){if(e===t&&r===n)return z;let i=s=>Bc(s,0,1,e,r);return s=>s===0||s===1?s:ss(i(s),t,n)}var _r=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Yr=e=>t=>1-e(1-t);var $r=We(.33,1.53,.69,.99),St=Yr($r),Qt=_r(St);var er=e=>e>=1?1:(e*=2)<1?.5*St(e):.5*(2-Math.pow(2,-10*(e-1)));var tr=e=>1-Math.sin(Math.acos(e)),rr=Yr(tr),nr=_r(tr);var Ci=We(.42,0,1,1),Vi=We(0,0,.58,1),ir=We(.42,0,.58,1);var Ei=e=>Array.isArray(e)&&typeof e[0]!="number";var or=e=>Array.isArray(e)&&typeof e[0]=="number";var as={linear:z,easeIn:Ci,easeInOut:ir,easeOut:Vi,circIn:tr,circInOut:nr,circOut:rr,backIn:St,backInOut:Qt,backOut:$r,anticipate:er},Fc=e=>typeof e=="string",Xr=e=>{if(or(e)){ce(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,i]=e;return We(t,r,n,i)}else if(Fc(e))return ce(as[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),as[e];return e};var sr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ls(e){let t=new Set,r=new Set,n=!1,i=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}let l={schedule:(u,c=!1,f=!1)=>{let d=f&&n?t:r;return c&&s.add(u),d.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(o=u,n){i=!0;return}n=!0;let c=t;t=r,r=c,t.forEach(a),t.clear(),n=!1,i&&(i=!1,l.process(u))}};return l}var jc=40;function qr(e,t){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,o=sr.reduce((w,v)=>(w[v]=ls(s),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:m,render:d,postRender:h}=o,g=()=>{let w=oe.useManualTiming,v=w?i.timestamp:performance.now();r=!1,w||(i.delta=n?1e3/60:Math.max(Math.min(v-i.timestamp,jc),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),m.process(i),d.process(i),h.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(g))},x=()=>{r=!0,n=!0,i.isProcessing||e(g)};return{schedule:sr.reduce((w,v)=>{let T=o[v];return w[v]=(P,M=!1,C=!1)=>(r||x(),T.schedule(P,M,C)),w},{}),cancel:w=>{for(let v=0;v<sr.length;v++)o[sr[v]].cancel(w)},state:i,steps:o}}var{schedule:E,cancel:ue,state:H,steps:ar}=qr(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:z,!0);var Zr;function zc(){Zr=void 0}var G={now:()=>(Zr===void 0&&G.set(H.isProcessing||oe.useManualTiming?H.timestamp:performance.now()),Zr),set:e=>{Zr=e,queueMicrotask(zc)}};var cs=e=>t=>typeof t=="string"&&t.startsWith(e),Jr=cs("--"),Gc=cs("var(--"),Ct=e=>Gc(e)?Wc.test(e.split("/*")[0].trim()):!1,Wc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var Ce={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ie={...Ce,transform:e=>Z(0,1,e)},lr={...Ce,default:1};var Ue=e=>Math.round(e*1e5)/1e5;var Vt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function us(e){return e==null}var fs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Et=(e,t)=>r=>!!(typeof r=="string"&&fs.test(r)&&r.startsWith(e)||t&&!us(r)&&Object.prototype.hasOwnProperty.call(r,t)),Qr=(e,t,r)=>n=>{if(typeof n!="string")return n;let[i,s,o,a]=n.match(Vt);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}};var Uc=e=>Z(0,255,e),Mi={...Ce,transform:e=>Math.round(Uc(e))},Ve={test:Et("rgb","red"),parse:Qr("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Mi.transform(e)+", "+Mi.transform(t)+", "+Mi.transform(r)+", "+Ue(Ie.transform(n))+")"};function Hc(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var cr={test:Et("#"),parse:Hc,transform:Ve.transform};var ur=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),he=ur("deg"),ie=ur("%"),S=ur("px"),Ai=ur("vh"),Di=ur("vw"),en={...ie,parse:e=>ie.parse(e)/100,transform:e=>ie.transform(e*100)};var He={test:Et("hsl","hue"),parse:Qr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ie.transform(Ue(t))+", "+ie.transform(Ue(r))+", "+Ue(Ie.transform(n))+")"};var B={test:e=>Ve.test(e)||cr.test(e)||He.test(e),parse:e=>Ve.test(e)?Ve.parse(e):He.test(e)?He.parse(e):cr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ve.transform(e):He.transform(e),getAnimatableNone:e=>{let t=B.parse(e);return t.alpha=0,B.transform(t)}};var ms=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Kc(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vt))==null?void 0:t.length)||0)+(((r=e.match(ms))==null?void 0:r.length)||0)>0}var ps="number",hs="color",_c="var",Yc="var(",ds="${}",$c=/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 Ke(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[],s=0,a=t.replace($c,l=>(B.test(l)?(n.color.push(s),i.push(hs),r.push(B.parse(l))):l.startsWith(Yc)?(n.var.push(s),i.push(_c),r.push(l)):(n.number.push(s),i.push(ps),r.push(parseFloat(l))),++s,ds)).split(ds);return{values:r,split:a,indexes:n,types:i}}function Xc(e){return Ke(e).values}function gs({split:e,types:t}){let r=e.length;return n=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],n[s]!==void 0){let o=t[s];o===ps?i+=Ue(n[s]):o===hs?i+=B.transform(n[s]):i+=n[s]}return i}}function qc(e){return gs(Ke(e))}var Zc=e=>typeof e=="number"?0:B.test(e)?B.getAnimatableNone(e):e,Jc=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Zc(e);function Qc(e){let t=Ke(e);return gs(t)(t.values.map((n,i)=>Jc(n,t.split[i])))}var J={test:Kc,parse:Xc,createTransformer:qc,getAnimatableNone:Qc};function ki(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xs({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{let a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;i=ki(l,a,e+1/3),s=ki(l,a,e),o=ki(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}function Pt(e,t){return r=>r>0?t:e}var A=(e,t,r)=>e+(t-e)*r;var Ri=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},eu=[cr,Ve,He],tu=e=>eu.find(t=>t.test(e));function ys(e){let t=tu(e);if(Re(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===He&&(r=xs(r)),r}var Li=(e,t)=>{let r=ys(e),n=ys(t);if(!r||!n)return Pt(e,t);let i={...r};return s=>(i.red=Ri(r.red,n.red,s),i.green=Ri(r.green,n.green,s),i.blue=Ri(r.blue,n.blue,s),i.alpha=A(r.alpha,n.alpha,s),Ve.transform(i))};var tn=new Set(["none","hidden"]);function vs(e,t){return tn.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function ru(e,t){return r=>A(e,t,r)}function rn(e){return typeof e=="number"?ru:typeof e=="string"?Ct(e)?Pt:B.test(e)?Li:ou:Array.isArray(e)?bs:typeof e=="object"?B.test(e)?Li:nu:Pt}function bs(e,t){let r=[...e],n=r.length,i=e.map((s,o)=>rn(s)(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}}function nu(e,t){let r={...e,...t},n={};for(let i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=rn(e[i])(e[i],t[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}}function iu(e,t){var i;let r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let o=t.types[s],a=e.indexes[o][n[o]],l=(i=e.values[a])!=null?i:0;r[s]=l,n[o]++}return r}var ou=(e,t)=>{let r=J.createTransformer(t),n=Ke(e),i=Ke(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?tn.has(e)&&!i.values.length||tn.has(t)&&!n.values.length?vs(e,t):be(bs(iu(n,i),i.values),r):(Re(!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"),Pt(e,t))};function nn(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?A(e,t,r):rn(e)(e,t)}var ws=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>E.update(t,r),stop:()=>ue(t),now:()=>H.isProcessing?H.timestamp:G.now()}};var on=(e,t,r=10)=>{let n="",i=Math.max(Math.round(t/r),2);for(let s=0;s<i;s++)n+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function Mt(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function Ts(e,t=100,r){let n=r({...e,keyframes:[0,t]}),i=Math.min(Mt(n),2e4);return{type:"keyframes",ease:s=>n.next(i*s).value/t,duration:te(i)}}var W={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};function Ni(e,t){return e*Math.sqrt(1-t*t)}var su=12;function au(e,t,r){let n=r;for(let i=1;i<su;i++)n=n-e(n)/t(n);return n}var Oi=.001;function lu({duration:e=W.duration,bounce:t=W.bounce,velocity:r=W.velocity,mass:n=W.mass}){let i,s;Re(e<=K(W.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Z(W.minDamping,W.maxDamping,o),e=Z(W.minDuration,W.maxDuration,te(e)),o<1?(i=u=>{let c=u*o,f=c*e,m=c-r,d=Ni(u,o),h=Math.exp(-f);return Oi-m/d*h},s=u=>{let f=u*o*e,m=f*r+r,d=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-f),g=Ni(Math.pow(u,2),o);return(-i(u)+Oi>0?-1:1)*((m-d)*h)/g}):(i=u=>{let c=Math.exp(-u*e),f=(u-r)*e+1;return-Oi+c*f},s=u=>{let c=Math.exp(-u*e),f=(r-u)*(e*e);return c*f});let a=5/e,l=au(i,s,a);if(e=K(e),isNaN(l))return{stiffness:W.stiffness,damping:W.damping,duration:e};{let u=Math.pow(l,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}var cu=["duration","bounce"],uu=["stiffness","damping","mass"];function Ss(e,t){return t.some(r=>e[r]!==void 0)}function fu(e){let t={velocity:W.velocity,stiffness:W.stiffness,damping:W.damping,mass:W.mass,isResolvedFromDuration:!1,...e};if(!Ss(e,uu)&&Ss(e,cu))if(t.velocity=0,e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,s=2*Z(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:W.mass,stiffness:i,damping:s}}else{let r=lu({...e,velocity:0});t={...t,...r,mass:W.mass},t.isResolvedFromDuration=!0}return t}function At(e=W.visualDuration,t=W.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:i}=r,s=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:f,velocity:m,isResolvedFromDuration:d}=fu({...r,velocity:-te(r.velocity||0)}),h=m||0,g=u/(2*Math.sqrt(l*c)),x=o-s,y=te(Math.sqrt(l/c)),b=Math.abs(x)<5;n||(n=b?W.restSpeed.granular:W.restSpeed.default),i||(i=b?W.restDelta.granular:W.restDelta.default);let w,v,T,P,M,C;if(g<1)T=Ni(y,g),P=(h+g*y*x)/T,w=V=>{let O=Math.exp(-g*y*V);return o-O*(P*Math.sin(T*V)+x*Math.cos(T*V))},M=g*y*P+x*T,C=g*y*x-P*T,v=V=>Math.exp(-g*y*V)*(M*Math.sin(T*V)+C*Math.cos(T*V));else if(g===1){w=O=>o-Math.exp(-y*O)*(x+(h+y*x)*O);let V=h+y*x;v=O=>Math.exp(-y*O)*(y*V*O-h)}else{let V=y*Math.sqrt(g*g-1);w=ee=>{let q=Math.exp(-g*y*ee),ae=Math.min(V*ee,300);return o-q*((h+g*y*x)*Math.sinh(ae)+V*x*Math.cosh(ae))/V};let O=(h+g*y*x)/V,$=g*y*O-x*V,X=g*y*x-O*V;v=ee=>{let q=Math.exp(-g*y*ee),ae=Math.min(V*ee,300);return q*($*Math.sinh(ae)+X*Math.cosh(ae))}}let U={calculatedDuration:d&&f||null,velocity:V=>K(v(V)),next:V=>{if(!d&&g<1){let $=Math.exp(-g*y*V),X=Math.sin(T*V),ee=Math.cos(T*V),q=o-$*(P*X+x*ee),ae=K($*(M*X+C*ee));return a.done=Math.abs(ae)<=n&&Math.abs(o-q)<=i,a.value=a.done?o:q,a}let O=w(V);if(d)a.done=V>=f;else{let $=K(v(V));a.done=Math.abs($)<=n&&Math.abs(o-O)<=i}return a.value=a.done?o:O,a},toString:()=>{let V=Math.min(Mt(U),2e4),O=on($=>U.next(V*$).value,V,30);return V+"ms "+O},toTransition:()=>{}};return U}At.applyToOptions=e=>{let t=Ts(e,100,At);return e.ease=t.ease,e.duration=K(t.duration),e.type="keyframes",e};var mu=5;function sn(e,t,r){let n=Math.max(t-mu,0);return Jt(r-e(n),t-n)}function fr({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){let f=e[0],m={done:!1,value:f},d=C=>a!==void 0&&C<a||l!==void 0&&C>l,h=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l,g=r*t,x=f+g,y=o===void 0?x:o(x);y!==x&&(g=y-f);let b=C=>-g*Math.exp(-C/n),w=C=>y+b(C),v=C=>{let U=b(C),V=w(C);m.done=Math.abs(U)<=u,m.value=m.done?y:V},T,P,M=C=>{d(m.value)&&(T=C,P=At({keyframes:[m.value,h(m.value)],velocity:sn(w,C,m.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return M(0),{calculatedDuration:null,next:C=>{let U=!1;return!P&&T===void 0&&(U=!0,v(C),M(C)),T!==void 0&&C>=T?P.next(C-T):(!U&&v(C),m)}}}function du(e,t,r){let n=[],i=r||oe.mix||nn,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){let l=Array.isArray(t)?t[o]||z:t;a=be(l,a)}n.push(a)}return n}function Cs(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let s=e.length;if(ce(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=du(t,n,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);let m=Se(e[f],e[f+1],c);return a[f](m)};return r?c=>u(Z(e[0],e[s-1],c)):u}function Vs(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=Se(0,t,n);e.push(A(r,1,i))}}function Es(e){let t=[0];return Vs(t,e.length-1),t}function Ps(e,t){return e.map(r=>r*t)}function pu(e,t){return e.map(()=>t||ir).splice(0,e.length-1)}function it({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let i=Ei(n)?n.map(Xr):Xr(n),s={done:!1,value:t[0]},o=Ps(r&&r.length===t.length?r:Es(t),e),a=Cs(o,t,{ease:Array.isArray(i)?i:pu(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}var hu=e=>e!==null;function _e(e,{repeat:t,repeatType:r="loop"},n,i=1){let s=e.filter(hu),a=i<0||t&&r!=="loop"&&t%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}var gu={decay:fr,inertia:fr,tween:it,keyframes:it,spring:At};function an(e){typeof e.type=="string"&&(e.type=gu[e.type])}var Ye=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var xu=e=>e/100,Oe=class extends Ye{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,i;let{motionValue:r}=this.options;r&&r.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;an(t);let{type:r=it,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t,{keyframes:a}=t,l=r||it;l!==it&&typeof a[0]!="number"&&(this.mixKeyframes=be(xu,nn(a[0],a[1])),a=[0,100]);let u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Mt(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:u=0,keyframes:c,repeat:f,repeatType:m,repeatDelay:d,type:h,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,v=n;if(f){let C=Math.min(this.currentTime,i)/a,U=Math.floor(C),V=C%1;!V&&C>=1&&(V=1),V===1&&U--,U=Math.min(U,f+1),!!(U%2)&&(m==="reverse"?(V=1-V,d&&(V-=d/a)):m==="mirror"&&(v=o)),w=Z(0,1,V)*a}let T;b?(this.delayState.value=c[0],T=this.delayState):T=v.next(w),s&&!b&&(T.value=s(T.value));let{done:P}=T;!b&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return M&&h!==fr&&(T.value=_e(c,this.options,x,this.speed)),g&&g(T.value),M&&this.finish(),T}then(t,r){return this.finished.then(t,r)}get duration(){return te(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+te(t)}get time(){return te(this.currentTime)}set time(t){t=K(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))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let r=this.generator.next(t).value;return sn(n=>this.generator.next(n).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(G.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=te(this.currentTime))}play(){var i,s;if(this.isStopped)return;let{driver:t=ws,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r!=null?r:n),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(G.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}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){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}};function Ms(e){var t;for(let r=1;r<e.length;r++)(t=e[r])!=null||(e[r]=e[r-1])}var ot=e=>e*180/Math.PI,Bi=e=>{let t=ot(Math.atan2(e[1],e[0]));return Fi(t)},yu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bi,rotateZ:Bi,skewX:e=>ot(Math.atan(e[1])),skewY:e=>ot(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Fi=e=>(e=e%360,e<0&&(e+=360),e),As=Bi,Ds=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ks=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ds,scaleY:ks,scale:e=>(Ds(e)+ks(e))/2,rotateX:e=>Fi(ot(Math.atan2(e[6],e[5]))),rotateY:e=>Fi(ot(Math.atan2(-e[2],e[0]))),rotateZ:As,rotate:As,skewX:e=>ot(Math.atan(e[4])),skewY:e=>ot(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ln(e){return e.includes("scale")?1:0}function cn(e,t){if(!e||e==="none")return ln(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,i;if(r)n=vu,i=r;else{let a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=yu,i=a}if(!i)return ln(t);let s=n[t],o=i[1].split(",").map(bu);return typeof s=="function"?s(o):o[s]}var Rs=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return cn(r,t)};function bu(e){return parseFloat(e.trim())}var Ee=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=new Set([...Ee,"pathRotation"]);var ji=e=>e===Ce||e===S,wu=new Set(["x","y","z"]),Tu=Ee.filter(e=>!wu.has(e));function Ls(e){let t=[];return Tu.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var Ne={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{let i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{let i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},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})=>cn(t,"x"),y:(e,{transform:t})=>cn(t,"y")};Ne.translateX=Ne.x;Ne.translateY=Ne.y;var st=new Set,zi=!1,Gi=!1,Wi=!1;function Is(){if(Gi){let e=Array.from(st).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let i=Ls(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let i=r.get(n);i&&i.forEach(([s,o])=>{var a;(a=n.getValue(s))==null||a.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Gi=!1,zi=!1,st.forEach(e=>e.complete(Wi)),st.clear()}function Os(){st.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gi=!0)})}function Ns(){Wi=!0,Os(),Is(),Wi=!1}var $e=class{constructor(t,r,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(st.add(this),zi||(zi=!0,E.read(Os),E.resolveKeyframes(Is))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){let s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(n&&r){let a=n.readValue(r,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}Ms(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),st.delete(this)}cancel(){this.state==="scheduled"&&(st.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Bs=e=>e.startsWith("--");function un(e,t,r){Bs(t)?e.style.setProperty(t,r):e.style[t]=r}var Fs={};function fn(e,t){let r=Zt(e);return()=>{var n;return(n=Fs[t])!=null?n:r()}}var js=fn(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var mn=fn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing");var at=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var Ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:at([0,.65,.55,1]),circOut:at([.55,0,1,.45]),backIn:at([.31,.01,.66,-.59]),backOut:at([.33,1.53,.69,.99])};function Hi(e,t){if(e)return typeof e=="function"?mn()?on(e,t):"ease-out":or(e)?at(e):Array.isArray(e)?e.map(r=>Hi(r,t)||Ui.easeOut):Ui[e]}function zs(e,t,r,{delay:n=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){let c={[t]:r};l&&(c.offset=l);let f=Hi(a,i);Array.isArray(f)&&(c.easing=f);let m={delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(c,m)}function dn(e){return typeof e=="function"&&"applyToOptions"in e}function Gs({type:e,...t}){var r,n;return dn(e)&&mn()?e.applyToOptions(t):((r=t.duration)!=null||(t.duration=300),(n=t.ease)!=null||(t.ease="easeOut"),t)}var Dt=class extends Ye{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:r,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,ce(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Gs(t);this.animation=zs(r,n,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let c=_e(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),un(r,n,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,n,i;let t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(n=this.animation).commitStyles)==null||i.call(n))}get duration(){var r,n;let t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return te(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+te(t)}get time(){return te(Number(this.animation.currentTime)||0)}set time(t){let r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=K(t),r&&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(){var t;return(t=this.manualStartTime)!=null?t:Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:r,rangeEnd:n,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&js()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),n&&(this.animation.rangeEnd=n),z):i(this)}};var Ws={anticipate:er,backInOut:Qt,circInOut:nr};function Su(e){return e in Ws}function Us(e){typeof e.ease=="string"&&Su(e.ease)&&(e.ease=Ws[e.ease])}var Ki=10,pn=class extends Dt{constructor(t){Us(t),an(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let a=new Oe({...o,autoplay:!1}),l=Math.max(Ki,G.now()-this.startTime),u=Z(0,Ki,l-Ki),c=a.sample(l).value,{name:f}=this.options;s&&f&&un(s,f,c),r.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}};var _i=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(J.test(e)||e==="0")&&!e.startsWith("url("));function Cu(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Hs(e,t,r,n){let i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;let s=e[e.length-1],o=_i(i,t),a=_i(s,t);return Re(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Cu(e)||(r==="spring"||dn(r))&&n}function mr(e){e.duration=0,e.type="keyframes"}var hn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);var Vu=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ks(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Vu.test(e[t]))return!0;return!1}var Eu=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Pu=Zt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _s(e){var f;let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:s,type:o,keyframes:a}=e,l=(f=t==null?void 0:t.owner)==null?void 0:f.current;if(!(l instanceof HTMLElement)&&!(l instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:c}=t.owner.getProps();return Pu()&&r&&(hn.has(r)||Eu.has(r)&&Ks(a))&&(r!=="transform"||!c)&&!u&&!n&&i!=="mirror"&&s!==0&&o!=="inertia"}var Mu=40,gn=class extends Ye{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){var h;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=G.now();let m={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...f},d=(c==null?void 0:c.KeyframeResolver)||$e;this.keyframeResolver=new d(a,(g,x,y)=>this.onKeyframesResolved(g,x,m,!y),l,u,c),(h=this.keyframeResolver)==null||h.scheduleResolve()}onKeyframesResolved(t,r,n,i){var y,b;this.keyframeResolver=void 0;let{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=G.now();let f=!0;Hs(t,s,o,a)||(f=!1,(oe.instantAnimations||!l)&&(c==null||c(_e(t,n,r))),t[0]=t[t.length-1],mr(n),n.repeat=0);let d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Mu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},h=f&&!u&&_s(d),g=(b=(y=d.motionValue)==null?void 0:y.owner)==null?void 0:b.current,x;if(h)try{x=new pn({...d,element:g})}catch(w){x=new Oe(d)}else x=new Oe(d);x.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ns()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}};function xn(e,t,r,n=0,i=1){let s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,a=(o-1)*n;return typeof r=="function"?r(s,o):i===1?s*n:a-s*n}var Ys=30,Au=e=>!isNaN(parseFloat(e)),$s={current:void 0},Yi=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var s;let i=G.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(let o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=G.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Au(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Le);let n=this.events[t].add(r);return t==="change"?()=>{n(),E.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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 $s.current&&$s.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=G.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ys)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Ys);return Jt(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function we(e,t){return new Yi(e,t)}function yn(e,t){if(e!=null&&e.inherit&&t){let{inherit:r,...n}=e;return{...t,...n}}return e}function kt(e,t){var n,i;let r=(i=(n=e==null?void 0:e[t])!=null?n:e==null?void 0:e.default)!=null?i:e;return r!==e?yn(r,e):r}var Du={type:"spring",stiffness:500,damping:25,restSpeed:10},ku=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ru={type:"keyframes",duration:.8},Lu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xs=(e,{keyframes:t})=>t.length>2?Ru:ge.has(e)?e.startsWith("scale")?ku(t[1]):Du:Lu;var Iu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function qs(e){for(let t in e)if(!Iu.has(t))return!0;return!1}var lt=(e,t,r,n={},i,s)=>o=>{let a=kt(n,e)||{},l=a.delay||n.delay||0,{elapsed:u=0}=n;u=u-K(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};qs(a)||Object.assign(c,Xs(e,c)),c.duration&&(c.duration=K(c.duration)),c.repeatDelay&&(c.repeatDelay=K(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(mr(c),c.delay===0&&(f=!0)),(oe.instantAnimations||oe.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(f=!0,mr(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){let m=_e(c.keyframes,a);if(m!==void 0){E.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new Oe(c):new gn(c)};var Ou=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Nu(e){let t=Ou.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${r!=null?r:n}`,i]}var Bu=4;function $i(e,t,r=1){ce(r<=Bu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,i]=Nu(e);if(!n)return;let s=window.getComputedStyle(t).getPropertyValue(n);if(s){let o=s.trim();return $t(o)?parseFloat(o):o}return Ct(i)?$i(i,t,r+1):i}function Zs(e){let t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function ct(e,t,r,n){if(typeof t=="function"){let[i,s]=Zs(n);t=t(r!==void 0?r:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[i,s]=Zs(n);t=t(r!==void 0?r:e.custom,i,s)}return t}function me(e,t,r){let n=e.getProps();return ct(n,t,r!==void 0?r:n.custom,e)}var vn=new Set(["width","height","top","left","right","bottom",...Ee]);var dr=e=>Array.isArray(e);function Fu(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,we(r))}function ju(e){return dr(e)?e[e.length-1]||0:e}function Js(e,t){let r=me(e,t),{transitionEnd:n={},transition:i={},...s}=r||{};s={...s,...n};for(let o in s){let a=ju(s[o]);Fu(e,o,a)}}var I=e=>!!(e&&e.getVelocity);function Qs(e){return!!(I(e)&&e.add)}function Rt(e,t){let r=e.getValue("willChange");if(Qs(r))return r.add(t);if(!r&&oe.WillChange){let n=new oe.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Lt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var ea="framerAppearId",pr="data-"+Lt(ea);function bn(e){return e.props[pr]}function zu({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function wn(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var h;let{transition:s,transitionEnd:o,...a}=t,l=e.getDefaultTransition();s=s?yn(s,l):l;let u=s==null?void 0:s.reduceMotion,c=s==null?void 0:s.skipAnimations;n&&(s=n);let f=[],m=i&&e.animationState&&e.animationState.getState()[i],d=s==null?void 0:s.path;d&&d.animateVisualElement(e,a,s,r,f);for(let g in a){let x=e.getValue(g,(h=e.latestValues[g])!=null?h:null),y=a[g];if(y===void 0||m&&zu(m,g))continue;let b={delay:r,...kt(s||{},g)};c&&(b.skipAnimations=!0);let w=x.get();if(w!==void 0&&!x.isAnimating()&&!Array.isArray(y)&&y===w&&!b.velocity){E.update(()=>x.set(y));continue}let v=!1;if(window.MotionHandoffAnimation){let M=bn(e);if(M){let C=window.MotionHandoffAnimation(M,g,E);C!==null&&(b.startTime=C,v=!0)}}Rt(e,g);let T=u!=null?u:e.shouldReduceMotion;x.start(lt(g,x,y,T&&vn.has(g)?{type:!1}:b,e,v));let P=x.animation;P&&f.push(P)}if(o){let g=()=>E.update(()=>{o&&Js(e,o)});f.length?Promise.all(f).then(g):g()}return f}function Tn(e,t,r={}){var l;let n=me(e,t,r.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);let s=n?()=>Promise.all(wn(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:f,staggerDirection:m}=i;return Gu(e,t,u,c,f,m,r)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(r.delay)])}function Gu(e,t,r=0,n=0,i=0,s=1,o){let a=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),a.push(Tn(l,t,{...o,delay:r+(typeof n=="function"?0:n)+xn(e.variantChildren,l,n,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function ta(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let i=t.map(s=>Tn(e,s,r));n=Promise.all(i)}else if(typeof t=="string")n=Tn(e,t,r);else{let i=typeof t=="function"?me(e,t,r.custom):t;n=Promise.all(wn(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var ra={test:e=>e==="auto",parse:e=>e};var Sn=e=>t=>t.test(e);var Xi=[Ce,S,ie,he,Di,Ai,ra],qi=e=>Xi.find(Sn(e));function na(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qt(e):!0}var Wu=new Set(["brightness","contrast","saturate","opacity"]);function Uu(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(Vt)||[];if(!n)return e;let i=r.replace(n,""),s=Wu.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}var Hu=/\b([a-z-]*)\(.*?\)/gu,hr={...J,getAnimatableNone:e=>{let t=e.match(Hu);return t?t.map(Uu).join(" "):e}};var gr={...J,getAnimatableNone:e=>{let t=J.parse(e);return J.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}};var Zi={...Ce,transform:Math.round};var ia={rotate:he,pathRotation:he,rotateX:he,rotateY:he,rotateZ:he,scale:lr,scaleX:lr,scaleY:lr,scaleZ:lr,skew:he,skewX:he,skewY:he,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Ie,originX:en,originY:en,originZ:S};var ut={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,...ia,zIndex:Zi,fillOpacity:Ie,strokeOpacity:Ie,numOctaves:Zi};var Ku={...ut,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:hr,WebkitFilter:hr,mask:gr,WebkitMask:gr},Cn=e=>Ku[e];var _u=new Set([hr,gr]);function Vn(e,t){let r=Cn(e);return _u.has(r)||(r=J),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Yu=new Set(["auto","none","0"]);function oa(e,t,r){let n=0,i;for(;n<e.length&&!i;){let s=e[n];typeof s=="string"&&!Yu.has(s)&&Ke(s).values.length&&(i=e[n]),n++}if(i&&r)for(let s of t)e[s]=Vn(r,i)}var En=class extends $e{constructor(t,r,n,i,s){super(t,r,n,i,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let f=t[c];if(typeof f=="string"&&(f=f.trim(),Ct(f))){let m=$i(f,r.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!vn.has(n)||t.length!==2)return;let[i,s]=t,o=qi(i),a=qi(s),l=Pi(i),u=Pi(s);if(l!==u&&Ne[n]){this.needsMeasurement=!0;return}if(o!==a)if(ji(o)&&ji(a))for(let c=0;c<t.length;c++){let f=t[c];typeof f=="string"&&(t[c]=parseFloat(f))}else Ne[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||na(t[i]))&&n.push(i);n.length&&oa(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ne[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var a;let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);let s=n.length-1,o=n[s];n[s]=Ne[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}};var xr=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Pn(e,t,r){var n;if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;t&&(i=t.current);let s=(n=r==null?void 0:r[e])!=null?n:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}var yr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function sa(e){return Xt(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:ft,cancel:$u}=qr(queueMicrotask,!1);var xe={x:!1,y:!1};function Mn(){return xe.x||xe.y}function Ji(e){return e==="x"||e==="y"?xe[e]?null:(xe[e]=!0,()=>{xe[e]=!1}):xe.x||xe.y?null:(xe.x=xe.y=!0,()=>{xe.x=xe.y=!1})}function An(e,t){let r=Pn(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Xu(e){return!(e.pointerType==="touch"||Mn())}function Qi(e,t,r={}){let[n,i,s]=An(e,r);return n.forEach(o=>{let a=!1,l=!1,u,c=()=>{o.removeEventListener("pointerleave",h)},f=x=>{u&&(u(x),u=void 0),c()},m=x=>{a=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),l&&(l=!1,f(x))},d=()=>{a=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},h=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}f(x)}},g=x=>{if(!Xu(x))return;l=!1;let y=t(o,x);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",h,i))};o.addEventListener("pointerenter",g,i),o.addEventListener("pointerdown",d,i)}),s}var eo=(e,t)=>t?e===t?!0:eo(e,t.parentElement):!1;var mt=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var qu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function to(e){return qu.has(e.tagName)||e.isContentEditable===!0}var Zu=new Set(["INPUT","SELECT","TEXTAREA"]);function ro(e){return Zu.has(e.tagName)||e.isContentEditable===!0}var It=new WeakSet;function aa(e){return t=>{t.key==="Enter"&&e(t)}}function no(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var la=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=aa(()=>{if(It.has(r))return;no(r,"down");let i=aa(()=>{no(r,"up")}),s=()=>no(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",s,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function ca(e){return mt(e)&&!Mn()}var ua=new WeakSet;function io(e,t,r={}){let[n,i,s]=An(e,r),o=a=>{let l=a.currentTarget;if(!ca(a)||ua.has(a))return;It.add(l),r.stopPropagation&&ua.add(a);let u=t(l,a),c={...i,capture:!0},f=(h,g)=>{window.removeEventListener("pointerup",m,c),window.removeEventListener("pointercancel",d,c),It.has(l)&&It.delete(l),ca(h)&&typeof u=="function"&&u(h,{success:g})},m=h=>{f(h,l===window||l===document||r.useGlobalTarget||eo(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",m,c),window.addEventListener("pointercancel",d,c)};return n.forEach(a=>{(r.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),sa(a)&&(a.addEventListener("focus",u=>la(u,i)),!to(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Ot(e){return Xt(e)&&"ownerSVGElement"in e}var Dn=new WeakMap,Xe,fa=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:Ot(n)&&"getBBox"in n?n.getBBox()[t]:n[r],Ju=fa("inline","width","offsetWidth"),Qu=fa("block","height","offsetHeight");function ef({target:e,borderBoxSize:t}){var r;(r=Dn.get(e))==null||r.forEach(n=>{n(e,{get width(){return Ju(e,t)},get height(){return Qu(e,t)}})})}function tf(e){e.forEach(ef)}function rf(){typeof ResizeObserver!="undefined"&&(Xe=new ResizeObserver(tf))}function ma(e,t){Xe||rf();let r=Pn(e);return r.forEach(n=>{let i=Dn.get(n);i||(i=new Set,Dn.set(n,i)),i.add(t),Xe==null||Xe.observe(n)}),()=>{r.forEach(n=>{let i=Dn.get(n);i==null||i.delete(t),i!=null&&i.size||Xe==null||Xe.unobserve(n)})}}var kn=new Set,Nt;function nf(){Nt=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};kn.forEach(t=>t(e))},window.addEventListener("resize",Nt)}function da(e){return kn.add(e),Nt||nf(),()=>{kn.delete(e),!kn.size&&typeof Nt=="function"&&(window.removeEventListener("resize",Nt),Nt=void 0)}}function Rn(e,t){return typeof e=="function"?da(e):ma(e,t)}var dt={value:null,addProjectionMetrics:null};function pa(e){return Ot(e)&&e.tagName==="svg"}var of=[...Xi,B,J],ha=e=>of.find(Sn(e));var oo=()=>({translate:0,scale:1,origin:0,originPoint:0}),qe=()=>({x:oo(),y:oo()}),so=()=>({min:0,max:0}),F=()=>({x:so(),y:so()});var ga=new WeakMap;function Be(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pe(e){return typeof e=="string"||Array.isArray(e)}var Ln=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vr=["initial",...Ln];function Ze(e){return Be(e.animate)||vr.some(t=>Pe(e[t]))}function br(e){return!!(Ze(e)||e.variants)}function xa(e,t,r){for(let n in t){let i=t[n],s=r[n];if(I(i))e.addValue(n,i);else if(I(s))e.addValue(n,we(i,{owner:e}));else if(s!==i)if(e.hasValue(n)){let o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{let o=e.getStaticValue(n);e.addValue(n,we(o!==void 0?o:i,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var wr={current:null},In={current:!1};var sf=typeof window!="undefined";function ya(){if(In.current=!0,!!sf)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>wr.current=e.matches;e.addEventListener("change",t),t()}else wr.current=!1}var va=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],On={};function Sr(e){On=e}function ao(){return On}var Tr=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){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=$e,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=()=>{let d=G.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,E.render(this.render,!1,!0))};let{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Ze(r),this.isVariantNode=br(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:f,...m}=this.scrapeMotionValuesFromProps(r,{},this);for(let d in m){let h=m[d];u[d]!==void 0&&I(h)&&h.set(u[d])}}mount(t){var r,n,i;if(this.hasBeenMounted)for(let s in this.initialValues)(r=this.values.get(s))==null||r.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,ga.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(In.current||ya(),this.shouldReduceMotion=wr.current),this.shouldSkipAnimations=(n=this.skipAnimationsConfig)!=null?n:!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ue(this.notifyUpdate),ue(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(let r in this.events)this.events[r].clear();for(let r in this.features){let n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){var r;this.children.add(t),(r=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&hn.has(t)&&this.current instanceof HTMLElement){let{factory:o,keyframes:a,times:l,ease:u,duration:c}=r.accelerate,f=new Dt({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:K(c)}),m=o(f);this.valueSubscriptions.set(t,()=>{m(),f.cancel()});return}let n=ge.has(t);n&&this.onBindTransform&&this.onBindTransform();let i=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&E.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),s;typeof window!="undefined"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}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 On){let r=On[t];if(!r)continue;let{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){let s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<va.length;n++){let i=va[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=xa(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){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=we(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var i;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!=null?i:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&($t(n)||qt(n))?n=parseFloat(n):!ha(n)&&J.test(r)&&(n=Vn(t,r)),this.setBaseTarget(t,I(n)?n.get():n)),I(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var s;let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let o=ct(this.props,r,(s=this.presenceContext)==null?void 0:s.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;let i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!I(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Le),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){ft.render(this.render)}};var Bt=class extends Tr{constructor(){super(...arguments),this.KeyframeResolver=En}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){let n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;I(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};var Q=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function Cr({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function lo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function co(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function uo(e){return e===void 0||e===1}function Nn({scale:e,scaleX:t,scaleY:r}){return!uo(e)||!uo(t)||!uo(r)}function Fe(e){return Nn(e)||fo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fo(e){return ba(e.x)||ba(e.y)}function ba(e){return e&&e!=="0%"}function Vr(e,t,r){let n=e-r,i=t*n;return r+i}function wa(e,t,r,n,i){return i!==void 0&&(e=Vr(e,i,n)),Vr(e,r,n)+t}function mo(e,t=0,r=1,n,i){e.min=wa(e.min,t,r,n,i),e.max=wa(e.max,t,r,n,i)}function po(e,{x:t,y:r}){mo(e.x,t.translate,t.scale,t.originPoint),mo(e.y,r.translate,r.scale,r.originPoint)}var Ta=.999999999999,Sa=1.0000000000001;function Ea(e,t,r,n=!1){var a;let i=r.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=r[l],o=s.projectionDelta;let{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(ye(e.x,-s.scroll.offset.x),ye(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,po(e,o)),n&&Fe(s.latestValues)&&Er(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<Sa&&t.x>Ta&&(t.x=1),t.y<Sa&&t.y>Ta&&(t.y=1)}function ye(e,t){e.min+=t,e.max+=t}function Ca(e,t,r,n,i=.5){let s=A(e.min,e.max,i);mo(e,t,r,s,n)}function Va(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Er(e,t,r){let n=r!=null?r:e;Ca(e.x,Va(t.x,n.x),t.scaleX,t.scale,t.originX),Ca(e.y,Va(t.y,n.y),t.scaleY,t.scale,t.originY)}function Bn(e,t){return Cr(co(e.getBoundingClientRect(),t))}function ho(e,t,r){let n=Bn(e,r),{scroll:i}=t;return i&&(ye(n.x,i.offset.x),ye(n.y,i.offset.y)),n}var af={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lf=Ee.length;function Pa(e,t,r){let n="",i=!0;for(let o=0;o<lf;o++){let a=Ee[o],l=e[a];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(a.startsWith("scale")?1:0);else{let c=parseFloat(l);u=a.startsWith("scale")?c===1:c===0}if(!u||r){let c=yr(l,ut[a]);if(!u){i=!1;let f=af[a]||a;n+=`${f}(${c}) `}r&&(t[a]=c)}}let s=e.pathRotation;return s&&(i=!1,n+=`rotate(${yr(s,ut.pathRotation)}) `),n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function pt(e,t,r){let{style:n,vars:i,transformOrigin:s}=e,o=!1,a=!1;for(let l in t){let u=t[l];if(ge.has(l)){o=!0;continue}else if(Jr(l)){i[l]=u;continue}else{let c=yr(u,ut[l]);l.startsWith("origin")?(a=!0,s[l]=c):n[l]=c}}if(t.transform||(o||r?n.transform=Pa(t,e.transform,r):n.transform&&(n.transform="none")),a){let{originX:l="50%",originY:u="50%",originZ:c=0}=s;n.transformOrigin=`${l} ${u} ${c}`}}function Fn(e,{style:t,vars:r},n,i){let s=e.style,o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,n);for(o in r)s.setProperty(o,r[o])}function Ma(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ft={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(S.test(e))e=parseFloat(e);else return e;let r=Ma(e,t.target.x),n=Ma(e,t.target.y);return`${r}% ${n}%`}};var Aa={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,i=J.parse(e);if(i.length>5)return n;let s=J.createTransformer(e),o=typeof i[0]!="number"?1:0,a=r.x.scale*t.x,l=r.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;let u=A(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};var Pr={borderRadius:{...Ft,applyTo:[...xr]},borderTopLeftRadius:Ft,borderTopRightRadius:Ft,borderBottomLeftRadius:Ft,borderBottomRightRadius:Ft,boxShadow:Aa};function Mr(e,{layout:t,layoutId:r}){return ge.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Pr[e]||e==="opacity")}function ht(e,t,r){var o;let n=e.style,i=t==null?void 0:t.style,s={};if(!n)return s;for(let a in n)(I(n[a])||i&&I(i[a])||Mr(a,e)||((o=r==null?void 0:r.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=n[a]);return s}function cf(e){return window.getComputedStyle(e)}var Ar=class extends Bt{constructor(){super(...arguments),this.type="html",this.renderInstance=Fn}mount(t){ce(!!t.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(t)}readValueFromInstance(t,r){var n;if(ge.has(r))return(n=this.projection)!=null&&n.isProjecting?ln(r):Rs(t,r);{let i=cf(t),s=(Jr(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Bn(t,r)}build(t,r,n){pt(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return ht(t,r,n)}};var uf={offset:"stroke-dashoffset",array:"stroke-dasharray"},ff={offset:"strokeDashoffset",array:"strokeDasharray"};function Da(e,t,r=1,n=0,i=!0){e.pathLength=1;let s=i?uf:ff;e[s.offset]=`${-n}`,e[s.array]=`${t} ${r}`}var mf=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Dr(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){var d,h;if(pt(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=(d=f.transformOrigin)!=null?d:"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(h=c==null?void 0:c.transformBox)!=null?h:"fill-box",delete f.transformBox);for(let g of mf)f[g]!==void 0&&(m[g]=f[g],delete f[g]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&Da(f,i,s,o,!1)}var jn=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"]);var kr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ka(e,t,r,n){Fn(e,t,void 0,n);for(let i in t.attrs)e.setAttribute(jn.has(i)?i:Lt(i),t.attrs[i])}function Rr(e,t,r){let n=ht(e,t,r);for(let i in e)if(I(e[i])||I(t[i])){let s=Ee.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=e[i]}return n}var Lr=class extends Bt{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ge.has(r)){let n=Cn(r);return n&&n.default||0}return r=jn.has(r)?r:Lt(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return Rr(t,r,n)}build(t,r,n){Dr(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){ka(t,r,n,i)}mount(t){this.isSVGTag=kr(t.tagName),super.mount(t)}};var df=vr.length;function go(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?go(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<df;r++){let n=vr[r],i=e.props[n];(Pe(i)||i===!1)&&(t[n]=i)}return t}function xo(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var pf=[...Ln].reverse(),hf=Ln.length;function gf(e){return t=>Promise.all(t.map(({animation:r,options:n})=>ta(e,r,n)))}function yo(e){let t=gf(e),r=Ra(),n=!0,i=!1,s=u=>(c,f)=>{var d;let m=me(e,f,u==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(m){let{transition:h,transitionEnd:g,...x}=m;c={...c,...x,...g}}return c};function o(u){t=u(e)}function a(u){let{props:c}=e,f=go(e.parent)||{},m=[],d=new Set,h={},g=1/0;for(let y=0;y<hf;y++){let b=pf[y],w=r[b],v=c[b]!==void 0?c[b]:f[b],T=Pe(v),P=b===u?w.isActive:null;P===!1&&(g=y);let M=v===f[b]&&v!==c[b]&&T;if(M&&(n||i)&&e.manuallyAnimateOnMount&&(M=!1),w.protectedKeys={...h},!w.isActive&&P===null||!v&&!w.prevProp||Be(v)||typeof v=="boolean")continue;if(b==="exit"&&w.isActive&&P!==!0){w.prevResolvedValues&&(h={...h,...w.prevResolvedValues});continue}let C=La(w.prevProp,v),U=C||b===u&&w.isActive&&!M&&T||y>g&&T,V=!1,O=Array.isArray(v)?v:[v],$=O.reduce(s(b),{});P===!1&&($={});let{prevResolvedValues:X={}}=w,ee={...X,...$},q=k=>{U=!0,d.has(k)&&(V=!0,d.delete(k)),w.needsAnimating[k]=!0;let R=e.getValue(k);R&&(R.liveStyle=!1)};for(let k in ee){let R=$[k],Te=X[k];if(h.hasOwnProperty(k))continue;let ke=!1;dr(R)&&dr(Te)?ke=!xo(R,Te)||C:ke=R!==Te,ke?R!=null?q(k):d.add(k):R!==void 0&&d.has(k)?q(k):w.protectedKeys[k]=!0}w.prevProp=v,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),(n||i)&&e.blockInitialAnimation&&(U=!1);let ae=M&&C;U&&(!ae||V)&&m.push(...O.map(k=>{let R={type:b};if(typeof k=="string"&&(n||i)&&!ae&&e.manuallyAnimateOnMount&&e.parent){let{parent:Te}=e,ke=me(Te,k);if(Te.enteringChildren&&ke){let{delayChildren:bi}=ke.transition||{};R.delay=xn(Te.enteringChildren,e,bi)}}return{animation:k,options:R}}))}if(d.size){let y={};if(typeof c.initial!="boolean"){let b=me(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(y.transition=b.transition)}d.forEach(b=>{let w=e.getBaseTarget(b),v=e.getValue(b);v&&(v.liveStyle=!0),y[b]=w!=null?w:null}),m.push({animation:y})}let x=!!m.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,i=!1,x?t(m):Promise.resolve()}function l(u,c){var m;if(r[u].isActive===c)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(u,c)}),r[u].isActive=c;let f=a(u);for(let d in r)r[d].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Ra(),i=!0}}}function La(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xo(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ra(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}function zn(e,t){e.min=t.min,e.max=t.max}function ve(e,t){zn(e.x,t.x),zn(e.y,t.y)}function vo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ia=1e-4,xf=1-Ia,yf=1+Ia,Oa=.01,vf=0-Oa,bf=0+Oa;function Y(e){return e.max-e.min}function So(e,t,r){return Math.abs(e-t)<=r}function bo(e,t,r,n=.5){e.origin=n,e.originPoint=A(t.min,t.max,e.origin),e.scale=Y(r)/Y(t),e.translate=A(r.min,r.max,e.origin)-e.originPoint,(e.scale>=xf&&e.scale<=yf||isNaN(e.scale))&&(e.scale=1),(e.translate>=vf&&e.translate<=bf||isNaN(e.translate))&&(e.translate=0)}function xt(e,t,r,n){bo(e.x,t.x,r.x,n?n.originX:void 0),bo(e.y,t.y,r.y,n?n.originY:void 0)}function wo(e,t,r,n=0){let i=n?A(r.min,r.max,n):r.min;e.min=i+t.min,e.max=e.min+Y(t)}function Co(e,t,r,n){wo(e.x,t.x,r.x,n==null?void 0:n.x),wo(e.y,t.y,r.y,n==null?void 0:n.y)}function To(e,t,r,n=0){let i=n?A(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+Y(t)}function jt(e,t,r,n){To(e.x,t.x,r.x,n==null?void 0:n.x),To(e.y,t.y,r.y,n==null?void 0:n.y)}function Na(e,t,r,n,i){return e-=t,e=Vr(e,1/r,n),i!==void 0&&(e=Vr(e,1/i,n)),e}function wf(e,t=0,r=1,n=.5,i,s=e,o=e){if(ie.test(t)&&(t=parseFloat(t),t=A(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=A(s.min,s.max,n);e===s&&(a-=t),e.min=Na(e.min,t,r,a,i),e.max=Na(e.max,t,r,a,i)}function Ba(e,t,[r,n,i],s,o){wf(e,t[r],t[n],t[i],t.scale,s,o)}var Tf=["x","scaleX","originX"],Sf=["y","scaleY","originY"];function Vo(e,t,r,n){Ba(e.x,t,Tf,r?r.x:void 0,n?n.x:void 0),Ba(e.y,t,Sf,r?r.y:void 0,n?n.y:void 0)}function Fa(e){return e.translate===0&&e.scale===1}function Eo(e){return Fa(e.x)&&Fa(e.y)}function ja(e,t){return e.min===t.min&&e.max===t.max}function Ga(e,t){return ja(e.x,t.x)&&ja(e.y,t.y)}function za(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Po(e,t){return za(e.x,t.x)&&za(e.y,t.y)}function Mo(e){return Y(e.x)/Y(e.y)}function Ao(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function de(e){return[e("x"),e("y")]}function Wa(e,t,r){let n="",i=e.x.translate/t.x,s=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||s||o)&&(n=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,pathRotation:f,rotateX:m,rotateY:d,skewX:h,skewY:g}=r;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),f&&(n+=`rotate(${f}deg) `),m&&(n+=`rotateX(${m}deg) `),d&&(n+=`rotateY(${d}deg) `),h&&(n+=`skewX(${h}deg) `),g&&(n+=`skewY(${g}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}var Cf=xr.length,Ua=e=>typeof e=="string"?parseFloat(e):e,Ha=e=>typeof e=="number"||S.test(e);function _a(e,t,r,n,i,s){var o,a,l,u;i?(e.opacity=A(0,(o=r.opacity)!=null?o:1,Vf(n)),e.opacityExit=A((a=t.opacity)!=null?a:1,0,Ef(n))):s&&(e.opacity=A((l=t.opacity)!=null?l:1,(u=r.opacity)!=null?u:1,n));for(let c=0;c<Cf;c++){let f=xr[c],m=Ka(t,f),d=Ka(r,f);if(m===void 0&&d===void 0)continue;m||(m=0),d||(d=0),m===0||d===0||Ha(m)===Ha(d)?(e[f]=Math.max(A(Ua(m),Ua(d),n),0),(ie.test(d)||ie.test(m))&&(e[f]+="%")):e[f]=d}(t.rotate||r.rotate)&&(e.rotate=A(t.rotate||0,r.rotate||0,n))}function Ka(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Vf=Ya(0,.5,rr),Ef=Ya(.5,.95,z);function Ya(e,t,r){return n=>n<e?0:n>t?1:r(Se(e,t,n))}function $a(e,t,r){let n=I(e)?e:we(e);return n.start(lt("",n,t,r)),n.animation}function Me(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}var Xa=(e,t)=>e.depth-t.depth;var Gn=class{constructor(){this.children=[],this.isDirty=!1}add(t){nt(this.children,t),this.isDirty=!0}remove(t){Ge(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Xa),this.isDirty=!1,this.children.forEach(t)}};function qa(e,t){let r=G.now(),n=({timestamp:i})=>{let s=i-r;s>=t&&(ue(n),e(s-t))};return E.setup(n,!0),()=>ue(n)}function yt(e){return I(e)?e.get():e}var Wn=class{constructor(){this.members=[]}add(t){nt(this.members,t);for(let r=this.members.length-1;r>=0;r--){let n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;let i=n.instance;(!i||i.isConnected===!1)&&!n.snapshot&&(Ge(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(Ge(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){var r;for(let n=this.members.indexOf(t)-1;n>=0;n--){let i=this.members[n];if(i.isPresent!==!1&&((r=i.instance)==null?void 0:r.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,r){var i;let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();let{layoutDependency:s}=n.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=n,r&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var r,n,i,s,o;(n=(r=t.options).onExitComplete)==null||n.call(r),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}};var vt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var bt={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Do=["","X","Y","Z"],Pf=1e3,Mf=0;function ko(e,t,r,n){let{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function ol(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=bn(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",E,!(i||s))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&ol(n)}function Un({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Mf++,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,dt.value&&(bt.nodes=bt.calculatedTargetDeltas=bt.calculatedProjections=0),this.nodes.forEach(kf),this.nodes.forEach(Bf),this.nodes.forEach(Ff),this.nodes.forEach(Rf),dt.addProjectionMetrics&&dt.addProjectionMetrics(bt)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Gn)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Le),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){let l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ot(o)&&!pa(o),this.instance=o;let{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,f=0,m=()=>this.root.updateBlockedByResize=!1;E.read(()=>{f=window.innerWidth}),e(o,()=>{let d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,c&&c(),c=qa(m,250),vt.hasAnimatedSinceResize&&(vt.hasAnimatedSinceResize=!1,this.nodes.forEach(Qa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||Uf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!Po(this.targetLayout,d),b=!f&&m;if(this.options.layoutRoot||this.resumeFrom||b||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let w={...kt(h,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,b,w.path)}else f||Qa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ue(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(jf),this.animationId++)}getTransformTemplate(){let{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ol(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let f=this.path[c];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(If),this.nodes.forEach(Za);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ja);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Of),this.nodes.forEach(Nf),this.nodes.forEach(Af),this.nodes.forEach(Df)):this.nodes.forEach(Ja),this.clearAllSnapshots();let a=G.now();H.delta=Z(0,1e3/60,a-H.timestamp),H.timestamp=a,H.isProcessing=!0,ar.update.process(H),ar.preRender.process(H),ar.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ft.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Lf),this.sharedNodes.forEach(zf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Y(this.snapshot.measuredBox.x)&&!Y(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();let o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=F()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;let o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Eo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Fe(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){let a=this.measurePageBox(),l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Hf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;let{visualElement:o}=this.options;if(!o)return F();let a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Kf))){let{scroll:c}=this.root;c&&(ye(a.x,c.offset.x),ye(a.y,c.offset.y))}return a}removeElementScroll(o){var l;let a=F();if(ve(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:f,options:m}=c;c!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&ve(a,o),ye(a.x,f.offset.x),ye(a.y,f.offset.y))}return a}applyTransform(o,a=!1,l){var c,f;let u=l||F();ve(u,o);for(let m=0;m<this.path.length;m++){let d=this.path[m];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(ye(u.x,-d.scroll.offset.x),ye(u.y,-d.scroll.offset.y)),Fe(d.latestValues)&&Er(u,d.latestValues,(c=d.layout)==null?void 0:c.layoutBox)}return Fe(this.latestValues)&&Er(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var l;let a=F();ve(a,o);for(let u=0;u<this.path.length;u++){let c=this.path[u];if(!Fe(c.latestValues))continue;let f;c.instance&&(Nn(c.latestValues)&&c.updateSnapshot(),f=F(),ve(f,c.measurePageBox())),Vo(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,f)}return Fe(this.latestValues)&&Vo(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:f}=this.options;if(!this.layout||!(c||f))return;this.resolvedRelativeTargetAt=H.timestamp;let m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Co(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ve(this.target,this.layout.layoutBox),po(this.target,this.targetDelta)):ve(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0),dt.value&&bt.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Nn(this.parent.latestValues)||fo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),jt(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),ve(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var h;let o=this.getLead(),a=!!this.resumingFrom||this!==o,l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===H.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;ve(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,m=this.treeScale.y;Ea(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=F());let{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vo(this.prevProjectionDelta.x,this.projectionDelta.x),vo(this.prevProjectionDelta.y,this.projectionDelta.y)),xt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Ao(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ao(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),dt.value&&bt.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=qe(),this.projectionDelta=qe(),this.projectionDeltaWithTransform=qe()}setAnimationOrigin(o,a=!1,l){let u=this.snapshot,c=u?u.latestValues:{},f={...this.latestValues},m=qe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let d=F(),h=u?u.source:void 0,g=this.layout?this.layout.source:void 0,x=h!==g,y=this.getStack(),b=!y||y.members.length<=1,w=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(Wf));this.animationProgress=0;let v,T=l==null?void 0:l.interpolateProjection(o);this.mixTargetDelta=P=>{let M=P/1e3,C=T==null?void 0:T(M);C?(m.x.translate=C.x,m.x.scale=A(o.x.scale,1,M),m.x.origin=o.x.origin,m.x.originPoint=o.x.originPoint,m.y.translate=C.y,m.y.scale=A(o.y.scale,1,M),m.y.origin=o.y.origin,m.y.originPoint=o.y.originPoint):(el(m.x,o.x,M),el(m.y,o.y,M)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Gf(this.relativeTarget,this.relativeTargetOrigin,d,M),v&&Ga(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=F()),ve(v,this.relativeTarget)),x&&(this.animationValues=f,_a(f,c,this.latestValues,M,w,b)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ue(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{vt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=we(0)),this.motionValue.jump(0,!1),this.currentAnimation=$a(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onComplete:()=>{o.onComplete&&o.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);let o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let o=this.getLead(),{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&sl(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||F();let f=Y(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;let m=Y(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+m}ve(a,l),Er(a,c),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Wn),this.sharedNodes.get(o).add(a);let u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){let o=this.getStack();return o?o.lead===this:!0}getLead(){var a;let{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;let{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){let{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){let{visualElement:o}=this.options;if(!o)return;let a=!1,{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;let u={};l.z&&ko("z",o,u,this.animationValues);for(let c=0;c<Do.length;c++)ko(`rotate${Do[c]}`,o,u,this.animationValues),ko(`skew${Do[c]}`,o,u,this.animationValues);o.render();for(let c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){var h,g;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=yt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=yt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Fe(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Wa(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),o.transform=f;let{x:m,y:d}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?(g=(h=c.opacity)!=null?h:this.latestValues.opacity)!=null?g:1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let x in Pr){if(c[x]===void 0)continue;let{correct:y,applyTo:b,isCSSVariable:w}=Pr[x],v=f==="none"?c[x]:y(c[x],u);if(b){let T=b.length;for(let P=0;P<T;P++)o[b[P]]=v}else w?this.options.visualElement.renderState.vars[x]=v:o[x]=v}this.options.layoutId&&(o.pointerEvents=u===this?yt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Za),this.root.sharedNodes.clear()}}}function Af(e){e.updateLayout()}function Df(e){var r;let t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")de(f=>{let m=o?t.measuredBox[f]:t.layoutBox[f],d=Y(m);m.min=n[f].min,m.max=m.min+d});else if(s==="x"||s==="y"){let f=s==="x"?"y":"x";zn(o?t.measuredBox[f]:t.layoutBox[f],n[f])}else sl(s,t.layoutBox,n)&&de(f=>{let m=o?t.measuredBox[f]:t.layoutBox[f],d=Y(n[f]);m.max=m.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});let a=qe();xt(a,n,t.layoutBox);let l=qe();o?xt(l,e.applyTransform(i,!0),t.measuredBox):xt(l,n,t.layoutBox);let u=!Eo(a),c=!1;if(!e.resumeFrom){let f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){let{snapshot:m,layout:d}=f;if(m&&d){let h=e.options.layoutAnchor||void 0,g=F();jt(g,t.layoutBox,m.layoutBox,h);let x=F();jt(x,n,d.layoutBox,h),Po(g,x)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function kf(e){dt.value&&bt.nodes++,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 Rf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Lf(e){e.clearSnapshot()}function Za(e){e.clearMeasurements()}function If(e){e.isLayoutDirty=!0,e.updateLayout()}function Ja(e){e.isLayoutDirty=!1}function Of(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Nf(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Qa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Bf(e){e.resolveTargetDelta()}function Ff(e){e.calcProjection()}function jf(e){e.resetSkewAndRotation()}function zf(e){e.removeLeadSnapshot()}function el(e,t,r){e.translate=A(t.translate,0,r),e.scale=A(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function tl(e,t,r,n){e.min=A(t.min,r.min,n),e.max=A(t.max,r.max,n)}function Gf(e,t,r,n){tl(e.x,t.x,r.x,n),tl(e.y,t.y,r.y,n)}function Wf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Uf={duration:.45,ease:[.4,0,.1,1]},rl=e=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nl=rl("applewebkit/")&&!rl("chrome/")?Math.round:z;function il(e){e.min=nl(e.min),e.max=nl(e.max)}function Hf(e){il(e.x),il(e.y)}function sl(e,t,r){return e==="position"||e==="preserve-aspect"&&!So(Mo(t),Mo(r),.2)}function Kf(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}var al=Un({attachResizeListener:(e,t)=>Me(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0});var Hn={current:void 0},Ir=Un({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hn.current){let e=new al({});e.mount(window),e.setOptions({layoutScroll:!0}),Hn.current=e}return Hn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var ll=require("react"),Kn=(0,ll.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var Je=require("react");function cl(e=!0){let t=(0,Je.useContext)(Tt);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:i}=t,s=(0,Je.useId)();(0,Je.useEffect)(()=>{if(e)return i(s)},[e]);let o=(0,Je.useCallback)(()=>e&&n&&n(s),[s,n,e]);return!r&&n?[!1,o]:[!0]}var ul=require("react"),_n=(0,ul.createContext)({strict:!1});var fl={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"]},ml=!1;function _f(){if(ml)return;let e={};for(let t in fl)e[t]={isEnabled:r=>fl[t].some(n=>!!r[n])};Sr(e),ml=!0}function Yn(){return _f(),ao()}function dl(e){let t=Yn();for(let r in e)t[r]={...t[r],...e[r]};Sr(t)}var Yf=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 Or(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yf.has(e)}var pl=e=>!Or(e);function $f(e){typeof e=="function"&&(pl=t=>t.startsWith("on")?!Or(t):e(t))}try{$f(require("@emotion/is-prop-valid").default)}catch(e){}function hl(e,t,r){let n={};for(let i in e)i==="values"&&typeof e.values=="object"||I(e[i])||(pl(i)||r===!0&&Or(i)||!t&&!Or(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var Jn=require("react/jsx-runtime");var Ut=require("react");var gl=require("react"),Qe=(0,gl.createContext)({});var $n=require("react");function xl(e,t){if(Ze(e)){let{initial:r,animate:n}=e;return{initial:r===!1||Pe(r)?r:void 0,animate:Pe(n)?n:void 0}}return e.inherit!==!1?t:{}}function vl(e){let{initial:t,animate:r}=xl(e,(0,$n.useContext)(Qe));return(0,$n.useMemo)(()=>({initial:t,animate:r}),[yl(t),yl(r)])}function yl(e){return Array.isArray(e)?e.join(" "):e}var Wt=require("react");var bl=require("react");var zt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ro(e,t,r){for(let n in t)!I(t[n])&&!Mr(n,r)&&(e[n]=t[n])}function Xf({transformTemplate:e},t){return(0,bl.useMemo)(()=>{let r=zt();return pt(r,t,e),Object.assign({},r.vars,r.style)},[t])}function qf(e,t){let r=e.style||{},n={};return Ro(n,r,e),Object.assign(n,Xf(e,t)),n}function wl(e,t){let r={},n=qf(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var Tl=require("react");var Xn=()=>({...zt(),attrs:{}});function Sl(e,t,r,n){let i=(0,Tl.useMemo)(()=>{let s=Xn();return Dr(s,t,kr(n),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){let s={};Ro(s,e.style,e),i.style={...s,...i.style}}return i}var Cl=["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 Gt(e){return typeof e!="string"||e.includes("-")?!1:!!(Cl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vl(e,t,r,{latestValues:n},i,s=!1,o){let l=((o!=null?o:Gt(e))?Sl:wl)(t,n,i,e),u=hl(t,typeof e=="string",s),c=e!==Wt.Fragment?{...u,...l,ref:r}:{},{children:f}=t,m=(0,Wt.useMemo)(()=>I(f)?f.get():f,[f]);return(0,Wt.createElement)(e,{...c,children:m})}var Lo=require("react");function Zf({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:Jf(r,n,i,e),renderState:t()}}function Jf(e,t,r,n){let i={},s=n(e,{});for(let m in s)i[m]=yt(s[m]);let{initial:o,animate:a}=e,l=Ze(e),u=br(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=r?r.initial===!1:!1;c=c||o===!1;let f=c?a:o;if(f&&typeof f!="boolean"&&!Be(f)){let m=Array.isArray(f)?f:[f];for(let d=0;d<m.length;d++){let h=ct(e,m[d]);if(h){let{transitionEnd:g,transition:x,...y}=h;for(let b in y){let w=y[b];if(Array.isArray(w)){let v=c?w.length-1:0;w=w[v]}w!==null&&(i[b]=w)}for(let b in g)i[b]=g[b]}}}return i}var qn=e=>(t,r)=>{let n=(0,Lo.useContext)(Qe),i=(0,Lo.useContext)(Tt),s=()=>Zf(e,t,n,i);return r?s():rs(s)};var El=qn({scrapeMotionValuesFromProps:ht,createRenderState:zt});var Pl=qn({scrapeMotionValuesFromProps:Rr,createRenderState:Xn});var Ml=Symbol.for("motionComponentSymbol");var wt=require("react");function Al(e,t,r){let n=(0,wt.useRef)(r);(0,wt.useInsertionEffect)(()=>{n.current=r});let i=(0,wt.useRef)(null);return(0,wt.useCallback)(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());let o=n.current;if(typeof o=="function")if(s){let l=o(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[t])}var se=require("react");var Dl=require("react"),Zn=(0,Dl.createContext)({});function et(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kl(e,t,r,n,i,s){var w,v;let{visualElement:o}=(0,se.useContext)(Qe),a=(0,se.useContext)(_n),l=(0,se.useContext)(Tt),u=(0,se.useContext)(Kn),c=u.reducedMotion,f=u.skipAnimations,m=(0,se.useRef)(null),d=(0,se.useRef)(!1);n=n||a.renderer,!m.current&&n&&(m.current=n(e,{visualState:t,parent:o,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:f,isSVG:s}),d.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));let h=m.current,g=(0,se.useContext)(Zn);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Qf(m.current,r,i,g);let x=(0,se.useRef)(!1);(0,se.useInsertionEffect)(()=>{h&&x.current&&h.update(r,l)});let y=r[pr],b=(0,se.useRef)(!!y&&typeof window!="undefined"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,y)));return is(()=>{d.current=!0,h&&(x.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),b.current&&h.animationState&&h.animationState.animateChanges())}),(0,se.useEffect)(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,y)}),b.current=!1),h.enteringChildren=void 0)}),h}function Qf(e,t,r,n){let{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Rl(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&et(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Rl(e){if(e)return e.options.allowProjection!==!1?e.projection:Rl(e.parent)}function Qn(e,{forwardMotionProps:t=!1,type:r}={},n,i){var u,c;n&&dl(n);let s=r?r==="svg":Gt(e),o=s?Pl:El;function a(f,m){let d,h={...(0,Ut.useContext)(Kn),...f,layoutId:em(f)},{isStatic:g}=h,x=vl(f),y=o(f,g);if(!g&&typeof window!="undefined"){tm(h,n);let b=rm(h);d=b.MeasureLayout,x.visualElement=kl(e,y,h,i,b.ProjectionNode,s)}return(0,Jn.jsxs)(Qe.Provider,{value:x,children:[d&&x.visualElement?(0,Jn.jsx)(d,{visualElement:x.visualElement,...h}):null,Vl(e,f,Al(y,x.visualElement,m),y,g,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${(c=(u=e.displayName)!=null?u:e.name)!=null?c:""})`}`;let l=(0,Ut.forwardRef)(a);return l[Ml]=e,l}function em({layoutId:e}){let t=(0,Ut.useContext)(Hr).id;return t&&e!==void 0?t+"-"+e:e}function tm(e,t){let r=(0,Ut.useContext)(_n).strict}function rm(e){let t=Yn(),{drag:r,layout:n}=t;if(!r&&!n)return{};let i={...r,...n};return{MeasureLayout:r!=null&&r.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Ll(e,t){if(typeof Proxy=="undefined")return Qn;let r=new Map,n=(s,o)=>Qn(s,o,e,t),i=(s,o)=>n(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?n:(r.has(o)||r.set(o,Qn(o,void 0,e,t)),r.get(o))})}var Il=require("react");var Ol=(e,t)=>{var n;return((n=t.isSVG)!=null?n:Gt(e))?new Lr(t):new Ar(t,{allowProjection:e!==Il.Fragment})};var ei=class extends Q{constructor(t){super(t),t.animationState||(t.animationState=yo(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Be(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}};var nm=0,ti=class extends Q{constructor(){super(...arguments),this.id=nm++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){let{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){let l=me(this.node,o,a);if(l){let{transition:u,transitionEnd:c,...f}=l;for(let m in f)(s=this.node.getValue(m))==null||s.jump(f[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var Nl={animation:{Feature:ei},exit:{Feature:ti}};function je(e){return{point:{x:e.pageX,y:e.pageY}}}var Bl=e=>t=>mt(t)&&e(t,je(t));function tt(e,t,r,n){return Me(e,t,Bl(r),n)}var ri=({current:e})=>e?e.ownerDocument.defaultView:null;var Fl=(e,t)=>Math.abs(e-t);function jl(e,t){let r=Fl(e.x,t.x),n=Fl(e.y,t.y);return Math.sqrt(r**2+n**2)}var zl=new Set(["auto","scroll"]),Ht=class{constructor(t,r,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ni(this.lastRawMoveEventInfo,this.transformPagePoint));let h=Io(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=jl(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;let{point:y}=h,{timestamp:b}=H;this.history.push({...y,timestamp:b});let{onStart:w,onMove:v}=this.handlers;g||(w&&w(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=ni(g,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();let{onEnd:x,onSessionEnd:y,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let w=Io(h.type==="pointercancel"?this.lastMoveEventInfo:ni(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(h,w),y&&y(h,w)},!mt(t))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;let l=je(t),u=ni(l,this.transformPagePoint),{point:c}=u,{timestamp:f}=H;this.history=[{...c,timestamp:f}];let{onSessionStart:m}=r;m&&m(t,Io(u,this.history));let d={passive:!0,capture:!0};this.removeListeners=be(tt(this.contextWindow,"pointermove",this.handlePointerMove,d),tt(this.contextWindow,"pointerup",this.handlePointerUp,d),tt(this.contextWindow,"pointercancel",this.handlePointerUp,d)),a&&this.startScrollTracking(a)}startScrollTracking(t){let r=t.parentElement;for(;r;){let n=getComputedStyle(r);(zl.has(n.overflowX)||zl.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.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){let r=this.scrollPositions.get(t);if(!r)return;let n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-r.x,y:i.y-r.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),E.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ue(this.updatePoint)}};function ni(e,t){return t?{point:t(e.point)}:e}function Gl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Io({point:e},t){return{point:e,delta:Gl(e,Wl(t)),offset:Gl(e,im(t)),velocity:om(t,.1)}}function im(e){return e[0]}function Wl(e){return e[e.length-1]}function om(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,i=Wl(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>K(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>K(t)*2&&(n=e[1]);let s=te(i.timestamp-n.timestamp);if(s===0)return{x:0,y:0};let o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yl(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?A(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?A(r,e,n.max):Math.min(e,r)),e}function Ul(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function $l(e,{top:t,left:r,bottom:n,right:i}){return{x:Ul(e.x,r,i),y:Ul(e.y,t,n)}}function Hl(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function Xl(e,t){return{x:Hl(e.x,t.x),y:Hl(e.y,t.y)}}function ql(e,t){let r=.5,n=Y(e),i=Y(t);return i>n?r=Se(t.min,t.max-n,e.min):n>i&&(r=Se(e.min,e.max-i,t.min)),Z(0,1,r)}function Zl(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var ii=.35;function Jl(e=ii){return e===!1?e=0:e===!0&&(e=ii),{x:Kl(e,"left","right"),y:Kl(e,"top","bottom")}}function Kl(e,t,r){return{min:_l(e,t),max:_l(e,r)}}function _l(e,t){return typeof e=="number"?e:e[t]||0}var sm=new WeakMap,si=class{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=F(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){let{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;let s=f=>{r&&this.snapToCursor(je(f).point),this.stopAnimation()},o=(f,m)=>{let{drag:d,dragPropagation:h,onDragStart:g}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ji(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),de(y=>{let b=this.getAxisMotionValue(y).get()||0;if(ie.test(b)){let{projection:w}=this.visualElement;if(w&&w.layout){let v=w.layout.layoutBox[y];v&&(b=Y(v)*(parseFloat(b)/100))}}this.originPoint[y]=b}),g&&E.update(()=>g(f,m),!1,!0),Rt(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;let{dragPropagation:d,dragDirectionLock:h,onDirectionLock:g,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;let{offset:y}=m;if(h&&this.currentDirection===null){this.currentDirection=lm(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",m.point,y),this.updateAxis("y",m.point,y),this.visualElement.render(),x&&E.update(()=>x(f,m),!1,!0)},l=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ht(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:ri(this.visualElement),element:this.visualElement.current})}stop(t,r){let n=t||this.latestPointerEvent,i=r||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;let{velocity:o}=i;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&E.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){let{drag:i}=this.getProps();if(!n||!oi(t,i,this.currentDirection))return;let s=this.getAxisMotionValue(t),o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=Yl(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&et(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=$l(n.layoutBox,t):this.constraints=!1,this.elastic=Jl(r),i!==this.constraints&&!et(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&de(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zl(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!et(t))return!1;let n=t.current;ce(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let s=ho(n,i.root,this.visualElement.getTransformPagePoint()),o=Xl(i.layout.layoutBox,s);if(r){let a=r(lo(o));this.hasMutatedConstraints=!!a,a&&(o=Cr(a))}return o}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=de(c=>{if(!oi(c,r,this.currentDirection))return;let f=l&&l[c]||{};(o===!0||o===c)&&(f={min:0,max:0});let m=i?200:1e6,d=i?40:1e7,h={type:"inertia",velocity:n?t[c]:0,bounceStiffness:m,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(a)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return Rt(this.visualElement,t),n.start(lt(t,n,0,r,this.visualElement,!1))}stopAnimation(){de(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var s;let r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(t,(s=this.visualElement.latestValues[t])!=null?s:0)}snapToCursor(t){de(r=>{let{drag:n}=this.getProps();if(!oi(r,n,this.currentDirection))return;let{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){let{min:o,max:a}=i.layout.layoutBox[r],l=s.get()||0;s.set(t[r]-A(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!et(r)||!n||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};de(o=>{let a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){let l=a.get();i[o]=ql({min:l,max:l},this.constraints[o])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),de(o=>{if(!oi(o,t,null))return;let a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(A(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;sm.set(this.visualElement,this);let t=this.visualElement.current,r=tt(t,"pointerdown",u=>{let{drag:c,dragListener:f=!0}=this.getProps(),m=u.target,d=m!==t&&ro(m);c&&f&&!d&&this.start(u)}),n,i=()=>{let{dragConstraints:u}=this.getProps();et(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),n||(n=am(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),E.read(i);let a=Me(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(de(f=>{let m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=u[f].translate,m.set(m.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),r(),o(),l&&l(),n&&n()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=ii,dragMomentum:a=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}};function Ql(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function am(e,t,r){let n=Rn(e,Ql(r)),i=Rn(t,Ql(r));return()=>{n(),i()}}function oi(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function lm(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var ai=class extends Q{constructor(t){super(t),this.removeGroupControls=z,this.removeListeners=z,this.controls=new si(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){let{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var Oo=e=>(t,r)=>{e&&E.update(()=>e(t,r),!1,!0)},li=class extends Q{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(t){this.session=new Ht(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ri(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Oo(t),onStart:Oo(r),onMove:Oo(n),onEnd:(s,o)=>{delete this.session,i&&E.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=tt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var ec=require("react/jsx-runtime");var Nr=require("react");var No=!1,Bo=class extends Nr.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),No&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),vt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o&&(o.isPresent=s,t.layoutDependency!==r&&o.setOptions({...o.options,layoutDependency:r}),No=!0,i||t.layoutDependency!==r||r===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||E.postRender(()=>{let a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:r}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=r,n.root.didUpdate(),ft.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;No=!0,i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function ci(e){let[t,r]=cl(),n=(0,Nr.useContext)(Hr);return(0,ec.jsx)(Bo,{...e,layoutGroup:n,switchLayoutGroup:(0,Nr.useContext)(Zn),isPresent:t,safeToRemove:r})}var tc={pan:{Feature:li},drag:{Feature:ai,ProjectionNode:Ir,MeasureLayout:ci}};function rc(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let i="onHover"+r,s=n[i];s&&E.postRender(()=>s(t,je(t)))}var ui=class extends Q{mount(){let{current:t}=this.node;t&&(this.unmount=Qi(t,(r,n)=>(rc(this.node,n,"Start"),i=>rc(this.node,i,"End"))))}unmount(){}};var fi=class extends Q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(r){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=be(Me(this.node.current,"focus",()=>this.onFocus()),Me(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function nc(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let i="onTap"+(r==="End"?"":r),s=n[i];s&&E.postRender(()=>s(t,je(t)))}var mi=class extends Q{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=io(t,(i,s)=>(nc(this.node,s,"Start"),(o,{success:a})=>nc(this.node,o,a?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}};var jo=new WeakMap,Fo=new WeakMap,cm=e=>{let t=jo.get(e.target);t&&t(e)},um=e=>{e.forEach(cm)};function fm({root:e,...t}){let r=e||document;Fo.has(r)||Fo.set(r,{});let n=Fo.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(um,{root:e,...t})),n[i]}function ic(e,t,r){let n=fm(t);return jo.set(e,r),n.observe(e),()=>{jo.delete(e),n.unobserve(e)}}var mm={some:0,all:1},di=class extends Q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:mm[i]},a=u=>{let{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:f,onViewportLeave:m}=this.node.getProps(),d=c?f:m;d&&d(u)};this.stopObserver=ic(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(dm(t,r))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}};function dm({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var oc={inView:{Feature:di},tap:{Feature:mi},focus:{Feature:fi},hover:{Feature:ui}};var sc={layout:{ProjectionNode:Ir,MeasureLayout:ci}};var ac={...Nl,...oc,...tc,...sc};var zo=Ll(ac,Ol);var Go=zo;var p=require("react"),pc=require("react-dom"),_o=new Set,Yo={open:!1,status:null,busy:!1,ballPos:null,guideVisible:!1,guideDismissed:!1,sidebarActive:!1};function N(e){Yo=Object.assign({},Yo,e),_o.forEach(function(t){t()})}function hm(e){return _o.add(e),function(){_o.delete(e)}}function $o(){return Yo}function Fr(){return p.useSyncExternalStore(hm,$o)}var lc="dshcs-setup-error-banner";function gm(e){try{if(typeof document=="undefined"||document.getElementById(lc)!=null)return;var t=document.createElement("div");t.id=lc,t.setAttribute("role","alert"),t.style.cssText="position:fixed;top:0;left:0;right:0;z-index:2147483999;display:flex;align-items:flex-start;gap:10px;padding:10px 14px;font:13px/1.5 system-ui,sans-serif;color:#7d1a1a;background:#fff1f0;border-bottom:1px solid #f0c4c2;box-shadow:0 4px 16px rgba(0,0,0,.12)";var r=document.createElement("div");r.style.cssText="flex:1;min-width:0",r.innerHTML='<strong>Code Server \u73AF\u5883\u5B89\u88C5\u5931\u8D25</strong><br><span style="color:#8a3c3c">'+cc(e.error!=null?e.error:"\u5B89\u88C5\u811A\u672C\u9519\u8BEF")+"</span>"+(e.at!=null?'<br><span style="color:#b07a7a;font-size:11px">'+cc(e.at)+"</span>":"")+'<br><span style="color:#6a6a6a">\u53EF\u5728\u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server \u2192 \u73AF\u5883\u68C0\u6D4B/\u5B89\u88C5\u73AF\u5883 \u91CD\u8BD5\u3002</span>';var n=document.createElement("button");n.type="button",n.style.cssText="flex:none;font:inherit;cursor:pointer;border:1px solid #d9b0ae;background:#fff;border-radius:6px;padding:4px 10px;color:#7d1a1a",n.textContent="\u91CD\u65B0\u5B89\u88C5",n.onclick=function(){n.disabled=!0,n.textContent="\u5B89\u88C5\u4E2D\u2026",_("/code-server/setup",{}).then(function(o){o!=null&&o.ok===!0?(n.textContent="\u5DF2\u5728\u540E\u53F0\u5B89\u88C5\u2026",setTimeout(function(){_("/code-server/status").then(function(a){a!=null&&a.setup!=null&&a.setup.running!==!0&&a.setup.ok===!0?t.remove():(n.disabled=!1,n.textContent="\u91CD\u65B0\u5B89\u88C5")})},4e3)):(n.disabled=!1,n.textContent="\u91CD\u65B0\u5B89\u88C5")}).catch(function(){n.disabled=!1,n.textContent="\u91CD\u65B0\u5B89\u88C5"});var s=function(){_("/code-server/status").then(function(o){if(!(o==null||o.setup==null)){if(o.setup.running===!0){setTimeout(s,2e3);return}o.setup.ok===!0?(t.remove(),N({status:o})):(n.disabled=!1,n.textContent="\u91CD\u65B0\u5B89\u88C5")}})};setTimeout(s,3e3)};var i=document.createElement("button");i.type="button",i.setAttribute("aria-label","\u5173\u95ED"),i.style.cssText="flex:none;font:inherit;cursor:pointer;border:none;background:none;color:#8a3c3c;font-size:16px;line-height:1;padding:2px 6px",i.textContent="\xD7",i.onclick=function(){t.remove()},t.appendChild(r),t.appendChild(n),t.appendChild(i),document.body.appendChild(t)}catch(s){console.error("[code-server] banner failed:",s!=null&&s.message!=null?s.message:String(s))}}function cc(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}var xm="/api",xi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTQ3IDE0NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+QG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyaykgeyogeyBmaWxsOiB3aGl0ZTsgfX08L3N0eWxlPgogIDxwYXRoIGQ9Im00Mi40MjE0LDM5LjY1NWMtMjQuNDA1NywwIC00Mi4xNTU0LDEzLjE3MjEgLTQyLjE1NTQsMzMuODQ1YzAsMjAuNTgxNCAxOC40ODkyLDMzLjg0NSA0Mi4xNTU0LDMzLjg0NWMyMy42NjYyLDAgMzguMTgwMywtMTEuNjE3MSAzOC43MzQ5LC0yOC43MjI1bC0yMS4wNzc3LC0wLjQ1NzRjLTAuOTI0NCw5LjMzMDMgLTkuMTA1OSwxNS4xODQ1IC0xNy42NTcyLDE1LjE4NDVjLTExLjc0MDYsMCAtMjAuNDMwNiwtNy41OTIyIC0yMC40MzA2LC0xOS44NDk2YzAsLTEyLjI1NzQgOC42OSwtMTkuOTg2OCAyMC40MzA2LC0yMC4yMTU1YzguNTUxMywtMC4xODMgMTYuOTE3Nyw1Ljk0NTcgMTcuNDcyMywxNS4yNzZsMjEuMDc3NywtMC42NDAzYy0wLjQ2MjIsLTE2LjgzMTEgLTE0LjE0NDIsLTI4LjI2NTIgLTM4LjU1LC0yOC4yNjUyem00OC44NDQ2LDJsNTUuNDY4LDBsMCw2NC4wMzExbC01NS40NjgsMGwwLC02NC4wMzExeiIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==";async function _(e,t){var r={method:t===void 0?"GET":"POST",headers:{}};t!==void 0&&(r.headers["content-type"]="application/json",r.body=JSON.stringify(t));var n=await fetch(xm+e,r),i=await n.text(),s=null;try{s=i===""?null:JSON.parse(i)}catch(o){s=null}return n.ok?s!==null?s:{ok:!1,error:"invalid JSON response"}:{ok:!1,error:"HTTP "+n.status+(s!==null&&s.error!==void 0?": "+s.error:"")}}function yi(e,t){try{var r=e(function(f){return f}),n=t===null?null:typeof t=="function"?t(function(f){return f}):null,i=r!=null?r.current:void 0;if(i!==void 0&&r!=null&&r.byId!=null){var s=r.byId[i];if(s!=null&&typeof s.cwd=="string"&&s.cwd!=="")return s.cwd}var o=n!=null&&Array.isArray(n.items)?n.items:[];if(i!==void 0)for(var a=0;a<o.length;a++){var l=o[a];if(l.sessionIds!=null&&l.sessionIds.indexOf(i)!==-1&&typeof l.path=="string"&&l.path!=="")return l.path}var u=n!=null?n.recentWorkspaceId:void 0;if(u!==void 0){for(var c=0;c<o.length;c++)if(o[c].workspaceId===u&&typeof o[c].path=="string"&&o[c].path!=="")return o[c].path}if(o.length>0&&typeof o[0].path=="string"&&o[0].path!=="")return o[0].path}catch(f){}}function hc(e,t){if(e==null||typeof e.url!="string"||e.url==="")return null;var r=typeof t=="string"&&t!==""?t:e!=null&&e.cwd!=null?e.cwd:null;if(r==null||r==="")return e.url;var n=r.replace(/\\/g,"/"),i=n;return(/^[A-Za-z]:\//.test(n)||n.charCodeAt(0)!==47)&&(i="/"+n),e.url+"?folder="+encodeURIComponent(i)}function gc(e,t,r){var n=e!=null&&e.ok===!0&&e.running===!0,i=e!=null&&e.status==="starting",s=e!=null&&e.ok===!1,o=function(l){return p.createElement("iframe",{key:r,className:"dshcs-frame",src:l,title:"code-server",sandbox:"allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock allow-clipboard-read allow-clipboard-write",allow:"clipboard-read; clipboard-write"})};if(n&&t!==null)return o(t);if(i)return p.createElement(p.Fragment,null,o("about:blank"),p.createElement("div",{className:"dshcs-loading"},"\u6B63\u5728\u542F\u52A8 code-server\u2026"));var a=s&&e!=null&&e.error?e.error:"code-server \u672A\u8FD0\u884C";return p.createElement("div",{className:"dshcs-empty"},p.createElement("div",{className:"dshcs-emptybox"},p.createElement("div",null,s?"code-server \u542F\u52A8\u5931\u8D25":"code-server \u672A\u8FD0\u884C"),p.createElement("pre",{className:"dshcs-error"},a),p.createElement("p",{className:"dshcs-hint"},"\u5B89\u88C5\u547D\u4EE4(Windows \u539F\u751F):npm install -g code-server@latest(\u9700\u914D\u5957\u6700\u65B0\u7248 node-gyp \u4E0E VS Spectre \u7F13\u89E3\u5E93);\u6216\u5728 cordis.patch.yml \u7684 code-server config \u4E2D\u8BBE\u7F6E bin \u6307\u5411\u5DF2\u5B89\u88C5\u4F4D\u7F6E\u3002\u7AEF\u53E3 "+(e!=null?e.port:"8090")+" \u88AB\u5360\u7528\u65F6\u8BF7\u91CA\u653E\u6216\u4FEE\u6539 port \u914D\u7F6E\u3002")))}function xc(e){var t=function(n){var i=hc(n,e);i!=null&&typeof window.open=="function"&&window.open(i,"_blank","noopener")},r=$o().status;if(r!=null&&r.running===!0){t(r);return}$o().busy!==!0&&(N({busy:!0}),_("/code-server/start",typeof e=="string"?{cwd:e}:{}).then(function(n){N({status:n,busy:!1}),t(n)}).catch(function(){N({busy:!1})}))}var ym=["nw","n","ne","w","e","sw","s","se"],re=12,vm=720,bm=520,yc=360,vc=260,uc=24;function Xo(e){if(e===!1)return 0;try{if(typeof document=="undefined")return 0;var t=document.querySelectorAll("[data-composer-seat]");if(t===null||t.length===0)return 0;for(var r=Number.POSITIVE_INFINITY,n=0,i=0;i<t.length;i++){var s=t[i].getBoundingClientRect();s===null||s.width<=0||(s.top<r&&(r=s.top),s.bottom>n&&(n=s.bottom))}if(!isFinite(r)||n<=0)return 0;var o=window.innerHeight;return o-n>24?0:Math.min(Math.max(1,o-r+8),420)}catch(a){return 0}}function Ae(){return{width:Math.max(1,window.innerWidth),height:Math.max(1,window.innerHeight)}}function vi(e,t){return{width:Math.max(1,e.width-re*2),height:Math.max(1,e.height-re*2-t)}}function rt(e,t,r){return Math.min(r,Math.max(t,e))}function Kt(e,t,r){let n=vi(t,r),i=rt(e.width,Math.min(yc,n.width),n.width),s=rt(e.height,Math.min(vc,n.height),n.height);return{x:rt(e.x,re,Math.max(re,t.width-re-i)),y:rt(e.y,re,Math.max(re,t.height-re-r-s)),width:i,height:s}}function wm(e,t,r){let n=vi(t,r),i=Math.min(vm,n.width),s=Math.min(bm,n.height),o=Tm(),a=o>0?o-8:t.height-re-r;return Kt({x:t.width-re-i-e*uc,y:Math.max(re,a-s-e*uc),width:i,height:s},t,r)}function Tm(){try{if(typeof document=="undefined")return-1;var e=document.querySelectorAll("[data-composer-seat]");if(e===null||e.length===0)return-1;for(var t=Number.POSITIVE_INFINITY,r=0;r<e.length;r++){var n=e[r].getBoundingClientRect();n!==null&&n.width>0&&n.top<t&&(t=n.top)}return isFinite(t)?t:-1}catch(i){return-1}}function Sm(e,t,r,n,i){return Kt({...e,x:e.x+t,y:e.y+r},n,i)}function Cm(e,t,r,n,i,s){let o=Kt(e,i,s),a=vi(i,s),l=Math.min(yc,a.width),u=Math.min(vc,a.height),c=i.height-re-s,f=o.x,m=o.x+o.width,d=o.y,h=o.y+o.height;return t.includes("w")&&(f=rt(o.x+r,re,m-l)),t.includes("e")&&(m=rt(m+r,f+l,i.width-re)),t.includes("n")&&(d=rt(o.y+n,re,h-u)),t.includes("s")&&(h=rt(h+n,d+u,c)),{x:f,y:d,width:m-f,height:h-d}}function pi(e,t){let r=vi(e,t);return{x:re,y:re,width:r.width,height:r.height}}var Vm='.dshcs-root{position:fixed;inset:0;z-index:2147483000;pointer-events:none}.dshcs-win{--dshcs-accent:#5b6cff;pointer-events:auto;position:fixed;isolation:isolate;z-index:2147483000;display:flex;flex-direction:column;min-width:1px;min-height:1px;overflow:hidden;color:var(--dsw-alias-label-primary,#172033);background:var(--dsw-alias-bg-base,#fff);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;box-shadow:0 1px 2px rgba(13,22,38,.08),0 18px 48px rgba(13,22,38,.2),0 0 0 1px rgba(255,255,255,.4) inset;transition:border-color .16s ease,box-shadow .16s ease}.dshcs-win:hover{border-color:color-mix(in srgb,var(--dshcs-accent) 28%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 2px 5px rgba(13,22,38,.1),0 22px 58px rgba(13,22,38,.24),0 0 0 1px rgba(255,255,255,.5) inset}.dshcs-win[data-interaction]{transition:none;user-select:none}.dshcs-win[data-interaction]::after{content:"";position:absolute;inset:0;z-index:18;background:transparent}.dshcs-win-max{border-radius:14px;z-index:2147483001;box-shadow:0 1px 2px rgba(13,22,38,.06),0 8px 24px rgba(13,22,38,.12)}.dshcs-win-max:hover{box-shadow:0 1px 2px rgba(13,22,38,.06),0 10px 28px rgba(13,22,38,.14)}.dshcs-win-snap{border-color:color-mix(in srgb,var(--dshcs-accent) 70%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent) 26%,transparent),0 22px 58px rgba(13,22,38,.24),0 0 0 1px rgba(255,255,255,.5) inset}.dshcs-snapghost{position:fixed;left:0;top:0;z-index:2147483000;pointer-events:none;display:grid;place-items:center;border:1.5px solid color-mix(in srgb,var(--dshcs-accent,#5b6cff) 85%,transparent);background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 11%,transparent);border-radius:12px;box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent,#5b6cff) 20%,transparent),0 10px 34px rgba(13,22,38,.14)}.dshcs-snapghint{position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 92%,#172033);color:#fff;font-size:12px;font-weight:650;letter-spacing:.02em;white-space:nowrap;box-shadow:0 6px 18px rgba(13,22,38,.3)}.dshcs-drag{position:absolute;top:0;left:0;right:0;height:14px;z-index:26;cursor:grab;touch-action:none;user-select:none}.dshcs-win[data-interaction=move] .dshcs-drag{cursor:grabbing}.dshcs-win-max .dshcs-drag{cursor:default}.dshcs-drag:hover{background:color-mix(in srgb,var(--dsw-alias-label-primary,#172033) 5%,transparent)}.dshcs-artbtn{appearance:none;display:inline-grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:6px;color:var(--dsw-alias-label-secondary,#566174);background:color-mix(in srgb,var(--dsw-alias-bg-base,#fff) 60%,transparent);cursor:pointer;transition:color .12s ease,background .12s ease,border-color .12s ease;vertical-align:middle}.dshcs-artbtn:hover{color:var(--dsw-alias-label-primary,#172033);border-color:color-mix(in srgb,var(--dshcs-accent) 40%,var(--dsw-alias-border-l2,#dfe3eb));background:color-mix(in srgb,var(--dshcs-accent) 8%,transparent)}.dshcs-artbtn:active{transform:scale(.94)}.dshcs-artbtn:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent) 65%,transparent);outline-offset:1px}.dshcs-artifacts{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px 8px;margin-top:16px;font-size:13px;line-height:22px;position:relative}.dshcs-artlabel{color:var(--dsw-alias-label-tertiary,#7d8798);grid-area:1/1}.dshcs-artrow{flex-wrap:nowrap;grid-area:1/2;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.dshcs-artitem{display:inline-flex;align-items:center;gap:4px;flex:none;min-width:0}.dshcs-artfile{text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-interactive-bg-hover);max-width:320px;color:var(--dsw-alias-label-secondary,#566174);font:inherit;cursor:pointer;border:none;border-radius:6px;margin:0;padding:0 8px;overflow:hidden}.dshcs-artfile:hover{color:var(--dsw-alias-label-primary,#172033);text-decoration:underline}.dshcs-artfile:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshcs-artmore{white-space:nowrap;color:var(--dsw-alias-label-tertiary,#7d8798);flex:none}.dshcs-body{position:relative;display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;background:var(--dsw-alias-bg-base,#fff)}.dshcs-body[hidden]{display:none}.dshcs-frame{display:block;position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-tertiary,#7d8798);font-size:13px}.dshcs-win-hidden{pointer-events:none!important}.dshcs-empty{position:relative;z-index:2;flex:1;display:flex;align-items:center;justify-content:center;padding:44px 24px 24px}.dshcs-emptybox{max-width:560px;text-align:left;background:var(--dsw-alias-bg-layer-2,#f7f8fb);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;padding:16px 18px}.dshcs-error{color:var(--dsw-alias-label-error,#d92d20);white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:12px;margin:8px 0 0}.dshcs-hint{color:var(--dsw-alias-label-tertiary,#7d8798);font-size:12px;margin:6px 0 0}.dshcs-resize{position:absolute;z-index:24;display:block;touch-action:none}.dshcs-resize-n,.dshcs-resize-s{left:16px;right:16px;height:10px;cursor:ns-resize}.dshcs-resize-n{top:0}.dshcs-resize-s{bottom:0}.dshcs-resize-w,.dshcs-resize-e{top:16px;bottom:16px;width:10px;cursor:ew-resize}.dshcs-resize-w{left:0}.dshcs-resize-e{right:0}.dshcs-resize-nw,.dshcs-resize-ne,.dshcs-resize-sw,.dshcs-resize-se{width:18px;height:18px}.dshcs-resize-nw{left:0;top:0;cursor:nwse-resize}.dshcs-resize-ne{right:0;top:0;cursor:nesw-resize}.dshcs-resize-sw{left:0;bottom:0;cursor:nesw-resize}.dshcs-resize-se{right:0;bottom:0;cursor:nwse-resize}.dshcs-resize-se::after{content:"";position:absolute;right:4px;bottom:4px;width:7px;height:7px;border-right:1.5px solid color-mix(in srgb,var(--dsw-alias-label-tertiary,#7d8798) 58%,transparent);border-bottom:1.5px solid color-mix(in srgb,var(--dsw-alias-label-tertiary,#7d8798) 58%,transparent);border-radius:0 0 2px}.dshcs-ball{position:fixed;width:38px;height:38px;padding:0;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#dfe3eb) 80%,transparent);border-radius:50%;display:grid;place-items:center;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;z-index:2147483002;background:color-mix(in srgb,var(--dsw-alias-bg-layer-2,#f2f4f8) 88%,transparent);backdrop-filter:blur(8px) saturate(1.2);box-shadow:0 8px 20px rgba(13,22,38,.18),0 1px 2px rgba(13,22,38,.1);transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease}.dshcs-ball img,.dshcs-ball svg{-webkit-user-drag:none;user-drag:none}.dshcs-ball[data-dragging]{cursor:grabbing;transform:scale(1.06);box-shadow:0 14px 28px rgba(13,22,38,.28),0 2px 6px rgba(13,22,38,.16)}.dshcs-ball:hover{transform:scale(1.06);box-shadow:0 10px 24px rgba(13,22,38,.22),0 1px 2px rgba(13,22,38,.1)}.dshcs-ball:active{transform:scale(.94)}.dshcs-ball:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent) 65%,transparent);outline-offset:2px}.dshcs-ball-open{background:color-mix(in srgb,var(--dshcs-accent) 14%,var(--dsw-alias-bg-layer-2,#f2f4f8));border-color:color-mix(in srgb,var(--dshcs-accent) 55%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent) 22%,transparent),0 0 20px color-mix(in srgb,var(--dshcs-accent) 38%,transparent),0 8px 20px rgba(13,22,38,.16);transform:scale(1.08)}.dshcs-ball-dot{position:absolute;top:-2px;right:-2px;width:9px;height:9px;border-radius:50%;background:#20a66a;border:2px solid var(--dsw-alias-bg-base,#fff)}.dshcs-ball-dot[data-status=starting]{background:#d78b25}.dshcs-ball-dot[data-status=error]{background:#f85149}.dshcs-ball-dot[data-status=idle]{background:#7d8798}.dshcs-ball-dot[data-status=running]::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1px solid currentColor;opacity:.3;animation:dshcs-pulse 2s ease-out infinite}.dshcs-tabroot{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;background:var(--dsw-alias-bg-base,#fff)}@keyframes dshcs-pulse{0%{transform:scale(.7);opacity:.35}70%,100%{transform:scale(1.65);opacity:0}}',fc="dsh-code-server/styles";typeof document!="undefined"&&document.querySelector("style[data-dshcs="+JSON.stringify(fc)+"]")===null&&(hi=document.createElement("style"),hi.setAttribute("data-dshcs",fc),hi.textContent=Vm,document.head.appendChild(hi));var hi;function Em(e){var[t,r]=p.useState(!1),n=p.useRef(e.url);return p.useEffect(function(){n.current!==e.url&&(n.current=e.url,r(!1))},[e.url]),e.url!=null&&t!==!0?p.createElement("img",{src:e.url,key:"img-"+e.url,alt:"","aria-hidden":!0,draggable:!1,onError:function(){r(!0)},style:{width:20,height:20,display:"block",objectFit:"contain",borderRadius:3,WebkitUserDrag:"none",userSelect:"none"}}):p.createElement("svg",{viewBox:"0 0 18 18","aria-hidden":!0,style:{width:17,height:17}},p.createElement("rect",{x:"3",y:"3",width:"12",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:1.4}),p.createElement("path",{d:"M3 7h12M7 3v12",fill:"none",stroke:"currentColor",strokeWidth:1.4}))}var ze=38,De=8,bc="dshcs-ball-pos";function gi(e){var t=Math.max(De,window.innerWidth-De-ze),r=Math.max(De,window.innerHeight-De-ze);return{x:Math.min(t,Math.max(De,e.x)),y:Math.min(r,Math.max(De,e.y))}}function Pm(){try{var e=window.localStorage.getItem(bc);if(e==null)return null;var t=JSON.parse(e);if(t!=null&&typeof t.x=="number"&&typeof t.y=="number"&&isFinite(t.x)&&isFinite(t.y))return gi(t)}catch(r){}return null}function Mm(e){try{window.localStorage.setItem(bc,JSON.stringify(e))}catch(t){}}function Am(e){var t=Fr(),r=t.status,n=r!=null?r.env:null,i=r!=null&&r.running===!0,s=i?"running":r!=null&&r.status==="starting"?"starting":r!=null&&r.status==="error"?"error":"idle",o=Xo(r!=null?r.reserveComposer:!0),a=t.open===!0,l=xi,[u,c]=p.useState(Pm),[f,m]=p.useState(!1),d=p.useRef(null),h=p.useRef(!1);if(p.useEffect(function(){var v=function(){c(function(T){return T==null?T:gi(T)})};return window.addEventListener("resize",v),function(){window.removeEventListener("resize",v)}},[]),p.useEffect(function(){var v=u!=null?u:(function(){var T=Xo(r!=null?r.reserveComposer:!0);return{x:window.innerWidth-De-ze,y:window.innerHeight-De-ze-(T>0?T+10:18)}})();N({ballPos:gi(v)})},[u,r]),n!=null&&n.ok!==!0||t.sidebarActive===!0)return null;var g=function(v){if(v.button===0){var T=v.currentTarget,P=T.getBoundingClientRect();d.current={pointerId:v.pointerId,dx:v.clientX-P.left,dy:v.clientY-P.top,moved:!1},h.current=!1,m(!0);try{T.setPointerCapture(v.pointerId)}catch(M){}}},x=function(v){var T=d.current;if(!(T==null||v.pointerId!==T.pointerId)){var P=v.clientX-T.dx,M=v.clientY-T.dy;(Math.abs(P-(u!=null?u.x:0))>2||Math.abs(M-(u!=null?u.y:0))>2)&&(T.moved=!0),c(gi({x:P,y:M}))}},y=function(){var v=d.current;d.current=null,m(!1),v!=null&&v.moved===!0&&(h.current=!0),v!=null&&v.moved===!0&&c(function(T){return T!=null&&Mm(T),T})},b=function(){if(h.current===!0){h.current=!1;return}if(r!=null&&r.windowedOpen===!0){xc(yi(e&&e.useSessions,e&&e.useWorkspaces));return}N({open:!a})},w=u!=null?{left:u.x,top:u.y}:{right:14,bottom:o>0?o+10:18};return pc.createPortal(p.createElement("button",{type:"button",className:"dshcs-ball"+(a?" dshcs-ball-open":""),style:w,"data-dragging":f===!0?"":void 0,title:r!=null&&r.windowedOpen===!0?"\u5728\u6D4F\u89C8\u5668\u65B0\u6807\u7B7E\u9875\u6253\u5F00 Code Server(\u53EF\u62D6\u52A8)":a?"\u6536\u8D77 Code Server(Esc)":"\u6253\u5F00 Code Server(\u53EF\u62D6\u52A8)","aria-label":a?"\u6536\u8D77 Code Server(Esc)":"\u6253\u5F00 Code Server","aria-expanded":a,onPointerDown:g,onPointerMove:x,onPointerUp:y,onPointerCancel:y,onDragStart:function(v){v&&v.preventDefault&&v.preventDefault()},onClick:b},p.createElement(Em,{url:l}),p.createElement("span",{className:"dshcs-ball-dot","data-status":s,"aria-hidden":!0})),document.body)}function Dm(e){var t=Fr(),r=t.status,n=r!=null&&r.ok===!0&&r.running===!0,i=r!=null&&r.status==="starting",s=r!=null&&r.ok===!1,o=yi(e&&e.useSessions,e&&e.useWorkspaces),a=p.useRef(void 0),[l,u]=p.useState(0),c=Xo(r!=null?r.reserveComposer:!0),[f,m]=p.useState(!1),[d,h]=p.useState(null),[g,x]=p.useState(function(){return wm(0,Ae(),c)}),y=p.useRef(g),b=p.useRef(function(){});y.current=g,p.useEffect(function(){var D=function(){x(function(ne){return f?pi(Ae(),c):Kt(ne,Ae(),c)})};return window.addEventListener("resize",D),function(){window.removeEventListener("resize",D)}},[f,c]),p.useEffect(function(){x(function(D){return Kt(D,Ae(),c)})},[c]),p.useEffect(function(){return function(){b.current()}},[]);var w=12,v=4,[T,P]=p.useState(!1),M=p.useRef(null),C=function(D,ne){if(D.button===0){D.preventDefault(),D.stopPropagation(),b.current();var le=D.currentTarget.ownerDocument.defaultView;if(le!==null){var pe=D.pointerId,zr=D.currentTarget,qo=f,Yt=qo?pi(Ae(),c):y.current,Vc=Yt.width>0?(D.clientX-Yt.x)/Yt.width:0,Ec=Math.min(14,Math.max(0,D.clientY-Yt.y)),j={pointerId:pe,origin:{x:D.clientX,y:D.clientY},start:Yt,ratio:Vc,grabY:Ec,wasMaximized:qo,restored:!1,snapped:!1,moved:!1};M.current=j,h(ne);try{zr.setPointerCapture(pe)}catch(fe){}var Zo=function(fe){if(fe.pointerId===pe){if(ne!=="move"){x(Cm(j.start,ne,fe.clientX-j.origin.x,fe.clientY-j.origin.y,Ae(),c));return}var Qo=fe.clientX-j.origin.x,Wr=fe.clientY-j.origin.y;if(Math.abs(Qo)+Math.abs(Wr)>3&&(j.moved=!0),j.wasMaximized&&!j.restored){if(Wr<v)return;var wi=y.current,Ur={x:fe.clientX-wi.width*Math.min(.9,Math.max(.1,j.ratio)),y:fe.clientY-j.grabY,width:wi.width,height:wi.height};Ur=Kt(Ur,Ae(),c),j.restored=!0,j.start=Ur,j.origin={x:fe.clientX,y:fe.clientY},m(!1),x(Ur);return}var Pc=j.start.y+Wr,Mc=Sm(j.start,Qo,Wr,Ae(),c);x(Mc);var Ti=Pc<=w;Ti!==j.snapped&&(j.snapped=Ti,P(Ti))}},Jo=function(){le.removeEventListener("pointermove",Zo),le.removeEventListener("pointerup",Gr),le.removeEventListener("pointercancel",Gr),b.current=function(){},M.current=null;try{zr.releasePointerCapture(pe)}catch(fe){}},Gr=function(fe){fe.pointerId===pe&&(Jo(),h(null),(!j.wasMaximized||j.restored===!0)&&(j.snapped===!0&&j.moved===!0&&m(!0),j.snapped===!0&&P(!1)))};b.current=Jo,le.addEventListener("pointermove",Zo),le.addEventListener("pointerup",Gr),le.addEventListener("pointercancel",Gr)}}},U=function(){m(function(D){return!D})},V=function(D){D.target.closest("[data-window-control]")===null&&C(D,"move")},O=function(D){D.target.closest("[data-window-control]")===null&&U()};if(p.useEffect(function(){if(!t.open||t.sidebarActive===!0)return;var D=!1;async function ne(){N({busy:!0});var le=await _("/code-server/status");if(!D){if(le!=null&&le.ok===!0&&le.running===!0){N({status:le,busy:!1});return}var pe=await _("/code-server/start",typeof o=="string"?{cwd:o}:{});D||N({status:pe,busy:!1})}}return ne(),function(){D=!0}},[t.open,t.sidebarActive]),p.useEffect(function(){if(t.sidebarActive===!0||typeof o!="string"||o===""||a.current===o)return;var D=a.current!==void 0&&a.current!==o;a.current=o;var ne=!1;async function le(){N({busy:!0});var pe=await _("/code-server/start",{cwd:o});ne||(N({status:pe,busy:!1}),D&&pe!=null&&pe.ok===!0&&pe.running===!0&&u(function(zr){return zr+1}))}return le(),function(){ne=!0}},[o,t.sidebarActive]),p.useEffect(function(){t.open||(a.current=void 0)},[t.open]),p.useEffect(function(){if(t.sidebarActive!==!0){var D=window.setInterval(function(){_("/code-server/status").then(function(ne){N({status:ne})})},3e3);return function(){window.clearInterval(D)}}},[t.sidebarActive]),p.useEffect(function(){if(!t.open)return;function D(ne){ne.key==="Escape"&&N({open:!1})}return window.addEventListener("keydown",D),function(){window.removeEventListener("keydown",D)}},[t.open]),t.sidebarActive===!0)return null;var $=r!=null&&typeof r.url=="string"?r.url:null,X=n&&r!=null&&typeof r.cwd=="string"&&r.cwd!==""?r.cwd:null,ee=null;if(X!==null){var q=X.replace(/\\/g,"/");ee=q,(/^[A-Za-z]:\//.test(q)||q.charCodeAt(0)!==47)&&(ee="/"+q)}var ae=$!==null?$+(ee!==null?"?folder="+encodeURIComponent(ee):""):null,L=gc(r,ae,l),k=["dshcs-win",f?"dshcs-win-max":"",T?"dshcs-win-snap":"",t.open===!1?"dshcs-win-hidden":""].filter(Boolean).join(" "),R=f?pi(Ae(),c):g,Te=t.ballPos!=null?t.ballPos:{x:window.innerWidth-De-ze,y:window.innerHeight-De-ze-(c>0?c+10:18)},ke={x:Te.x+ze/2,y:Te.y+ze/2},bi=Math.max(.05,ze/Math.max(R.width,R.height)),wc=t.open===!1?{x:ke.x-R.width/2,y:ke.y-R.height/2,width:R.width,height:R.height,scale:bi,borderRadius:19,opacity:0}:{x:R.x,y:R.y,width:R.width,height:R.height,scale:1,borderRadius:12,opacity:1},Tc=d!==null?{duration:0}:{type:"spring",stiffness:340,damping:38,mass:.9,opacity:{type:"spring",stiffness:420,damping:40,mass:.8},borderRadius:{duration:.2}},Sc=p.createElement(Go.section,{className:k,style:t.open===!1?{left:0,top:0,pointerEvents:"none"}:{left:0,top:0},animate:wc,initial:!1,transition:Tc,"data-interaction":d!==null?d:void 0,role:"dialog","aria-label":"Code Server"},p.createElement("span",{className:"dshcs-drag",title:"\u62D6\u52A8\u79FB\u52A8 / \u53CC\u51FB\u6700\u5927\u5316",onPointerDown:V,onDoubleClick:O}),p.createElement("div",{className:"dshcs-body"},L),f?null:ym.map(function(D){return p.createElement("span",{key:D,className:"dshcs-resize dshcs-resize-"+D,"data-direction":D,onPointerDown:function(ne){C(ne,D)}})})),jr=pi(Ae(),c),Cc=p.createElement(Go.div,{className:"dshcs-snapghost",initial:!1,animate:{opacity:T===!0?1:0,x:jr.x,y:jr.y,width:jr.width,height:jr.height},transition:T===!0?{type:"spring",stiffness:500,damping:44,mass:.9}:{duration:.14}},p.createElement("span",{className:"dshcs-snapghint"},"\u677E\u5F00\u4EE5\u6700\u5927\u5316"));return pc.createPortal(p.createElement(p.Fragment,null,Sc,Cc),document.body)}var Wo="code-server",mc="dsh-code-server-app",_t={openTab:null};function km(e){var t=e!=null&&typeof e.size=="number"?e.size:16;return p.createElement("img",{src:xi,alt:"","aria-hidden":!0,draggable:!1,className:e!=null?e.className:void 0,style:{width:t,height:t,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}function Rm(e){var t=e.useTabInfo(),r=t.tab,n=Fr(),i=n.status,s=yi(e.useSessions,null),o=p.useRef(void 0),[a,l]=p.useState(0),u=r.navigation,c=u!=null&&typeof u.revision=="number"?u.revision:0;return p.useEffect(function(){if(!(typeof s!="string"||s==="")&&o.current!==s){var f=o.current!==void 0;o.current=s;var m=!1;return _("/code-server/start",{cwd:s}).then(function(d){m||(N({status:d}),f&&d!=null&&d.ok===!0&&d.running===!0&&l(function(h){return h+1}))}).catch(function(){}),function(){m=!0}}},[s]),p.useEffect(function(){_("/code-server/status").then(function(m){m!=null&&N({status:m})}).catch(function(){});var f=window.setInterval(function(){_("/code-server/status").then(function(m){N({status:m})}).catch(function(){})},3e3);return function(){window.clearInterval(f)}},[]),p.useEffect(function(){var f=u!=null?u.params:null,m=f!=null&&typeof f.path=="string"?f.path:"";m!==""&&_("/code-server/open-file",{file:m}).catch(function(){})},[c]),p.createElement("div",{className:"dshcs-tabroot","data-code-server-tab":"body"},gc(i,hc(i,s),a))}function Lm(e){var t=e.sidebarRightTabs,r=e.sidebarRight;t==null||r==null||(e.effect(function(){return t.register({id:mc,kind:Wo,priority:"extension",title:function(){return"Code Server"},guide:[{order:20,title:function(){return"Code Server"},description:function(){return"\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A\u3002"},icon:km}]})},"code-server: sidebar tab type"),e.effect(function(){return e.slots.inject("sidebar.right.pane.tab",function(){return e.slots.register({name:"sidebar.right.pane.tab",key:mc},Rm)})},"code-server: sidebar tab body"),_t.openTab=function(n){try{return r.openTab(Wo,n!=null?{params:n}:void 0),!0}catch(i){return console.warn("[code-server] sidebar openTab failed:",i!=null&&i.message!=null?i.message:String(i)),!1}},e.effect(function(){return function(){_t.openTab=null,N({sidebarActive:!1})}},"code-server: sidebar mode reset"),N({sidebarActive:!0,open:!1}),console.log("[code-server] right-sidebar tab registered (kind="+Wo+")"))}var Im=".dshcs-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardHeader{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dshcs-cardHeader:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshcs-cardHeadText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dshcs-cardName{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.dshcs-cardDescription{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));font-size:13px;line-height:1.5}.dshcs-cardChevron{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));flex:none;transition:transform .16s;display:inline-flex}.dshcs-cardChevronOpen{transform:rotate(180deg)}.dshcs-cardBody{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.dshcs-cardReadOnly{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:12px 0 0;font-size:12px;line-height:1.5}.dshcs-pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-cardFooter{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.dshcs-cardFailed{min-width:0;color:var(--dsw-alias-label-error,var(--dsw-alias-state-error-primary));flex:1;margin:0;font-size:12px;line-height:1.5}.dshcs-cbtn{appearance:none;font:inherit;cursor:pointer;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5;border:1px solid transparent;transition:color .12s ease,background .12s ease}.dshcs-cbtn:disabled{opacity:.4;cursor:default}.dshcs-cbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.dshcs-cbtnOutline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.dshcs-cbtnOutline:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover,transparent)}.dshcs-cbtnPrimary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-primary);font-weight:600}.dshcs-cbtnPrimary:hover:not(:disabled){filter:brightness(.95)}.dshcs-cbtnPrimary:active:not(:disabled){filter:brightness(.9)}.dshcs-field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.dshcs-field+.dshcs-field{border-top:1px solid var(--dsw-alias-border-l2)}.dshcs-fieldHead{align-items:center;gap:8px;display:flex}.dshcs-fieldLabel{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.dshcs-hint{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.dshcs-check{display:flex;align-items:center;gap:8px;cursor:pointer}.dshcs-check input{accent-color:var(--dsw-alias-brand-primary);width:15px;height:15px;margin:0;flex:none}.dshcs-check input:disabled{cursor:default}.dshcs-badges{align-items:center;gap:8px;display:inline-flex}.dshcs-badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.dshcs-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.dshcs-reset:disabled{cursor:default}",Om="dsh-code-server/Card.module.css";function Nm(e,t){if(typeof document!="undefined"&&document.querySelector("style[data-plugin-css="+JSON.stringify(e)+"]")===null){var r=document.createElement("style");r.dataset.plugin="dsh-code-server",r.dataset.pluginCss=e,r.textContent=t,document.head.appendChild(r)}}Nm(Om,Im);function Bm(e){return p.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,className:e.className},p.createElement("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}function Br(e){return p.createElement("button",{type:"button",className:"dshcs-cbtn "+(e.variant==="primary"?"dshcs-cbtnPrimary":"dshcs-cbtnOutline"),disabled:e.disabled===!0,onClick:e.onClick},e.children)}function Uo(e){return p.createElement("label",{className:"dshcs-check"},p.createElement("input",{type:"checkbox",checked:e.checked===!0,disabled:e.disabled===!0,onChange:function(t){e.onChange(t.target.checked)}}),p.createElement("span",{className:"dshcs-hint"},e.children))}function Ho(e){var t=[];return e.overridden===!0&&(t.push(p.createElement("span",{className:"dshcs-badge"},e.overriddenLabel)),t.push(p.createElement("button",{type:"button",className:"dshcs-reset",disabled:e.disabled===!0,onClick:e.onReset},e.resetLabel))),t.length===0?null:p.createElement("span",{className:"dshcs-badges"},...t)}function Fm(e){var[t,r]=p.useState(!1),n=e.state;if(n==null||n.available!==!0)return null;var i=e.title,s=n.dirty!==!0||n.invalid===!0||n.saving===!0;return p.createElement("li",{className:"dshcs-card"+(t?" dshcs-cardOpen":"")},p.createElement("button",{type:"button",className:"dshcs-cardHeader","aria-expanded":t,onClick:function(){r(!t)}},p.createElement("span",{className:"dshcs-cardHeadText"},p.createElement("span",{className:"dshcs-cardName"},i),p.createElement("span",{className:"dshcs-cardDescription"},e.description)),n.dirty===!0?p.createElement("span",{className:"dshcs-pending"},e.unsavedLabel):null,p.createElement(Bm,{className:"dshcs-cardChevron"+(t?" dshcs-cardChevronOpen":"")})),t===!0?p.createElement("div",{className:"dshcs-cardBody"},n.writable!==!0?p.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},e.readOnlyLabel):null,e.children,p.createElement("div",{className:"dshcs-cardFooter"},n.failed===!0?p.createElement("p",{className:"dshcs-cardFailed",role:"status"},e.saveFailedLabel):null,p.createElement(Br,{disabled:n.dirty!==!0||n.saving===!0,onClick:e.onDiscard},e.discardLabel),p.createElement(Br,{variant:"primary",disabled:s,onClick:e.onSave},n.saving===!0?e.savingLabel:e.saveLabel))):null)}var Ko="dshcs-guide-modal";function dc(e){try{let u=function(){var c=document.getElementById(Ko);c!=null&&c.remove()};if(typeof document=="undefined"||document.getElementById(Ko)!=null)return;var t=document.createElement("div");t.id=Ko,t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.setAttribute("aria-label","\u5B89\u88C5 Code Server \u73AF\u5883"),t.style.cssText="position:fixed;inset:0;z-index:2147483998;display:grid;place-items:center;background:rgba(13,22,38,.35)";var r=document.createElement("div");r.style.cssText="width:min(520px,92vw);background:var(--dsw-alias-bg-base,#fff);border-radius:14px;padding:20px 22px;box-shadow:0 24px 64px rgba(13,22,38,.3);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);font:13px/1.6 system-ui,sans-serif;color:var(--dsw-alias-label-primary,#172033)";var n=document.createElement("div");n.style.cssText="display:flex;align-items:center;gap:10px;margin-bottom:10px",n.innerHTML='<img src="'+xi+'" alt="" style="width:26px;height:26px;object-fit:contain"><strong style="font-size:15px">\u5B89\u88C5 Code Server \u73AF\u5883</strong>';var i=document.createElement("button");i.type="button",i.setAttribute("aria-label","\u5173\u95ED"),i.textContent="\xD7",i.style.cssText="margin-left:auto;border:none;background:none;cursor:pointer;font-size:16px;color:var(--dsw-alias-label-tertiary,#7d8798);padding:2px 6px",i.onclick=function(){u()},n.appendChild(i);var s=document.createElement("div");s.style.cssText="color:var(--dsw-alias-label-secondary,#566174);margin-bottom:12px",s.textContent="code-server(VS Code \u7F51\u9875\u7248)\u73AF\u5883\u5B89\u88C5\u4E0E\u4F7F\u7528\u6307\u5F15\u3002\u6BCF\u6B21\u542F\u52A8 DSH \u540E\u4F1A\u5F39\u51FA\u672C\u7A97\u53E3;\u70B9\u51FB\u300C\u4E0D\u518D\u63D0\u793A\u300D\u6216\u5230 \u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server \u52FE\u9009\u53EF\u6C38\u4E45\u5173\u95ED\u3002\u5B89\u88C5\u8FC7\u7A0B:\u5728 profile \u76EE\u5F55\u4E0B\u81EA\u52A8\u6784\u5EFA code-server(\u542B\u539F\u751F\u6A21\u5757,\u9700 C++ \u5DE5\u5177\u94FE)\u3002";var o=document.createElement("div");o.style.cssText="display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap";var a=document.createElement("button");a.type="button",a.textContent="\u4E0D\u518D\u63D0\u793A(\u6C38\u4E45\u5173\u95ED)",a.style.cssText="appearance:none;font:inherit;font-size:13px;cursor:pointer;border:1px solid var(--dsw-alias-border-l2,#dfe3eb);background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-secondary,#566174);border-radius:7px;padding:7px 14px",a.onclick=function(){try{e!=null&&typeof e.set=="function"&&e.set("installGuideDismissed",!0)}catch(c){}N({guideDismissed:!0}),u()};var l=document.createElement("button");l.type="button",l.textContent="\u5F00\u59CB\u5B89\u88C5",l.style.cssText="appearance:none;font:inherit;font-size:13px;cursor:pointer;border:1px solid #5b6cff;background:#5b6cff;color:#fff;border-radius:7px;padding:7px 16px",l.onclick=function(){l.disabled=!0,l.textContent="\u5B89\u88C5\u4E2D\u2026",_("/code-server/setup",{}).then(function(c){if(c==null||c.ok!==!0){l.disabled=!1,l.textContent="\u5F00\u59CB\u5B89\u88C5",window.alert(c!=null&&c.error?c.error:"\u542F\u52A8\u5B89\u88C5\u5931\u8D25");return}var f=function(){_("/code-server/status").then(function(m){if(m==null||m.setup==null){l.disabled=!1,l.textContent="\u5F00\u59CB\u5B89\u88C5";return}if(m.setup.running===!0){setTimeout(f,2e3);return}l.disabled=!1,l.textContent="\u5F00\u59CB\u5B89\u88C5",N({status:m}),m.setup.ok===!0&&u()}).catch(function(){l.disabled=!1,l.textContent="\u5F00\u59CB\u5B89\u88C5"})};setTimeout(f,3e3)}).catch(function(){l.disabled=!1,l.textContent="\u5F00\u59CB\u5B89\u88C5"})},o.appendChild(a),o.appendChild(l),r.appendChild(n),r.appendChild(s),r.appendChild(o),t.appendChild(r),document.body.appendChild(t)}catch(u){console.error("[code-server] guide modal failed:",u!=null&&u.message!=null?u.message:String(u))}}function jm(e){try{let X=function(){_("/code-server/status").then(function(L){L!=null&&typeof L=="object"&&N({status:L})}).catch(function(){})};var t=e.scope,[r,n]=p.useState(function(){return t!==void 0?t.getSnapshot():null}),[i,s]=p.useState(null),[o,a]=p.useState(!1),[l,u]=p.useState(!1),c=Fr();if(p.useEffect(function(){if(t===void 0||typeof t.subscribe!="function")return;function L(){try{n(t.getSnapshot())}catch(R){}}var k=t.subscribe(L);return function(){typeof k=="function"&&k()}},[t]),t===void 0)return console.error("[code-server] card scope missing"),null;if(r==null||r.status!=="ready")return r!=null&&r.status==="unavailable"&&console.warn("[code-server] settings scope unavailable:",r.status),null;var f=r.value!==void 0&&r.value!==null?r.value:{},m=r.user,d={reserveComposer:f.reserveComposer!==!1,windowedOpen:f.windowedOpen===!0,installGuideDismissed:f.installGuideDismissed===!0},h=m!=null&&Object.prototype.hasOwnProperty.call(m,"reserveComposer"),g=m!=null&&Object.prototype.hasOwnProperty.call(m,"windowedOpen"),x=m!=null&&Object.prototype.hasOwnProperty.call(m,"installGuideDismissed"),y=c!=null&&c.sidebarActive===!0,b=i!==null&&(i.reserveComposer!==d.reserveComposer||i.windowedOpen!==d.windowedOpen||i.installGuideDismissed!==d.installGuideDismissed),w=!b||o,v={available:!0,writable:r.writable,dirty:b,invalid:!1,saving:o,failed:l,reserveComposer:{text:i!==null?i.reserveComposer:d.reserveComposer,overridden:h}};async function ee(){if(b&&!o){a(!0),u(!1);try{var L=i!==null?i:d;await e.scope.set("reserveComposer",L.reserveComposer===!0),await e.scope.set("windowedOpen",L.windowedOpen===!0),await e.scope.set("installGuideDismissed",L.installGuideDismissed===!0),s(null),X()}catch(k){u(!0)}a(!1)}}async function q(){if(!(o||r.writable!==!0)){a(!0),u(!1);try{typeof e.scope.unset=="function"?(await e.scope.unset("reserveComposer"),await e.scope.unset("windowedOpen"),await e.scope.unset("installGuideDismissed")):(await e.scope.set("reserveComposer",f.reserveComposer===void 0||f.reserveComposer===null?!0:f.reserveComposer),await e.scope.set("windowedOpen",f.windowedOpen===!0),await e.scope.set("installGuideDismissed",!1)),s(null),X()}catch(L){u(!0)}a(!1)}}var[T,P]=p.useState(null),[M,C]=p.useState(!1),[U,V]=p.useState(null),O=p.useRef(!0);p.useEffect(function(){return O.current=!0,function(){O.current=!1}},[]);async function ae(){if(M)return;C(!0),V(null);var L=await _("/code-server/setup",{});if(L==null||L.ok!==!0){V(L!=null&&L.error?L.error:"\u542F\u52A8\u5B89\u88C5\u5931\u8D25"),C(!1);return}V("\u73AF\u5883\u5B89\u88C5\u5DF2\u5728\u540E\u53F0\u5F00\u59CB,\u5B8C\u6210\u540E\u81EA\u52A8\u5237\u65B0\u2026");function k(){O.current===!0&&_("/code-server/status").then(function(R){if(O.current===!0){if(R==null||R.setup==null){C(!1);return}if(R.setup.running===!0){setTimeout(k,2e3);return}C(!1),P(R.env!=null?R.env:{error:"status \u672A\u8FD4\u56DE env"}),V(R.setup.ok===!0?"\u73AF\u5883\u5B89\u88C5\u5B8C\u6210":`\u73AF\u5883\u5B89\u88C5\u5931\u8D25:
|
|
3
|
-
`+(R.setup.logTail!=null?R.setup.logTail.slice(-600):"(\u65E0\u65E5\u5FD7)"))}})}k()}var $=p.createElement("div",{className:"dshcs-field"},p.createElement("div",{className:"dshcs-fieldHead"},p.createElement("span",{className:"dshcs-fieldLabel"},"\u73AF\u5883\u68C0\u6D4B"),p.createElement("span",{className:"dshcs-badges"},p.createElement(Br,{variant:"primary",disabled:M,onClick:async function(){C(!0),V(null);var L=await _("/code-server/status");P(L!=null&&L.env!=null?L.env:{error:"status \u672A\u8FD4\u56DE env"}),C(!1)}},"\u68C0\u6D4B\u73AF\u5883"),p.createElement(Br,{disabled:M,onClick:function(){ae()}},M?"\u5B89\u88C5\u4E2D\u2026":"\u5B89\u88C5\u73AF\u5883"))),T!=null?p.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},T.error!=null?p.createElement("span",null,"\u68C0\u6D4B\u5931\u8D25: "+T.error):p.createElement("span",null,"\u72B6\u6001: "+(T.ok===!0?"\u2705 \u5C31\u7EEA":"\u274C \u4E0D\u901A\u8FC7")+(T.entry!=null?" \xB7 \u5165\u53E3: "+T.entry:" \xB7 \u5165\u53E3\u7F3A\u5931")+" \xB7 native: "+(T.native===!0?"\u2705":"\u274C")+" \xB7 VS Code \u5185\u90E8\u4F9D\u8D56: "+(T.vscodeInner===!0?"\u2705":"\u274C"))):p.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},'\u70B9\u51FB"\u68C0\u6D4B\u73AF\u5883"\u67E5\u770B code-server \u5B89\u88C5\u72B6\u6001'),U!=null?p.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},U):null,p.createElement("div",{className:"dshcs-hint",style:{marginTop:10,color:"var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary))"}},"\u5B89\u88C5\u4F4D\u7F6E: "+(T!=null&&T.entry!=null?T.entry:"(profile)\\.code-server-app(\u5F85\u5B89\u88C5\u540E\u53EF\u67E5\u770B)")+`
|
|
4
|
-
\u5378\u8F7D:
|
|
2
|
+
|
|
3
|
+
var wi=Object.defineProperty;var Cc=Object.getOwnPropertyDescriptor;var Pc=Object.getOwnPropertyNames;var Ec=Object.prototype.hasOwnProperty;var Mc=(e,t)=>{for(var r in t)wi(e,r,{get:t[r],enumerable:!0})},Ac=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Pc(t))!Ec.call(e,i)&&i!==r&&wi(e,i,{get:()=>t[i],enumerable:!(n=Cc(t,i))||n.enumerable});return e};var Dc=e=>Ac(wi({},"__esModule",{value:!0}),e);var Um={};Mc(Um,{apply:()=>jm,inject:()=>Gm,name:()=>Wm});module.exports=Dc(Um);var Zo=require("react"),Wr=(0,Zo.createContext)({});var Jo=require("react");function Qo(e){let t=(0,Jo.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Ur=require("react");var es=typeof window!="undefined";var ts=es?Ur.useLayoutEffect:Ur.useEffect;var rs=require("react"),wt=(0,rs.createContext)(null);function rt(e,t){e.indexOf(t)===-1&&e.push(t)}function ze(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var $=(e,t,r)=>r>t?t:r<e?e:r;var Re=()=>{},se=()=>{};var ne={};var Yt=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var $t=e=>typeof e=="object"&&e!==null;var Xt=e=>/^0[^.\s]+$/u.test(e);function qt(e){let t;return()=>(t===void 0&&(t=e()),t)}var j=e=>e;var ve=(...e)=>e.reduce((t,r)=>n=>r(t(n)));var Te=(e,t,r)=>{let n=t-e;return n?(r-e)/n:1};var ke=class{constructor(){this.subscriptions=[]}add(t){return rt(this.subscriptions,t),()=>ze(this.subscriptions,t)}notify(t,r,n){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let s=0;s<i;s++){let o=this.subscriptions[s];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var U=e=>e*1e3,Z=e=>e/1e3;var Zt=(e,t)=>t?e*(1e3/t):0;var ns=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Rc=1e-7,kc=12;function Lc(e,t,r,n,i){let s,o,a=0;do o=t+(r-t)/2,s=ns(o,n,i)-e,s>0?r=o:t=o;while(Math.abs(s)>Rc&&++a<kc);return o}function Ge(e,t,r,n){if(e===t&&r===n)return j;let i=s=>Lc(s,0,1,e,r);return s=>s===0||s===1?s:ns(i(s),t,n)}var Hr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Kr=e=>t=>1-e(1-t);var _r=Ge(.33,1.53,.69,.99),Tt=Kr(_r),Jt=Hr(Tt);var Qt=e=>e>=1?1:(e*=2)<1?.5*Tt(e):.5*(2-Math.pow(2,-10*(e-1)));var er=e=>1-Math.sin(Math.acos(e)),tr=Kr(er),rr=Hr(er);var Ti=Ge(.42,0,1,1),Si=Ge(0,0,.58,1),nr=Ge(.42,0,.58,1);var Vi=e=>Array.isArray(e)&&typeof e[0]!="number";var ir=e=>Array.isArray(e)&&typeof e[0]=="number";var is={linear:j,easeIn:Ti,easeInOut:nr,easeOut:Si,circIn:er,circInOut:rr,circOut:tr,backIn:Tt,backInOut:Jt,backOut:_r,anticipate:Qt},Ic=e=>typeof e=="string",Yr=e=>{if(ir(e)){se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,i]=e;return Ge(t,r,n,i)}else if(Ic(e))return se(is[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),is[e];return e};var or=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function os(e){let t=new Set,r=new Set,n=!1,i=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(c.schedule(u),e()),u(o)}let c={schedule:(u,l=!1,f=!1)=>{let d=f&&n?t:r;return l&&s.add(u),d.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(o=u,n){i=!0;return}n=!0;let l=t;t=r,r=l,t.forEach(a),t.clear(),n=!1,i&&(i=!1,c.process(u))}};return c}var Oc=40;function $r(e,t){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},s=()=>r=!0,o=or.reduce((w,g)=>(w[g]=os(s),w),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:f,preRender:m,render:d,postRender:p}=o,x=()=>{let w=ne.useManualTiming,g=w?i.timestamp:performance.now();r=!1,w||(i.delta=n?1e3/60:Math.max(Math.min(g-i.timestamp,Oc),1)),i.timestamp=g,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),l.process(i),f.process(i),m.process(i),d.process(i),p.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(x))},y=()=>{r=!0,n=!0,i.isProcessing||e(x)};return{schedule:or.reduce((w,g)=>{let S=o[g];return w[g]=(E,A=!1,V=!1)=>(r||y(),S.schedule(E,A,V)),w},{}),cancel:w=>{for(let g=0;g<or.length;g++)o[or[g]].cancel(w)},state:i,steps:o}}var{schedule:P,cancel:ae,state:W,steps:sr}=$r(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:j,!0);var Xr;function Nc(){Xr=void 0}var z={now:()=>(Xr===void 0&&z.set(W.isProcessing||ne.useManualTiming?W.timestamp:performance.now()),Xr),set:e=>{Xr=e,queueMicrotask(Nc)}};var ss=e=>t=>typeof t=="string"&&t.startsWith(e),qr=ss("--"),Bc=ss("var(--"),St=e=>Bc(e)?Fc.test(e.split("/*")[0].trim()):!1,Fc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ci(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var Se={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Le={...Se,transform:e=>$(0,1,e)},ar={...Se,default:1};var We=e=>Math.round(e*1e5)/1e5;var Vt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function as(e){return e==null}var ls=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Ct=(e,t)=>r=>!!(typeof r=="string"&&ls.test(r)&&r.startsWith(e)||t&&!as(r)&&Object.prototype.hasOwnProperty.call(r,t)),Zr=(e,t,r)=>n=>{if(typeof n!="string")return n;let[i,s,o,a]=n.match(Vt);return{[e]:parseFloat(i),[t]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}};var jc=e=>$(0,255,e),Pi={...Se,transform:e=>Math.round(jc(e))},Ve={test:Ct("rgb","red"),parse:Zr("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Pi.transform(e)+", "+Pi.transform(t)+", "+Pi.transform(r)+", "+We(Le.transform(n))+")"};function zc(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}var lr={test:Ct("#"),parse:zc,transform:Ve.transform};var cr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pe=cr("deg"),te=cr("%"),T=cr("px"),Ei=cr("vh"),Mi=cr("vw"),Jr={...te,parse:e=>te.parse(e)/100,transform:e=>te.transform(e*100)};var Ue={test:Ct("hsl","hue"),parse:Zr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+te.transform(We(t))+", "+te.transform(We(r))+", "+We(Le.transform(n))+")"};var O={test:e=>Ve.test(e)||lr.test(e)||Ue.test(e),parse:e=>Ve.test(e)?Ve.parse(e):Ue.test(e)?Ue.parse(e):lr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ve.transform(e):Ue.transform(e),getAnimatableNone:e=>{let t=O.parse(e);return t.alpha=0,O.transform(t)}};var cs=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Gc(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vt))==null?void 0:t.length)||0)+(((r=e.match(cs))==null?void 0:r.length)||0)>0}var fs="number",ms="color",Wc="var",Uc="var(",us="${}",Hc=/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 He(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[],s=0,a=t.replace(Hc,c=>(O.test(c)?(n.color.push(s),i.push(ms),r.push(O.parse(c))):c.startsWith(Uc)?(n.var.push(s),i.push(Wc),r.push(c)):(n.number.push(s),i.push(fs),r.push(parseFloat(c))),++s,us)).split(us);return{values:r,split:a,indexes:n,types:i}}function Kc(e){return He(e).values}function ds({split:e,types:t}){let r=e.length;return n=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],n[s]!==void 0){let o=t[s];o===fs?i+=We(n[s]):o===ms?i+=O.transform(n[s]):i+=n[s]}return i}}function _c(e){return ds(He(e))}var Yc=e=>typeof e=="number"?0:O.test(e)?O.getAnimatableNone(e):e,$c=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Yc(e);function Xc(e){let t=He(e);return ds(t)(t.values.map((n,i)=>$c(n,t.split[i])))}var X={test:Gc,parse:Kc,createTransformer:_c,getAnimatableNone:Xc};function Ai(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ps({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,s=0,o=0;if(!t)i=s=o=r;else{let a=r<.5?r*(1+t):r+t-r*t,c=2*r-a;i=Ai(c,a,e+1/3),s=Ai(c,a,e),o=Ai(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}function Pt(e,t){return r=>r>0?t:e}var M=(e,t,r)=>e+(t-e)*r;var Di=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},qc=[lr,Ve,Ue],Zc=e=>qc.find(t=>t.test(e));function hs(e){let t=Zc(e);if(Re(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Ue&&(r=ps(r)),r}var Ri=(e,t)=>{let r=hs(e),n=hs(t);if(!r||!n)return Pt(e,t);let i={...r};return s=>(i.red=Di(r.red,n.red,s),i.green=Di(r.green,n.green,s),i.blue=Di(r.blue,n.blue,s),i.alpha=M(r.alpha,n.alpha,s),Ve.transform(i))};var Qr=new Set(["none","hidden"]);function gs(e,t){return Qr.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Jc(e,t){return r=>M(e,t,r)}function en(e){return typeof e=="number"?Jc:typeof e=="string"?St(e)?Pt:O.test(e)?Ri:tu:Array.isArray(e)?xs:typeof e=="object"?O.test(e)?Ri:Qc:Pt}function xs(e,t){let r=[...e],n=r.length,i=e.map((s,o)=>en(s)(s,t[o]));return s=>{for(let o=0;o<n;o++)r[o]=i[o](s);return r}}function Qc(e,t){let r={...e,...t},n={};for(let i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=en(e[i])(e[i],t[i]));return i=>{for(let s in n)r[s]=n[s](i);return r}}function eu(e,t){var i;let r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let o=t.types[s],a=e.indexes[o][n[o]],c=(i=e.values[a])!=null?i:0;r[s]=c,n[o]++}return r}var tu=(e,t)=>{let r=X.createTransformer(t),n=He(e),i=He(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Qr.has(e)&&!i.values.length||Qr.has(t)&&!n.values.length?gs(e,t):ve(xs(eu(n,i),i.values),r):(Re(!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"),Pt(e,t))};function tn(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?M(e,t,r):en(e)(e,t)}var ys=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>P.update(t,r),stop:()=>ae(t),now:()=>W.isProcessing?W.timestamp:z.now()}};var rn=(e,t,r=10)=>{let n="",i=Math.max(Math.round(t/r),2);for(let s=0;s<i;s++)n+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function Et(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function vs(e,t=100,r){let n=r({...e,keyframes:[0,t]}),i=Math.min(Et(n),2e4);return{type:"keyframes",ease:s=>n.next(i*s).value/t,duration:Z(i)}}var G={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};function Ii(e,t){return e*Math.sqrt(1-t*t)}var ru=12;function nu(e,t,r){let n=r;for(let i=1;i<ru;i++)n=n-e(n)/t(n);return n}var Li=.001;function iu({duration:e=G.duration,bounce:t=G.bounce,velocity:r=G.velocity,mass:n=G.mass}){let i,s;Re(e<=U(G.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=$(G.minDamping,G.maxDamping,o),e=$(G.minDuration,G.maxDuration,Z(e)),o<1?(i=u=>{let l=u*o,f=l*e,m=l-r,d=Ii(u,o),p=Math.exp(-f);return Li-m/d*p},s=u=>{let f=u*o*e,m=f*r+r,d=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-f),x=Ii(Math.pow(u,2),o);return(-i(u)+Li>0?-1:1)*((m-d)*p)/x}):(i=u=>{let l=Math.exp(-u*e),f=(u-r)*e+1;return-Li+l*f},s=u=>{let l=Math.exp(-u*e),f=(r-u)*(e*e);return l*f});let a=5/e,c=nu(i,s,a);if(e=U(e),isNaN(c))return{stiffness:G.stiffness,damping:G.damping,duration:e};{let u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}var ou=["duration","bounce"],su=["stiffness","damping","mass"];function bs(e,t){return t.some(r=>e[r]!==void 0)}function au(e){let t={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...e};if(!bs(e,su)&&bs(e,ou))if(t.velocity=0,e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,s=2*$(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:G.mass,stiffness:i,damping:s}}else{let r=iu({...e,velocity:0});t={...t,...r,mass:G.mass},t.isResolvedFromDuration=!0}return t}function Mt(e=G.visualDuration,t=G.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:i}=r,s=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],a={done:!1,value:s},{stiffness:c,damping:u,mass:l,duration:f,velocity:m,isResolvedFromDuration:d}=au({...r,velocity:-Z(r.velocity||0)}),p=m||0,x=u/(2*Math.sqrt(c*l)),y=o-s,v=Z(Math.sqrt(c/l)),b=Math.abs(y)<5;n||(n=b?G.restSpeed.granular:G.restSpeed.default),i||(i=b?G.restDelta.granular:G.restDelta.default);let w,g,S,E,A,V;if(x<1)S=Ii(v,x),E=(p+x*v*y)/S,w=C=>{let I=Math.exp(-x*v*C);return o-I*(E*Math.sin(S*C)+y*Math.cos(S*C))},A=x*v*E+y*S,V=x*v*y-E*S,g=C=>Math.exp(-x*v*C)*(A*Math.sin(S*C)+V*Math.cos(S*C));else if(x===1){w=I=>o-Math.exp(-v*I)*(y+(p+v*y)*I);let C=p+v*y;g=I=>Math.exp(-v*I)*(v*C*I-p)}else{let C=v*Math.sqrt(x*x-1);w=J=>{let re=Math.exp(-x*v*J),me=Math.min(C*J,300);return o-re*((p+x*v*y)*Math.sinh(me)+C*y*Math.cosh(me))/C};let I=(p+x*v*y)/C,R=x*v*I-y*C,H=x*v*y-I*C;g=J=>{let re=Math.exp(-x*v*J),me=Math.min(C*J,300);return re*(R*Math.sinh(me)+H*Math.cosh(me))}}let L={calculatedDuration:d&&f||null,velocity:C=>U(g(C)),next:C=>{if(!d&&x<1){let R=Math.exp(-x*v*C),H=Math.sin(S*C),J=Math.cos(S*C),re=o-R*(E*H+y*J),me=U(R*(A*H+V*J));return a.done=Math.abs(me)<=n&&Math.abs(o-re)<=i,a.value=a.done?o:re,a}let I=w(C);if(d)a.done=C>=f;else{let R=U(g(C));a.done=Math.abs(R)<=n&&Math.abs(o-I)<=i}return a.value=a.done?o:I,a},toString:()=>{let C=Math.min(Et(L),2e4),I=rn(R=>L.next(C*R).value,C,30);return C+"ms "+I},toTransition:()=>{}};return L}Mt.applyToOptions=e=>{let t=vs(e,100,Mt);return e.ease=t.ease,e.duration=U(t.duration),e.type="keyframes",e};var lu=5;function nn(e,t,r){let n=Math.max(t-lu,0);return Zt(r-e(n),t-n)}function ur({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:l}){let f=e[0],m={done:!1,value:f},d=V=>a!==void 0&&V<a||c!==void 0&&V>c,p=V=>a===void 0?c:c===void 0||Math.abs(a-V)<Math.abs(c-V)?a:c,x=r*t,y=f+x,v=o===void 0?y:o(y);v!==y&&(x=v-f);let b=V=>-x*Math.exp(-V/n),w=V=>v+b(V),g=V=>{let L=b(V),C=w(V);m.done=Math.abs(L)<=u,m.value=m.done?v:C},S,E,A=V=>{d(m.value)&&(S=V,E=Mt({keyframes:[m.value,p(m.value)],velocity:nn(w,V,m.value),damping:i,stiffness:s,restDelta:u,restSpeed:l}))};return A(0),{calculatedDuration:null,next:V=>{let L=!1;return!E&&S===void 0&&(L=!0,g(V),A(V)),S!==void 0&&V>=S?E.next(V-S):(!L&&g(V),m)}}}function cu(e,t,r){let n=[],i=r||ne.mix||tn,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){let c=Array.isArray(t)?t[o]||j:t;a=ve(c,a)}n.push(a)}return n}function ws(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let s=e.length;if(se(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=cu(t,n,i),c=a.length,u=l=>{if(o&&l<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(l<e[f+1]);f++);let m=Te(e[f],e[f+1],l);return a[f](m)};return r?l=>u($(e[0],e[s-1],l)):u}function Ts(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=Te(0,t,n);e.push(M(r,1,i))}}function Ss(e){let t=[0];return Ts(t,e.length-1),t}function Vs(e,t){return e.map(r=>r*t)}function uu(e,t){return e.map(()=>t||nr).splice(0,e.length-1)}function nt({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let i=Vi(n)?n.map(Yr):Yr(n),s={done:!1,value:t[0]},o=Vs(r&&r.length===t.length?r:Ss(t),e),a=ws(o,t,{ease:Array.isArray(i)?i:uu(t,i)});return{calculatedDuration:e,next:c=>(s.value=a(c),s.done=c>=e,s)}}var fu=e=>e!==null;function Ke(e,{repeat:t,repeatType:r="loop"},n,i=1){let s=e.filter(fu),a=i<0||t&&r!=="loop"&&t%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}var mu={decay:ur,inertia:ur,tween:nt,keyframes:nt,spring:Mt};function on(e){typeof e.type=="string"&&(e.type=mu[e.type])}var _e=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var du=e=>e/100,Ie=class extends _e{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,i;let{motionValue:r}=this.options;r&&r.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;on(t);let{type:r=nt,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t,{keyframes:a}=t,c=r||nt;c!==nt&&typeof a[0]!="number"&&(this.mixKeyframes=ve(du,tn(a[0],a[1])),a=[0,100]);let u=c({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Et(u));let{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);let{delay:u=0,keyframes:l,repeat:f,repeatType:m,repeatDelay:d,type:p,onUpdate:x,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,g=n;if(f){let V=Math.min(this.currentTime,i)/a,L=Math.floor(V),C=V%1;!C&&V>=1&&(C=1),C===1&&L--,L=Math.min(L,f+1),!!(L%2)&&(m==="reverse"?(C=1-C,d&&(C-=d/a)):m==="mirror"&&(g=o)),w=$(0,1,C)*a}let S;b?(this.delayState.value=l[0],S=this.delayState):S=g.next(w),s&&!b&&(S.value=s(S.value));let{done:E}=S;!b&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return A&&p!==ur&&(S.value=Ke(l,this.options,y,this.speed)),x&&x(S.value),A&&this.finish(),S}then(t,r){return this.finished.then(t,r)}get duration(){return Z(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Z(t)}get time(){return Z(this.currentTime)}set time(t){t=U(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))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let r=this.generator.next(t).value;return nn(n=>this.generator.next(n).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=Z(this.currentTime))}play(){var i,s;if(this.isStopped)return;let{driver:t=ys,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r!=null?r:n),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(z.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}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){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}};function Cs(e){var t;for(let r=1;r<e.length;r++)(t=e[r])!=null||(e[r]=e[r-1])}var it=e=>e*180/Math.PI,Oi=e=>{let t=it(Math.atan2(e[1],e[0]));return Ni(t)},pu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Oi,rotateZ:Oi,skewX:e=>it(Math.atan(e[1])),skewY:e=>it(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ni=e=>(e=e%360,e<0&&(e+=360),e),Ps=Oi,Es=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ms=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Es,scaleY:Ms,scale:e=>(Es(e)+Ms(e))/2,rotateX:e=>Ni(it(Math.atan2(e[6],e[5]))),rotateY:e=>Ni(it(Math.atan2(-e[2],e[0]))),rotateZ:Ps,rotate:Ps,skewX:e=>it(Math.atan(e[4])),skewY:e=>it(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sn(e){return e.includes("scale")?1:0}function an(e,t){if(!e||e==="none")return sn(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,i;if(r)n=hu,i=r;else{let a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=pu,i=a}if(!i)return sn(t);let s=n[t],o=i[1].split(",").map(gu);return typeof s=="function"?s(o):o[s]}var As=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return an(r,t)};function gu(e){return parseFloat(e.trim())}var Ce=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],he=new Set([...Ce,"pathRotation"]);var Bi=e=>e===Se||e===T,xu=new Set(["x","y","z"]),yu=Ce.filter(e=>!xu.has(e));function Ds(e){let t=[];return yu.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var Oe={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{let i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{let i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},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})=>an(t,"x"),y:(e,{transform:t})=>an(t,"y")};Oe.translateX=Oe.x;Oe.translateY=Oe.y;var ot=new Set,Fi=!1,ji=!1,zi=!1;function Rs(){if(ji){let e=Array.from(ot).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let i=Ds(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let i=r.get(n);i&&i.forEach(([s,o])=>{var a;(a=n.getValue(s))==null||a.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ji=!1,Fi=!1,ot.forEach(e=>e.complete(zi)),ot.clear()}function ks(){ot.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ji=!0)})}function Ls(){zi=!0,ks(),Rs(),zi=!1}var Ye=class{constructor(t,r,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ot.add(this),Fi||(Fi=!0,P.read(ks),P.resolveKeyframes(Rs))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){let s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(n&&r){let a=n.readValue(r,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}Cs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ot.delete(this)}cancel(){this.state==="scheduled"&&(ot.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Is=e=>e.startsWith("--");function ln(e,t,r){Is(t)?e.style.setProperty(t,r):e.style[t]=r}var Os={};function cn(e,t){let r=qt(e);return()=>{var n;return(n=Os[t])!=null?n:r()}}var Ns=cn(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var un=cn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing");var st=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var Gi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:st([0,.65,.55,1]),circOut:st([.55,0,1,.45]),backIn:st([.31,.01,.66,-.59]),backOut:st([.33,1.53,.69,.99])};function Wi(e,t){if(e)return typeof e=="function"?un()?rn(e,t):"ease-out":ir(e)?st(e):Array.isArray(e)?e.map(r=>Wi(r,t)||Gi.easeOut):Gi[e]}function Bs(e,t,r,{delay:n=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){let l={[t]:r};c&&(l.offset=c);let f=Wi(a,i);Array.isArray(f)&&(l.easing=f);let m={delay:n,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(l,m)}function fn(e){return typeof e=="function"&&"applyToOptions"in e}function Fs({type:e,...t}){var r,n;return fn(e)&&un()?e.applyToOptions(t):((r=t.duration)!=null||(t.duration=300),(n=t.ease)!=null||(t.ease="easeOut"),t)}var At=class extends _e{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:r,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Fs(t);this.animation=Bs(r,n,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let l=Ke(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(l),ln(r,n,l),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,n,i;let t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(n=this.animation).commitStyles)==null||i.call(n))}get duration(){var r,n;let t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Z(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Z(t)}get time(){return Z(Number(this.animation.currentTime)||0)}set time(t){let r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=U(t),r&&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(){var t;return(t=this.manualStartTime)!=null?t:Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:r,rangeEnd:n,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ns()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),n&&(this.animation.rangeEnd=n),j):i(this)}};var js={anticipate:Qt,backInOut:Jt,circInOut:rr};function vu(e){return e in js}function zs(e){typeof e.ease=="string"&&vu(e.ease)&&(e.ease=js[e.ease])}var Ui=10,mn=class extends At{constructor(t){zs(t),on(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let a=new Ie({...o,autoplay:!1}),c=Math.max(Ui,z.now()-this.startTime),u=$(0,Ui,c-Ui),l=a.sample(c).value,{name:f}=this.options;s&&f&&ln(s,f,l),r.setWithVelocity(a.sample(Math.max(0,c-u)).value,l,u),a.stop()}};var Hi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(X.test(e)||e==="0")&&!e.startsWith("url("));function bu(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Gs(e,t,r,n){let i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;let s=e[e.length-1],o=Hi(i,t),a=Hi(s,t);return Re(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:bu(e)||(r==="spring"||fn(r))&&n}function fr(e){e.duration=0,e.type="keyframes"}var dn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);var wu=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ws(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&wu.test(e[t]))return!0;return!1}var Tu=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Su=qt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Us(e){var f;let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:s,type:o,keyframes:a}=e,c=(f=t==null?void 0:t.owner)==null?void 0:f.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:u,transformTemplate:l}=t.owner.getProps();return Su()&&r&&(dn.has(r)||Tu.has(r)&&Ws(a))&&(r!=="transform"||!l)&&!u&&!n&&i!=="mirror"&&s!==0&&o!=="inertia"}var Vu=40,pn=class extends _e{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:l,...f}){var p;super(),this.stop=()=>{var x,y;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=z.now();let m={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:s,repeatType:o,name:c,motionValue:u,element:l,...f},d=(l==null?void 0:l.KeyframeResolver)||Ye;this.keyframeResolver=new d(a,(x,y,v)=>this.onKeyframesResolved(x,y,m,!v),c,u,l),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,r,n,i){var v,b;this.keyframeResolver=void 0;let{name:s,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:l}=n;this.resolvedAt=z.now();let f=!0;Gs(t,s,o,a)||(f=!1,(ne.instantAnimations||!c)&&(l==null||l(Ke(t,n,r))),t[0]=t[t.length-1],fr(n),n.repeat=0);let d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Vu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=f&&!u&&Us(d),x=(b=(v=d.motionValue)==null?void 0:v.owner)==null?void 0:b.current,y;if(p)try{y=new mn({...d,element:x})}catch(w){y=new Ie(d)}else y=new Ie(d);y.finished.then(()=>{this.notifyFinished()}).catch(j),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ls()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}};function hn(e,t,r,n=0,i=1){let s=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),o=e.size,a=(o-1)*n;return typeof r=="function"?r(s,o):i===1?s*n:a-s*n}var Hs=30,Cu=e=>!isNaN(parseFloat(e)),Ks={current:void 0},Ki=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var s;let i=z.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(let o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=z.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Cu(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new ke);let n=this.events[t].add(r);return t==="change"?()=>{n(),P.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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 Ks.current&&Ks.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hs)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Hs);return Zt(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function be(e,t){return new Ki(e,t)}function gn(e,t){if(e!=null&&e.inherit&&t){let{inherit:r,...n}=e;return{...t,...n}}return e}function Dt(e,t){var n,i;let r=(i=(n=e==null?void 0:e[t])!=null?n:e==null?void 0:e.default)!=null?i:e;return r!==e?gn(r,e):r}var Pu={type:"spring",stiffness:500,damping:25,restSpeed:10},Eu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mu={type:"keyframes",duration:.8},Au={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_s=(e,{keyframes:t})=>t.length>2?Mu:he.has(e)?e.startsWith("scale")?Eu(t[1]):Pu:Au;var Du=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ys(e){for(let t in e)if(!Du.has(t))return!0;return!1}var at=(e,t,r,n={},i,s)=>o=>{let a=Dt(n,e)||{},c=a.delay||n.delay||0,{elapsed:u=0}=n;u=u-U(c);let l={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};Ys(a)||Object.assign(l,_s(e,l)),l.duration&&(l.duration=U(l.duration)),l.repeatDelay&&(l.repeatDelay=U(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(fr(l),l.delay===0&&(f=!0)),(ne.instantAnimations||ne.skipAnimations||i!=null&&i.shouldSkipAnimations||a.skipAnimations)&&(f=!0,fr(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){let m=Ke(l.keyframes,a);if(m!==void 0){P.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new Ie(l):new pn(l)};var Ru=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ku(e){let t=Ru.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${r!=null?r:n}`,i]}var Lu=4;function _i(e,t,r=1){se(r<=Lu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,i]=ku(e);if(!n)return;let s=window.getComputedStyle(t).getPropertyValue(n);if(s){let o=s.trim();return Yt(o)?parseFloat(o):o}return St(i)?_i(i,t,r+1):i}function $s(e){let t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function lt(e,t,r,n){if(typeof t=="function"){let[i,s]=$s(n);t=t(r!==void 0?r:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[i,s]=$s(n);t=t(r!==void 0?r:e.custom,i,s)}return t}function ce(e,t,r){let n=e.getProps();return lt(n,t,r!==void 0?r:n.custom,e)}var xn=new Set(["width","height","top","left","right","bottom",...Ce]);var mr=e=>Array.isArray(e);function Iu(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,be(r))}function Ou(e){return mr(e)?e[e.length-1]||0:e}function Xs(e,t){let r=ce(e,t),{transitionEnd:n={},transition:i={},...s}=r||{};s={...s,...n};for(let o in s){let a=Ou(s[o]);Iu(e,o,a)}}var k=e=>!!(e&&e.getVelocity);function qs(e){return!!(k(e)&&e.add)}function Rt(e,t){let r=e.getValue("willChange");if(qs(r))return r.add(t);if(!r&&ne.WillChange){let n=new ne.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function kt(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Zs="framerAppearId",dr="data-"+kt(Zs);function yn(e){return e.props[dr]}function Nu({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function vn(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var p;let{transition:s,transitionEnd:o,...a}=t,c=e.getDefaultTransition();s=s?gn(s,c):c;let u=s==null?void 0:s.reduceMotion,l=s==null?void 0:s.skipAnimations;n&&(s=n);let f=[],m=i&&e.animationState&&e.animationState.getState()[i],d=s==null?void 0:s.path;d&&d.animateVisualElement(e,a,s,r,f);for(let x in a){let y=e.getValue(x,(p=e.latestValues[x])!=null?p:null),v=a[x];if(v===void 0||m&&Nu(m,x))continue;let b={delay:r,...Dt(s||{},x)};l&&(b.skipAnimations=!0);let w=y.get();if(w!==void 0&&!y.isAnimating()&&!Array.isArray(v)&&v===w&&!b.velocity){P.update(()=>y.set(v));continue}let g=!1;if(window.MotionHandoffAnimation){let A=yn(e);if(A){let V=window.MotionHandoffAnimation(A,x,P);V!==null&&(b.startTime=V,g=!0)}}Rt(e,x);let S=u!=null?u:e.shouldReduceMotion;y.start(at(x,y,v,S&&xn.has(x)?{type:!1}:b,e,g));let E=y.animation;E&&f.push(E)}if(o){let x=()=>P.update(()=>{o&&Xs(e,o)});f.length?Promise.all(f).then(x):x()}return f}function bn(e,t,r={}){var c;let n=ce(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);let s=n?()=>Promise.all(vn(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{let{delayChildren:l=0,staggerChildren:f,staggerDirection:m}=i;return Bu(e,t,u,l,f,m,r)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,l]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>l())}else return Promise.all([s(),o(r.delay)])}function Bu(e,t,r=0,n=0,i=0,s=1,o){let a=[];for(let c of e.variantChildren)c.notify("AnimationStart",t),a.push(bn(c,t,{...o,delay:r+(typeof n=="function"?0:n)+hn(e.variantChildren,c,n,i,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Js(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let i=t.map(s=>bn(e,s,r));n=Promise.all(i)}else if(typeof t=="string")n=bn(e,t,r);else{let i=typeof t=="function"?ce(e,t,r.custom):t;n=Promise.all(vn(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var Qs={test:e=>e==="auto",parse:e=>e};var wn=e=>t=>t.test(e);var Yi=[Se,T,te,pe,Mi,Ei,Qs],$i=e=>Yi.find(wn(e));function ea(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xt(e):!0}var Fu=new Set(["brightness","contrast","saturate","opacity"]);function ju(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(Vt)||[];if(!n)return e;let i=r.replace(n,""),s=Fu.has(t)?1:0;return n!==r&&(s*=100),t+"("+s+i+")"}var zu=/\b([a-z-]*)\(.*?\)/gu,pr={...X,getAnimatableNone:e=>{let t=e.match(zu);return t?t.map(ju).join(" "):e}};var hr={...X,getAnimatableNone:e=>{let t=X.parse(e);return X.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}};var Xi={...Se,transform:Math.round};var ta={rotate:pe,pathRotation:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:ar,scaleX:ar,scaleY:ar,scaleZ:ar,skew:pe,skewX:pe,skewY:pe,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Le,originX:Jr,originY:Jr,originZ:T};var ct={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...ta,zIndex:Xi,fillOpacity:Le,strokeOpacity:Le,numOctaves:Xi};var Gu={...ct,color:O,backgroundColor:O,outlineColor:O,fill:O,stroke:O,borderColor:O,borderTopColor:O,borderRightColor:O,borderBottomColor:O,borderLeftColor:O,filter:pr,WebkitFilter:pr,mask:hr,WebkitMask:hr},Tn=e=>Gu[e];var Wu=new Set([pr,hr]);function Sn(e,t){let r=Tn(e);return Wu.has(r)||(r=X),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Uu=new Set(["auto","none","0"]);function ra(e,t,r){let n=0,i;for(;n<e.length&&!i;){let s=e[n];typeof s=="string"&&!Uu.has(s)&&He(s).values.length&&(i=e[n]),n++}if(i&&r)for(let s of t)e[s]=Sn(r,i)}var Vn=class extends Ye{constructor(t,r,n,i,s){super(t,r,n,i,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let f=t[l];if(typeof f=="string"&&(f=f.trim(),St(f))){let m=_i(f,r.current);m!==void 0&&(t[l]=m),l===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!xn.has(n)||t.length!==2)return;let[i,s]=t,o=$i(i),a=$i(s),c=Ci(i),u=Ci(s);if(c!==u&&Oe[n]){this.needsMeasurement=!0;return}if(o!==a)if(Bi(o)&&Bi(a))for(let l=0;l<t.length;l++){let f=t[l];typeof f=="string"&&(t[l]=parseFloat(f))}else Oe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||ea(t[i]))&&n.push(i);n.length&&ra(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var a;let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);let s=n.length-1,o=n[s];n[s]=Oe[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}};var gr=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Cn(e,t,r){var n;if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;t&&(i=t.current);let s=(n=r==null?void 0:r[e])!=null?n:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}var xr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function na(e){return $t(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:ut,cancel:Hu}=$r(queueMicrotask,!1);var ge={x:!1,y:!1};function Pn(){return ge.x||ge.y}function qi(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function En(e,t){let r=Cn(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function Ku(e){return!(e.pointerType==="touch"||Pn())}function Zi(e,t,r={}){let[n,i,s]=En(e,r);return n.forEach(o=>{let a=!1,c=!1,u,l=()=>{o.removeEventListener("pointerleave",p)},f=y=>{u&&(u(y),u=void 0),l()},m=y=>{a=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,f(y))},d=()=>{a=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}f(y)}},x=y=>{if(!Ku(y))return;c=!1;let v=t(o,y);typeof v=="function"&&(u=v,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",x,i),o.addEventListener("pointerdown",d,i)}),s}var Ji=(e,t)=>t?e===t?!0:Ji(e,t.parentElement):!1;var ft=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var _u=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qi(e){return _u.has(e.tagName)||e.isContentEditable===!0}var Yu=new Set(["INPUT","SELECT","TEXTAREA"]);function eo(e){return Yu.has(e.tagName)||e.isContentEditable===!0}var Lt=new WeakSet;function ia(e){return t=>{t.key==="Enter"&&e(t)}}function to(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var oa=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=ia(()=>{if(Lt.has(r))return;to(r,"down");let i=ia(()=>{to(r,"up")}),s=()=>to(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",s,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function sa(e){return ft(e)&&!Pn()}var aa=new WeakSet;function ro(e,t,r={}){let[n,i,s]=En(e,r),o=a=>{let c=a.currentTarget;if(!sa(a)||aa.has(a))return;Lt.add(c),r.stopPropagation&&aa.add(a);let u=t(c,a),l={...i,capture:!0},f=(p,x)=>{window.removeEventListener("pointerup",m,l),window.removeEventListener("pointercancel",d,l),Lt.has(c)&&Lt.delete(c),sa(p)&&typeof u=="function"&&u(p,{success:x})},m=p=>{f(p,c===window||c===document||r.useGlobalTarget||Ji(c,p.target))},d=p=>{f(p,!1)};window.addEventListener("pointerup",m,l),window.addEventListener("pointercancel",d,l)};return n.forEach(a=>{(r.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),na(a)&&(a.addEventListener("focus",u=>oa(u,i)),!Qi(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function It(e){return $t(e)&&"ownerSVGElement"in e}var Mn=new WeakMap,$e,la=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:It(n)&&"getBBox"in n?n.getBBox()[t]:n[r],$u=la("inline","width","offsetWidth"),Xu=la("block","height","offsetHeight");function qu({target:e,borderBoxSize:t}){var r;(r=Mn.get(e))==null||r.forEach(n=>{n(e,{get width(){return $u(e,t)},get height(){return Xu(e,t)}})})}function Zu(e){e.forEach(qu)}function Ju(){typeof ResizeObserver!="undefined"&&($e=new ResizeObserver(Zu))}function ca(e,t){$e||Ju();let r=Cn(e);return r.forEach(n=>{let i=Mn.get(n);i||(i=new Set,Mn.set(n,i)),i.add(t),$e==null||$e.observe(n)}),()=>{r.forEach(n=>{let i=Mn.get(n);i==null||i.delete(t),i!=null&&i.size||$e==null||$e.unobserve(n)})}}var An=new Set,Ot;function Qu(){Ot=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};An.forEach(t=>t(e))},window.addEventListener("resize",Ot)}function ua(e){return An.add(e),Ot||Qu(),()=>{An.delete(e),!An.size&&typeof Ot=="function"&&(window.removeEventListener("resize",Ot),Ot=void 0)}}function Dn(e,t){return typeof e=="function"?ua(e):ca(e,t)}var mt={value:null,addProjectionMetrics:null};function fa(e){return It(e)&&e.tagName==="svg"}var ef=[...Yi,O,X],ma=e=>ef.find(wn(e));var no=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xe=()=>({x:no(),y:no()}),io=()=>({min:0,max:0}),N=()=>({x:io(),y:io()});var da=new WeakMap;function Ne(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Pe(e){return typeof e=="string"||Array.isArray(e)}var Rn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yr=["initial",...Rn];function qe(e){return Ne(e.animate)||yr.some(t=>Pe(e[t]))}function vr(e){return!!(qe(e)||e.variants)}function pa(e,t,r){for(let n in t){let i=t[n],s=r[n];if(k(i))e.addValue(n,i);else if(k(s))e.addValue(n,be(i,{owner:e}));else if(s!==i)if(e.hasValue(n)){let o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{let o=e.getStaticValue(n);e.addValue(n,be(o!==void 0?o:i,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var br={current:null},kn={current:!1};var tf=typeof window!="undefined";function ha(){if(kn.current=!0,!!tf)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>br.current=e.matches;e.addEventListener("change",t),t()}else br.current=!1}var ga=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ln={};function Tr(e){Ln=e}function oo(){return Ln}var wr=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,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=Ye,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=()=>{let d=z.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,P.render(this.render,!1,!0))};let{latestValues:u,renderState:l}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=qe(r),this.isVariantNode=vr(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:f,...m}=this.scrapeMotionValuesFromProps(r,{},this);for(let d in m){let p=m[d];u[d]!==void 0&&k(p)&&p.set(u[d])}}mount(t){var r,n,i;if(this.hasBeenMounted)for(let s in this.initialValues)(r=this.values.get(s))==null||r.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,da.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(kn.current||ha(),this.shouldReduceMotion=br.current),this.shouldSkipAnimations=(n=this.skipAnimationsConfig)!=null?n:!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ae(this.notifyUpdate),ae(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(let r in this.events)this.events[r].clear();for(let r in this.features){let n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){var r;this.children.add(t),(r=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&dn.has(t)&&this.current instanceof HTMLElement){let{factory:o,keyframes:a,times:c,ease:u,duration:l}=r.accelerate,f=new At({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:U(l)}),m=o(f);this.valueSubscriptions.set(t,()=>{m(),f.cancel()});return}let n=he.has(t);n&&this.onBindTransform&&this.onBindTransform();let i=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&P.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),s;typeof window!="undefined"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}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 Ln){let r=Ln[t];if(!r)continue;let{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){let s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):N()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<ga.length;n++){let i=ga[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=pa(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){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=be(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var i;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!=null?i:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Yt(n)||Xt(n))?n=parseFloat(n):!ma(n)&&X.test(r)&&(n=Sn(t,r)),this.setBaseTarget(t,k(n)?n.get():n)),k(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var s;let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let o=lt(this.props,r,(s=this.presenceContext)==null?void 0:s.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;let i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!k(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new ke),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){ut.render(this.render)}};var Nt=class extends wr{constructor(){super(...arguments),this.KeyframeResolver=Vn}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){let n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;k(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};var q=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function Sr({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function so({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ao(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function lo(e){return e===void 0||e===1}function In({scale:e,scaleX:t,scaleY:r}){return!lo(e)||!lo(t)||!lo(r)}function Be(e){return In(e)||co(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function co(e){return xa(e.x)||xa(e.y)}function xa(e){return e&&e!=="0%"}function Vr(e,t,r){let n=e-r,i=t*n;return r+i}function ya(e,t,r,n,i){return i!==void 0&&(e=Vr(e,i,n)),Vr(e,r,n)+t}function uo(e,t=0,r=1,n,i){e.min=ya(e.min,t,r,n,i),e.max=ya(e.max,t,r,n,i)}function fo(e,{x:t,y:r}){uo(e.x,t.translate,t.scale,t.originPoint),uo(e.y,r.translate,r.scale,r.originPoint)}var va=.999999999999,ba=1.0000000000001;function Sa(e,t,r,n=!1){var a;let i=r.length;if(!i)return;t.x=t.y=1;let s,o;for(let c=0;c<i;c++){s=r[c],o=s.projectionDelta;let{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(xe(e.x,-s.scroll.offset.x),xe(e.y,-s.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,fo(e,o)),n&&Be(s.latestValues)&&Cr(e,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}t.x<ba&&t.x>va&&(t.x=1),t.y<ba&&t.y>va&&(t.y=1)}function xe(e,t){e.min+=t,e.max+=t}function wa(e,t,r,n,i=.5){let s=M(e.min,e.max,i);uo(e,t,r,s,n)}function Ta(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Cr(e,t,r){let n=r!=null?r:e;wa(e.x,Ta(t.x,n.x),t.scaleX,t.scale,t.originX),wa(e.y,Ta(t.y,n.y),t.scaleY,t.scale,t.originY)}function On(e,t){return Sr(ao(e.getBoundingClientRect(),t))}function mo(e,t,r){let n=On(e,r),{scroll:i}=t;return i&&(xe(n.x,i.offset.x),xe(n.y,i.offset.y)),n}var rf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nf=Ce.length;function Va(e,t,r){let n="",i=!0;for(let o=0;o<nf;o++){let a=Ce[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number")u=c===(a.startsWith("scale")?1:0);else{let l=parseFloat(c);u=a.startsWith("scale")?l===1:l===0}if(!u||r){let l=xr(c,ct[a]);if(!u){i=!1;let f=rf[a]||a;n+=`${f}(${l}) `}r&&(t[a]=l)}}let s=e.pathRotation;return s&&(i=!1,n+=`rotate(${xr(s,ct.pathRotation)}) `),n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function dt(e,t,r){let{style:n,vars:i,transformOrigin:s}=e,o=!1,a=!1;for(let c in t){let u=t[c];if(he.has(c)){o=!0;continue}else if(qr(c)){i[c]=u;continue}else{let l=xr(u,ct[c]);c.startsWith("origin")?(a=!0,s[c]=l):n[c]=l}}if(t.transform||(o||r?n.transform=Va(t,e.transform,r):n.transform&&(n.transform="none")),a){let{originX:c="50%",originY:u="50%",originZ:l=0}=s;n.transformOrigin=`${c} ${u} ${l}`}}function Nn(e,{style:t,vars:r},n,i){let s=e.style,o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,n);for(o in r)s.setProperty(o,r[o])}function Ca(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Bt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;let r=Ca(e,t.target.x),n=Ca(e,t.target.y);return`${r}% ${n}%`}};var Pa={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,i=X.parse(e);if(i.length>5)return n;let s=X.createTransformer(e),o=typeof i[0]!="number"?1:0,a=r.x.scale*t.x,c=r.y.scale*t.y;i[0+o]/=a,i[1+o]/=c;let u=M(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};var Pr={borderRadius:{...Bt,applyTo:[...gr]},borderTopLeftRadius:Bt,borderTopRightRadius:Bt,borderBottomLeftRadius:Bt,borderBottomRightRadius:Bt,boxShadow:Pa};function Er(e,{layout:t,layoutId:r}){return he.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Pr[e]||e==="opacity")}function pt(e,t,r){var o;let n=e.style,i=t==null?void 0:t.style,s={};if(!n)return s;for(let a in n)(k(n[a])||i&&k(i[a])||Er(a,e)||((o=r==null?void 0:r.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(s[a]=n[a]);return s}function of(e){return window.getComputedStyle(e)}var Mr=class extends Nt{constructor(){super(...arguments),this.type="html",this.renderInstance=Nn}mount(t){se(!!t.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(t)}readValueFromInstance(t,r){var n;if(he.has(r))return(n=this.projection)!=null&&n.isProjecting?sn(r):As(t,r);{let i=of(t),s=(qr(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return On(t,r)}build(t,r,n){dt(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return pt(t,r,n)}};var sf={offset:"stroke-dashoffset",array:"stroke-dasharray"},af={offset:"strokeDashoffset",array:"strokeDasharray"};function Ea(e,t,r=1,n=0,i=!0){e.pathLength=1;let s=i?sf:af;e[s.offset]=`${-n}`,e[s.array]=`${t} ${r}`}var lf=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ar(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},c,u,l){var d,p;if(dt(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=(d=f.transformOrigin)!=null?d:"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(p=l==null?void 0:l.transformBox)!=null?p:"fill-box",delete f.transformBox);for(let x of lf)f[x]!==void 0&&(m[x]=f[x],delete f[x]);t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&Ea(f,i,s,o,!1)}var Bn=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"]);var Dr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ma(e,t,r,n){Nn(e,t,void 0,n);for(let i in t.attrs)e.setAttribute(Bn.has(i)?i:kt(i),t.attrs[i])}function Rr(e,t,r){let n=pt(e,t,r);for(let i in e)if(k(e[i])||k(t[i])){let s=Ce.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=e[i]}return n}var kr=class extends Nt{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=N}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(he.has(r)){let n=Tn(r);return n&&n.default||0}return r=Bn.has(r)?r:kt(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return Rr(t,r,n)}build(t,r,n){Ar(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){Ma(t,r,n,i)}mount(t){this.isSVGTag=Dr(t.tagName),super.mount(t)}};var cf=yr.length;function po(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?po(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<cf;r++){let n=yr[r],i=e.props[n];(Pe(i)||i===!1)&&(t[n]=i)}return t}function ho(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var uf=[...Rn].reverse(),ff=Rn.length;function mf(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Js(e,r,n)))}function go(e){let t=mf(e),r=Aa(),n=!0,i=!1,s=u=>(l,f)=>{var d;let m=ce(e,f,u==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(m){let{transition:p,transitionEnd:x,...y}=m;l={...l,...y,...x}}return l};function o(u){t=u(e)}function a(u){let{props:l}=e,f=po(e.parent)||{},m=[],d=new Set,p={},x=1/0;for(let v=0;v<ff;v++){let b=uf[v],w=r[b],g=l[b]!==void 0?l[b]:f[b],S=Pe(g),E=b===u?w.isActive:null;E===!1&&(x=v);let A=g===f[b]&&g!==l[b]&&S;if(A&&(n||i)&&e.manuallyAnimateOnMount&&(A=!1),w.protectedKeys={...p},!w.isActive&&E===null||!g&&!w.prevProp||Ne(g)||typeof g=="boolean")continue;if(b==="exit"&&w.isActive&&E!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}let V=Da(w.prevProp,g),L=V||b===u&&w.isActive&&!A&&S||v>x&&S,C=!1,I=Array.isArray(g)?g:[g],R=I.reduce(s(b),{});E===!1&&(R={});let{prevResolvedValues:H={}}=w,J={...H,...R},re=Y=>{L=!0,d.has(Y)&&(C=!0,d.delete(Y)),w.needsAnimating[Y]=!0;let B=e.getValue(Y);B&&(B.liveStyle=!1)};for(let Y in J){let B=R[Y],we=H[Y];if(p.hasOwnProperty(Y))continue;let De=!1;mr(B)&&mr(we)?De=!ho(B,we)||V:De=B!==we,De?B!=null?re(Y):d.add(Y):B!==void 0&&d.has(Y)?re(Y):w.protectedKeys[Y]=!0}w.prevProp=g,w.prevResolvedValues=R,w.isActive&&(p={...p,...R}),(n||i)&&e.blockInitialAnimation&&(L=!1);let me=A&&V;L&&(!me||C)&&m.push(...I.map(Y=>{let B={type:b};if(typeof Y=="string"&&(n||i)&&!me&&e.manuallyAnimateOnMount&&e.parent){let{parent:we}=e,De=ce(we,Y);if(we.enteringChildren&&De){let{delayChildren:yi}=De.transition||{};B.delay=hn(we.enteringChildren,e,yi)}}return{animation:Y,options:B}}))}if(d.size){let v={};if(typeof l.initial!="boolean"){let b=ce(e,Array.isArray(l.initial)?l.initial[0]:l.initial);b&&b.transition&&(v.transition=b.transition)}d.forEach(b=>{let w=e.getBaseTarget(b),g=e.getValue(b);g&&(g.liveStyle=!0),v[b]=w!=null?w:null}),m.push({animation:v})}let y=!!m.length;return n&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),n=!1,i=!1,y?t(m):Promise.resolve()}function c(u,l){var m;if(r[u].isActive===l)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(u,l)}),r[u].isActive=l;let f=a(u);for(let d in r)r[d].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>r,reset:()=>{r=Aa(),i=!0}}}function Da(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ho(t,e):!1}function ht(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Aa(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}function Fn(e,t){e.min=t.min,e.max=t.max}function ye(e,t){Fn(e.x,t.x),Fn(e.y,t.y)}function xo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ra=1e-4,df=1-Ra,pf=1+Ra,ka=.01,hf=0-ka,gf=0+ka;function K(e){return e.max-e.min}function wo(e,t,r){return Math.abs(e-t)<=r}function yo(e,t,r,n=.5){e.origin=n,e.originPoint=M(t.min,t.max,e.origin),e.scale=K(r)/K(t),e.translate=M(r.min,r.max,e.origin)-e.originPoint,(e.scale>=df&&e.scale<=pf||isNaN(e.scale))&&(e.scale=1),(e.translate>=hf&&e.translate<=gf||isNaN(e.translate))&&(e.translate=0)}function gt(e,t,r,n){yo(e.x,t.x,r.x,n?n.originX:void 0),yo(e.y,t.y,r.y,n?n.originY:void 0)}function vo(e,t,r,n=0){let i=n?M(r.min,r.max,n):r.min;e.min=i+t.min,e.max=e.min+K(t)}function To(e,t,r,n){vo(e.x,t.x,r.x,n==null?void 0:n.x),vo(e.y,t.y,r.y,n==null?void 0:n.y)}function bo(e,t,r,n=0){let i=n?M(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+K(t)}function Ft(e,t,r,n){bo(e.x,t.x,r.x,n==null?void 0:n.x),bo(e.y,t.y,r.y,n==null?void 0:n.y)}function La(e,t,r,n,i){return e-=t,e=Vr(e,1/r,n),i!==void 0&&(e=Vr(e,1/i,n)),e}function xf(e,t=0,r=1,n=.5,i,s=e,o=e){if(te.test(t)&&(t=parseFloat(t),t=M(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=M(s.min,s.max,n);e===s&&(a-=t),e.min=La(e.min,t,r,a,i),e.max=La(e.max,t,r,a,i)}function Ia(e,t,[r,n,i],s,o){xf(e,t[r],t[n],t[i],t.scale,s,o)}var yf=["x","scaleX","originX"],vf=["y","scaleY","originY"];function So(e,t,r,n){Ia(e.x,t,yf,r?r.x:void 0,n?n.x:void 0),Ia(e.y,t,vf,r?r.y:void 0,n?n.y:void 0)}function Oa(e){return e.translate===0&&e.scale===1}function Vo(e){return Oa(e.x)&&Oa(e.y)}function Na(e,t){return e.min===t.min&&e.max===t.max}function Fa(e,t){return Na(e.x,t.x)&&Na(e.y,t.y)}function Ba(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Co(e,t){return Ba(e.x,t.x)&&Ba(e.y,t.y)}function Po(e){return K(e.x)/K(e.y)}function Eo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ue(e){return[e("x"),e("y")]}function ja(e,t,r){let n="",i=e.x.translate/t.x,s=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||s||o)&&(n=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:l,pathRotation:f,rotateX:m,rotateY:d,skewX:p,skewY:x}=r;u&&(n=`perspective(${u}px) ${n}`),l&&(n+=`rotate(${l}deg) `),f&&(n+=`rotate(${f}deg) `),m&&(n+=`rotateX(${m}deg) `),d&&(n+=`rotateY(${d}deg) `),p&&(n+=`skewX(${p}deg) `),x&&(n+=`skewY(${x}deg) `)}let a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(n+=`scale(${a}, ${c})`),n||"none"}var bf=gr.length,za=e=>typeof e=="string"?parseFloat(e):e,Ga=e=>typeof e=="number"||T.test(e);function Ua(e,t,r,n,i,s){var o,a,c,u;i?(e.opacity=M(0,(o=r.opacity)!=null?o:1,wf(n)),e.opacityExit=M((a=t.opacity)!=null?a:1,0,Tf(n))):s&&(e.opacity=M((c=t.opacity)!=null?c:1,(u=r.opacity)!=null?u:1,n));for(let l=0;l<bf;l++){let f=gr[l],m=Wa(t,f),d=Wa(r,f);if(m===void 0&&d===void 0)continue;m||(m=0),d||(d=0),m===0||d===0||Ga(m)===Ga(d)?(e[f]=Math.max(M(za(m),za(d),n),0),(te.test(d)||te.test(m))&&(e[f]+="%")):e[f]=d}(t.rotate||r.rotate)&&(e.rotate=M(t.rotate||0,r.rotate||0,n))}function Wa(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var wf=Ha(0,.5,tr),Tf=Ha(.5,.95,j);function Ha(e,t,r){return n=>n<e?0:n>t?1:r(Te(e,t,n))}function Ka(e,t,r){let n=k(e)?e:be(e);return n.start(at("",n,t,r)),n.animation}function Ee(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}var _a=(e,t)=>e.depth-t.depth;var jn=class{constructor(){this.children=[],this.isDirty=!1}add(t){rt(this.children,t),this.isDirty=!0}remove(t){ze(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_a),this.isDirty=!1,this.children.forEach(t)}};function Ya(e,t){let r=z.now(),n=({timestamp:i})=>{let s=i-r;s>=t&&(ae(n),e(s-t))};return P.setup(n,!0),()=>ae(n)}function xt(e){return k(e)?e.get():e}var zn=class{constructor(){this.members=[]}add(t){rt(this.members,t);for(let r=this.members.length-1;r>=0;r--){let n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;let i=n.instance;(!i||i.isConnected===!1)&&!n.snapshot&&(ze(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(ze(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){var r;for(let n=this.members.indexOf(t)-1;n>=0;n--){let i=this.members[n];if(i.isPresent!==!1&&((r=i.instance)==null?void 0:r.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,r){var i;let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();let{layoutDependency:s}=n.options,{layoutDependency:o}=t.options;(s===void 0||s!==o)&&(t.resumeFrom=n,r&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var r,n,i,s,o;(n=(r=t.options).onExitComplete)==null||n.call(r),(o=(i=t.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||o.call(s)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}};var yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var vt={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Mo=["","X","Y","Z"],Sf=1e3,Vf=0;function Ao(e,t,r,n){let{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function rl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=yn(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",P,!(i||s))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&rl(n)}function Gn({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Vf++,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,mt.value&&(vt.nodes=vt.calculatedTargetDeltas=vt.calculatedProjections=0),this.nodes.forEach(Ef),this.nodes.forEach(Lf),this.nodes.forEach(If),this.nodes.forEach(Mf),mt.addProjectionMetrics&&mt.addProjectionMetrics(vt)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 jn)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ke),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){let c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=It(o)&&!fa(o),this.instance=o;let{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let l,f=0,m=()=>this.root.updateBlockedByResize=!1;P.read(()=>{f=window.innerWidth}),e(o,()=>{let d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,l&&l(),l=Ya(m,250),yt.hasAnimatedSinceResize&&(yt.hasAnimatedSinceResize=!1,this.nodes.forEach(qa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||u.getDefaultTransition()||jf,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Co(this.targetLayout,d),b=!f&&m;if(this.options.layoutRoot||this.resumeFrom||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let w={...Dt(p,"layout"),onPlay:x,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(l,b,w.path)}else f||qa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ae(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(Of),this.animationId++)}getTransformTemplate(){let{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){let f=this.path[l];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Df),this.nodes.forEach($a);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xa);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rf),this.nodes.forEach(kf),this.nodes.forEach(Cf),this.nodes.forEach(Pf)):this.nodes.forEach(Xa),this.clearAllSnapshots();let a=z.now();W.delta=$(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,sr.update.process(W),sr.preRender.process(W),sr.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ut.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Af),this.sharedNodes.forEach(Nf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,P.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!K(this.snapshot.measuredBox.x)&&!K(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();let o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=N()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){let c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;let o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vo(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Be(this.latestValues)||l)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){let a=this.measurePageBox(),c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),zf(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;let{visualElement:o}=this.options;if(!o)return N();let a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Gf))){let{scroll:l}=this.root;l&&(xe(a.x,l.offset.x),xe(a.y,l.offset.y))}return a}removeElementScroll(o){var c;let a=N();if(ye(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){let l=this.path[u],{scroll:f,options:m}=l;l!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&ye(a,o),xe(a.x,f.offset.x),xe(a.y,f.offset.y))}return a}applyTransform(o,a=!1,c){var l,f;let u=c||N();ye(u,o);for(let m=0;m<this.path.length;m++){let d=this.path[m];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(xe(u.x,-d.scroll.offset.x),xe(u.y,-d.scroll.offset.y)),Be(d.latestValues)&&Cr(u,d.latestValues,(l=d.layout)==null?void 0:l.layoutBox)}return Be(this.latestValues)&&Cr(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var c;let a=N();ye(a,o);for(let u=0;u<this.path.length;u++){let l=this.path[u];if(!Be(l.latestValues))continue;let f;l.instance&&(In(l.latestValues)&&l.updateSnapshot(),f=N(),ye(f,l.measurePageBox())),So(a,l.latestValues,(c=l.snapshot)==null?void 0:c.layoutBox,f)}return Be(this.latestValues)&&So(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:l,layoutId:f}=this.options;if(!this.layout||!(l||f))return;this.resolvedRelativeTargetAt=W.timestamp;let m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=N(),this.targetWithTransforms=N()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),To(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ye(this.target,this.layout.layoutBox),fo(this.target,this.targetDelta)):ye(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0),mt.value&&vt.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||In(this.parent.latestValues)||co(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=N(),this.relativeTargetOrigin=N(),Ft(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),ye(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;let o=this.getLead(),a=!!this.resumingFrom||this!==o,c=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;let{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;ye(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,m=this.treeScale.y;Sa(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=N());let{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xo(this.prevProjectionDelta.x,this.projectionDelta.x),xo(this.prevProjectionDelta.y,this.projectionDelta.y)),gt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Eo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Eo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),mt.value&&vt.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){let c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xe(),this.projectionDelta=Xe(),this.projectionDeltaWithTransform=Xe()}setAnimationOrigin(o,a=!1,c){let u=this.snapshot,l=u?u.latestValues:{},f={...this.latestValues},m=Xe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let d=N(),p=u?u.source:void 0,x=this.layout?this.layout.source:void 0,y=p!==x,v=this.getStack(),b=!v||v.members.length<=1,w=!!(y&&!b&&this.options.crossfade===!0&&!this.path.some(Ff));this.animationProgress=0;let g,S=c==null?void 0:c.interpolateProjection(o);this.mixTargetDelta=E=>{let A=E/1e3,V=S==null?void 0:S(A);V?(m.x.translate=V.x,m.x.scale=M(o.x.scale,1,A),m.x.origin=o.x.origin,m.x.originPoint=o.x.originPoint,m.y.translate=V.y,m.y.scale=M(o.y.scale,1,A),m.y.origin=o.y.origin,m.y.originPoint=o.y.originPoint):(Za(m.x,o.x,A),Za(m.y,o.y,A)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ft(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Bf(this.relativeTarget,this.relativeTargetOrigin,d,A),g&&Fa(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=N()),ye(g,this.relativeTarget)),y&&(this.animationValues=f,Ua(f,l,this.latestValues,A,w,b)),V&&V.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=V.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=P.update(()=>{yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=be(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ka(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.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);let o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let o=this.getLead(),{targetWithTransforms:a,target:c,layout:u,latestValues:l}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&nl(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||N();let f=K(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;let m=K(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}ye(a,c),Cr(a,l),gt(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zn),this.sharedNodes.get(o).add(a);let u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){let o=this.getStack();return o?o.lead===this:!0}getLead(){var a;let{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;let{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){let{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){let u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){let{visualElement:o}=this.options;if(!o)return;let a=!1,{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;let u={};c.z&&Ao("z",o,u,this.animationValues);for(let l=0;l<Mo.length;l++)Ao(`rotate${Mo[l]}`,o,u,this.animationValues),Ao(`skew${Mo[l]}`,o,u,this.animationValues);o.render();for(let l in u)o.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);o.scheduleRender()}applyProjectionStyles(o,a){var p,x;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}let c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=xt(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=xt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Be(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";let l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=ja(this.projectionDeltaWithTransform,this.treeScale,l);c&&(f=c(l,f)),o.transform=f;let{x:m,y:d}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?(x=(p=l.opacity)!=null?p:this.latestValues.opacity)!=null?x:1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(let y in Pr){if(l[y]===void 0)continue;let{correct:v,applyTo:b,isCSSVariable:w}=Pr[y],g=f==="none"?l[y]:v(l[y],u);if(b){let S=b.length;for(let E=0;E<S;E++)o[b[E]]=g}else w?this.options.visualElement.renderState.vars[y]=g:o[y]=g}this.options.layoutId&&(o.pointerEvents=u===this?xt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach($a),this.root.sharedNodes.clear()}}}function Cf(e){e.updateLayout()}function Pf(e){var r;let t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;if(s==="size")ue(f=>{let m=o?t.measuredBox[f]:t.layoutBox[f],d=K(m);m.min=n[f].min,m.max=m.min+d});else if(s==="x"||s==="y"){let f=s==="x"?"y":"x";Fn(o?t.measuredBox[f]:t.layoutBox[f],n[f])}else nl(s,t.layoutBox,n)&&ue(f=>{let m=o?t.measuredBox[f]:t.layoutBox[f],d=K(n[f]);m.max=m.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});let a=Xe();gt(a,n,t.layoutBox);let c=Xe();o?gt(c,e.applyTransform(i,!0),t.measuredBox):gt(c,n,t.layoutBox);let u=!Vo(a),l=!1;if(!e.resumeFrom){let f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){let{snapshot:m,layout:d}=f;if(m&&d){let p=e.options.layoutAnchor||void 0,x=N();Ft(x,t.layoutBox,m.layoutBox,p);let y=N();Ft(y,n,d.layoutBox,p),Co(x,y)||(l=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Ef(e){mt.value&&vt.nodes++,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 Mf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Af(e){e.clearSnapshot()}function $a(e){e.clearMeasurements()}function Df(e){e.isLayoutDirty=!0,e.updateLayout()}function Xa(e){e.isLayoutDirty=!1}function Rf(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function kf(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Lf(e){e.resolveTargetDelta()}function If(e){e.calcProjection()}function Of(e){e.resetSkewAndRotation()}function Nf(e){e.removeLeadSnapshot()}function Za(e,t,r){e.translate=M(t.translate,0,r),e.scale=M(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Ja(e,t,r,n){e.min=M(t.min,r.min,n),e.max=M(t.max,r.max,n)}function Bf(e,t,r,n){Ja(e.x,t.x,r.x,n),Ja(e.y,t.y,r.y,n)}function Ff(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var jf={duration:.45,ease:[.4,0,.1,1]},Qa=e=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),el=Qa("applewebkit/")&&!Qa("chrome/")?Math.round:j;function tl(e){e.min=el(e.min),e.max=el(e.max)}function zf(e){tl(e.x),tl(e.y)}function nl(e,t,r){return e==="position"||e==="preserve-aspect"&&!wo(Po(t),Po(r),.2)}function Gf(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}var il=Gn({attachResizeListener:(e,t)=>Ee(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0});var Wn={current:void 0},Lr=Gn({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wn.current){let e=new il({});e.mount(window),e.setOptions({layoutScroll:!0}),Wn.current=e}return Wn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var ol=require("react"),Un=(0,ol.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var Ze=require("react");function sl(e=!0){let t=(0,Ze.useContext)(wt);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:i}=t,s=(0,Ze.useId)();(0,Ze.useEffect)(()=>{if(e)return i(s)},[e]);let o=(0,Ze.useCallback)(()=>e&&n&&n(s),[s,n,e]);return!r&&n?[!1,o]:[!0]}var al=require("react"),Hn=(0,al.createContext)({strict:!1});var ll={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"]},cl=!1;function Wf(){if(cl)return;let e={};for(let t in ll)e[t]={isEnabled:r=>ll[t].some(n=>!!r[n])};Tr(e),cl=!0}function Kn(){return Wf(),oo()}function ul(e){let t=Kn();for(let r in e)t[r]={...t[r],...e[r]};Tr(t)}var Uf=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 Ir(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Uf.has(e)}var fl=e=>!Ir(e);function Hf(e){typeof e=="function"&&(fl=t=>t.startsWith("on")?!Ir(t):e(t))}try{Hf(require("@emotion/is-prop-valid").default)}catch(e){}function ml(e,t,r){let n={};for(let i in e)i==="values"&&typeof e.values=="object"||k(e[i])||(fl(i)||r===!0&&Ir(i)||!t&&!Ir(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}var qn=require("react/jsx-runtime");var Wt=require("react");var dl=require("react"),Je=(0,dl.createContext)({});var _n=require("react");function pl(e,t){if(qe(e)){let{initial:r,animate:n}=e;return{initial:r===!1||Pe(r)?r:void 0,animate:Pe(n)?n:void 0}}return e.inherit!==!1?t:{}}function gl(e){let{initial:t,animate:r}=pl(e,(0,_n.useContext)(Je));return(0,_n.useMemo)(()=>({initial:t,animate:r}),[hl(t),hl(r)])}function hl(e){return Array.isArray(e)?e.join(" "):e}var Gt=require("react");var xl=require("react");var jt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Do(e,t,r){for(let n in t)!k(t[n])&&!Er(n,r)&&(e[n]=t[n])}function Kf({transformTemplate:e},t){return(0,xl.useMemo)(()=>{let r=jt();return dt(r,t,e),Object.assign({},r.vars,r.style)},[t])}function _f(e,t){let r=e.style||{},n={};return Do(n,r,e),Object.assign(n,Kf(e,t)),n}function yl(e,t){let r={},n=_f(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var vl=require("react");var Yn=()=>({...jt(),attrs:{}});function bl(e,t,r,n){let i=(0,vl.useMemo)(()=>{let s=Yn();return Ar(s,t,Dr(n),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){let s={};Do(s,e.style,e),i.style={...s,...i.style}}return i}var wl=["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 zt(e){return typeof e!="string"||e.includes("-")?!1:!!(wl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tl(e,t,r,{latestValues:n},i,s=!1,o){let c=((o!=null?o:zt(e))?bl:yl)(t,n,i,e),u=ml(t,typeof e=="string",s),l=e!==Gt.Fragment?{...u,...c,ref:r}:{},{children:f}=t,m=(0,Gt.useMemo)(()=>k(f)?f.get():f,[f]);return(0,Gt.createElement)(e,{...l,children:m})}var Ro=require("react");function Yf({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:$f(r,n,i,e),renderState:t()}}function $f(e,t,r,n){let i={},s=n(e,{});for(let m in s)i[m]=xt(s[m]);let{initial:o,animate:a}=e,c=qe(e),u=vr(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let l=r?r.initial===!1:!1;l=l||o===!1;let f=l?a:o;if(f&&typeof f!="boolean"&&!Ne(f)){let m=Array.isArray(f)?f:[f];for(let d=0;d<m.length;d++){let p=lt(e,m[d]);if(p){let{transitionEnd:x,transition:y,...v}=p;for(let b in v){let w=v[b];if(Array.isArray(w)){let g=l?w.length-1:0;w=w[g]}w!==null&&(i[b]=w)}for(let b in x)i[b]=x[b]}}}return i}var $n=e=>(t,r)=>{let n=(0,Ro.useContext)(Je),i=(0,Ro.useContext)(wt),s=()=>Yf(e,t,n,i);return r?s():Qo(s)};var Sl=$n({scrapeMotionValuesFromProps:pt,createRenderState:jt});var Vl=$n({scrapeMotionValuesFromProps:Rr,createRenderState:Yn});var Cl=Symbol.for("motionComponentSymbol");var bt=require("react");function Pl(e,t,r){let n=(0,bt.useRef)(r);(0,bt.useInsertionEffect)(()=>{n.current=r});let i=(0,bt.useRef)(null);return(0,bt.useCallback)(s=>{var a;s&&((a=e.onMount)==null||a.call(e,s)),t&&(s?t.mount(s):t.unmount());let o=n.current;if(typeof o=="function")if(s){let c=o(s);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[t])}var ie=require("react");var El=require("react"),Xn=(0,El.createContext)({});function Qe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ml(e,t,r,n,i,s){var w,g;let{visualElement:o}=(0,ie.useContext)(Je),a=(0,ie.useContext)(Hn),c=(0,ie.useContext)(wt),u=(0,ie.useContext)(Un),l=u.reducedMotion,f=u.skipAnimations,m=(0,ie.useRef)(null),d=(0,ie.useRef)(!1);n=n||a.renderer,!m.current&&n&&(m.current=n(e,{visualState:t,parent:o,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:s}),d.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));let p=m.current,x=(0,ie.useContext)(Xn);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Xf(m.current,r,i,x);let y=(0,ie.useRef)(!1);(0,ie.useInsertionEffect)(()=>{p&&y.current&&p.update(r,c)});let v=r[dr],b=(0,ie.useRef)(!!v&&typeof window!="undefined"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((g=window.MotionHasOptimisedAnimation)==null?void 0:g.call(window,v)));return ts(()=>{d.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),b.current&&p.animationState&&p.animationState.animateChanges())}),(0,ie.useEffect)(()=>{p&&(!b.current&&p.animationState&&p.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),b.current=!1),p.enteringChildren=void 0)}),p}function Xf(e,t,r,n){let{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:l,layoutCrossfade:f}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Al(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Qe(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:l})}function Al(e){if(e)return e.options.allowProjection!==!1?e.projection:Al(e.parent)}function Zn(e,{forwardMotionProps:t=!1,type:r}={},n,i){var u,l;n&&ul(n);let s=r?r==="svg":zt(e),o=s?Vl:Sl;function a(f,m){let d,p={...(0,Wt.useContext)(Un),...f,layoutId:qf(f)},{isStatic:x}=p,y=gl(f),v=o(f,x);if(!x&&typeof window!="undefined"){Zf(p,n);let b=Jf(p);d=b.MeasureLayout,y.visualElement=Ml(e,v,p,i,b.ProjectionNode,s)}return(0,qn.jsxs)(Je.Provider,{value:y,children:[d&&y.visualElement?(0,qn.jsx)(d,{visualElement:y.visualElement,...p}):null,Tl(e,f,Pl(v,y.visualElement,m),v,x,t,s)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${(l=(u=e.displayName)!=null?u:e.name)!=null?l:""})`}`;let c=(0,Wt.forwardRef)(a);return c[Cl]=e,c}function qf({layoutId:e}){let t=(0,Wt.useContext)(Wr).id;return t&&e!==void 0?t+"-"+e:e}function Zf(e,t){let r=(0,Wt.useContext)(Hn).strict}function Jf(e){let t=Kn(),{drag:r,layout:n}=t;if(!r&&!n)return{};let i={...r,...n};return{MeasureLayout:r!=null&&r.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Dl(e,t){if(typeof Proxy=="undefined")return Zn;let r=new Map,n=(s,o)=>Zn(s,o,e,t),i=(s,o)=>n(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?n:(r.has(o)||r.set(o,Zn(o,void 0,e,t)),r.get(o))})}var Rl=require("react");var kl=(e,t)=>{var n;return((n=t.isSVG)!=null?n:zt(e))?new kr(t):new Mr(t,{allowProjection:e!==Rl.Fragment})};var Jn=class extends q{constructor(t){super(t),t.animationState||(t.animationState=go(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Ne(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}};var Qf=0,Qn=class extends q{constructor(){super(...arguments),this.id=Qf++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){let{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){let c=ce(this.node,o,a);if(c){let{transition:u,transitionEnd:l,...f}=c;for(let m in f)(s=this.node.getValue(m))==null||s.jump(f[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var Ll={animation:{Feature:Jn},exit:{Feature:Qn}};function Fe(e){return{point:{x:e.pageX,y:e.pageY}}}var Il=e=>t=>ft(t)&&e(t,Fe(t));function et(e,t,r,n){return Ee(e,t,Il(r),n)}var ei=({current:e})=>e?e.ownerDocument.defaultView:null;var Ol=(e,t)=>Math.abs(e-t);function Nl(e,t){let r=Ol(e.x,t.x),n=Ol(e.y,t.y);return Math.sqrt(r**2+n**2)}var Bl=new Set(["auto","scroll"]),Ut=class{constructor(t,r,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ti(this.lastRawMoveEventInfo,this.transformPagePoint));let p=ko(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,y=Nl(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!y)return;let{point:v}=p,{timestamp:b}=W;this.history.push({...v,timestamp:b});let{onStart:w,onMove:g}=this.handlers;x||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,p)},this.handlePointerMove=(p,x)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ti(x,this.transformPagePoint),P.update(this.updatePoint,!0)},this.handlePointerUp=(p,x)=>{this.end();let{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let w=ko(p.type==="pointercancel"?this.lastMoveEventInfo:ti(x,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,w),v&&v(p,w)},!ft(t))return;this.dragSnapToOrigin=s,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;let c=Fe(t),u=ti(c,this.transformPagePoint),{point:l}=u,{timestamp:f}=W;this.history=[{...l,timestamp:f}];let{onSessionStart:m}=r;m&&m(t,ko(u,this.history));let d={passive:!0,capture:!0};this.removeListeners=ve(et(this.contextWindow,"pointermove",this.handlePointerMove,d),et(this.contextWindow,"pointerup",this.handlePointerUp,d),et(this.contextWindow,"pointercancel",this.handlePointerUp,d)),a&&this.startScrollTracking(a)}startScrollTracking(t){let r=t.parentElement;for(;r;){let n=getComputedStyle(r);(Bl.has(n.overflowX)||Bl.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.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){let r=this.scrollPositions.get(t);if(!r)return;let n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-r.x,y:i.y-r.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),P.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ae(this.updatePoint)}};function ti(e,t){return t?{point:t(e.point)}:e}function Fl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ko({point:e},t){return{point:e,delta:Fl(e,jl(t)),offset:Fl(e,em(t)),velocity:tm(t,.1)}}function em(e){return e[0]}function jl(e){return e[e.length-1]}function tm(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,i=jl(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>U(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>U(t)*2&&(n=e[1]);let s=Z(i.timestamp-n.timestamp);if(s===0)return{x:0,y:0};let o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Hl(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?M(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?M(r,e,n.max):Math.min(e,r)),e}function zl(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Kl(e,{top:t,left:r,bottom:n,right:i}){return{x:zl(e.x,r,i),y:zl(e.y,t,n)}}function Gl(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function _l(e,t){return{x:Gl(e.x,t.x),y:Gl(e.y,t.y)}}function Yl(e,t){let r=.5,n=K(e),i=K(t);return i>n?r=Te(t.min,t.max-n,e.min):n>i&&(r=Te(e.min,e.max-i,t.min)),$(0,1,r)}function $l(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var ri=.35;function Xl(e=ri){return e===!1?e=0:e===!0&&(e=ri),{x:Wl(e,"left","right"),y:Wl(e,"top","bottom")}}function Wl(e,t,r){return{min:Ul(e,t),max:Ul(e,r)}}function Ul(e,t){return typeof e=="number"?e:e[t]||0}var rm=new WeakMap,ii=class{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=N(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){let{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;let s=f=>{r&&this.snapToCursor(Fe(f).point),this.stopAnimation()},o=(f,m)=>{let{drag:d,dragPropagation:p,onDragStart:x}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qi(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ue(v=>{let b=this.getAxisMotionValue(v).get()||0;if(te.test(b)){let{projection:w}=this.visualElement;if(w&&w.layout){let g=w.layout.layoutBox[v];g&&(b=K(g)*(parseFloat(b)/100))}}this.originPoint[v]=b}),x&&P.update(()=>x(f,m),!1,!0),Rt(this.visualElement,"transform");let{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;let{dragPropagation:d,dragDirectionLock:p,onDirectionLock:x,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;let{offset:v}=m;if(p&&this.currentDirection===null){this.currentDirection=im(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",m.point,v),this.updateAxis("y",m.point,v),this.visualElement.render(),y&&P.update(()=>y(f,m),!1,!0)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ut(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:ei(this.visualElement),element:this.visualElement.current})}stop(t,r){let n=t||this.latestPointerEvent,i=r||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;let{velocity:o}=i;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&P.postRender(()=>a(n,i))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){let{drag:i}=this.getProps();if(!n||!ni(t,i,this.currentDirection))return;let s=this.getAxisMotionValue(t),o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=Hl(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Qe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Kl(n.layoutBox,t):this.constraints=!1,this.elastic=Xl(r),i!==this.constraints&&!Qe(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&ue(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$l(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Qe(t))return!1;let n=t.current;se(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let s=mo(n,i.root,this.visualElement.getTransformPagePoint()),o=_l(i.layout.layoutBox,s);if(r){let a=r(so(o));this.hasMutatedConstraints=!!a,a&&(o=Sr(a))}return o}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=ue(l=>{if(!ni(l,r,this.currentDirection))return;let f=c&&c[l]||{};(o===!0||o===l)&&(f={min:0,max:0});let m=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:n?t[l]:0,bounceStiffness:m,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return Rt(this.visualElement,t),n.start(at(t,n,0,r,this.visualElement,!1))}stopAnimation(){ue(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var s;let r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(t,(s=this.visualElement.latestValues[t])!=null?s:0)}snapToCursor(t){ue(r=>{let{drag:n}=this.getProps();if(!ni(r,n,this.currentDirection))return;let{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){let{min:o,max:a}=i.layout.layoutBox[r],c=s.get()||0;s.set(t[r]-M(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Qe(r)||!n||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};ue(o=>{let a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){let c=a.get();i[o]=Yl({min:c,max:c},this.constraints[o])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ue(o=>{if(!ni(o,t,null))return;let a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(M(c,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rm.set(this.visualElement,this);let t=this.visualElement.current,r=et(t,"pointerdown",u=>{let{drag:l,dragListener:f=!0}=this.getProps(),m=u.target,d=m!==t&&eo(m);l&&f&&!d&&this.start(u)}),n,i=()=>{let{dragConstraints:u}=this.getProps();Qe(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),n||(n=nm(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),P.read(i);let a=Ee(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(ue(f=>{let m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=u[f].translate,m.set(m.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),r(),o(),c&&c(),n&&n()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=ri,dragMomentum:a=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}};function ql(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function nm(e,t,r){let n=Dn(e,ql(r)),i=Dn(t,ql(r));return()=>{n(),i()}}function ni(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function im(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var oi=class extends q{constructor(t){super(t),this.removeGroupControls=j,this.removeListeners=j,this.controls=new ii(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}update(){let{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var Lo=e=>(t,r)=>{e&&P.update(()=>e(t,r),!1,!0)},si=class extends q{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(t){this.session=new Ut(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ei(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Lo(t),onStart:Lo(r),onMove:Lo(n),onEnd:(s,o)=>{delete this.session,i&&P.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=et(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var Zl=require("react/jsx-runtime");var Or=require("react");var Io=!1,Oo=class extends Or.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),Io&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o&&(o.isPresent=s,t.layoutDependency!==r&&o.setOptions({...o.options,layoutDependency:r}),Io=!0,i||t.layoutDependency!==r||r===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||P.postRender(()=>{let a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:r}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=r,n.root.didUpdate(),ut.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;Io=!0,i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function ai(e){let[t,r]=sl(),n=(0,Or.useContext)(Wr);return(0,Zl.jsx)(Oo,{...e,layoutGroup:n,switchLayoutGroup:(0,Or.useContext)(Xn),isPresent:t,safeToRemove:r})}var Jl={pan:{Feature:si},drag:{Feature:oi,ProjectionNode:Lr,MeasureLayout:ai}};function Ql(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let i="onHover"+r,s=n[i];s&&P.postRender(()=>s(t,Fe(t)))}var li=class extends q{mount(){let{current:t}=this.node;t&&(this.unmount=Zi(t,(r,n)=>(Ql(this.node,n,"Start"),i=>Ql(this.node,i,"End"))))}unmount(){}};var ci=class extends q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(r){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=ve(Ee(this.node.current,"focus",()=>this.onFocus()),Ee(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function ec(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let i="onTap"+(r==="End"?"":r),s=n[i];s&&P.postRender(()=>s(t,Fe(t)))}var ui=class extends q{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=ro(t,(i,s)=>(ec(this.node,s,"Start"),(o,{success:a})=>ec(this.node,o,a?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}};var Bo=new WeakMap,No=new WeakMap,om=e=>{let t=Bo.get(e.target);t&&t(e)},sm=e=>{e.forEach(om)};function am({root:e,...t}){let r=e||document;No.has(r)||No.set(r,{});let n=No.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(sm,{root:e,...t})),n[i]}function tc(e,t,r){let n=am(t);return Bo.set(e,r),n.observe(e),()=>{Bo.delete(e),n.unobserve(e)}}var lm={some:0,all:1},fi=class extends q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:s}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:lm[i]},a=u=>{let{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);let{onViewportEnter:f,onViewportLeave:m}=this.node.getProps(),d=l?f:m;d&&d(u)};this.stopObserver=tc(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(cm(t,r))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}};function cm({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var rc={inView:{Feature:fi},tap:{Feature:ui},focus:{Feature:ci},hover:{Feature:li}};var nc={layout:{ProjectionNode:Lr,MeasureLayout:ai}};var ic={...Ll,...rc,...Jl,...nc};var Fo=Dl(ic,kl);var jo=Fo;var h=require("react"),uc=require("react-dom"),Go=new Set,Wo={open:!1,status:null,busy:!1,ballPos:null,sidebarActive:!1};function _(e){Wo=Object.assign({},Wo,e),Go.forEach(function(t){t()})}function fm(e){return Go.add(e),function(){Go.delete(e)}}function Uo(){return Wo}function Nr(){return h.useSyncExternalStore(fm,Uo)}var mm="/api",Ko="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTQ3IDE0NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+QG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyaykgeyogeyBmaWxsOiB3aGl0ZTsgfX08L3N0eWxlPgogIDxwYXRoIGQ9Im00Mi40MjE0LDM5LjY1NWMtMjQuNDA1NywwIC00Mi4xNTU0LDEzLjE3MjEgLTQyLjE1NTQsMzMuODQ1YzAsMjAuNTgxNCAxOC40ODkyLDMzLjg0NSA0Mi4xNTU0LDMzLjg0NWMyMy42NjYyLDAgMzguMTgwMywtMTEuNjE3MSAzOC43MzQ5LC0yOC43MjI1bC0yMS4wNzc3LC0wLjQ1NzRjLTAuOTI0NCw5LjMzMDMgLTkuMTA1OSwxNS4xODQ1IC0xNy42NTcyLDE1LjE4NDVjLTExLjc0MDYsMCAtMjAuNDMwNiwtNy41OTIyIC0yMC40MzA2LC0xOS44NDk2YzAsLTEyLjI1NzQgOC42OSwtMTkuOTg2OCAyMC40MzA2LC0yMC4yMTU1YzguNTUxMywtMC4xODMgMTYuOTE3Nyw1Ljk0NTcgMTcuNDcyMywxNS4yNzZsMjEuMDc3NywtMC42NDAzYy0wLjQ2MjIsLTE2LjgzMTEgLTE0LjE0NDIsLTI4LjI2NTIgLTM4LjU1LC0yOC4yNjUyem00OC44NDQ2LDJsNTUuNDY4LDBsMCw2NC4wMzExbC01NS40NjgsMGwwLC02NC4wMzExeiIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz4KPC9zdmc+Cg==";async function fe(e,t){var r={method:t===void 0?"GET":"POST",headers:{}};t!==void 0&&(r.headers["content-type"]="application/json",r.body=JSON.stringify(t));var n=await fetch(mm+e,r),i=await n.text(),s=null;try{s=i===""?null:JSON.parse(i)}catch(o){s=null}return n.ok?s!==null?s:{ok:!1,error:"invalid JSON response"}:{ok:!1,error:"HTTP "+n.status+(s!==null&&s.error!==void 0?": "+s.error:"")}}function gi(e,t){try{var r=e(function(f){return f}),n=t===null?null:typeof t=="function"?t(function(f){return f}):null,i=r!=null?r.current:void 0;if(i!==void 0&&r!=null&&r.byId!=null){var s=r.byId[i];if(s!=null&&typeof s.cwd=="string"&&s.cwd!=="")return s.cwd}var o=n!=null&&Array.isArray(n.items)?n.items:[];if(i!==void 0)for(var a=0;a<o.length;a++){var c=o[a];if(c.sessionIds!=null&&c.sessionIds.indexOf(i)!==-1&&typeof c.path=="string"&&c.path!=="")return c.path}var u=n!=null?n.recentWorkspaceId:void 0;if(u!==void 0){for(var l=0;l<o.length;l++)if(o[l].workspaceId===u&&typeof o[l].path=="string"&&o[l].path!=="")return o[l].path}if(o.length>0&&typeof o[0].path=="string"&&o[0].path!=="")return o[0].path}catch(f){}}function fc(e,t){if(e==null||typeof e.url!="string"||e.url==="")return null;var r=typeof t=="string"&&t!==""?t:e!=null&&e.cwd!=null?e.cwd:null;if(r==null||r==="")return e.url;var n=r.replace(/\\/g,"/"),i=n;return(/^[A-Za-z]:\//.test(n)||n.charCodeAt(0)!==47)&&(i="/"+n),e.url+"?folder="+encodeURIComponent(i)}function mc(e,t,r){var n=e!=null&&e.ok===!0&&e.running===!0,i=e!=null&&e.status==="starting",s=e!=null&&e.ok===!1,o=function(c){return h.createElement("iframe",{key:r,className:"dshcs-frame",src:c,title:"code-server",sandbox:"allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-pointer-lock allow-clipboard-read allow-clipboard-write",allow:"clipboard-read; clipboard-write"})};if(n&&t!==null)return o(t);if(i)return h.createElement(h.Fragment,null,o("about:blank"),h.createElement("div",{className:"dshcs-loading"},"\u6B63\u5728\u542F\u52A8 code-server\u2026"));var a=s&&e!=null&&e.error?e.error:"code-server \u672A\u8FD0\u884C";return h.createElement("div",{className:"dshcs-empty"},h.createElement("div",{className:"dshcs-emptybox"},h.createElement("div",null,s?"code-server \u542F\u52A8\u5931\u8D25":"code-server \u672A\u8FD0\u884C"),h.createElement("pre",{className:"dshcs-error"},a),h.createElement("p",{className:"dshcs-hint"},"code-server \u968F\u63D2\u4EF6\u5305\u5185\u7F6E\u3001\u5C31\u5730\u8FD0\u884C(\u65E0\u9700\u5168\u5C40\u5B89\u88C5\u3001\u65E0\u9700\u8054\u7F51\u5B89\u88C5\u3001\u65E0\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4);VS Code \u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757\u7531\u5305\u7BA1\u7406\u5668\u5728\u5B89\u88C5\u63D2\u4EF6\u65F6\u4E00\u5E76\u88C5\u597D(\u65E0\u9700 C++ \u5DE5\u5177\u94FE)\u3002\u82E5\u6B64\u5904\u957F\u671F\u672A\u8FD0\u884C,\u8BF7\u5230 \u8BBE\u7F6E \u2192 \u63D2\u4EF6 \u2192 Code Server \u70B9\u300C\u68C0\u6D4B\u73AF\u5883\u300D\u67E5\u770B\u539F\u56E0;\u7AEF\u53E3 "+(e!=null?e.port:"8090")+" \u88AB\u5360\u7528\u65F6\u8BF7\u91CA\u653E\u6216\u4FEE\u6539 port \u914D\u7F6E\u3002")))}function dc(e){var t=function(n){var i=fc(n,e);i!=null&&typeof window.open=="function"&&window.open(i,"_blank","noopener")},r=Uo().status;if(r!=null&&r.running===!0){t(r);return}Uo().busy!==!0&&(_({busy:!0}),fe("/code-server/start",typeof e=="string"?{cwd:e}:{}).then(function(n){_({status:n,busy:!1}),t(n)}).catch(function(){_({busy:!1})}))}var dm=["nw","n","ne","w","e","sw","s","se"],Q=12,pm=720,hm=520,pc=360,hc=260,oc=24;function Ho(e){if(e===!1)return 0;try{if(typeof document=="undefined")return 0;var t=document.querySelectorAll("[data-composer-seat]");if(t===null||t.length===0)return 0;for(var r=Number.POSITIVE_INFINITY,n=0,i=0;i<t.length;i++){var s=t[i].getBoundingClientRect();s===null||s.width<=0||(s.top<r&&(r=s.top),s.bottom>n&&(n=s.bottom))}if(!isFinite(r)||n<=0)return 0;var o=window.innerHeight;return o-n>24?0:Math.min(Math.max(1,o-r+8),420)}catch(a){return 0}}function Me(){return{width:Math.max(1,window.innerWidth),height:Math.max(1,window.innerHeight)}}function xi(e,t){return{width:Math.max(1,e.width-Q*2),height:Math.max(1,e.height-Q*2-t)}}function tt(e,t,r){return Math.min(r,Math.max(t,e))}function Ht(e,t,r){let n=xi(t,r),i=tt(e.width,Math.min(pc,n.width),n.width),s=tt(e.height,Math.min(hc,n.height),n.height);return{x:tt(e.x,Q,Math.max(Q,t.width-Q-i)),y:tt(e.y,Q,Math.max(Q,t.height-Q-r-s)),width:i,height:s}}function gm(e,t,r){let n=xi(t,r),i=Math.min(pm,n.width),s=Math.min(hm,n.height),o=xm(),a=o>0?o-8:t.height-Q-r;return Ht({x:t.width-Q-i-e*oc,y:Math.max(Q,a-s-e*oc),width:i,height:s},t,r)}function xm(){try{if(typeof document=="undefined")return-1;var e=document.querySelectorAll("[data-composer-seat]");if(e===null||e.length===0)return-1;for(var t=Number.POSITIVE_INFINITY,r=0;r<e.length;r++){var n=e[r].getBoundingClientRect();n!==null&&n.width>0&&n.top<t&&(t=n.top)}return isFinite(t)?t:-1}catch(i){return-1}}function ym(e,t,r,n,i){return Ht({...e,x:e.x+t,y:e.y+r},n,i)}function vm(e,t,r,n,i,s){let o=Ht(e,i,s),a=xi(i,s),c=Math.min(pc,a.width),u=Math.min(hc,a.height),l=i.height-Q-s,f=o.x,m=o.x+o.width,d=o.y,p=o.y+o.height;return t.includes("w")&&(f=tt(o.x+r,Q,m-c)),t.includes("e")&&(m=tt(m+r,f+c,i.width-Q)),t.includes("n")&&(d=tt(o.y+n,Q,p-u)),t.includes("s")&&(p=tt(p+n,d+u,l)),{x:f,y:d,width:m-f,height:p-d}}function mi(e,t){let r=xi(e,t);return{x:Q,y:Q,width:r.width,height:r.height}}var bm='.dshcs-root{position:fixed;inset:0;z-index:2147483000;pointer-events:none}.dshcs-win{--dshcs-accent:#5b6cff;pointer-events:auto;position:fixed;isolation:isolate;z-index:2147483000;display:flex;flex-direction:column;min-width:1px;min-height:1px;overflow:hidden;color:var(--dsw-alias-label-primary,#172033);background:var(--dsw-alias-bg-base,#fff);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;box-shadow:0 1px 2px rgba(13,22,38,.08),0 18px 48px rgba(13,22,38,.2),0 0 0 1px rgba(255,255,255,.4) inset;transition:border-color .16s ease,box-shadow .16s ease}.dshcs-win:hover{border-color:color-mix(in srgb,var(--dshcs-accent) 28%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 2px 5px rgba(13,22,38,.1),0 22px 58px rgba(13,22,38,.24),0 0 0 1px rgba(255,255,255,.5) inset}.dshcs-win[data-interaction]{transition:none;user-select:none}.dshcs-win[data-interaction]::after{content:"";position:absolute;inset:0;z-index:18;background:transparent}.dshcs-win-max{border-radius:14px;z-index:2147483001;box-shadow:0 1px 2px rgba(13,22,38,.06),0 8px 24px rgba(13,22,38,.12)}.dshcs-win-max:hover{box-shadow:0 1px 2px rgba(13,22,38,.06),0 10px 28px rgba(13,22,38,.14)}.dshcs-win-snap{border-color:color-mix(in srgb,var(--dshcs-accent) 70%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent) 26%,transparent),0 22px 58px rgba(13,22,38,.24),0 0 0 1px rgba(255,255,255,.5) inset}.dshcs-snapghost{position:fixed;left:0;top:0;z-index:2147483000;pointer-events:none;display:grid;place-items:center;border:1.5px solid color-mix(in srgb,var(--dshcs-accent,#5b6cff) 85%,transparent);background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 11%,transparent);border-radius:12px;box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent,#5b6cff) 20%,transparent),0 10px 34px rgba(13,22,38,.14)}.dshcs-snapghint{position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--dshcs-accent,#5b6cff) 92%,#172033);color:#fff;font-size:12px;font-weight:650;letter-spacing:.02em;white-space:nowrap;box-shadow:0 6px 18px rgba(13,22,38,.3)}.dshcs-drag{position:absolute;top:0;left:0;right:0;height:14px;z-index:26;cursor:grab;touch-action:none;user-select:none}.dshcs-win[data-interaction=move] .dshcs-drag{cursor:grabbing}.dshcs-win-max .dshcs-drag{cursor:default}.dshcs-drag:hover{background:color-mix(in srgb,var(--dsw-alias-label-primary,#172033) 5%,transparent)}.dshcs-artbtn{appearance:none;display:inline-grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:6px;color:var(--dsw-alias-label-secondary,#566174);background:color-mix(in srgb,var(--dsw-alias-bg-base,#fff) 60%,transparent);cursor:pointer;transition:color .12s ease,background .12s ease,border-color .12s ease;vertical-align:middle}.dshcs-artbtn:hover{color:var(--dsw-alias-label-primary,#172033);border-color:color-mix(in srgb,var(--dshcs-accent) 40%,var(--dsw-alias-border-l2,#dfe3eb));background:color-mix(in srgb,var(--dshcs-accent) 8%,transparent)}.dshcs-artbtn:active{transform:scale(.94)}.dshcs-artbtn:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent) 65%,transparent);outline-offset:1px}.dshcs-artifacts{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px 8px;margin-top:16px;font-size:13px;line-height:22px;position:relative}.dshcs-artlabel{color:var(--dsw-alias-label-tertiary,#7d8798);grid-area:1/1}.dshcs-artrow{flex-wrap:nowrap;grid-area:1/2;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.dshcs-artitem{display:inline-flex;align-items:center;gap:4px;flex:none;min-width:0}.dshcs-artfile{text-overflow:ellipsis;white-space:nowrap;background:var(--dsw-alias-interactive-bg-hover);max-width:320px;color:var(--dsw-alias-label-secondary,#566174);font:inherit;cursor:pointer;border:none;border-radius:6px;margin:0;padding:0 8px;overflow:hidden}.dshcs-artfile:hover{color:var(--dsw-alias-label-primary,#172033);text-decoration:underline}.dshcs-artfile:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-alias-border-l3);outline:none}.dshcs-artmore{white-space:nowrap;color:var(--dsw-alias-label-tertiary,#7d8798);flex:none}.dshcs-body{position:relative;display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;background:var(--dsw-alias-bg-base,#fff)}.dshcs-body[hidden]{display:none}.dshcs-frame{display:block;position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:var(--dsw-alias-bg-base,#fff)}.dshcs-loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-tertiary,#7d8798);font-size:13px}.dshcs-win-hidden{pointer-events:none!important}.dshcs-empty{position:relative;z-index:2;flex:1;display:flex;align-items:center;justify-content:center;padding:44px 24px 24px}.dshcs-emptybox{max-width:560px;text-align:left;background:var(--dsw-alias-bg-layer-2,#f7f8fb);border:1px solid var(--dsw-alias-border-l2,#dfe3eb);border-radius:12px;padding:16px 18px}.dshcs-error{color:var(--dsw-alias-label-error,#d92d20);white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,Consolas,monospace;font-size:12px;margin:8px 0 0}.dshcs-hint{color:var(--dsw-alias-label-tertiary,#7d8798);font-size:12px;margin:6px 0 0}.dshcs-resize{position:absolute;z-index:24;display:block;touch-action:none}.dshcs-resize-n,.dshcs-resize-s{left:16px;right:16px;height:10px;cursor:ns-resize}.dshcs-resize-n{top:0}.dshcs-resize-s{bottom:0}.dshcs-resize-w,.dshcs-resize-e{top:16px;bottom:16px;width:10px;cursor:ew-resize}.dshcs-resize-w{left:0}.dshcs-resize-e{right:0}.dshcs-resize-nw,.dshcs-resize-ne,.dshcs-resize-sw,.dshcs-resize-se{width:18px;height:18px}.dshcs-resize-nw{left:0;top:0;cursor:nwse-resize}.dshcs-resize-ne{right:0;top:0;cursor:nesw-resize}.dshcs-resize-sw{left:0;bottom:0;cursor:nesw-resize}.dshcs-resize-se{right:0;bottom:0;cursor:nwse-resize}.dshcs-resize-se::after{content:"";position:absolute;right:4px;bottom:4px;width:7px;height:7px;border-right:1.5px solid color-mix(in srgb,var(--dsw-alias-label-tertiary,#7d8798) 58%,transparent);border-bottom:1.5px solid color-mix(in srgb,var(--dsw-alias-label-tertiary,#7d8798) 58%,transparent);border-radius:0 0 2px}.dshcs-ball{position:fixed;width:38px;height:38px;padding:0;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#dfe3eb) 80%,transparent);border-radius:50%;display:grid;place-items:center;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;z-index:2147483002;background:color-mix(in srgb,var(--dsw-alias-bg-layer-2,#f2f4f8) 88%,transparent);backdrop-filter:blur(8px) saturate(1.2);box-shadow:0 8px 20px rgba(13,22,38,.18),0 1px 2px rgba(13,22,38,.1);transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease}.dshcs-ball img,.dshcs-ball svg{-webkit-user-drag:none;user-drag:none}.dshcs-ball[data-dragging]{cursor:grabbing;transform:scale(1.06);box-shadow:0 14px 28px rgba(13,22,38,.28),0 2px 6px rgba(13,22,38,.16)}.dshcs-ball:hover{transform:scale(1.06);box-shadow:0 10px 24px rgba(13,22,38,.22),0 1px 2px rgba(13,22,38,.1)}.dshcs-ball:active{transform:scale(.94)}.dshcs-ball:focus-visible{outline:2px solid color-mix(in srgb,var(--dshcs-accent) 65%,transparent);outline-offset:2px}.dshcs-ball-open{background:color-mix(in srgb,var(--dshcs-accent) 14%,var(--dsw-alias-bg-layer-2,#f2f4f8));border-color:color-mix(in srgb,var(--dshcs-accent) 55%,var(--dsw-alias-border-l2,#dfe3eb));box-shadow:0 0 0 3px color-mix(in srgb,var(--dshcs-accent) 22%,transparent),0 0 20px color-mix(in srgb,var(--dshcs-accent) 38%,transparent),0 8px 20px rgba(13,22,38,.16);transform:scale(1.08)}.dshcs-ball-dot{position:absolute;top:-2px;right:-2px;width:9px;height:9px;border-radius:50%;background:#20a66a;border:2px solid var(--dsw-alias-bg-base,#fff)}.dshcs-ball-dot[data-status=starting]{background:#d78b25}.dshcs-ball-dot[data-status=error]{background:#f85149}.dshcs-ball-dot[data-status=idle]{background:#7d8798}.dshcs-ball-dot[data-status=running]::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1px solid currentColor;opacity:.3;animation:dshcs-pulse 2s ease-out infinite}.dshcs-tabroot{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;background:var(--dsw-alias-bg-base,#fff)}@keyframes dshcs-pulse{0%{transform:scale(.7);opacity:.35}70%,100%{transform:scale(1.65);opacity:0}}',sc="dsh-code-server/styles";typeof document!="undefined"&&document.querySelector("style[data-dshcs="+JSON.stringify(sc)+"]")===null&&(di=document.createElement("style"),di.setAttribute("data-dshcs",sc),di.textContent=bm,document.head.appendChild(di));var di;function wm(e){var[t,r]=h.useState(!1),n=h.useRef(e.url);return h.useEffect(function(){n.current!==e.url&&(n.current=e.url,r(!1))},[e.url]),e.url!=null&&t!==!0?h.createElement("img",{src:e.url,key:"img-"+e.url,alt:"","aria-hidden":!0,draggable:!1,onError:function(){r(!0)},style:{width:20,height:20,display:"block",objectFit:"contain",borderRadius:3,WebkitUserDrag:"none",userSelect:"none"}}):h.createElement("svg",{viewBox:"0 0 18 18","aria-hidden":!0,style:{width:17,height:17}},h.createElement("rect",{x:"3",y:"3",width:"12",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:1.4}),h.createElement("path",{d:"M3 7h12M7 3v12",fill:"none",stroke:"currentColor",strokeWidth:1.4}))}var je=38,Ae=8,gc="dshcs-ball-pos";function pi(e){var t=Math.max(Ae,window.innerWidth-Ae-je),r=Math.max(Ae,window.innerHeight-Ae-je);return{x:Math.min(t,Math.max(Ae,e.x)),y:Math.min(r,Math.max(Ae,e.y))}}function Tm(){try{var e=window.localStorage.getItem(gc);if(e==null)return null;var t=JSON.parse(e);if(t!=null&&typeof t.x=="number"&&typeof t.y=="number"&&isFinite(t.x)&&isFinite(t.y))return pi(t)}catch(r){}return null}function Sm(e){try{window.localStorage.setItem(gc,JSON.stringify(e))}catch(t){}}function Vm(e){var t=Nr(),r=t.status,n=r!=null?r.env:null,i=r!=null&&r.running===!0,s=i?"running":r!=null&&r.status==="starting"?"starting":r!=null&&r.status==="error"?"error":"idle",o=Ho(r!=null?r.reserveComposer:!0),a=t.open===!0,c=Ko,[u,l]=h.useState(Tm),[f,m]=h.useState(!1),d=h.useRef(null),p=h.useRef(!1);if(h.useEffect(function(){var g=function(){l(function(S){return S==null?S:pi(S)})};return window.addEventListener("resize",g),function(){window.removeEventListener("resize",g)}},[]),h.useEffect(function(){var g=u!=null?u:(function(){var S=Ho(r!=null?r.reserveComposer:!0);return{x:window.innerWidth-Ae-je,y:window.innerHeight-Ae-je-(S>0?S+10:18)}})();_({ballPos:pi(g)})},[u,r]),n!=null&&n.ok!==!0||t.sidebarActive===!0)return null;var x=function(g){if(g.button===0){var S=g.currentTarget,E=S.getBoundingClientRect();d.current={pointerId:g.pointerId,dx:g.clientX-E.left,dy:g.clientY-E.top,moved:!1},p.current=!1,m(!0);try{S.setPointerCapture(g.pointerId)}catch(A){}}},y=function(g){var S=d.current;if(!(S==null||g.pointerId!==S.pointerId)){var E=g.clientX-S.dx,A=g.clientY-S.dy;(Math.abs(E-(u!=null?u.x:0))>2||Math.abs(A-(u!=null?u.y:0))>2)&&(S.moved=!0),l(pi({x:E,y:A}))}},v=function(){var g=d.current;d.current=null,m(!1),g!=null&&g.moved===!0&&(p.current=!0),g!=null&&g.moved===!0&&l(function(S){return S!=null&&Sm(S),S})},b=function(){if(p.current===!0){p.current=!1;return}if(r!=null&&r.windowedOpen===!0){dc(gi(e&&e.useSessions,e&&e.useWorkspaces));return}_({open:!a})},w=u!=null?{left:u.x,top:u.y}:{right:14,bottom:o>0?o+10:18};return uc.createPortal(h.createElement("button",{type:"button",className:"dshcs-ball"+(a?" dshcs-ball-open":""),style:w,"data-dragging":f===!0?"":void 0,title:r!=null&&r.windowedOpen===!0?"\u5728\u6D4F\u89C8\u5668\u65B0\u6807\u7B7E\u9875\u6253\u5F00 Code Server(\u53EF\u62D6\u52A8)":a?"\u6536\u8D77 Code Server(Esc)":"\u6253\u5F00 Code Server(\u53EF\u62D6\u52A8)","aria-label":a?"\u6536\u8D77 Code Server(Esc)":"\u6253\u5F00 Code Server","aria-expanded":a,onPointerDown:x,onPointerMove:y,onPointerUp:v,onPointerCancel:v,onDragStart:function(g){g&&g.preventDefault&&g.preventDefault()},onClick:b},h.createElement(wm,{url:c}),h.createElement("span",{className:"dshcs-ball-dot","data-status":s,"aria-hidden":!0})),document.body)}function Cm(e){var t=Nr(),r=t.status,n=r!=null&&r.ok===!0&&r.running===!0,i=r!=null&&r.status==="starting",s=r!=null&&r.ok===!1,o=gi(e&&e.useSessions,e&&e.useWorkspaces),a=h.useRef(void 0),[c,u]=h.useState(0),l=Ho(r!=null?r.reserveComposer:!0),[f,m]=h.useState(!1),[d,p]=h.useState(null),[x,y]=h.useState(function(){return gm(0,Me(),l)}),v=h.useRef(x),b=h.useRef(function(){});v.current=x,h.useEffect(function(){var D=function(){y(function(ee){return f?mi(Me(),l):Ht(ee,Me(),l)})};return window.addEventListener("resize",D),function(){window.removeEventListener("resize",D)}},[f,l]),h.useEffect(function(){y(function(D){return Ht(D,Me(),l)})},[l]),h.useEffect(function(){return function(){b.current()}},[]);var w=12,g=4,[S,E]=h.useState(!1),A=h.useRef(null),V=function(D,ee){if(D.button===0){D.preventDefault(),D.stopPropagation(),b.current();var oe=D.currentTarget.ownerDocument.defaultView;if(oe!==null){var de=D.pointerId,Fr=D.currentTarget,Yo=f,_t=Yo?mi(Me(),l):v.current,wc=_t.width>0?(D.clientX-_t.x)/_t.width:0,Tc=Math.min(14,Math.max(0,D.clientY-_t.y)),F={pointerId:de,origin:{x:D.clientX,y:D.clientY},start:_t,ratio:wc,grabY:Tc,wasMaximized:Yo,restored:!1,snapped:!1,moved:!1};A.current=F,p(ee);try{Fr.setPointerCapture(de)}catch(le){}var $o=function(le){if(le.pointerId===de){if(ee!=="move"){y(vm(F.start,ee,le.clientX-F.origin.x,le.clientY-F.origin.y,Me(),l));return}var qo=le.clientX-F.origin.x,zr=le.clientY-F.origin.y;if(Math.abs(qo)+Math.abs(zr)>3&&(F.moved=!0),F.wasMaximized&&!F.restored){if(zr<g)return;var vi=v.current,Gr={x:le.clientX-vi.width*Math.min(.9,Math.max(.1,F.ratio)),y:le.clientY-F.grabY,width:vi.width,height:vi.height};Gr=Ht(Gr,Me(),l),F.restored=!0,F.start=Gr,F.origin={x:le.clientX,y:le.clientY},m(!1),y(Gr);return}var Sc=F.start.y+zr,Vc=ym(F.start,qo,zr,Me(),l);y(Vc);var bi=Sc<=w;bi!==F.snapped&&(F.snapped=bi,E(bi))}},Xo=function(){oe.removeEventListener("pointermove",$o),oe.removeEventListener("pointerup",jr),oe.removeEventListener("pointercancel",jr),b.current=function(){},A.current=null;try{Fr.releasePointerCapture(de)}catch(le){}},jr=function(le){le.pointerId===de&&(Xo(),p(null),(!F.wasMaximized||F.restored===!0)&&(F.snapped===!0&&F.moved===!0&&m(!0),F.snapped===!0&&E(!1)))};b.current=Xo,oe.addEventListener("pointermove",$o),oe.addEventListener("pointerup",jr),oe.addEventListener("pointercancel",jr)}}},L=function(){m(function(D){return!D})},C=function(D){D.target.closest("[data-window-control]")===null&&V(D,"move")},I=function(D){D.target.closest("[data-window-control]")===null&&L()};if(h.useEffect(function(){if(!t.open||t.sidebarActive===!0)return;var D=!1;async function ee(){_({busy:!0});var oe=await fe("/code-server/status");if(!D){if(oe!=null&&oe.ok===!0&&oe.running===!0){_({status:oe,busy:!1});return}var de=await fe("/code-server/start",typeof o=="string"?{cwd:o}:{});D||_({status:de,busy:!1})}}return ee(),function(){D=!0}},[t.open,t.sidebarActive]),h.useEffect(function(){if(t.sidebarActive===!0||typeof o!="string"||o===""||a.current===o)return;var D=a.current!==void 0&&a.current!==o;a.current=o;var ee=!1;async function oe(){_({busy:!0});var de=await fe("/code-server/start",{cwd:o});ee||(_({status:de,busy:!1}),D&&de!=null&&de.ok===!0&&de.running===!0&&u(function(Fr){return Fr+1}))}return oe(),function(){ee=!0}},[o,t.sidebarActive]),h.useEffect(function(){t.open||(a.current=void 0)},[t.open]),h.useEffect(function(){if(t.sidebarActive!==!0){var D=window.setInterval(function(){fe("/code-server/status").then(function(ee){_({status:ee})})},3e3);return function(){window.clearInterval(D)}}},[t.sidebarActive]),h.useEffect(function(){if(!t.open)return;function D(ee){ee.key==="Escape"&&_({open:!1})}return window.addEventListener("keydown",D),function(){window.removeEventListener("keydown",D)}},[t.open]),t.sidebarActive===!0)return null;var R=r!=null&&typeof r.url=="string"?r.url:null,H=n&&r!=null&&typeof r.cwd=="string"&&r.cwd!==""?r.cwd:null,J=null;if(H!==null){var re=H.replace(/\\/g,"/");J=re,(/^[A-Za-z]:\//.test(re)||re.charCodeAt(0)!==47)&&(J="/"+re)}var me=R!==null?R+(J!==null?"?folder="+encodeURIComponent(J):""):null,_o=mc(r,me,c),Y=["dshcs-win",f?"dshcs-win-max":"",S?"dshcs-win-snap":"",t.open===!1?"dshcs-win-hidden":""].filter(Boolean).join(" "),B=f?mi(Me(),l):x,we=t.ballPos!=null?t.ballPos:{x:window.innerWidth-Ae-je,y:window.innerHeight-Ae-je-(l>0?l+10:18)},De={x:we.x+je/2,y:we.y+je/2},yi=Math.max(.05,je/Math.max(B.width,B.height)),xc=t.open===!1?{x:De.x-B.width/2,y:De.y-B.height/2,width:B.width,height:B.height,scale:yi,borderRadius:19,opacity:0}:{x:B.x,y:B.y,width:B.width,height:B.height,scale:1,borderRadius:12,opacity:1},yc=d!==null?{duration:0}:{type:"spring",stiffness:340,damping:38,mass:.9,opacity:{type:"spring",stiffness:420,damping:40,mass:.8},borderRadius:{duration:.2}},vc=h.createElement(jo.section,{className:Y,style:t.open===!1?{left:0,top:0,pointerEvents:"none"}:{left:0,top:0},animate:xc,initial:!1,transition:yc,"data-interaction":d!==null?d:void 0,role:"dialog","aria-label":"Code Server"},h.createElement("span",{className:"dshcs-drag",title:"\u62D6\u52A8\u79FB\u52A8 / \u53CC\u51FB\u6700\u5927\u5316",onPointerDown:C,onDoubleClick:I}),h.createElement("div",{className:"dshcs-body"},_o),f?null:dm.map(function(D){return h.createElement("span",{key:D,className:"dshcs-resize dshcs-resize-"+D,"data-direction":D,onPointerDown:function(ee){V(ee,D)}})})),Br=mi(Me(),l),bc=h.createElement(jo.div,{className:"dshcs-snapghost",initial:!1,animate:{opacity:S===!0?1:0,x:Br.x,y:Br.y,width:Br.width,height:Br.height},transition:S===!0?{type:"spring",stiffness:500,damping:44,mass:.9}:{duration:.14}},h.createElement("span",{className:"dshcs-snapghint"},"\u677E\u5F00\u4EE5\u6700\u5927\u5316"));return uc.createPortal(h.createElement(h.Fragment,null,vc,bc),document.body)}var zo="code-server",ac="dsh-code-server-app",Kt={openTab:null};function Pm(e){var t=e!=null&&typeof e.size=="number"?e.size:16;return h.createElement("img",{src:Ko,alt:"","aria-hidden":!0,draggable:!1,className:e!=null?e.className:void 0,style:{width:t,height:t,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}function Em(e){var t=e.useTabInfo(),r=t.tab,n=Nr(),i=n.status,s=gi(e.useSessions,null),o=h.useRef(void 0),[a,c]=h.useState(0),u=r.navigation,l=u!=null&&typeof u.revision=="number"?u.revision:0;return h.useEffect(function(){if(!(typeof s!="string"||s==="")&&o.current!==s){var f=o.current!==void 0;o.current=s;var m=!1;return fe("/code-server/start",{cwd:s}).then(function(d){m||(_({status:d}),f&&d!=null&&d.ok===!0&&d.running===!0&&c(function(p){return p+1}))}).catch(function(){}),function(){m=!0}}},[s]),h.useEffect(function(){fe("/code-server/status").then(function(m){m!=null&&_({status:m})}).catch(function(){});var f=window.setInterval(function(){fe("/code-server/status").then(function(m){_({status:m})}).catch(function(){})},3e3);return function(){window.clearInterval(f)}},[]),h.useEffect(function(){var f=u!=null?u.params:null,m=f!=null&&typeof f.path=="string"?f.path:"";m!==""&&fe("/code-server/open-file",{file:m}).catch(function(){})},[l]),h.createElement("div",{className:"dshcs-tabroot","data-code-server-tab":"body"},mc(i,fc(i,s),a))}function Mm(e){var t=e.sidebarRightTabs,r=e.sidebarRight;t==null||r==null||(e.effect(function(){return t.register({id:ac,kind:zo,priority:"extension",title:function(){return"Code Server"},guide:[{order:20,title:function(){return"Code Server"},description:function(){return"\u5728\u53F3\u4FA7\u680F\u6807\u7B7E\u91CC\u8FD0\u884C VS Code \u7F51\u9875\u7248,\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\u5DE5\u4F5C\u533A\u3002"},icon:Pm}]})},"code-server: sidebar tab type"),e.effect(function(){return e.slots.inject("sidebar.right.pane.tab",function(){return e.slots.register({name:"sidebar.right.pane.tab",key:ac},Em)})},"code-server: sidebar tab body"),Kt.openTab=function(n){try{return r.openTab(zo,n!=null?{params:n}:void 0),!0}catch(i){return console.warn("[code-server] sidebar openTab failed:",i!=null&&i.message!=null?i.message:String(i)),!1}},e.effect(function(){return function(){Kt.openTab=null,_({sidebarActive:!1})}},"code-server: sidebar mode reset"),_({sidebarActive:!0,open:!1}),console.log("[code-server] right-sidebar tab registered (kind="+zo+")"))}var Am=".dshcs-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}.dshcs-card:hover{border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed,var(--dsw-alias-border-l2))}.dshcs-cardHeader{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.dshcs-cardHeader:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshcs-cardHeadText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.dshcs-cardName{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.dshcs-cardDescription{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));font-size:13px;line-height:1.5}.dshcs-cardChevron{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));flex:none;transition:transform .16s;display:inline-flex}.dshcs-cardChevronOpen{transform:rotate(180deg)}.dshcs-cardBody{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}.dshcs-cardReadOnly{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:12px 0 0;font-size:12px;line-height:1.5}.dshcs-pending{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-cardFooter{border-top:1px solid var(--dsw-alias-border-l2);justify-content:flex-end;align-items:center;gap:8px;padding:12px 0 4px;display:flex}.dshcs-cardFailed{min-width:0;color:var(--dsw-alias-label-error,var(--dsw-alias-state-error-primary));flex:1;margin:0;font-size:12px;line-height:1.5}.dshcs-cbtn{appearance:none;font:inherit;cursor:pointer;border-radius:8px;padding:5px 14px;font-size:13px;line-height:1.5;border:1px solid transparent;transition:color .12s ease,background .12s ease}.dshcs-cbtn:disabled{opacity:.4;cursor:default}.dshcs-cbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.dshcs-cbtnOutline{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:0 0}.dshcs-cbtnOutline:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover,transparent)}.dshcs-cbtnPrimary{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-primary);font-weight:600}.dshcs-cbtnPrimary:hover:not(:disabled){filter:brightness(.95)}.dshcs-cbtnPrimary:active:not(:disabled){filter:brightness(.9)}.dshcs-field{flex-direction:column;gap:6px;padding:12px 0;display:flex}.dshcs-field+.dshcs-field{border-top:1px solid var(--dsw-alias-border-l2)}.dshcs-fieldHead{align-items:center;gap:8px;display:flex}.dshcs-fieldLabel{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:13px;font-weight:500;line-height:1.5}.dshcs-hint{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));margin:0;font-size:12px;line-height:1.5}.dshcs-check{display:flex;align-items:center;gap:8px;cursor:pointer}.dshcs-check input{accent-color:var(--dsw-alias-brand-primary);width:15px;height:15px;margin:0;flex:none}.dshcs-check input:disabled{cursor:default}.dshcs-badges{align-items:center;gap:8px;display:inline-flex}.dshcs-badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-2));color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.dshcs-reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.dshcs-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.dshcs-reset:disabled{cursor:default}",Dm="dsh-code-server/Card.module.css";function Rm(e,t){if(typeof document!="undefined"&&document.querySelector("style[data-plugin-css="+JSON.stringify(e)+"]")===null){var r=document.createElement("style");r.dataset.plugin="dsh-code-server",r.dataset.pluginCss=e,r.textContent=t,document.head.appendChild(r)}}Rm(Dm,Am);function km(e){return h.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,className:e.className},h.createElement("path",{d:"M3.5 5.25L7 8.75L10.5 5.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}function hi(e){return h.createElement("button",{type:"button",className:"dshcs-cbtn "+(e.variant==="primary"?"dshcs-cbtnPrimary":"dshcs-cbtnOutline"),disabled:e.disabled===!0,onClick:e.onClick},e.children)}function lc(e){return h.createElement("label",{className:"dshcs-check"},h.createElement("input",{type:"checkbox",checked:e.checked===!0,disabled:e.disabled===!0,onChange:function(t){e.onChange(t.target.checked)}}),h.createElement("span",{className:"dshcs-hint"},e.children))}function cc(e){var t=[];return e.overridden===!0&&(t.push(h.createElement("span",{className:"dshcs-badge"},e.overriddenLabel)),t.push(h.createElement("button",{type:"button",className:"dshcs-reset",disabled:e.disabled===!0,onClick:e.onReset},e.resetLabel))),t.length===0?null:h.createElement("span",{className:"dshcs-badges"},...t)}function Lm(e){var[t,r]=h.useState(!1),n=e.state;if(n==null||n.available!==!0)return null;var i=e.title,s=n.dirty!==!0||n.invalid===!0||n.saving===!0;return h.createElement("li",{className:"dshcs-card"+(t?" dshcs-cardOpen":"")},h.createElement("button",{type:"button",className:"dshcs-cardHeader","aria-expanded":t,onClick:function(){r(!t)}},h.createElement("span",{className:"dshcs-cardHeadText"},h.createElement("span",{className:"dshcs-cardName"},i),h.createElement("span",{className:"dshcs-cardDescription"},e.description)),n.dirty===!0?h.createElement("span",{className:"dshcs-pending"},e.unsavedLabel):null,h.createElement(km,{className:"dshcs-cardChevron"+(t?" dshcs-cardChevronOpen":"")})),t===!0?h.createElement("div",{className:"dshcs-cardBody"},n.writable!==!0?h.createElement("p",{className:"dshcs-cardReadOnly",role:"status"},e.readOnlyLabel):null,e.children,h.createElement("div",{className:"dshcs-cardFooter"},n.failed===!0?h.createElement("p",{className:"dshcs-cardFailed",role:"status"},e.saveFailedLabel):null,h.createElement(hi,{disabled:n.dirty!==!0||n.saving===!0,onClick:e.onDiscard},e.discardLabel),h.createElement(hi,{variant:"primary",disabled:s,onClick:e.onSave},n.saving===!0?e.savingLabel:e.saveLabel))):null)}function Im(e){try{let L=function(){fe("/code-server/status").then(function(R){R!=null&&typeof R=="object"&&_({status:R})}).catch(function(){})};var t=e.scope,[r,n]=h.useState(function(){return t!==void 0?t.getSnapshot():null}),[i,s]=h.useState(null),[o,a]=h.useState(!1),[c,u]=h.useState(!1),l=Nr();if(h.useEffect(function(){if(t===void 0||typeof t.subscribe!="function")return;function R(){try{n(t.getSnapshot())}catch(J){}}var H=t.subscribe(R);return function(){typeof H=="function"&&H()}},[t]),t===void 0)return console.error("[code-server] card scope missing"),null;if(r==null||r.status!=="ready")return r!=null&&r.status==="unavailable"&&console.warn("[code-server] settings scope unavailable:",r.status),null;var f=r.value!==void 0&&r.value!==null?r.value:{},m=r.user,d={reserveComposer:f.reserveComposer!==!1,windowedOpen:f.windowedOpen===!0},p=m!=null&&Object.prototype.hasOwnProperty.call(m,"reserveComposer"),x=m!=null&&Object.prototype.hasOwnProperty.call(m,"windowedOpen"),y=l!=null&&l.sidebarActive===!0,v=i!==null&&(i.reserveComposer!==d.reserveComposer||i.windowedOpen!==d.windowedOpen),b=!v||o,w={available:!0,writable:r.writable,dirty:v,invalid:!1,saving:o,failed:c,reserveComposer:{text:i!==null?i.reserveComposer:d.reserveComposer,overridden:p}};async function C(){if(v&&!o){a(!0),u(!1);try{var R=i!==null?i:d;await e.scope.set("reserveComposer",R.reserveComposer===!0),await e.scope.set("windowedOpen",R.windowedOpen===!0),s(null),L()}catch(H){u(!0)}a(!1)}}async function I(){if(!(o||r.writable!==!0)){a(!0),u(!1);try{typeof e.scope.unset=="function"?(await e.scope.unset("reserveComposer"),await e.scope.unset("windowedOpen")):(await e.scope.set("reserveComposer",f.reserveComposer===void 0||f.reserveComposer===null?!0:f.reserveComposer),await e.scope.set("windowedOpen",f.windowedOpen===!0)),s(null),L()}catch(R){u(!0)}a(!1)}}var[g,S]=h.useState(null),[E,A]=h.useState(!1),V=h.createElement("div",{className:"dshcs-field"},h.createElement("div",{className:"dshcs-fieldHead"},h.createElement("span",{className:"dshcs-fieldLabel"},"\u73AF\u5883\u68C0\u6D4B"),h.createElement("span",{className:"dshcs-badges"},h.createElement(hi,{variant:"primary",disabled:E,onClick:async function(){A(!0);var R=await fe("/code-server/status");S(R!=null&&R.env!=null?R.env:{error:"status \u672A\u8FD4\u56DE env"}),A(!1)}},E?"\u68C0\u6D4B\u4E2D\u2026":"\u68C0\u6D4B\u73AF\u5883"))),g!=null?h.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},g.error!=null?h.createElement("span",null,"\u68C0\u6D4B\u5931\u8D25: "+g.error):h.createElement("span",null,"\u72B6\u6001: "+(g.ok===!0?"\u2705 \u5C31\u7EEA":"\u274C \u4E0D\u901A\u8FC7")+(g.codeServer!=null?" \xB7 code-server: "+g.codeServer:"")+(g.upToDate===!1&&g.vendored!=null?"(\u5185\u7F6E "+g.vendored+") ":"")+(g.entry!=null?" \xB7 \u5165\u53E3: "+g.entry:" \xB7 \u5165\u53E3\u7F3A\u5931")+" \xB7 native: "+(g.native===!0?"\u2705":"\u274C")+" \xB7 VS Code \u5185\u90E8\u4F9D\u8D56: "+(g.vscodeInner===!0?"\u2705":"\u274C")+" \xB7 \u9884\u7F16\u8BD1\u539F\u751F\u5305: "+(g.nativeRuntime!=null&&g.nativeRuntime.packages>0?"\u2705 "+g.nativeRuntime.name+"@"+(g.nativeRuntime.version!=null?g.nativeRuntime.version:"?")+"("+g.nativeRuntime.packages+" \u5305)":"\u274C \u672A\u5B89\u88C5("+(g.nativeRuntime!=null&&g.nativeRuntime.name!=null?g.nativeRuntime.name:"\u5E73\u53F0\u805A\u5408\u5305")+")"))):h.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},'\u70B9\u51FB"\u68C0\u6D4B\u73AF\u5883"\u67E5\u770B code-server \u72B6\u6001(\u4F9D\u8D56\u7531\u5305\u7BA1\u7406\u5668\u5B89\u88C5,\u65E0\u9700\u5B89\u88C5\u6B65\u9AA4)'),h.createElement("div",{className:"dshcs-hint",style:{marginTop:10,color:"var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary))"}},"\u8FD0\u884C\u4F4D\u7F6E: "+(g!=null&&g.entry!=null?g.entry:"<\u63D2\u4EF6\u76EE\u5F55>\\vendor\\code-server\\out\\node\\entry.js")+`
|
|
4
|
+
\u5378\u8F7D: dsh plugin --profile web remove dsh-code-server-app`));return h.createElement(Lm,{title:"Code Server",description:"\u5165\u53E3:\u53F3\u4FA7\u680F\u6807\u7B7E(DSH \u2265 0.1.5-alpha.1)/ \u60AC\u6D6E\u7403\u56DE\u9000;\u7A97\u53E3\u5316\u8BBE\u7F6E\u63A7\u5236\u65B0\u6807\u7B7E\u9875\u6253\u5F00",state:w,unsavedLabel:"\u672A\u4FDD\u5B58",readOnlyLabel:"\u672C\u90E8\u7F72\u7684\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u3002",saveFailedLabel:"\u672C\u90E8\u7F72\u6CA1\u6709\u63A5\u53D7\u8FD9\u4E9B\u503C\uFF0C\u5DF2\u4FDD\u7559\u4F9B\u4F60\u4FEE\u6539\u3002",discardLabel:"\u653E\u5F03\u4FEE\u6539",saveLabel:"\u4FDD\u5B58",savingLabel:"\u4FDD\u5B58\u4E2D\u2026",onSave:C,onDiscard:function(){s(null),u(!1)}},h.createElement("div",{className:"dshcs-field"},h.createElement("div",{className:"dshcs-fieldHead"},h.createElement("span",{className:"dshcs-fieldLabel"},"\u5165\u53E3"),h.createElement("span",{className:"dshcs-badges"},h.createElement(hi,{disabled:y!==!0,onClick:function(){Kt.openTab!==null&&Kt.openTab(null)}},"\u5728\u53F3\u4FA7\u680F\u6253\u5F00"))),h.createElement("div",{className:"dshcs-hint",style:{marginTop:6}},y===!0?"\u5F53\u524D:\u53F3\u4FA7\u680F\u6807\u7B7E(DSH \u2265 0.1.5-alpha.1)\u3002\u4ECE\u53F3\u4FA7\u680F\u300C\u5F00\u59CB\u300D\u9875\u7684 Code Server \u5165\u53E3\u6846\u3001\u4EA7\u7269\u65C1\u6309\u94AE\u6216\u4E0A\u9762\u7684\u6309\u94AE\u6253\u5F00\u3002":"\u5F53\u524D:\u60AC\u6D6E\u7403(\u672C\u90E8\u7F72\u65E0\u53F3\u4FA7\u680F\u670D\u52A1)\u3002\u70B9\u51FB\u53F3\u4E0B\u89D2\u60AC\u6D6E\u7403\u5C55\u5F00\u6D6E\u7A97\u3002")),y===!0?null:h.createElement("div",{className:"dshcs-field"},h.createElement("div",{className:"dshcs-fieldHead"},h.createElement("span",{className:"dshcs-fieldLabel"},"\u4FDD\u7559\u8F93\u5165\u6846\u4E0A\u65B9\u7A7A\u95F4"),p===!0?h.createElement(cc,{overridden:!0,disabled:r.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){I()}}):null),h.createElement(lc,{checked:i!==null?i.reserveComposer:d.reserveComposer,disabled:r.writable!==!0,onChange:function(R){s(function(H){return Object.assign({},H!==null?H:d,{reserveComposer:R===!0})}),u(!1)}},"\u5F00\u542F\u65F6\u7A97\u53E3\u521D\u59CB/\u7F29\u653E/\u6700\u5927\u5316\u6B62\u4E8E\u8F93\u5165\u6846\u4E0A\u65B9;\u5173\u95ED\u540E\u5141\u8BB8\u76D6\u4F4F\u8F93\u5165\u6846(\u6700\u5927\u5316\u5230\u89C6\u53E3\u5E95)")),h.createElement("div",{className:"dshcs-field"},h.createElement("div",{className:"dshcs-fieldHead"},h.createElement("span",{className:"dshcs-fieldLabel"},"\u7A97\u53E3\u5316\u6253\u5F00(\u65B0\u6807\u7B7E\u9875)"),x===!0?h.createElement(cc,{overridden:!0,disabled:r.writable!==!0,overriddenLabel:"\u5DF2\u8986\u76D6",resetLabel:"\u6062\u590D\u9ED8\u8BA4",onReset:function(){I()}}):null),h.createElement(lc,{checked:i!==null?i.windowedOpen:d.windowedOpen,disabled:r.writable!==!0,onChange:function(R){s(function(H){return Object.assign({},H!==null?H:d,{windowedOpen:R===!0})}),u(!1)}},"\u5F00\u542F\u540E\u5165\u53E3(\u4EA7\u7269\u6309\u94AE/\u8BBE\u7F6E\u5361/\u60AC\u6D6E\u7403)\u5728\u6D4F\u89C8\u5668\u65B0\u6807\u7B7E\u9875\u6253\u5F00 code-server(\u81EA\u52A8\u542F\u52A8\u5E76\u8DDF\u968F\u5F53\u524D\u5DE5\u4F5C\u533A);\u5173\u95ED\u5219\u4F7F\u7528\u53F3\u4FA7\u680F\u6807\u7B7E\u6216\u5185\u90E8\u6D6E\u52A8\u7A97\u53E3")),h.createElement("div",{className:"dshcs-field"},h.createElement("div",{className:"dshcs-fieldHead"},h.createElement("span",{className:"dshcs-fieldLabel"},"\u4F9D\u8D56\u5B89\u88C5"),null),h.createElement("div",{className:"dshcs-hint",style:{marginTop:4}},"0.1.36 \u8D77 code-server \u672C\u4F53\u968F\u63D2\u4EF6\u5305\u53D1\u5E03,VS Code \u5185\u90E8\u4F9D\u8D56\u4E0E\u9884\u7F16\u8BD1\u539F\u751F\u6A21\u5757(\u5E73\u53F0\u805A\u5408\u5305)\u5168\u90E8\u7531\u5305\u7BA1\u7406\u5668\u5728 dsh plugin add \u65F6\u5B89\u88C5,\u4E0D\u518D\u9700\u8981\u300C\u5B89\u88C5\u73AF\u5883\u300D\u6B65\u9AA4\u3002")),V)}catch(L){return console.error("[code-server] card render error:",L!=null&&L.message!==void 0?L.message:String(L)),null}}function Om(e){var t=[];try{var r=e.turn.data.get("deliverables"),n=e.seq!=null?e.seq:Number.POSITIVE_INFINITY;if(r!=null&&Array.isArray(r.produced))for(var i={},s=0;s<r.produced.length;s++){var o=r.produced[s];o==null||typeof o.path!="string"||o.path===""||o.seq!=null&&o.seq>n||i[o.path]!==!0&&(i[o.path]=!0,t.push(o.path))}}catch(a){}return t}function Nm(e){var t=Om(e);return t.length===0?null:t}function Bm(e){return h.createElement("img",{src:Ko,alt:"","aria-hidden":!0,draggable:!1,style:{width:15,height:15,display:"block",objectFit:"contain",WebkitUserDrag:"none",userSelect:"none"}})}function Fm(e){var t=Nr();if(e==null||!Array.isArray(e.matched)||e.matched.length===0)return null;var r=e.matched;function n(s){var o=String(s).replace(/\\/g,"/"),a=o.lastIndexOf("/");return a>=0?o.slice(a+1):o}function i(s){var o=t.status;if(o!=null&&o.windowedOpen===!0){dc(gi(e.useSessions,e.useWorkspaces));return}t.sidebarActive===!0&&Kt.openTab!==null&&Kt.openTab({path:s})===!0||(_({open:!0}),fe("/code-server/open-file",{file:s}).then(function(a){(a==null||a.ok!==!0)&&window.alert(a!=null&&a.error?a.error:"\u6253\u5F00\u5931\u8D25")}).catch(function(a){window.alert("\u6253\u5F00\u5931\u8D25: "+String(a))}))}return h.createElement("div",{className:"dshcs-artifacts"},h.createElement("span",{className:"dshcs-artlabel"},"\u4EA7\u7269"),h.createElement("div",{className:"dshcs-artrow"},r.slice(0,6).map(function(s){return h.createElement("span",{key:s,className:"dshcs-artitem"},h.createElement("button",{type:"button",className:"dshcs-artfile",title:s,"aria-label":"\u6253\u5F00: "+s,onClick:function(){i(s)}},n(s)),h.createElement("button",{type:"button",className:"dshcs-artbtn",title:"\u5728 Code Server \u6253\u5F00: "+s,"aria-label":"\u5728 Code Server \u6253\u5F00: "+s,onClick:function(){i(s)}},h.createElement(Bm,null)))}),r.length>6?h.createElement("span",{className:"dshcs-artmore"},"\u2026"):null))}function jm(e){try{zm(e)}catch(t){console.error("[code-server] apply failed:",t&&t.stack?t.stack:String(t));try{document.title="CS-ERR "+(t&&t.message||String(t))}catch(r){}}}function zm(e){var t=e.get("slots");if(t===void 0){console.error("[code-server] slots service unavailable");return}var r=e.settingsScope,n=null;if(r!==void 0&&typeof r.bind=="function")n=r.bind({namespace:"code-server"});else{console.error("[code-server] settingsScope unavailable (inject missing?); settings card disabled");return}fe("/code-server/status").then(function(i){_({status:i})}).catch(function(){}),t.inject("shell.overlay",()=>t.register({name:"shell.overlay",id:"code-server",order:70,label:"Code Server"},i=>h.createElement(h.Fragment,null,h.createElement(Vm,i),h.createElement(Cm,i))));try{t.inject("conversation.chat.turnTail",function(){return t.register({name:"conversation.chat.turnTail",priority:-9,id:"dshcs-open-file",select:Nm},Fm)}),console.log("[code-server] turnTail artifacts buttons registered")}catch(i){console.warn("[code-server] turnTail register failed:",i!=null&&i.message!=null?i.message:String(i))}t.inject("settings.plugin.item",()=>t.register({name:"settings.plugin.item",key:"code-server",label:"Code Server",inject:function(){return{scope:n}}},Im));try{typeof e.inject=="function"?e.inject(["sidebarRightTabs","sidebarRight"],function(i){try{Mm(i)}catch(s){console.warn("[code-server] sidebar tab registration failed; keep floating ball:",s!=null&&s.message!=null?s.message:String(s))}}):console.warn("[code-server] ctx.inject unavailable; keep floating ball")}catch(i){console.warn("[code-server] sidebar inject failed; keep floating ball:",i!=null&&i.message!=null?i.message:String(i))}console.log("[code-server] client bundle registered (floating ball + window + settings card; right-sidebar tab pending/active)")}var Gm=["slots","settingsScope"],Wm="code-server";
|
|
5
5
|
return module.exports;}});
|
|
6
6
|
|