botech-library 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import*as i from"react";import s,{createContext as o,useRef as r,useLayoutEffect as a,useEffect as l,useId as c,useContext as u,useInsertionEffect as h,useMemo as d,useCallback as p,Children as m,isValidElement as f,useState as g,forwardRef as y,Fragment as v,createElement as x,Component as w}from"react";import b from"axios";const T=({variant:e="primary",onClick:n,children:i,className:s=""})=>t("button",{className:`px-4 py-2 rounded font-medium transition-colors ${{primary:"bg-primary-botech hover:bg-primary-botech-600 text-white",secondary:"bg-gray-200 hover:bg-gray-300 text-gray-800",danger:"bg-red-500 hover:bg-red-600 text-white"}[e]} ${s}`,onClick:n,children:i});var P={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},S=s.createContext&&s.createContext(P),E=["attr","size","title"];function A(t,e){if(null==t)return{};var n,i,s=function(t,e){if(null==t)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},V.apply(this,arguments)}function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach(function(e){M(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function M(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(t){return t&&t.map((t,e)=>s.createElement(t.tag,C({key:e},t.attr),D(t.child)))}function R(t){return e=>s.createElement(j,V({attr:C({},t.attr)},e),D(t.child))}function j(t){var e=e=>{var n,{attr:i,size:o,title:r}=t,a=A(t,E),l=o||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),s.createElement("svg",V({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,a,{className:n,style:C(C({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),r&&s.createElement("title",null,r),t.children)};return void 0!==S?s.createElement(S.Consumer,null,t=>e(t)):e(P)}function L(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function O(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function B(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function N(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(t)}function F(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function I(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(t)}function U(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}const $=({title:n,description:i,logoUrl:s,logoAlt:o="Logo",systemName:r="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:u="flex items-center justify-between bg-primary-botech text-white p-4 shadow-lg",logoClassName:h="h-10 object-contain",titleClassName:d="text-xl font-bold",descriptionClassName:p="text-sm opacity-80"})=>e("div",{className:u,children:[e("div",{className:"flex items-center gap-4",children:[t("button",{onClick:l,className:"p-2 rounded-lg hover:bg-primary-botech-600 transition-colors focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-20","aria-label":"Abrir menú",children:t(F,{className:"w-6 h-6"})}),e("div",{className:"flex items-center",children:[t("div",{className:"flex items-center justify-center mr-3",children:s?t("img",{src:s,alt:o,className:h}):t("div",{className:"w-10 h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t("span",{className:"text-white font-bold text-lg",children:r.charAt(0)})})}),e("div",{children:[t("h1",{className:d,children:r}),t("p",{className:p,children:a})]})]})]}),c&&e("div",{className:"text-right",children:[t("h2",{className:"text-lg font-semibold",children:n}),t("p",{className:"text-sm opacity-80",children:i})]})]}),W=o({});function z(t){const e=r(null);return null===e.current&&(e.current=t()),e.current}const Y="undefined"!=typeof window,X=Y?a:l,H=o(null);function K(t,e){-1===t.indexOf(e)&&t.push(e)}function q(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const G=(t,e,n)=>n>e?e:n<t?t:n;let _=()=>{},Z=()=>{};"production"!==process.env.NODE_ENV&&(_=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},Z=(t,e)=>{if(!t)throw new Error(e)});const J={},Q=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function tt(t){return"object"==typeof t&&null!==t}const et=t=>/^0[^.\s]+$/u.test(t);function nt(t){let e;return()=>(void 0===e&&(e=t()),e)}const it=t=>t,st=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(st),rt=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class at{constructor(){this.subscriptions=[]}add(t){return K(this.subscriptions,t),()=>q(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const lt=t=>1e3*t,ct=t=>t/1e3;function ut(t,e){return e?t*(1e3/e):0}const ht=new Set;function dt(t,e,n){t||ht.has(e)||(console.warn(e),n&&console.warn(n),ht.add(e))}const pt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function mt(t,e,n,i){if(t===e&&n===i)return it;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=pt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:pt(s(t),e,i)}const ft=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,gt=t=>e=>1-t(1-e),yt=mt(.33,1.53,.69,.99),vt=gt(yt),xt=ft(vt),wt=t=>(t*=2)<1?.5*vt(t):.5*(2-Math.pow(2,-10*(t-1))),bt=t=>1-Math.sin(Math.acos(t)),Tt=gt(bt),Pt=ft(bt),St=mt(.42,0,1,1),Et=mt(0,0,.58,1),At=mt(.42,0,.58,1),Vt=t=>Array.isArray(t)&&"number"==typeof t[0],kt={linear:it,easeIn:St,easeInOut:At,easeOut:Et,circIn:bt,circInOut:Pt,circOut:Tt,backIn:vt,backInOut:xt,backOut:yt,anticipate:wt},Ct=t=>{if(Vt(t)){Z(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return mt(e,n,i,s)}return"string"==typeof t?(Z(void 0!==kt[t],`Invalid easing type '${t}'`),kt[t]):t},Mt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Dt={value:null,addProjectionMetrics:null};function Rt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Mt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&Dt.value&&Dt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const o=J.useManualTiming?s.timestamp:performance.now();n=!1,J.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:Mt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<Mt.length;e++)r[Mt[e]].cancel(t)},state:s,steps:r}}const{schedule:jt,cancel:Lt,state:Ot,steps:Bt}=Rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:it,!0);let Nt;function Ft(){Nt=void 0}const It={now:()=>(void 0===Nt&&It.set(Ot.isProcessing||J.useManualTiming?Ot.timestamp:performance.now()),Nt),set:t=>{Nt=t,queueMicrotask(Ft)}},Ut=t=>e=>"string"==typeof e&&e.startsWith(t),$t=Ut("--"),Wt=Ut("var(--"),zt=t=>!!Wt(t)&&Yt.test(t.split("/*")[0].trim()),Yt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Ht={...Xt,transform:t=>G(0,1,t)},Kt={...Xt,default:1},qt=t=>Math.round(1e5*t)/1e5,Gt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const _t=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zt=(t,e)=>n=>Boolean("string"==typeof n&&_t.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Jt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Gt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Qt={...Xt,transform:t=>Math.round((t=>G(0,255,t))(t))},te={test:Zt("rgb","red"),parse:Jt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Qt.transform(t)+", "+Qt.transform(e)+", "+Qt.transform(n)+", "+qt(Ht.transform(i))+")"};const ee={test:Zt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:te.transform},ne=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ie=ne("deg"),se=ne("%"),oe=ne("px"),re=ne("vh"),ae=ne("vw"),le=(()=>({...se,parse:t=>se.parse(t)/100,transform:t=>se.transform(100*t)}))(),ce={test:Zt("hsl","hue"),parse:Jt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+se.transform(qt(e))+", "+se.transform(qt(n))+", "+qt(Ht.transform(i))+")"},ue={test:t=>te.test(t)||ee.test(t)||ce.test(t),parse:t=>te.test(t)?te.parse(t):ce.test(t)?ce.parse(t):ee.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?te.transform(t):ce.transform(t),getAnimatableNone:t=>{const e=ue.parse(t);return e.alpha=0,ue.transform(e)}},he=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const de="number",pe="color",me=/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 fe(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(me,t=>(ue.test(t)?(i.color.push(o),s.push(pe),n.push(ue.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(de),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function ge(t){return fe(t).values}function ye(t){const{split:e,types:n}=fe(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===de?qt(t[o]):e===pe?ue.transform(t[o]):t[o]}return s}}const ve=t=>"number"==typeof t?0:ue.test(t)?ue.getAnimatableNone(t):t;const xe={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Gt)?.length||0)+(t.match(he)?.length||0)>0},parse:ge,createTransformer:ye,getAnimatableNone:function(t){const e=ge(t);return ye(t)(e.map(ve))}};function we(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function be(t,e){return n=>n>0?e:t}const Te=(t,e,n)=>t+(e-t)*n,Pe=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Se=[ee,te,ce];function Ee(t){const e=(n=t,Se.find(t=>t.test(n)));var n;if(_(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===ce&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=we(a,i,t+1/3),o=we(a,i,t),r=we(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ae=(t,e)=>{const n=Ee(t),i=Ee(e);if(!n||!i)return be(t,e);const s={...n};return t=>(s.red=Pe(n.red,i.red,t),s.green=Pe(n.green,i.green,t),s.blue=Pe(n.blue,i.blue,t),s.alpha=Te(n.alpha,i.alpha,t),te.transform(s))},Ve=new Set(["none","hidden"]);function ke(t,e){return n=>Te(t,e,n)}function Ce(t){return"number"==typeof t?ke:"string"==typeof t?zt(t)?be:ue.test(t)?Ae:Re:Array.isArray(t)?Me:"object"==typeof t?ue.test(t)?Ae:De:be}function Me(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Ce(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function De(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Ce(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Re=(t,e)=>{const n=xe.createTransformer(e),i=fe(t),s=fe(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ve.has(t)&&!s.values.length||Ve.has(e)&&!i.values.length?function(t,e){return Ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):ot(Me(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(_(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),be(t,e))};function je(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Te(t,e,n);return Ce(t)(t,e)}const Le=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>jt.update(e,t),stop:()=>Lt(e),now:()=>Ot.isProcessing?Ot.timestamp:It.now()}},Oe=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Be=2e4;function Ne(t){let e=0;let n=t.next(e);for(;!n.done&&e<Be;)e+=50,n=t.next(e);return e>=Be?1/0:e}function Fe(t,e,n){const i=Math.max(e-5,0);return ut(n-t(i),e-i)}const Ie=100,Ue=10,$e=1,We=0,ze=800,Ye=.3,Xe=.3,He={granular:.01,default:2},Ke={granular:.005,default:.5},qe=.01,Ge=10,_e=.05,Ze=1,Je=.001;function Qe({duration:t=ze,bounce:e=Ye,velocity:n=We,mass:i=$e}){let s,o;_(t<=lt(Ge),"Spring duration must be 10 seconds or less");let r=1-e;r=G(_e,Ze,r),t=G(qe,Ge,ct(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=en(e,r),l=Math.exp(-s);return Je-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=en(Math.pow(e,2),r);return(-s(e)+Je>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<tn;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=lt(t),isNaN(a))return{stiffness:Ie,damping:Ue,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const tn=12;function en(t,e){return t*Math.sqrt(1-e*e)}const nn=["duration","bounce"],sn=["stiffness","damping","mass"];function on(t,e){return e.some(e=>void 0!==t[e])}function rn(t=Xe,e=Ye){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:We,stiffness:Ie,damping:Ue,mass:$e,isResolvedFromDuration:!1,...t};if(!on(t,sn)&&on(t,nn))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:$e,stiffness:s,damping:o}}else{const n=Qe(t);e={...e,...n,mass:$e},e.isResolvedFromDuration=!0}return e}({...n,velocity:-ct(n.velocity||0)}),m=d||0,f=c/(2*Math.sqrt(l*u)),g=r-o,y=ct(Math.sqrt(l/u)),v=Math.abs(g)<5;let x;if(i||(i=v?He.granular:He.default),s||(s=v?Ke.granular:Ke.default),f<1){const t=en(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0===t?m:0;f<1&&(n=0===t?lt(m):Fe(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Ne(w),Be),e=Oe(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function an({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let w,b;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=rn({keyframes:[d.value,p(d.value)],velocity:Fe(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&x(t),d)}}}function ln(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Z(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||J.mix||je,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||it:e;o=ot(t,o)}i.push(o)}return i}(e,i,s),l=a.length,c=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=rt(t[i],t[i+1],n);return a[i](s)};return n?e=>c(G(t[0],t[o-1],e)):c}function cn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=rt(0,e,i);t.push(Te(n,1,s))}}(e,t.length-1),e}function un({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Ct):Ct(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:cn(e),t),a=ln(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||At).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}rn.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Ne(i),Be);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:ct(s)}}(t,100,rn);return t.ease=e.ease,t.duration=lt(e.duration),t.type="keyframes",t};const hn=t=>null!==t;function dn(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(hn),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const pn={decay:an,inertia:an,tween:un,keyframes:un,spring:rn};function mn(t){"string"==typeof t.type&&(t.type=pn[t.type])}class fn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const gn=t=>t/100;class yn extends fn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==It.now()&&this.tick(It.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;mn(t);const{type:e=un,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||un;"production"!==process.env.NODE_ENV&&a!==un&&Z(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),a!==un&&"number"!=typeof r[0]&&(this.mixKeyframes=ot(gn,je(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Ne(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=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)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(u){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,u+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(x=o)),v=G(0,1,n)*r}const w=y?{done:!1,value:c[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===a||(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return T&&p!==an&&(w.value=dn(c,this.options,f,this.speed)),m&&m(w.value),T&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return ct(this.calculatedDuration)}get time(){return ct(this.currentTime)}set time(t){t=lt(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(It.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ct(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Le,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(It.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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)}}const vn=t=>180*t/Math.PI,xn=t=>{const e=vn(Math.atan2(t[1],t[0]));return bn(e)},wn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:xn,rotateZ:xn,skewX:t=>vn(Math.atan(t[1])),skewY:t=>vn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},bn=t=>((t%=360)<0&&(t+=360),t),Tn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Pn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:Pn,scale:t=>(Tn(t)+Pn(t))/2,rotateX:t=>bn(vn(Math.atan2(t[6],t[5]))),rotateY:t=>bn(vn(Math.atan2(-t[2],t[0]))),rotateZ:xn,rotate:xn,skewX:t=>vn(Math.atan(t[4])),skewY:t=>vn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function En(t){return t.includes("scale")?1:0}function An(t,e){if(!t||"none"===t)return En(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Sn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=wn,s=e}if(!s)return En(e);const o=i[e],r=s[1].split(",").map(Vn);return"function"==typeof o?o(r):r[o]}function Vn(t){return parseFloat(t.trim())}const kn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cn=(()=>new Set(kn))(),Mn=t=>t===Xt||t===oe,Dn=new Set(["x","y","z"]),Rn=kn.filter(t=>!Dn.has(t));const jn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};jn.translateX=jn.x,jn.translateY=jn.y;const Ln=new Set;let On=!1,Bn=!1,Nn=!1;function Fn(){if(Bn){const t=Array.from(Ln).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Rn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Bn=!1,On=!1,Ln.forEach(t=>t.complete(Nn)),Ln.clear()}function In(){Ln.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bn=!0)})}class Un{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ln.add(this),On||(On=!0,jt.read(In),jt.resolveKeyframes(Fn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ln.delete(this)}cancel(){"scheduled"===this.state&&(Ln.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const $n=nt(()=>void 0!==window.ScrollTimeline),Wn={};function zn(t,e){const n=nt(t);return()=>Wn[e]??n()}const Yn=zn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Xn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xn([0,.65,.55,1]),circOut:Xn([.55,0,1,.45]),backIn:Xn([.31,.01,.66,-.59]),backOut:Xn([.33,1.53,.69,.99])};function Kn(t,e){return t?"function"==typeof t?Yn()?Oe(t,e):"ease-out":Vt(t)?Xn(t):Array.isArray(t)?t.map(t=>Kn(t,e)||Hn.easeOut):Hn[t]:void 0}function qn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Kn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);return t.animate(u,d)}function Gn(t){return"function"==typeof t&&"applyToOptions"in t}class _n extends fn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,Z("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:t,...e}){return Gn(t)&&Yn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=qn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=dn(i,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ct(Number(t))}get time(){return ct(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=lt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$n()?(this.animation.timeline=t,it):e(this)}}const Zn={anticipate:wt,backInOut:xt,circInOut:Pt};function Jn(t){"string"==typeof t.ease&&t.ease in Zn&&(t.ease=Zn[t.ease])}class Qn extends _n{constructor(t){Jn(t),mn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new yn({...o,autoplay:!1}),a=lt(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const ti=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!xe.test(t)&&"0"!==t||t.startsWith("url(")));function ei(t){return tt(t)&&"offsetHeight"in t}const ni=new Set(["opacity","clipPath","filter","transform"]),ii=nt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class si extends fn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=It.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||Un;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=It.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=ti(s,e),a=ti(o,e);return _(r===a,`You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Gn(n))&&i)}(t,s,o,r)||(!J.instantAnimations&&a||c?.(dn(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},h=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!ei(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return ii()&&n&&ni.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}(u)?new Qn({...u,element:u.motionValue.owner.current}):new yn(u);h.finished.then(()=>this.notifyFinished()).catch(it),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nn=!0,In(),Fn(),Nn=!1),this._animation}get duration(){return this.animation.duration}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()}}const oi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ri(t,e,n=1){Z(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=oi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Q(t)?parseFloat(t):t}return zt(s)?ri(s,e,n+1):s}function ai(t,e){return t?.[e]??t?.default??t}const li=new Set(["width","height","top","left","right","bottom",...kn]),ci=t=>e=>e.test(t),ui=[Xt,oe,se,ie,ae,re,{test:t=>"auto"===t,parse:t=>t}],hi=t=>ui.find(ci(t));function di(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||et(t))}const pi=new Set(["brightness","contrast","saturate","opacity"]);function mi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Gt)||[];if(!i)return t;const s=n.replace(i,"");let o=pi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const fi=/\b([a-z-]*)\(.*?\)/gu,gi={...xe,getAnimatableNone:t=>{const e=t.match(fi);return e?e.map(mi).join(" "):t}},yi={...Xt,transform:Math.round},vi={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,backgroundPositionX:oe,backgroundPositionY:oe,...{rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:ie,skewX:ie,skewY:ie,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:Ht,originX:le,originY:le,originZ:oe},zIndex:yi,fillOpacity:Ht,strokeOpacity:Ht,numOctaves:yi},xi={...vi,color:ue,backgroundColor:ue,outlineColor:ue,fill:ue,stroke:ue,borderColor:ue,borderTopColor:ue,borderRightColor:ue,borderBottomColor:ue,borderLeftColor:ue,filter:gi,WebkitFilter:gi},wi=t=>xi[t];function bi(t,e){let n=wi(t);return n!==gi&&(n=xe),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ti=new Set(["auto","none","0"]);class Pi extends Un{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),zt(i))){const s=ri(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!li.has(n)||2!==t.length)return;const[i,s]=t,o=hi(i),r=hi(s);if(o!==r)if(Mn(o)&&Mn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||di(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ti.has(e)&&fe(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=bi(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=jn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Si=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ei{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=It.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=It.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&dt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new at);const n=this.events[t].add(e);return"change"===t?()=>{n(),jt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&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=It.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ut(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 Ai(t,e){return new Ei(t,e)}const{schedule:Vi,cancel:ki}=Rt(queueMicrotask,!1),Ci={x:!1,y:!1};function Mi(){return Ci.x||Ci.y}function Di(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ri(t){return!("touch"===t.pointerType||Mi())}const ji=(t,e)=>!!e&&(t===e||ji(t,e.parentElement)),Li=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Oi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Bi=new WeakSet;function Ni(t){return e=>{"Enter"===e.key&&t(e)}}function Fi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ii(t){return Li(t)&&!Mi()}function Ui(t,e,n={}){const[i,s,o]=Di(t,n),r=t=>{const i=t.currentTarget;if(!Ii(t))return;Bi.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Bi.has(i)&&Bi.delete(i),Ii(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ji(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ei(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ni(()=>{if(Bi.has(n))return;Fi(n,"down");const t=Ni(()=>{Fi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Fi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Oi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function $i(t){return tt(t)&&"ownerSVGElement"in t}const Wi=t=>Boolean(t&&t.getVelocity),zi=[...ui,ue,xe],Yi=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Xi extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=ei(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Hi({children:e,isPresent:n,anchorX:s}){const o=c(),a=r(null),l=r({width:0,height:0,top:0,left:0,right:0}),{nonce:d}=u(Yi);return h(()=>{const{width:t,height:e,top:i,left:r,right:c}=l.current;if(n||!a.current||!t||!e)return;const u="left"===s?`left: ${r}`:`right: ${c}`;a.current.dataset.motionPopId=o;const h=document.createElement("style");return d&&(h.nonce=d),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${u}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.contains(h)&&document.head.removeChild(h)}},[n]),t(Xi,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Ki=({children:e,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u})=>{const h=z(qi),p=c();let m=!0,f=d(()=>(m=!1,{id:p,initial:n,isPresent:s,custom:r,onExitComplete:t=>{h.set(t,!0);for(const t of h.values())if(!t)return;o&&o()},register:t=>(h.set(t,!1),()=>h.delete(t))}),[s,h,o]);return a&&m&&(f={...f}),d(()=>{h.forEach((t,e)=>h.set(e,!1))},[s]),i.useEffect(()=>{!s&&!h.size&&o&&o()},[s]),"popLayout"===l&&(e=t(Hi,{isPresent:s,anchorX:u,children:e})),t(H.Provider,{value:f,children:e})};function qi(){return new Map}function Gi(t=!0){const e=u(H);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,o=c();l(()=>{if(t)return s(o)},[t]);const r=p(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,r]:[!0]}const _i=t=>t.key||"";function Zi(t){const e=[];return m.forEach(t,t=>{f(t)&&e.push(t)}),e}const Ji=({children:e,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:l="sync",propagate:c=!1,anchorX:h="left"})=>{const[p,m]=Gi(c),f=d(()=>Zi(e),[e]),y=c&&!p?[]:f.map(_i),v=r(!0),x=r(f),w=z(()=>new Map),[b,T]=g(f),[P,S]=g(f);X(()=>{v.current=!1,x.current=f;for(let t=0;t<P.length;t++){const e=_i(P[t]);y.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}},[P,y.length,y.join("-")]);const E=[];if(f!==b){let t=[...f];for(let e=0;e<P.length;e++){const n=P[e],i=_i(n);y.includes(i)||(t.splice(e,0,n),E.push(n))}return"wait"===l&&E.length&&(t=E),S(Zi(t)),T(f),null}"production"!==process.env.NODE_ENV&&"wait"===l&&P.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:A}=u(W);return t(n,{children:P.map(e=>{const n=_i(e),r=!(c&&!p)&&(f===P||y.includes(n));return t(Ki,{isPresent:r,initial:!(v.current&&!s)&&void 0,custom:i,presenceAffectsLayout:a,mode:l,onExitComplete:r?void 0:()=>{if(!w.has(n))return;w.set(n,!0);let t=!0;w.forEach(e=>{e||(t=!1)}),t&&(A?.(),S(x.current),c&&m?.(),o&&o())},anchorX:h,children:e},n)})})},Qi=o({strict:!1}),ts={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},es={};for(const t in ts)es[t]={isEnabled:e=>ts[t].some(t=>!!e[t])};const ns=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function is(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ns.has(t)}let ss=t=>!is(t);try{"function"==typeof(os=require("@emotion/is-prop-valid").default)&&(ss=t=>t.startsWith("on")?!is(t):os(t))}catch{}var os;function rs(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&dt(!1,"motion() is deprecated. Use motion.create() instead."),t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const as=o({});function ls(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function cs(t){return"string"==typeof t||Array.isArray(t)}const us=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...us];function ds(t){return ls(t.animate)||hs.some(e=>cs(t[e]))}function ps(t){return Boolean(ds(t)||t.variants)}function ms(t){const{initial:e,animate:n}=function(t,e){if(ds(t)){const{initial:e,animate:n}=t;return{initial:!1===e||cs(e)?e:void 0,animate:cs(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,u(as));return d(()=>({initial:e,animate:n}),[fs(e),fs(n)])}function fs(t){return Array.isArray(t)?t.join(" "):t}const gs=Symbol.for("motionComponentSymbol");function ys(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function vs(t,e,n){return p(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):ys(n)&&(n.current=i))},[e])}const xs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ws="data-"+xs("framerAppearId"),bs=o({});function Ts(t,e,n,i,s){const{visualElement:o}=u(as),a=u(Qi),c=u(H),d=u(Yi).reducedMotion,p=r(null);i=i||a.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const m=p.current,f=u(bs);!m||m.projection||!s||"html"!==m.type&&"svg"!==m.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ps(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&ys(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}(p.current,n,s,f);const g=r(!1);h(()=>{m&&g.current&&m.update(n,c)});const y=n[ws],v=r(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return X(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Vi.render(m.render),v.current&&m.animationState&&m.animationState.animateChanges())}),l(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1))}),m}function Ps(t){if(t)return!1!==t.options.allowProjection?t.projection:Ps(t.parent)}function Ss({preloadedFeatures:n,createVisualElement:i,useRender:s,useVisualState:o,Component:r}){function a(a,l){let c;const h={...u(Yi),...a,layoutId:Es(a)},{isStatic:d}=h,p=ms(a),m=o(a,d);if(!d&&Y){!function(t,e){const n=u(Qi).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?_(!1,e):Z(!1,e)}}(h,n);const t=function(t){const{drag:e,layout:n}=es;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(h);c=t.MeasureLayout,p.visualElement=Ts(r,m,h,i,t.ProjectionNode)}return e(as.Provider,{value:p,children:[c&&p.visualElement?t(c,{visualElement:p.visualElement,...h}):null,s(r,a,vs(m,p.visualElement,l),m,d,p.visualElement)]})}n&&function(t){for(const e in t)es[e]={...es[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof r?r:`create(${r.displayName??r.name??""})`}`;const l=y(a);return l[gs]=r,l}function Es({layoutId:t}){const e=u(W).id;return e&&void 0!==t?e+"-"+t:t}const As={};function Vs(t,{layout:e,layoutId:n}){return Cn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!As[t]||"opacity"===t)}const ks={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cs=kn.length;function Ms(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Cn.has(t))r=!0;else if($t(t))s[t]=n;else{const e=Si(n,vi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Cs;o++){const r=kn[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Si(a,vi[r]);l||(s=!1,i+=`${ks[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Rs(t,e,n){for(const i in e)Wi(e[i])||Vs(i,n)||(t[i]=e[i])}function js(t,e){const n={};return Rs(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ms(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Ls(t,e){const n={},i=js(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Os={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bs={offset:"strokeDashoffset",array:"strokeDasharray"};function Ns(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ms(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Os:Bs;t[o.offset]=oe.transform(-i);const r=oe.transform(e),a=oe.transform(n);t[o.array]=`${r} ${a}`}(h,s,o,r,!1)}const Fs=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Is=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Us(t,e,n,i){const s=d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ns(n,e,Is(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Rs(e,t.style,t),s.style={...e,...s.style}}return s}const $s=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ws(t){return"string"==typeof t&&!t.includes("-")&&!!($s.indexOf(t)>-1||/[A-Z]/u.test(t))}function zs(t=!1){return(e,n,i,{latestValues:s},o)=>{const r=(Ws(e)?Us:Ls)(n,s,o,e),a=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(ss(s)||!0===n&&is(s)||!e&&!is(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof e,t),l=e!==v?{...a,...r,ref:i}:{},{children:c}=n,u=d(()=>Wi(c)?c.get():c,[c]);return x(e,{...l,children:u})}}function Ys(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Xs(t,e,n,i){if("function"==typeof e){const[s,o]=Ys(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Ys(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Hs(t){return Wi(t)?t.get():t}const Ks=t=>(e,n)=>{const i=u(as),s=u(H),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:qs(n,i,s,t),renderState:e()}}(t,e,i,s);return n?o():z(o)};function qs(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Hs(o[t]);let{initial:r,animate:a}=t;const l=ds(t),c=ps(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!ls(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=Xs(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}function Gs(t,e,n){const{style:i}=t,s={};for(const o in i)(Wi(i[o])||e.style&&Wi(e.style[o])||Vs(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}const _s={useVisualState:Ks({scrapeMotionValuesFromProps:Gs,createRenderState:Ds})};function Zs(t,e,n){const i=Gs(t,e,n);for(const n in t)if(Wi(t[n])||Wi(e[n])){i[-1!==kn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Js={useVisualState:Ks({scrapeMotionValuesFromProps:Zs,createRenderState:Fs})};function Qs(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Ss({...Ws(n)?Js:_s,preloadedFeatures:t,useRender:zs(i),createVisualElement:e,Component:n})}}function to(t,e,n){const i=t.getProps();return Xs(i,e,void 0!==n?n:i.custom,t)}const eo=t=>Array.isArray(t);function no(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function io(t){return eo(t)?t[t.length-1]||0:t}function so(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Wi(i)&&i.add))return n.add(e);if(!n&&J.WillChange){const n=new J.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function oo(t){return t.props[ws]}const ro=t=>null!==t;const ao={type:"spring",stiffness:500,damping:25,restSpeed:10},lo={type:"keyframes",duration:.8},co={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uo=(t,{keyframes:e})=>e.length>2?lo:Cn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ao:co;const ho=(t,e,n,i={},s,o)=>r=>{const a=ai(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=lt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||Object.assign(u,uo(t,u)),u.duration&&(u.duration=lt(u.duration)),u.repeatDelay&&(u.repeatDelay=lt(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(h=!0)),(J.instantAnimations||J.skipAnimations)&&(h=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(ro),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(u.keyframes,a);if(void 0!==t)return void jt.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new yn(u):new si(u)};function po({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function mo(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||c&&po(c,e))continue;const r={delay:n,...ai(o||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=oo(t);if(n){const t=window.MotionHandoffAnimation(n,e,jt);null!==t&&(r.startTime=t,h=!0)}}so(t,e),i.start(ho(e,i,s,t.shouldReduceMotion&&li.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{jt.update(()=>{r&&function(t,e){const n=to(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)no(t,e,io(o[e]))}(t,r)})}),l}function fo(t,e,n={}){const i=to(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(mo(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(go).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(fo(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function go(t,e){return t.sortNodePosition(e)}function yo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const vo=hs.length;function xo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&xo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<vo;n++){const i=hs[n],s=t.props[i];(cs(s)||!1===s)&&(e[i]=s)}return e}const wo=[...us].reverse(),bo=us.length;function To(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>fo(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=fo(t,e,n);else{const s="function"==typeof e?to(t,e,n.custom):e;i=Promise.all(mo(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function Po(t){let e=To(t),n=Ao(),i=!0;const s=e=>(n,i)=>{const s=to(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=xo(t.parent)||{},l=[],c=new Set;let u={},h=1/0;for(let e=0;e<bo;e++){const d=wo[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=cs(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...u},!p.isActive&&null===g||!m&&!p.prevProp||ls(m)||"boolean"==typeof m)continue;const v=So(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const b=Array.isArray(m)?m:[m];let T=b.reduce(s(d),{});!1===g&&(T={});const{prevResolvedValues:P={}}=p,S={...P,...T},E=e=>{x=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=T[t],n=P[t];if(u.hasOwnProperty(t))continue;let i=!1;i=eo(e)&&eo(n)?!yo(e,n):e!==n,i?null!=e?E(t):c.add(t):void 0!==e&&c.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(u={...u,...T}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||w)&&l.push(...b.map(t=>({animation:t,options:{type:d}})))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=to(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ao(),i=!0}}}function So(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yo(e,t)}function Eo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ao(){return{animate:Eo(!0),whileInView:Eo(),whileHover:Eo(),whileTap:Eo(),whileDrag:Eo(),whileFocus:Eo(),exit:Eo()}}class Vo{constructor(t){this.isMounted=!1,this.node=t}update(){}}let ko=0;const Co={animation:{Feature:class extends Vo{constructor(t){super(t),t.animationState||(t.animationState=Po(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Vo{constructor(){super(...arguments),this.id=ko++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Mo(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Do(t){return{point:{x:t.pageX,y:t.pageY}}}function Ro(t,e,n,i){return Mo(t,e,(t=>e=>Li(e)&&t(e,Do(e)))(n),i)}function jo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Lo(t){return t.max-t.min}function Oo(t,e,n,i=.5){t.origin=i,t.originPoint=Te(e.min,e.max,t.origin),t.scale=Lo(n)/Lo(e),t.translate=Te(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Bo(t,e,n,i){Oo(t.x,e.x,n.x,i?i.originX:void 0),Oo(t.y,e.y,n.y,i?i.originY:void 0)}function No(t,e,n){t.min=n.min+e.min,t.max=t.min+Lo(e)}function Fo(t,e,n){t.min=e.min-n.min,t.max=t.min+Lo(e)}function Io(t,e,n){Fo(t.x,e.x,n.x),Fo(t.y,e.y,n.y)}const Uo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function $o(t){return[t("x"),t("y")]}function Wo(t){return void 0===t||1===t}function zo({scale:t,scaleX:e,scaleY:n}){return!Wo(t)||!Wo(e)||!Wo(n)}function Yo(t){return zo(t)||Xo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Xo(t){return Ho(t.x)||Ho(t.y)}function Ho(t){return t&&"0%"!==t}function Ko(t,e,n){return n+e*(t-n)}function qo(t,e,n,i,s){return void 0!==s&&(t=Ko(t,s,i)),Ko(t,n,i)+e}function Go(t,e=0,n=1,i,s){t.min=qo(t.min,e,n,i,s),t.max=qo(t.max,e,n,i,s)}function _o(t,{x:e,y:n}){Go(t.x,e.translate,e.scale,e.originPoint),Go(t.y,n.translate,n.scale,n.originPoint)}const Zo=.999999999999,Jo=1.0000000000001;function Qo(t,e){t.min=t.min+e,t.max=t.max+e}function tr(t,e,n,i,s=.5){Go(t,e,n,Te(t.min,t.max,s),i)}function er(t,e){tr(t.x,e.x,e.scaleX,e.scale,e.originX),tr(t.y,e.y,e.scaleY,e.scale,e.originY)}function nr(t,e){return jo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ir=({current:t})=>t?t.ownerDocument.defaultView:null,sr=(t,e)=>Math.abs(t-e);class or{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=lr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=sr(t.x,e.x),i=sr(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Ot;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=rr(e,this.transformPagePoint),jt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=lr("pointercancel"===t.type?this.lastMoveEventInfo:rr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Li(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=rr(Do(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Ot;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,lr(o,this.history)),this.removeListeners=ot(Ro(this.contextWindow,"pointermove",this.handlePointerMove),Ro(this.contextWindow,"pointerup",this.handlePointerUp),Ro(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lt(this.updatePoint)}}function rr(t,e){return e?{point:e(t.point)}:t}function ar(t,e){return{x:t.x-e.x,y:t.y-e.y}}function lr({point:t},e){return{point:t,delta:ar(t,ur(e)),offset:ar(t,cr(e)),velocity:hr(e,.1)}}function cr(t){return t[0]}function ur(t){return t[t.length-1]}function hr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ur(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>lt(e)));)n--;if(!i)return{x:0,y:0};const o=ct(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function dr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function pr(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const mr=.35;function fr(t,e,n){return{min:gr(t,e),max:gr(t,n)}}function gr(t,e){return"number"==typeof t?t:t[e]||0}const yr=new WeakMap;class vr{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new or(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Do(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Ci[o]?null:(Ci[o]=!0,()=>{Ci[o]=!1}):Ci.x||Ci.y?null:(Ci.x=Ci.y=!0,()=>{Ci.x=Ci.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$o(t=>{let e=this.getAxisMotionValue(t).get()||0;if(se.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Lo(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&jt.postRender(()=>s(t,e)),so(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>$o(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:ir(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&jt.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!xr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Te(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Te(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&ys(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:dr(t.x,n,s),y:dr(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=mr){return!1===t?t=0:!0===t&&(t=mr),{x:fr(t,"left","right"),y:fr(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&$o(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!ys(t))return!1;const n=t.current;Z(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=nr(t,n),{scroll:s}=e;return s&&(Qo(i.x,s.offset.x),Qo(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:pr(t.x,e.x),y:pr(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=jo(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=$o(r=>{if(!xr(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return so(this.visualElement,t),n.start(ho(t,n,0,e,this.visualElement,!1))}stopAnimation(){$o(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){$o(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){$o(e=>{const{drag:n}=this.getProps();if(!xr(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Te(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!ys(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};$o(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Lo(t),s=Lo(e);return s>i?n=rt(e.min,e.max-i,t.min):i>s&&(n=rt(t.min,t.max-s,e.min)),G(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),$o(e=>{if(!xr(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Te(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;yr.set(this.visualElement,this);const t=Ro(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();ys(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),jt.read(e);const s=Mo(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&($o(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=mr,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function xr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const wr=t=>(e,n)=>{t&&jt.postRender(()=>t(e,n))};const br={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!oe.test(t))return t;t=parseFloat(t)}return`${Tr(t,e.target.x)}% ${Tr(t,e.target.y)}%`}},Sr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=xe.parse(t);if(s.length>5)return i;const o=xe.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Te(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};class Er extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;!function(t){for(const e in t)As[e]=t[e],$t(e)&&(As[e].isCSSVariable=!0)}(Vr),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),br.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||jt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ar(e){const[n,i]=Gi(),s=u(W);return t(Er,{...e,layoutGroup:s,switchLayoutGroup:u(bs),isPresent:n,safeToRemove:i})}const Vr={borderRadius:{...Pr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pr,borderTopRightRadius:Pr,borderBottomLeftRadius:Pr,borderBottomRightRadius:Pr,boxShadow:Sr};const kr=(t,e)=>t.depth-e.depth;class Cr{constructor(){this.children=[],this.isDirty=!1}add(t){K(this.children,t),this.isDirty=!0}remove(t){q(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kr),this.isDirty=!1,this.children.forEach(t)}}const Mr=["TopLeft","TopRight","BottomLeft","BottomRight"],Dr=Mr.length,Rr=t=>"string"==typeof t?parseFloat(t):t,jr=t=>"number"==typeof t||oe.test(t);function Lr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Or=Nr(0,.5,Tt),Br=Nr(.5,.95,it);function Nr(t,e,n){return i=>i<t?0:i>e?1:n(rt(t,e,i))}function Fr(t,e){t.min=e.min,t.max=e.max}function Ir(t,e){Fr(t.x,e.x),Fr(t.y,e.y)}function Ur(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function $r(t,e,n,i,s){return t=Ko(t-=e,1/n,i),void 0!==s&&(t=Ko(t,1/s,i)),t}function Wr(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){se.test(e)&&(e=parseFloat(e),e=Te(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Te(o.min,o.max,i);t===o&&(a-=e),t.min=$r(t.min,e,n,a,s),t.max=$r(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const zr=["x","scaleX","originX"],Yr=["y","scaleY","originY"];function Xr(t,e,n,i){Wr(t.x,e,zr,n?n.x:void 0,i?i.x:void 0),Wr(t.y,e,Yr,n?n.y:void 0,i?i.y:void 0)}function Hr(t){return 0===t.translate&&1===t.scale}function Kr(t){return Hr(t.x)&&Hr(t.y)}function qr(t,e){return t.min===e.min&&t.max===e.max}function Gr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function _r(t,e){return Gr(t.x,e.x)&&Gr(t.y,e.y)}function Zr(t){return Lo(t.x)/Lo(t.y)}function Jr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Qr{constructor(){this.members=[]}add(t){K(this.members,t),t.scheduleRender()}remove(t){if(q(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ta=["","X","Y","Z"],ea={visibility:"hidden"};let na=0;function ia(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function sa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=oo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",jt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&sa(i)}function oa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=na++,this.animationId=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.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(la),this.nodes.forEach(fa),this.nodes.forEach(ga),this.nodes.forEach(ca)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new at),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;var n;this.isSVG=$i(e)&&!($i(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=It.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Lt(i),t(o-e))};return jt.setup(i,!0),()=>Lt(i)}(i,250),br.hasAnimatedSinceResize&&(br.hasAnimatedSinceResize=!1,this.nodes.forEach(ma))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Ta,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!_r(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ai(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||ma(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Lt(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(ya),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(da),this.isUpdating=!1,this.nodes.forEach(pa),this.nodes.forEach(ra),this.nodes.forEach(aa),this.clearAllSnapshots();const t=It.now();Ot.delta=G(0,1e3/60,t-Ot.timestamp),Ot.timestamp=t,Ot.isProcessing=!0,Bt.update.process(Ot),Bt.preRender.process(Ot),Bt.render.process(Ot),Ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ua),this.sharedNodes.forEach(va)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,jt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){jt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Lo(this.snapshot.measuredBox.x)||Lo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Kr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Yo(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Ea((i=n).x),Ea(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Va))){const{scroll:t}=this.root;t&&(Qo(e.x,t.offset.x),Qo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ir(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ir(e,t),Qo(e.x,s.offset.x),Qo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ir(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&er(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Yo(i.latestValues)&&er(n,i.latestValues)}return Yo(this.latestValues)&&er(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ir(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Yo(n.latestValues))continue;zo(n.latestValues)&&n.updateSnapshot();const i=Uo();Ir(i,n.measurePageBox()),Xr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Yo(this.latestValues)&&Xr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==Ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=Ot.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Io(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,r,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,r=this.relativeTarget,a=this.relativeParent.target,No(o.x,r.x,a.x),No(o.y,r.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ir(this.target,this.layout.layoutBox),_o(this.target,this.targetDelta)):Ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Io(this.relativeTargetOrigin,this.target,t.target),Ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!zo(this.parent.latestValues)&&!Xo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ot.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Ir(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&er(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,_o(t,r)),i&&Yo(o.latestValues)&&er(t,o.latestValues))}e.x<Jo&&e.x>Zo&&(e.x=1),e.y<Jo&&e.y>Zo&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Ur(this.prevProjectionDelta.x,this.projectionDelta.x),Ur(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Bo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Jr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Jr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ba));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;xa(o.x,t.x,n),xa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,wa(p.x,m.x,f.x,g),wa(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,qr(l.x,d.x)&&qr(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ir(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Te(0,n.opacity??1,Or(i)),t.opacityExit=Te(e.opacity??1,0,Br(i))):o&&(t.opacity=Te(e.opacity??1,n.opacity??1,i));for(let s=0;s<Dr;s++){const o=`border${Mr[s]}Radius`;let r=Lr(e,o),a=Lr(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||jr(r)===jr(a)?(t[o]=Math.max(Te(Rr(r),Rr(a),i),0),(se.test(a)||se.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Te(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=jt.update(()=>{br.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=function(t,e,n){const i=Wi(t)?t:Ai(t);return i.start(ho("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Lo(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Lo(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ir(e,n),er(e,s),Bo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Qr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&ia("z",t,i,this.animationValues);for(let e=0;e<ta.length;e++)ia(`rotate${ta[e]}`,t,i,this.animationValues),ia(`skew${ta[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ea;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=Hs(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Hs(t?.pointerEvents)||""),this.hasProjected&&!Yo(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(e.transform=n(s,e.transform));const{x:o,y:r}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*r.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in As){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:r}=As[t],a="none"===e.transform?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=a}else r?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?Hs(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function ra(t){t.updateLayout()}function aa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?$o(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Lo(i);i.min=n[t].min,i.max=i.min+s}):Aa(s,e.layoutBox,n)&&$o(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Lo(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Bo(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Bo(a,t.applyTransform(i,!0),e.measuredBox):Bo(a,n,e.layoutBox);const l=!Kr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Io(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Io(a,n,o.layoutBox),_r(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function la(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ca(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ua(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function da(t){t.isLayoutDirty=!1}function pa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ma(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fa(t){t.resolveTargetDelta()}function ga(t){t.calcProjection()}function ya(t){t.resetSkewAndRotation()}function va(t){t.removeLeadSnapshot()}function xa(t,e,n){t.translate=Te(e.translate,0,n),t.scale=Te(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function wa(t,e,n,i){t.min=Te(e.min,n.min,i),t.max=Te(e.max,n.max,i)}function ba(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ta={duration:.45,ease:[.4,0,.1,1]},Pa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Sa=Pa("applewebkit/")&&!Pa("chrome/")?Math.round:it;function Ea(t){t.min=Sa(t.min),t.max=Sa(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Zr(e),s=Zr(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Va(t){return t!==t.root&&t.scroll?.wasRoot}const ka=oa({attachResizeListener:(t,e)=>Mo(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ca={current:void 0},Ma=oa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ca.current){const t=new ka({});t.mount(window),t.setOptions({layoutScroll:!0}),Ca.current=t}return Ca.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Da={pan:{Feature:class extends Vo{constructor(){super(...arguments),this.removePointerDownListener=it}onPointerDown(t){this.session=new or(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ir(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:wr(t),onStart:wr(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&jt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ro(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Vo{constructor(t){super(t),this.removeGroupControls=it,this.removeListeners=it,this.controls=new vr(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||it}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ma,MeasureLayout:Ar}};function Ra(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&jt.postRender(()=>s(e,Do(e)))}function ja(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&jt.postRender(()=>s(e,Do(e)))}const La=new WeakMap,Oa=new WeakMap,Ba=t=>{const e=La.get(t.target);e&&e(t)},Na=t=>{t.forEach(Ba)};function Fa(t,e,n){const i=function({root:t,...e}){const n=t||document;Oa.has(n)||Oa.set(n,{});const i=Oa.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Na,{root:t,...e})),i[s]}(e);return La.set(t,n),i.observe(t),()=>{La.delete(t),i.unobserve(t)}}const Ia={some:0,all:1};const Ua={inView:{Feature:class extends Vo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ia[i]};return Fa(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Vo{mount(){const{current:t}=this.node;t&&(this.unmount=Ui(t,(t,e)=>(ja(this.node,e,"Start"),(t,{success:e})=>ja(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Vo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ot(Mo(this.node.current,"focus",()=>this.onFocus()),Mo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Vo{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,o]=Di(t,n),r=t=>{if(!Ri(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Ri(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}(t,(t,e)=>(Ra(this.node,e,"Start"),t=>Ra(this.node,t,"End"))))}unmount(){}}}},$a={layout:{ProjectionNode:Ma,MeasureLayout:Ar}},Wa={current:null},za={current:!1};const Ya=new WeakMap;const Xa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ha{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Un,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 t=It.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,jt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=ds(e),this.isVariantNode=ps(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==a[t]&&Wi(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Ya.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((t,e)=>this.bindToMotionValue(e,t)),za.current||function(){if(za.current=!0,Y)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wa.current=t.matches;t.addListener(e),e()}else Wa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Wa.current),"production"!==process.env.NODE_ENV&&dt(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Lt(this.notifyUpdate),Lt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Cn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&jt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in es){const e=es[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Xa.length;e++){const n=Xa[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Wi(s))t.addValue(i,s);else if(Wi(o))t.addValue(i,Ai(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Ai(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(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 e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ai(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(Q(n)||et(n))?n=parseFloat(n):(i=n,!zi.find(ci(i))&&xe.test(e)&&(n=bi(t,e))),this.setBaseTarget(t,Wi(n)?n.get():n)),Wi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Xs(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Wi(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new at),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Ka extends Ha{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Wi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function qa(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}class Ga extends Ka{constructor(){super(...arguments),this.type="html",this.renderInstance=qa}readValueFromInstance(t,e){if(Cn.has(e))return this.projection?.isProjecting?En(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=($t(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return nr(t,e)}build(t,e,n){Ms(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Gs(t,e,n)}}const _a=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"]);class Za extends Ka{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Uo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Cn.has(e)){const t=wi(e);return t&&t.default||0}return e=_a.has(e)?e:xs(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Zs(t,e,n)}build(t,e,n){Ns(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){qa(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(_a.has(n)?n:xs(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Is(t.tagName),super.mount(t)}}const Ja=(t,e)=>Ws(t)?new Za(e):new Ga(e,{allowProjection:t!==v}),Qa=rs(Qs({...Co,...Ua,...Da,...$a},Ja)),tl=({isOpen:i,onClose:s,onToggle:o,menuItems:r,logoUrl:a,logoAlt:l="Logo",systemName:c="PASS",className:u="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:h="fixed inset-0 bg-black bg-opacity-25 z-40",desktopMenuClassName:d="h-full flex flex-col",showBottomMenu:p=!0,bottomMenuItems:m=[{id:"settings",label:"Configuración",icon:I,action:()=>{}},{id:"help",label:"Ayuda",icon:B,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:N,action:()=>{}}],activePath:f="",onNavigate:y,children:v})=>{const[x,w]=g(new Set),b=t=>f.includes(t),T=(n,i=!1)=>e(Qa.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${i?"pr-4 pl-10":"px-4"} ${b(n.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>{return t=n.path,y&&y(t),void s();var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(O,{className:"w-4 h-4 transition-transform "+(b(n.path)?"rotate-90":"group-hover:translate-x-1")})]},n.id),P=n=>{const i=x.has(n.id);return e("div",{className:"mb-2",children:[e(Qa.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group text-gray-700 hover:bg-gray-100",onClick:()=>{return t=n.id,void w(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(L,{className:"w-4 h-4 transition-transform "+(i?"rotate-180":"")})]}),t(Ji,{children:i&&t(Qa.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:t("div",{className:"pt-2 space-y-1",children:n.children.map(t=>T(t,!0))})})})]},n.id)};return e(n,{children:[t(Ji,{children:i&&t(Qa.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:h,onClick:s})}),t(Qa.div,{initial:{x:"-100%"},animate:{x:i?0:"-100%"},transition:{type:"spring",stiffness:300,damping:30},className:u,children:e("div",{className:d,children:[e("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-3",children:[t("div",{className:"w-8 h-8 flex items-center justify-center",children:a?t("img",{src:a,alt:l,className:"h-full object-contain"}):t("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-sm",children:c.charAt(0)})})}),t("h1",{className:"text-lg font-bold text-gray-800",children:c})]}),t("button",{onClick:s,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t(U,{className:"w-5 h-5"})})]}),t("div",{className:"flex-1 overflow-y-auto p-4",children:t("nav",{className:"space-y-2",children:r.map(t=>"folder"===t.type?P(t.data):T(t.data))})}),p&&t("div",{className:"p-4 border-t border-gray-200",children:t("div",{className:"space-y-2",children:m.map(n=>e("button",{onClick:n.action,className:"w-full flex items-center space-x-3 px-4 py-2 rounded-lg text-gray-700 hover:bg-gray-100 transition-colors",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"text-sm",children:n.label})]},n.id))})}),v&&t("div",{className:"p-4 border-t border-gray-200",children:v})]})})]})};function el(t,e,n,i){return new(n||(n=Promise))(function(s,o){function r(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const nl=t=>{if("85"===t)return"/back85";if("87"===t)return"/back87";if("undefined"!=typeof window){if(window.location.hostname.toLowerCase().includes("seguimiento"))return"/back85"}return"/back87"},il=({backend:e,label:n="Descargar Lista de Estudiantes en Excel",fileName:i="students.xlsx",className:s,variant:o="primary",onSuccess:r,onError:a})=>{const[l,c]=g(!1);return t(T,{variant:o,onClick:()=>el(void 0,void 0,void 0,function*(){try{c(!0);const n=yield(t=e,el(void 0,void 0,void 0,function*(){const e=`${nl(t)}/student/downloadExcel`;return(yield b.get(e,{responseType:"blob"})).data})),s=URL.createObjectURL(n),o=document.createElement("a");o.href=s,o.download=i,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s),null==r||r()}catch(t){console.error("Download students excel failed",t),null==a||a(t)}finally{c(!1)}var t}),className:s,children:l?"Descargando...":n})},sl=({backend:i,label:s="Cargar Lista de Estudiantes en Excel",className:o,variant:a="secondary",onSuccess:l,onError:c})=>{const u=r(null),[h,d]=g(!1);return e(n,{children:[t(T,{variant:a,onClick:()=>{var t;null===(t=u.current)||void 0===t||t.click()},className:o,children:h?"Subiendo...":s}),t("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:t=>el(void 0,void 0,void 0,function*(){var e;const n=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!n)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(n.name)))try{d(!0),yield((t,e)=>el(void 0,void 0,void 0,function*(){const n=`${nl(e)}/student/uploadExcel`,i=new FormData;i.append("file",t,t.name),yield b.post(n,i,{headers:{"Content-Type":"multipart/form-data"}})}))(n,i),window.alert("Archivo cargado correctamente"),null==l||l()}catch(t){console.error("Upload students excel failed",t),window.alert("Hubo un problema al subir el archivo"),null==c||c(t)}finally{u.current&&(u.current.value=""),d(!1)}else window.alert("El archivo debe ser un Excel (.xlsx o .xls)")})})]})};export{T as Button,il as DownloadStudentsExcelButton,$ as Header,tl as Sidebar,sl as UploadStudentsExcelButton};
1
+ import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import*as i from"react";import s,{createContext as o,useRef as r,useLayoutEffect as a,useEffect as l,useId as c,useContext as u,useInsertionEffect as h,useMemo as d,useCallback as p,Children as m,isValidElement as f,useState as g,forwardRef as y,Fragment as v,createElement as x,Component as w}from"react";import b from"axios";const T=({variant:e="primary",onClick:n,children:i,className:s=""})=>t("button",{className:`px-4 py-2 rounded font-medium transition-colors ${{primary:"bg-primary-botech hover:bg-primary-botech-600 text-white",secondary:"bg-gray-200 hover:bg-gray-300 text-gray-800",danger:"bg-red-500 hover:bg-red-600 text-white"}[e]} ${s}`,onClick:n,children:i});var P={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},S=s.createContext&&s.createContext(P),E=["attr","size","title"];function A(t,e){if(null==t)return{};var n,i,s=function(t,e){if(null==t)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function V(){return V=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},V.apply(this,arguments)}function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function C(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(t){return t&&t.map((t,e)=>s.createElement(t.tag,M({key:e},t.attr),D(t.child)))}function R(t){return e=>s.createElement(j,V({attr:M({},t.attr)},e),D(t.child))}function j(t){var e=e=>{var n,{attr:i,size:o,title:r}=t,a=A(t,E),l=o||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),s.createElement("svg",V({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,a,{className:n,style:M(M({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),r&&s.createElement("title",null,r),t.children)};return void 0!==S?s.createElement(S.Consumer,null,t=>e(t)):e(P)}function L(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function O(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function B(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function N(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(t)}function F(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function I(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(t)}function U(t){return R({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}const $=({title:n,description:i,logoUrl:s,logoAlt:o="Logo",systemName:r="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:u="flex items-center justify-between bg-primary-botech text-white p-4 shadow-lg",logoClassName:h="h-10 object-contain",titleClassName:d="text-xl font-bold",descriptionClassName:p="text-sm opacity-80"})=>e("div",{className:u,children:[e("div",{className:"flex items-center gap-4",children:[t("button",{onClick:l,className:"p-2 rounded-lg hover:bg-primary-botech-600 transition-colors focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-20","aria-label":"Abrir menú",children:t(F,{className:"w-6 h-6"})}),e("div",{className:"flex items-center",children:[t("div",{className:"flex items-center justify-center mr-3",children:s?t("img",{src:s,alt:o,className:h}):t("div",{className:"w-10 h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t("span",{className:"text-white font-bold text-lg",children:r.charAt(0)})})}),e("div",{children:[t("h1",{className:d,children:r}),t("p",{className:p,children:a})]})]})]}),c&&e("div",{className:"text-right",children:[t("h2",{className:"text-lg font-semibold",children:n}),t("p",{className:"text-sm opacity-80",children:i})]})]}),W=o({});function z(t){const e=r(null);return null===e.current&&(e.current=t()),e.current}const Y="undefined"!=typeof window,X=Y?a:l,H=o(null);function K(t,e){-1===t.indexOf(e)&&t.push(e)}function q(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const G=(t,e,n)=>n>e?e:n<t?t:n;let _=()=>{},Z=()=>{};"production"!==process.env.NODE_ENV&&(_=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},Z=(t,e)=>{if(!t)throw new Error(e)});const J={},Q=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function tt(t){return"object"==typeof t&&null!==t}const et=t=>/^0[^.\s]+$/u.test(t);function nt(t){let e;return()=>(void 0===e&&(e=t()),e)}const it=t=>t,st=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(st),rt=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class at{constructor(){this.subscriptions=[]}add(t){return K(this.subscriptions,t),()=>q(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const lt=t=>1e3*t,ct=t=>t/1e3;function ut(t,e){return e?t*(1e3/e):0}const ht=new Set;function dt(t,e,n){t||ht.has(e)||(console.warn(e),n&&console.warn(n),ht.add(e))}const pt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function mt(t,e,n,i){if(t===e&&n===i)return it;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=pt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:pt(s(t),e,i)}const ft=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,gt=t=>e=>1-t(1-e),yt=mt(.33,1.53,.69,.99),vt=gt(yt),xt=ft(vt),wt=t=>(t*=2)<1?.5*vt(t):.5*(2-Math.pow(2,-10*(t-1))),bt=t=>1-Math.sin(Math.acos(t)),Tt=gt(bt),Pt=ft(bt),St=mt(.42,0,1,1),Et=mt(0,0,.58,1),At=mt(.42,0,.58,1),Vt=t=>Array.isArray(t)&&"number"==typeof t[0],kt={linear:it,easeIn:St,easeInOut:At,easeOut:Et,circIn:bt,circInOut:Pt,circOut:Tt,backIn:vt,backInOut:xt,backOut:yt,anticipate:wt},Mt=t=>{if(Vt(t)){Z(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return mt(e,n,i,s)}return"string"==typeof t?(Z(void 0!==kt[t],`Invalid easing type '${t}'`),kt[t]):t},Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Dt={value:null,addProjectionMetrics:null};function Rt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ct.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&Dt.value&&Dt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const o=J.useManualTiming?s.timestamp:performance.now();n=!1,J.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:Ct.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<Ct.length;e++)r[Ct[e]].cancel(t)},state:s,steps:r}}const{schedule:jt,cancel:Lt,state:Ot,steps:Bt}=Rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:it,!0);let Nt;function Ft(){Nt=void 0}const It={now:()=>(void 0===Nt&&It.set(Ot.isProcessing||J.useManualTiming?Ot.timestamp:performance.now()),Nt),set:t=>{Nt=t,queueMicrotask(Ft)}},Ut=t=>e=>"string"==typeof e&&e.startsWith(t),$t=Ut("--"),Wt=Ut("var(--"),zt=t=>!!Wt(t)&&Yt.test(t.split("/*")[0].trim()),Yt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Ht={...Xt,transform:t=>G(0,1,t)},Kt={...Xt,default:1},qt=t=>Math.round(1e5*t)/1e5,Gt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const _t=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zt=(t,e)=>n=>Boolean("string"==typeof n&&_t.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Jt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Gt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Qt={...Xt,transform:t=>Math.round((t=>G(0,255,t))(t))},te={test:Zt("rgb","red"),parse:Jt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Qt.transform(t)+", "+Qt.transform(e)+", "+Qt.transform(n)+", "+qt(Ht.transform(i))+")"};const ee={test:Zt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:te.transform},ne=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ie=ne("deg"),se=ne("%"),oe=ne("px"),re=ne("vh"),ae=ne("vw"),le=(()=>({...se,parse:t=>se.parse(t)/100,transform:t=>se.transform(100*t)}))(),ce={test:Zt("hsl","hue"),parse:Jt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+se.transform(qt(e))+", "+se.transform(qt(n))+", "+qt(Ht.transform(i))+")"},ue={test:t=>te.test(t)||ee.test(t)||ce.test(t),parse:t=>te.test(t)?te.parse(t):ce.test(t)?ce.parse(t):ee.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?te.transform(t):ce.transform(t),getAnimatableNone:t=>{const e=ue.parse(t);return e.alpha=0,ue.transform(e)}},he=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const de="number",pe="color",me=/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 fe(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(me,t=>(ue.test(t)?(i.color.push(o),s.push(pe),n.push(ue.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(de),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function ge(t){return fe(t).values}function ye(t){const{split:e,types:n}=fe(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===de?qt(t[o]):e===pe?ue.transform(t[o]):t[o]}return s}}const ve=t=>"number"==typeof t?0:ue.test(t)?ue.getAnimatableNone(t):t;const xe={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Gt)?.length||0)+(t.match(he)?.length||0)>0},parse:ge,createTransformer:ye,getAnimatableNone:function(t){const e=ge(t);return ye(t)(e.map(ve))}};function we(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function be(t,e){return n=>n>0?e:t}const Te=(t,e,n)=>t+(e-t)*n,Pe=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Se=[ee,te,ce];function Ee(t){const e=(n=t,Se.find(t=>t.test(n)));var n;if(_(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===ce&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=we(a,i,t+1/3),o=we(a,i,t),r=we(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ae=(t,e)=>{const n=Ee(t),i=Ee(e);if(!n||!i)return be(t,e);const s={...n};return t=>(s.red=Pe(n.red,i.red,t),s.green=Pe(n.green,i.green,t),s.blue=Pe(n.blue,i.blue,t),s.alpha=Te(n.alpha,i.alpha,t),te.transform(s))},Ve=new Set(["none","hidden"]);function ke(t,e){return n=>Te(t,e,n)}function Me(t){return"number"==typeof t?ke:"string"==typeof t?zt(t)?be:ue.test(t)?Ae:Re:Array.isArray(t)?Ce:"object"==typeof t?ue.test(t)?Ae:De:be}function Ce(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>Me(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function De(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Me(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Re=(t,e)=>{const n=xe.createTransformer(e),i=fe(t),s=fe(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ve.has(t)&&!s.values.length||Ve.has(e)&&!i.values.length?function(t,e){return Ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):ot(Ce(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(i,s),s.values),n):(_(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),be(t,e))};function je(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Te(t,e,n);return Me(t)(t,e)}const Le=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>jt.update(e,t),stop:()=>Lt(e),now:()=>Ot.isProcessing?Ot.timestamp:It.now()}},Oe=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Be=2e4;function Ne(t){let e=0;let n=t.next(e);for(;!n.done&&e<Be;)e+=50,n=t.next(e);return e>=Be?1/0:e}function Fe(t,e,n){const i=Math.max(e-5,0);return ut(n-t(i),e-i)}const Ie=100,Ue=10,$e=1,We=0,ze=800,Ye=.3,Xe=.3,He={granular:.01,default:2},Ke={granular:.005,default:.5},qe=.01,Ge=10,_e=.05,Ze=1,Je=.001;function Qe({duration:t=ze,bounce:e=Ye,velocity:n=We,mass:i=$e}){let s,o;_(t<=lt(Ge),"Spring duration must be 10 seconds or less");let r=1-e;r=G(_e,Ze,r),t=G(qe,Ge,ct(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=en(e,r),l=Math.exp(-s);return Je-o/a*l},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=en(Math.pow(e,2),r);return(-s(e)+Je>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<tn;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=lt(t),isNaN(a))return{stiffness:Ie,damping:Ue,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const tn=12;function en(t,e){return t*Math.sqrt(1-e*e)}const nn=["duration","bounce"],sn=["stiffness","damping","mass"];function on(t,e){return e.some(e=>void 0!==t[e])}function rn(t=Xe,e=Ye){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:We,stiffness:Ie,damping:Ue,mass:$e,isResolvedFromDuration:!1,...t};if(!on(t,sn)&&on(t,nn))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:$e,stiffness:s,damping:o}}else{const n=Qe(t);e={...e,...n,mass:$e},e.isResolvedFromDuration=!0}return e}({...n,velocity:-ct(n.velocity||0)}),m=d||0,f=c/(2*Math.sqrt(l*u)),g=r-o,y=ct(Math.sqrt(l/u)),v=Math.abs(g)<5;let x;if(i||(i=v?He.granular:He.default),s||(s=v?Ke.granular:Ke.default),f<1){const t=en(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0===t?m:0;f<1&&(n=0===t?lt(m):Fe(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Ne(w),Be),e=Oe(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function an({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let w,b;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,b=rn({keyframes:[d.value,p(d.value)],velocity:Fe(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?b.next(t-w):(!e&&x(t),d)}}}function ln(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Z(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||J.mix||je,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||it:e;o=ot(t,o)}i.push(o)}return i}(e,i,s),l=a.length,c=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=rt(t[i],t[i+1],n);return a[i](s)};return n?e=>c(G(t[0],t[o-1],e)):c}function cn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=rt(0,e,i);t.push(Te(n,1,s))}}(e,t.length-1),e}function un({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Mt):Mt(i),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:cn(e),t),a=ln(r,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||At).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}rn.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Ne(i),Be);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:ct(s)}}(t,100,rn);return t.ease=e.ease,t.duration=lt(e.duration),t.type="keyframes",t};const hn=t=>null!==t;function dn(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(hn),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const pn={decay:an,inertia:an,tween:un,keyframes:un,spring:rn};function mn(t){"string"==typeof t.type&&(t.type=pn[t.type])}class fn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const gn=t=>t/100;class yn extends fn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==It.now()&&this.tick(It.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;mn(t);const{type:e=un,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||un;"production"!==process.env.NODE_ENV&&a!==un&&Z(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),a!==un&&"number"!=typeof r[0]&&(this.mixKeyframes=ot(gn,je(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Ne(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=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)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(u){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,u+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(x=o)),v=G(0,1,n)*r}const w=y?{done:!1,value:c[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===a||(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return T&&p!==an&&(w.value=dn(c,this.options,f,this.speed)),m&&m(w.value),T&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return ct(this.calculatedDuration)}get time(){return ct(this.currentTime)}set time(t){t=lt(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(It.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ct(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Le,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(It.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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)}}const vn=t=>180*t/Math.PI,xn=t=>{const e=vn(Math.atan2(t[1],t[0]));return bn(e)},wn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:xn,rotateZ:xn,skewX:t=>vn(Math.atan(t[1])),skewY:t=>vn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},bn=t=>((t%=360)<0&&(t+=360),t),Tn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Pn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:Pn,scale:t=>(Tn(t)+Pn(t))/2,rotateX:t=>bn(vn(Math.atan2(t[6],t[5]))),rotateY:t=>bn(vn(Math.atan2(-t[2],t[0]))),rotateZ:xn,rotate:xn,skewX:t=>vn(Math.atan(t[4])),skewY:t=>vn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function En(t){return t.includes("scale")?1:0}function An(t,e){if(!t||"none"===t)return En(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Sn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=wn,s=e}if(!s)return En(e);const o=i[e],r=s[1].split(",").map(Vn);return"function"==typeof o?o(r):r[o]}function Vn(t){return parseFloat(t.trim())}const kn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mn=(()=>new Set(kn))(),Cn=t=>t===Xt||t===oe,Dn=new Set(["x","y","z"]),Rn=kn.filter(t=>!Dn.has(t));const jn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};jn.translateX=jn.x,jn.translateY=jn.y;const Ln=new Set;let On=!1,Bn=!1,Nn=!1;function Fn(){if(Bn){const t=Array.from(Ln).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Rn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Bn=!1,On=!1,Ln.forEach(t=>t.complete(Nn)),Ln.clear()}function In(){Ln.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bn=!0)})}class Un{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ln.add(this),On||(On=!0,jt.read(In),jt.resolveKeyframes(Fn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ln.delete(this)}cancel(){"scheduled"===this.state&&(Ln.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const $n=nt(()=>void 0!==window.ScrollTimeline),Wn={};function zn(t,e){const n=nt(t);return()=>Wn[e]??n()}const Yn=zn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Xn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xn([0,.65,.55,1]),circOut:Xn([.55,0,1,.45]),backIn:Xn([.31,.01,.66,-.59]),backOut:Xn([.33,1.53,.69,.99])};function Kn(t,e){return t?"function"==typeof t?Yn()?Oe(t,e):"ease-out":Vt(t)?Xn(t):Array.isArray(t)?t.map(t=>Kn(t,e)||Hn.easeOut):Hn[t]:void 0}function qn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Kn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);return t.animate(u,d)}function Gn(t){return"function"==typeof t&&"applyToOptions"in t}class _n extends fn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,Z("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:t,...e}){return Gn(t)&&Yn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=qn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=dn(i,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ct(Number(t))}get time(){return ct(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=lt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$n()?(this.animation.timeline=t,it):e(this)}}const Zn={anticipate:wt,backInOut:xt,circInOut:Pt};function Jn(t){"string"==typeof t.ease&&t.ease in Zn&&(t.ease=Zn[t.ease])}class Qn extends _n{constructor(t){Jn(t),mn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new yn({...o,autoplay:!1}),a=lt(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const ti=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!xe.test(t)&&"0"!==t||t.startsWith("url(")));function ei(t){return tt(t)&&"offsetHeight"in t}const ni=new Set(["opacity","clipPath","filter","transform"]),ii=nt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class si extends fn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=It.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||Un;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=It.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=ti(s,e),a=ti(o,e);return _(r===a,`You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Gn(n))&&i)}(t,s,o,r)||(!J.instantAnimations&&a||c?.(dn(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},h=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!ei(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return ii()&&n&&ni.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}(u)?new Qn({...u,element:u.motionValue.owner.current}):new yn(u);h.finished.then(()=>this.notifyFinished()).catch(it),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nn=!0,In(),Fn(),Nn=!1),this._animation}get duration(){return this.animation.duration}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()}}const oi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ri(t,e,n=1){Z(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=oi.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Q(t)?parseFloat(t):t}return zt(s)?ri(s,e,n+1):s}function ai(t,e){return t?.[e]??t?.default??t}const li=new Set(["width","height","top","left","right","bottom",...kn]),ci=t=>e=>e.test(t),ui=[Xt,oe,se,ie,ae,re,{test:t=>"auto"===t,parse:t=>t}],hi=t=>ui.find(ci(t));function di(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||et(t))}const pi=new Set(["brightness","contrast","saturate","opacity"]);function mi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Gt)||[];if(!i)return t;const s=n.replace(i,"");let o=pi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const fi=/\b([a-z-]*)\(.*?\)/gu,gi={...xe,getAnimatableNone:t=>{const e=t.match(fi);return e?e.map(mi).join(" "):t}},yi={...Xt,transform:Math.round},vi={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,backgroundPositionX:oe,backgroundPositionY:oe,...{rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:ie,skewX:ie,skewY:ie,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:Ht,originX:le,originY:le,originZ:oe},zIndex:yi,fillOpacity:Ht,strokeOpacity:Ht,numOctaves:yi},xi={...vi,color:ue,backgroundColor:ue,outlineColor:ue,fill:ue,stroke:ue,borderColor:ue,borderTopColor:ue,borderRightColor:ue,borderBottomColor:ue,borderLeftColor:ue,filter:gi,WebkitFilter:gi},wi=t=>xi[t];function bi(t,e){let n=wi(t);return n!==gi&&(n=xe),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ti=new Set(["auto","none","0"]);class Pi extends Un{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),zt(i))){const s=ri(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!li.has(n)||2!==t.length)return;const[i,s]=t,o=hi(i),r=hi(s);if(o!==r)if(Cn(o)&&Cn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||di(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ti.has(e)&&fe(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=bi(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=jn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Si=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ei{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=It.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=It.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&dt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new at);const n=this.events[t].add(e);return"change"===t?()=>{n(),jt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&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=It.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ut(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 Ai(t,e){return new Ei(t,e)}const{schedule:Vi,cancel:ki}=Rt(queueMicrotask,!1),Mi={x:!1,y:!1};function Ci(){return Mi.x||Mi.y}function Di(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Ri(t){return!("touch"===t.pointerType||Ci())}const ji=(t,e)=>!!e&&(t===e||ji(t,e.parentElement)),Li=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Oi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Bi=new WeakSet;function Ni(t){return e=>{"Enter"===e.key&&t(e)}}function Fi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ii(t){return Li(t)&&!Ci()}function Ui(t,e,n={}){const[i,s,o]=Di(t,n),r=t=>{const i=t.currentTarget;if(!Ii(t))return;Bi.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Bi.has(i)&&Bi.delete(i),Ii(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||ji(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ei(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ni(()=>{if(Bi.has(n))return;Fi(n,"down");const t=Ni(()=>{Fi(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Fi(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Oi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function $i(t){return tt(t)&&"ownerSVGElement"in t}const Wi=t=>Boolean(t&&t.getVelocity),zi=[...ui,ue,xe],Yi=o({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Xi extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=ei(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Hi({children:e,isPresent:n,anchorX:s}){const o=c(),a=r(null),l=r({width:0,height:0,top:0,left:0,right:0}),{nonce:d}=u(Yi);return h(()=>{const{width:t,height:e,top:i,left:r,right:c}=l.current;if(n||!a.current||!t||!e)return;const u="left"===s?`left: ${r}`:`right: ${c}`;a.current.dataset.motionPopId=o;const h=document.createElement("style");return d&&(h.nonce=d),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${u}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.contains(h)&&document.head.removeChild(h)}},[n]),t(Xi,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Ki=({children:e,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u})=>{const h=z(qi),p=c();let m=!0,f=d(()=>(m=!1,{id:p,initial:n,isPresent:s,custom:r,onExitComplete:t=>{h.set(t,!0);for(const t of h.values())if(!t)return;o&&o()},register:t=>(h.set(t,!1),()=>h.delete(t))}),[s,h,o]);return a&&m&&(f={...f}),d(()=>{h.forEach((t,e)=>h.set(e,!1))},[s]),i.useEffect(()=>{!s&&!h.size&&o&&o()},[s]),"popLayout"===l&&(e=t(Hi,{isPresent:s,anchorX:u,children:e})),t(H.Provider,{value:f,children:e})};function qi(){return new Map}function Gi(t=!0){const e=u(H);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,o=c();l(()=>{if(t)return s(o)},[t]);const r=p(()=>t&&i&&i(o),[o,i,t]);return!n&&i?[!1,r]:[!0]}const _i=t=>t.key||"";function Zi(t){const e=[];return m.forEach(t,t=>{f(t)&&e.push(t)}),e}const Ji=({children:e,custom:i,initial:s=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:l="sync",propagate:c=!1,anchorX:h="left"})=>{const[p,m]=Gi(c),f=d(()=>Zi(e),[e]),y=c&&!p?[]:f.map(_i),v=r(!0),x=r(f),w=z(()=>new Map),[b,T]=g(f),[P,S]=g(f);X(()=>{v.current=!1,x.current=f;for(let t=0;t<P.length;t++){const e=_i(P[t]);y.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}},[P,y.length,y.join("-")]);const E=[];if(f!==b){let t=[...f];for(let e=0;e<P.length;e++){const n=P[e],i=_i(n);y.includes(i)||(t.splice(e,0,n),E.push(n))}return"wait"===l&&E.length&&(t=E),S(Zi(t)),T(f),null}"production"!==process.env.NODE_ENV&&"wait"===l&&P.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:A}=u(W);return t(n,{children:P.map(e=>{const n=_i(e),r=!(c&&!p)&&(f===P||y.includes(n));return t(Ki,{isPresent:r,initial:!(v.current&&!s)&&void 0,custom:i,presenceAffectsLayout:a,mode:l,onExitComplete:r?void 0:()=>{if(!w.has(n))return;w.set(n,!0);let t=!0;w.forEach(e=>{e||(t=!1)}),t&&(A?.(),S(x.current),c&&m?.(),o&&o())},anchorX:h,children:e},n)})})},Qi=o({strict:!1}),ts={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},es={};for(const t in ts)es[t]={isEnabled:e=>ts[t].some(t=>!!e[t])};const ns=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function is(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ns.has(t)}let ss=t=>!is(t);try{"function"==typeof(os=require("@emotion/is-prop-valid").default)&&(ss=t=>t.startsWith("on")?!is(t):os(t))}catch{}var os;function rs(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&dt(!1,"motion() is deprecated. Use motion.create() instead."),t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const as=o({});function ls(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function cs(t){return"string"==typeof t||Array.isArray(t)}const us=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...us];function ds(t){return ls(t.animate)||hs.some(e=>cs(t[e]))}function ps(t){return Boolean(ds(t)||t.variants)}function ms(t){const{initial:e,animate:n}=function(t,e){if(ds(t)){const{initial:e,animate:n}=t;return{initial:!1===e||cs(e)?e:void 0,animate:cs(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,u(as));return d(()=>({initial:e,animate:n}),[fs(e),fs(n)])}function fs(t){return Array.isArray(t)?t.join(" "):t}const gs=Symbol.for("motionComponentSymbol");function ys(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function vs(t,e,n){return p(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):ys(n)&&(n.current=i))},[e])}const xs=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ws="data-"+xs("framerAppearId"),bs=o({});function Ts(t,e,n,i,s){const{visualElement:o}=u(as),a=u(Qi),c=u(H),d=u(Yi).reducedMotion,p=r(null);i=i||a.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const m=p.current,f=u(bs);!m||m.projection||!s||"html"!==m.type&&"svg"!==m.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ps(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&ys(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}(p.current,n,s,f);const g=r(!1);h(()=>{m&&g.current&&m.update(n,c)});const y=n[ws],v=r(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return X(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Vi.render(m.render),v.current&&m.animationState&&m.animationState.animateChanges())}),l(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1))}),m}function Ps(t){if(t)return!1!==t.options.allowProjection?t.projection:Ps(t.parent)}function Ss({preloadedFeatures:n,createVisualElement:i,useRender:s,useVisualState:o,Component:r}){function a(a,l){let c;const h={...u(Yi),...a,layoutId:Es(a)},{isStatic:d}=h,p=ms(a),m=o(a,d);if(!d&&Y){!function(t,e){const n=u(Qi).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?_(!1,e):Z(!1,e)}}(h,n);const t=function(t){const{drag:e,layout:n}=es;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(h);c=t.MeasureLayout,p.visualElement=Ts(r,m,h,i,t.ProjectionNode)}return e(as.Provider,{value:p,children:[c&&p.visualElement?t(c,{visualElement:p.visualElement,...h}):null,s(r,a,vs(m,p.visualElement,l),m,d,p.visualElement)]})}n&&function(t){for(const e in t)es[e]={...es[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof r?r:`create(${r.displayName??r.name??""})`}`;const l=y(a);return l[gs]=r,l}function Es({layoutId:t}){const e=u(W).id;return e&&void 0!==t?e+"-"+t:t}const As={};function Vs(t,{layout:e,layoutId:n}){return Mn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!As[t]||"opacity"===t)}const ks={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ms=kn.length;function Cs(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(Mn.has(t))r=!0;else if($t(t))s[t]=n;else{const e=Si(n,vi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=function(t,e,n){let i="",s=!0;for(let o=0;o<Ms;o++){const r=kn[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Si(a,vi[r]);l||(s=!1,i+=`${ks[r]||r}(${t}) `),n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}const Ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Rs(t,e,n){for(const i in e)Wi(e[i])||Vs(i,n)||(t[i]=e[i])}function js(t,e){const n={};return Rs(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Cs(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Ls(t,e){const n={},i=js(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Os={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bs={offset:"strokeDashoffset",array:"strokeDasharray"};function Ns(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Cs(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Os:Bs;t[o.offset]=oe.transform(-i);const r=oe.transform(e),a=oe.transform(n);t[o.array]=`${r} ${a}`}(h,s,o,r,!1)}const Fs=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Is=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Us(t,e,n,i){const s=d(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ns(n,e,Is(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};Rs(e,t.style,t),s.style={...e,...s.style}}return s}const $s=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ws(t){return"string"==typeof t&&!t.includes("-")&&!!($s.indexOf(t)>-1||/[A-Z]/u.test(t))}function zs(t=!1){return(e,n,i,{latestValues:s},o)=>{const r=(Ws(e)?Us:Ls)(n,s,o,e),a=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(ss(s)||!0===n&&is(s)||!e&&!is(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(n,"string"==typeof e,t),l=e!==v?{...a,...r,ref:i}:{},{children:c}=n,u=d(()=>Wi(c)?c.get():c,[c]);return x(e,{...l,children:u})}}function Ys(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Xs(t,e,n,i){if("function"==typeof e){const[s,o]=Ys(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Ys(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Hs(t){return Wi(t)?t.get():t}const Ks=t=>(e,n)=>{const i=u(as),s=u(H),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:qs(n,i,s,t),renderState:e()}}(t,e,i,s);return n?o():z(o)};function qs(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Hs(o[t]);let{initial:r,animate:a}=t;const l=ds(t),c=ps(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!ls(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=Xs(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}function Gs(t,e,n){const{style:i}=t,s={};for(const o in i)(Wi(i[o])||e.style&&Wi(e.style[o])||Vs(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}const _s={useVisualState:Ks({scrapeMotionValuesFromProps:Gs,createRenderState:Ds})};function Zs(t,e,n){const i=Gs(t,e,n);for(const n in t)if(Wi(t[n])||Wi(e[n])){i[-1!==kn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Js={useVisualState:Ks({scrapeMotionValuesFromProps:Zs,createRenderState:Fs})};function Qs(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Ss({...Ws(n)?Js:_s,preloadedFeatures:t,useRender:zs(i),createVisualElement:e,Component:n})}}function to(t,e,n){const i=t.getProps();return Xs(i,e,void 0!==n?n:i.custom,t)}const eo=t=>Array.isArray(t);function no(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function io(t){return eo(t)?t[t.length-1]||0:t}function so(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Wi(i)&&i.add))return n.add(e);if(!n&&J.WillChange){const n=new J.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function oo(t){return t.props[ws]}const ro=t=>null!==t;const ao={type:"spring",stiffness:500,damping:25,restSpeed:10},lo={type:"keyframes",duration:.8},co={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uo=(t,{keyframes:e})=>e.length>2?lo:Mn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ao:co;const ho=(t,e,n,i={},s,o)=>r=>{const a=ai(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=lt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||Object.assign(u,uo(t,u)),u.duration&&(u.duration=lt(u.duration)),u.repeatDelay&&(u.repeatDelay=lt(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(h=!0)),(J.instantAnimations||J.skipAnimations)&&(h=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(ro),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(u.keyframes,a);if(void 0!==t)return void jt.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new yn(u):new si(u)};function po({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function mo(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||c&&po(c,e))continue;const r={delay:n,...ai(o||{},e)},u=i.get();if(void 0!==u&&!i.isAnimating&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=oo(t);if(n){const t=window.MotionHandoffAnimation(n,e,jt);null!==t&&(r.startTime=t,h=!0)}}so(t,e),i.start(ho(e,i,s,t.shouldReduceMotion&&li.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{jt.update(()=>{r&&function(t,e){const n=to(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o)no(t,e,io(o[e]))}(t,r)})}),l}function fo(t,e,n={}){const i=to(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(mo(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(go).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(fo(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function go(t,e){return t.sortNodePosition(e)}function yo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const vo=hs.length;function xo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&xo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<vo;n++){const i=hs[n],s=t.props[i];(cs(s)||!1===s)&&(e[i]=s)}return e}const wo=[...us].reverse(),bo=us.length;function To(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>fo(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=fo(t,e,n);else{const s="function"==typeof e?to(t,e,n.custom):e;i=Promise.all(mo(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function Po(t){let e=To(t),n=Ao(),i=!0;const s=e=>(n,i)=>{const s=to(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=xo(t.parent)||{},l=[],c=new Set;let u={},h=1/0;for(let e=0;e<bo;e++){const d=wo[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=cs(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...u},!p.isActive&&null===g||!m&&!p.prevProp||ls(m)||"boolean"==typeof m)continue;const v=So(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const b=Array.isArray(m)?m:[m];let T=b.reduce(s(d),{});!1===g&&(T={});const{prevResolvedValues:P={}}=p,S={...P,...T},E=e=>{x=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in S){const e=T[t],n=P[t];if(u.hasOwnProperty(t))continue;let i=!1;i=eo(e)&&eo(n)?!yo(e,n):e!==n,i?null!=e?E(t):c.add(t):void 0!==e&&c.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(u={...u,...T}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||w)&&l.push(...b.map(t=>({animation:t,options:{type:d}})))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=to(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ao(),i=!0}}}function So(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!yo(e,t)}function Eo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ao(){return{animate:Eo(!0),whileInView:Eo(),whileHover:Eo(),whileTap:Eo(),whileDrag:Eo(),whileFocus:Eo(),exit:Eo()}}class Vo{constructor(t){this.isMounted=!1,this.node=t}update(){}}let ko=0;const Mo={animation:{Feature:class extends Vo{constructor(t){super(t),t.animationState||(t.animationState=Po(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Vo{constructor(){super(...arguments),this.id=ko++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Co(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Do(t){return{point:{x:t.pageX,y:t.pageY}}}function Ro(t,e,n,i){return Co(t,e,(t=>e=>Li(e)&&t(e,Do(e)))(n),i)}function jo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Lo(t){return t.max-t.min}function Oo(t,e,n,i=.5){t.origin=i,t.originPoint=Te(e.min,e.max,t.origin),t.scale=Lo(n)/Lo(e),t.translate=Te(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Bo(t,e,n,i){Oo(t.x,e.x,n.x,i?i.originX:void 0),Oo(t.y,e.y,n.y,i?i.originY:void 0)}function No(t,e,n){t.min=n.min+e.min,t.max=t.min+Lo(e)}function Fo(t,e,n){t.min=e.min-n.min,t.max=t.min+Lo(e)}function Io(t,e,n){Fo(t.x,e.x,n.x),Fo(t.y,e.y,n.y)}const Uo=()=>({x:{min:0,max:0},y:{min:0,max:0}});function $o(t){return[t("x"),t("y")]}function Wo(t){return void 0===t||1===t}function zo({scale:t,scaleX:e,scaleY:n}){return!Wo(t)||!Wo(e)||!Wo(n)}function Yo(t){return zo(t)||Xo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Xo(t){return Ho(t.x)||Ho(t.y)}function Ho(t){return t&&"0%"!==t}function Ko(t,e,n){return n+e*(t-n)}function qo(t,e,n,i,s){return void 0!==s&&(t=Ko(t,s,i)),Ko(t,n,i)+e}function Go(t,e=0,n=1,i,s){t.min=qo(t.min,e,n,i,s),t.max=qo(t.max,e,n,i,s)}function _o(t,{x:e,y:n}){Go(t.x,e.translate,e.scale,e.originPoint),Go(t.y,n.translate,n.scale,n.originPoint)}const Zo=.999999999999,Jo=1.0000000000001;function Qo(t,e){t.min=t.min+e,t.max=t.max+e}function tr(t,e,n,i,s=.5){Go(t,e,n,Te(t.min,t.max,s),i)}function er(t,e){tr(t.x,e.x,e.scaleX,e.scale,e.originX),tr(t.y,e.y,e.scaleY,e.scale,e.originY)}function nr(t,e){return jo(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const ir=({current:t})=>t?t.ownerDocument.defaultView:null,sr=(t,e)=>Math.abs(t-e);class or{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=lr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=sr(t.x,e.x),i=sr(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Ot;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=rr(e,this.transformPagePoint),jt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=lr("pointercancel"===t.type?this.lastMoveEventInfo:rr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Li(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=rr(Do(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Ot;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,lr(o,this.history)),this.removeListeners=ot(Ro(this.contextWindow,"pointermove",this.handlePointerMove),Ro(this.contextWindow,"pointerup",this.handlePointerUp),Ro(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lt(this.updatePoint)}}function rr(t,e){return e?{point:e(t.point)}:t}function ar(t,e){return{x:t.x-e.x,y:t.y-e.y}}function lr({point:t},e){return{point:t,delta:ar(t,ur(e)),offset:ar(t,cr(e)),velocity:hr(e,.1)}}function cr(t){return t[0]}function ur(t){return t[t.length-1]}function hr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ur(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>lt(e)));)n--;if(!i)return{x:0,y:0};const o=ct(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function dr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function pr(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const mr=.35;function fr(t,e,n){return{min:gr(t,e),max:gr(t,n)}}function gr(t,e){return"number"==typeof t?t:t[e]||0}const yr=new WeakMap;class vr{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new or(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Do(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Mi[o]?null:(Mi[o]=!0,()=>{Mi[o]=!1}):Mi.x||Mi.y?null:(Mi.x=Mi.y=!0,()=>{Mi.x=Mi.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$o(t=>{let e=this.getAxisMotionValue(t).get()||0;if(se.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Lo(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&jt.postRender(()=>s(t,e)),so(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>$o(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:ir(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&jt.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!xr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Te(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Te(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&ys(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:dr(t.x,n,s),y:dr(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=mr){return!1===t?t=0:!0===t&&(t=mr),{x:fr(t,"left","right"),y:fr(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&$o(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!ys(t))return!1;const n=t.current;Z(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=nr(t,n),{scroll:s}=e;return s&&(Qo(i.x,s.offset.x),Qo(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:pr(t.x,e.x),y:pr(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=jo(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=$o(r=>{if(!xr(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return so(this.visualElement,t),n.start(ho(t,n,0,e,this.visualElement,!1))}stopAnimation(){$o(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){$o(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){$o(e=>{const{drag:n}=this.getProps();if(!xr(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Te(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!ys(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};$o(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Lo(t),s=Lo(e);return s>i?n=rt(e.min,e.max-i,t.min):i>s&&(n=rt(t.min,t.max-s,e.min)),G(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),$o(e=>{if(!xr(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Te(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;yr.set(this.visualElement,this);const t=Ro(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();ys(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),jt.read(e);const s=Co(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&($o(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=mr,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function xr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const wr=t=>(e,n)=>{t&&jt.postRender(()=>t(e,n))};const br={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!oe.test(t))return t;t=parseFloat(t)}return`${Tr(t,e.target.x)}% ${Tr(t,e.target.y)}%`}},Sr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=xe.parse(t);if(s.length>5)return i;const o=xe.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Te(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}};class Er extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;!function(t){for(const e in t)As[e]=t[e],$t(e)&&(As[e].isCSSVariable=!0)}(Vr),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),br.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||jt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ar(e){const[n,i]=Gi(),s=u(W);return t(Er,{...e,layoutGroup:s,switchLayoutGroup:u(bs),isPresent:n,safeToRemove:i})}const Vr={borderRadius:{...Pr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pr,borderTopRightRadius:Pr,borderBottomLeftRadius:Pr,borderBottomRightRadius:Pr,boxShadow:Sr};const kr=(t,e)=>t.depth-e.depth;class Mr{constructor(){this.children=[],this.isDirty=!1}add(t){K(this.children,t),this.isDirty=!0}remove(t){q(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(kr),this.isDirty=!1,this.children.forEach(t)}}const Cr=["TopLeft","TopRight","BottomLeft","BottomRight"],Dr=Cr.length,Rr=t=>"string"==typeof t?parseFloat(t):t,jr=t=>"number"==typeof t||oe.test(t);function Lr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Or=Nr(0,.5,Tt),Br=Nr(.5,.95,it);function Nr(t,e,n){return i=>i<t?0:i>e?1:n(rt(t,e,i))}function Fr(t,e){t.min=e.min,t.max=e.max}function Ir(t,e){Fr(t.x,e.x),Fr(t.y,e.y)}function Ur(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function $r(t,e,n,i,s){return t=Ko(t-=e,1/n,i),void 0!==s&&(t=Ko(t,1/s,i)),t}function Wr(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){se.test(e)&&(e=parseFloat(e),e=Te(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Te(o.min,o.max,i);t===o&&(a-=e),t.min=$r(t.min,e,n,a,s),t.max=$r(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const zr=["x","scaleX","originX"],Yr=["y","scaleY","originY"];function Xr(t,e,n,i){Wr(t.x,e,zr,n?n.x:void 0,i?i.x:void 0),Wr(t.y,e,Yr,n?n.y:void 0,i?i.y:void 0)}function Hr(t){return 0===t.translate&&1===t.scale}function Kr(t){return Hr(t.x)&&Hr(t.y)}function qr(t,e){return t.min===e.min&&t.max===e.max}function Gr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function _r(t,e){return Gr(t.x,e.x)&&Gr(t.y,e.y)}function Zr(t){return Lo(t.x)/Lo(t.y)}function Jr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Qr{constructor(){this.members=[]}add(t){K(this.members,t),t.scheduleRender()}remove(t){if(q(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ta=["","X","Y","Z"],ea={visibility:"hidden"};let na=0;function ia(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function sa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=oo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",jt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&sa(i)}function oa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=na++,this.animationId=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.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(la),this.nodes.forEach(fa),this.nodes.forEach(ga),this.nodes.forEach(ca)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new at),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;var n;this.isSVG=$i(e)&&!($i(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=It.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Lt(i),t(o-e))};return jt.setup(i,!0),()=>Lt(i)}(i,250),br.hasAnimatedSinceResize&&(br.hasAnimatedSinceResize=!1,this.nodes.forEach(ma))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Ta,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!_r(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ai(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||ma(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Lt(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(ya),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ha);this.isUpdating||this.nodes.forEach(da),this.isUpdating=!1,this.nodes.forEach(pa),this.nodes.forEach(ra),this.nodes.forEach(aa),this.clearAllSnapshots();const t=It.now();Ot.delta=G(0,1e3/60,t-Ot.timestamp),Ot.timestamp=t,Ot.isProcessing=!0,Bt.update.process(Ot),Bt.preRender.process(Ot),Bt.render.process(Ot),Ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ua),this.sharedNodes.forEach(va)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,jt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){jt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Lo(this.snapshot.measuredBox.x)||Lo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Kr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Yo(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Ea((i=n).x),Ea(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Va))){const{scroll:t}=this.root;t&&(Qo(e.x,t.offset.x),Qo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ir(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ir(e,t),Qo(e.x,s.offset.x),Qo(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ir(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&er(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Yo(i.latestValues)&&er(n,i.latestValues)}return Yo(this.latestValues)&&er(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ir(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Yo(n.latestValues))continue;zo(n.latestValues)&&n.updateSnapshot();const i=Uo();Ir(i,n.measurePageBox()),Xr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Yo(this.latestValues)&&Xr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==Ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=Ot.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Io(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,r,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,r=this.relativeTarget,a=this.relativeParent.target,No(o.x,r.x,a.x),No(o.y,r.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ir(this.target,this.layout.layoutBox),_o(this.target,this.targetDelta)):Ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Io(this.relativeTargetOrigin,this.target,t.target),Ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!zo(this.parent.latestValues)&&!Xo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ot.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Ir(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&er(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,_o(t,r)),i&&Yo(o.latestValues)&&er(t,o.latestValues))}e.x<Jo&&e.x>Zo&&(e.x=1),e.y<Jo&&e.y>Zo&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Ur(this.prevProjectionDelta.x,this.projectionDelta.x),Ur(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Bo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Jr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Jr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ba));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;xa(o.x,t.x,n),xa(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,wa(p.x,m.x,f.x,g),wa(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,qr(l.x,d.x)&&qr(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ir(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Te(0,n.opacity??1,Or(i)),t.opacityExit=Te(e.opacity??1,0,Br(i))):o&&(t.opacity=Te(e.opacity??1,n.opacity??1,i));for(let s=0;s<Dr;s++){const o=`border${Cr[s]}Radius`;let r=Lr(e,o),a=Lr(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||jr(r)===jr(a)?(t[o]=Math.max(Te(Rr(r),Rr(a),i),0),(se.test(a)||se.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Te(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=jt.update(()=>{br.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=function(t,e,n){const i=Wi(t)?t:Ai(t);return i.start(ho("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Lo(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Lo(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ir(e,n),er(e,s),Bo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Qr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&ia("z",t,i,this.animationValues);for(let e=0;e<ta.length;e++)ia(`rotate${ta[e]}`,t,i,this.animationValues),ia(`skew${ta[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ea;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=Hs(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Hs(t?.pointerEvents)||""),this.hasProjected&&!Yo(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(e.transform=n(s,e.transform));const{x:o,y:r}=this.projectionDelta;e.transformOrigin=`${100*o.origin}% ${100*r.origin}% 0`,i.animationValues?e.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const t in As){if(void 0===s[t])continue;const{correct:n,applyTo:o,isCSSVariable:r}=As[t],a="none"===e.transform?s[t]:n(s[t],i);if(o){const t=o.length;for(let n=0;n<t;n++)e[o[n]]=a}else r?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?Hs(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function ra(t){t.updateLayout()}function aa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?$o(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Lo(i);i.min=n[t].min,i.max=i.min+s}):Aa(s,e.layoutBox,n)&&$o(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Lo(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Bo(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Bo(a,t.applyTransform(i,!0),e.measuredBox):Bo(a,n,e.layoutBox);const l=!Kr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Io(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Io(a,n,o.layoutBox),_r(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function la(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ca(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ua(t){t.clearSnapshot()}function ha(t){t.clearMeasurements()}function da(t){t.isLayoutDirty=!1}function pa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ma(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fa(t){t.resolveTargetDelta()}function ga(t){t.calcProjection()}function ya(t){t.resetSkewAndRotation()}function va(t){t.removeLeadSnapshot()}function xa(t,e,n){t.translate=Te(e.translate,0,n),t.scale=Te(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function wa(t,e,n,i){t.min=Te(e.min,n.min,i),t.max=Te(e.max,n.max,i)}function ba(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ta={duration:.45,ease:[.4,0,.1,1]},Pa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Sa=Pa("applewebkit/")&&!Pa("chrome/")?Math.round:it;function Ea(t){t.min=Sa(t.min),t.max=Sa(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Zr(e),s=Zr(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Va(t){return t!==t.root&&t.scroll?.wasRoot}const ka=oa({attachResizeListener:(t,e)=>Co(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},Ca=oa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new ka({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Da={pan:{Feature:class extends Vo{constructor(){super(...arguments),this.removePointerDownListener=it}onPointerDown(t){this.session=new or(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ir(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:wr(t),onStart:wr(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&jt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Ro(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Vo{constructor(t){super(t),this.removeGroupControls=it,this.removeListeners=it,this.controls=new vr(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||it}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ca,MeasureLayout:Ar}};function Ra(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&jt.postRender(()=>s(e,Do(e)))}function ja(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&jt.postRender(()=>s(e,Do(e)))}const La=new WeakMap,Oa=new WeakMap,Ba=t=>{const e=La.get(t.target);e&&e(t)},Na=t=>{t.forEach(Ba)};function Fa(t,e,n){const i=function({root:t,...e}){const n=t||document;Oa.has(n)||Oa.set(n,{});const i=Oa.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Na,{root:t,...e})),i[s]}(e);return La.set(t,n),i.observe(t),()=>{La.delete(t),i.unobserve(t)}}const Ia={some:0,all:1};const Ua={inView:{Feature:class extends Vo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Ia[i]};return Fa(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Vo{mount(){const{current:t}=this.node;t&&(this.unmount=Ui(t,(t,e)=>(ja(this.node,e,"Start"),(t,{success:e})=>ja(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Vo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ot(Co(this.node.current,"focus",()=>this.onFocus()),Co(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Vo{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,o]=Di(t,n),r=t=>{if(!Ri(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{Ri(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}(t,(t,e)=>(Ra(this.node,e,"Start"),t=>Ra(this.node,t,"End"))))}unmount(){}}}},$a={layout:{ProjectionNode:Ca,MeasureLayout:Ar}},Wa={current:null},za={current:!1};const Ya=new WeakMap;const Xa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ha{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Un,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 t=It.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,jt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=ds(e),this.isVariantNode=ps(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==a[t]&&Wi(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Ya.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((t,e)=>this.bindToMotionValue(e,t)),za.current||function(){if(za.current=!0,Y)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wa.current=t.matches;t.addListener(e),e()}else Wa.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Wa.current),"production"!==process.env.NODE_ENV&&dt(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Lt(this.notifyUpdate),Lt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Mn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&jt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in es){const e=es[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Xa.length;e++){const n=Xa[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Wi(s))t.addValue(i,s);else if(Wi(o))t.addValue(i,Ai(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Ai(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(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 e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ai(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(Q(n)||et(n))?n=parseFloat(n):(i=n,!zi.find(ci(i))&&xe.test(e)&&(n=bi(t,e))),this.setBaseTarget(t,Wi(n)?n.get():n)),Wi(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Xs(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Wi(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new at),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Ka extends Ha{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Wi(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function qa(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}class Ga extends Ka{constructor(){super(...arguments),this.type="html",this.renderInstance=qa}readValueFromInstance(t,e){if(Mn.has(e))return this.projection?.isProjecting?En(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=($t(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return nr(t,e)}build(t,e,n){Cs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Gs(t,e,n)}}const _a=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"]);class Za extends Ka{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Uo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Mn.has(e)){const t=wi(e);return t&&t.default||0}return e=_a.has(e)?e:xs(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Zs(t,e,n)}build(t,e,n){Ns(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){qa(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(_a.has(n)?n:xs(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Is(t.tagName),super.mount(t)}}const Ja=(t,e)=>Ws(t)?new Za(e):new Ga(e,{allowProjection:t!==v}),Qa=rs(Qs({...Mo,...Ua,...Da,...$a},Ja)),tl=({isOpen:i,onClose:s,onToggle:o,menuItems:r,logoUrl:a,logoAlt:l="Logo",systemName:c="PASS",className:u="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:h="fixed inset-0 bg-black bg-opacity-25 z-40",desktopMenuClassName:d="h-full flex flex-col",showBottomMenu:p=!0,bottomMenuItems:m=[{id:"settings",label:"Configuración",icon:I,action:()=>{}},{id:"help",label:"Ayuda",icon:B,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:N,action:()=>{}}],activePath:f="",onNavigate:y,children:v})=>{const[x,w]=g(new Set),b=t=>f.includes(t),T=(n,i=!1)=>e(Qa.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${i?"pr-4 pl-10":"px-4"} ${b(n.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>{return t=n.path,y&&y(t),void s();var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(O,{className:"w-4 h-4 transition-transform "+(b(n.path)?"rotate-90":"group-hover:translate-x-1")})]},n.id),P=n=>{const i=x.has(n.id);return e("div",{className:"mb-2",children:[e(Qa.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group text-gray-700 hover:bg-gray-100",onClick:()=>{return t=n.id,void w(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(L,{className:"w-4 h-4 transition-transform "+(i?"rotate-180":"")})]}),t(Ji,{children:i&&t(Qa.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:t("div",{className:"pt-2 space-y-1",children:n.children.map(t=>T(t,!0))})})})]},n.id)};return e(n,{children:[t(Ji,{children:i&&t(Qa.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:h,onClick:s})}),t(Qa.div,{initial:{x:"-100%"},animate:{x:i?0:"-100%"},transition:{type:"spring",stiffness:300,damping:30},className:u,children:e("div",{className:d,children:[e("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-3",children:[t("div",{className:"w-8 h-8 flex items-center justify-center",children:a?t("img",{src:a,alt:l,className:"h-full object-contain"}):t("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-sm",children:c.charAt(0)})})}),t("h1",{className:"text-lg font-bold text-gray-800",children:c})]}),t("button",{onClick:s,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t(U,{className:"w-5 h-5"})})]}),t("div",{className:"flex-1 overflow-y-auto p-4",children:t("nav",{className:"space-y-2",children:r.map(t=>"folder"===t.type?P(t.data):T(t.data))})}),p&&t("div",{className:"p-4 border-t border-gray-200",children:t("div",{className:"space-y-2",children:m.map(n=>e("button",{onClick:n.action,className:"w-full flex items-center space-x-3 px-4 py-2 rounded-lg text-gray-700 hover:bg-gray-100 transition-colors",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"text-sm",children:n.label})]},n.id))})}),v&&t("div",{className:"p-4 border-t border-gray-200",children:v})]})})]})};function el(t,e,n,i){return new(n||(n=Promise))(function(s,o){function r(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const nl=t=>{if("85"===t)return"/back85";if("87"===t)return"/back87";if("undefined"!=typeof window){if(window.location.hostname.toLowerCase().includes("seguimiento"))return"/back85"}return"/back87"},il=({backend:e,label:n="Descargar Lista de Estudiantes en Excel",fileName:i="students.xlsx",className:s,variant:o="primary",onSuccess:r,onError:a})=>{const[l,c]=g(!1);return t(T,{variant:o,onClick:()=>el(void 0,void 0,void 0,function*(){try{c(!0);const n=yield(t=e,el(void 0,void 0,void 0,function*(){const e=`${nl(t)}/student/downloadExcel`;return(yield b.get(e,{responseType:"blob"})).data})),s=URL.createObjectURL(n),o=document.createElement("a");o.href=s,o.download=i,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s),null==r||r()}catch(t){console.error("Download students excel failed",t),null==a||a(t)}finally{c(!1)}var t}),className:s,children:l?"Descargando...":n})},sl=({backend:i,label:s="Cargar Lista de Estudiantes en Excel",className:o,variant:a="primary",onSuccess:l,onError:c})=>{const u=r(null),[h,d]=g(!1);return e(n,{children:[t(T,{variant:a,onClick:()=>{var t;null===(t=u.current)||void 0===t||t.click()},className:o,children:h?"Subiendo...":s}),t("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:t=>el(void 0,void 0,void 0,function*(){var e;const n=null===(e=t.target.files)||void 0===e?void 0:e[0];if(console.log("File selected:",n),!n)return;console.log("File name:",n.name),console.log("File size:",n.size),console.log("File type:",n.type);if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(n.name)))if(0!==n.size)try{d(!0),console.log("About to upload file:",n.name,"Size:",n.size),yield((t,e)=>el(void 0,void 0,void 0,function*(){const n=`${nl(e)}/student/uploadExcel`;console.log("Upload URL:",n),console.log("File to upload:",t.name,"Size:",t.size,"Type:",t.type);const i=new FormData;i.append("file",t,t.name),console.log("FormData created with file"),console.log("Making POST request..."),yield b.post(n,i),console.log("Upload completed successfully")}))(n,i),window.alert("Archivo cargado correctamente"),null==l||l()}catch(t){console.error("Upload students excel failed",t),console.error("Error details:",t),window.alert("Hubo un problema al subir el archivo"),null==c||c(t)}finally{u.current&&(u.current.value=""),d(!1)}else window.alert("El archivo está vacío");else window.alert("El archivo debe ser un Excel (.xlsx o .xls)")})})]})};export{T as Button,il as DownloadStudentsExcelButton,$ as Header,tl as Sidebar,sl as UploadStudentsExcelButton};
2
2
  //# sourceMappingURL=index.js.map