@kaitranntt/ccs 7.73.1-dev.4 → 7.73.1-dev.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/ccs.js +15 -3
  2. package/dist/ccs.js.map +1 -1
  3. package/dist/cliproxy/catalog-cache.d.ts.map +1 -1
  4. package/dist/cliproxy/catalog-cache.js +7 -0
  5. package/dist/cliproxy/catalog-cache.js.map +1 -1
  6. package/dist/cliproxy/config/thinking-config.d.ts.map +1 -1
  7. package/dist/cliproxy/config/thinking-config.js +9 -1
  8. package/dist/cliproxy/config/thinking-config.js.map +1 -1
  9. package/dist/cliproxy/executor/index.js +1 -1
  10. package/dist/cliproxy/executor/index.js.map +1 -1
  11. package/dist/cliproxy/model-catalog.d.ts +1 -1
  12. package/dist/cliproxy/model-catalog.d.ts.map +1 -1
  13. package/dist/cliproxy/model-catalog.js +7 -4
  14. package/dist/cliproxy/model-catalog.js.map +1 -1
  15. package/dist/cliproxy/thinking-validator.d.ts +6 -1
  16. package/dist/cliproxy/thinking-validator.d.ts.map +1 -1
  17. package/dist/cliproxy/thinking-validator.js +22 -2
  18. package/dist/cliproxy/thinking-validator.js.map +1 -1
  19. package/dist/commands/config-thinking-command.js +1 -1
  20. package/dist/commands/config-thinking-command.js.map +1 -1
  21. package/dist/config/unified-config-loader.d.ts.map +1 -1
  22. package/dist/config/unified-config-loader.js +1 -1
  23. package/dist/config/unified-config-loader.js.map +1 -1
  24. package/dist/cursor/cursor-anthropic-translator.d.ts.map +1 -1
  25. package/dist/cursor/cursor-anthropic-translator.js +17 -3
  26. package/dist/cursor/cursor-anthropic-translator.js.map +1 -1
  27. package/dist/cursor/cursor-anthropic-types.d.ts +3 -0
  28. package/dist/cursor/cursor-anthropic-types.d.ts.map +1 -1
  29. package/dist/delegation/headless-executor.d.ts.map +1 -1
  30. package/dist/delegation/headless-executor.js +29 -2
  31. package/dist/delegation/headless-executor.js.map +1 -1
  32. package/dist/proxy/transformers/request-transformer.js +2 -2
  33. package/dist/proxy/transformers/request-transformer.js.map +1 -1
  34. package/dist/targets/droid-config-manager.d.ts.map +1 -1
  35. package/dist/targets/droid-config-manager.js +40 -0
  36. package/dist/targets/droid-config-manager.js.map +1 -1
  37. package/dist/ui/assets/{accounts-B830572d.js → accounts-DP5Z1EFU.js} +1 -1
  38. package/dist/ui/assets/{alert-dialog-DXdqyRvZ.js → alert-dialog-CQdEm6bp.js} +1 -1
  39. package/dist/ui/assets/{api-ZdibJo1t.js → api-D5Cb0AwB.js} +1 -1
  40. package/dist/ui/assets/{auth-section-C5zA_IKC.js → auth-section-CJVbTOVb.js} +1 -1
  41. package/dist/ui/assets/{backups-section-BD50d3Ks.js → backups-section-Y_f1xNq0.js} +1 -1
  42. package/dist/ui/assets/{channels-DB6oCzhb.js → channels-BhiKchME.js} +1 -1
  43. package/dist/ui/assets/{checkbox-B31y9NZ4.js → checkbox-B3t4WVKC.js} +1 -1
  44. package/dist/ui/assets/{claude-extension-CfHHW5Bh.js → claude-extension-DIVWnBLH.js} +1 -1
  45. package/dist/ui/assets/{cliproxy-BQSzXOMq.js → cliproxy-IfnW84kx.js} +1 -1
  46. package/dist/ui/assets/{cliproxy-ai-providers-D2PWVjG_.js → cliproxy-ai-providers-BWUtWLiP.js} +1 -1
  47. package/dist/ui/assets/{cliproxy-control-panel-Dh0MOTBo.js → cliproxy-control-panel-Dxv8_YKF.js} +1 -1
  48. package/dist/ui/assets/{codex-NN7wN-Vm.js → codex-CLwDdgVR.js} +1 -1
  49. package/dist/ui/assets/{confirm-dialog-501NYQEI.js → confirm-dialog-C_kmUtFS.js} +1 -1
  50. package/dist/ui/assets/{copilot-CKysftVg.js → copilot-DzcYLXMp.js} +1 -1
  51. package/dist/ui/assets/{cursor-BYntx3WU.js → cursor-DE4aAuWq.js} +1 -1
  52. package/dist/ui/assets/{droid-BoI5M9fG.js → droid-BoAC7O4T.js} +1 -1
  53. package/dist/ui/assets/{globalenv-section-B3y8J6Su.js → globalenv-section-C3_vvyHh.js} +1 -1
  54. package/dist/ui/assets/{health-poXeqsdo.js → health-CDGSE5pt.js} +1 -1
  55. package/dist/ui/assets/index-24lkHKk-.js +1 -0
  56. package/dist/ui/assets/{index-BrJU7DJe.js → index-BGSU0v6t.js} +1 -1
  57. package/dist/ui/assets/{index-V6sDuG7c.js → index-BfcGrRgt.js} +1 -1
  58. package/dist/ui/assets/{index-DvsRe_Ab.js → index-CFM8uP-r.js} +2 -2
  59. package/dist/ui/assets/{index-D_6C5xDE.js → index-CUSDsTN_.js} +1 -1
  60. package/dist/ui/assets/{index-CmAdgKyc.js → index-Cgt-MWcy.js} +1 -1
  61. package/dist/ui/assets/{index-BmIC1TNI.js → index-mp6UnHMw.js} +1 -1
  62. package/dist/ui/assets/{logs-GFG59ZNO.js → logs-9cHoql3A.js} +1 -1
  63. package/dist/ui/assets/{masked-input-C3X9ShE6.js → masked-input-uY6tVHKi.js} +1 -1
  64. package/dist/ui/assets/{proxy-status-widget-BlB7y5Cc.js → proxy-status-widget-CjPRINty.js} +1 -1
  65. package/dist/ui/assets/{raw-json-settings-editor-panel-DqIGAU4M.js → raw-json-settings-editor-panel-BB2BWLtR.js} +1 -1
  66. package/dist/ui/assets/{searchable-select-CiWJb83E.js → searchable-select-D-9hF3gA.js} +1 -1
  67. package/dist/ui/assets/{separator-C8WoAtfl.js → separator-D_IJQ8sI.js} +1 -1
  68. package/dist/ui/assets/{shared-FpITx2lN.js → shared-CQdnrmbl.js} +1 -1
  69. package/dist/ui/assets/{table-BXBWE6lk.js → table-BqxCXcWk.js} +1 -1
  70. package/dist/ui/assets/{updates-COAY1Ft3.js → updates-jMIV7rVm.js} +1 -1
  71. package/dist/ui/index.html +1 -1
  72. package/dist/utils/shell-executor.d.ts +7 -0
  73. package/dist/utils/shell-executor.d.ts.map +1 -1
  74. package/dist/utils/shell-executor.js +81 -23
  75. package/dist/utils/shell-executor.js.map +1 -1
  76. package/package.json +1 -1
  77. package/dist/ui/assets/index-WHelK_eu.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as m}from"./radix-ui-Zb8sVEtn.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{bt as la,bu as ca,Y as wt,a as li,bv as ua,bi as Zn,bk as In,d as xe,n as da,c as Te,L as We,I as Hn,aI as On,M as ha,N as fa,O as ma}from"./index-DvsRe_Ab.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./icons-Dmi9qMuE.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function pa(e,t){return{claude:{...e.claude,...t.claude},codex:{...e.codex,...t.codex}}}function ga(){const{state:e}=la(),t=ca(),n=l.useCallback(async()=>{try{t.setBrowserLoading(!0),t.setBrowserError(null);const a=await wt.browser.get();t.setBrowserConfig(a.config),t.setBrowserStatus(a.status)}catch(a){t.setBrowserError(a.message)}finally{t.setBrowserLoading(!1),t.setBrowserStatusLoading(!1)}},[t]),s=l.useCallback(async()=>{try{t.setBrowserStatusLoading(!0),t.setBrowserError(null);const a=await wt.browser.getStatus();return t.setBrowserStatus(a),a}catch(a){return t.setBrowserError(a.message),null}finally{t.setBrowserStatusLoading(!1)}},[t]),i=l.useCallback(async a=>{const r=e.browserConfig;if(!r)return!1;const o=pa(r,a);t.setBrowserConfig(o);try{t.setBrowserSaving(!0),t.setBrowserError(null);const u=await wt.browser.update(a);return t.setBrowserConfig(u.browser.config),t.setBrowserStatus(u.browser.status),t.setBrowserSuccess(!0),window.setTimeout(()=>t.setBrowserSuccess(!1),1500),!0}catch(u){return t.setBrowserConfig(r),t.setBrowserError(u.message),!1}finally{t.setBrowserSaving(!1)}},[t,e.browserConfig]);return{config:e.browserConfig,status:e.browserStatus,loading:e.browserLoading,statusLoading:e.browserStatusLoading,saving:e.browserSaving,error:e.browserError,success:e.browserSuccess,fetchConfig:n,fetchStatus:s,saveConfig:i}}const cn=l.createContext({});function un(e){const t=l.useRef(null);return t.current===null&&(t.current=e()),t.current}const ya=typeof window<"u",ci=ya?l.useLayoutEffect:l.useEffect,gt=l.createContext(null);function dn(e,t){e.indexOf(t)===-1&&e.push(t)}function ot(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const se=(e,t,n)=>n>t?t:n<e?e:n;let hn=()=>{};const ae={},ui=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function di(e){return typeof e=="object"&&e!==null}const hi=e=>/^0[^.\s]+$/u.test(e);function fi(e){let t;return()=>(t===void 0&&(t=e()),t)}const G=e=>e,xa=(e,t)=>n=>t(e(n)),Oe=(...e)=>e.reduce(xa),Be=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class fn{constructor(){this.subscriptions=[]}add(t){return dn(this.subscriptions,t),()=>ot(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let a=0;a<i;a++){const r=this.subscriptions[a];r&&r(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,K=e=>e/1e3;function mi(e,t){return t?e*(1e3/t):0}const pi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,va=1e-7,ba=12;function wa(e,t,n,s,i){let a,r,o=0;do r=t+(n-t)/2,a=pi(r,s,i)-e,a>0?n=r:t=r;while(Math.abs(a)>va&&++o<ba);return r}function ze(e,t,n,s){if(e===t&&n===s)return G;const i=a=>wa(a,0,1,e,n);return a=>a===0||a===1?a:pi(i(a),t,s)}const gi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yi=e=>t=>1-e(1-t),xi=ze(.33,1.53,.69,.99),mn=yi(xi),vi=gi(mn),bi=e=>e>=1?1:(e*=2)<1?.5*mn(e):.5*(2-Math.pow(2,-10*(e-1))),pn=e=>1-Math.sin(Math.acos(e)),wi=yi(pn),Ai=gi(pn),Aa=ze(.42,0,1,1),Ta=ze(0,0,.58,1),Ti=ze(.42,0,.58,1),Sa=e=>Array.isArray(e)&&typeof e[0]!="number",Si=e=>Array.isArray(e)&&typeof e[0]=="number",Pa={linear:G,easeIn:Aa,easeInOut:Ti,easeOut:Ta,circIn:pn,circInOut:Ai,circOut:wi,backIn:mn,backInOut:vi,backOut:xi,anticipate:bi},Ea=e=>typeof e=="string",zn=e=>{if(Si(e)){hn(e.length===4);const[t,n,s,i]=e;return ze(t,n,s,i)}else if(Ea(e))return Pa[e];return e},Ke=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Va(e,t){let n=new Set,s=new Set,i=!1,a=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(c){r.has(c)&&(d.schedule(c),e()),c(o)}const d={schedule:(c,h=!1,f=!1)=>{const g=f&&i?n:s;return h&&r.add(c),g.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(o=c,i){a=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(u),n.clear(),i=!1,a&&(a=!1,d.process(c))}};return d}const Ma=40;function Pi(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,r=Ke.reduce((w,A)=>(w[A]=Va(a),w),{}),{setup:o,read:u,resolveKeyframes:d,preUpdate:c,update:h,preRender:f,render:p,postRender:g}=r,x=()=>{const w=ae.useManualTiming,A=w?i.timestamp:performance.now();n=!1,w||(i.delta=s?1e3/60:Math.max(Math.min(A-i.timestamp,Ma),1)),i.timestamp=A,i.isProcessing=!0,o.process(i),u.process(i),d.process(i),c.process(i),h.process(i),f.process(i),p.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(x))},v=()=>{n=!0,s=!0,i.isProcessing||e(x)};return{schedule:Ke.reduce((w,A)=>{const S=r[A];return w[A]=(M,j=!1,E=!1)=>(n||v(),S.schedule(M,j,E)),w},{}),cancel:w=>{for(let A=0;A<Ke.length;A++)r[Ke[A]].cancel(w)},state:i,steps:r}}const{schedule:C,cancel:oe,state:I,steps:At}=Pi(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Ye;function Ca(){Ye=void 0}const z={now:()=>(Ye===void 0&&z.set(I.isProcessing||ae.useManualTiming?I.timestamp:performance.now()),Ye),set:e=>{Ye=e,queueMicrotask(Ca)}},Ei=e=>t=>typeof t=="string"&&t.startsWith(e),Vi=Ei("--"),La=Ei("var(--"),gn=e=>La(e)?Da.test(e.split("/*")[0].trim()):!1,Da=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Un(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ee={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ze={...Ee,transform:e=>se(0,1,e)},Ge={...Ee,default:1},Re=e=>Math.round(e*1e5)/1e5,yn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ka(e){return e==null}const Ra=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xn=(e,t)=>n=>!!(typeof n=="string"&&Ra.test(n)&&n.startsWith(e)||t&&!ka(n)&&Object.prototype.hasOwnProperty.call(n,t)),Mi=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,a,r,o]=s.match(yn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(r),alpha:o!==void 0?parseFloat(o):1}},ja=e=>se(0,255,e),Tt={...Ee,transform:e=>Math.round(ja(e))},fe={test:xn("rgb","red"),parse:Mi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Tt.transform(e)+", "+Tt.transform(t)+", "+Tt.transform(n)+", "+Re(Ze.transform(s))+")"};function Fa(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Zt={test:xn("#"),parse:Fa,transform:fe.transform},Ue=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ie=Ue("deg"),ne=Ue("%"),T=Ue("px"),Na=Ue("vh"),Ba=Ue("vw"),$n={...ne,parse:e=>ne.parse(e)/100,transform:e=>ne.transform(e*100)},be={test:xn("hsl","hue"),parse:Mi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ne.transform(Re(t))+", "+ne.transform(Re(n))+", "+Re(Ze.transform(s))+")"},F={test:e=>fe.test(e)||Zt.test(e)||be.test(e),parse:e=>fe.test(e)?fe.parse(e):be.test(e)?be.parse(e):Zt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fe.transform(e):be.transform(e),getAnimatableNone:e=>{const t=F.parse(e);return t.alpha=0,F.transform(t)}},Za=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ia(e){return isNaN(e)&&typeof e=="string"&&(e.match(yn)?.length||0)+(e.match(Za)?.length||0)>0}const Ci="number",Li="color",Ha="var",Oa="var(",Wn="${}",za=/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 Se(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(za,u=>(F.test(u)?(s.color.push(a),i.push(Li),n.push(F.parse(u))):u.startsWith(Oa)?(s.var.push(a),i.push(Ha),n.push(u)):(s.number.push(a),i.push(Ci),n.push(parseFloat(u))),++a,Wn)).split(Wn);return{values:n,split:o,indexes:s,types:i}}function Ua(e){return Se(e).values}function Di({split:e,types:t}){const n=e.length;return s=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],s[a]!==void 0){const r=t[a];r===Ci?i+=Re(s[a]):r===Li?i+=F.transform(s[a]):i+=s[a]}return i}}function $a(e){return Di(Se(e))}const Wa=e=>typeof e=="number"?0:F.test(e)?F.getAnimatableNone(e):e,Ka=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Wa(e);function Ga(e){const t=Se(e);return Di(t)(t.values.map((s,i)=>Ka(s,t.split[i])))}const Q={test:Ia,parse:Ua,createTransformer:$a,getAnimatableNone:Ga};function St(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _a({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,a=0,r=0;if(!t)i=a=r=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;i=St(u,o,e+1/3),a=St(u,o,e),r=St(u,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:s}}function lt(e,t){return n=>n>0?t:e}const D=(e,t,n)=>e+(t-e)*n,Pt=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},qa=[Zt,fe,be],Xa=e=>qa.find(t=>t.test(e));function Kn(e){const t=Xa(e);if(!t)return!1;let n=t.parse(e);return t===be&&(n=_a(n)),n}const Gn=(e,t)=>{const n=Kn(e),s=Kn(t);if(!n||!s)return lt(e,t);const i={...n};return a=>(i.red=Pt(n.red,s.red,a),i.green=Pt(n.green,s.green,a),i.blue=Pt(n.blue,s.blue,a),i.alpha=D(n.alpha,s.alpha,a),fe.transform(i))},It=new Set(["none","hidden"]);function Ya(e,t){return It.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Qa(e,t){return n=>D(e,t,n)}function vn(e){return typeof e=="number"?Qa:typeof e=="string"?gn(e)?lt:F.test(e)?Gn:to:Array.isArray(e)?ki:typeof e=="object"?F.test(e)?Gn:Ja:lt}function ki(e,t){const n=[...e],s=n.length,i=e.map((a,r)=>vn(a)(a,t[r]));return a=>{for(let r=0;r<s;r++)n[r]=i[r](a);return n}}function Ja(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=vn(e[i])(e[i],t[i]));return i=>{for(const a in s)n[a]=s[a](i);return n}}function eo(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],r=e.indexes[a][s[a]],o=e.values[r]??0;n[i]=o,s[a]++}return n}const to=(e,t)=>{const n=Q.createTransformer(t),s=Se(e),i=Se(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?It.has(e)&&!i.values.length||It.has(t)&&!s.values.length?Ya(e,t):Oe(ki(eo(s,i),i.values),n):lt(e,t)};function Ri(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?D(e,t,n):vn(e)(e,t)}const no=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>C.update(t,n),stop:()=>oe(t),now:()=>I.isProcessing?I.timestamp:z.now()}},ji=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)s+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ct=2e4;function bn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<ct;)t+=n,s=e.next(t);return t>=ct?1/0:t}function so(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(bn(s),ct);return{type:"keyframes",ease:a=>s.next(i*a).value/t,duration:K(i)}}const R={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 Ht(e,t){return e*Math.sqrt(1-t*t)}const io=12;function ro(e,t,n){let s=n;for(let i=1;i<io;i++)s=s-e(s)/t(s);return s}const Et=.001;function ao({duration:e=R.duration,bounce:t=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,a,r=1-t;r=se(R.minDamping,R.maxDamping,r),e=se(R.minDuration,R.maxDuration,K(e)),r<1?(i=d=>{const c=d*r,h=c*e,f=c-n,p=Ht(d,r),g=Math.exp(-h);return Et-f/p*g},a=d=>{const h=d*r*e,f=h*n+n,p=Math.pow(r,2)*Math.pow(d,2)*e,g=Math.exp(-h),x=Ht(Math.pow(d,2),r);return(-i(d)+Et>0?-1:1)*((f-p)*g)/x}):(i=d=>{const c=Math.exp(-d*e),h=(d-n)*e+1;return-Et+c*h},a=d=>{const c=Math.exp(-d*e),h=(n-d)*(e*e);return c*h});const o=5/e,u=ro(i,a,o);if(e=$(e),isNaN(u))return{stiffness:R.stiffness,damping:R.damping,duration:e};{const d=Math.pow(u,2)*s;return{stiffness:d,damping:r*2*Math.sqrt(s*d),duration:e}}}const oo=["duration","bounce"],lo=["stiffness","damping","mass"];function _n(e,t){return t.some(n=>e[n]!==void 0)}function co(e){let t={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...e};if(!_n(e,lo)&&_n(e,oo))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,a=2*se(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:R.mass,stiffness:i,damping:a}}else{const n=ao({...e,velocity:0});t={...t,...n,mass:R.mass},t.isResolvedFromDuration=!0}return t}function ut(e=R.visualDuration,t=R.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],o={done:!1,value:a},{stiffness:u,damping:d,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=co({...n,velocity:-K(n.velocity||0)}),g=f||0,x=d/(2*Math.sqrt(u*c)),v=r-a,b=K(Math.sqrt(u/c)),y=Math.abs(v)<5;s||(s=y?R.restSpeed.granular:R.restSpeed.default),i||(i=y?R.restDelta.granular:R.restDelta.default);let w,A,S,M,j,E;if(x<1)S=Ht(b,x),M=(g+x*b*v)/S,w=P=>{const L=Math.exp(-x*b*P);return r-L*(M*Math.sin(S*P)+v*Math.cos(S*P))},j=x*b*M+v*S,E=x*b*v-M*S,A=P=>Math.exp(-x*b*P)*(j*Math.sin(S*P)+E*Math.cos(S*P));else if(x===1){w=L=>r-Math.exp(-b*L)*(v+(g+b*v)*L);const P=g+b*v;A=L=>Math.exp(-b*L)*(b*P*L-g)}else{const P=b*Math.sqrt(x*x-1);w=k=>{const O=Math.exp(-x*b*k),J=Math.min(P*k,300);return r-O*((g+x*b*v)*Math.sinh(J)+P*v*Math.cosh(J))/P};const L=(g+x*b*v)/P,N=x*b*L-v*P,q=x*b*v-L*P;A=k=>{const O=Math.exp(-x*b*k),J=Math.min(P*k,300);return O*(N*Math.sinh(J)+q*Math.cosh(J))}}const V={calculatedDuration:p&&h||null,velocity:P=>$(A(P)),next:P=>{if(!p&&x<1){const N=Math.exp(-x*b*P),q=Math.sin(S*P),k=Math.cos(S*P),O=r-N*(M*q+v*k),J=$(N*(j*q+E*k));return o.done=Math.abs(J)<=s&&Math.abs(r-O)<=i,o.value=o.done?r:O,o}const L=w(P);if(p)o.done=P>=h;else{const N=$(A(P));o.done=Math.abs(N)<=s&&Math.abs(r-L)<=i}return o.value=o.done?r:L,o},toString:()=>{const P=Math.min(bn(V),ct),L=ji(N=>V.next(P*N).value,P,30);return P+"ms "+L},toTransition:()=>{}};return V}ut.applyToOptions=e=>{const t=so(e,100,ut);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const uo=5;function Fi(e,t,n){const s=Math.max(t-uo,0);return mi(n-e(s),t-s)}function Ot({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:r,min:o,max:u,restDelta:d=.5,restSpeed:c}){const h=e[0],f={done:!1,value:h},p=E=>o!==void 0&&E<o||u!==void 0&&E>u,g=E=>o===void 0?u:u===void 0||Math.abs(o-E)<Math.abs(u-E)?o:u;let x=n*t;const v=h+x,b=r===void 0?v:r(v);b!==v&&(x=b-h);const y=E=>-x*Math.exp(-E/s),w=E=>b+y(E),A=E=>{const V=y(E),P=w(E);f.done=Math.abs(V)<=d,f.value=f.done?b:P};let S,M;const j=E=>{p(f.value)&&(S=E,M=ut({keyframes:[f.value,g(f.value)],velocity:Fi(w,E,f.value),damping:i,stiffness:a,restDelta:d,restSpeed:c}))};return j(0),{calculatedDuration:null,next:E=>{let V=!1;return!M&&S===void 0&&(V=!0,A(E),j(E)),S!==void 0&&E>=S?M.next(E-S):(!V&&A(E),f)}}}function ho(e,t,n){const s=[],i=n||ae.mix||Ri,a=e.length-1;for(let r=0;r<a;r++){let o=i(e[r],e[r+1]);if(t){const u=Array.isArray(t)?t[r]||G:t;o=Oe(u,o)}s.push(o)}return s}function fo(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const a=e.length;if(hn(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=ho(t,s,i),u=o.length,d=c=>{if(r&&c<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(c<e[h+1]);h++);const f=Be(e[h],e[h+1],c);return o[h](f)};return n?c=>d(se(e[0],e[a-1],c)):d}function mo(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Be(0,t,s);e.push(D(n,1,i))}}function po(e){const t=[0];return mo(t,e.length-1),t}function go(e,t){return e.map(n=>n*t)}function yo(e,t){return e.map(()=>t||Ti).splice(0,e.length-1)}function je({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Sa(s)?s.map(zn):zn(s),a={done:!1,value:t[0]},r=go(n&&n.length===t.length?n:po(t),e),o=fo(r,t,{ease:Array.isArray(i)?i:yo(t,i)});return{calculatedDuration:e,next:u=>(a.value=o(u),a.done=u>=e,a)}}const xo=e=>e!==null;function yt(e,{repeat:t,repeatType:n="loop"},s,i=1){const a=e.filter(xo),o=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||s===void 0?a[o]:s}const vo={decay:Ot,inertia:Ot,tween:je,keyframes:je,spring:ut};function Ni(e){typeof e.type=="string"&&(e.type=vo[e.type])}class wn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const bo=e=>e/100;class dt extends wn{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=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ni(t);const{type:n=je,repeat:s=0,repeatDelay:i=0,repeatType:a,velocity:r=0}=t;let{keyframes:o}=t;const u=n||je;u!==je&&typeof o[0]!="number"&&(this.mixKeyframes=Oe(bo,Ri(o[0],o[1])),o=[0,100]);const d=u({...t,keyframes:o});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...o].reverse(),velocity:-r})),d.calculatedDuration===null&&(d.calculatedDuration=bn(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:a,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:p,type:g,onUpdate:x,finalKeyframe:v}=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)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,A=s;if(h){const E=Math.min(this.currentTime,i)/o;let V=Math.floor(E),P=E%1;!P&&E>=1&&(P=1),P===1&&V--,V=Math.min(V,h+1),!!(V%2)&&(f==="reverse"?(P=1-P,p&&(P-=p/o)):f==="mirror"&&(A=r)),w=se(0,1,P)*o}let S;y?(this.delayState.value=c[0],S=this.delayState):S=A.next(w),a&&!y&&(S.value=a(S.value));let{done:M}=S;!y&&u!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&g!==Ot&&(S.value=yt(c,this.options,v,this.speed)),x&&x(S.value),j&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+K(t)}get time(){return K(this.currentTime)}set time(t){t=$(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(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Fi(s=>this.generator.next(s).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=K(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=no,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function wo(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const me=e=>e*180/Math.PI,zt=e=>{const t=me(Math.atan2(e[1],e[0]));return Ut(t)},Ao={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zt,rotateZ:zt,skewX:e=>me(Math.atan(e[1])),skewY:e=>me(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ut=e=>(e=e%360,e<0&&(e+=360),e),qn=zt,Xn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),To={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xn,scaleY:Yn,scale:e=>(Xn(e)+Yn(e))/2,rotateX:e=>Ut(me(Math.atan2(e[6],e[5]))),rotateY:e=>Ut(me(Math.atan2(-e[2],e[0]))),rotateZ:qn,rotate:qn,skewX:e=>me(Math.atan(e[4])),skewY:e=>me(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $t(e){return e.includes("scale")?1:0}function Wt(e,t){if(!e||e==="none")return $t(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=To,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ao,i=o}if(!i)return $t(t);const a=s[t],r=i[1].split(",").map(Po);return typeof a=="function"?a(r):r[a]}const So=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Wt(n,t)};function Po(e){return parseFloat(e.trim())}const Ve=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Me=new Set(Ve),Qn=e=>e===Ee||e===T,Eo=new Set(["x","y","z"]),Vo=Ve.filter(e=>!Eo.has(e));function Mo(e){const t=[];return Vo.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const re={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:s})=>{const i=e.max-e.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:s})=>{const i=e.max-e.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Wt(t,"x"),y:(e,{transform:t})=>Wt(t,"y")};re.translateX=re.x;re.translateY=re.y;const pe=new Set;let Kt=!1,Gt=!1,_t=!1;function Bi(){if(Gt){const e=Array.from(pe).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Mo(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([a,r])=>{s.getValue(a)?.set(r)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Gt=!1,Kt=!1,pe.forEach(e=>e.complete(_t)),pe.clear()}function Zi(){pe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gt=!0)})}function Co(){_t=!0,Zi(),Bi(),_t=!1}class An{constructor(t,n,s,i,a,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=a,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(pe.add(this),Kt||(Kt=!0,C.read(Zi),C.resolveKeyframes(Bi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const a=i?.get(),r=t[t.length-1];if(a!==void 0)t[0]=a;else if(s&&n){const o=s.readValue(n,r);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=r),i&&a===void 0&&i.set(t[0])}wo(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pe.delete(this)}cancel(){this.state==="scheduled"&&(pe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Lo=e=>e.startsWith("--");function Ii(e,t,n){Lo(t)?e.style.setProperty(t,n):e.style[t]=n}const Do={};function Hi(e,t){const n=fi(e);return()=>Do[t]??n()}const ko=Hi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Oi=Hi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),De=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:De([0,.65,.55,1]),circOut:De([.55,0,1,.45]),backIn:De([.31,.01,.66,-.59]),backOut:De([.33,1.53,.69,.99])};function zi(e,t){if(e)return typeof e=="function"?Oi()?ji(e,t):"ease-out":Si(e)?De(e):Array.isArray(e)?e.map(n=>zi(n,t)||Jn.easeOut):Jn[e]}function Ro(e,t,n,{delay:s=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:u}={},d=void 0){const c={[t]:n};u&&(c.offset=u);const h=zi(o,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(c,f)}function Ui(e){return typeof e=="function"&&"applyToOptions"in e}function jo({type:e,...t}){return Ui(e)&&Oi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class $i extends wn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:o,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=r,this.options=t,hn(typeof t.type!="string");const d=jo(t);this.animation=Ro(n,s,i,d,a),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const c=yt(i,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(c),Ii(n,s,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return K(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+K(t)}get time(){return K(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ko()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const Wi={anticipate:bi,backInOut:vi,circInOut:Ai};function Fo(e){return e in Wi}function No(e){typeof e.ease=="string"&&Fo(e.ease)&&(e.ease=Wi[e.ease])}const Vt=10;class Bo extends $i{constructor(t){No(t),Ni(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:a,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new dt({...r,autoplay:!1}),u=Math.max(Vt,z.now()-this.startTime),d=se(0,Vt,u-Vt),c=o.sample(u).value,{name:h}=this.options;a&&h&&Ii(a,h,c),n.setWithVelocity(o.sample(Math.max(0,u-d)).value,c,d),o.stop()}}const es=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function Zo(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Io(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],r=es(i,t),o=es(a,t);return!r||!o?!1:Zo(e)||(n==="spring"||Ui(n))&&s}function qt(e){e.duration=0,e.type="keyframes"}const Ki=new Set(["opacity","clipPath","filter","transform"]),Ho=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Oo(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Ho.test(e[t]))return!0;return!1}const zo=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Uo=fi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $o(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:a,type:r,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return Uo()&&n&&(Ki.has(n)||zo.has(n)&&Oo(o))&&(n!=="transform"||!c)&&!d&&!s&&i!=="mirror"&&a!==0&&r!=="inertia"}const Wo=40;class Ko extends wn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:r="loop",keyframes:o,name:u,motionValue:d,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=z.now();const f={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:a,repeatType:r,name:u,motionValue:d,element:c,...h},p=c?.KeyframeResolver||An;this.keyframeResolver=new p(o,(g,x,v)=>this.onKeyframesResolved(g,x,f,!v),u,d,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:a,type:r,velocity:o,delay:u,isHandoff:d,onUpdate:c}=s;this.resolvedAt=z.now();let h=!0;Io(t,a,r,o)||(h=!1,(ae.instantAnimations||!u)&&c?.(yt(t,s,n)),t[0]=t[t.length-1],qt(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Wo?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=h&&!d&&$o(p),x=p.motionValue?.owner?.current;let v;if(g)try{v=new Bo({...p,element:x})}catch{v=new dt(p)}else v=new dt(p);v.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Co()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Gi(e,t,n,s=0,i=1){const a=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),r=e.size,o=(r-1)*s;return typeof n=="function"?n(a,r):i===1?a*s:o-a*s}const Go=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _o(e){const t=Go.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}function _i(e,t,n=1){const[s,i]=_o(e);if(!s)return;const a=window.getComputedStyle(t).getPropertyValue(s);if(a){const r=a.trim();return ui(r)?parseFloat(r):r}return gn(i)?_i(i,t,n+1):i}const qo={type:"spring",stiffness:500,damping:25,restSpeed:10},Xo=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yo={type:"keyframes",duration:.8},Qo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jo=(e,{keyframes:t})=>t.length>2?Yo:Me.has(e)?e.startsWith("scale")?Xo(t[1]):qo:Qo;function qi(e,t){if(e?.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Tn(e,t){const n=e?.[t]??e?.default??e;return n!==e?qi(n,e):n}const el=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function tl(e){for(const t in e)if(!el.has(t))return!0;return!1}const Sn=(e,t,n,s={},i,a)=>r=>{const o=Tn(s,e)||{},u=o.delay||s.delay||0;let{elapsed:d=0}=s;d=d-$(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-d,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{r(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:i};tl(o)||Object.assign(c,Jo(e,c)),c.duration&&(c.duration=$(c.duration)),c.repeatDelay&&(c.repeatDelay=$(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qt(c),c.delay===0&&(h=!0)),(ae.instantAnimations||ae.skipAnimations||i?.shouldSkipAnimations)&&(h=!0,qt(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,h&&!a&&t.get()!==void 0){const f=yt(c.keyframes,o);if(f!==void 0){C.update(()=>{c.onUpdate(f),c.onComplete()});return}}return o.isSync?new dt(c):new Ko(c)};function ts(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Pn(e,t,n,s){if(typeof t=="function"){const[i,a]=ts(s);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=ts(s);t=t(n!==void 0?n:e.custom,i,a)}return t}function ge(e,t,n){const s=e.getProps();return Pn(s,t,n!==void 0?n:s.custom,e)}const Xi=new Set(["width","height","top","left","right","bottom",...Ve]),ns=30,nl=e=>!isNaN(parseFloat(e));class sl{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=z.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=z.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=nl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new fn);const s=this.events[t].add(n);return t==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ns)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ns);return mi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pe(e,t){return new sl(e,t)}const Xt=e=>Array.isArray(e);function il(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function rl(e){return Xt(e)?e[e.length-1]||0:e}function al(e,t){const n=ge(e,t);let{transitionEnd:s={},transition:i={},...a}=n||{};a={...a,...s};for(const r in a){const o=rl(a[r]);il(e,r,o)}}const H=e=>!!(e&&e.getVelocity);function ol(e){return!!(H(e)&&e.add)}function Yt(e,t){const n=e.getValue("willChange");if(ol(n))return n.add(t);if(!n&&ae.WillChange){const s=new ae.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function En(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ll="framerAppearId",Yi="data-"+En(ll);function Qi(e){return e.props[Yi]}function cl({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Ji(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:a,transitionEnd:r,...o}=t;const u=e.getDefaultTransition();a=a?qi(a,u):u;const d=a?.reduceMotion;s&&(a=s);const c=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const f in o){const p=e.getValue(f,e.latestValues[f]??null),g=o[f];if(g===void 0||h&&cl(h,f))continue;const x={delay:n,...Tn(a||{},f)},v=p.get();if(v!==void 0&&!p.isAnimating()&&!Array.isArray(g)&&g===v&&!x.velocity){C.update(()=>p.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const A=Qi(e);if(A){const S=window.MotionHandoffAnimation(A,f,C);S!==null&&(x.startTime=S,b=!0)}}Yt(e,f);const y=d??e.shouldReduceMotion;p.start(Sn(f,p,g,y&&Xi.has(f)?{type:!1}:x,e,b));const w=p.animation;w&&c.push(w)}if(r){const f=()=>C.update(()=>{r&&al(e,r)});c.length?Promise.all(c).then(f):f()}return c}function Qt(e,t,n={}){const s=ge(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const a=s?()=>Promise.all(Ji(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:h}=i;return ul(e,t,u,d,c,h,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[u,d]=o==="beforeChildren"?[a,r]:[r,a];return u().then(()=>d())}else return Promise.all([a(),r(n.delay)])}function ul(e,t,n=0,s=0,i=0,a=1,r){const o=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),o.push(Qt(u,t,{...r,delay:n+(typeof s=="function"?0:s)+Gi(e.variantChildren,u,s,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(o)}function dl(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(a=>Qt(e,a,n));s=Promise.all(i)}else if(typeof t=="string")s=Qt(e,t,n);else{const i=typeof t=="function"?ge(e,t,n.custom):t;s=Promise.all(Ji(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const hl={test:e=>e==="auto",parse:e=>e},er=e=>t=>t.test(e),tr=[Ee,T,ne,ie,Ba,Na,hl],ss=e=>tr.find(er(e));function fl(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hi(e):!0}const ml=new Set(["brightness","contrast","saturate","opacity"]);function pl(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(yn)||[];if(!s)return e;const i=n.replace(s,"");let a=ml.has(t)?1:0;return s!==n&&(a*=100),t+"("+a+i+")"}const gl=/\b([a-z-]*)\(.*?\)/gu,Jt={...Q,getAnimatableNone:e=>{const t=e.match(gl);return t?t.map(pl).join(" "):e}},en={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},is={...Ee,transform:Math.round},yl={rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:ie,skewX:ie,skewY:ie,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Ze,originX:$n,originY:$n,originZ:T},Vn={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,...yl,zIndex:is,fillOpacity:Ze,strokeOpacity:Ze,numOctaves:is},xl={...Vn,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Jt,WebkitFilter:Jt,mask:en,WebkitMask:en},nr=e=>xl[e],vl=new Set([Jt,en]);function sr(e,t){let n=nr(e);return vl.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bl=new Set(["auto","none","0"]);function wl(e,t,n){let s=0,i;for(;s<e.length&&!i;){const a=e[s];typeof a=="string"&&!bl.has(a)&&Se(a).values.length&&(i=e[s]),s++}if(i&&n)for(const a of t)e[a]=sr(n,i)}class Al extends An{constructor(t,n,s,i,a){super(t,n,s,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let h=t[c];if(typeof h=="string"&&(h=h.trim(),gn(h))){const f=_i(h,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Xi.has(s)||t.length!==2)return;const[i,a]=t,r=ss(i),o=ss(a),u=Un(i),d=Un(a);if(u!==d&&re[s]){this.needsMeasurement=!0;return}if(r!==o)if(Qn(r)&&Qn(o))for(let c=0;c<t.length;c++){const h=t[c];typeof h=="string"&&(t[c]=parseFloat(h))}else re[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||fl(t[i]))&&s.push(i);s.length&&wl(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=re[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=s.length-1,r=s[a];s[a]=re[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,u])=>{t.getValue(o).set(u)}),this.resolveNoneKeyframes()}}function ir(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(s=>s!=null)}const rr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Qe(e){return di(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Mn}=Pi(queueMicrotask,!1),Y={x:!1,y:!1};function ar(){return Y.x||Y.y}function Tl(e){return e==="x"||e==="y"?Y[e]?null:(Y[e]=!0,()=>{Y[e]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}function or(e,t){const n=ir(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function Sl(e){return!(e.pointerType==="touch"||ar())}function Pl(e,t,n={}){const[s,i,a]=or(e,n);return s.forEach(r=>{let o=!1,u=!1,d;const c=()=>{r.removeEventListener("pointerleave",g)},h=v=>{d&&(d(v),d=void 0),c()},f=v=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(v))},p=()=>{o=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},g=v=>{if(v.pointerType!=="touch"){if(o){u=!0;return}h(v)}},x=v=>{if(!Sl(v))return;u=!1;const b=t(r,v);typeof b=="function"&&(d=b,r.addEventListener("pointerleave",g,i))};r.addEventListener("pointerenter",x,i),r.addEventListener("pointerdown",p,i)}),a}const lr=(e,t)=>t?e===t?!0:lr(e,t.parentElement):!1,Cn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,El=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vl(e){return El.has(e.tagName)||e.isContentEditable===!0}const Ml=new Set(["INPUT","SELECT","TEXTAREA"]);function Cl(e){return Ml.has(e.tagName)||e.isContentEditable===!0}const Je=new WeakSet;function rs(e){return t=>{t.key==="Enter"&&e(t)}}function Mt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ll=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=rs(()=>{if(Je.has(n))return;Mt(n,"down");const i=rs(()=>{Mt(n,"up")}),a=()=>Mt(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function as(e){return Cn(e)&&!ar()}const os=new WeakSet;function Dl(e,t,n={}){const[s,i,a]=or(e,n),r=o=>{const u=o.currentTarget;if(!as(o)||os.has(o))return;Je.add(u),n.stopPropagation&&os.add(o);const d=t(u,o),c=(p,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Je.has(u)&&Je.delete(u),as(p)&&typeof d=="function"&&d(p,{success:g})},h=p=>{c(p,u===window||u===document||n.useGlobalTarget||lr(u,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",r,i),Qe(o)&&(o.addEventListener("focus",d=>Ll(d,i)),!Vl(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function Ln(e){return di(e)&&"ownerSVGElement"in e}const et=new WeakMap;let tt;const cr=(e,t,n)=>(s,i)=>i&&i[0]?i[0][e+"Size"]:Ln(s)&&"getBBox"in s?s.getBBox()[t]:s[n],kl=cr("inline","width","offsetWidth"),Rl=cr("block","height","offsetHeight");function jl({target:e,borderBoxSize:t}){et.get(e)?.forEach(n=>{n(e,{get width(){return kl(e,t)},get height(){return Rl(e,t)}})})}function Fl(e){e.forEach(jl)}function Nl(){typeof ResizeObserver>"u"||(tt=new ResizeObserver(Fl))}function Bl(e,t){tt||Nl();const n=ir(e);return n.forEach(s=>{let i=et.get(s);i||(i=new Set,et.set(s,i)),i.add(t),tt?.observe(s)}),()=>{n.forEach(s=>{const i=et.get(s);i?.delete(t),i?.size||tt?.unobserve(s)})}}const nt=new Set;let we;function Zl(){we=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};nt.forEach(t=>t(e))},window.addEventListener("resize",we)}function Il(e){return nt.add(e),we||Zl(),()=>{nt.delete(e),!nt.size&&typeof we=="function"&&(window.removeEventListener("resize",we),we=void 0)}}function ls(e,t){return typeof e=="function"?Il(e):Bl(e,t)}function Hl(e){return Ln(e)&&e.tagName==="svg"}const Ol=[...tr,F,Q],zl=e=>Ol.find(er(e)),cs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ae=()=>({x:cs(),y:cs()}),us=()=>({min:0,max:0}),B=()=>({x:us(),y:us()}),Ul=new WeakMap;function xt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ie(e){return typeof e=="string"||Array.isArray(e)}const Dn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kn=["initial",...Dn];function vt(e){return xt(e.animate)||kn.some(t=>Ie(e[t]))}function ur(e){return!!(vt(e)||e.variants)}function $l(e,t,n){for(const s in t){const i=t[s],a=n[s];if(H(i))e.addValue(s,i);else if(H(a))e.addValue(s,Pe(i,{owner:e}));else if(a!==i)if(e.hasValue(s)){const r=e.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(s);e.addValue(s,Pe(r!==void 0?r:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const tn={current:null},dr={current:!1},Wl=typeof window<"u";function Kl(){if(dr.current=!0,!!Wl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tn.current=e.matches;e.addEventListener("change",t),t()}else tn.current=!1}const ds=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ht={};function hr(e){ht=e}function Gl(){return ht}class _l{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:r,visualState:o},u={}){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=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=z.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,C.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=o;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!r,this.isControllingVariants=vt(n),this.isVariantNode=ur(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];d[p]!==void 0&&H(g)&&g.set(d[p])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,Ul.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(dr.current||Kl(),this.shouldReduceMotion=tn.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),oe(this.notifyUpdate),oe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Ki.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:o,times:u,ease:d,duration:c}=n.accelerate,h=new $i({element:this.current,name:t,keyframes:o,times:u,ease:d,duration:$(c)}),f=r(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const s=Me.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ht){const n=ht[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ds.length;s++){const i=ds[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,r=t[a];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=$l(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(ui(s)||hi(s))?s=parseFloat(s):!zl(s)&&Q.test(n)&&(s=sr(t,n)),this.setBaseTarget(t,H(s)?s.get():s)),H(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const a=Pn(this.props,n,this.presenceContext?.custom);a&&(s=a[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!H(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Mn.render(this.render)}}class fr extends _l{constructor(){super(...arguments),this.KeyframeResolver=Al}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class le{constructor(t){this.isMounted=!1,this.node=t}update(){}}function mr({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function ql({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xl(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ct(e){return e===void 0||e===1}function nn({scale:e,scaleX:t,scaleY:n}){return!Ct(e)||!Ct(t)||!Ct(n)}function de(e){return nn(e)||pr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function pr(e){return hs(e.x)||hs(e.y)}function hs(e){return e&&e!=="0%"}function ft(e,t,n){const s=e-n,i=t*s;return n+i}function fs(e,t,n,s,i){return i!==void 0&&(e=ft(e,i,s)),ft(e,n,s)+t}function sn(e,t=0,n=1,s,i){e.min=fs(e.min,t,n,s,i),e.max=fs(e.max,t,n,s,i)}function gr(e,{x:t,y:n}){sn(e.x,t.translate,t.scale,t.originPoint),sn(e.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,ps=1.0000000000001;function Yl(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,r;for(let o=0;o<i;o++){a=n[o],r=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(te(e.x,-a.scroll.offset.x),te(e.y,-a.scroll.offset.y)),r&&(t.x*=r.x.scale,t.y*=r.y.scale,gr(e,r)),s&&de(a.latestValues)&&st(e,a.latestValues,a.layout?.layoutBox))}t.x<ps&&t.x>ms&&(t.x=1),t.y<ps&&t.y>ms&&(t.y=1)}function te(e,t){e.min+=t,e.max+=t}function gs(e,t,n,s,i=.5){const a=D(e.min,e.max,i);sn(e,t,n,a,s)}function ys(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function st(e,t,n){const s=n??e;gs(e.x,ys(t.x,s.x),t.scaleX,t.scale,t.originX),gs(e.y,ys(t.y,s.y),t.scaleY,t.scale,t.originY)}function yr(e,t){return mr(Xl(e.getBoundingClientRect(),t))}function Ql(e,t,n){const s=yr(e,n),{scroll:i}=t;return i&&(te(s.x,i.offset.x),te(s.y,i.offset.y)),s}const Jl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},e0=Ve.length;function t0(e,t,n){let s="",i=!0;for(let a=0;a<e0;a++){const r=Ve[a],o=e[r];if(o===void 0)continue;let u=!0;if(typeof o=="number")u=o===(r.startsWith("scale")?1:0);else{const d=parseFloat(o);u=r.startsWith("scale")?d===1:d===0}if(!u||n){const d=rr(o,Vn[r]);if(!u){i=!1;const c=Jl[r]||r;s+=`${c}(${d}) `}n&&(t[r]=d)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Rn(e,t,n){const{style:s,vars:i,transformOrigin:a}=e;let r=!1,o=!1;for(const u in t){const d=t[u];if(Me.has(u)){r=!0;continue}else if(Vi(u)){i[u]=d;continue}else{const c=rr(d,Vn[u]);u.startsWith("origin")?(o=!0,a[u]=c):s[u]=c}}if(t.transform||(r||n?s.transform=t0(t,e.transform,n):s.transform&&(s.transform="none")),o){const{originX:u="50%",originY:d="50%",originZ:c=0}=a;s.transformOrigin=`${u} ${d} ${c}`}}function xr(e,{style:t,vars:n},s,i){const a=e.style;let r;for(r in t)a[r]=t[r];i?.applyProjectionStyles(a,s);for(r in n)a.setProperty(r,n[r])}function xs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ce={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;const n=xs(e,t.target.x),s=xs(e,t.target.y);return`${n}% ${s}%`}},n0={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Q.parse(e);if(i.length>5)return s;const a=Q.createTransformer(e),r=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;i[0+r]/=o,i[1+r]/=u;const d=D(o,u,.5);return typeof i[2+r]=="number"&&(i[2+r]/=d),typeof i[3+r]=="number"&&(i[3+r]/=d),a(i)}},rn={borderRadius:{...Ce,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomLeftRadius:Ce,borderBottomRightRadius:Ce,boxShadow:n0};function vr(e,{layout:t,layoutId:n}){return Me.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!rn[e]||e==="opacity")}function jn(e,t,n){const s=e.style,i=t?.style,a={};if(!s)return a;for(const r in s)(H(s[r])||i&&H(i[r])||vr(r,e)||n?.getValue(r)?.liveStyle!==void 0)&&(a[r]=s[r]);return a}function s0(e){return window.getComputedStyle(e)}class i0 extends fr{constructor(){super(...arguments),this.type="html",this.renderInstance=xr}readValueFromInstance(t,n){if(Me.has(n))return this.projection?.isProjecting?$t(n):So(t,n);{const s=s0(t),i=(Vi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return yr(t,n)}build(t,n,s){Rn(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return jn(t,n,s)}}const r0={offset:"stroke-dashoffset",array:"stroke-dasharray"},a0={offset:"strokeDashoffset",array:"strokeDasharray"};function o0(e,t,n=1,s=0,i=!0){e.pathLength=1;const a=i?r0:a0;e[a.offset]=`${-s}`,e[a.array]=`${t} ${n}`}const l0=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function br(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...o},u,d,c){if(Rn(e,o,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const p of l0)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&o0(h,i,a,r,!1)}const wr=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"]),Ar=e=>typeof e=="string"&&e.toLowerCase()==="svg";function c0(e,t,n,s){xr(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(wr.has(i)?i:En(i),t.attrs[i])}function Tr(e,t,n){const s=jn(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const a=Ve.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[a]=e[i]}return s}class u0 extends fr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Me.has(n)){const s=nr(n);return s&&s.default||0}return n=wr.has(n)?n:En(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Tr(t,n,s)}build(t,n,s){br(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){c0(t,n,s,i)}mount(t){this.isSVGTag=Ar(t.tagName),super.mount(t)}}const d0=kn.length;function Sr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Sr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<d0;n++){const s=kn[n],i=e.props[s];(Ie(i)||i===!1)&&(t[s]=i)}return t}function Pr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const h0=[...Dn].reverse(),f0=Dn.length;function m0(e){return t=>Promise.all(t.map(({animation:n,options:s})=>dl(e,n,s)))}function p0(e){let t=m0(e),n=vs(),s=!0,i=!1;const a=d=>(c,h)=>{const f=ge(e,h,d==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:g,...x}=f;c={...c,...x,...g}}return c};function r(d){t=d(e)}function o(d){const{props:c}=e,h=Sr(e.parent)||{},f=[],p=new Set;let g={},x=1/0;for(let b=0;b<f0;b++){const y=h0[b],w=n[y],A=c[y]!==void 0?c[y]:h[y],S=Ie(A),M=y===d?w.isActive:null;M===!1&&(x=b);let j=A===h[y]&&A!==c[y]&&S;if(j&&(s||i)&&e.manuallyAnimateOnMount&&(j=!1),w.protectedKeys={...g},!w.isActive&&M===null||!A&&!w.prevProp||xt(A)||typeof A=="boolean")continue;if(y==="exit"&&w.isActive&&M!==!0){w.prevResolvedValues&&(g={...g,...w.prevResolvedValues});continue}const E=g0(w.prevProp,A);let V=E||y===d&&w.isActive&&!j&&S||b>x&&S,P=!1;const L=Array.isArray(A)?A:[A];let N=L.reduce(a(y),{});M===!1&&(N={});const{prevResolvedValues:q={}}=w,k={...q,...N},O=Z=>{V=!0,p.has(Z)&&(P=!0,p.delete(Z)),w.needsAnimating[Z]=!0;const W=e.getValue(Z);W&&(W.liveStyle=!1)};for(const Z in k){const W=N[Z],ce=q[Z];if(g.hasOwnProperty(Z))continue;let ye=!1;Xt(W)&&Xt(ce)?ye=!Pr(W,ce):ye=W!==ce,ye?W!=null?O(Z):p.add(Z):W!==void 0&&p.has(Z)?O(Z):w.protectedKeys[Z]=!0}w.prevProp=A,w.prevResolvedValues=N,w.isActive&&(g={...g,...N}),(s||i)&&e.blockInitialAnimation&&(V=!1);const J=j&&E;V&&(!J||P)&&f.push(...L.map(Z=>{const W={type:y};if(typeof Z=="string"&&(s||i)&&!J&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,ye=ge(ce,Z);if(ce.enteringChildren&&ye){const{delayChildren:oa}=ye.transition||{};W.delay=Gi(ce.enteringChildren,e,oa)}}return{animation:Z,options:W}}))}if(p.size){const b={};if(typeof c.initial!="boolean"){const y=ge(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(b.transition=y.transition)}p.forEach(y=>{const w=e.getBaseTarget(y),A=e.getValue(y);A&&(A.liveStyle=!0),b[y]=w??null}),f.push({animation:b})}let v=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),s=!1,i=!1,v?t(f):Promise.resolve()}function u(d,c){if(n[d].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(d,c)),n[d].isActive=c;const h=o(d);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:u,setAnimateFunction:r,getState:()=>n,reset:()=>{n=vs(),i=!0}}}function g0(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Pr(t,e):!1}function ue(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vs(){return{animate:ue(!0),whileInView:ue(),whileHover:ue(),whileTap:ue(),whileDrag:ue(),whileFocus:ue(),exit:ue()}}function an(e,t){e.min=t.min,e.max=t.max}function X(e,t){an(e.x,t.x),an(e.y,t.y)}function bs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Er=1e-4,y0=1-Er,x0=1+Er,Vr=.01,v0=0-Vr,b0=0+Vr;function U(e){return e.max-e.min}function w0(e,t,n){return Math.abs(e-t)<=n}function ws(e,t,n,s=.5){e.origin=s,e.originPoint=D(t.min,t.max,e.origin),e.scale=U(n)/U(t),e.translate=D(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y0&&e.scale<=x0||isNaN(e.scale))&&(e.scale=1),(e.translate>=v0&&e.translate<=b0||isNaN(e.translate))&&(e.translate=0)}function Fe(e,t,n,s){ws(e.x,t.x,n.x,s?s.originX:void 0),ws(e.y,t.y,n.y,s?s.originY:void 0)}function As(e,t,n,s=0){const i=s?D(n.min,n.max,s):n.min;e.min=i+t.min,e.max=e.min+U(t)}function A0(e,t,n,s){As(e.x,t.x,n.x,s?.x),As(e.y,t.y,n.y,s?.y)}function Ts(e,t,n,s=0){const i=s?D(n.min,n.max,s):n.min;e.min=t.min-i,e.max=e.min+U(t)}function mt(e,t,n,s){Ts(e.x,t.x,n.x,s?.x),Ts(e.y,t.y,n.y,s?.y)}function Ss(e,t,n,s,i){return e-=t,e=ft(e,1/n,s),i!==void 0&&(e=ft(e,1/i,s)),e}function T0(e,t=0,n=1,s=.5,i,a=e,r=e){if(ne.test(t)&&(t=parseFloat(t),t=D(r.min,r.max,t/100)-r.min),typeof t!="number")return;let o=D(a.min,a.max,s);e===a&&(o-=t),e.min=Ss(e.min,t,n,o,i),e.max=Ss(e.max,t,n,o,i)}function Ps(e,t,[n,s,i],a,r){T0(e,t[n],t[s],t[i],t.scale,a,r)}const S0=["x","scaleX","originX"],P0=["y","scaleY","originY"];function Es(e,t,n,s){Ps(e.x,t,S0,n?n.x:void 0,s?s.x:void 0),Ps(e.y,t,P0,n?n.y:void 0,s?s.y:void 0)}function Vs(e){return e.translate===0&&e.scale===1}function Mr(e){return Vs(e.x)&&Vs(e.y)}function Ms(e,t){return e.min===t.min&&e.max===t.max}function E0(e,t){return Ms(e.x,t.x)&&Ms(e.y,t.y)}function Cs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cr(e,t){return Cs(e.x,t.x)&&Cs(e.y,t.y)}function Ls(e){return U(e.x)/U(e.y)}function Ds(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ee(e){return[e("x"),e("y")]}function V0(e,t,n){let s="";const i=e.x.translate/t.x,a=e.y.translate/t.y,r=n?.z||0;if((i||a||r)&&(s=`translate3d(${i}px, ${a}px, ${r}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:c,rotateX:h,rotateY:f,skewX:p,skewY:g}=n;d&&(s=`perspective(${d}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),p&&(s+=`skewX(${p}deg) `),g&&(s+=`skewY(${g}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(s+=`scale(${o}, ${u})`),s||"none"}const Lr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],M0=Lr.length,ks=e=>typeof e=="string"?parseFloat(e):e,Rs=e=>typeof e=="number"||T.test(e);function C0(e,t,n,s,i,a){i?(e.opacity=D(0,n.opacity??1,L0(s)),e.opacityExit=D(t.opacity??1,0,D0(s))):a&&(e.opacity=D(t.opacity??1,n.opacity??1,s));for(let r=0;r<M0;r++){const o=Lr[r];let u=js(t,o),d=js(n,o);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||Rs(u)===Rs(d)?(e[o]=Math.max(D(ks(u),ks(d),s),0),(ne.test(d)||ne.test(u))&&(e[o]+="%")):e[o]=d}(t.rotate||n.rotate)&&(e.rotate=D(t.rotate||0,n.rotate||0,s))}function js(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const L0=Dr(0,.5,wi),D0=Dr(.5,.95,G);function Dr(e,t,n){return s=>s<e?0:s>t?1:n(Be(e,t,s))}function k0(e,t,n){const s=H(e)?e:Pe(e);return s.start(Sn("",s,t,n)),s.animation}function He(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const R0=(e,t)=>e.depth-t.depth;class j0{constructor(){this.children=[],this.isDirty=!1}add(t){dn(this.children,t),this.isDirty=!0}remove(t){ot(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(R0),this.isDirty=!1,this.children.forEach(t)}}function F0(e,t){const n=z.now(),s=({timestamp:i})=>{const a=i-n;a>=t&&(oe(s),e(a-t))};return C.setup(s,!0),()=>oe(s)}function it(e){return H(e)?e.get():e}class N0{constructor(){this.members=[]}add(t){dn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ot(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(ot(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:a}=t.options;(i===void 0||i!==a)&&(t.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const rt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Lt=["","X","Y","Z"],B0=1e3;let Z0=0;function Dt(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function kr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Qi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&kr(s)}function Rr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},o=t?.()){this.id=Z0++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(O0),this.nodes.forEach(G0),this.nodes.forEach(_0),this.nodes.forEach(z0)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new j0)}addEventListener(r,o){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new fn),this.eventHandlers.get(r).add(o)}notifyListeners(r,...o){const u=this.eventHandlers.get(r);u&&u.notify(...o)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ln(r)&&!Hl(r),this.instance=r;const{layoutId:o,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||o)&&(this.isLayoutDirty=!0),e){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;C.read(()=>{h=window.innerWidth}),e(r,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,c&&c(),c=F0(f,250),rt.hasAnimatedSinceResize&&(rt.hasAnimatedSinceResize=!1,this.nodes.forEach(Bs)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&d&&(o||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||J0,{onLayoutAnimationStart:x,onLayoutAnimationComplete:v}=d.getProps(),b=!this.targetLayout||!Cr(this.targetLayout,p),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Tn(g,"layout"),onPlay:x,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,y)}else h||Bs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),oe(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(q0),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&kr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:u}=this.options;if(o===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach($0),this.nodes.forEach(Fs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ns);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(W0),this.nodes.forEach(K0),this.nodes.forEach(I0),this.nodes.forEach(H0)):this.nodes.forEach(Ns),this.clearAllSnapshots();const o=z.now();I.delta=se(0,1e3/60,o-I.timestamp),I.timestamp=o,I.isProcessing=!0,At.update.process(I),At.preRender.process(I),At.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(U0),this.sharedNodes.forEach(X0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=B()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(o=!1),o&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Mr(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,c=d!==this.prevTransformTemplateValue;r&&this.instance&&(o||de(this.latestValues)||c)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const o=this.measurePageBox();let u=this.removeElementScroll(o);return r&&(u=this.removeTransform(u)),ec(u),{animationId:this.root.animationId,measuredBox:o,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return B();const o=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(tc))){const{scroll:d}=this.root;d&&(te(o.x,d.offset.x),te(o.y,d.offset.y))}return o}removeElementScroll(r){const o=B();if(X(o,r),this.scroll?.wasRoot)return o;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:h}=d;d!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&X(o,r),te(o.x,c.offset.x),te(o.y,c.offset.y))}return o}applyTransform(r,o=!1,u){const d=u||B();X(d,r);for(let c=0;c<this.path.length;c++){const h=this.path[c];!o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(te(d.x,-h.scroll.offset.x),te(d.y,-h.scroll.offset.y)),de(h.latestValues)&&st(d,h.latestValues,h.layout?.layoutBox)}return de(this.latestValues)&&st(d,this.latestValues,this.layout?.layoutBox),d}removeTransform(r){const o=B();X(o,r);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!de(d.latestValues))continue;let c;d.instance&&(nn(d.latestValues)&&d.updateSnapshot(),c=B(),X(c,d.measurePageBox())),Es(o,d.latestValues,d.snapshot?.layoutBox,c)}return de(this.latestValues)&&Es(o,this.latestValues),o}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==o;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),A0(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),gr(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||nn(this.parent.latestValues)||pr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,o,u){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),mt(this.relativeTargetOrigin,o,u,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),o=!!this.resumingFrom||this!==r;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===I.timestamp&&(u=!1),u)return;const{layout:d,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||!(d||c))return;X(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Yl(this.layoutCorrected,this.treeScale,this.path,o),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=B());const{target:p}=r;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bs(this.prevProjectionDelta.x,this.projectionDelta.x),bs(this.prevProjectionDelta.y,this.projectionDelta.y)),Fe(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ae(),this.projectionDelta=Ae(),this.projectionDeltaWithTransform=Ae()}setAnimationOrigin(r,o=!1){const u=this.snapshot,d=u?u.latestValues:{},c={...this.latestValues},h=Ae();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=B(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,x=p!==g,v=this.getStack(),b=!v||v.members.length<=1,y=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(Q0));this.animationProgress=0;let w;this.mixTargetDelta=A=>{const S=A/1e3;Zs(h.x,r.x,S),Zs(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Y0(this.relativeTarget,this.relativeTargetOrigin,f,S),w&&E0(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=B()),X(w,this.relativeTarget)),x&&(this.animationValues=c,C0(c,d,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(oe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{rt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pe(0)),this.motionValue.jump(0,!1),this.currentAnimation=k0(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),r.onUpdate&&r.onUpdate(o)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(B0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:o,target:u,layout:d,latestValues:c}=r;if(!(!o||!u||!d)){if(this!==r&&this.layout&&d&&jr(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||B();const h=U(this.layout.layoutBox.x);u.x.min=r.target.x.min,u.x.max=u.x.min+h;const f=U(this.layout.layoutBox.y);u.y.min=r.target.y.min,u.y.max=u.y.min+f}X(o,u),st(o,c),Fe(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(r,o){this.sharedNodes.has(r)||this.sharedNodes.set(r,new N0),this.sharedNodes.get(r).add(o);const d=o.options.initialPromotionConfig;o.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(o):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:o,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),r&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let o=!1;const{latestValues:u}=r;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const d={};u.z&&Dt("z",r,d,this.animationValues);for(let c=0;c<Lt.length;c++)Dt(`rotate${Lt[c]}`,r,d,this.animationValues),Dt(`skew${Lt[c]}`,r,d,this.animationValues);r.render();for(const c in d)r.setStaticValue(c,d[c]),this.animationValues&&(this.animationValues[c]=d[c]);r.scheduleRender()}applyProjectionStyles(r,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=it(o?.pointerEvents)||"",r.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=it(o?.pointerEvents)||""),this.hasProjected&&!de(this.latestValues)&&(r.transform=u?u({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=V0(this.projectionDeltaWithTransform,this.treeScale,c);u&&(h=u(c,h)),r.transform=h;const{x:f,y:p}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?r.opacity=d===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=d===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in rn){if(c[g]===void 0)continue;const{correct:x,applyTo:v,isCSSVariable:b}=rn[g],y=h==="none"?c[g]:x(c[g],d);if(v){const w=v.length;for(let A=0;A<w;A++)r[v[A]]=y}else b?this.options.visualElement.renderState.vars[g]=y:r[g]=y}this.options.layoutId&&(r.pointerEvents=d===this?it(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Fs),this.root.sharedNodes.clear()}}}function I0(e){e.updateLayout()}function H0(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i==="size")ee(c=>{const h=a?t.measuredBox[c]:t.layoutBox[c],f=U(h);h.min=n[c].min,h.max=h.min+f});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";an(a?t.measuredBox[c]:t.layoutBox[c],n[c])}else jr(i,t.layoutBox,n)&&ee(c=>{const h=a?t.measuredBox[c]:t.layoutBox[c],f=U(n[c]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const r=Ae();Fe(r,n,t.layoutBox);const o=Ae();a?Fe(o,e.applyTransform(s,!0),t.measuredBox):Fe(o,n,t.layoutBox);const u=!Mr(r);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const p=e.options.layoutAnchor||void 0,g=B();mt(g,t.layoutBox,h.layoutBox,p);const x=B();mt(x,n,f.layoutBox,p),Cr(g,x)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function O0(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function z0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function U0(e){e.clearSnapshot()}function Fs(e){e.clearMeasurements()}function $0(e){e.isLayoutDirty=!0,e.updateLayout()}function Ns(e){e.isLayoutDirty=!1}function W0(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function K0(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function G0(e){e.resolveTargetDelta()}function _0(e){e.calcProjection()}function q0(e){e.resetSkewAndRotation()}function X0(e){e.removeLeadSnapshot()}function Zs(e,t,n){e.translate=D(t.translate,0,n),e.scale=D(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Is(e,t,n,s){e.min=D(t.min,n.min,s),e.max=D(t.max,n.max,s)}function Y0(e,t,n,s){Is(e.x,t.x,n.x,s),Is(e.y,t.y,n.y,s)}function Q0(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const J0={duration:.45,ease:[.4,0,.1,1]},Hs=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Os=Hs("applewebkit/")&&!Hs("chrome/")?Math.round:G;function zs(e){e.min=Os(e.min),e.max=Os(e.max)}function ec(e){zs(e.x),zs(e.y)}function jr(e,t,n){return e==="position"||e==="preserve-aspect"&&!w0(Ls(t),Ls(n),.2)}function tc(e){return e!==e.root&&e.scroll?.wasRoot}const nc=Rr({attachResizeListener:(e,t)=>He(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),kt={current:void 0},Fr=Rr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!kt.current){const e=new nc({});e.mount(window),e.setOptions({layoutScroll:!0}),kt.current=e}return kt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Fn=l.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Us(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sc(...e){return t=>{let n=!1;const s=e.map(i=>{const a=Us(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():Us(e[i],null)}}}}function ic(...e){return l.useCallback(sc(...e),e)}class rc extends l.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Qe(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=Qe(s)&&s.offsetWidth||0,a=Qe(s)&&s.offsetHeight||0,r=getComputedStyle(n),o=this.props.sizeRef.current;o.height=parseFloat(r.height),o.width=parseFloat(r.width),o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=a-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function ac({children:e,isPresent:t,anchorX:n,anchorY:s,root:i,pop:a}){const r=l.useId(),o=l.useRef(null),u=l.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=l.useContext(Fn),c=e.props?.ref??e?.ref,h=ic(o,c);return l.useInsertionEffect(()=>{const{width:f,height:p,top:g,left:x,right:v,bottom:b}=u.current;if(t||a===!1||!o.current||!f||!p)return;const y=n==="left"?`left: ${x}`:`right: ${v}`,w=s==="bottom"?`bottom: ${b}`:`top: ${g}`;o.current.dataset.motionPopId=r;const A=document.createElement("style");d&&(A.nonce=d);const S=i??document.head;return S.appendChild(A),A.sheet&&A.sheet.insertRule(`
1
+ import{j as m}from"./radix-ui-Zb8sVEtn.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{bt as la,bu as ca,Y as wt,a as li,bv as ua,bi as Zn,bk as In,d as xe,n as da,c as Te,L as We,I as Hn,aI as On,M as ha,N as fa,O as ma}from"./index-CFM8uP-r.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./icons-Dmi9qMuE.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function pa(e,t){return{claude:{...e.claude,...t.claude},codex:{...e.codex,...t.codex}}}function ga(){const{state:e}=la(),t=ca(),n=l.useCallback(async()=>{try{t.setBrowserLoading(!0),t.setBrowserError(null);const a=await wt.browser.get();t.setBrowserConfig(a.config),t.setBrowserStatus(a.status)}catch(a){t.setBrowserError(a.message)}finally{t.setBrowserLoading(!1),t.setBrowserStatusLoading(!1)}},[t]),s=l.useCallback(async()=>{try{t.setBrowserStatusLoading(!0),t.setBrowserError(null);const a=await wt.browser.getStatus();return t.setBrowserStatus(a),a}catch(a){return t.setBrowserError(a.message),null}finally{t.setBrowserStatusLoading(!1)}},[t]),i=l.useCallback(async a=>{const r=e.browserConfig;if(!r)return!1;const o=pa(r,a);t.setBrowserConfig(o);try{t.setBrowserSaving(!0),t.setBrowserError(null);const u=await wt.browser.update(a);return t.setBrowserConfig(u.browser.config),t.setBrowserStatus(u.browser.status),t.setBrowserSuccess(!0),window.setTimeout(()=>t.setBrowserSuccess(!1),1500),!0}catch(u){return t.setBrowserConfig(r),t.setBrowserError(u.message),!1}finally{t.setBrowserSaving(!1)}},[t,e.browserConfig]);return{config:e.browserConfig,status:e.browserStatus,loading:e.browserLoading,statusLoading:e.browserStatusLoading,saving:e.browserSaving,error:e.browserError,success:e.browserSuccess,fetchConfig:n,fetchStatus:s,saveConfig:i}}const cn=l.createContext({});function un(e){const t=l.useRef(null);return t.current===null&&(t.current=e()),t.current}const ya=typeof window<"u",ci=ya?l.useLayoutEffect:l.useEffect,gt=l.createContext(null);function dn(e,t){e.indexOf(t)===-1&&e.push(t)}function ot(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const se=(e,t,n)=>n>t?t:n<e?e:n;let hn=()=>{};const ae={},ui=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function di(e){return typeof e=="object"&&e!==null}const hi=e=>/^0[^.\s]+$/u.test(e);function fi(e){let t;return()=>(t===void 0&&(t=e()),t)}const G=e=>e,xa=(e,t)=>n=>t(e(n)),Oe=(...e)=>e.reduce(xa),Be=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class fn{constructor(){this.subscriptions=[]}add(t){return dn(this.subscriptions,t),()=>ot(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let a=0;a<i;a++){const r=this.subscriptions[a];r&&r(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,K=e=>e/1e3;function mi(e,t){return t?e*(1e3/t):0}const pi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,va=1e-7,ba=12;function wa(e,t,n,s,i){let a,r,o=0;do r=t+(n-t)/2,a=pi(r,s,i)-e,a>0?n=r:t=r;while(Math.abs(a)>va&&++o<ba);return r}function ze(e,t,n,s){if(e===t&&n===s)return G;const i=a=>wa(a,0,1,e,n);return a=>a===0||a===1?a:pi(i(a),t,s)}const gi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yi=e=>t=>1-e(1-t),xi=ze(.33,1.53,.69,.99),mn=yi(xi),vi=gi(mn),bi=e=>e>=1?1:(e*=2)<1?.5*mn(e):.5*(2-Math.pow(2,-10*(e-1))),pn=e=>1-Math.sin(Math.acos(e)),wi=yi(pn),Ai=gi(pn),Aa=ze(.42,0,1,1),Ta=ze(0,0,.58,1),Ti=ze(.42,0,.58,1),Sa=e=>Array.isArray(e)&&typeof e[0]!="number",Si=e=>Array.isArray(e)&&typeof e[0]=="number",Pa={linear:G,easeIn:Aa,easeInOut:Ti,easeOut:Ta,circIn:pn,circInOut:Ai,circOut:wi,backIn:mn,backInOut:vi,backOut:xi,anticipate:bi},Ea=e=>typeof e=="string",zn=e=>{if(Si(e)){hn(e.length===4);const[t,n,s,i]=e;return ze(t,n,s,i)}else if(Ea(e))return Pa[e];return e},Ke=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Va(e,t){let n=new Set,s=new Set,i=!1,a=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(c){r.has(c)&&(d.schedule(c),e()),c(o)}const d={schedule:(c,h=!1,f=!1)=>{const g=f&&i?n:s;return h&&r.add(c),g.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(o=c,i){a=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(u),n.clear(),i=!1,a&&(a=!1,d.process(c))}};return d}const Ma=40;function Pi(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,r=Ke.reduce((w,A)=>(w[A]=Va(a),w),{}),{setup:o,read:u,resolveKeyframes:d,preUpdate:c,update:h,preRender:f,render:p,postRender:g}=r,x=()=>{const w=ae.useManualTiming,A=w?i.timestamp:performance.now();n=!1,w||(i.delta=s?1e3/60:Math.max(Math.min(A-i.timestamp,Ma),1)),i.timestamp=A,i.isProcessing=!0,o.process(i),u.process(i),d.process(i),c.process(i),h.process(i),f.process(i),p.process(i),g.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(x))},v=()=>{n=!0,s=!0,i.isProcessing||e(x)};return{schedule:Ke.reduce((w,A)=>{const S=r[A];return w[A]=(M,j=!1,E=!1)=>(n||v(),S.schedule(M,j,E)),w},{}),cancel:w=>{for(let A=0;A<Ke.length;A++)r[Ke[A]].cancel(w)},state:i,steps:r}}const{schedule:C,cancel:oe,state:I,steps:At}=Pi(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Ye;function Ca(){Ye=void 0}const z={now:()=>(Ye===void 0&&z.set(I.isProcessing||ae.useManualTiming?I.timestamp:performance.now()),Ye),set:e=>{Ye=e,queueMicrotask(Ca)}},Ei=e=>t=>typeof t=="string"&&t.startsWith(e),Vi=Ei("--"),La=Ei("var(--"),gn=e=>La(e)?Da.test(e.split("/*")[0].trim()):!1,Da=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Un(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ee={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ze={...Ee,transform:e=>se(0,1,e)},Ge={...Ee,default:1},Re=e=>Math.round(e*1e5)/1e5,yn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ka(e){return e==null}const Ra=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xn=(e,t)=>n=>!!(typeof n=="string"&&Ra.test(n)&&n.startsWith(e)||t&&!ka(n)&&Object.prototype.hasOwnProperty.call(n,t)),Mi=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,a,r,o]=s.match(yn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(r),alpha:o!==void 0?parseFloat(o):1}},ja=e=>se(0,255,e),Tt={...Ee,transform:e=>Math.round(ja(e))},fe={test:xn("rgb","red"),parse:Mi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Tt.transform(e)+", "+Tt.transform(t)+", "+Tt.transform(n)+", "+Re(Ze.transform(s))+")"};function Fa(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Zt={test:xn("#"),parse:Fa,transform:fe.transform},Ue=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ie=Ue("deg"),ne=Ue("%"),T=Ue("px"),Na=Ue("vh"),Ba=Ue("vw"),$n={...ne,parse:e=>ne.parse(e)/100,transform:e=>ne.transform(e*100)},be={test:xn("hsl","hue"),parse:Mi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ne.transform(Re(t))+", "+ne.transform(Re(n))+", "+Re(Ze.transform(s))+")"},F={test:e=>fe.test(e)||Zt.test(e)||be.test(e),parse:e=>fe.test(e)?fe.parse(e):be.test(e)?be.parse(e):Zt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fe.transform(e):be.transform(e),getAnimatableNone:e=>{const t=F.parse(e);return t.alpha=0,F.transform(t)}},Za=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ia(e){return isNaN(e)&&typeof e=="string"&&(e.match(yn)?.length||0)+(e.match(Za)?.length||0)>0}const Ci="number",Li="color",Ha="var",Oa="var(",Wn="${}",za=/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 Se(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(za,u=>(F.test(u)?(s.color.push(a),i.push(Li),n.push(F.parse(u))):u.startsWith(Oa)?(s.var.push(a),i.push(Ha),n.push(u)):(s.number.push(a),i.push(Ci),n.push(parseFloat(u))),++a,Wn)).split(Wn);return{values:n,split:o,indexes:s,types:i}}function Ua(e){return Se(e).values}function Di({split:e,types:t}){const n=e.length;return s=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],s[a]!==void 0){const r=t[a];r===Ci?i+=Re(s[a]):r===Li?i+=F.transform(s[a]):i+=s[a]}return i}}function $a(e){return Di(Se(e))}const Wa=e=>typeof e=="number"?0:F.test(e)?F.getAnimatableNone(e):e,Ka=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Wa(e);function Ga(e){const t=Se(e);return Di(t)(t.values.map((s,i)=>Ka(s,t.split[i])))}const Q={test:Ia,parse:Ua,createTransformer:$a,getAnimatableNone:Ga};function St(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _a({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,a=0,r=0;if(!t)i=a=r=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;i=St(u,o,e+1/3),a=St(u,o,e),r=St(u,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:s}}function lt(e,t){return n=>n>0?t:e}const D=(e,t,n)=>e+(t-e)*n,Pt=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},qa=[Zt,fe,be],Xa=e=>qa.find(t=>t.test(e));function Kn(e){const t=Xa(e);if(!t)return!1;let n=t.parse(e);return t===be&&(n=_a(n)),n}const Gn=(e,t)=>{const n=Kn(e),s=Kn(t);if(!n||!s)return lt(e,t);const i={...n};return a=>(i.red=Pt(n.red,s.red,a),i.green=Pt(n.green,s.green,a),i.blue=Pt(n.blue,s.blue,a),i.alpha=D(n.alpha,s.alpha,a),fe.transform(i))},It=new Set(["none","hidden"]);function Ya(e,t){return It.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Qa(e,t){return n=>D(e,t,n)}function vn(e){return typeof e=="number"?Qa:typeof e=="string"?gn(e)?lt:F.test(e)?Gn:to:Array.isArray(e)?ki:typeof e=="object"?F.test(e)?Gn:Ja:lt}function ki(e,t){const n=[...e],s=n.length,i=e.map((a,r)=>vn(a)(a,t[r]));return a=>{for(let r=0;r<s;r++)n[r]=i[r](a);return n}}function Ja(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=vn(e[i])(e[i],t[i]));return i=>{for(const a in s)n[a]=s[a](i);return n}}function eo(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],r=e.indexes[a][s[a]],o=e.values[r]??0;n[i]=o,s[a]++}return n}const to=(e,t)=>{const n=Q.createTransformer(t),s=Se(e),i=Se(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?It.has(e)&&!i.values.length||It.has(t)&&!s.values.length?Ya(e,t):Oe(ki(eo(s,i),i.values),n):lt(e,t)};function Ri(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?D(e,t,n):vn(e)(e,t)}const no=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>C.update(t,n),stop:()=>oe(t),now:()=>I.isProcessing?I.timestamp:z.now()}},ji=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)s+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ct=2e4;function bn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<ct;)t+=n,s=e.next(t);return t>=ct?1/0:t}function so(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(bn(s),ct);return{type:"keyframes",ease:a=>s.next(i*a).value/t,duration:K(i)}}const R={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 Ht(e,t){return e*Math.sqrt(1-t*t)}const io=12;function ro(e,t,n){let s=n;for(let i=1;i<io;i++)s=s-e(s)/t(s);return s}const Et=.001;function ao({duration:e=R.duration,bounce:t=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,a,r=1-t;r=se(R.minDamping,R.maxDamping,r),e=se(R.minDuration,R.maxDuration,K(e)),r<1?(i=d=>{const c=d*r,h=c*e,f=c-n,p=Ht(d,r),g=Math.exp(-h);return Et-f/p*g},a=d=>{const h=d*r*e,f=h*n+n,p=Math.pow(r,2)*Math.pow(d,2)*e,g=Math.exp(-h),x=Ht(Math.pow(d,2),r);return(-i(d)+Et>0?-1:1)*((f-p)*g)/x}):(i=d=>{const c=Math.exp(-d*e),h=(d-n)*e+1;return-Et+c*h},a=d=>{const c=Math.exp(-d*e),h=(n-d)*(e*e);return c*h});const o=5/e,u=ro(i,a,o);if(e=$(e),isNaN(u))return{stiffness:R.stiffness,damping:R.damping,duration:e};{const d=Math.pow(u,2)*s;return{stiffness:d,damping:r*2*Math.sqrt(s*d),duration:e}}}const oo=["duration","bounce"],lo=["stiffness","damping","mass"];function _n(e,t){return t.some(n=>e[n]!==void 0)}function co(e){let t={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...e};if(!_n(e,lo)&&_n(e,oo))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,a=2*se(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:R.mass,stiffness:i,damping:a}}else{const n=ao({...e,velocity:0});t={...t,...n,mass:R.mass},t.isResolvedFromDuration=!0}return t}function ut(e=R.visualDuration,t=R.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],o={done:!1,value:a},{stiffness:u,damping:d,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=co({...n,velocity:-K(n.velocity||0)}),g=f||0,x=d/(2*Math.sqrt(u*c)),v=r-a,b=K(Math.sqrt(u/c)),y=Math.abs(v)<5;s||(s=y?R.restSpeed.granular:R.restSpeed.default),i||(i=y?R.restDelta.granular:R.restDelta.default);let w,A,S,M,j,E;if(x<1)S=Ht(b,x),M=(g+x*b*v)/S,w=P=>{const L=Math.exp(-x*b*P);return r-L*(M*Math.sin(S*P)+v*Math.cos(S*P))},j=x*b*M+v*S,E=x*b*v-M*S,A=P=>Math.exp(-x*b*P)*(j*Math.sin(S*P)+E*Math.cos(S*P));else if(x===1){w=L=>r-Math.exp(-b*L)*(v+(g+b*v)*L);const P=g+b*v;A=L=>Math.exp(-b*L)*(b*P*L-g)}else{const P=b*Math.sqrt(x*x-1);w=k=>{const O=Math.exp(-x*b*k),J=Math.min(P*k,300);return r-O*((g+x*b*v)*Math.sinh(J)+P*v*Math.cosh(J))/P};const L=(g+x*b*v)/P,N=x*b*L-v*P,q=x*b*v-L*P;A=k=>{const O=Math.exp(-x*b*k),J=Math.min(P*k,300);return O*(N*Math.sinh(J)+q*Math.cosh(J))}}const V={calculatedDuration:p&&h||null,velocity:P=>$(A(P)),next:P=>{if(!p&&x<1){const N=Math.exp(-x*b*P),q=Math.sin(S*P),k=Math.cos(S*P),O=r-N*(M*q+v*k),J=$(N*(j*q+E*k));return o.done=Math.abs(J)<=s&&Math.abs(r-O)<=i,o.value=o.done?r:O,o}const L=w(P);if(p)o.done=P>=h;else{const N=$(A(P));o.done=Math.abs(N)<=s&&Math.abs(r-L)<=i}return o.value=o.done?r:L,o},toString:()=>{const P=Math.min(bn(V),ct),L=ji(N=>V.next(P*N).value,P,30);return P+"ms "+L},toTransition:()=>{}};return V}ut.applyToOptions=e=>{const t=so(e,100,ut);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const uo=5;function Fi(e,t,n){const s=Math.max(t-uo,0);return mi(n-e(s),t-s)}function Ot({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:r,min:o,max:u,restDelta:d=.5,restSpeed:c}){const h=e[0],f={done:!1,value:h},p=E=>o!==void 0&&E<o||u!==void 0&&E>u,g=E=>o===void 0?u:u===void 0||Math.abs(o-E)<Math.abs(u-E)?o:u;let x=n*t;const v=h+x,b=r===void 0?v:r(v);b!==v&&(x=b-h);const y=E=>-x*Math.exp(-E/s),w=E=>b+y(E),A=E=>{const V=y(E),P=w(E);f.done=Math.abs(V)<=d,f.value=f.done?b:P};let S,M;const j=E=>{p(f.value)&&(S=E,M=ut({keyframes:[f.value,g(f.value)],velocity:Fi(w,E,f.value),damping:i,stiffness:a,restDelta:d,restSpeed:c}))};return j(0),{calculatedDuration:null,next:E=>{let V=!1;return!M&&S===void 0&&(V=!0,A(E),j(E)),S!==void 0&&E>=S?M.next(E-S):(!V&&A(E),f)}}}function ho(e,t,n){const s=[],i=n||ae.mix||Ri,a=e.length-1;for(let r=0;r<a;r++){let o=i(e[r],e[r+1]);if(t){const u=Array.isArray(t)?t[r]||G:t;o=Oe(u,o)}s.push(o)}return s}function fo(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const a=e.length;if(hn(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=ho(t,s,i),u=o.length,d=c=>{if(r&&c<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(c<e[h+1]);h++);const f=Be(e[h],e[h+1],c);return o[h](f)};return n?c=>d(se(e[0],e[a-1],c)):d}function mo(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Be(0,t,s);e.push(D(n,1,i))}}function po(e){const t=[0];return mo(t,e.length-1),t}function go(e,t){return e.map(n=>n*t)}function yo(e,t){return e.map(()=>t||Ti).splice(0,e.length-1)}function je({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Sa(s)?s.map(zn):zn(s),a={done:!1,value:t[0]},r=go(n&&n.length===t.length?n:po(t),e),o=fo(r,t,{ease:Array.isArray(i)?i:yo(t,i)});return{calculatedDuration:e,next:u=>(a.value=o(u),a.done=u>=e,a)}}const xo=e=>e!==null;function yt(e,{repeat:t,repeatType:n="loop"},s,i=1){const a=e.filter(xo),o=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||s===void 0?a[o]:s}const vo={decay:Ot,inertia:Ot,tween:je,keyframes:je,spring:ut};function Ni(e){typeof e.type=="string"&&(e.type=vo[e.type])}class wn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const bo=e=>e/100;class dt extends wn{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=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ni(t);const{type:n=je,repeat:s=0,repeatDelay:i=0,repeatType:a,velocity:r=0}=t;let{keyframes:o}=t;const u=n||je;u!==je&&typeof o[0]!="number"&&(this.mixKeyframes=Oe(bo,Ri(o[0],o[1])),o=[0,100]);const d=u({...t,keyframes:o});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...o].reverse(),velocity:-r})),d.calculatedDuration===null&&(d.calculatedDuration=bn(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:a,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:p,type:g,onUpdate:x,finalKeyframe:v}=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)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,A=s;if(h){const E=Math.min(this.currentTime,i)/o;let V=Math.floor(E),P=E%1;!P&&E>=1&&(P=1),P===1&&V--,V=Math.min(V,h+1),!!(V%2)&&(f==="reverse"?(P=1-P,p&&(P-=p/o)):f==="mirror"&&(A=r)),w=se(0,1,P)*o}let S;y?(this.delayState.value=c[0],S=this.delayState):S=A.next(w),a&&!y&&(S.value=a(S.value));let{done:M}=S;!y&&u!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&g!==Ot&&(S.value=yt(c,this.options,v,this.speed)),x&&x(S.value),j&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+K(t)}get time(){return K(this.currentTime)}set time(t){t=$(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(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Fi(s=>this.generator.next(s).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=K(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=no,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function wo(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const me=e=>e*180/Math.PI,zt=e=>{const t=me(Math.atan2(e[1],e[0]));return Ut(t)},Ao={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zt,rotateZ:zt,skewX:e=>me(Math.atan(e[1])),skewY:e=>me(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ut=e=>(e=e%360,e<0&&(e+=360),e),qn=zt,Xn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),To={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xn,scaleY:Yn,scale:e=>(Xn(e)+Yn(e))/2,rotateX:e=>Ut(me(Math.atan2(e[6],e[5]))),rotateY:e=>Ut(me(Math.atan2(-e[2],e[0]))),rotateZ:qn,rotate:qn,skewX:e=>me(Math.atan(e[4])),skewY:e=>me(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $t(e){return e.includes("scale")?1:0}function Wt(e,t){if(!e||e==="none")return $t(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=To,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Ao,i=o}if(!i)return $t(t);const a=s[t],r=i[1].split(",").map(Po);return typeof a=="function"?a(r):r[a]}const So=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Wt(n,t)};function Po(e){return parseFloat(e.trim())}const Ve=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Me=new Set(Ve),Qn=e=>e===Ee||e===T,Eo=new Set(["x","y","z"]),Vo=Ve.filter(e=>!Eo.has(e));function Mo(e){const t=[];return Vo.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const re={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:s})=>{const i=e.max-e.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:s})=>{const i=e.max-e.min;return s==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Wt(t,"x"),y:(e,{transform:t})=>Wt(t,"y")};re.translateX=re.x;re.translateY=re.y;const pe=new Set;let Kt=!1,Gt=!1,_t=!1;function Bi(){if(Gt){const e=Array.from(pe).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Mo(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([a,r])=>{s.getValue(a)?.set(r)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Gt=!1,Kt=!1,pe.forEach(e=>e.complete(_t)),pe.clear()}function Zi(){pe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gt=!0)})}function Co(){_t=!0,Zi(),Bi(),_t=!1}class An{constructor(t,n,s,i,a,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=a,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(pe.add(this),Kt||(Kt=!0,C.read(Zi),C.resolveKeyframes(Bi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const a=i?.get(),r=t[t.length-1];if(a!==void 0)t[0]=a;else if(s&&n){const o=s.readValue(n,r);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=r),i&&a===void 0&&i.set(t[0])}wo(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pe.delete(this)}cancel(){this.state==="scheduled"&&(pe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Lo=e=>e.startsWith("--");function Ii(e,t,n){Lo(t)?e.style.setProperty(t,n):e.style[t]=n}const Do={};function Hi(e,t){const n=fi(e);return()=>Do[t]??n()}const ko=Hi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Oi=Hi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),De=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:De([0,.65,.55,1]),circOut:De([.55,0,1,.45]),backIn:De([.31,.01,.66,-.59]),backOut:De([.33,1.53,.69,.99])};function zi(e,t){if(e)return typeof e=="function"?Oi()?ji(e,t):"ease-out":Si(e)?De(e):Array.isArray(e)?e.map(n=>zi(n,t)||Jn.easeOut):Jn[e]}function Ro(e,t,n,{delay:s=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:o="easeOut",times:u}={},d=void 0){const c={[t]:n};u&&(c.offset=u);const h=zi(o,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(c,f)}function Ui(e){return typeof e=="function"&&"applyToOptions"in e}function jo({type:e,...t}){return Ui(e)&&Oi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class $i extends wn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:o,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=r,this.options=t,hn(typeof t.type!="string");const d=jo(t);this.animation=Ro(n,s,i,d,a),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const c=yt(i,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(c),Ii(n,s,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return K(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+K(t)}get time(){return K(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ko()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const Wi={anticipate:bi,backInOut:vi,circInOut:Ai};function Fo(e){return e in Wi}function No(e){typeof e.ease=="string"&&Fo(e.ease)&&(e.ease=Wi[e.ease])}const Vt=10;class Bo extends $i{constructor(t){No(t),Ni(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:a,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new dt({...r,autoplay:!1}),u=Math.max(Vt,z.now()-this.startTime),d=se(0,Vt,u-Vt),c=o.sample(u).value,{name:h}=this.options;a&&h&&Ii(a,h,c),n.setWithVelocity(o.sample(Math.max(0,u-d)).value,c,d),o.stop()}}const es=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function Zo(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Io(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],r=es(i,t),o=es(a,t);return!r||!o?!1:Zo(e)||(n==="spring"||Ui(n))&&s}function qt(e){e.duration=0,e.type="keyframes"}const Ki=new Set(["opacity","clipPath","filter","transform"]),Ho=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Oo(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Ho.test(e[t]))return!0;return!1}const zo=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Uo=fi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $o(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:a,type:r,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return Uo()&&n&&(Ki.has(n)||zo.has(n)&&Oo(o))&&(n!=="transform"||!c)&&!d&&!s&&i!=="mirror"&&a!==0&&r!=="inertia"}const Wo=40;class Ko extends wn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:r="loop",keyframes:o,name:u,motionValue:d,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=z.now();const f={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:a,repeatType:r,name:u,motionValue:d,element:c,...h},p=c?.KeyframeResolver||An;this.keyframeResolver=new p(o,(g,x,v)=>this.onKeyframesResolved(g,x,f,!v),u,d,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:a,type:r,velocity:o,delay:u,isHandoff:d,onUpdate:c}=s;this.resolvedAt=z.now();let h=!0;Io(t,a,r,o)||(h=!1,(ae.instantAnimations||!u)&&c?.(yt(t,s,n)),t[0]=t[t.length-1],qt(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Wo?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},g=h&&!d&&$o(p),x=p.motionValue?.owner?.current;let v;if(g)try{v=new Bo({...p,element:x})}catch{v=new dt(p)}else v=new dt(p);v.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Co()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Gi(e,t,n,s=0,i=1){const a=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),r=e.size,o=(r-1)*s;return typeof n=="function"?n(a,r):i===1?a*s:o-a*s}const Go=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _o(e){const t=Go.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}function _i(e,t,n=1){const[s,i]=_o(e);if(!s)return;const a=window.getComputedStyle(t).getPropertyValue(s);if(a){const r=a.trim();return ui(r)?parseFloat(r):r}return gn(i)?_i(i,t,n+1):i}const qo={type:"spring",stiffness:500,damping:25,restSpeed:10},Xo=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yo={type:"keyframes",duration:.8},Qo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jo=(e,{keyframes:t})=>t.length>2?Yo:Me.has(e)?e.startsWith("scale")?Xo(t[1]):qo:Qo;function qi(e,t){if(e?.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function Tn(e,t){const n=e?.[t]??e?.default??e;return n!==e?qi(n,e):n}const el=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function tl(e){for(const t in e)if(!el.has(t))return!0;return!1}const Sn=(e,t,n,s={},i,a)=>r=>{const o=Tn(s,e)||{},u=o.delay||s.delay||0;let{elapsed:d=0}=s;d=d-$(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-d,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{r(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:i};tl(o)||Object.assign(c,Jo(e,c)),c.duration&&(c.duration=$(c.duration)),c.repeatDelay&&(c.repeatDelay=$(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qt(c),c.delay===0&&(h=!0)),(ae.instantAnimations||ae.skipAnimations||i?.shouldSkipAnimations)&&(h=!0,qt(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,h&&!a&&t.get()!==void 0){const f=yt(c.keyframes,o);if(f!==void 0){C.update(()=>{c.onUpdate(f),c.onComplete()});return}}return o.isSync?new dt(c):new Ko(c)};function ts(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Pn(e,t,n,s){if(typeof t=="function"){const[i,a]=ts(s);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=ts(s);t=t(n!==void 0?n:e.custom,i,a)}return t}function ge(e,t,n){const s=e.getProps();return Pn(s,t,n!==void 0?n:s.custom,e)}const Xi=new Set(["width","height","top","left","right","bottom",...Ve]),ns=30,nl=e=>!isNaN(parseFloat(e));class sl{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=z.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=z.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=nl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new fn);const s=this.events[t].add(n);return t==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ns)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ns);return mi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pe(e,t){return new sl(e,t)}const Xt=e=>Array.isArray(e);function il(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function rl(e){return Xt(e)?e[e.length-1]||0:e}function al(e,t){const n=ge(e,t);let{transitionEnd:s={},transition:i={},...a}=n||{};a={...a,...s};for(const r in a){const o=rl(a[r]);il(e,r,o)}}const H=e=>!!(e&&e.getVelocity);function ol(e){return!!(H(e)&&e.add)}function Yt(e,t){const n=e.getValue("willChange");if(ol(n))return n.add(t);if(!n&&ae.WillChange){const s=new ae.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function En(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ll="framerAppearId",Yi="data-"+En(ll);function Qi(e){return e.props[Yi]}function cl({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Ji(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:a,transitionEnd:r,...o}=t;const u=e.getDefaultTransition();a=a?qi(a,u):u;const d=a?.reduceMotion;s&&(a=s);const c=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const f in o){const p=e.getValue(f,e.latestValues[f]??null),g=o[f];if(g===void 0||h&&cl(h,f))continue;const x={delay:n,...Tn(a||{},f)},v=p.get();if(v!==void 0&&!p.isAnimating()&&!Array.isArray(g)&&g===v&&!x.velocity){C.update(()=>p.set(g));continue}let b=!1;if(window.MotionHandoffAnimation){const A=Qi(e);if(A){const S=window.MotionHandoffAnimation(A,f,C);S!==null&&(x.startTime=S,b=!0)}}Yt(e,f);const y=d??e.shouldReduceMotion;p.start(Sn(f,p,g,y&&Xi.has(f)?{type:!1}:x,e,b));const w=p.animation;w&&c.push(w)}if(r){const f=()=>C.update(()=>{r&&al(e,r)});c.length?Promise.all(c).then(f):f()}return c}function Qt(e,t,n={}){const s=ge(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const a=s?()=>Promise.all(Ji(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:c,staggerDirection:h}=i;return ul(e,t,u,d,c,h,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[u,d]=o==="beforeChildren"?[a,r]:[r,a];return u().then(()=>d())}else return Promise.all([a(),r(n.delay)])}function ul(e,t,n=0,s=0,i=0,a=1,r){const o=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),o.push(Qt(u,t,{...r,delay:n+(typeof s=="function"?0:s)+Gi(e.variantChildren,u,s,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(o)}function dl(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(a=>Qt(e,a,n));s=Promise.all(i)}else if(typeof t=="string")s=Qt(e,t,n);else{const i=typeof t=="function"?ge(e,t,n.custom):t;s=Promise.all(Ji(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const hl={test:e=>e==="auto",parse:e=>e},er=e=>t=>t.test(e),tr=[Ee,T,ne,ie,Ba,Na,hl],ss=e=>tr.find(er(e));function fl(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hi(e):!0}const ml=new Set(["brightness","contrast","saturate","opacity"]);function pl(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(yn)||[];if(!s)return e;const i=n.replace(s,"");let a=ml.has(t)?1:0;return s!==n&&(a*=100),t+"("+a+i+")"}const gl=/\b([a-z-]*)\(.*?\)/gu,Jt={...Q,getAnimatableNone:e=>{const t=e.match(gl);return t?t.map(pl).join(" "):e}},en={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},is={...Ee,transform:Math.round},yl={rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Ge,scaleX:Ge,scaleY:Ge,scaleZ:Ge,skew:ie,skewX:ie,skewY:ie,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Ze,originX:$n,originY:$n,originZ:T},Vn={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,...yl,zIndex:is,fillOpacity:Ze,strokeOpacity:Ze,numOctaves:is},xl={...Vn,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Jt,WebkitFilter:Jt,mask:en,WebkitMask:en},nr=e=>xl[e],vl=new Set([Jt,en]);function sr(e,t){let n=nr(e);return vl.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bl=new Set(["auto","none","0"]);function wl(e,t,n){let s=0,i;for(;s<e.length&&!i;){const a=e[s];typeof a=="string"&&!bl.has(a)&&Se(a).values.length&&(i=e[s]),s++}if(i&&n)for(const a of t)e[a]=sr(n,i)}class Al extends An{constructor(t,n,s,i,a){super(t,n,s,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let h=t[c];if(typeof h=="string"&&(h=h.trim(),gn(h))){const f=_i(h,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Xi.has(s)||t.length!==2)return;const[i,a]=t,r=ss(i),o=ss(a),u=Un(i),d=Un(a);if(u!==d&&re[s]){this.needsMeasurement=!0;return}if(r!==o)if(Qn(r)&&Qn(o))for(let c=0;c<t.length;c++){const h=t[c];typeof h=="string"&&(t[c]=parseFloat(h))}else re[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||fl(t[i]))&&s.push(i);s.length&&wl(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=re[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=s.length-1,r=s[a];s[a]=re[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,u])=>{t.getValue(o).set(u)}),this.resolveNoneKeyframes()}}function ir(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(s=>s!=null)}const rr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Qe(e){return di(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Mn}=Pi(queueMicrotask,!1),Y={x:!1,y:!1};function ar(){return Y.x||Y.y}function Tl(e){return e==="x"||e==="y"?Y[e]?null:(Y[e]=!0,()=>{Y[e]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}function or(e,t){const n=ir(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function Sl(e){return!(e.pointerType==="touch"||ar())}function Pl(e,t,n={}){const[s,i,a]=or(e,n);return s.forEach(r=>{let o=!1,u=!1,d;const c=()=>{r.removeEventListener("pointerleave",g)},h=v=>{d&&(d(v),d=void 0),c()},f=v=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(v))},p=()=>{o=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},g=v=>{if(v.pointerType!=="touch"){if(o){u=!0;return}h(v)}},x=v=>{if(!Sl(v))return;u=!1;const b=t(r,v);typeof b=="function"&&(d=b,r.addEventListener("pointerleave",g,i))};r.addEventListener("pointerenter",x,i),r.addEventListener("pointerdown",p,i)}),a}const lr=(e,t)=>t?e===t?!0:lr(e,t.parentElement):!1,Cn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,El=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vl(e){return El.has(e.tagName)||e.isContentEditable===!0}const Ml=new Set(["INPUT","SELECT","TEXTAREA"]);function Cl(e){return Ml.has(e.tagName)||e.isContentEditable===!0}const Je=new WeakSet;function rs(e){return t=>{t.key==="Enter"&&e(t)}}function Mt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ll=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=rs(()=>{if(Je.has(n))return;Mt(n,"down");const i=rs(()=>{Mt(n,"up")}),a=()=>Mt(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function as(e){return Cn(e)&&!ar()}const os=new WeakSet;function Dl(e,t,n={}){const[s,i,a]=or(e,n),r=o=>{const u=o.currentTarget;if(!as(o)||os.has(o))return;Je.add(u),n.stopPropagation&&os.add(o);const d=t(u,o),c=(p,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Je.has(u)&&Je.delete(u),as(p)&&typeof d=="function"&&d(p,{success:g})},h=p=>{c(p,u===window||u===document||n.useGlobalTarget||lr(u,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",r,i),Qe(o)&&(o.addEventListener("focus",d=>Ll(d,i)),!Vl(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function Ln(e){return di(e)&&"ownerSVGElement"in e}const et=new WeakMap;let tt;const cr=(e,t,n)=>(s,i)=>i&&i[0]?i[0][e+"Size"]:Ln(s)&&"getBBox"in s?s.getBBox()[t]:s[n],kl=cr("inline","width","offsetWidth"),Rl=cr("block","height","offsetHeight");function jl({target:e,borderBoxSize:t}){et.get(e)?.forEach(n=>{n(e,{get width(){return kl(e,t)},get height(){return Rl(e,t)}})})}function Fl(e){e.forEach(jl)}function Nl(){typeof ResizeObserver>"u"||(tt=new ResizeObserver(Fl))}function Bl(e,t){tt||Nl();const n=ir(e);return n.forEach(s=>{let i=et.get(s);i||(i=new Set,et.set(s,i)),i.add(t),tt?.observe(s)}),()=>{n.forEach(s=>{const i=et.get(s);i?.delete(t),i?.size||tt?.unobserve(s)})}}const nt=new Set;let we;function Zl(){we=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};nt.forEach(t=>t(e))},window.addEventListener("resize",we)}function Il(e){return nt.add(e),we||Zl(),()=>{nt.delete(e),!nt.size&&typeof we=="function"&&(window.removeEventListener("resize",we),we=void 0)}}function ls(e,t){return typeof e=="function"?Il(e):Bl(e,t)}function Hl(e){return Ln(e)&&e.tagName==="svg"}const Ol=[...tr,F,Q],zl=e=>Ol.find(er(e)),cs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ae=()=>({x:cs(),y:cs()}),us=()=>({min:0,max:0}),B=()=>({x:us(),y:us()}),Ul=new WeakMap;function xt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ie(e){return typeof e=="string"||Array.isArray(e)}const Dn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kn=["initial",...Dn];function vt(e){return xt(e.animate)||kn.some(t=>Ie(e[t]))}function ur(e){return!!(vt(e)||e.variants)}function $l(e,t,n){for(const s in t){const i=t[s],a=n[s];if(H(i))e.addValue(s,i);else if(H(a))e.addValue(s,Pe(i,{owner:e}));else if(a!==i)if(e.hasValue(s)){const r=e.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(s);e.addValue(s,Pe(r!==void 0?r:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const tn={current:null},dr={current:!1},Wl=typeof window<"u";function Kl(){if(dr.current=!0,!!Wl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tn.current=e.matches;e.addEventListener("change",t),t()}else tn.current=!1}const ds=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ht={};function hr(e){ht=e}function Gl(){return ht}class _l{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:r,visualState:o},u={}){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=An,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=z.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,C.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=o;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!r,this.isControllingVariants=vt(n),this.isVariantNode=ur(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];d[p]!==void 0&&H(g)&&g.set(d[p])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,Ul.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(dr.current||Kl(),this.shouldReduceMotion=tn.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),oe(this.notifyUpdate),oe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Ki.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:o,times:u,ease:d,duration:c}=n.accelerate,h=new $i({element:this.current,name:t,keyframes:o,times:u,ease:d,duration:$(c)}),f=r(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const s=Me.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ht){const n=ht[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ds.length;s++){const i=ds[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,r=t[a];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=$l(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(ui(s)||hi(s))?s=parseFloat(s):!zl(s)&&Q.test(n)&&(s=sr(t,n)),this.setBaseTarget(t,H(s)?s.get():s)),H(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const a=Pn(this.props,n,this.presenceContext?.custom);a&&(s=a[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!H(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new fn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Mn.render(this.render)}}class fr extends _l{constructor(){super(...arguments),this.KeyframeResolver=Al}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class le{constructor(t){this.isMounted=!1,this.node=t}update(){}}function mr({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function ql({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Xl(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ct(e){return e===void 0||e===1}function nn({scale:e,scaleX:t,scaleY:n}){return!Ct(e)||!Ct(t)||!Ct(n)}function de(e){return nn(e)||pr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function pr(e){return hs(e.x)||hs(e.y)}function hs(e){return e&&e!=="0%"}function ft(e,t,n){const s=e-n,i=t*s;return n+i}function fs(e,t,n,s,i){return i!==void 0&&(e=ft(e,i,s)),ft(e,n,s)+t}function sn(e,t=0,n=1,s,i){e.min=fs(e.min,t,n,s,i),e.max=fs(e.max,t,n,s,i)}function gr(e,{x:t,y:n}){sn(e.x,t.translate,t.scale,t.originPoint),sn(e.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,ps=1.0000000000001;function Yl(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,r;for(let o=0;o<i;o++){a=n[o],r=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(te(e.x,-a.scroll.offset.x),te(e.y,-a.scroll.offset.y)),r&&(t.x*=r.x.scale,t.y*=r.y.scale,gr(e,r)),s&&de(a.latestValues)&&st(e,a.latestValues,a.layout?.layoutBox))}t.x<ps&&t.x>ms&&(t.x=1),t.y<ps&&t.y>ms&&(t.y=1)}function te(e,t){e.min+=t,e.max+=t}function gs(e,t,n,s,i=.5){const a=D(e.min,e.max,i);sn(e,t,n,a,s)}function ys(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function st(e,t,n){const s=n??e;gs(e.x,ys(t.x,s.x),t.scaleX,t.scale,t.originX),gs(e.y,ys(t.y,s.y),t.scaleY,t.scale,t.originY)}function yr(e,t){return mr(Xl(e.getBoundingClientRect(),t))}function Ql(e,t,n){const s=yr(e,n),{scroll:i}=t;return i&&(te(s.x,i.offset.x),te(s.y,i.offset.y)),s}const Jl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},e0=Ve.length;function t0(e,t,n){let s="",i=!0;for(let a=0;a<e0;a++){const r=Ve[a],o=e[r];if(o===void 0)continue;let u=!0;if(typeof o=="number")u=o===(r.startsWith("scale")?1:0);else{const d=parseFloat(o);u=r.startsWith("scale")?d===1:d===0}if(!u||n){const d=rr(o,Vn[r]);if(!u){i=!1;const c=Jl[r]||r;s+=`${c}(${d}) `}n&&(t[r]=d)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Rn(e,t,n){const{style:s,vars:i,transformOrigin:a}=e;let r=!1,o=!1;for(const u in t){const d=t[u];if(Me.has(u)){r=!0;continue}else if(Vi(u)){i[u]=d;continue}else{const c=rr(d,Vn[u]);u.startsWith("origin")?(o=!0,a[u]=c):s[u]=c}}if(t.transform||(r||n?s.transform=t0(t,e.transform,n):s.transform&&(s.transform="none")),o){const{originX:u="50%",originY:d="50%",originZ:c=0}=a;s.transformOrigin=`${u} ${d} ${c}`}}function xr(e,{style:t,vars:n},s,i){const a=e.style;let r;for(r in t)a[r]=t[r];i?.applyProjectionStyles(a,s);for(r in n)a.setProperty(r,n[r])}function xs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ce={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;const n=xs(e,t.target.x),s=xs(e,t.target.y);return`${n}% ${s}%`}},n0={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Q.parse(e);if(i.length>5)return s;const a=Q.createTransformer(e),r=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;i[0+r]/=o,i[1+r]/=u;const d=D(o,u,.5);return typeof i[2+r]=="number"&&(i[2+r]/=d),typeof i[3+r]=="number"&&(i[3+r]/=d),a(i)}},rn={borderRadius:{...Ce,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomLeftRadius:Ce,borderBottomRightRadius:Ce,boxShadow:n0};function vr(e,{layout:t,layoutId:n}){return Me.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!rn[e]||e==="opacity")}function jn(e,t,n){const s=e.style,i=t?.style,a={};if(!s)return a;for(const r in s)(H(s[r])||i&&H(i[r])||vr(r,e)||n?.getValue(r)?.liveStyle!==void 0)&&(a[r]=s[r]);return a}function s0(e){return window.getComputedStyle(e)}class i0 extends fr{constructor(){super(...arguments),this.type="html",this.renderInstance=xr}readValueFromInstance(t,n){if(Me.has(n))return this.projection?.isProjecting?$t(n):So(t,n);{const s=s0(t),i=(Vi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return yr(t,n)}build(t,n,s){Rn(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return jn(t,n,s)}}const r0={offset:"stroke-dashoffset",array:"stroke-dasharray"},a0={offset:"strokeDashoffset",array:"strokeDasharray"};function o0(e,t,n=1,s=0,i=!0){e.pathLength=1;const a=i?r0:a0;e[a.offset]=`${-s}`,e[a.array]=`${t} ${n}`}const l0=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function br(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...o},u,d,c){if(Rn(e,o,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const p of l0)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&o0(h,i,a,r,!1)}const wr=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"]),Ar=e=>typeof e=="string"&&e.toLowerCase()==="svg";function c0(e,t,n,s){xr(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(wr.has(i)?i:En(i),t.attrs[i])}function Tr(e,t,n){const s=jn(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const a=Ve.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[a]=e[i]}return s}class u0 extends fr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=B}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Me.has(n)){const s=nr(n);return s&&s.default||0}return n=wr.has(n)?n:En(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Tr(t,n,s)}build(t,n,s){br(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){c0(t,n,s,i)}mount(t){this.isSVGTag=Ar(t.tagName),super.mount(t)}}const d0=kn.length;function Sr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Sr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<d0;n++){const s=kn[n],i=e.props[s];(Ie(i)||i===!1)&&(t[s]=i)}return t}function Pr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const h0=[...Dn].reverse(),f0=Dn.length;function m0(e){return t=>Promise.all(t.map(({animation:n,options:s})=>dl(e,n,s)))}function p0(e){let t=m0(e),n=vs(),s=!0,i=!1;const a=d=>(c,h)=>{const f=ge(e,h,d==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:g,...x}=f;c={...c,...x,...g}}return c};function r(d){t=d(e)}function o(d){const{props:c}=e,h=Sr(e.parent)||{},f=[],p=new Set;let g={},x=1/0;for(let b=0;b<f0;b++){const y=h0[b],w=n[y],A=c[y]!==void 0?c[y]:h[y],S=Ie(A),M=y===d?w.isActive:null;M===!1&&(x=b);let j=A===h[y]&&A!==c[y]&&S;if(j&&(s||i)&&e.manuallyAnimateOnMount&&(j=!1),w.protectedKeys={...g},!w.isActive&&M===null||!A&&!w.prevProp||xt(A)||typeof A=="boolean")continue;if(y==="exit"&&w.isActive&&M!==!0){w.prevResolvedValues&&(g={...g,...w.prevResolvedValues});continue}const E=g0(w.prevProp,A);let V=E||y===d&&w.isActive&&!j&&S||b>x&&S,P=!1;const L=Array.isArray(A)?A:[A];let N=L.reduce(a(y),{});M===!1&&(N={});const{prevResolvedValues:q={}}=w,k={...q,...N},O=Z=>{V=!0,p.has(Z)&&(P=!0,p.delete(Z)),w.needsAnimating[Z]=!0;const W=e.getValue(Z);W&&(W.liveStyle=!1)};for(const Z in k){const W=N[Z],ce=q[Z];if(g.hasOwnProperty(Z))continue;let ye=!1;Xt(W)&&Xt(ce)?ye=!Pr(W,ce):ye=W!==ce,ye?W!=null?O(Z):p.add(Z):W!==void 0&&p.has(Z)?O(Z):w.protectedKeys[Z]=!0}w.prevProp=A,w.prevResolvedValues=N,w.isActive&&(g={...g,...N}),(s||i)&&e.blockInitialAnimation&&(V=!1);const J=j&&E;V&&(!J||P)&&f.push(...L.map(Z=>{const W={type:y};if(typeof Z=="string"&&(s||i)&&!J&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,ye=ge(ce,Z);if(ce.enteringChildren&&ye){const{delayChildren:oa}=ye.transition||{};W.delay=Gi(ce.enteringChildren,e,oa)}}return{animation:Z,options:W}}))}if(p.size){const b={};if(typeof c.initial!="boolean"){const y=ge(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(b.transition=y.transition)}p.forEach(y=>{const w=e.getBaseTarget(y),A=e.getValue(y);A&&(A.liveStyle=!0),b[y]=w??null}),f.push({animation:b})}let v=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),s=!1,i=!1,v?t(f):Promise.resolve()}function u(d,c){if(n[d].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(d,c)),n[d].isActive=c;const h=o(d);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:u,setAnimateFunction:r,getState:()=>n,reset:()=>{n=vs(),i=!0}}}function g0(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Pr(t,e):!1}function ue(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vs(){return{animate:ue(!0),whileInView:ue(),whileHover:ue(),whileTap:ue(),whileDrag:ue(),whileFocus:ue(),exit:ue()}}function an(e,t){e.min=t.min,e.max=t.max}function X(e,t){an(e.x,t.x),an(e.y,t.y)}function bs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Er=1e-4,y0=1-Er,x0=1+Er,Vr=.01,v0=0-Vr,b0=0+Vr;function U(e){return e.max-e.min}function w0(e,t,n){return Math.abs(e-t)<=n}function ws(e,t,n,s=.5){e.origin=s,e.originPoint=D(t.min,t.max,e.origin),e.scale=U(n)/U(t),e.translate=D(n.min,n.max,e.origin)-e.originPoint,(e.scale>=y0&&e.scale<=x0||isNaN(e.scale))&&(e.scale=1),(e.translate>=v0&&e.translate<=b0||isNaN(e.translate))&&(e.translate=0)}function Fe(e,t,n,s){ws(e.x,t.x,n.x,s?s.originX:void 0),ws(e.y,t.y,n.y,s?s.originY:void 0)}function As(e,t,n,s=0){const i=s?D(n.min,n.max,s):n.min;e.min=i+t.min,e.max=e.min+U(t)}function A0(e,t,n,s){As(e.x,t.x,n.x,s?.x),As(e.y,t.y,n.y,s?.y)}function Ts(e,t,n,s=0){const i=s?D(n.min,n.max,s):n.min;e.min=t.min-i,e.max=e.min+U(t)}function mt(e,t,n,s){Ts(e.x,t.x,n.x,s?.x),Ts(e.y,t.y,n.y,s?.y)}function Ss(e,t,n,s,i){return e-=t,e=ft(e,1/n,s),i!==void 0&&(e=ft(e,1/i,s)),e}function T0(e,t=0,n=1,s=.5,i,a=e,r=e){if(ne.test(t)&&(t=parseFloat(t),t=D(r.min,r.max,t/100)-r.min),typeof t!="number")return;let o=D(a.min,a.max,s);e===a&&(o-=t),e.min=Ss(e.min,t,n,o,i),e.max=Ss(e.max,t,n,o,i)}function Ps(e,t,[n,s,i],a,r){T0(e,t[n],t[s],t[i],t.scale,a,r)}const S0=["x","scaleX","originX"],P0=["y","scaleY","originY"];function Es(e,t,n,s){Ps(e.x,t,S0,n?n.x:void 0,s?s.x:void 0),Ps(e.y,t,P0,n?n.y:void 0,s?s.y:void 0)}function Vs(e){return e.translate===0&&e.scale===1}function Mr(e){return Vs(e.x)&&Vs(e.y)}function Ms(e,t){return e.min===t.min&&e.max===t.max}function E0(e,t){return Ms(e.x,t.x)&&Ms(e.y,t.y)}function Cs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cr(e,t){return Cs(e.x,t.x)&&Cs(e.y,t.y)}function Ls(e){return U(e.x)/U(e.y)}function Ds(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ee(e){return[e("x"),e("y")]}function V0(e,t,n){let s="";const i=e.x.translate/t.x,a=e.y.translate/t.y,r=n?.z||0;if((i||a||r)&&(s=`translate3d(${i}px, ${a}px, ${r}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:c,rotateX:h,rotateY:f,skewX:p,skewY:g}=n;d&&(s=`perspective(${d}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),p&&(s+=`skewX(${p}deg) `),g&&(s+=`skewY(${g}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(s+=`scale(${o}, ${u})`),s||"none"}const Lr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],M0=Lr.length,ks=e=>typeof e=="string"?parseFloat(e):e,Rs=e=>typeof e=="number"||T.test(e);function C0(e,t,n,s,i,a){i?(e.opacity=D(0,n.opacity??1,L0(s)),e.opacityExit=D(t.opacity??1,0,D0(s))):a&&(e.opacity=D(t.opacity??1,n.opacity??1,s));for(let r=0;r<M0;r++){const o=Lr[r];let u=js(t,o),d=js(n,o);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||Rs(u)===Rs(d)?(e[o]=Math.max(D(ks(u),ks(d),s),0),(ne.test(d)||ne.test(u))&&(e[o]+="%")):e[o]=d}(t.rotate||n.rotate)&&(e.rotate=D(t.rotate||0,n.rotate||0,s))}function js(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const L0=Dr(0,.5,wi),D0=Dr(.5,.95,G);function Dr(e,t,n){return s=>s<e?0:s>t?1:n(Be(e,t,s))}function k0(e,t,n){const s=H(e)?e:Pe(e);return s.start(Sn("",s,t,n)),s.animation}function He(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const R0=(e,t)=>e.depth-t.depth;class j0{constructor(){this.children=[],this.isDirty=!1}add(t){dn(this.children,t),this.isDirty=!0}remove(t){ot(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(R0),this.isDirty=!1,this.children.forEach(t)}}function F0(e,t){const n=z.now(),s=({timestamp:i})=>{const a=i-n;a>=t&&(oe(s),e(a-t))};return C.setup(s,!0),()=>oe(s)}function it(e){return H(e)?e.get():e}class N0{constructor(){this.members=[]}add(t){dn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ot(this.members,s),s.unmount())}t.scheduleRender()}remove(t){if(ot(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:a}=t.options;(i===void 0||i!==a)&&(t.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const rt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Lt=["","X","Y","Z"],B0=1e3;let Z0=0;function Dt(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function kr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Qi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&kr(s)}function Rr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},o=t?.()){this.id=Z0++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(O0),this.nodes.forEach(G0),this.nodes.forEach(_0),this.nodes.forEach(z0)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new j0)}addEventListener(r,o){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new fn),this.eventHandlers.get(r).add(o)}notifyListeners(r,...o){const u=this.eventHandlers.get(r);u&&u.notify(...o)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ln(r)&&!Hl(r),this.instance=r;const{layoutId:o,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||o)&&(this.isLayoutDirty=!0),e){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;C.read(()=>{h=window.innerWidth}),e(r,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,c&&c(),c=F0(f,250),rt.hasAnimatedSinceResize&&(rt.hasAnimatedSinceResize=!1,this.nodes.forEach(Bs)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&d&&(o||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||J0,{onLayoutAnimationStart:x,onLayoutAnimationComplete:v}=d.getProps(),b=!this.targetLayout||!Cr(this.targetLayout,p),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Tn(g,"layout"),onPlay:x,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,y)}else h||Bs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),oe(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(q0),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&kr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:u}=this.options;if(o===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach($0),this.nodes.forEach(Fs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ns);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(W0),this.nodes.forEach(K0),this.nodes.forEach(I0),this.nodes.forEach(H0)):this.nodes.forEach(Ns),this.clearAllSnapshots();const o=z.now();I.delta=se(0,1e3/60,o-I.timestamp),I.timestamp=o,I.isProcessing=!0,At.update.process(I),At.preRender.process(I),At.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(U0),this.sharedNodes.forEach(X0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=B()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(o=!1),o&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Mr(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,c=d!==this.prevTransformTemplateValue;r&&this.instance&&(o||de(this.latestValues)||c)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const o=this.measurePageBox();let u=this.removeElementScroll(o);return r&&(u=this.removeTransform(u)),ec(u),{animationId:this.root.animationId,measuredBox:o,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return B();const o=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(tc))){const{scroll:d}=this.root;d&&(te(o.x,d.offset.x),te(o.y,d.offset.y))}return o}removeElementScroll(r){const o=B();if(X(o,r),this.scroll?.wasRoot)return o;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:c,options:h}=d;d!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&X(o,r),te(o.x,c.offset.x),te(o.y,c.offset.y))}return o}applyTransform(r,o=!1,u){const d=u||B();X(d,r);for(let c=0;c<this.path.length;c++){const h=this.path[c];!o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(te(d.x,-h.scroll.offset.x),te(d.y,-h.scroll.offset.y)),de(h.latestValues)&&st(d,h.latestValues,h.layout?.layoutBox)}return de(this.latestValues)&&st(d,this.latestValues,this.layout?.layoutBox),d}removeTransform(r){const o=B();X(o,r);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!de(d.latestValues))continue;let c;d.instance&&(nn(d.latestValues)&&d.updateSnapshot(),c=B(),X(c,d.measurePageBox())),Es(o,d.latestValues,d.snapshot?.layoutBox,c)}return de(this.latestValues)&&Es(o,this.latestValues),o}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==o;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),A0(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),gr(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||nn(this.parent.latestValues)||pr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,o,u){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),mt(this.relativeTargetOrigin,o,u,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),o=!!this.resumingFrom||this!==r;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===I.timestamp&&(u=!1),u)return;const{layout:d,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||!(d||c))return;X(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Yl(this.layoutCorrected,this.treeScale,this.path,o),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=B());const{target:p}=r;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bs(this.prevProjectionDelta.x,this.projectionDelta.x),bs(this.prevProjectionDelta.y,this.projectionDelta.y)),Fe(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ae(),this.projectionDelta=Ae(),this.projectionDeltaWithTransform=Ae()}setAnimationOrigin(r,o=!1){const u=this.snapshot,d=u?u.latestValues:{},c={...this.latestValues},h=Ae();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=B(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,x=p!==g,v=this.getStack(),b=!v||v.members.length<=1,y=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(Q0));this.animationProgress=0;let w;this.mixTargetDelta=A=>{const S=A/1e3;Zs(h.x,r.x,S),Zs(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Y0(this.relativeTarget,this.relativeTargetOrigin,f,S),w&&E0(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=B()),X(w,this.relativeTarget)),x&&(this.animationValues=c,C0(c,d,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(oe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{rt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pe(0)),this.motionValue.jump(0,!1),this.currentAnimation=k0(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),r.onUpdate&&r.onUpdate(o)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(B0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:o,target:u,layout:d,latestValues:c}=r;if(!(!o||!u||!d)){if(this!==r&&this.layout&&d&&jr(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||B();const h=U(this.layout.layoutBox.x);u.x.min=r.target.x.min,u.x.max=u.x.min+h;const f=U(this.layout.layoutBox.y);u.y.min=r.target.y.min,u.y.max=u.y.min+f}X(o,u),st(o,c),Fe(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(r,o){this.sharedNodes.has(r)||this.sharedNodes.set(r,new N0),this.sharedNodes.get(r).add(o);const d=o.options.initialPromotionConfig;o.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(o):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:o,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),r&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let o=!1;const{latestValues:u}=r;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const d={};u.z&&Dt("z",r,d,this.animationValues);for(let c=0;c<Lt.length;c++)Dt(`rotate${Lt[c]}`,r,d,this.animationValues),Dt(`skew${Lt[c]}`,r,d,this.animationValues);r.render();for(const c in d)r.setStaticValue(c,d[c]),this.animationValues&&(this.animationValues[c]=d[c]);r.scheduleRender()}applyProjectionStyles(r,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=it(o?.pointerEvents)||"",r.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=it(o?.pointerEvents)||""),this.hasProjected&&!de(this.latestValues)&&(r.transform=u?u({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=V0(this.projectionDeltaWithTransform,this.treeScale,c);u&&(h=u(c,h)),r.transform=h;const{x:f,y:p}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?r.opacity=d===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=d===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in rn){if(c[g]===void 0)continue;const{correct:x,applyTo:v,isCSSVariable:b}=rn[g],y=h==="none"?c[g]:x(c[g],d);if(v){const w=v.length;for(let A=0;A<w;A++)r[v[A]]=y}else b?this.options.visualElement.renderState.vars[g]=y:r[g]=y}this.options.layoutId&&(r.pointerEvents=d===this?it(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Fs),this.root.sharedNodes.clear()}}}function I0(e){e.updateLayout()}function H0(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i==="size")ee(c=>{const h=a?t.measuredBox[c]:t.layoutBox[c],f=U(h);h.min=n[c].min,h.max=h.min+f});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";an(a?t.measuredBox[c]:t.layoutBox[c],n[c])}else jr(i,t.layoutBox,n)&&ee(c=>{const h=a?t.measuredBox[c]:t.layoutBox[c],f=U(n[c]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const r=Ae();Fe(r,n,t.layoutBox);const o=Ae();a?Fe(o,e.applyTransform(s,!0),t.measuredBox):Fe(o,n,t.layoutBox);const u=!Mr(r);let d=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const p=e.options.layoutAnchor||void 0,g=B();mt(g,t.layoutBox,h.layoutBox,p);const x=B();mt(x,n,f.layoutBox,p),Cr(g,x)||(d=!0),c.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:r,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function O0(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function z0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function U0(e){e.clearSnapshot()}function Fs(e){e.clearMeasurements()}function $0(e){e.isLayoutDirty=!0,e.updateLayout()}function Ns(e){e.isLayoutDirty=!1}function W0(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function K0(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function G0(e){e.resolveTargetDelta()}function _0(e){e.calcProjection()}function q0(e){e.resetSkewAndRotation()}function X0(e){e.removeLeadSnapshot()}function Zs(e,t,n){e.translate=D(t.translate,0,n),e.scale=D(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Is(e,t,n,s){e.min=D(t.min,n.min,s),e.max=D(t.max,n.max,s)}function Y0(e,t,n,s){Is(e.x,t.x,n.x,s),Is(e.y,t.y,n.y,s)}function Q0(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const J0={duration:.45,ease:[.4,0,.1,1]},Hs=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Os=Hs("applewebkit/")&&!Hs("chrome/")?Math.round:G;function zs(e){e.min=Os(e.min),e.max=Os(e.max)}function ec(e){zs(e.x),zs(e.y)}function jr(e,t,n){return e==="position"||e==="preserve-aspect"&&!w0(Ls(t),Ls(n),.2)}function tc(e){return e!==e.root&&e.scroll?.wasRoot}const nc=Rr({attachResizeListener:(e,t)=>He(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),kt={current:void 0},Fr=Rr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!kt.current){const e=new nc({});e.mount(window),e.setOptions({layoutScroll:!0}),kt.current=e}return kt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Fn=l.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Us(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sc(...e){return t=>{let n=!1;const s=e.map(i=>{const a=Us(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():Us(e[i],null)}}}}function ic(...e){return l.useCallback(sc(...e),e)}class rc extends l.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Qe(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=Qe(s)&&s.offsetWidth||0,a=Qe(s)&&s.offsetHeight||0,r=getComputedStyle(n),o=this.props.sizeRef.current;o.height=parseFloat(r.height),o.width=parseFloat(r.width),o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=a-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function ac({children:e,isPresent:t,anchorX:n,anchorY:s,root:i,pop:a}){const r=l.useId(),o=l.useRef(null),u=l.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=l.useContext(Fn),c=e.props?.ref??e?.ref,h=ic(o,c);return l.useInsertionEffect(()=>{const{width:f,height:p,top:g,left:x,right:v,bottom:b}=u.current;if(t||a===!1||!o.current||!f||!p)return;const y=n==="left"?`left: ${x}`:`right: ${v}`,w=s==="bottom"?`bottom: ${b}`:`top: ${g}`;o.current.dataset.motionPopId=r;const A=document.createElement("style");d&&(A.nonce=d);const S=i??document.head;return S.appendChild(A),A.sheet&&A.sheet.insertRule(`
2
2
  [data-motion-pop-id="${r}"] {
3
3
  position: absolute !important;
4
4
  width: ${f}px !important;