botech-library 1.0.67 → 1.0.72

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/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("react/jsx-runtime"),e=require("react"),n=require("sweetalert2"),i=require("axios"),s=require("react-dom");function r(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var o=r(e);const a=({variant:e="primary",size:n="md",onClick:i,children:s,className:r="",disabled:o=!1})=>{const a={primary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsx("button",{className:`rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[n]} ${a[e]} ${r}`,onClick:o?void 0:i,disabled:o,children:s})};var l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=e.createContext&&e.createContext(l),d=["attr","size","title"];function u(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 r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function h(){return h=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},h.apply(this,arguments)}function m(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function f(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 g(t){return t&&t.map((t,n)=>e.createElement(t.tag,p({key:n},t.attr),g(t.child)))}function x(t){return n=>e.createElement(y,h({attr:p({},t.attr)},n),g(t.child))}function y(t){var n=n=>{var i,{attr:s,size:r,title:o}=t,a=u(t,d),l=r||n.size||"1em";return n.className&&(i=n.className),t.className&&(i=(i?i+" ":"")+t.className),e.createElement("svg",h({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,a,{className:i,style:p(p({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&e.createElement("title",null,o),t.children)};return void 0!==c?e.createElement(c.Consumer,null,t=>n(t)):n(l)}function v(t){return x({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 b(t){return x({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 w(t){return x({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 j(t){return x({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 S(t){return x({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 C(t){return x({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 T(t){return x({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 E=e.createContext({});function k(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const P="undefined"!=typeof window,N=P?e.useLayoutEffect:e.useEffect,M=e.createContext(null);function A(t,e){-1===t.indexOf(e)&&t.push(e)}function V(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const D=(t,e,n)=>n>e?e:n<t?t:n;let R=()=>{},L=()=>{};"production"!==process.env.NODE_ENV&&(R=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},L=(t,e)=>{if(!t)throw new Error(e)});const B={},F=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function O(t){return"object"==typeof t&&null!==t}const z=t=>/^0[^.\s]+$/u.test(t);function I(t){let e;return()=>(void 0===e&&(e=t()),e)}const $=t=>t,W=(t,e)=>n=>e(t(n)),U=(...t)=>t.reduce(W),H=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class _{constructor(){this.subscriptions=[]}add(t){return A(this.subscriptions,t),()=>V(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 Y=t=>1e3*t,X=t=>t/1e3;function K(t,e){return e?t*(1e3/e):0}const q=new Set;function G(t,e,n){t||q.has(e)||(console.warn(e),n&&console.warn(n),q.add(e))}const Z=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function J(t,e,n,i){if(t===e&&n===i)return $;const s=e=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=Z(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:Z(s(t),e,i)}const Q=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,tt=t=>e=>1-t(1-e),et=J(.33,1.53,.69,.99),nt=tt(et),it=Q(nt),st=t=>(t*=2)<1?.5*nt(t):.5*(2-Math.pow(2,-10*(t-1))),rt=t=>1-Math.sin(Math.acos(t)),ot=tt(rt),at=Q(rt),lt=J(.42,0,1,1),ct=J(0,0,.58,1),dt=J(.42,0,.58,1),ut=t=>Array.isArray(t)&&"number"==typeof t[0],ht={linear:$,easeIn:lt,easeInOut:dt,easeOut:ct,circIn:rt,circInOut:at,circOut:ot,backIn:nt,backInOut:it,backOut:et,anticipate:st},mt=t=>{if(ut(t)){L(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return J(e,n,i,s)}return"string"==typeof t?(L(void 0!==ht[t],`Invalid easing type '${t}'`),ht[t]):t},pt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ft={value:null,addProjectionMetrics:null};function gt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=pt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){o.has(e)&&(d.schedule(e),t()),l++,e(a)}const d={schedule:(t,e=!1,r=!1)=>{const a=r&&s?n:i;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),o.delete(t)},process:t=>{a=t,s?r=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&ft.value&&ft.value.frameloop[e].push(l),l=0,n.clear(),s=!1,r&&(r=!1,d.process(t)))}};return d}(r,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:m,postRender:p}=o,f=()=>{const r=B.useManualTiming?s.timestamp:performance.now();n=!1,B.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),m.process(s),p.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:pt.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<pt.length;e++)o[pt[e]].cancel(t)},state:s,steps:o}}const{schedule:xt,cancel:yt,state:vt,steps:bt}=gt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:$,!0);let wt;function jt(){wt=void 0}const St={now:()=>(void 0===wt&&St.set(vt.isProcessing||B.useManualTiming?vt.timestamp:performance.now()),wt),set:t=>{wt=t,queueMicrotask(jt)}},Ct=t=>e=>"string"==typeof e&&e.startsWith(t),Tt=Ct("--"),Et=Ct("var(--"),kt=t=>!!Et(t)&&Pt.test(t.split("/*")[0].trim()),Pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Mt={...Nt,transform:t=>D(0,1,t)},At={...Nt,default:1},Vt=t=>Math.round(1e5*t)/1e5,Dt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Rt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Lt=(t,e)=>n=>Boolean("string"==typeof n&&Rt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Bt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,r,o,a]=i.match(Dt);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ft={...Nt,transform:t=>Math.round((t=>D(0,255,t))(t))},Ot={test:Lt("rgb","red"),parse:Bt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ft.transform(t)+", "+Ft.transform(e)+", "+Ft.transform(n)+", "+Vt(Mt.transform(i))+")"};const zt={test:Lt("#"),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:Ot.transform},It=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),$t=It("deg"),Wt=It("%"),Ut=It("px"),Ht=It("vh"),_t=It("vw"),Yt=(()=>({...Wt,parse:t=>Wt.parse(t)/100,transform:t=>Wt.transform(100*t)}))(),Xt={test:Lt("hsl","hue"),parse:Bt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Wt.transform(Vt(e))+", "+Wt.transform(Vt(n))+", "+Vt(Mt.transform(i))+")"},Kt={test:t=>Ot.test(t)||zt.test(t)||Xt.test(t),parse:t=>Ot.test(t)?Ot.parse(t):Xt.test(t)?Xt.parse(t):zt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ot.transform(t):Xt.transform(t),getAnimatableNone:t=>{const e=Kt.parse(t);return e.alpha=0,Kt.transform(e)}},qt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Gt="number",Zt="color",Jt=/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 Qt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const o=e.replace(Jt,t=>(Kt.test(t)?(i.color.push(r),s.push(Zt),n.push(Kt.parse(t))):t.startsWith("var(")?(i.var.push(r),s.push("var"),n.push(t)):(i.number.push(r),s.push(Gt),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:i,types:s}}function te(t){return Qt(t).values}function ee(t){const{split:e,types:n}=Qt(t),i=e.length;return t=>{let s="";for(let r=0;r<i;r++)if(s+=e[r],void 0!==t[r]){const e=n[r];s+=e===Gt?Vt(t[r]):e===Zt?Kt.transform(t[r]):t[r]}return s}}const ne=t=>"number"==typeof t?0:Kt.test(t)?Kt.getAnimatableNone(t):t;const ie={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Dt)?.length||0)+(t.match(qt)?.length||0)>0},parse:te,createTransformer:ee,getAnimatableNone:function(t){const e=te(t);return ee(t)(e.map(ne))}};function se(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 re(t,e){return n=>n>0?e:t}const oe=(t,e,n)=>t+(e-t)*n,ae=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},le=[zt,Ot,Xt];function ce(t){const e=(n=t,le.find(t=>t.test(n)));var n;if(R(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===Xt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=se(a,i,t+1/3),r=se(a,i,t),o=se(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(i)),i}const de=(t,e)=>{const n=ce(t),i=ce(e);if(!n||!i)return re(t,e);const s={...n};return t=>(s.red=ae(n.red,i.red,t),s.green=ae(n.green,i.green,t),s.blue=ae(n.blue,i.blue,t),s.alpha=oe(n.alpha,i.alpha,t),Ot.transform(s))},ue=new Set(["none","hidden"]);function he(t,e){return n=>oe(t,e,n)}function me(t){return"number"==typeof t?he:"string"==typeof t?kt(t)?re:Kt.test(t)?de:ge:Array.isArray(t)?pe:"object"==typeof t?Kt.test(t)?de:fe:re}function pe(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 fe(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 ge=(t,e)=>{const n=ie.createTransformer(e),i=Qt(t),s=Qt(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?ue.has(t)&&!s.values.length||ue.has(e)&&!i.values.length?function(t,e){return ue.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):U(pe(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):(R(!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.`),re(t,e))};function xe(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return oe(t,e,n);return me(t)(t,e)}const ye=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>xt.update(e,t),stop:()=>yt(e),now:()=>vt.isProcessing?vt.timestamp:St.now()}},ve=(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 we(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 je(t,e,n){const i=Math.max(e-5,0);return K(n-t(i),e-i)}const Se=100,Ce=10,Te=1,Ee=0,ke=800,Pe=.3,Ne=.3,Me={granular:.01,default:2},Ae={granular:.005,default:.5},Ve=.01,De=10,Re=.05,Le=1,Be=.001;function Fe({duration:t=ke,bounce:e=Pe,velocity:n=Ee,mass:i=Te}){let s,r;R(t<=Y(De),"Spring duration must be 10 seconds or less");let o=1-e;o=D(Re,Le,o),t=D(Ve,De,X(t)),o<1?(s=e=>{const i=e*o,s=i*t,r=i-n,a=ze(e,o),l=Math.exp(-s);return Be-r/a*l},r=e=>{const i=e*o*t,r=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=ze(Math.pow(e,2),o);return(-s(e)+Be>0?-1:1)*((r-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<Oe;n++)i-=t(i)/e(i);return i}(s,r,5/t);if(t=Y(t),isNaN(a))return{stiffness:Se,damping:Ce,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const Oe=12;function ze(t,e){return t*Math.sqrt(1-e*e)}const Ie=["duration","bounce"],$e=["stiffness","damping","mass"];function We(t,e){return e.some(e=>void 0!==t[e])}function Ue(t=Ne,e=Pe){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:m}=function(t){let e={velocity:Ee,stiffness:Se,damping:Ce,mass:Te,isResolvedFromDuration:!1,...t};if(!We(t,$e)&&We(t,Ie))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*D(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Te,stiffness:s,damping:r}}else{const n=Fe(t);e={...e,...n,mass:Te},e.isResolvedFromDuration=!0}return e}({...n,velocity:-X(n.velocity||0)}),p=h||0,f=c/(2*Math.sqrt(l*d)),g=o-r,x=X(Math.sqrt(l/d)),y=Math.abs(g)<5;let v;if(i||(i=y?Me.granular:Me.default),s||(s=y?Ae.granular:Ae.default),f<1){const t=ze(x,f);v=e=>{const n=Math.exp(-f*x*e);return o-n*((p+f*x*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)v=t=>o-Math.exp(-x*t)*(g+(p+x*g)*t);else{const t=x*Math.sqrt(f*f-1);v=e=>{const n=Math.exp(-f*x*e),i=Math.min(t*e,300);return o-n*((p+f*x*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:m&&u||null,next:t=>{const e=v(t);if(m)a.done=t>=u;else{let n=0===t?p:0;f<1&&(n=0===t?Y(p):je(v,t,e));const r=Math.abs(n)<=i,l=Math.abs(o-e)<=s;a.done=r&&l}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(we(b),be),e=ve(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function He({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=u+p,g=void 0===o?f:o(f);g!==f&&(p=g-u);const x=t=>-p*Math.exp(-t/i),y=t=>g+x(t),v=t=>{const e=x(t),n=y(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let b,w;const j=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=Ue({keyframes:[h.value,m(h.value)],velocity:je(y,t,h.value),damping:s,stiffness:r,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,v(t),j(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&v(t),h)}}}function _e(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(L(r===e.length,"Both input and output ranges must be the same length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||B.mix||xe,r=t.length-1;for(let n=0;n<r;n++){let r=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||$:e;r=U(t,r)}i.push(r)}return i}(e,i,s),l=a.length,c=n=>{if(o&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=H(t[i],t[i+1],n);return a[i](s)};return n?e=>c(D(t[0],t[r-1],e)):c}function Ye(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=H(0,e,i);t.push(oe(n,1,s))}}(e,t.length-1),e}function Xe({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),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ye(e),t),a=_e(o,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||dt).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}Ue.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(we(i),be);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:X(s)}}(t,100,Ue);return t.ease=e.ease,t.duration=Y(e.duration),t.type="keyframes",t};const Ke=t=>null!==t;function qe(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(Ke),o=s<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const Ge={decay:He,inertia:He,tween:Xe,keyframes:Xe,spring:Ue};function Ze(t){"string"==typeof t.type&&(t.type=Ge[t.type])}class Je{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 Qe=t=>t/100;class tn extends Je{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!==St.now()&&this.tick(St.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;Ze(t);const{type:e=Xe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||Xe;"production"!==process.env.NODE_ENV&&a!==Xe&&L(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),a!==Xe&&"number"!=typeof o[0]&&(this.mixKeyframes=U(Qe,xe(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=we(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:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:m,onUpdate:p,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),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let y=this.currentTime,v=n;if(d){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===u?(n=1-n,h&&(n-=h/o)):"mirror"===u&&(v=r)),y=D(0,1,n)*o}const b=x?{done:!1,value:c[0]}:v.next(y);s&&(b.value=s(b.value));let{done:w}=b;x||null===a||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return j&&m!==He&&(b.value=qe(c,this.options,f,this.speed)),p&&p(b.value),j&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return X(this.calculatedDuration)}get time(){return X(this.currentTime)}set time(t){t=Y(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(St.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=X(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ye,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(St.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 en=t=>180*t/Math.PI,nn=t=>{const e=en(Math.atan2(t[1],t[0]));return rn(e)},sn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:nn,rotateZ:nn,skewX:t=>en(Math.atan(t[1])),skewY:t=>en(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},rn=t=>((t%=360)<0&&(t+=360),t),on=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),an=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ln={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:on,scaleY:an,scale:t=>(on(t)+an(t))/2,rotateX:t=>rn(en(Math.atan2(t[6],t[5]))),rotateY:t=>rn(en(Math.atan2(-t[2],t[0]))),rotateZ:nn,rotate:nn,skewX:t=>en(Math.atan(t[4])),skewY:t=>en(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function cn(t){return t.includes("scale")?1:0}function dn(t,e){if(!t||"none"===t)return cn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=ln,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=sn,s=e}if(!s)return cn(e);const r=i[e],o=s[1].split(",").map(un);return"function"==typeof r?r(o):o[r]}function un(t){return parseFloat(t.trim())}const hn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mn=(()=>new Set(hn))(),pn=t=>t===Nt||t===Ut,fn=new Set(["x","y","z"]),gn=hn.filter(t=>!fn.has(t));const xn={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})=>dn(e,"x"),y:(t,{transform:e})=>dn(e,"y")};xn.translateX=xn.x,xn.translateY=xn.y;const yn=new Set;let vn=!1,bn=!1,wn=!1;function jn(){if(bn){const t=Array.from(yn).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 gn.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,vn=!1,yn.forEach(t=>t.complete(wn)),yn.clear()}function Sn(){yn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(bn=!0)})}class Cn{constructor(t,e,n,i,s,r=!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=r}scheduleResolve(){this.state="scheduled",this.isAsync?(yn.add(this),vn||(vn=!0,xt.read(Sn),xt.resolveKeyframes(jn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,r);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),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),yn.delete(this)}cancel(){"scheduled"===this.state&&(yn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Tn=I(()=>void 0!==window.ScrollTimeline),En={};function kn(t,e){const n=I(t);return()=>En[e]??n()}const Pn=kn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Nn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nn([0,.65,.55,1]),circOut:Nn([.55,0,1,.45]),backIn:Nn([.31,.01,.66,-.59]),backOut:Nn([.33,1.53,.69,.99])};function An(t,e){return t?"function"==typeof t?Pn()?ve(t,e):"ease-out":ut(t)?Nn(t):Array.isArray(t)?t.map(t=>An(t,e)||Mn.easeOut):Mn[t]:void 0}function Vn(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:n};l&&(d.offset=l);const u=An(a,s);Array.isArray(u)&&(d.easing=u);const h={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};c&&(h.pseudoElement=c);return t.animate(d,h)}function Dn(t){return"function"==typeof t&&"applyToOptions"in t}class Rn extends Je{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=t,L("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 Dn(t)&&Pn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Vn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=qe(i,this.options,o,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 X(Number(t))}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Y(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&&Tn()?(this.animation.timeline=t,$):e(this)}}const Ln={anticipate:st,backInOut:it,circInOut:at};function Bn(t){"string"==typeof t.ease&&t.ease in Ln&&(t.ease=Ln[t.ease])}class Fn extends Rn{constructor(t){Bn(t),Ze(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new tn({...r,autoplay:!1}),a=Y(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const On=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ie.test(t)&&"0"!==t||t.startsWith("url(")));function zn(t){return O(t)&&"offsetHeight"in t}const In=new Set(["opacity","clipPath","filter","transform"]),$n=I(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Wn extends Je{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=St.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||Cn;this.keyframeResolver=new h(o,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:o,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=St.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=On(s,e),a=On(r,e);return R(o===a,`You are trying to animate ${e} from "${s}" to "${r}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${r} via the \`style\` property.`),!(!o||!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||Dn(n))&&i)}(t,s,r,o)||(!B.instantAnimations&&a||c?.(qe(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!zn(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return $n()&&n&&In.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(d)?new Fn({...d,element:d.motionValue.owner.current}):new tn(d);u.finished.then(()=>this.notifyFinished()).catch($),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}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(),wn=!0,Sn(),jn(),wn=!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 Un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hn(t,e,n=1){L(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=Un.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const t=r.trim();return F(t)?parseFloat(t):t}return kt(s)?Hn(s,e,n+1):s}function _n(t,e){return t?.[e]??t?.default??t}const Yn=new Set(["width","height","top","left","right","bottom",...hn]),Xn=t=>e=>e.test(t),Kn=[Nt,Ut,Wt,$t,_t,Ht,{test:t=>"auto"===t,parse:t=>t}],qn=t=>Kn.find(Xn(t));function Gn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||z(t))}const Zn=new Set(["brightness","contrast","saturate","opacity"]);function Jn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Dt)||[];if(!i)return t;const s=n.replace(i,"");let r=Zn.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const Qn=/\b([a-z-]*)\(.*?\)/gu,ti={...ie,getAnimatableNone:t=>{const e=t.match(Qn);return e?e.map(Jn).join(" "):t}},ei={...Nt,transform:Math.round},ni={borderWidth:Ut,borderTopWidth:Ut,borderRightWidth:Ut,borderBottomWidth:Ut,borderLeftWidth:Ut,borderRadius:Ut,radius:Ut,borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomRightRadius:Ut,borderBottomLeftRadius:Ut,width:Ut,maxWidth:Ut,height:Ut,maxHeight:Ut,top:Ut,right:Ut,bottom:Ut,left:Ut,padding:Ut,paddingTop:Ut,paddingRight:Ut,paddingBottom:Ut,paddingLeft:Ut,margin:Ut,marginTop:Ut,marginRight:Ut,marginBottom:Ut,marginLeft:Ut,backgroundPositionX:Ut,backgroundPositionY:Ut,...{rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:$t,skewX:$t,skewY:$t,distance:Ut,translateX:Ut,translateY:Ut,translateZ:Ut,x:Ut,y:Ut,z:Ut,perspective:Ut,transformPerspective:Ut,opacity:Mt,originX:Yt,originY:Yt,originZ:Ut},zIndex:ei,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:ei},ii={...ni,color:Kt,backgroundColor:Kt,outlineColor:Kt,fill:Kt,stroke:Kt,borderColor:Kt,borderTopColor:Kt,borderRightColor:Kt,borderBottomColor:Kt,borderLeftColor:Kt,filter:ti,WebkitFilter:ti},si=t=>ii[t];function ri(t,e){let n=si(t);return n!==ti&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const oi=new Set(["auto","none","0"]);class ai extends Cn{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(),kt(i))){const s=Hn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Yn.has(n)||2!==t.length)return;const[i,s]=t,r=qn(i),o=qn(s);if(r!==o)if(pn(r)&&pn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else xn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Gn(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&&!oi.has(e)&&Qt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=ri(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=xn[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,r=n[s];n[s]=xn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const li=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ci{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=St.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=St.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&&G(!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 _);const n=this.events[t].add(e);return"change"===t?()=>{n(),xt.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=St.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return K(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 di(t,e){return new ci(t,e)}const{schedule:ui,cancel:hi}=gt(queueMicrotask,!1),mi={x:!1,y:!1};function pi(){return mi.x||mi.y}function fi(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 gi(t){return!("touch"===t.pointerType||pi())}const xi=(t,e)=>!!e&&(t===e||xi(t,e.parentElement)),yi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,vi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const bi=new WeakSet;function wi(t){return e=>{"Enter"===e.key&&t(e)}}function ji(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Si(t){return yi(t)&&!pi()}function Ci(t,e,n={}){const[i,s,r]=fi(t,n),o=t=>{const i=t.currentTarget;if(!Si(t))return;bi.add(i);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),bi.has(i)&&bi.delete(i),Si(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||xi(i,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),zn(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=wi(()=>{if(bi.has(n))return;ji(n,"down");const t=wi(()=>{ji(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ji(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,vi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}function Ti(t){return O(t)&&"ownerSVGElement"in t}const Ei=t=>Boolean(t&&t.getVelocity),ki=[...Kn,Kt,ie],Pi=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ni extends o.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=zn(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 Mi({children:n,isPresent:i,anchorX:s}){const r=e.useId(),a=e.useRef(null),l=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=e.useContext(Pi);return e.useInsertionEffect(()=>{const{width:t,height:e,top:n,left:o,right:d}=l.current;if(i||!a.current||!t||!e)return;const u="left"===s?`left: ${o}`:`right: ${d}`;a.current.dataset.motionPopId=r;const h=document.createElement("style");return c&&(h.nonce=c),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${u}px !important;\n top: ${n}px !important;\n }\n `),()=>{document.head.contains(h)&&document.head.removeChild(h)}},[i]),t.jsx(Ni,{isPresent:i,childRef:a,sizeRef:l,children:o.cloneElement(n,{ref:a})})}const Ai=({children:n,initial:i,isPresent:s,onExitComplete:r,custom:a,presenceAffectsLayout:l,mode:c,anchorX:d})=>{const u=k(Vi),h=e.useId();let m=!0,p=e.useMemo(()=>(m=!1,{id:h,initial:i,isPresent:s,custom:a,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;r&&r()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[s,u,r]);return l&&m&&(p={...p}),e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),o.useEffect(()=>{!s&&!u.size&&r&&r()},[s]),"popLayout"===c&&(n=t.jsx(Mi,{isPresent:s,anchorX:d,children:n})),t.jsx(M.Provider,{value:p,children:n})};function Vi(){return new Map}function Di(t=!0){const n=e.useContext(M);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:r}=n,o=e.useId();e.useEffect(()=>{if(t)return r(o)},[t]);const a=e.useCallback(()=>t&&s&&s(o),[o,s,t]);return!i&&s?[!1,a]:[!0]}const Ri=t=>t.key||"";function Li(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Bi=({children:n,custom:i,initial:s=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left"})=>{const[d,u]=Di(l),h=e.useMemo(()=>Li(n),[n]),m=l&&!d?[]:h.map(Ri),p=e.useRef(!0),f=e.useRef(h),g=k(()=>new Map),[x,y]=e.useState(h),[v,b]=e.useState(h);N(()=>{p.current=!1,f.current=h;for(let t=0;t<v.length;t++){const e=Ri(v[t]);m.includes(e)?g.delete(e):!0!==g.get(e)&&g.set(e,!1)}},[v,m.length,m.join("-")]);const w=[];if(h!==x){let t=[...h];for(let e=0;e<v.length;e++){const n=v[e],i=Ri(n);m.includes(i)||(t.splice(e,0,n),w.push(n))}return"wait"===a&&w.length&&(t=w),b(Li(t)),y(h),null}"production"!==process.env.NODE_ENV&&"wait"===a&&v.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:j}=e.useContext(E);return t.jsx(t.Fragment,{children:v.map(e=>{const n=Ri(e),x=!(l&&!d)&&(h===v||m.includes(n));return t.jsx(Ai,{isPresent:x,initial:!(p.current&&!s)&&void 0,custom:i,presenceAffectsLayout:o,mode:a,onExitComplete:x?void 0:()=>{if(!g.has(n))return;g.set(n,!0);let t=!0;g.forEach(e=>{e||(t=!1)}),t&&(j?.(),b(f.current),l&&u?.(),r&&r())},anchorX:c,children:e},n)})})},Fi=e.createContext({strict:!1}),Oi={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"]},zi={};for(const t in Oi)zi[t]={isEnabled:e=>Oi[t].some(t=>!!e[t])};const Ii=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 $i(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ii.has(t)}let Wi=t=>!$i(t);try{"function"==typeof(Ui=require("@emotion/is-prop-valid").default)&&(Wi=t=>t.startsWith("on")?!$i(t):Ui(t))}catch{}var Ui;function Hi(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&G(!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 _i=e.createContext({});function Yi(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Xi(t){return"string"==typeof t||Array.isArray(t)}const Ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qi=["initial",...Ki];function Gi(t){return Yi(t.animate)||qi.some(e=>Xi(t[e]))}function Zi(t){return Boolean(Gi(t)||t.variants)}function Ji(t){const{initial:n,animate:i}=function(t,e){if(Gi(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Xi(e)?e:void 0,animate:Xi(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(_i));return e.useMemo(()=>({initial:n,animate:i}),[Qi(n),Qi(i)])}function Qi(t){return Array.isArray(t)?t.join(" "):t}const ts=Symbol.for("motionComponentSymbol");function es(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ns(t,n,i){return e.useCallback(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):es(i)&&(i.current=e))},[n])}const is=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ss="data-"+is("framerAppearId"),rs=e.createContext({});function os(t,n,i,s,r){const{visualElement:o}=e.useContext(_i),a=e.useContext(Fi),l=e.useContext(M),c=e.useContext(Pi).reducedMotion,d=e.useRef(null);s=s||a.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const u=d.current,h=e.useContext(rs);!u||u.projection||!r||"html"!==u.type&&"svg"!==u.type||function(t,e,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:as(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:Boolean(o)||a&&es(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:i,crossfade:d,layoutScroll:l,layoutRoot:c})}(d.current,i,r,h);const m=e.useRef(!1);e.useInsertionEffect(()=>{u&&m.current&&u.update(i,l)});const p=i[ss],f=e.useRef(Boolean(p)&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return N(()=>{u&&(m.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),ui.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),e.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),f.current=!1))}),u}function as(t){if(t)return!1!==t.options.allowProjection?t.projection:as(t.parent)}function ls({preloadedFeatures:n,createVisualElement:i,useRender:s,useVisualState:r,Component:o}){function a(a,l){let c;const d={...e.useContext(Pi),...a,layoutId:cs(a)},{isStatic:u}=d,h=Ji(a),m=r(a,u);if(!u&&P){!function(t,n){const i=e.useContext(Fi).strict;if("production"!==process.env.NODE_ENV&&n&&i){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?R(!1,e):L(!1,e)}}(d,n);const t=function(t){const{drag:e,layout:n}=zi;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(d);c=t.MeasureLayout,h.visualElement=os(o,m,d,i,t.ProjectionNode)}return t.jsxs(_i.Provider,{value:h,children:[c&&h.visualElement?t.jsx(c,{visualElement:h.visualElement,...d}):null,s(o,a,ns(m,h.visualElement,l),m,u,h.visualElement)]})}n&&function(t){for(const e in t)zi[e]={...zi[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const l=e.forwardRef(a);return l[ts]=o,l}function cs({layoutId:t}){const n=e.useContext(E).id;return n&&void 0!==t?n+"-"+t:t}const ds={};function us(t,{layout:e,layoutId:n}){return mn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ds[t]||"opacity"===t)}const hs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ms=hn.length;function ps(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(mn.has(t))o=!0;else if(Tt(t))s[t]=n;else{const e=li(n,ni[t]);t.startsWith("origin")?(a=!0,r[t]=e):i[t]=e}}if(e.transform||(o||n?i.transform=function(t,e,n){let i="",s=!0;for(let r=0;r<ms;r++){const o=hn[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=li(a,ni[o]);l||(s=!1,i+=`${hs[o]||o}(${t}) `),n&&(e[o]=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}=r;i.transformOrigin=`${t} ${e} ${n}`}}const fs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gs(t,e,n){for(const i in e)Ei(e[i])||us(i,n)||(t[i]=e[i])}function xs(t,n){const i={};return gs(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return ps(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ys(t,e){const n={},i=xs(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 vs={offset:"stroke-dashoffset",array:"stroke-dasharray"},bs={offset:"strokeDashoffset",array:"strokeDasharray"};function ws(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,c,d){if(ps(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:h}=t;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?vs:bs;t[r.offset]=Ut.transform(-i);const o=Ut.transform(e),a=Ut.transform(n);t[r.array]=`${o} ${a}`}(u,s,r,o,!1)}const js=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Ss=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Cs(t,n,i,s){const r=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return ws(e,n,Ss(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};gs(e,t.style,t),r.style={...e,...r.style}}return r}const Ts=["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 Es(t){return"string"==typeof t&&!t.includes("-")&&!!(Ts.indexOf(t)>-1||/[A-Z]/u.test(t))}function ks(t=!1){return(n,i,s,{latestValues:r},o)=>{const a=(Es(n)?Cs:ys)(i,r,o,n),l=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Wi(s)||!0===n&&$i(s)||!e&&!$i(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(i,"string"==typeof n,t),c=n!==e.Fragment?{...l,...a,ref:s}:{},{children:d}=i,u=e.useMemo(()=>Ei(d)?d.get():d,[d]);return e.createElement(n,{...c,children:u})}}function Ps(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ns(t,e,n,i){if("function"==typeof e){const[s,r]=Ps(i);e=e(void 0!==n?n:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,r]=Ps(i);e=e(void 0!==n?n:t.custom,s,r)}return e}function Ms(t){return Ei(t)?t.get():t}const As=t=>(n,i)=>{const s=e.useContext(_i),r=e.useContext(M),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Vs(n,i,s,t),renderState:e()}}(t,n,s,r);return i?o():k(o)};function Vs(t,e,n,i){const s={},r=i(t,{});for(const t in r)s[t]=Ms(r[t]);let{initial:o,animate:a}=t;const l=Gi(t),c=Zi(t);e&&c&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===o;const u=d?a:o;if(u&&"boolean"!=typeof u&&!Yi(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Ns(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[d?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}function Ds(t,e,n){const{style:i}=t,s={};for(const r in i)(Ei(i[r])||e.style&&Ei(e.style[r])||us(r,t)||void 0!==n?.getValue(r)?.liveStyle)&&(s[r]=i[r]);return s}const Rs={useVisualState:As({scrapeMotionValuesFromProps:Ds,createRenderState:fs})};function Ls(t,e,n){const i=Ds(t,e,n);for(const n in t)if(Ei(t[n])||Ei(e[n])){i[-1!==hn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Bs={useVisualState:As({scrapeMotionValuesFromProps:Ls,createRenderState:js})};function Fs(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return ls({...Es(n)?Bs:Rs,preloadedFeatures:t,useRender:ks(i),createVisualElement:e,Component:n})}}function Os(t,e,n){const i=t.getProps();return Ns(i,e,void 0!==n?n:i.custom,t)}const zs=t=>Array.isArray(t);function Is(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,di(n))}function $s(t){return zs(t)?t[t.length-1]||0:t}function Ws(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ei(i)&&i.add))return n.add(e);if(!n&&B.WillChange){const n=new B.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Us(t){return t.props[ss]}const Hs=t=>null!==t;const _s={type:"spring",stiffness:500,damping:25,restSpeed:10},Ys={type:"keyframes",duration:.8},Xs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ks=(t,{keyframes:e})=>e.length>2?Ys:mn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_s:Xs;const qs=(t,e,n,i={},s,r)=>o=>{const a=_n(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Y(l);const d={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:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||Object.assign(d,Ks(t,d)),d.duration&&(d.duration=Y(d.duration)),d.repeatDelay&&(d.repeatDelay=Y(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),(B.instantAnimations||B.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Hs),r=e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}(d.keyframes,a);if(void 0!==t)return void xt.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new tn(d):new Wn(d)};function Gs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Zs(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(r=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&&Gs(c,e))continue;const o={delay:n,..._n(r||{},e)},d=i.get();if(void 0!==d&&!i.isAnimating&&!Array.isArray(s)&&s===d&&!o.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Us(t);if(n){const t=window.MotionHandoffAnimation(n,e,xt);null!==t&&(o.startTime=t,u=!0)}}Ws(t,e),i.start(qs(e,i,s,t.shouldReduceMotion&&Yn.has(e)?{type:!1}:o,t,u));const h=i.animation;h&&l.push(h)}return o&&Promise.all(l).then(()=>{xt.update(()=>{o&&function(t,e){const n=Os(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)Is(t,e,$s(r[e]))}(t,o)})}),l}function Js(t,e,n={}){const i=Os(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Zs(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,r){const o=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Qs).forEach((t,i)=>{t.notify("AnimationStart",e),o.push(Js(t,e,{...r,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,r+i,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function Qs(t,e){return t.sortNodePosition(e)}function tr(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 er=qi.length;function nr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&nr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<er;n++){const i=qi[n],s=t.props[i];(Xi(s)||!1===s)&&(e[i]=s)}return e}const ir=[...Ki].reverse(),sr=Ki.length;function rr(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=>Js(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Js(t,e,n);else{const s="function"==typeof e?Os(t,e,n.custom):e;i=Promise.all(Zs(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function or(t){let e=rr(t),n=cr(),i=!0;const s=e=>(n,i)=>{const s=Os(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 r(r){const{props:o}=t,a=nr(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<sr;e++){const h=ir[e],m=n[h],p=void 0!==o[h]?o[h]:a[h],f=Xi(p),g=h===r?m.isActive:null;!1===g&&(u=e);let x=p===a[h]&&p!==o[h]&&f;if(x&&i&&t.manuallyAnimateOnMount&&(x=!1),m.protectedKeys={...d},!m.isActive&&null===g||!p&&!m.prevProp||Yi(p)||"boolean"==typeof p)continue;const y=ar(m.prevProp,p);let v=y||h===r&&m.isActive&&!x&&f||e>u&&f,b=!1;const w=Array.isArray(p)?p:[p];let j=w.reduce(s(h),{});!1===g&&(j={});const{prevResolvedValues:S={}}=m,C={...S,...j},T=e=>{v=!0,c.has(e)&&(b=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in C){const e=j[t],n=S[t];if(d.hasOwnProperty(t))continue;let i=!1;i=zs(e)&&zs(n)?!tr(e,n):e!==n,i?null!=e?T(t):c.add(t):void 0!==e&&c.has(t)?T(t):m.protectedKeys[t]=!0}m.prevProp=p,m.prevResolvedValues=j,m.isActive&&(d={...d,...j}),i&&t.blockInitialAnimation&&(v=!1);v&&(!(x&&y)||b)&&l.push(...w.map(t=>({animation:t,options:{type:h}})))}if(c.size){const e={};if("boolean"!=typeof o.initial){const n=Os(t,Array.isArray(o.initial)?o.initial[0]:o.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 h=Boolean(l.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:r,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=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=cr(),i=!0}}}function ar(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!tr(e,t)}function lr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cr(){return{animate:lr(!0),whileInView:lr(),whileHover:lr(),whileTap:lr(),whileDrag:lr(),whileFocus:lr(),exit:lr()}}class dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}let ur=0;const hr={animation:{Feature:class extends dr{constructor(t){super(t),t.animationState||(t.animationState=or(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yi(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 dr{constructor(){super(...arguments),this.id=ur++}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 mr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function pr(t){return{point:{x:t.pageX,y:t.pageY}}}function fr(t,e,n,i){return mr(t,e,(t=>e=>yi(e)&&t(e,pr(e)))(n),i)}function gr({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function xr(t){return t.max-t.min}function yr(t,e,n,i=.5){t.origin=i,t.originPoint=oe(e.min,e.max,t.origin),t.scale=xr(n)/xr(e),t.translate=oe(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 vr(t,e,n,i){yr(t.x,e.x,n.x,i?i.originX:void 0),yr(t.y,e.y,n.y,i?i.originY:void 0)}function br(t,e,n){t.min=n.min+e.min,t.max=t.min+xr(e)}function wr(t,e,n){t.min=e.min-n.min,t.max=t.min+xr(e)}function jr(t,e,n){wr(t.x,e.x,n.x),wr(t.y,e.y,n.y)}const Sr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Cr(t){return[t("x"),t("y")]}function Tr(t){return void 0===t||1===t}function Er({scale:t,scaleX:e,scaleY:n}){return!Tr(t)||!Tr(e)||!Tr(n)}function kr(t){return Er(t)||Pr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Pr(t){return Nr(t.x)||Nr(t.y)}function Nr(t){return t&&"0%"!==t}function Mr(t,e,n){return n+e*(t-n)}function Ar(t,e,n,i,s){return void 0!==s&&(t=Mr(t,s,i)),Mr(t,n,i)+e}function Vr(t,e=0,n=1,i,s){t.min=Ar(t.min,e,n,i,s),t.max=Ar(t.max,e,n,i,s)}function Dr(t,{x:e,y:n}){Vr(t.x,e.translate,e.scale,e.originPoint),Vr(t.y,n.translate,n.scale,n.originPoint)}const Rr=.999999999999,Lr=1.0000000000001;function Br(t,e){t.min=t.min+e,t.max=t.max+e}function Fr(t,e,n,i,s=.5){Vr(t,e,n,oe(t.min,t.max,s),i)}function Or(t,e){Fr(t.x,e.x,e.scaleX,e.scale,e.originX),Fr(t.y,e.y,e.scaleY,e.scale,e.originY)}function zr(t,e){return gr(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,$r=(t,e)=>Math.abs(t-e);class Wr{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=_r(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=$r(t.x,e.x),i=$r(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}=vt;this.history.push({...i,timestamp:s});const{onStart:r,onMove:o}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ur(e,this.transformPagePoint),xt.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 r=_r("pointercancel"===t.type?this.lastMoveEventInfo:Ur(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,r),i&&i(t,r)},!yi(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const r=Ur(pr(t),this.transformPagePoint),{point:o}=r,{timestamp:a}=vt;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,_r(r,this.history)),this.removeListeners=U(fr(this.contextWindow,"pointermove",this.handlePointerMove),fr(this.contextWindow,"pointerup",this.handlePointerUp),fr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),yt(this.updatePoint)}}function Ur(t,e){return e?{point:e(t.point)}:t}function Hr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function _r({point:t},e){return{point:t,delta:Hr(t,Xr(e)),offset:Hr(t,Yr(e)),velocity:Kr(e,.1)}}function Yr(t){return t[0]}function Xr(t){return t[t.length-1]}function Kr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Xr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Y(e)));)n--;if(!i)return{x:0,y:0};const r=X(s.timestamp-i.timestamp);if(0===r)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function qr(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 Gr(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 Zr=.35;function Jr(t,e,n){return{min:Qr(t,e),max:Qr(t,n)}}function Qr(t,e){return"number"==typeof t?t:t[e]||0}const to=new WeakMap;class eo{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 Wr(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(pr(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(r=n)||"y"===r?mi[r]?null:(mi[r]=!0,()=>{mi[r]=!1}):mi.x||mi.y?null:(mi.x=mi.y=!0,()=>{mi.x=mi.y=!1}),!this.openDragLock))return;var r;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Wt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=xr(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&xt.postRender(()=>s(t,e)),Ws(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:r}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=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}(o),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&r(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Cr(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&&xt.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||!no(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?oe(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?oe(n,t,i.max):Math.min(t,n)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}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&&es(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:qr(t.x,n,s),y:qr(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=Zr){return!1===t?t=0:!0===t&&(t=Zr),{x:Jr(t,"left","right"),y:Jr(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Cr(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||!es(t))return!1;const n=t.current;L(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=zr(t,n),{scroll:s}=e;return s&&(Br(i.x,s.offset.x),Br(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Gr(t.x,e.x),y:Gr(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}}(r));this.hasMutatedConstraints=!!t,t&&(r=gr(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=Cr(o=>{if(!no(o,e,this.currentDirection))return;let l=a&&a[o]||{};r&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[o]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,u)});return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Ws(this.visualElement,t),n.start(qs(t,n,0,e,this.visualElement,!1))}stopAnimation(){Cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Cr(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){Cr(e=>{const{drag:n}=this.getProps();if(!no(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:r}=i.layout.layoutBox[e];s.set(t[e]-oe(n,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!es(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cr(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=xr(t),s=xr(e);return s>i?n=H(e.min,e.max-i,t.min):i>s&&(n=H(t.min,t.max-s,e.min)),D(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(),Cr(e=>{if(!no(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];n.set(oe(s,r,i[e]))})}addListeners(){if(!this.visualElement.current)return;to.set(this.visualElement,this);const t=fr(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();es(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()),xt.read(e);const s=mr(window,"resize",()=>this.scalePositionWithinConstraints()),r=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cr(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(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=Zr,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function no(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const io=t=>(e,n)=>{t&&xt.postRender(()=>t(e,n))};const so={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ro(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const oo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ut.test(t))return t;t=parseFloat(t)}return`${ro(t,e.target.x)}% ${ro(t,e.target.y)}%`}},ao={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ie.parse(t);if(s.length>5)return i;const r=ie.createTransformer(t),o="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=oe(a,l,.5);return"number"==typeof s[2+o]&&(s[2+o]/=c),"number"==typeof s[3+o]&&(s[3+o]/=c),r(s)}};class lo extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;!function(t){for(const e in t)ds[e]=t[e],Tt(e)&&(ds[e].isCSSVariable=!0)}(uo),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()})),so.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:r}=n;return r?(r.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||xt.postRender(()=>{const t=r.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ui.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 co(n){const[i,s]=Di(),r=e.useContext(E);return t.jsx(lo,{...n,layoutGroup:r,switchLayoutGroup:e.useContext(rs),isPresent:i,safeToRemove:s})}const uo={borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:ao};const ho=(t,e)=>t.depth-e.depth;class mo{constructor(){this.children=[],this.isDirty=!1}add(t){A(this.children,t),this.isDirty=!0}remove(t){V(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ho),this.isDirty=!1,this.children.forEach(t)}}const po=["TopLeft","TopRight","BottomLeft","BottomRight"],fo=po.length,go=t=>"string"==typeof t?parseFloat(t):t,xo=t=>"number"==typeof t||Ut.test(t);function yo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const vo=wo(0,.5,ot),bo=wo(.5,.95,$);function wo(t,e,n){return i=>i<t?0:i>e?1:n(H(t,e,i))}function jo(t,e){t.min=e.min,t.max=e.max}function So(t,e){jo(t.x,e.x),jo(t.y,e.y)}function Co(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function To(t,e,n,i,s){return t=Mr(t-=e,1/n,i),void 0!==s&&(t=Mr(t,1/s,i)),t}function Eo(t,e,[n,i,s],r,o){!function(t,e=0,n=1,i=.5,s,r=t,o=t){Wt.test(e)&&(e=parseFloat(e),e=oe(o.min,o.max,e/100)-o.min);if("number"!=typeof e)return;let a=oe(r.min,r.max,i);t===r&&(a-=e),t.min=To(t.min,e,n,a,s),t.max=To(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,r,o)}const ko=["x","scaleX","originX"],Po=["y","scaleY","originY"];function No(t,e,n,i){Eo(t.x,e,ko,n?n.x:void 0,i?i.x:void 0),Eo(t.y,e,Po,n?n.y:void 0,i?i.y:void 0)}function Mo(t){return 0===t.translate&&1===t.scale}function Ao(t){return Mo(t.x)&&Mo(t.y)}function Vo(t,e){return t.min===e.min&&t.max===e.max}function Do(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ro(t,e){return Do(t.x,e.x)&&Do(t.y,e.y)}function Lo(t){return xr(t.x)/xr(t.y)}function Bo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Fo{constructor(){this.members=[]}add(t){A(this.members,t),t.scheduleRender()}remove(t){if(V(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 Oo=["","X","Y","Z"],zo={visibility:"hidden"};let Io=0;function $o(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Wo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Us(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",xt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Wo(i)}function Uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=Io++,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(Yo),this.nodes.forEach(Qo),this.nodes.forEach(ta),this.nodes.forEach(Xo)},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 mo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new _),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=Ti(e)&&!(Ti(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.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=St.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(yt(i),t(r-e))};return xt.setup(i,!0),()=>yt(i)}(i,250),so.hasAnimatedSinceResize&&(so.hasAnimatedSinceResize=!1,this.nodes.forEach(Jo))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(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||r.getDefaultTransition()||oa,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!Ro(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={..._n(s,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Jo(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(),yt(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(ea),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&&Wo(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(qo);this.isUpdating||this.nodes.forEach(Go),this.isUpdating=!1,this.nodes.forEach(Zo),this.nodes.forEach(Ho),this.nodes.forEach(_o),this.clearAllSnapshots();const t=St.now();vt.delta=D(0,1e3/60,t-vt.timestamp),vt.timestamp=t,vt.isProcessing=!0,bt.update.process(vt),bt.preRender.process(vt),bt.render.process(vt),vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ui.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ko),this.sharedNodes.forEach(na)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||xr(this.snapshot.measuredBox.x)||xr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)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&&!Ao(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,r=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||kr(this.latestValues)||r)&&(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)),ca((i=n).x),ca(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(ua))){const{scroll:t}=this.root;t&&(Br(e.x,t.offset.x),Br(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(So(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:r}=i;i!==this.root&&s&&r.layoutScroll&&(s.wasRoot&&So(e,t),Br(e.x,s.offset.x),Br(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};So(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&&Or(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),kr(i.latestValues)&&Or(n,i.latestValues)}return kr(this.latestValues)&&Or(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};So(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!kr(n.latestValues))continue;Er(n.latestValues)&&n.updateSnapshot();const i=Sr();So(i,n.measurePageBox()),No(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return kr(this.latestValues)&&No(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!==vt.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=vt.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}},jr(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),So(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,o,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(),r=this.target,o=this.relativeTarget,a=this.relativeParent.target,br(r.x,o.x,a.x),br(r.y,o.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):So(this.target,this.layout.layoutBox),Dr(this.target,this.targetDelta)):So(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}},jr(this.relativeTargetOrigin,this.target,t.target),So(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Er(this.parent.latestValues)&&!Pr(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===vt.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;So(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,o=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let r,o;e.x=e.y=1;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:s}=r.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Or(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Dr(t,o)),i&&kr(r.latestValues)&&Or(t,r.latestValues))}e.x<Lr&&e.x>Rr&&(e.x=1),e.y<Lr&&e.y>Rr&&(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?(Co(this.prevProjectionDelta.x,this.projectionDelta.x),Co(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),vr(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&Bo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Bo(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},r={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 o={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,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ra));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,m,p,f,g;ia(r.x,t.x,n),ia(r.y,t.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jr(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=o,g=n,sa(m.x,p.x,f.x,g),sa(m.y,p.y,f.y,g),u&&(l=this.relativeTarget,h=u,Vo(l.x,h.x)&&Vo(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),So(u,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,r){s?(t.opacity=oe(0,n.opacity??1,vo(i)),t.opacityExit=oe(e.opacity??1,0,bo(i))):r&&(t.opacity=oe(e.opacity??1,n.opacity??1,i));for(let s=0;s<fo;s++){const r=`border${po[s]}Radius`;let o=yo(e,r),a=yo(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||xo(o)===xo(a)?(t[r]=Math.max(oe(go(o),go(a),i),0),(Wt.test(a)||Wt.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=oe(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,d,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&&(yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xt.update(()=>{so.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=di(0)),this.currentAnimation=function(t,e,n){const i=Ei(t)?t:di(t);return i.start(qs("",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&&da(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=xr(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=xr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}So(e,n),Or(e,s),vr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Fo);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&&$o("z",t,i,this.animationValues);for(let e=0;e<Oo.length;e++)$o(`rotate${Oo[e]}`,t,i,this.animationValues),$o(`skew${Oo[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 zo;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=Ms(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=Ms(t?.pointerEvents)||""),this.hasProjected&&!kr(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,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:r,skewX:o,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),r&&(i+=`rotateY(${r}deg) `),o&&(i+=`skewX(${o}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:r,y:o}=this.projectionDelta;e.transformOrigin=`${100*r.origin}% ${100*o.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 ds){if(void 0===s[t])continue;const{correct:n,applyTo:r,isCSSVariable:o}=ds[t],a="none"===e.transform?s[t]:n(s[t],i);if(r){const t=r.length;for(let n=0;n<t;n++)e[r[n]]=a}else o?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?Ms(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(qo),this.root.sharedNodes.clear()}}}function Ho(t){t.updateLayout()}function _o(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,r=e.source!==t.layout.source;"size"===s?Cr(t=>{const i=r?e.measuredBox[t]:e.layoutBox[t],s=xr(i);i.min=n[t].min,i.max=i.min+s}):da(s,e.layoutBox,n)&&Cr(i=>{const s=r?e.measuredBox[i]:e.layoutBox[i],o=xr(n[i]);s.max=s.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};vr(o,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};r?vr(a,t.applyTransform(i,!0),e.measuredBox):vr(a,n,e.layoutBox);const l=!Ao(o);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:r}=i;if(s&&r){const o={x:{min:0,max:0},y:{min:0,max:0}};jr(o,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};jr(a,n,r.layoutBox),Ro(o,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Yo(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 Xo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ko(t){t.clearSnapshot()}function qo(t){t.clearMeasurements()}function Go(t){t.isLayoutDirty=!1}function Zo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Jo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Qo(t){t.resolveTargetDelta()}function ta(t){t.calcProjection()}function ea(t){t.resetSkewAndRotation()}function na(t){t.removeLeadSnapshot()}function ia(t,e,n){t.translate=oe(e.translate,0,n),t.scale=oe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function sa(t,e,n,i){t.min=oe(e.min,n.min,i),t.max=oe(e.max,n.max,i)}function ra(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const oa={duration:.45,ease:[.4,0,.1,1]},aa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:$;function ca(t){t.min=la(t.min),t.max=la(t.max)}function da(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Lo(e),s=Lo(n),r=.2,!(Math.abs(i-s)<=r));var i,s,r}function ua(t){return t!==t.root&&t.scroll?.wasRoot}const ha=Uo({attachResizeListener:(t,e)=>mr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ma={current:void 0},pa=Uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ma.current){const t=new ha({});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)}),fa={pan:{Feature:class extends dr{constructor(){super(...arguments),this.removePointerDownListener=$}onPointerDown(t){this.session=new Wr(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:io(t),onStart:io(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&xt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=fr(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 dr{constructor(t){super(t),this.removeGroupControls=$,this.removeListeners=$,this.controls=new eo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:pa,MeasureLayout:co}};function ga(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&xt.postRender(()=>s(e,pr(e)))}function xa(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&&xt.postRender(()=>s(e,pr(e)))}const ya=new WeakMap,va=new WeakMap,ba=t=>{const e=ya.get(t.target);e&&e(t)},wa=t=>{t.forEach(ba)};function ja(t,e,n){const i=function({root:t,...e}){const n=t||document;va.has(n)||va.set(n,{});const i=va.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(wa,{root:t,...e})),i[s]}(e);return ya.set(t,n),i.observe(t),()=>{ya.delete(t),i.unobserve(t)}}const Sa={some:0,all:1};const Ca={inView:{Feature:class extends dr{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,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Sa[i]};return ja(this.node.current,r,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(),r=e?n:i;r&&r(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 dr{mount(){const{current:t}=this.node;t&&(this.unmount=Ci(t,(t,e)=>(xa(this.node,e,"Start"),(t,{success:e})=>xa(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends dr{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=U(mr(this.node.current,"focus",()=>this.onFocus()),mr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends dr{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,r]=fi(t,n),o=t=>{if(!gi(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const r=t=>{gi(t)&&(i(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(t=>{t.addEventListener("pointerenter",o,s)}),r}(t,(t,e)=>(ga(this.node,e,"Start"),t=>ga(this.node,t,"End"))))}unmount(){}}}},Ta={layout:{ProjectionNode:pa,MeasureLayout:co}},Ea={current:null},ka={current:!1};function Pa(){if(ka.current=!0,P)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ea.current=t.matches;t.addListener(e),e()}else Ea.current=!1}const Na=new WeakMap;const Ma=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Aa{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Cn,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=St.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,xt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=r;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=o,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Gi(e),this.isVariantNode=Zi(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==a[t]&&Ei(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Na.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)),ka.current||Pa(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ea.current),"production"!==process.env.NODE_ENV&&G(!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(),yt(this.notifyUpdate),yt(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&&xt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),r&&r(),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 zi){const e=zi[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<Ma.length;e++){const n=Ma[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],r=n[i];if(Ei(s))t.addValue(i,s);else if(Ei(r))t.addValue(i,di(s,{owner:t}));else if(r!==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,di(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=di(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&&(F(n)||z(n))?n=parseFloat(n):(i=n,!ki.find(Xn(i))&&ie.test(e)&&(n=ri(t,e))),this.setBaseTarget(t,Ei(n)?n.get():n)),Ei(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=Ns(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||Ei(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 _),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Va extends Aa{constructor(){super(...arguments),this.KeyframeResolver=ai}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;Ei(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Da(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 Ra extends Va{constructor(){super(...arguments),this.type="html",this.renderInstance=Da}readValueFromInstance(t,e){if(mn.has(e))return this.projection?.isProjecting?cn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return dn(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Tt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return zr(t,e)}build(t,e,n){ps(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ds(t,e,n)}}const La=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 Ba extends Va{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Sr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(mn.has(e)){const t=si(e);return t&&t.default||0}return e=La.has(e)?e:is(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Ls(t,e,n)}build(t,e,n){ws(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Da(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(La.has(n)?n:is(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Ss(t.tagName),super.mount(t)}}const Fa=Hi(Fs({...hr,...Ca,...fa,...Ta},(t,n)=>Es(t)?new Ba(n):new Ra(n,{allowProjection:t!==e.Fragment})));function Oa(){!ka.current&&Pa();const[t]=e.useState(Ea.current);return"production"!==process.env.NODE_ENV&&G(!0!==t,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),t}function za(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n}function Ia(t,e,n,i){return new(n||(n=Promise))(function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(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(o,a)}l((i=i.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const $a=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"},Wa=(t,e)=>Ia(void 0,void 0,void 0,function*(){const n=`${$a(t)}/student/downloadExcel/${e||"PASS"}`;return(yield i.get(n,{responseType:"blob"})).data}),Ua=(t,e,n)=>Ia(void 0,void 0,void 0,function*(){const s=`${$a(e)}/student/uploadExcel`,r=new FormData;r.append("receivedExcelFile",t),"85"===e&&n&&r.append("clientName",n);return(yield i.post(s,r,{transformRequest:[t=>t]})).data});function Ha(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM112 400c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm16-112c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h256c17.67 0 32 14.33 32 32v128c0 17.67-14.33 32-32 32H128zm272 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(t)}function _a(t){return x({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"},child:[]}]})(t)}function Ya(t){return x({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"},child:[]}]})(t)}function Xa(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(t)}function Ka(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"},child:[]}]})(t)}function qa(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(t)}function Ga(t){return x({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"},child:[]}]})(t)}function Za(t){return x({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z"},child:[]}]})(t)}function Ja(t){return x({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(t)}function Qa(t){return x({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"},child:[]}]})(t)}function tl(t){return x({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"},child:[]}]})(t)}const el=e=>{var{title:n,description:i,onClose:s,showCloseIcon:r=!0,icon:o,actions:a,className:l=""}=e,c=za(e,["title","description","onClose","showCloseIcon","icon","actions","className"]);return t.jsxs("div",Object.assign({className:`flex items-center justify-between gap-4 p-4 sm:p-6 bg-primary-botech text-white sm:rounded-t-xl ${l}`},c,{children:[t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o&&t.jsx("span",{className:"mt-0.5 text-white text-xl",children:o}),t.jsxs("div",{className:"flex-1 min-w-0",children:[n&&t.jsx("h2",{className:"text-xl font-semibold text-white",id:"bo-modal-title",children:n}),i&&t.jsx("p",{className:"mt-1 text-sm text-white/80",id:"bo-modal-description",children:i})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[a,r&&t.jsx("button",{type:"button","aria-label":"Cerrar",onClick:s,className:"shrink-0 inline-flex items-center justify-center rounded-md p-2 text-white hover:text-gray-200 hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white/50",children:t.jsx(Ja,{className:"text-xl"})})]})]}))},nl=e=>{var{className:n=""}=e,i=za(e,["className"]);return t.jsx("div",Object.assign({className:`p-4 sm:p-6 ${n}`},i))},il=e=>{var{className:n=""}=e,i=za(e,["className"]);return t.jsx("div",Object.assign({className:`flex justify-end gap-3 p-3 sm:p-4 border-t border-gray-200 bg-gray-50 ${n}`},i))},sl={sm:"sm:max-w-sm",md:"sm:max-w-2xl",lg:"sm:max-w-4xl",xl:"sm:max-w-6xl"};const rl=({open:n,onClose:i,title:r,description:o,size:a="md",footer:l,showCloseIcon:c=!0,hideHeader:d=!1,closeOnEsc:u=!0,closeOnClickOutside:h=!0,className:m="",children:p,initialFocusRef:f,headerClassName:g,overlayClassName:x,headerIcon:y,headerActions:v,zIndex:b,animate:w=!1})=>{const j=e.useRef(null),S=e.useRef(null),C=Oa(),T=w&&!C;var E;E=n,e.useEffect(()=>{if(!E)return;const{overflow:t}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[E]),function(t,n,i){e.useEffect(()=>{if(!t)return;const e=n.current;if(!e)return;const s=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],r=()=>Array.from(e.querySelectorAll(s.join(","))).filter(t=>!t.hasAttribute("disabled")&&!t.getAttribute("aria-hidden")),o=document.activeElement;((null==i?void 0:i.current)||r()[0]||e).focus();const a=t=>{if("Tab"!==t.key)return;const n=r();if(0===n.length)return;const i=n[0],s=n[n.length-1];t.shiftKey?document.activeElement!==i&&document.activeElement!==e||(s.focus(),t.preventDefault()):document.activeElement===s&&(i.focus(),t.preventDefault())};return document.addEventListener("keydown",a),()=>{var t;document.removeEventListener("keydown",a),null===(t=null==o?void 0:o.focus)||void 0===t||t.call(o)}},[t,n,i])}(n,j,f);const k=e.useCallback(t=>{n&&"Escape"===t.key&&u&&(t.stopPropagation(),i())},[n,u,i]);e.useEffect(()=>{if(n)return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[n,k]);const P=t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx("button",{type:"button","aria-label":"Cerrar modal",onClick:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),t.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":o?"bo-modal-description":void 0,className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${sl[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${m}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(el,{title:r,description:o,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:p}),l&&t.jsx(il,{children:l})]})]}),N=t.jsx(Bi,{children:n&&t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx(Fa.button,{type:"button","aria-label":"Cerrar modal",initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},onClick:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),t.jsxs(Fa.div,{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":o?"bo-modal-description":void 0,initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${sl[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${m}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(el,{title:r,description:o,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:p}),l&&t.jsx(il,{children:l})]})]})}),M=T?N:n?P:null;return"undefined"!=typeof document?s.createPortal(M,document.body):M};var ol,al,ll;rl.Header=el,rl.Body=nl,rl.Footer=il,function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(ol||(ol={})),function(t){t.EVEN="even",t.ODD="odd",t.HOVER="hover"}(al||(al={})),function(t){t.SM="sm",t.MD="md",t.LG="lg"}(ll||(ll={}));const cl=t=>{switch(t){case ol.CENTER:return"text-center";case ol.RIGHT:return"text-right";default:return"text-left"}},dl=t=>{switch(t){case ll.SM:return{header:"px-2 py-2 text-xs",cell:"px-2 py-2 text-xs",table:"text-xs"};case ll.LG:return{header:"px-6 py-4 text-base",cell:"px-6 py-4 text-base",table:"text-base"};default:return{header:"px-3 md:px-6 py-3 text-sm",cell:"px-3 md:px-6 py-4 text-sm",table:"text-sm"}}},ul=t=>t%2==0?"bg-white":"bg-gray-50",hl=({columns:e,size:n,hasActions:i})=>{const s=dl(n);return t.jsx("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50 sticky top-0 z-10",children:t.jsxs("tr",{children:[e.map(e=>t.jsx("th",{className:`${s.header} ${cl(e.alignment)} ${e.className||""}`,style:e.width?{width:e.width}:void 0,children:e.header},e.key)),i&&t.jsx("th",{className:`${s.header} text-center sticky right-0 bg-gray-50`,children:"ACCIONES"})]})})},ml=({columns:e,data:n,renderActions:i,size:s,onRowClick:r})=>{const o=dl(s);return t.jsx("tbody",{children:n.map((n,s)=>t.jsxs("tr",{className:`${ul(s)} hover:bg-gray-100 transition-colors duration-150 ${r?"cursor-pointer":""}`,onClick:()=>null==r?void 0:r(n),children:[e.map(e=>t.jsx("td",{className:`${o.cell} ${cl(e.alignment)} ${e.className||""}`,children:e.accessor(n)},e.key)),i&&t.jsx("td",{className:`${o.cell} text-center sticky right-0 ${ul(s)} shadow-[-2px_0_4px_rgba(0,0,0,0.1)]`,children:i(n)})]},s))})},pl=t=>new Intl.DateTimeFormat("es-CO",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),fl={datos_basicos:Qa,transporte:Ha,contacto:Ga},gl={nombres:Qa,apellidos:Qa,curso:function(t){return x({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"},child:[]}]})(t)},codigoFamilia:function(t){return x({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)},transporte:Ha,saleSolo:function(t){return x({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M208 96c26.5 0 48-21.5 48-48S234.5 0 208 0s-48 21.5-48 48 21.5 48 48 48zm94.5 149.1l-23.3-11.8-9.7-29.4c-14.7-44.6-55.7-75.8-102.2-75.9-36-.1-55.9 10.1-93.3 25.2-21.6 8.7-39.3 25.2-49.7 46.2L17.6 213c-7.8 15.8-1.5 35 14.2 42.9 15.6 7.9 34.6 1.5 42.5-14.3L81 228c3.5-7 9.3-12.5 16.5-15.4l26.8-10.8-15.2 60.7c-5.2 20.8.4 42.9 14.9 58.8l59.9 65.4c7.2 7.9 12.3 17.4 14.9 27.7l18.3 73.3c4.3 17.1 21.7 27.6 38.8 23.3 17.1-4.3 27.6-21.7 23.3-38.8l-22.2-89c-2.6-10.3-7.7-19.9-14.9-27.7l-45.5-49.7 17.2-68.7 5.5 16.5c5.3 16.1 16.7 29.4 31.7 37l23.3 11.8c15.6 7.9 34.6 1.5 42.5-14.3 7.7-15.7 1.4-35.1-14.3-43zM73.6 385.8c-3.2 8.1-8 15.4-14.2 21.5l-50 50.1c-12.5 12.5-12.5 32.8 0 45.3s32.7 12.5 45.2 0l59.4-59.4c6.1-6.1 10.9-13.4 14.2-21.5l13.5-33.8c-55.3-60.3-38.7-41.8-47.4-53.7l-20.7 51.5z"},child:[]}]})(t)},bajaSolo:function(t){return x({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z"},child:[]}]})(t)},direccionCasa:function(t){return x({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"},child:[]}]})(t)},rfid:function(t){return x({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 32H48C21.5 32 0 53.5 0 80v16h576V80c0-26.5-21.5-48-48-48zM0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V128H0v304zm352-232c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zM176 192c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM67.1 396.2C75.5 370.5 99.6 352 128 352h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.9-5.2 19.8-15.6 19.8H82.7c-10.4 0-18.8-10-15.6-19.8z"},child:[]}]})(t)},idSchoolRegistration:Ya},xl={informacion_general:Qa,ultimas_novedades:Ya,personas_autorizadas:tl,ultimos_movimientos:Ka},yl={INGRESO:function(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(t)},SALIDA:function(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(t)}},vl="#FFFFFF",bl="#F7F9FC",wl="#E5E9F2",jl="#0F172A",Sl="#64748B",Cl="#94A3B8",Tl="#111F4B",El="#E2E8FF",kl="#1D4ED8",Pl={informacion_general:"Información general",ultimas_novedades:"Últimas novedades",personas_autorizadas:"Personas autorizadas",ultimos_movimientos:"Últimos movimientos"};function Nl(t){return x({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(t)}exports.Button=a,exports.DownloadStudentsExcelButton=({backend:i,label:s="Descargar Lista de Estudiantes en Excel",fileName:r="students.xlsx",className:o,variant:l="primary",clientName:c,onSuccess:d,onError:u})=>{const[h,m]=e.useState(!1);return t.jsx(a,{variant:l,onClick:()=>Ia(void 0,void 0,void 0,function*(){var t,e,s,o,a,l,h;try{m(!0);let t=c;if("85"===i&&!t){const{value:e}=yield n.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void m(!1);t=e}const e=yield Wa(i,t),s=URL.createObjectURL(e),o=document.createElement("a");o.href=s,o.download=r,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s),yield n.fire({title:"¡Descarga exitosa!",text:"El archivo se ha descargado correctamente",icon:"success",confirmButtonText:"OK"}),null==d||d()}catch(i){console.error("Download students excel failed",i);let r="No se pudo descargar el archivo. Por favor, inténtelo nuevamente.";const c=i;r=null!==(h=null!==(a=null!==(s=null===(e=null===(t=null==c?void 0:c.response)||void 0===t?void 0:t.data)||void 0===e?void 0:e.message)&&void 0!==s?s:"string"==typeof(null===(o=null==c?void 0:c.response)||void 0===o?void 0:o.data)?c.response.data:void 0)&&void 0!==a?a:(null===(l=null==c?void 0:c.response)||void 0===l?void 0:l.statusText)?`Error ${c.response.status}: ${c.response.statusText}`:void 0)&&void 0!==h?h:r,yield n.fire({title:"Error en la descarga",text:r,icon:"error",confirmButtonText:"OK"}),null==u||u(i)}finally{m(!1)}}),className:o,children:h?"Descargando...":s})},exports.GenericTable=({columns:n,data:i,renderActions:s,size:r=ll.MD,className:o="",onRowClick:a,isLoading:l=!1,emptyMessage:c="No hay datos disponibles"})=>{const d=e.useRef(null),{visibleData:u}=((t,n)=>{const[i,s]=e.useState(t);return e.useEffect(()=>{const e=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),i=window.innerHeight-e.top-100,r=Math.max(1,Math.floor(i/60));s(t.slice(0,r))};e();const i=()=>{e()};window.addEventListener("resize",i);const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>{window.removeEventListener("resize",i),r.disconnect()}},[t,n]),{visibleData:i}})(i,d);return l?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{"data-testid":"loading-spinner",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})}):0===i.length?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:c})})}):t.jsx("div",{ref:d,className:`w-full shadow-md sm:rounded-lg bg-white ${o}`,children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left text-gray-500",style:{minWidth:"max-content"},children:[t.jsx(hl,{columns:n,size:r,hasActions:!!s}),t.jsx(ml,{columns:n,data:u,renderActions:s,size:r,onRowClick:a})]})})})},exports.Header=({title:e,description:n,logoUrl:i,defaultLogoUrl:s,logoAlt:r="Logo",systemName:o="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:d="flex flex-col sm:flex-row sm:items-end bg-primary-botech text-white p-3 sm:p-4 shadow-lg gap-3 sm:gap-0 justify-between",logoClassName:u="h-8 sm:h-10 object-contain",titleClassName:h="text-lg sm:text-xl font-bold",descriptionClassName:m="text-xs sm:text-sm opacity-80"})=>{const p="string"==typeof s&&""!==s.trim()?s:void 0,f="string"==typeof i&&""!==i.trim()?i:p;return t.jsxs("div",{className:d,children:[t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsx("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 flex-shrink-0","aria-label":"Abrir menú",children:t.jsx(S,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),t.jsxs("div",{className:"flex items-center min-w-0 flex-1",children:[t.jsx("div",{className:"flex items-center justify-center mr-2 sm:mr-3 flex-shrink-0",children:f?t.jsx("img",{src:f,alt:r,className:u}):t.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t.jsx("span",{className:"text-white font-bold text-sm sm:text-lg",children:o.charAt(0)})})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("h1",{className:h,children:o}),t.jsx("p",{className:m,children:a})]})]})]}),c&&t.jsxs("div",{className:"text-left sm:text-right pt-2 sm:border-t-0 sm:pt-0",children:[t.jsx("h2",{className:"text-base sm:text-lg font-semibold",children:e}),t.jsx("p",{className:"text-xs sm:text-sm leading-tight opacity-80 truncate",children:n})]})]})},exports.IconButton=({leftIcon:e,rightIcon:n,children:i,onClick:s,className:r="",variant:o="primary",size:a="md",disabled:l=!1})=>{const c={primary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsxs("button",{type:"button",className:`inline-flex items-center gap-2 rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[a]} ${c[o]} ${r}`,onClick:l?void 0:s,disabled:l,children:[e&&t.jsx("span",{className:"flex items-center",children:e}),i,n&&t.jsx("span",{className:"flex items-center",children:n})]})},exports.Modal=rl,exports.ModalBody=nl,exports.ModalFooter=il,exports.ModalHeader=el,exports.MultiSelector=({items:n,selectedItems:i=[],onSelectionChange:s,placeholder:r="Seleccionar elementos",searchPlaceholder:o="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,maxSelectedDisplay:h=3,renderItem:m,renderSelectedItem:p,renderSelectedBadge:f})=>{const[g,x]=e.useState(!1),[y,v]=e.useState(""),b=e.useRef(null),w=e.useRef(null);e.useEffect(()=>{const t=t=>{b.current&&!b.current.contains(t.target)&&x(!1)};if(g)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[g]),e.useEffect(()=>{g&&w.current&&w.current.focus()},[g]),e.useEffect(()=>{g||v("")},[g]);const j=((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(n,y),S=t=>i.some(e=>e.id===t.id),C=t=>{s(i.filter(e=>e.id!==t.id))},T=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),E=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),k=({item:e,onRemove:n})=>t.jsxs("span",{className:"inline-flex items-center px-2 py-1 text-xs font-medium bg-primary-botech-100 text-primary-botech-800 rounded-md",children:[p?p(e):e.name,t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),n()},className:"ml-1 text-primary-botech-600 hover:text-primary-botech-800 transition-colors duration-200",children:t.jsx(T,{})})]}),P=i.slice(0,h),N=i.length-h;return t.jsxs("div",{ref:b,className:`relative w-full ${a}`,children:[t.jsxs("div",{className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${l?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${g?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:()=>{l||x(!g)},children:[t.jsx("div",{className:"flex-1 flex flex-wrap gap-1 items-center",children:0===i.length?t.jsx("span",{className:"text-gray-500",children:r}):t.jsxs(t.Fragment,{children:[P.map(e=>t.jsx("div",{onClick:t=>t.stopPropagation(),children:f?f(e,()=>C(e)):t.jsx(k,{item:e,onRemove:()=>C(e)})},e.id)),N>0&&t.jsxs("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-md",children:["+",N," más"]})]})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i.length>0&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s([])},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(T,{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(g?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),g&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:w,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:o,value:y,onChange:t=>v(t.target.value),onClick:t=>t.stopPropagation()})]})}),i.length>0&&t.jsxs("div",{className:"px-3 py-2 text-xs text-gray-600 bg-gray-50 border-b border-gray-100",children:[i.length," elemento(s) seleccionado(s)"]}),t.jsx("div",{className:"max-h-60 overflow-auto",children:0===j.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:y?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):j.map(e=>{const n=S(e);return t.jsxs("div",{className:`\n px-3 py-2 text-sm cursor-pointer transition-colors duration-200 \n border-b border-gray-50 last:border-b-0 flex items-center justify-between\n ${n?"bg-primary-botech-50 hover:bg-primary-botech-100":"hover:bg-gray-50"}\n `,onClick:()=>(t=>{S(t)?s(i.filter(e=>e.id!==t.id)):s([...i,t])})(e),children:[t.jsx("div",{className:"flex-1",children:m?m(e):t.jsx("span",{className:""+(n?"text-primary-botech-900 font-medium":"text-gray-900"),children:e.name})}),n&&t.jsx("div",{className:"ml-2 text-primary-botech-600",children:t.jsx(E,{})})]},e.id)})})]})]})},exports.NotFound=function(){return t.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-50",children:t.jsxs("div",{className:"container flex max-w-md flex-col items-center justify-center gap-8 px-4 py-16 text-center",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsxs("div",{className:"relative flex flex-col items-center",children:[t.jsx("div",{className:"h-80 w-4 bg-gray-700"}),t.jsxs("div",{className:"absolute top-4 flex h-auto w-auto min-w-[12rem] flex-col items-center justify-center rounded-lg bg-primary-botech text-white shadow-lg p-4",children:[t.jsx("div",{className:"flex-1 mb-2",children:t.jsxs("h1",{className:"text-xl/4 text-white font-seguimiento-h",children:["BO-TECH ",t.jsx("span",{className:"text-sm block",children:"SEGUIMIENTO"})]})}),t.jsx("span",{className:"text-4xl font-bold",children:"404"}),t.jsx("span",{className:"text-xs mt-1",children:"RUTA NO ENCONTRADA"})]})]})}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("h2",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"¡Esta parada no existe!"}),t.jsx("p",{className:"text-gray-600",children:"Parece que estás esperando en una parada de autobús que no está en nuestra ruta. La página que buscas no se encuentra disponible."})]}),t.jsxs("button",{className:"flex items-center gap-2 bg-primary-botech hover:bg-primary-botech/90 text-white px-4 py-2 rounded",onClick:()=>{window.location.href="/"},children:[t.jsx(Nl,{className:"h-4 w-4"}),t.jsx("span",{children:"Volver a la ruta principal"})]})]})})},exports.Sidebar=({isOpen:n,onClose:i,onToggle:s,menuItems:r,logoUrl:o,logoAlt:a="Logo",systemName:l="PASS",defaultLogoUrl:c,dashboardPath:d,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:m="h-full flex flex-col",showBottomMenu:p=!0,bottomMenuItems:f=[{id:"settings",label:"Configuración",icon:C,action:()=>{}},{id:"help",label:"Ayuda",icon:w,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:j,action:()=>{}}],activePath:g="",onNavigate:x,children:y,performanceMode:S="auto",fpsThreshold:E,fpsSampleSize:k,compatibilityMode:P=!1,onPerformanceModeChange:N})=>{const[M,A]=e.useState(new Set),{effectiveMode:V}=function({mode:t="auto",fpsThreshold:n=45,fpsSampleSize:i=90,compatibilityFlag:s=!1,onModeChange:r}={}){const[o,a]=e.useState(!1),[l,c]=e.useState(!1),d=e.useRef("full");e.useEffect(()=>{if("undefined"==typeof window||"full"===t||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>a(e.matches);return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[t]),e.useEffect(()=>{if("undefined"==typeof window||"undefined"==typeof performance||"auto"!==t||o||s)return;let e=0,r=0,a=performance.now(),l=null;const d=Math.min(Math.max(30,i),240),u=t=>{const i=t-a;a=t,e>0&&(r+=1e3/i),e+=1,e>=d?r/(e-1||1)<n&&c(!0):l=window.requestAnimationFrame(u)};return l=window.requestAnimationFrame(u),()=>{null!==l&&window.cancelAnimationFrame(l)}},[t,o,s,i,n]);const u=e.useMemo(()=>"full"===t||"lite"===t?t:s||o||l?"lite":"full",[t,s,o,l]);return e.useEffect(()=>{r?d.current!==u&&(r(u),d.current=u):d.current=u},[u,r]),{effectiveMode:u,prefersReducedMotion:o,detectedLowPerformance:l,compatibilityFlag:s}}({mode:S,fpsThreshold:E,fpsSampleSize:k,compatibilityFlag:P,onModeChange:N}),D="lite"===V,R=e.useMemo(()=>D?{boxShadow:"0 4px 12px rgba(15, 23, 42, 0.12)",backgroundColor:"rgba(255, 255, 255, 0.96)",transform:n?"translateX(0)":"translateX(-100%)",transition:"none"}:{willChange:"transform"},[D,n]),L=e.useMemo(()=>D?{backgroundColor:"rgba(15, 23, 42, 0.28)"}:{willChange:"opacity"},[D]),B="string"==typeof c&&""!==c.trim()?c:void 0,F="string"==typeof o&&""!==o.trim()?o:B,O=t=>g.includes(t),z=t=>{x&&x(t),i()},I=(e,n=!1)=>t.jsxs(Fa.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${n?"pr-4 pl-10":"px-4"} ${O(e.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>z(e.path),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(b,{className:"w-4 h-4 transition-transform "+(O(e.path)?"rotate-90":"group-hover:translate-x-1")})]},e.id),$=e=>{const n=M.has(e.id);return t.jsxs("div",{className:"mb-2",children:[t.jsxs(Fa.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},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=e.id,void A(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(v,{className:"w-4 h-4 transition-transform "+(n?"rotate-180":"")})]}),D?n&&t.jsx("div",{className:"pt-2 space-y-1",children:e.children.map(t=>I(t,!0))}):t.jsx(Bi,{initial:!1,children:n&&t.jsx(Fa.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.22,ease:[.33,1,.68,1]},className:"overflow-hidden pt-2 space-y-1",style:{willChange:"transform, opacity"},children:e.children.map(t=>I(t,!0))},`${e.id}-content`)})]},e.id)},W=t.jsxs("div",{className:m,children:[t.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("button",{type:"button",onClick:()=>{d&&z(d)},className:"flex items-center space-x-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-botech rounded-lg",children:[t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:F?t.jsx("img",{src:F,alt:a,className:"h-full object-contain"}):t.jsx("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t.jsx("span",{className:"text-white font-bold text-sm",children:l.charAt(0)})})}),t.jsx("h1",{className:"text-lg font-bold text-gray-800",children:l})]}),t.jsx("button",{onClick:i,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t.jsx(T,{className:"w-5 h-5"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:t.jsx("nav",{className:"space-y-2",children:r.map(t=>"folder"===t.type?$(t.data):I(t.data))})}),p&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsx("div",{className:"space-y-2",children:f.map(e=>t.jsxs("button",{onClick:e.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.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"text-sm",children:e.label})]},e.id))})}),y&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:y})]});return t.jsxs(t.Fragment,{children:[D?n&&t.jsx("div",{className:h,style:L,onClick:i,"data-motion-mode":V}):t.jsx(Bi,{initial:!1,children:n&&t.jsx(Fa.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:[.25,1,.5,1]},className:h,style:L,onClick:i})}),D?t.jsx("div",{className:u,style:R,"data-motion-mode":V,children:W}):t.jsx(Fa.div,{initial:!1,animate:{x:n?0:"-100%",opacity:1},transition:{type:"spring",stiffness:280,damping:32,mass:.9},className:u,style:R,"data-motion-mode":V,children:W})]})},exports.SingleSelector=({items:n,selectedItem:i=null,onSelectionChange:s,placeholder:r="Seleccionar elemento",searchPlaceholder:o="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,renderItem:h,renderSelectedItem:m})=>{const[p,f]=e.useState(!1),[g,x]=e.useState(""),y=e.useRef(null),v=e.useRef(null),b=e.useRef(null),w=e.useRef([]),j=e.useId();e.useEffect(()=>{const t=t=>{y.current&&!y.current.contains(t.target)&&f(!1)};if(p)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[p]),e.useEffect(()=>{p&&b.current&&b.current.focus()},[p]),e.useEffect(()=>{p||x("")},[p]);const S=e.useMemo(()=>((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(n,g),[n,g,d,u,c]),[C,T]=e.useState(-1),E=e.useCallback(()=>{f(!1)},[]),k=t=>{var e;s(t),E(),null===(e=v.current)||void 0===e||e.focus()},P=()=>{l||f(!p)},N=e.useCallback(t=>{S.length&&T(e=>((-1===e?1===t?-1:0:e)+t+S.length)%S.length)},[S.length]);e.useEffect(()=>{if(p){const t=i?S.findIndex(t=>t.id===i.id):-1;-1!==t?T(t):S.length?T(t=>t>=0&&t<S.length?t:0):T(-1)}else T(-1)},[p,S,i]),e.useEffect(()=>{if(C<0)return;const t=w.current[C];null==t||t.scrollIntoView({block:"nearest"})},[C]);return w.current=[],t.jsxs("div",{ref:y,className:`relative w-full ${a}`,onKeyDown:t=>{var e;if(l)return;const n=t.target,i=n===v.current;if(!p)return void(!i||"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),P()));if("Escape"===t.key)return t.preventDefault(),E(),void(null===(e=v.current)||void 0===e||e.focus());if(n instanceof HTMLButtonElement)return;const s=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement;switch(t.key){case"ArrowDown":t.preventDefault(),N(1);break;case"ArrowUp":t.preventDefault(),N(-1);break;case"Enter":C>=0&&C<S.length&&(t.preventDefault(),k(S[C]));break;case" ":case"Spacebar":if(s)break;C>=0&&C<S.length&&(t.preventDefault(),k(S[C]))}},children:[t.jsxs("div",{ref:v,className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${l?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${p?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:P,role:"button",tabIndex:l?-1:0,"aria-haspopup":"listbox","aria-expanded":p,"aria-disabled":l,children:[t.jsx("div",{className:"flex-1 truncate",children:i?t.jsx("span",{className:"text-gray-900",children:m?m(i):i.name}):t.jsx("span",{className:"text-gray-500",children:r})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s(null)},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(p?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),p&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:b,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:o,value:g,onChange:t=>x(t.target.value),onClick:t=>t.stopPropagation(),"aria-autocomplete":"list","aria-controls":j})]})}),t.jsx("div",{id:j,className:"max-h-60 overflow-auto",role:"listbox","aria-activedescendant":C>=0?`${j}-option-${C}`:void 0,children:0===S.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:g?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):S.map((e,n)=>t.jsx("div",{id:`${j}-option-${n}`,ref:t=>{w.current[n]=t},className:"px-3 py-2 text-sm cursor-pointer transition-colors duration-200 border-b border-gray-50 last:border-b-0 "+(C===n?"bg-primary-botech-100":"hover:bg-primary-botech-50"),onClick:()=>k(e),role:"option","aria-selected":(null==i?void 0:i.id)===e.id,onMouseEnter:()=>T(n),children:h?h(e):t.jsx("span",{className:"text-gray-900",children:e.name})},e.id))})]})]})},exports.StudentSummaryModal=({open:n,onClose:i,context:s="pass",student:r,generalGroups:o,sections:l=[],photoUrl:c,title:d="Resumen del estudiante",description:u="Información consolidada del estudiante.",loading:h=!1,error:m,onReload:p})=>{const[f,g]=e.useState(!0),[x,y]=e.useState(!1),[v,b]=e.useState("desktop");e.useEffect(()=>{if("undefined"==typeof window)return;const t=()=>{const t=window.innerWidth;b(t<768?"mobile":t<1200?"tablet":"desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const w="mobile"===v,j="tablet"===v;e.useEffect(()=>{if(h)g(!0),y(!1);else if(c){g(!0),y(!1);const t=new Image;t.onload=()=>{g(!1)},t.onerror=()=>{g(!1),y(!0)},t.src=c}else g(!1),y(!0)},[c,h]),e.useEffect(()=>{n||(g(!0),y(!1))},[n,r.id]);const S=e.useMemo(()=>{var t,e,n,i,s,a,l,c,d,u;const h=null!=o?o:[{id:"datos_basicos",title:"Datos básicos",rows:[{id:"nombres",label:"Nombres",value:null!==(t=r.nombres)&&void 0!==t?t:""},{id:"apellidos",label:"Apellidos",value:null!==(e=r.apellidos)&&void 0!==e?e:""},{id:"curso",label:"Curso",value:null!==(n=r.curso)&&void 0!==n?n:""},{id:"codigoFamilia",label:"Código familia",value:null!==(i=r.codigoFamilia)&&void 0!==i?i:""}]},{id:"transporte",title:"Transporte",rows:[{id:"transporte",label:"Transporte",value:null!==(s=r.transporte)&&void 0!==s?s:""},{id:"saleSolo",label:"Sale solo",value:null!==(a=r.saleSolo)&&void 0!==a?a:""},{id:"bajaSolo",label:"Baja solo",value:null!==(l=r.bajaSolo)&&void 0!==l?l:""}]},{id:"contacto",title:"Contacto y registro",rows:[{id:"direccionCasa",label:"Dirección casa",value:null!==(c=r.direccionCasa)&&void 0!==c?c:""},{id:"rfid",label:"RFID",value:null!==(d=r.rfid)&&void 0!==d?d:""},{id:"idSchoolRegistration",label:"Registro escolar",value:null!==(u=r.idSchoolRegistration)&&void 0!==u?u:""}]}];return{id:"informacion_general",title:Pl.informacion_general,items:h}},[o,r]),C=e.useMemo(()=>{var t,e;return`${null!==(t=r.nombres)&&void 0!==t?t:""} ${null!==(e=r.apellidos)&&void 0!==e?e:""}`.trim()},[r.nombres,r.apellidos]),T=e=>{switch(e.id){case"ultimas_novedades":return(n=e.items).length?t.jsx("div",{className:"space-y-4",children:n.map(e=>t.jsxs("article",{className:"rounded-2xl border border-blue-200 bg-gradient-to-br from-blue-50 to-blue-100/50 p-4 text-sm shadow-sm ring-1 ring-blue-100",style:{borderRadius:24,border:"1px solid #BFDBFE",background:"linear-gradient(135deg, #EFF6FF 0%, rgba(219, 234, 254, 0.7) 100%)",padding:20,boxShadow:"0 18px 32px rgba(59, 130, 246, 0.15)"},children:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-blue-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-blue-800",children:[t.jsx(Ya,{className:"h-3.5 w-3.5"})," ",e.tipo]}),t.jsxs("time",{dateTime:e.fecha,className:"flex items-center gap-2 text-xs font-medium text-blue-700",children:[t.jsx(_a,{className:"h-3.5 w-3.5"}),pl(e.fecha)]})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-blue-900",children:[t.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:["Estado: ",t.jsx("span",{className:"text-sm font-bold",children:e.estado})]}),t.jsxs("p",{className:"text-sm",children:[t.jsx("span",{className:"font-semibold",children:"Responsable:"})," ",e.responsable]}),t.jsx("p",{className:"text-sm leading-relaxed",children:e.descripcion})]}),e.respuesta&&t.jsxs("p",{className:"rounded-xl bg-white/70 px-3 py-2 text-sm text-blue-900 shadow-inner ring-1 ring-blue-100",children:[t.jsx("span",{className:"font-semibold",children:"Respuesta:"})," ",e.respuesta]})]},e.id))}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin novedades recientes."});case"personas_autorizadas":return(e=>e.length?t.jsx("div",{className:"grid gap-4",children:e.map(e=>t.jsxs("article",{className:"rounded-2xl border border-emerald-200 bg-gradient-to-br from-emerald-50 to-emerald-100/40 p-4 text-sm shadow-sm ring-1 ring-emerald-100",style:{borderRadius:24,border:"1px solid #A7F3D0",background:"linear-gradient(135deg, #ECFDF5 0%, rgba(209, 250, 229, 0.65) 100%)",padding:20,boxShadow:"0 18px 32px rgba(16, 185, 129, 0.12)"},children:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-white text-emerald-600 shadow-inner ring-1 ring-emerald-100",children:t.jsx(tl,{className:"h-5 w-5"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-sm font-semibold text-emerald-900",children:e.nombreCompleto}),t.jsxs("p",{className:"text-xs text-emerald-700",children:[e.tipoDocumento," • ",e.numeroDocumento]})]})]}),t.jsx("span",{className:"rounded-full bg-emerald-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:e.estado})]}),t.jsxs("dl",{className:"mt-4 grid gap-3 text-xs text-emerald-900 sm:grid-cols-2",children:[t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Código familia"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.codigoFamilia})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Vigencia"}),t.jsxs("dd",{className:"text-sm font-semibold",children:[e.vigencia.desde," – ",e.vigencia.hasta]})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100 sm:col-span-2",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Autorizado por"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.autorizadoPor})]})]})]},`${e.numeroDocumento}-${e.vigencia.desde}`))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No hay personas autorizadas registradas."}))(e.items);case"ultimos_movimientos":return(e=>e.length?t.jsxs("div",{className:"relative space-y-4 text-sm",style:{position:"relative"},children:[t.jsx("div",{className:"absolute left-[1.15rem] top-3 bottom-3 w-px bg-slate-200",style:{position:"absolute",left:28,top:12,bottom:12,width:2,backgroundColor:wl}}),e.map((e,n)=>{var i;const s=null!==(i=yl[e.tipo.toUpperCase()])&&void 0!==i?i:Ka;return t.jsxs("div",{className:"relative pl-14",style:{position:"relative",paddingLeft:74},children:[t.jsx("div",{className:"absolute left-0 top-1 flex h-10 w-10 items-center justify-center rounded-full bg-white text-slate-600 shadow-sm ring-1 ring-slate-200",style:{position:"absolute",left:6,top:4,width:46,height:46,borderRadius:"50%",backgroundColor:vl,color:Sl,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 16px 30px rgba(15, 23, 42, 0.08)",border:`1px solid ${wl}`},children:t.jsx(s,{size:16})}),t.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm ring-1 ring-slate-100",style:{borderRadius:24,border:`1px solid ${wl}`,backgroundColor:vl,padding:20,boxShadow:"0 18px 32px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{className:"flex items-center justify-between text-xs text-slate-500",children:[t.jsx("span",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-slate-700",children:e.tipo}),t.jsx("time",{dateTime:e.fecha,children:pl(e.fecha)})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-slate-700",children:[t.jsxs("p",{children:[t.jsx("span",{className:"font-semibold",children:"Lector:"})," ",e.lector.descripcion," (",e.lector.id,")"]}),e.observaciones&&t.jsx("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm shadow-inner ring-1 ring-slate-100",children:e.observaciones})]})]})]},`${e.fecha}-${n}`)})]}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin movimientos recientes."}))(e.items);case"paradas":return(e=>e.length?t.jsx("div",{className:"student-summary-paradas",style:{display:"grid",gap:w?14:j?16:18},children:e.map((e,n)=>{var i,s,r,o;const a=`Parada ${null!==(i=e.orden)&&void 0!==i?i:n+1}`,l=null!==(s=e.time)&&void 0!==s?s:e.horaProgramada;return t.jsxs("article",{style:{borderRadius:24,border:`1px solid ${wl}`,backgroundColor:vl,padding:20,boxShadow:"0 20px 38px rgba(59, 130, 246, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:w?"flex-start":"center",justifyContent:"space-between",gap:16},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:44,height:44,borderRadius:14,backgroundColor:"#EFF6FF",color:"#1D4ED8",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(Ga,{size:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl},children:a}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:15,fontWeight:600,color:jl},children:null!==(r=e.address)&&void 0!==r?r:"Dirección no disponible"})]})]}),l&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,borderRadius:999,padding:w?"6px 12px":"6px 14px",backgroundColor:bl,border:`1px solid ${wl}`,fontSize:12,fontWeight:600,color:Sl},children:[t.jsx(Xa,{size:12}),l]})]}),t.jsxs("div",{style:{marginTop:16,display:"grid",gap:w?10:12,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(180px, 1fr))"},children:[e.estado&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:bl,border:`1px solid ${wl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Estado"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:e.estado})]}),e.horaReal&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:bl,border:`1px solid ${wl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Hora real"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:e.horaReal})]}),e.observaciones&&t.jsx("div",{style:{borderRadius:18,backgroundColor:"#EEF2FF",border:`1px solid ${wl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:t.jsx("p",{style:{margin:0,fontSize:12,fontWeight:600,color:"#4338CA"},children:e.observaciones})}),e.coordinates&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:bl,border:`1px solid ${wl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Coordenadas"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:[e.coordinates.lat.toFixed(6),", ",e.coordinates.lng.toFixed(6)]})]})]})]},null!==(o=e.id)&&void 0!==o?o:`${n}`)})}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin paradas registradas."}))(e.items);case"recorridos":return(e=>e.length?t.jsx("div",{className:"student-summary-recorridos",style:{display:"grid",gap:w?16:j?18:20},children:e.map(e=>{var n,i,s,r;return t.jsxs("article",{style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:22,boxShadow:"0 22px 44px rgba(79, 70, 229, 0.1)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:"flex-start",justifyContent:"space-between",gap:18},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:w?42:46,height:w?42:46,borderRadius:16,backgroundColor:"#EDE9FE",color:"#4338CA",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(Za,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:w?11:12,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl},children:"Recorrido"}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?15:16,fontWeight:600,color:jl},children:e.nombreRecorrido}),e.tipoRecorrido&&t.jsx("p",{style:{margin:"2px 0 0",fontSize:w?12:13,color:Sl},children:e.tipoRecorrido})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-end"},children:[e.estadoActual&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:"#E0E7FF",color:"#312E81",fontSize:12,fontWeight:600},children:e.estadoActual}),e.numeroFlota&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:bl,color:Sl,fontSize:12,fontWeight:600},children:["Flota ",e.numeroFlota]}),e.placaBus&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:bl,color:Sl,fontSize:12,fontWeight:600},children:e.placaBus})]})]}),t.jsxs("div",{style:{marginTop:20,display:"grid",gap:w?12:14,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(220px, 1fr))"},children:[(e.horaInicio||e.horaFin)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Horario"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:[null!==(n=e.horaInicio)&&void 0!==n?n:"—"," – ",null!==(i=e.horaFin)&&void 0!==i?i:"—"]})]}),(e.nombreAuxiliar||e.nombreOperario)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Equipo"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:["Auxiliar: ",null!==(s=e.nombreAuxiliar)&&void 0!==s?s:"—"]}),t.jsxs("p",{style:{margin:"2px 0 0",fontSize:14,fontWeight:600,color:jl},children:["Operario: ",null!==(r=e.nombreOperario)&&void 0!==r?r:"—"]})]}),e.diasRecorrido&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Días programados"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:e.diasRecorrido})]})]}),e.ultimoEvento&&t.jsx("div",{style:{marginTop:18,borderRadius:20,backgroundColor:"#EEF2FF",border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px",color:"#312E81",fontSize:14,fontWeight:600},children:e.ultimoEvento})]},e.idRecorrido)})}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin recorridos asociados."}))(e.items);default:return null}var n},E=null!=l?l:[];return t.jsxs(rl,{open:n,onClose:i,size:"xl",overlayClassName:"z-[1000]",className:"z-[1001] [&_.modal-content]:!max-h-[80vh] [&_.modal-body]:!max-h-none [&_.modal-body]:!overflow-visible",title:d,description:u,children:[t.jsxs(nl,{className:"px-4 pb-6",children:[m&&t.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[t.jsx("p",{className:"font-semibold",children:"No se pudo cargar el resumen."}),t.jsx("p",{className:"mt-1",children:m}),p&&t.jsx(a,{variant:"secondary",onClick:p,className:"mt-3",children:"Reintentar"})]}),t.jsxs("div",{className:"space-y-8 px-1",style:{display:"flex",flexDirection:"column",gap:w?24:32,maxWidth:1180,margin:"0 auto",width:"100%"},children:[t.jsxs("div",{className:"student-summary-layout",style:{display:"grid",gap:w?20:j?24:28,gridTemplateColumns:w||j?"1fr":"minmax(320px, 360px) minmax(640px, 1fr)",alignItems:"stretch",width:"100%"},children:[t.jsx("aside",{className:"student-summary-profile",style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:w?20:j?26:32,textAlign:"center",boxShadow:"0 26px 48px rgba(15, 23, 42, 0.1)"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:w?18:24},children:[t.jsx("div",{style:{position:"relative",width:w?110:j?128:140,height:w?110:j?128:140,overflow:"hidden",borderRadius:"50%",border:`4px solid ${vl}`,backgroundColor:bl,boxShadow:"0 20px 40px rgba(15, 23, 42, 0.14)"},children:f?t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:bl},children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-slate-500"})}):c&&!x?t.jsx("img",{src:c,alt:C||"Foto del estudiante",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:bl,color:Sl},children:t.jsx(Qa,{size:w?48:j?56:60})})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[t.jsx("h2",{style:{margin:0,fontSize:w?18:22,fontWeight:600,color:jl},children:C||"Nombre no disponible"}),r.curso&&t.jsxs("p",{style:{margin:0,fontSize:w?13:15,color:Sl},children:["Curso"," ",t.jsx("span",{style:{fontWeight:600,color:"#4338CA"},children:r.curso})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[r.id&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,backgroundColor:bl,border:`1px solid ${wl}`,borderRadius:20,padding:w?"10px 16px":"12px 20px",boxShadow:"0 14px 28px rgba(15, 23, 42, 0.08)",minWidth:w?200:240},children:[t.jsx("span",{style:{fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl,fontWeight:700},children:"Identificador estudiante"}),t.jsx("span",{style:{fontSize:17,fontWeight:600,color:jl},children:r.id})]}),t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 14px":"6px 16px",borderRadius:999,fontSize:12,fontWeight:600,backgroundColor:El,color:kl,letterSpacing:"0.04em"},children:["Contexto: ",s.toUpperCase()]})]})]})}),t.jsx("div",{className:"student-summary-general-wrapper",style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:32,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:(e=>{var n;const i=null!==(n=xl[e.id])&&void 0!==n?n:qa,s=w?1:j?2:3,r=Math.min(Math.max(e.items.length,1),s);return t.jsxs("section",{className:"student-summary-general",style:{display:"flex",flexDirection:"column",gap:24},children:[t.jsxs("header",{className:"student-summary-general__header",style:{display:"flex",flexDirection:w?"column":"row",gap:16,alignItems:"flex-start",paddingLeft:w?0:4},children:[t.jsx("div",{className:"student-summary-general__header-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?46:56,height:w?46:56,borderRadius:18,backgroundColor:Tl,color:vl,boxShadow:"0 18px 30px rgba(17, 24, 39, 0.18)"},children:t.jsx(i,{size:w?18:22})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?16:18,fontWeight:600,color:jl},children:e.title}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:w?13:14,color:Sl},children:"Información clave agrupada en tarjetas para una lectura rápida."})]})]}),t.jsx("div",{className:"student-summary-general__grid",style:{display:"grid",gap:w?14:j?18:20,gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`},children:e.items.map(e=>{var n;const s=null!==(n=fl[e.id])&&void 0!==n?n:i;return t.jsxs("article",{className:"student-summary-card",style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,boxShadow:"0 18px 35px rgba(15, 23, 42, 0.08)",padding:w?16:j?18:20,display:"flex",flexDirection:"column",gap:14},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,paddingBottom:12,borderBottom:`1px solid ${wl}`},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:16,backgroundColor:bl,color:Sl},children:t.jsx(s,{size:20})}),t.jsx("h4",{style:{margin:0,fontSize:14,fontWeight:600,color:jl},children:e.title})]}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:e.rows.map(e=>{var n;const i=null!==(n=gl[e.id])&&void 0!==n?n:qa;return t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:w?10:12,borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"10px 14px":"12px 16px",boxShadow:"0 12px 22px rgba(15, 23, 42, 0.05)"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?36:40,height:w?36:40,borderRadius:"50%",backgroundColor:vl,color:Sl,boxShadow:"0 12px 20px rgba(15, 23, 42, 0.06)"},children:t.jsx(i,{size:w?14:16})}),t.jsxs("div",{style:{minWidth:0},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl},children:e.label}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?13:14,fontWeight:600,color:jl,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:(s=e.value,null==s?"—":"string"==typeof s?s.trim()?s:"—":s)})]})]},e.id);var s})})]},e.id)})})]})})(S)})]}),E.length>0?t.jsx("div",{className:"student-summary-modules",style:{display:"grid",gap:w?18:j?20:24,gridTemplateColumns:w?"1fr":j?"repeat(auto-fit, minmax(300px, 1fr))":"repeat(auto-fit, minmax(360px, 1fr))"},children:E.map(e=>{var n,i,s,r;const o=null!==(n=xl[e.id])&&void 0!==n?n:qa,a=null!==(s=null!==(i=e.title)&&void 0!==i?i:Pl[e.id])&&void 0!==s?s:"Sección";return t.jsxs("section",{className:"student-summary-module",style:{display:"flex",flexDirection:"column",gap:16,borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:w?18:j?22:24,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",gap:14,alignItems:"flex-start"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?40:46,height:w?40:46,borderRadius:16,backgroundColor:bl,color:Sl},children:t.jsx(o,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?15:17,fontWeight:600,color:jl},children:a}),(null===(r=e.meta)||void 0===r?void 0:r.maxItems)&&t.jsxs("p",{style:{margin:"6px 0 0",fontSize:12,color:Sl},children:["Mostrando hasta ",e.meta.maxItems," registros recientes."]})]})]}),t.jsx("div",{className:"flex-1",children:T(e)})]},e.id)})}):!h&&!m&&t.jsx("div",{className:"flex h-48 items-center justify-center",children:t.jsx("span",{className:"text-sm text-gray-500",children:"Sin información adicional disponible."})})]})]}),t.jsx(il,{children:t.jsx(a,{variant:"secondary",onClick:i,children:"Cerrar"})})]})},exports.UploadStudentsExcelButton=({backend:i,label:s="Cargar Lista de Estudiantes en Excel",className:r,variant:o="primary",clientName:l,onSuccess:c,onError:d})=>{const u=e.useRef(null),[h,m]=e.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(a,{variant:o,onClick:()=>{var t;null===(t=u.current)||void 0===t||t.click()},className:r,children:h?"Subiendo...":s}),t.jsx("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:t=>Ia(void 0,void 0,void 0,function*(){var e,s,r,o,a,h,p,f;const g=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!g)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(g.name)))if(0!==g.size)try{m(!0);let t=l;if("85"===i&&!t){const{value:e}=yield n.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void m(!1);t=e}const e=yield Ua(g,i,t);let s="El archivo se ha cargado correctamente";(null==e?void 0:e.message)?s=e.message:"string"==typeof e&&(s=e),yield n.fire({title:"¡Carga exitosa!",text:s,icon:"success",confirmButtonText:"OK"}),null==c||c()}catch(t){console.error("Upload students excel failed",t),console.error("Error details:",t);let e="Hubo un problema al subir el archivo";const i=t;e=null!==(f=null!==(h=null!==(o=null===(r=null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.data)||void 0===r?void 0:r.message)&&void 0!==o?o:"string"==typeof(null===(a=null==i?void 0:i.response)||void 0===a?void 0:a.data)?i.response.data:void 0)&&void 0!==h?h:(null===(p=null==i?void 0:i.response)||void 0===p?void 0:p.statusText)?`Error ${i.response.status}: ${i.response.statusText}`:void 0)&&void 0!==f?f:e,yield n.fire({title:"Error en la carga",text:e,icon:"error",confirmButtonText:"OK"}),null==d||d(t)}finally{u.current&&(u.current.value=""),m(!1)}else yield n.fire({title:"Archivo vacío",text:"El archivo seleccionado está vacío",icon:"warning",confirmButtonText:"OK"});else yield n.fire({title:"Archivo inválido",text:"El archivo debe ser un Excel (.xlsx o .xls)",icon:"warning",confirmButtonText:"OK"})})})]})},exports.downloadStudentsExcel=Wa,exports.generateTableColumns=function(t,e){return Object.keys(t).filter(t=>-1===e.indexOf(t)).map(t=>({key:t,header:t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim(),accessor:e=>{var n;return null!==(n=e[t])&&void 0!==n?n:"-"}}))},exports.getBackendPrefix=$a,exports.uploadStudentsExcel=Ua,exports.useModal=function(t=!1){const[n,i]=e.useState(t);return{open:n,onOpen:e.useCallback(()=>i(!0),[]),onClose:e.useCallback(()=>i(!1),[]),toggle:e.useCallback(()=>i(t=>!t),[]),setOpen:i}};
1
+ "use strict";var t=require("react/jsx-runtime"),e=require("react"),n=require("sweetalert2"),i=require("axios"),s=require("react-dom");function r(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var o=r(e);const a=({variant:e="primary",size:n="md",onClick:i,children:s,className:r="",disabled:o=!1})=>{const a={primary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsx("button",{className:`rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[n]} ${a[e]} ${r}`,onClick:o?void 0:i,disabled:o,children:s})};var l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=e.createContext&&e.createContext(l),d=["attr","size","title"];function u(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 r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function h(){return h=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},h.apply(this,arguments)}function m(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 p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function f(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 g(t){return t&&t.map((t,n)=>e.createElement(t.tag,p({key:n},t.attr),g(t.child)))}function x(t){return n=>e.createElement(y,h({attr:p({},t.attr)},n),g(t.child))}function y(t){var n=n=>{var i,{attr:s,size:r,title:o}=t,a=u(t,d),l=r||n.size||"1em";return n.className&&(i=n.className),t.className&&(i=(i?i+" ":"")+t.className),e.createElement("svg",h({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,a,{className:i,style:p(p({color:t.color||n.color},n.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&e.createElement("title",null,o),t.children)};return void 0!==c?e.createElement(c.Consumer,null,t=>n(t)):n(l)}function v(t){return x({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 b(t){return x({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 w(t){return x({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 j(t){return x({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 S(t){return x({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 C(t){return x({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 T(t){return x({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 E=e.createContext({});function k(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const P="undefined"!=typeof window,N=P?e.useLayoutEffect:e.useEffect,M=e.createContext(null);function A(t,e){-1===t.indexOf(e)&&t.push(e)}function V(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const D=(t,e,n)=>n>e?e:n<t?t:n;let R=()=>{},L=()=>{};"production"!==process.env.NODE_ENV&&(R=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},L=(t,e)=>{if(!t)throw new Error(e)});const B={},F=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function O(t){return"object"==typeof t&&null!==t}const z=t=>/^0[^.\s]+$/u.test(t);function I(t){let e;return()=>(void 0===e&&(e=t()),e)}const $=t=>t,W=(t,e)=>n=>e(t(n)),U=(...t)=>t.reduce(W),H=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class _{constructor(){this.subscriptions=[]}add(t){return A(this.subscriptions,t),()=>V(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 Y=t=>1e3*t,X=t=>t/1e3;function K(t,e){return e?t*(1e3/e):0}const q=new Set;function G(t,e,n){t||q.has(e)||(console.warn(e),n&&console.warn(n),q.add(e))}const Z=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function J(t,e,n,i){if(t===e&&n===i)return $;const s=e=>function(t,e,n,i,s){let r,o,a=0;do{o=e+(n-e)/2,r=Z(o,i,s)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:Z(s(t),e,i)}const Q=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,tt=t=>e=>1-t(1-e),et=J(.33,1.53,.69,.99),nt=tt(et),it=Q(nt),st=t=>(t*=2)<1?.5*nt(t):.5*(2-Math.pow(2,-10*(t-1))),rt=t=>1-Math.sin(Math.acos(t)),ot=tt(rt),at=Q(rt),lt=J(.42,0,1,1),ct=J(0,0,.58,1),dt=J(.42,0,.58,1),ut=t=>Array.isArray(t)&&"number"==typeof t[0],ht={linear:$,easeIn:lt,easeInOut:dt,easeOut:ct,circIn:rt,circInOut:at,circOut:ot,backIn:nt,backInOut:it,backOut:et,anticipate:st},mt=t=>{if(ut(t)){L(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return J(e,n,i,s)}return"string"==typeof t?(L(void 0!==ht[t],`Invalid easing type '${t}'`),ht[t]):t},pt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ft={value:null,addProjectionMetrics:null};function gt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=pt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){o.has(e)&&(d.schedule(e),t()),l++,e(a)}const d={schedule:(t,e=!1,r=!1)=>{const a=r&&s?n:i;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),o.delete(t)},process:t=>{a=t,s?r=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&ft.value&&ft.value.frameloop[e].push(l),l=0,n.clear(),s=!1,r&&(r=!1,d.process(t)))}};return d}(r,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:m,postRender:p}=o,f=()=>{const r=B.useManualTiming?s.timestamp:performance.now();n=!1,B.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),m.process(s),p.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:pt.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<pt.length;e++)o[pt[e]].cancel(t)},state:s,steps:o}}const{schedule:xt,cancel:yt,state:vt,steps:bt}=gt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:$,!0);let wt;function jt(){wt=void 0}const St={now:()=>(void 0===wt&&St.set(vt.isProcessing||B.useManualTiming?vt.timestamp:performance.now()),wt),set:t=>{wt=t,queueMicrotask(jt)}},Ct=t=>e=>"string"==typeof e&&e.startsWith(t),Tt=Ct("--"),Et=Ct("var(--"),kt=t=>!!Et(t)&&Pt.test(t.split("/*")[0].trim()),Pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Mt={...Nt,transform:t=>D(0,1,t)},At={...Nt,default:1},Vt=t=>Math.round(1e5*t)/1e5,Dt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Rt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Lt=(t,e)=>n=>Boolean("string"==typeof n&&Rt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Bt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,r,o,a]=i.match(Dt);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ft={...Nt,transform:t=>Math.round((t=>D(0,255,t))(t))},Ot={test:Lt("rgb","red"),parse:Bt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ft.transform(t)+", "+Ft.transform(e)+", "+Ft.transform(n)+", "+Vt(Mt.transform(i))+")"};const zt={test:Lt("#"),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:Ot.transform},It=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),$t=It("deg"),Wt=It("%"),Ut=It("px"),Ht=It("vh"),_t=It("vw"),Yt=(()=>({...Wt,parse:t=>Wt.parse(t)/100,transform:t=>Wt.transform(100*t)}))(),Xt={test:Lt("hsl","hue"),parse:Bt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Wt.transform(Vt(e))+", "+Wt.transform(Vt(n))+", "+Vt(Mt.transform(i))+")"},Kt={test:t=>Ot.test(t)||zt.test(t)||Xt.test(t),parse:t=>Ot.test(t)?Ot.parse(t):Xt.test(t)?Xt.parse(t):zt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Ot.transform(t):Xt.transform(t),getAnimatableNone:t=>{const e=Kt.parse(t);return e.alpha=0,Kt.transform(e)}},qt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Gt="number",Zt="color",Jt=/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 Qt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const o=e.replace(Jt,t=>(Kt.test(t)?(i.color.push(r),s.push(Zt),n.push(Kt.parse(t))):t.startsWith("var(")?(i.var.push(r),s.push("var"),n.push(t)):(i.number.push(r),s.push(Gt),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:i,types:s}}function te(t){return Qt(t).values}function ee(t){const{split:e,types:n}=Qt(t),i=e.length;return t=>{let s="";for(let r=0;r<i;r++)if(s+=e[r],void 0!==t[r]){const e=n[r];s+=e===Gt?Vt(t[r]):e===Zt?Kt.transform(t[r]):t[r]}return s}}const ne=t=>"number"==typeof t?0:Kt.test(t)?Kt.getAnimatableNone(t):t;const ie={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Dt)?.length||0)+(t.match(qt)?.length||0)>0},parse:te,createTransformer:ee,getAnimatableNone:function(t){const e=te(t);return ee(t)(e.map(ne))}};function se(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 re(t,e){return n=>n>0?e:t}const oe=(t,e,n)=>t+(e-t)*n,ae=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},le=[zt,Ot,Xt];function ce(t){const e=(n=t,le.find(t=>t.test(n)));var n;if(R(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===Xt&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,r=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=se(a,i,t+1/3),r=se(a,i,t),o=se(a,i,t-1/3)}else s=r=o=n;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:i}}(i)),i}const de=(t,e)=>{const n=ce(t),i=ce(e);if(!n||!i)return re(t,e);const s={...n};return t=>(s.red=ae(n.red,i.red,t),s.green=ae(n.green,i.green,t),s.blue=ae(n.blue,i.blue,t),s.alpha=oe(n.alpha,i.alpha,t),Ot.transform(s))},ue=new Set(["none","hidden"]);function he(t,e){return n=>oe(t,e,n)}function me(t){return"number"==typeof t?he:"string"==typeof t?kt(t)?re:Kt.test(t)?de:ge:Array.isArray(t)?pe:"object"==typeof t?Kt.test(t)?de:fe:re}function pe(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 fe(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 ge=(t,e)=>{const n=ie.createTransformer(e),i=Qt(t),s=Qt(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?ue.has(t)&&!s.values.length||ue.has(e)&&!i.values.length?function(t,e){return ue.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):U(pe(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}(i,s),s.values),n):(R(!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.`),re(t,e))};function xe(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return oe(t,e,n);return me(t)(t,e)}const ye=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>xt.update(e,t),stop:()=>yt(e),now:()=>vt.isProcessing?vt.timestamp:St.now()}},ve=(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 we(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 je(t,e,n){const i=Math.max(e-5,0);return K(n-t(i),e-i)}const Se=100,Ce=10,Te=1,Ee=0,ke=800,Pe=.3,Ne=.3,Me={granular:.01,default:2},Ae={granular:.005,default:.5},Ve=.01,De=10,Re=.05,Le=1,Be=.001;function Fe({duration:t=ke,bounce:e=Pe,velocity:n=Ee,mass:i=Te}){let s,r;R(t<=Y(De),"Spring duration must be 10 seconds or less");let o=1-e;o=D(Re,Le,o),t=D(Ve,De,X(t)),o<1?(s=e=>{const i=e*o,s=i*t,r=i-n,a=ze(e,o),l=Math.exp(-s);return Be-r/a*l},r=e=>{const i=e*o*t,r=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=ze(Math.pow(e,2),o);return(-s(e)+Be>0?-1:1)*((r-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<Oe;n++)i-=t(i)/e(i);return i}(s,r,5/t);if(t=Y(t),isNaN(a))return{stiffness:Se,damping:Ce,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const Oe=12;function ze(t,e){return t*Math.sqrt(1-e*e)}const Ie=["duration","bounce"],$e=["stiffness","damping","mass"];function We(t,e){return e.some(e=>void 0!==t[e])}function Ue(t=Ne,e=Pe){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:m}=function(t){let e={velocity:Ee,stiffness:Se,damping:Ce,mass:Te,isResolvedFromDuration:!1,...t};if(!We(t,$e)&&We(t,Ie))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,r=2*D(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Te,stiffness:s,damping:r}}else{const n=Fe(t);e={...e,...n,mass:Te},e.isResolvedFromDuration=!0}return e}({...n,velocity:-X(n.velocity||0)}),p=h||0,f=c/(2*Math.sqrt(l*d)),g=o-r,x=X(Math.sqrt(l/d)),y=Math.abs(g)<5;let v;if(i||(i=y?Me.granular:Me.default),s||(s=y?Ae.granular:Ae.default),f<1){const t=ze(x,f);v=e=>{const n=Math.exp(-f*x*e);return o-n*((p+f*x*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)v=t=>o-Math.exp(-x*t)*(g+(p+x*g)*t);else{const t=x*Math.sqrt(f*f-1);v=e=>{const n=Math.exp(-f*x*e),i=Math.min(t*e,300);return o-n*((p+f*x*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:m&&u||null,next:t=>{const e=v(t);if(m)a.done=t>=u;else{let n=0===t?p:0;f<1&&(n=0===t?Y(p):je(v,t,e));const r=Math.abs(n)<=i,l=Math.abs(o-e)<=s;a.done=r&&l}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(we(b),be),e=ve(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function He({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=u+p,g=void 0===o?f:o(f);g!==f&&(p=g-u);const x=t=>-p*Math.exp(-t/i),y=t=>g+x(t),v=t=>{const e=x(t),n=y(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let b,w;const j=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=Ue({keyframes:[h.value,m(h.value)],velocity:je(y,t,h.value),damping:s,stiffness:r,restDelta:c,restSpeed:d}))};return j(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,v(t),j(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&v(t),h)}}}function _e(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(L(r===e.length,"Both input and output ranges must be the same length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||B.mix||xe,r=t.length-1;for(let n=0;n<r;n++){let r=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||$:e;r=U(t,r)}i.push(r)}return i}(e,i,s),l=a.length,c=n=>{if(o&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=H(t[i],t[i+1],n);return a[i](s)};return n?e=>c(D(t[0],t[r-1],e)):c}function Ye(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=H(0,e,i);t.push(oe(n,1,s))}}(e,t.length-1),e}function Xe({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),r={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Ye(e),t),a=_e(o,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map(()=>c||dt).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}Ue.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(we(i),be);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:X(s)}}(t,100,Ue);return t.ease=e.ease,t.duration=Y(e.duration),t.type="keyframes",t};const Ke=t=>null!==t;function qe(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(Ke),o=s<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const Ge={decay:He,inertia:He,tween:Xe,keyframes:Xe,spring:Ue};function Ze(t){"string"==typeof t.type&&(t.type=Ge[t.type])}class Je{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 Qe=t=>t/100;class tn extends Je{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!==St.now()&&this.tick(St.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;Ze(t);const{type:e=Xe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:o}=t;const a=e||Xe;"production"!==process.env.NODE_ENV&&a!==Xe&&L(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),a!==Xe&&"number"!=typeof o[0]&&(this.mixKeyframes=U(Qe,xe(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=we(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:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:m,onUpdate:p,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),x=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let y=this.currentTime,v=n;if(d){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===u?(n=1-n,h&&(n-=h/o)):"mirror"===u&&(v=r)),y=D(0,1,n)*o}const b=x?{done:!1,value:c[0]}:v.next(y);s&&(b.value=s(b.value));let{done:w}=b;x||null===a||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return j&&m!==He&&(b.value=qe(c,this.options,f,this.speed)),p&&p(b.value),j&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return X(this.calculatedDuration)}get time(){return X(this.currentTime)}set time(t){t=Y(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(St.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=X(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ye,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(St.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 en=t=>180*t/Math.PI,nn=t=>{const e=en(Math.atan2(t[1],t[0]));return rn(e)},sn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:nn,rotateZ:nn,skewX:t=>en(Math.atan(t[1])),skewY:t=>en(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},rn=t=>((t%=360)<0&&(t+=360),t),on=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),an=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ln={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:on,scaleY:an,scale:t=>(on(t)+an(t))/2,rotateX:t=>rn(en(Math.atan2(t[6],t[5]))),rotateY:t=>rn(en(Math.atan2(-t[2],t[0]))),rotateZ:nn,rotate:nn,skewX:t=>en(Math.atan(t[4])),skewY:t=>en(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function cn(t){return t.includes("scale")?1:0}function dn(t,e){if(!t||"none"===t)return cn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=ln,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=sn,s=e}if(!s)return cn(e);const r=i[e],o=s[1].split(",").map(un);return"function"==typeof r?r(o):o[r]}function un(t){return parseFloat(t.trim())}const hn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mn=(()=>new Set(hn))(),pn=t=>t===Nt||t===Ut,fn=new Set(["x","y","z"]),gn=hn.filter(t=>!fn.has(t));const xn={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})=>dn(e,"x"),y:(t,{transform:e})=>dn(e,"y")};xn.translateX=xn.x,xn.translateY=xn.y;const yn=new Set;let vn=!1,bn=!1,wn=!1;function jn(){if(bn){const t=Array.from(yn).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 gn.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,vn=!1,yn.forEach(t=>t.complete(wn)),yn.clear()}function Sn(){yn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(bn=!0)})}class Cn{constructor(t,e,n,i,s,r=!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=r}scheduleResolve(){this.state="scheduled",this.isAsync?(yn.add(this),vn||(vn=!0,xt.read(Sn),xt.resolveKeyframes(jn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,r);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=r),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),yn.delete(this)}cancel(){"scheduled"===this.state&&(yn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Tn=I(()=>void 0!==window.ScrollTimeline),En={};function kn(t,e){const n=I(t);return()=>En[e]??n()}const Pn=kn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Nn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nn([0,.65,.55,1]),circOut:Nn([.55,0,1,.45]),backIn:Nn([.31,.01,.66,-.59]),backOut:Nn([.33,1.53,.69,.99])};function An(t,e){return t?"function"==typeof t?Pn()?ve(t,e):"ease-out":ut(t)?Nn(t):Array.isArray(t)?t.map(t=>An(t,e)||Mn.easeOut):Mn[t]:void 0}function Vn(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:n};l&&(d.offset=l);const u=An(a,s);Array.isArray(u)&&(d.easing=u);const h={delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};c&&(h.pseudoElement=c);return t.animate(d,h)}function Dn(t){return"function"==typeof t&&"applyToOptions"in t}class Rn extends Je{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=r,this.options=t,L("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 Dn(t)&&Pn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Vn(e,n,i,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=qe(i,this.options,o,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 X(Number(t))}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Y(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&&Tn()?(this.animation.timeline=t,$):e(this)}}const Ln={anticipate:st,backInOut:it,circInOut:at};function Bn(t){"string"==typeof t.ease&&t.ease in Ln&&(t.ease=Ln[t.ease])}class Fn extends Rn{constructor(t){Bn(t),Ze(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new tn({...r,autoplay:!1}),a=Y(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const On=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ie.test(t)&&"0"!==t||t.startsWith("url(")));function zn(t){return O(t)&&"offsetHeight"in t}const In=new Set(["opacity","clipPath","filter","transform"]),$n=I(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Wn extends Je{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=St.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||Cn;this.keyframeResolver=new h(o,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:o,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=St.now(),function(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=On(s,e),a=On(r,e);return R(o===a,`You are trying to animate ${e} from "${s}" to "${r}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${r} via the \`style\` property.`),!(!o||!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||Dn(n))&&i)}(t,s,r,o)||(!B.instantAnimations&&a||c?.(qe(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!zn(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return $n()&&n&&In.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==r&&"inertia"!==o}(d)?new Fn({...d,element:d.motionValue.owner.current}):new tn(d);u.finished.then(()=>this.notifyFinished()).catch($),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}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(),wn=!0,Sn(),jn(),wn=!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 Un=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hn(t,e,n=1){L(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=Un.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const t=r.trim();return F(t)?parseFloat(t):t}return kt(s)?Hn(s,e,n+1):s}function _n(t,e){return t?.[e]??t?.default??t}const Yn=new Set(["width","height","top","left","right","bottom",...hn]),Xn=t=>e=>e.test(t),Kn=[Nt,Ut,Wt,$t,_t,Ht,{test:t=>"auto"===t,parse:t=>t}],qn=t=>Kn.find(Xn(t));function Gn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||z(t))}const Zn=new Set(["brightness","contrast","saturate","opacity"]);function Jn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Dt)||[];if(!i)return t;const s=n.replace(i,"");let r=Zn.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const Qn=/\b([a-z-]*)\(.*?\)/gu,ti={...ie,getAnimatableNone:t=>{const e=t.match(Qn);return e?e.map(Jn).join(" "):t}},ei={...Nt,transform:Math.round},ni={borderWidth:Ut,borderTopWidth:Ut,borderRightWidth:Ut,borderBottomWidth:Ut,borderLeftWidth:Ut,borderRadius:Ut,radius:Ut,borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomRightRadius:Ut,borderBottomLeftRadius:Ut,width:Ut,maxWidth:Ut,height:Ut,maxHeight:Ut,top:Ut,right:Ut,bottom:Ut,left:Ut,padding:Ut,paddingTop:Ut,paddingRight:Ut,paddingBottom:Ut,paddingLeft:Ut,margin:Ut,marginTop:Ut,marginRight:Ut,marginBottom:Ut,marginLeft:Ut,backgroundPositionX:Ut,backgroundPositionY:Ut,...{rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:$t,skewX:$t,skewY:$t,distance:Ut,translateX:Ut,translateY:Ut,translateZ:Ut,x:Ut,y:Ut,z:Ut,perspective:Ut,transformPerspective:Ut,opacity:Mt,originX:Yt,originY:Yt,originZ:Ut},zIndex:ei,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:ei},ii={...ni,color:Kt,backgroundColor:Kt,outlineColor:Kt,fill:Kt,stroke:Kt,borderColor:Kt,borderTopColor:Kt,borderRightColor:Kt,borderBottomColor:Kt,borderLeftColor:Kt,filter:ti,WebkitFilter:ti},si=t=>ii[t];function ri(t,e){let n=si(t);return n!==ti&&(n=ie),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const oi=new Set(["auto","none","0"]);class ai extends Cn{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(),kt(i))){const s=Hn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!Yn.has(n)||2!==t.length)return;const[i,s]=t,r=qn(i),o=qn(s);if(r!==o)if(pn(r)&&pn(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else xn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||Gn(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&&!oi.has(e)&&Qt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=ri(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=xn[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,r=n[s];n[s]=xn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const li=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ci{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=St.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=St.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&&G(!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 _);const n=this.events[t].add(e);return"change"===t?()=>{n(),xt.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=St.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return K(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 di(t,e){return new ci(t,e)}const{schedule:ui,cancel:hi}=gt(queueMicrotask,!1),mi={x:!1,y:!1};function pi(){return mi.x||mi.y}function fi(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 gi(t){return!("touch"===t.pointerType||pi())}const xi=(t,e)=>!!e&&(t===e||xi(t,e.parentElement)),yi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,vi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const bi=new WeakSet;function wi(t){return e=>{"Enter"===e.key&&t(e)}}function ji(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Si(t){return yi(t)&&!pi()}function Ci(t,e,n={}){const[i,s,r]=fi(t,n),o=t=>{const i=t.currentTarget;if(!Si(t))return;bi.add(i);const r=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),bi.has(i)&&bi.delete(i),Si(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||xi(i,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),zn(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=wi(()=>{if(bi.has(n))return;ji(n,"down");const t=wi(()=>{ji(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ji(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,vi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}function Ti(t){return O(t)&&"ownerSVGElement"in t}const Ei=t=>Boolean(t&&t.getVelocity),ki=[...Kn,Kt,ie],Pi=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ni extends o.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=zn(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 Mi({children:n,isPresent:i,anchorX:s}){const r=e.useId(),a=e.useRef(null),l=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=e.useContext(Pi);return e.useInsertionEffect(()=>{const{width:t,height:e,top:n,left:o,right:d}=l.current;if(i||!a.current||!t||!e)return;const u="left"===s?`left: ${o}`:`right: ${d}`;a.current.dataset.motionPopId=r;const h=document.createElement("style");return c&&(h.nonce=c),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${u}px !important;\n top: ${n}px !important;\n }\n `),()=>{document.head.contains(h)&&document.head.removeChild(h)}},[i]),t.jsx(Ni,{isPresent:i,childRef:a,sizeRef:l,children:o.cloneElement(n,{ref:a})})}const Ai=({children:n,initial:i,isPresent:s,onExitComplete:r,custom:a,presenceAffectsLayout:l,mode:c,anchorX:d})=>{const u=k(Vi),h=e.useId();let m=!0,p=e.useMemo(()=>(m=!1,{id:h,initial:i,isPresent:s,custom:a,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;r&&r()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[s,u,r]);return l&&m&&(p={...p}),e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[s]),o.useEffect(()=>{!s&&!u.size&&r&&r()},[s]),"popLayout"===c&&(n=t.jsx(Mi,{isPresent:s,anchorX:d,children:n})),t.jsx(M.Provider,{value:p,children:n})};function Vi(){return new Map}function Di(t=!0){const n=e.useContext(M);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:r}=n,o=e.useId();e.useEffect(()=>{if(t)return r(o)},[t]);const a=e.useCallback(()=>t&&s&&s(o),[o,s,t]);return!i&&s?[!1,a]:[!0]}const Ri=t=>t.key||"";function Li(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Bi=({children:n,custom:i,initial:s=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left"})=>{const[d,u]=Di(l),h=e.useMemo(()=>Li(n),[n]),m=l&&!d?[]:h.map(Ri),p=e.useRef(!0),f=e.useRef(h),g=k(()=>new Map),[x,y]=e.useState(h),[v,b]=e.useState(h);N(()=>{p.current=!1,f.current=h;for(let t=0;t<v.length;t++){const e=Ri(v[t]);m.includes(e)?g.delete(e):!0!==g.get(e)&&g.set(e,!1)}},[v,m.length,m.join("-")]);const w=[];if(h!==x){let t=[...h];for(let e=0;e<v.length;e++){const n=v[e],i=Ri(n);m.includes(i)||(t.splice(e,0,n),w.push(n))}return"wait"===a&&w.length&&(t=w),b(Li(t)),y(h),null}"production"!==process.env.NODE_ENV&&"wait"===a&&v.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:j}=e.useContext(E);return t.jsx(t.Fragment,{children:v.map(e=>{const n=Ri(e),x=!(l&&!d)&&(h===v||m.includes(n));return t.jsx(Ai,{isPresent:x,initial:!(p.current&&!s)&&void 0,custom:i,presenceAffectsLayout:o,mode:a,onExitComplete:x?void 0:()=>{if(!g.has(n))return;g.set(n,!0);let t=!0;g.forEach(e=>{e||(t=!1)}),t&&(j?.(),b(f.current),l&&u?.(),r&&r())},anchorX:c,children:e},n)})})},Fi=e.createContext({strict:!1}),Oi={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"]},zi={};for(const t in Oi)zi[t]={isEnabled:e=>Oi[t].some(t=>!!e[t])};const Ii=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 $i(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ii.has(t)}let Wi=t=>!$i(t);try{"function"==typeof(Ui=require("@emotion/is-prop-valid").default)&&(Wi=t=>t.startsWith("on")?!$i(t):Ui(t))}catch{}var Ui;function Hi(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&G(!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 _i=e.createContext({});function Yi(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Xi(t){return"string"==typeof t||Array.isArray(t)}const Ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qi=["initial",...Ki];function Gi(t){return Yi(t.animate)||qi.some(e=>Xi(t[e]))}function Zi(t){return Boolean(Gi(t)||t.variants)}function Ji(t){const{initial:n,animate:i}=function(t,e){if(Gi(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Xi(e)?e:void 0,animate:Xi(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(_i));return e.useMemo(()=>({initial:n,animate:i}),[Qi(n),Qi(i)])}function Qi(t){return Array.isArray(t)?t.join(" "):t}const ts=Symbol.for("motionComponentSymbol");function es(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ns(t,n,i){return e.useCallback(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):es(i)&&(i.current=e))},[n])}const is=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ss="data-"+is("framerAppearId"),rs=e.createContext({});function os(t,n,i,s,r){const{visualElement:o}=e.useContext(_i),a=e.useContext(Fi),l=e.useContext(M),c=e.useContext(Pi).reducedMotion,d=e.useRef(null);s=s||a.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const u=d.current,h=e.useContext(rs);!u||u.projection||!r||"html"!==u.type&&"svg"!==u.type||function(t,e,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:as(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:Boolean(o)||a&&es(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:i,crossfade:d,layoutScroll:l,layoutRoot:c})}(d.current,i,r,h);const m=e.useRef(!1);e.useInsertionEffect(()=>{u&&m.current&&u.update(i,l)});const p=i[ss],f=e.useRef(Boolean(p)&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return N(()=>{u&&(m.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),ui.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),e.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),f.current=!1))}),u}function as(t){if(t)return!1!==t.options.allowProjection?t.projection:as(t.parent)}function ls({preloadedFeatures:n,createVisualElement:i,useRender:s,useVisualState:r,Component:o}){function a(a,l){let c;const d={...e.useContext(Pi),...a,layoutId:cs(a)},{isStatic:u}=d,h=Ji(a),m=r(a,u);if(!u&&P){!function(t,n){const i=e.useContext(Fi).strict;if("production"!==process.env.NODE_ENV&&n&&i){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?R(!1,e):L(!1,e)}}(d,n);const t=function(t){const{drag:e,layout:n}=zi;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(d);c=t.MeasureLayout,h.visualElement=os(o,m,d,i,t.ProjectionNode)}return t.jsxs(_i.Provider,{value:h,children:[c&&h.visualElement?t.jsx(c,{visualElement:h.visualElement,...d}):null,s(o,a,ns(m,h.visualElement,l),m,u,h.visualElement)]})}n&&function(t){for(const e in t)zi[e]={...zi[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const l=e.forwardRef(a);return l[ts]=o,l}function cs({layoutId:t}){const n=e.useContext(E).id;return n&&void 0!==t?n+"-"+t:t}const ds={};function us(t,{layout:e,layoutId:n}){return mn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ds[t]||"opacity"===t)}const hs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ms=hn.length;function ps(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(mn.has(t))o=!0;else if(Tt(t))s[t]=n;else{const e=li(n,ni[t]);t.startsWith("origin")?(a=!0,r[t]=e):i[t]=e}}if(e.transform||(o||n?i.transform=function(t,e,n){let i="",s=!0;for(let r=0;r<ms;r++){const o=hn[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=li(a,ni[o]);l||(s=!1,i+=`${hs[o]||o}(${t}) `),n&&(e[o]=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}=r;i.transformOrigin=`${t} ${e} ${n}`}}const fs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gs(t,e,n){for(const i in e)Ei(e[i])||us(i,n)||(t[i]=e[i])}function xs(t,n){const i={};return gs(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return ps(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ys(t,e){const n={},i=xs(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 vs={offset:"stroke-dashoffset",array:"stroke-dasharray"},bs={offset:"strokeDashoffset",array:"strokeDasharray"};function ws(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,c,d){if(ps(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:h}=t;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?vs:bs;t[r.offset]=Ut.transform(-i);const o=Ut.transform(e),a=Ut.transform(n);t[r.array]=`${o} ${a}`}(u,s,r,o,!1)}const js=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Ss=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Cs(t,n,i,s){const r=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return ws(e,n,Ss(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};gs(e,t.style,t),r.style={...e,...r.style}}return r}const Ts=["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 Es(t){return"string"==typeof t&&!t.includes("-")&&!!(Ts.indexOf(t)>-1||/[A-Z]/u.test(t))}function ks(t=!1){return(n,i,s,{latestValues:r},o)=>{const a=(Es(n)?Cs:ys)(i,r,o,n),l=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Wi(s)||!0===n&&$i(s)||!e&&!$i(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(i,"string"==typeof n,t),c=n!==e.Fragment?{...l,...a,ref:s}:{},{children:d}=i,u=e.useMemo(()=>Ei(d)?d.get():d,[d]);return e.createElement(n,{...c,children:u})}}function Ps(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ns(t,e,n,i){if("function"==typeof e){const[s,r]=Ps(i);e=e(void 0!==n?n:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,r]=Ps(i);e=e(void 0!==n?n:t.custom,s,r)}return e}function Ms(t){return Ei(t)?t.get():t}const As=t=>(n,i)=>{const s=e.useContext(_i),r=e.useContext(M),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:Vs(n,i,s,t),renderState:e()}}(t,n,s,r);return i?o():k(o)};function Vs(t,e,n,i){const s={},r=i(t,{});for(const t in r)s[t]=Ms(r[t]);let{initial:o,animate:a}=t;const l=Gi(t),c=Zi(t);e&&c&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===o;const u=d?a:o;if(u&&"boolean"!=typeof u&&!Yi(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Ns(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[d?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}function Ds(t,e,n){const{style:i}=t,s={};for(const r in i)(Ei(i[r])||e.style&&Ei(e.style[r])||us(r,t)||void 0!==n?.getValue(r)?.liveStyle)&&(s[r]=i[r]);return s}const Rs={useVisualState:As({scrapeMotionValuesFromProps:Ds,createRenderState:fs})};function Ls(t,e,n){const i=Ds(t,e,n);for(const n in t)if(Ei(t[n])||Ei(e[n])){i[-1!==hn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const Bs={useVisualState:As({scrapeMotionValuesFromProps:Ls,createRenderState:js})};function Fs(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return ls({...Es(n)?Bs:Rs,preloadedFeatures:t,useRender:ks(i),createVisualElement:e,Component:n})}}function Os(t,e,n){const i=t.getProps();return Ns(i,e,void 0!==n?n:i.custom,t)}const zs=t=>Array.isArray(t);function Is(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,di(n))}function $s(t){return zs(t)?t[t.length-1]||0:t}function Ws(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ei(i)&&i.add))return n.add(e);if(!n&&B.WillChange){const n=new B.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Us(t){return t.props[ss]}const Hs=t=>null!==t;const _s={type:"spring",stiffness:500,damping:25,restSpeed:10},Ys={type:"keyframes",duration:.8},Xs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ks=(t,{keyframes:e})=>e.length>2?Ys:mn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:_s:Xs;const qs=(t,e,n,i={},s,r)=>o=>{const a=_n(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Y(l);const d={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:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||Object.assign(d,Ks(t,d)),d.duration&&(d.duration=Y(d.duration)),d.repeatDelay&&(d.repeatDelay=Y(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),(B.instantAnimations||B.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!r&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Hs),r=e&&"loop"!==n&&e%2==1?0:s.length-1;return r&&void 0!==i?i:s[r]}(d.keyframes,a);if(void 0!==t)return void xt.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new tn(d):new Wn(d)};function Gs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Zs(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(r=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&&Gs(c,e))continue;const o={delay:n,..._n(r||{},e)},d=i.get();if(void 0!==d&&!i.isAnimating&&!Array.isArray(s)&&s===d&&!o.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=Us(t);if(n){const t=window.MotionHandoffAnimation(n,e,xt);null!==t&&(o.startTime=t,u=!0)}}Ws(t,e),i.start(qs(e,i,s,t.shouldReduceMotion&&Yn.has(e)?{type:!1}:o,t,u));const h=i.animation;h&&l.push(h)}return o&&Promise.all(l).then(()=>{xt.update(()=>{o&&function(t,e){const n=Os(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const e in r)Is(t,e,$s(r[e]))}(t,o)})}),l}function Js(t,e,n={}){const i=Os(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Zs(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,r){const o=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(Qs).forEach((t,i)=>{t.notify("AnimationStart",e),o.push(Js(t,e,{...r,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,r+i,o,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}return Promise.all([r(),o(n.delay)])}function Qs(t,e){return t.sortNodePosition(e)}function tr(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 er=qi.length;function nr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&nr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<er;n++){const i=qi[n],s=t.props[i];(Xi(s)||!1===s)&&(e[i]=s)}return e}const ir=[...Ki].reverse(),sr=Ki.length;function rr(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=>Js(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Js(t,e,n);else{const s="function"==typeof e?Os(t,e,n.custom):e;i=Promise.all(Zs(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function or(t){let e=rr(t),n=cr(),i=!0;const s=e=>(n,i)=>{const s=Os(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 r(r){const{props:o}=t,a=nr(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<sr;e++){const h=ir[e],m=n[h],p=void 0!==o[h]?o[h]:a[h],f=Xi(p),g=h===r?m.isActive:null;!1===g&&(u=e);let x=p===a[h]&&p!==o[h]&&f;if(x&&i&&t.manuallyAnimateOnMount&&(x=!1),m.protectedKeys={...d},!m.isActive&&null===g||!p&&!m.prevProp||Yi(p)||"boolean"==typeof p)continue;const y=ar(m.prevProp,p);let v=y||h===r&&m.isActive&&!x&&f||e>u&&f,b=!1;const w=Array.isArray(p)?p:[p];let j=w.reduce(s(h),{});!1===g&&(j={});const{prevResolvedValues:S={}}=m,C={...S,...j},T=e=>{v=!0,c.has(e)&&(b=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in C){const e=j[t],n=S[t];if(d.hasOwnProperty(t))continue;let i=!1;i=zs(e)&&zs(n)?!tr(e,n):e!==n,i?null!=e?T(t):c.add(t):void 0!==e&&c.has(t)?T(t):m.protectedKeys[t]=!0}m.prevProp=p,m.prevResolvedValues=j,m.isActive&&(d={...d,...j}),i&&t.blockInitialAnimation&&(v=!1);v&&(!(x&&y)||b)&&l.push(...w.map(t=>({animation:t,options:{type:h}})))}if(c.size){const e={};if("boolean"!=typeof o.initial){const n=Os(t,Array.isArray(o.initial)?o.initial[0]:o.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 h=Boolean(l.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:r,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=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=cr(),i=!0}}}function ar(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!tr(e,t)}function lr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cr(){return{animate:lr(!0),whileInView:lr(),whileHover:lr(),whileTap:lr(),whileDrag:lr(),whileFocus:lr(),exit:lr()}}class dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}let ur=0;const hr={animation:{Feature:class extends dr{constructor(t){super(t),t.animationState||(t.animationState=or(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yi(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 dr{constructor(){super(...arguments),this.id=ur++}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 mr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function pr(t){return{point:{x:t.pageX,y:t.pageY}}}function fr(t,e,n,i){return mr(t,e,(t=>e=>yi(e)&&t(e,pr(e)))(n),i)}function gr({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function xr(t){return t.max-t.min}function yr(t,e,n,i=.5){t.origin=i,t.originPoint=oe(e.min,e.max,t.origin),t.scale=xr(n)/xr(e),t.translate=oe(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 vr(t,e,n,i){yr(t.x,e.x,n.x,i?i.originX:void 0),yr(t.y,e.y,n.y,i?i.originY:void 0)}function br(t,e,n){t.min=n.min+e.min,t.max=t.min+xr(e)}function wr(t,e,n){t.min=e.min-n.min,t.max=t.min+xr(e)}function jr(t,e,n){wr(t.x,e.x,n.x),wr(t.y,e.y,n.y)}const Sr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Cr(t){return[t("x"),t("y")]}function Tr(t){return void 0===t||1===t}function Er({scale:t,scaleX:e,scaleY:n}){return!Tr(t)||!Tr(e)||!Tr(n)}function kr(t){return Er(t)||Pr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Pr(t){return Nr(t.x)||Nr(t.y)}function Nr(t){return t&&"0%"!==t}function Mr(t,e,n){return n+e*(t-n)}function Ar(t,e,n,i,s){return void 0!==s&&(t=Mr(t,s,i)),Mr(t,n,i)+e}function Vr(t,e=0,n=1,i,s){t.min=Ar(t.min,e,n,i,s),t.max=Ar(t.max,e,n,i,s)}function Dr(t,{x:e,y:n}){Vr(t.x,e.translate,e.scale,e.originPoint),Vr(t.y,n.translate,n.scale,n.originPoint)}const Rr=.999999999999,Lr=1.0000000000001;function Br(t,e){t.min=t.min+e,t.max=t.max+e}function Fr(t,e,n,i,s=.5){Vr(t,e,n,oe(t.min,t.max,s),i)}function Or(t,e){Fr(t.x,e.x,e.scaleX,e.scale,e.originX),Fr(t.y,e.y,e.scaleY,e.scale,e.originY)}function zr(t,e){return gr(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,$r=(t,e)=>Math.abs(t-e);class Wr{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=_r(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=$r(t.x,e.x),i=$r(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}=vt;this.history.push({...i,timestamp:s});const{onStart:r,onMove:o}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ur(e,this.transformPagePoint),xt.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 r=_r("pointercancel"===t.type?this.lastMoveEventInfo:Ur(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,r),i&&i(t,r)},!yi(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const r=Ur(pr(t),this.transformPagePoint),{point:o}=r,{timestamp:a}=vt;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,_r(r,this.history)),this.removeListeners=U(fr(this.contextWindow,"pointermove",this.handlePointerMove),fr(this.contextWindow,"pointerup",this.handlePointerUp),fr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),yt(this.updatePoint)}}function Ur(t,e){return e?{point:e(t.point)}:t}function Hr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function _r({point:t},e){return{point:t,delta:Hr(t,Xr(e)),offset:Hr(t,Yr(e)),velocity:Kr(e,.1)}}function Yr(t){return t[0]}function Xr(t){return t[t.length-1]}function Kr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Xr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Y(e)));)n--;if(!i)return{x:0,y:0};const r=X(s.timestamp-i.timestamp);if(0===r)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function qr(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 Gr(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 Zr=.35;function Jr(t,e,n){return{min:Qr(t,e),max:Qr(t,n)}}function Qr(t,e){return"number"==typeof t?t:t[e]||0}const to=new WeakMap;class eo{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 Wr(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(pr(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(r=n)||"y"===r?mi[r]?null:(mi[r]=!0,()=>{mi[r]=!1}):mi.x||mi.y?null:(mi.x=mi.y=!0,()=>{mi.x=mi.y=!1}),!this.openDragLock))return;var r;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Wt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=xr(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&xt.postRender(()=>s(t,e)),Ws(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:r}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=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}(o),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&r(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Cr(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&&xt.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||!no(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?oe(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?oe(n,t,i.max):Math.min(t,n)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}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&&es(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:qr(t.x,n,s),y:qr(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=Zr){return!1===t?t=0:!0===t&&(t=Zr),{x:Jr(t,"left","right"),y:Jr(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Cr(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||!es(t))return!1;const n=t.current;L(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=zr(t,n),{scroll:s}=e;return s&&(Br(i.x,s.offset.x),Br(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Gr(t.x,e.x),y:Gr(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}}(r));this.hasMutatedConstraints=!!t,t&&(r=gr(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=Cr(o=>{if(!no(o,e,this.currentDirection))return;let l=a&&a[o]||{};r&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[o]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,u)});return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Ws(this.visualElement,t),n.start(qs(t,n,0,e,this.visualElement,!1))}stopAnimation(){Cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Cr(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){Cr(e=>{const{drag:n}=this.getProps();if(!no(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:r}=i.layout.layoutBox[e];s.set(t[e]-oe(n,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!es(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cr(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=xr(t),s=xr(e);return s>i?n=H(e.min,e.max-i,t.min):i>s&&(n=H(t.min,t.max-s,e.min)),D(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(),Cr(e=>{if(!no(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];n.set(oe(s,r,i[e]))})}addListeners(){if(!this.visualElement.current)return;to.set(this.visualElement,this);const t=fr(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();es(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()),xt.read(e);const s=mr(window,"resize",()=>this.scalePositionWithinConstraints()),r=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cr(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(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=Zr,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function no(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const io=t=>(e,n)=>{t&&xt.postRender(()=>t(e,n))};const so={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ro(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const oo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ut.test(t))return t;t=parseFloat(t)}return`${ro(t,e.target.x)}% ${ro(t,e.target.y)}%`}},ao={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ie.parse(t);if(s.length>5)return i;const r=ie.createTransformer(t),o="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=oe(a,l,.5);return"number"==typeof s[2+o]&&(s[2+o]/=c),"number"==typeof s[3+o]&&(s[3+o]/=c),r(s)}};class lo extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;!function(t){for(const e in t)ds[e]=t[e],Tt(e)&&(ds[e].isCSSVariable=!0)}(uo),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()})),so.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:r}=n;return r?(r.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||xt.postRender(()=>{const t=r.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ui.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 co(n){const[i,s]=Di(),r=e.useContext(E);return t.jsx(lo,{...n,layoutGroup:r,switchLayoutGroup:e.useContext(rs),isPresent:i,safeToRemove:s})}const uo={borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:ao};const ho=(t,e)=>t.depth-e.depth;class mo{constructor(){this.children=[],this.isDirty=!1}add(t){A(this.children,t),this.isDirty=!0}remove(t){V(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ho),this.isDirty=!1,this.children.forEach(t)}}const po=["TopLeft","TopRight","BottomLeft","BottomRight"],fo=po.length,go=t=>"string"==typeof t?parseFloat(t):t,xo=t=>"number"==typeof t||Ut.test(t);function yo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const vo=wo(0,.5,ot),bo=wo(.5,.95,$);function wo(t,e,n){return i=>i<t?0:i>e?1:n(H(t,e,i))}function jo(t,e){t.min=e.min,t.max=e.max}function So(t,e){jo(t.x,e.x),jo(t.y,e.y)}function Co(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function To(t,e,n,i,s){return t=Mr(t-=e,1/n,i),void 0!==s&&(t=Mr(t,1/s,i)),t}function Eo(t,e,[n,i,s],r,o){!function(t,e=0,n=1,i=.5,s,r=t,o=t){Wt.test(e)&&(e=parseFloat(e),e=oe(o.min,o.max,e/100)-o.min);if("number"!=typeof e)return;let a=oe(r.min,r.max,i);t===r&&(a-=e),t.min=To(t.min,e,n,a,s),t.max=To(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,r,o)}const ko=["x","scaleX","originX"],Po=["y","scaleY","originY"];function No(t,e,n,i){Eo(t.x,e,ko,n?n.x:void 0,i?i.x:void 0),Eo(t.y,e,Po,n?n.y:void 0,i?i.y:void 0)}function Mo(t){return 0===t.translate&&1===t.scale}function Ao(t){return Mo(t.x)&&Mo(t.y)}function Vo(t,e){return t.min===e.min&&t.max===e.max}function Do(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ro(t,e){return Do(t.x,e.x)&&Do(t.y,e.y)}function Lo(t){return xr(t.x)/xr(t.y)}function Bo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Fo{constructor(){this.members=[]}add(t){A(this.members,t),t.scheduleRender()}remove(t){if(V(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 Oo=["","X","Y","Z"],zo={visibility:"hidden"};let Io=0;function $o(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Wo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Us(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",xt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Wo(i)}function Uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=Io++,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(Yo),this.nodes.forEach(Qo),this.nodes.forEach(ta),this.nodes.forEach(Xo)},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 mo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new _),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=Ti(e)&&!(Ti(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.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=St.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(yt(i),t(r-e))};return xt.setup(i,!0),()=>yt(i)}(i,250),so.hasAnimatedSinceResize&&(so.hasAnimatedSinceResize=!1,this.nodes.forEach(Jo))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(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||r.getDefaultTransition()||oa,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!Ro(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={..._n(s,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Jo(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(),yt(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(ea),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&&Wo(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(qo);this.isUpdating||this.nodes.forEach(Go),this.isUpdating=!1,this.nodes.forEach(Zo),this.nodes.forEach(Ho),this.nodes.forEach(_o),this.clearAllSnapshots();const t=St.now();vt.delta=D(0,1e3/60,t-vt.timestamp),vt.timestamp=t,vt.isProcessing=!0,bt.update.process(vt),bt.preRender.process(vt),bt.render.process(vt),vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ui.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ko),this.sharedNodes.forEach(na)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||xr(this.snapshot.measuredBox.x)||xr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)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&&!Ao(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,r=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||kr(this.latestValues)||r)&&(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)),ca((i=n).x),ca(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(ua))){const{scroll:t}=this.root;t&&(Br(e.x,t.offset.x),Br(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(So(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:r}=i;i!==this.root&&s&&r.layoutScroll&&(s.wasRoot&&So(e,t),Br(e.x,s.offset.x),Br(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};So(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&&Or(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),kr(i.latestValues)&&Or(n,i.latestValues)}return kr(this.latestValues)&&Or(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};So(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!kr(n.latestValues))continue;Er(n.latestValues)&&n.updateSnapshot();const i=Sr();So(i,n.measurePageBox()),No(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return kr(this.latestValues)&&No(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!==vt.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=vt.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}},jr(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),So(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,o,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(),r=this.target,o=this.relativeTarget,a=this.relativeParent.target,br(r.x,o.x,a.x),br(r.y,o.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):So(this.target,this.layout.layoutBox),Dr(this.target,this.targetDelta)):So(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}},jr(this.relativeTargetOrigin,this.target,t.target),So(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Er(this.parent.latestValues)&&!Pr(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===vt.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;So(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,o=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let r,o;e.x=e.y=1;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:s}=r.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Or(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Dr(t,o)),i&&kr(r.latestValues)&&Or(t,r.latestValues))}e.x<Lr&&e.x>Rr&&(e.x=1),e.y<Lr&&e.y>Rr&&(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?(Co(this.prevProjectionDelta.x,this.projectionDelta.x),Co(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),vr(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&Bo(this.projectionDelta.x,this.prevProjectionDelta.x)&&Bo(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},r={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 o={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,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ra));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,m,p,f,g;ia(r.x,t.x,n),ia(r.y,t.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jr(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=o,g=n,sa(m.x,p.x,f.x,g),sa(m.y,p.y,f.y,g),u&&(l=this.relativeTarget,h=u,Vo(l.x,h.x)&&Vo(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),So(u,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,r){s?(t.opacity=oe(0,n.opacity??1,vo(i)),t.opacityExit=oe(e.opacity??1,0,bo(i))):r&&(t.opacity=oe(e.opacity??1,n.opacity??1,i));for(let s=0;s<fo;s++){const r=`border${po[s]}Radius`;let o=yo(e,r),a=yo(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||xo(o)===xo(a)?(t[r]=Math.max(oe(go(o),go(a),i),0),(Wt.test(a)||Wt.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=oe(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,d,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&&(yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xt.update(()=>{so.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=di(0)),this.currentAnimation=function(t,e,n){const i=Ei(t)?t:di(t);return i.start(qs("",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&&da(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=xr(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=xr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}So(e,n),Or(e,s),vr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Fo);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&&$o("z",t,i,this.animationValues);for(let e=0;e<Oo.length;e++)$o(`rotate${Oo[e]}`,t,i,this.animationValues),$o(`skew${Oo[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 zo;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=Ms(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=Ms(t?.pointerEvents)||""),this.hasProjected&&!kr(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,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:r,skewX:o,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),r&&(i+=`rotateY(${r}deg) `),o&&(i+=`skewX(${o}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:r,y:o}=this.projectionDelta;e.transformOrigin=`${100*r.origin}% ${100*o.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 ds){if(void 0===s[t])continue;const{correct:n,applyTo:r,isCSSVariable:o}=ds[t],a="none"===e.transform?s[t]:n(s[t],i);if(r){const t=r.length;for(let n=0;n<t;n++)e[r[n]]=a}else o?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?Ms(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(qo),this.root.sharedNodes.clear()}}}function Ho(t){t.updateLayout()}function _o(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,r=e.source!==t.layout.source;"size"===s?Cr(t=>{const i=r?e.measuredBox[t]:e.layoutBox[t],s=xr(i);i.min=n[t].min,i.max=i.min+s}):da(s,e.layoutBox,n)&&Cr(i=>{const s=r?e.measuredBox[i]:e.layoutBox[i],o=xr(n[i]);s.max=s.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};vr(o,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};r?vr(a,t.applyTransform(i,!0),e.measuredBox):vr(a,n,e.layoutBox);const l=!Ao(o);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:r}=i;if(s&&r){const o={x:{min:0,max:0},y:{min:0,max:0}};jr(o,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};jr(a,n,r.layoutBox),Ro(o,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Yo(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 Xo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ko(t){t.clearSnapshot()}function qo(t){t.clearMeasurements()}function Go(t){t.isLayoutDirty=!1}function Zo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Jo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Qo(t){t.resolveTargetDelta()}function ta(t){t.calcProjection()}function ea(t){t.resetSkewAndRotation()}function na(t){t.removeLeadSnapshot()}function ia(t,e,n){t.translate=oe(e.translate,0,n),t.scale=oe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function sa(t,e,n,i){t.min=oe(e.min,n.min,i),t.max=oe(e.max,n.max,i)}function ra(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const oa={duration:.45,ease:[.4,0,.1,1]},aa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:$;function ca(t){t.min=la(t.min),t.max=la(t.max)}function da(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Lo(e),s=Lo(n),r=.2,!(Math.abs(i-s)<=r));var i,s,r}function ua(t){return t!==t.root&&t.scroll?.wasRoot}const ha=Uo({attachResizeListener:(t,e)=>mr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ma={current:void 0},pa=Uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ma.current){const t=new ha({});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)}),fa={pan:{Feature:class extends dr{constructor(){super(...arguments),this.removePointerDownListener=$}onPointerDown(t){this.session=new Wr(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:io(t),onStart:io(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&xt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=fr(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 dr{constructor(t){super(t),this.removeGroupControls=$,this.removeListeners=$,this.controls=new eo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:pa,MeasureLayout:co}};function ga(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&xt.postRender(()=>s(e,pr(e)))}function xa(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&&xt.postRender(()=>s(e,pr(e)))}const ya=new WeakMap,va=new WeakMap,ba=t=>{const e=ya.get(t.target);e&&e(t)},wa=t=>{t.forEach(ba)};function ja(t,e,n){const i=function({root:t,...e}){const n=t||document;va.has(n)||va.set(n,{});const i=va.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(wa,{root:t,...e})),i[s]}(e);return ya.set(t,n),i.observe(t),()=>{ya.delete(t),i.unobserve(t)}}const Sa={some:0,all:1};const Ca={inView:{Feature:class extends dr{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,r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Sa[i]};return ja(this.node.current,r,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(),r=e?n:i;r&&r(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 dr{mount(){const{current:t}=this.node;t&&(this.unmount=Ci(t,(t,e)=>(xa(this.node,e,"Start"),(t,{success:e})=>xa(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends dr{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=U(mr(this.node.current,"focus",()=>this.onFocus()),mr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends dr{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,s,r]=fi(t,n),o=t=>{if(!gi(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const r=t=>{gi(t)&&(i(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,s)};return i.forEach(t=>{t.addEventListener("pointerenter",o,s)}),r}(t,(t,e)=>(ga(this.node,e,"Start"),t=>ga(this.node,t,"End"))))}unmount(){}}}},Ta={layout:{ProjectionNode:pa,MeasureLayout:co}},Ea={current:null},ka={current:!1};function Pa(){if(ka.current=!0,P)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ea.current=t.matches;t.addListener(e),e()}else Ea.current=!1}const Na=new WeakMap;const Ma=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Aa{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Cn,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=St.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,xt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=r;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=o,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Gi(e),this.isVariantNode=Zi(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==a[t]&&Ei(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Na.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)),ka.current||Pa(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ea.current),"production"!==process.env.NODE_ENV&&G(!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(),yt(this.notifyUpdate),yt(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&&xt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),r&&r(),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 zi){const e=zi[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<Ma.length;e++){const n=Ma[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],r=n[i];if(Ei(s))t.addValue(i,s);else if(Ei(r))t.addValue(i,di(s,{owner:t}));else if(r!==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,di(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=di(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&&(F(n)||z(n))?n=parseFloat(n):(i=n,!ki.find(Xn(i))&&ie.test(e)&&(n=ri(t,e))),this.setBaseTarget(t,Ei(n)?n.get():n)),Ei(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=Ns(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||Ei(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 _),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Va extends Aa{constructor(){super(...arguments),this.KeyframeResolver=ai}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;Ei(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Da(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 Ra extends Va{constructor(){super(...arguments),this.type="html",this.renderInstance=Da}readValueFromInstance(t,e){if(mn.has(e))return this.projection?.isProjecting?cn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return dn(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Tt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return zr(t,e)}build(t,e,n){ps(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ds(t,e,n)}}const La=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 Ba extends Va{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Sr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(mn.has(e)){const t=si(e);return t&&t.default||0}return e=La.has(e)?e:is(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Ls(t,e,n)}build(t,e,n){ws(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Da(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(La.has(n)?n:is(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Ss(t.tagName),super.mount(t)}}const Fa=Hi(Fs({...hr,...Ca,...fa,...Ta},(t,n)=>Es(t)?new Ba(n):new Ra(n,{allowProjection:t!==e.Fragment})));function Oa(){!ka.current&&Pa();const[t]=e.useState(Ea.current);return"production"!==process.env.NODE_ENV&&G(!0!==t,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),t}function za(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n}function Ia(t,e,n,i){return new(n||(n=Promise))(function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(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(o,a)}l((i=i.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const $a=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"},Wa=(t,e)=>Ia(void 0,void 0,void 0,function*(){const n=`${$a(t)}/student/downloadExcel/${e||"PASS"}`;return(yield i.get(n,{responseType:"blob"})).data}),Ua=(t,e,n)=>Ia(void 0,void 0,void 0,function*(){const s=`${$a(e)}/student/uploadExcel`,r=new FormData;r.append("receivedExcelFile",t),"85"===e&&n&&r.append("clientName",n);return(yield i.post(s,r,{transformRequest:[t=>t]})).data});function Ha(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM112 400c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm16-112c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h256c17.67 0 32 14.33 32 32v128c0 17.67-14.33 32-32 32H128zm272 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(t)}function _a(t){return x({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"},child:[]}]})(t)}function Ya(t){return x({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"},child:[]}]})(t)}function Xa(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(t)}function Ka(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"},child:[]}]})(t)}function qa(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(t)}function Ga(t){return x({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"},child:[]}]})(t)}function Za(t){return x({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z"},child:[]}]})(t)}function Ja(t){return x({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(t)}function Qa(t){return x({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"},child:[]}]})(t)}function tl(t){return x({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"},child:[]}]})(t)}const el=e=>{var{title:n,description:i,onClose:s,showCloseIcon:r=!0,icon:o,actions:a,className:l=""}=e,c=za(e,["title","description","onClose","showCloseIcon","icon","actions","className"]);return t.jsxs("div",Object.assign({className:`flex items-center justify-between gap-4 p-4 sm:p-6 bg-primary-botech text-white sm:rounded-t-xl ${l}`},c,{children:[t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o&&t.jsx("span",{className:"mt-0.5 text-white text-xl",children:o}),t.jsxs("div",{className:"flex-1 min-w-0",children:[n&&t.jsx("h2",{className:"text-xl font-semibold text-white",id:"bo-modal-title",children:n}),i&&t.jsx("p",{className:"mt-1 text-sm text-white/80",id:"bo-modal-description",children:i})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[a,r&&t.jsx("button",{type:"button","aria-label":"Cerrar",onClick:s,className:"shrink-0 inline-flex items-center justify-center rounded-md p-2 text-white hover:text-gray-200 hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white/50",children:t.jsx(Ja,{className:"text-xl"})})]})]}))},nl=e=>{var{className:n=""}=e,i=za(e,["className"]);return t.jsx("div",Object.assign({className:`p-4 sm:p-6 ${n}`},i))},il=e=>{var{className:n=""}=e,i=za(e,["className"]);return t.jsx("div",Object.assign({className:`flex justify-end gap-3 p-3 sm:p-4 border-t border-gray-200 bg-gray-50 ${n}`},i))},sl={sm:"sm:max-w-sm",md:"sm:max-w-2xl",lg:"sm:max-w-4xl",xl:"sm:max-w-6xl"};const rl=({open:n,onClose:i,title:r,description:o,size:a="md",footer:l,showCloseIcon:c=!0,hideHeader:d=!1,closeOnEsc:u=!0,closeOnClickOutside:h=!0,className:m="",children:p,initialFocusRef:f,headerClassName:g,overlayClassName:x,headerIcon:y,headerActions:v,zIndex:b,animate:w=!1})=>{const j=e.useRef(null),S=e.useRef(null),C=Oa(),T=w&&!C;var E;E=n,e.useEffect(()=>{if(!E)return;const{overflow:t}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[E]),function(t,n,i){e.useEffect(()=>{if(!t)return;const e=n.current;if(!e)return;const s=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],r=()=>Array.from(e.querySelectorAll(s.join(","))).filter(t=>!t.hasAttribute("disabled")&&!t.getAttribute("aria-hidden")),o=document.activeElement;((null==i?void 0:i.current)||r()[0]||e).focus();const a=t=>{if("Tab"!==t.key)return;const n=r();if(0===n.length)return;const i=n[0],s=n[n.length-1];t.shiftKey?document.activeElement!==i&&document.activeElement!==e||(s.focus(),t.preventDefault()):document.activeElement===s&&(i.focus(),t.preventDefault())};return document.addEventListener("keydown",a),()=>{var t;document.removeEventListener("keydown",a),null===(t=null==o?void 0:o.focus)||void 0===t||t.call(o)}},[t,n,i])}(n,j,f);const k=e.useCallback(t=>{n&&"Escape"===t.key&&u&&(t.stopPropagation(),i())},[n,u,i]);e.useEffect(()=>{if(n)return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[n,k]);const P=t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx("button",{type:"button","aria-label":"Cerrar modal",onClick:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),t.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":o?"bo-modal-description":void 0,className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${sl[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${m}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(el,{title:r,description:o,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:p}),l&&t.jsx(il,{children:l})]})]}),N=t.jsx(Bi,{children:n&&t.jsxs("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:b?{zIndex:b}:void 0,"aria-hidden":!n,ref:S,children:[t.jsx(Fa.button,{type:"button","aria-label":"Cerrar modal",initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},onClick:()=>{h&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),t.jsxs(Fa.div,{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":o?"bo-modal-description":void 0,initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${sl[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${m}`,onClick:t=>t.stopPropagation(),ref:j,children:[!d&&t.jsx(el,{title:r,description:o,onClose:i,showCloseIcon:c,className:g,icon:y,actions:v}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:p}),l&&t.jsx(il,{children:l})]})]})}),M=T?N:n?P:null;return"undefined"!=typeof document?s.createPortal(M,document.body):M};var ol,al,ll;rl.Header=el,rl.Body=nl,rl.Footer=il,function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(ol||(ol={})),function(t){t.EVEN="even",t.ODD="odd",t.HOVER="hover"}(al||(al={})),function(t){t.SM="sm",t.MD="md",t.LG="lg"}(ll||(ll={}));const cl=t=>{switch(t){case ol.CENTER:return"text-center";case ol.RIGHT:return"text-right";default:return"text-left"}},dl=t=>{switch(t){case ll.SM:return{header:"px-2 py-2 text-xs",cell:"px-2 py-2 text-xs",table:"text-xs"};case ll.LG:return{header:"px-6 py-4 text-base",cell:"px-6 py-4 text-base",table:"text-base"};default:return{header:"px-3 md:px-6 py-3 text-sm",cell:"px-3 md:px-6 py-4 text-sm",table:"text-sm"}}},ul=t=>t%2==0?"bg-white":"bg-gray-50",hl=({columns:e,size:n,hasActions:i})=>{const s=dl(n);return t.jsx("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50 sticky top-0 z-10",children:t.jsxs("tr",{children:[e.map(e=>t.jsx("th",{className:`${s.header} ${cl(e.alignment)} ${e.className||""}`,style:e.width?{width:e.width}:void 0,children:e.header},e.key)),i&&t.jsx("th",{className:`${s.header} text-center sticky right-0 bg-gray-50`,children:"ACCIONES"})]})})},ml=({columns:e,data:n,renderActions:i,size:s,onRowClick:r})=>{const o=dl(s);return t.jsx("tbody",{children:n.map((n,s)=>t.jsxs("tr",{className:`${ul(s)} hover:bg-gray-100 transition-colors duration-150 ${r?"cursor-pointer":""}`,onClick:()=>null==r?void 0:r(n),children:[e.map(e=>t.jsx("td",{className:`${o.cell} ${cl(e.alignment)} ${e.className||""}`,children:e.accessor(n)},e.key)),i&&t.jsx("td",{className:`${o.cell} text-center sticky right-0 ${ul(s)} shadow-[-2px_0_4px_rgba(0,0,0,0.1)]`,children:i(n)})]},s))})},pl=t=>new Intl.DateTimeFormat("es-CO",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),fl={datos_basicos:Qa,transporte:Ha,contacto:Ga},gl={nombres:Qa,apellidos:Qa,curso:function(t){return x({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"},child:[]}]})(t)},codigoFamilia:function(t){return x({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)},transporte:Ha,saleSolo:function(t){return x({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M208 96c26.5 0 48-21.5 48-48S234.5 0 208 0s-48 21.5-48 48 21.5 48 48 48zm94.5 149.1l-23.3-11.8-9.7-29.4c-14.7-44.6-55.7-75.8-102.2-75.9-36-.1-55.9 10.1-93.3 25.2-21.6 8.7-39.3 25.2-49.7 46.2L17.6 213c-7.8 15.8-1.5 35 14.2 42.9 15.6 7.9 34.6 1.5 42.5-14.3L81 228c3.5-7 9.3-12.5 16.5-15.4l26.8-10.8-15.2 60.7c-5.2 20.8.4 42.9 14.9 58.8l59.9 65.4c7.2 7.9 12.3 17.4 14.9 27.7l18.3 73.3c4.3 17.1 21.7 27.6 38.8 23.3 17.1-4.3 27.6-21.7 23.3-38.8l-22.2-89c-2.6-10.3-7.7-19.9-14.9-27.7l-45.5-49.7 17.2-68.7 5.5 16.5c5.3 16.1 16.7 29.4 31.7 37l23.3 11.8c15.6 7.9 34.6 1.5 42.5-14.3 7.7-15.7 1.4-35.1-14.3-43zM73.6 385.8c-3.2 8.1-8 15.4-14.2 21.5l-50 50.1c-12.5 12.5-12.5 32.8 0 45.3s32.7 12.5 45.2 0l59.4-59.4c6.1-6.1 10.9-13.4 14.2-21.5l13.5-33.8c-55.3-60.3-38.7-41.8-47.4-53.7l-20.7 51.5z"},child:[]}]})(t)},bajaSolo:function(t){return x({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z"},child:[]}]})(t)},direccionCasa:function(t){return x({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"},child:[]}]})(t)},rfid:function(t){return x({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 32H48C21.5 32 0 53.5 0 80v16h576V80c0-26.5-21.5-48-48-48zM0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V128H0v304zm352-232c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zM176 192c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM67.1 396.2C75.5 370.5 99.6 352 128 352h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.9-5.2 19.8-15.6 19.8H82.7c-10.4 0-18.8-10-15.6-19.8z"},child:[]}]})(t)},idSchoolRegistration:Ya},xl={informacion_general:Qa,ultimas_novedades:Ya,personas_autorizadas:tl,ultimos_movimientos:Ka},yl={INGRESO:function(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(t)},SALIDA:function(t){return x({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(t)}},vl="#FFFFFF",bl="#F7F9FC",wl="#E5E9F2",jl="#0F172A",Sl="#64748B",Cl="#94A3B8",Tl="#111F4B",El="#E2E8FF",kl="#1D4ED8",Pl={informacion_general:"Información general",ultimas_novedades:"Últimas novedades",personas_autorizadas:"Personas autorizadas",ultimos_movimientos:"Últimos movimientos"};function Nl(t){return x({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(t)}exports.Button=a,exports.DownloadStudentsExcelButton=({backend:i,label:s="Descargar Lista de Estudiantes en Excel",fileName:r="students.xlsx",className:o,variant:l="primary",clientName:c,onSuccess:d,onError:u})=>{const[h,m]=e.useState(!1);return t.jsx(a,{variant:l,onClick:()=>Ia(void 0,void 0,void 0,function*(){var t,e,s,o,a,l,h;try{m(!0);let t=c;if("85"===i&&!t){const{value:e}=yield n.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void m(!1);t=e}const e=yield Wa(i,t),s=URL.createObjectURL(e),o=document.createElement("a");o.href=s,o.download=r,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s),yield n.fire({title:"¡Descarga exitosa!",text:"El archivo se ha descargado correctamente",icon:"success",confirmButtonText:"OK"}),null==d||d()}catch(i){console.error("Download students excel failed",i);let r="No se pudo descargar el archivo. Por favor, inténtelo nuevamente.";const c=i;r=null!==(h=null!==(a=null!==(s=null===(e=null===(t=null==c?void 0:c.response)||void 0===t?void 0:t.data)||void 0===e?void 0:e.message)&&void 0!==s?s:"string"==typeof(null===(o=null==c?void 0:c.response)||void 0===o?void 0:o.data)?c.response.data:void 0)&&void 0!==a?a:(null===(l=null==c?void 0:c.response)||void 0===l?void 0:l.statusText)?`Error ${c.response.status}: ${c.response.statusText}`:void 0)&&void 0!==h?h:r,yield n.fire({title:"Error en la descarga",text:r,icon:"error",confirmButtonText:"OK"}),null==u||u(i)}finally{m(!1)}}),className:o,children:h?"Descargando...":s})},exports.GenericTable=({columns:n,data:i,renderActions:s,size:r=ll.MD,className:o="",onRowClick:a,isLoading:l=!1,emptyMessage:c="No hay datos disponibles"})=>{const d=e.useRef(null),{visibleData:u}=((t,n)=>{const[i,s]=e.useState(t);return e.useEffect(()=>{const e=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect(),i=window.innerHeight-e.top-100,r=Math.max(1,Math.floor(i/60));s(t.slice(0,r))};e();const i=()=>{e()};window.addEventListener("resize",i);const r=new ResizeObserver(e);return n.current&&r.observe(n.current),()=>{window.removeEventListener("resize",i),r.disconnect()}},[t,n]),{visibleData:i}})(i,d);return l?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{"data-testid":"loading-spinner",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})}):0===i.length?t.jsx("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:c})})}):t.jsx("div",{ref:d,className:`w-full shadow-md sm:rounded-lg bg-white ${o}`,children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full text-left text-gray-500",style:{minWidth:"max-content"},children:[t.jsx(hl,{columns:n,size:r,hasActions:!!s}),t.jsx(ml,{columns:n,data:u,renderActions:s,size:r,onRowClick:a})]})})})},exports.Header=({title:e,description:n,logoUrl:i,defaultLogoUrl:s,logoAlt:r="Logo",systemName:o="PASS",systemSubtitle:a="Sistema Escolar",onMenuToggle:l,showPageInfo:c=!0,className:d="flex flex-col sm:flex-row sm:items-end bg-primary-botech text-white p-3 sm:p-4 shadow-lg gap-3 sm:gap-0 justify-between",logoClassName:u="h-8 sm:h-10 object-contain",titleClassName:h="text-lg sm:text-xl font-bold",descriptionClassName:m="text-xs sm:text-sm opacity-80"})=>{const p="string"==typeof s&&""!==s.trim()?s:void 0,f="string"==typeof i&&""!==i.trim()?i:p;return t.jsxs("div",{className:d,children:[t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsx("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 flex-shrink-0","aria-label":"Abrir menú",children:t.jsx(S,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),t.jsxs("div",{className:"flex items-center min-w-0 flex-1",children:[t.jsx("div",{className:"flex items-center justify-center mr-2 sm:mr-3 flex-shrink-0",children:f?t.jsx("img",{src:f,alt:r,className:u}):t.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t.jsx("span",{className:"text-white font-bold text-sm sm:text-lg",children:o.charAt(0)})})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("h1",{className:h,children:o}),t.jsx("p",{className:m,children:a})]})]})]}),c&&t.jsxs("div",{className:"text-left sm:text-right pt-2 sm:border-t-0 sm:pt-0",children:[t.jsx("h2",{className:"text-base sm:text-lg font-semibold",children:e}),t.jsx("p",{className:"text-xs sm:text-sm leading-tight opacity-80 truncate",children:n})]})]})},exports.IconButton=({leftIcon:e,rightIcon:n,children:i,onClick:s,className:r="",variant:o="primary",size:a="md",disabled:l=!1})=>{const c={primary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"};return t.jsxs("button",{type:"button",className:`inline-flex items-center gap-2 rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[a]} ${c[o]} ${r}`,onClick:l?void 0:s,disabled:l,children:[e&&t.jsx("span",{className:"flex items-center",children:e}),i,n&&t.jsx("span",{className:"flex items-center",children:n})]})},exports.Modal=rl,exports.ModalBody=nl,exports.ModalFooter=il,exports.ModalHeader=el,exports.MultiSelector=({items:n,selectedItems:i=[],onSelectionChange:s,placeholder:r="Seleccionar elementos",searchPlaceholder:o="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,maxSelectedDisplay:h=3,renderItem:m,renderSelectedItem:p,renderSelectedBadge:f})=>{const[g,x]=e.useState(!1),[y,v]=e.useState(""),b=e.useRef(null),w=e.useRef(null);e.useEffect(()=>{const t=t=>{b.current&&!b.current.contains(t.target)&&x(!1)};if(g)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[g]),e.useEffect(()=>{g&&w.current&&w.current.focus()},[g]),e.useEffect(()=>{g||v("")},[g]);const j=((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(n,y),S=t=>i.some(e=>e.id===t.id),C=t=>{s(i.filter(e=>e.id!==t.id))},T=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),E=()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),k=({item:e,onRemove:n})=>t.jsxs("span",{className:"inline-flex items-center px-2 py-1 text-xs font-medium bg-primary-botech-100 text-primary-botech-800 rounded-md",children:[p?p(e):e.name,t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),n()},className:"ml-1 text-primary-botech-600 hover:text-primary-botech-800 transition-colors duration-200",children:t.jsx(T,{})})]}),P=i.slice(0,h),N=i.length-h;return t.jsxs("div",{ref:b,className:`relative w-full ${a}`,children:[t.jsxs("div",{className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${l?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${g?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:()=>{l||x(!g)},children:[t.jsx("div",{className:"flex-1 flex flex-wrap gap-1 items-center",children:0===i.length?t.jsx("span",{className:"text-gray-500",children:r}):t.jsxs(t.Fragment,{children:[P.map(e=>t.jsx("div",{onClick:t=>t.stopPropagation(),children:f?f(e,()=>C(e)):t.jsx(k,{item:e,onRemove:()=>C(e)})},e.id)),N>0&&t.jsxs("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-md",children:["+",N," más"]})]})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i.length>0&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s([])},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(T,{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(g?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),g&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:w,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:o,value:y,onChange:t=>v(t.target.value),onClick:t=>t.stopPropagation()})]})}),i.length>0&&t.jsxs("div",{className:"px-3 py-2 text-xs text-gray-600 bg-gray-50 border-b border-gray-100",children:[i.length," elemento(s) seleccionado(s)"]}),t.jsx("div",{className:"max-h-60 overflow-auto",children:0===j.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:y?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):j.map(e=>{const n=S(e);return t.jsxs("div",{className:`\n px-3 py-2 text-sm cursor-pointer transition-colors duration-200 \n border-b border-gray-50 last:border-b-0 flex items-center justify-between\n ${n?"bg-primary-botech-50 hover:bg-primary-botech-100":"hover:bg-gray-50"}\n `,onClick:()=>(t=>{S(t)?s(i.filter(e=>e.id!==t.id)):s([...i,t])})(e),children:[t.jsx("div",{className:"flex-1",children:m?m(e):t.jsx("span",{className:""+(n?"text-primary-botech-900 font-medium":"text-gray-900"),children:e.name})}),n&&t.jsx("div",{className:"ml-2 text-primary-botech-600",children:t.jsx(E,{})})]},e.id)})})]})]})},exports.NotFound=function(){return t.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-50",children:t.jsxs("div",{className:"container flex max-w-md flex-col items-center justify-center gap-8 px-4 py-16 text-center",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsxs("div",{className:"relative flex flex-col items-center",children:[t.jsx("div",{className:"h-80 w-4 bg-gray-700"}),t.jsxs("div",{className:"top-4 flex h-auto w-auto min-w-[12rem] flex-col items-center justify-center rounded-lg bg-primary-botech text-white shadow-lg p-4",children:[t.jsx("div",{className:"flex-1 mb-2",children:t.jsxs("h1",{className:"text-xl/4 text-white font-seguimiento-h",children:["BO-TECH ",t.jsx("span",{className:"text-sm block",children:"SEGUIMIENTO"})]})}),t.jsx("span",{className:"text-4xl font-bold",children:"404"}),t.jsx("span",{className:"text-xs mt-1",children:"RUTA NO ENCONTRADA"})]})]})}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("h2",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"¡Esta parada no existe!"}),t.jsx("p",{className:"text-gray-600",children:"Parece que estás esperando en una parada de autobús que no está en nuestra ruta. La página que buscas no se encuentra disponible."})]}),t.jsxs("button",{className:"flex items-center gap-2 bg-primary-botech hover:bg-primary-botech/90 text-white px-4 py-2 rounded",onClick:()=>{window.location.href="/"},children:[t.jsx(Nl,{className:"h-4 w-4"}),t.jsx("span",{children:"Volver a la ruta principal"})]})]})})},exports.Sidebar=({isOpen:n,onClose:i,onToggle:s,menuItems:r,logoUrl:o,logoAlt:a="Logo",systemName:l="PASS",defaultLogoUrl:c,dashboardPath:d,className:u="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:h="fixed inset-0 bg-black/25 z-40",desktopMenuClassName:m="h-full flex flex-col",showBottomMenu:p=!0,bottomMenuItems:f=[{id:"settings",label:"Configuración",icon:C,action:()=>{}},{id:"help",label:"Ayuda",icon:w,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:j,action:()=>{}}],activePath:g="",onNavigate:x,children:y,performanceMode:S="auto",fpsThreshold:E,fpsSampleSize:k,compatibilityMode:P=!1,onPerformanceModeChange:N})=>{const[M,A]=e.useState(new Set),{effectiveMode:V}=function({mode:t="auto",fpsThreshold:n=45,fpsSampleSize:i=90,compatibilityFlag:s=!1,onModeChange:r}={}){const[o,a]=e.useState(!1),[l,c]=e.useState(!1),d=e.useRef("full");e.useEffect(()=>{if("undefined"==typeof window||"full"===t||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>a(e.matches);return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[t]),e.useEffect(()=>{if("undefined"==typeof window||"undefined"==typeof performance||"auto"!==t||o||s)return;let e=0,r=0,a=performance.now(),l=null;const d=Math.min(Math.max(30,i),240),u=t=>{const i=t-a;a=t,e>0&&(r+=1e3/i),e+=1,e>=d?r/(e-1||1)<n&&c(!0):l=window.requestAnimationFrame(u)};return l=window.requestAnimationFrame(u),()=>{null!==l&&window.cancelAnimationFrame(l)}},[t,o,s,i,n]);const u=e.useMemo(()=>"full"===t||"lite"===t?t:s||o||l?"lite":"full",[t,s,o,l]);return e.useEffect(()=>{r?d.current!==u&&(r(u),d.current=u):d.current=u},[u,r]),{effectiveMode:u,prefersReducedMotion:o,detectedLowPerformance:l,compatibilityFlag:s}}({mode:S,fpsThreshold:E,fpsSampleSize:k,compatibilityFlag:P,onModeChange:N}),D="lite"===V,R=e.useMemo(()=>D?{boxShadow:"0 4px 12px rgba(15, 23, 42, 0.12)",backgroundColor:"rgba(255, 255, 255, 0.96)",transform:n?"translateX(0)":"translateX(-100%)",transition:"none"}:{willChange:"transform"},[D,n]),L=e.useMemo(()=>D?{backgroundColor:"rgba(15, 23, 42, 0.28)"}:{willChange:"opacity"},[D]),B="string"==typeof c&&""!==c.trim()?c:void 0,F="string"==typeof o&&""!==o.trim()?o:B,O=t=>g.includes(t),z=t=>{x&&x(t),i()},I=(e,n=!1)=>t.jsxs(Fa.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${n?"pr-4 pl-10":"px-4"} ${O(e.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>z(e.path),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(b,{className:"w-4 h-4 transition-transform "+(O(e.path)?"rotate-90":"group-hover:translate-x-1")})]},e.id),$=e=>{const n=M.has(e.id);return t.jsxs("div",{className:"mb-2",children:[t.jsxs(Fa.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},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=e.id,void A(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"font-medium text-sm",children:e.label})]}),t.jsx(v,{className:"w-4 h-4 transition-transform "+(n?"rotate-180":"")})]}),D?n&&t.jsx("div",{className:"pt-2 space-y-1",children:e.children.map(t=>I(t,!0))}):t.jsx(Bi,{initial:!1,children:n&&t.jsx(Fa.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.22,ease:[.33,1,.68,1]},className:"overflow-hidden pt-2 space-y-1",style:{willChange:"transform, opacity"},children:e.children.map(t=>I(t,!0))},`${e.id}-content`)})]},e.id)},W=t.jsxs("div",{className:m,children:[t.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("button",{type:"button",onClick:()=>{d&&z(d)},className:"flex items-center space-x-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-botech rounded-lg",children:[t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:F?t.jsx("img",{src:F,alt:a,className:"h-full object-contain"}):t.jsx("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t.jsx("span",{className:"text-white font-bold text-sm",children:l.charAt(0)})})}),t.jsx("h1",{className:"text-lg font-bold text-gray-800",children:l})]}),t.jsx("button",{onClick:i,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t.jsx(T,{className:"w-5 h-5"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:t.jsx("nav",{className:"space-y-2",children:r.map(t=>"folder"===t.type?$(t.data):I(t.data))})}),p&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsx("div",{className:"space-y-2",children:f.map(e=>t.jsxs("button",{onClick:e.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.jsx(e.icon,{className:"w-5 h-5"}),t.jsx("span",{className:"text-sm",children:e.label})]},e.id))})}),y&&t.jsx("div",{className:"p-4 border-t border-gray-200",children:y})]});return t.jsxs(t.Fragment,{children:[D?n&&t.jsx("div",{className:h,style:L,onClick:i,"data-motion-mode":V}):t.jsx(Bi,{initial:!1,children:n&&t.jsx(Fa.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:[.25,1,.5,1]},className:h,style:L,onClick:i})}),D?t.jsx("div",{className:u,style:R,"data-motion-mode":V,children:W}):t.jsx(Fa.div,{initial:!1,animate:{x:n?0:"-100%",opacity:1},transition:{type:"spring",stiffness:280,damping:32,mass:.9},className:u,style:R,"data-motion-mode":V,children:W})]})},exports.SingleSelector=({items:n,selectedItem:i=null,onSelectionChange:s,placeholder:r="Seleccionar elemento",searchPlaceholder:o="Buscar...",className:a="",disabled:l=!1,searchBy:c="both",caseSensitive:d=!1,exactMatch:u=!0,renderItem:h,renderSelectedItem:m})=>{const[p,f]=e.useState(!1),[g,x]=e.useState(""),y=e.useRef(null),v=e.useRef(null),b=e.useRef(null),w=e.useRef([]),j=e.useId();e.useEffect(()=>{const t=t=>{y.current&&!y.current.contains(t.target)&&f(!1)};if(p)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[p]),e.useEffect(()=>{p&&b.current&&b.current.focus()},[p]),e.useEffect(()=>{p||x("")},[p]);const S=e.useMemo(()=>((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=d?n:n.toLowerCase();return t.filter(t=>{const e=d?t.name:t.name.toLowerCase(),n=d?t.id:t.id.toLowerCase();if(u)switch(c){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(c){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(n,g),[n,g,d,u,c]),[C,T]=e.useState(-1),E=e.useCallback(()=>{f(!1)},[]),k=t=>{var e;s(t),E(),null===(e=v.current)||void 0===e||e.focus()},P=()=>{l||f(!p)},N=e.useCallback(t=>{S.length&&T(e=>((-1===e?1===t?-1:0:e)+t+S.length)%S.length)},[S.length]);e.useEffect(()=>{if(p){const t=i?S.findIndex(t=>t.id===i.id):-1;-1!==t?T(t):S.length?T(t=>t>=0&&t<S.length?t:0):T(-1)}else T(-1)},[p,S,i]),e.useEffect(()=>{if(C<0)return;const t=w.current[C];null==t||t.scrollIntoView({block:"nearest"})},[C]);return w.current=[],t.jsxs("div",{ref:y,className:`relative w-full ${a}`,onKeyDown:t=>{var e;if(l)return;const n=t.target,i=n===v.current;if(!p)return void(!i||"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),P()));if("Escape"===t.key)return t.preventDefault(),E(),void(null===(e=v.current)||void 0===e||e.focus());if(n instanceof HTMLButtonElement)return;const s=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement;switch(t.key){case"ArrowDown":t.preventDefault(),N(1);break;case"ArrowUp":t.preventDefault(),N(-1);break;case"Enter":C>=0&&C<S.length&&(t.preventDefault(),k(S[C]));break;case" ":case"Spacebar":if(s)break;C>=0&&C<S.length&&(t.preventDefault(),k(S[C]))}},children:[t.jsxs("div",{ref:v,className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${l?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${p?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:P,role:"button",tabIndex:l?-1:0,"aria-haspopup":"listbox","aria-expanded":p,"aria-disabled":l,children:[t.jsx("div",{className:"flex-1 truncate",children:i?t.jsx("span",{className:"text-gray-900",children:m?m(i):i.name}):t.jsx("span",{className:"text-gray-500",children:r})}),t.jsxs("div",{className:"flex items-center space-x-1 ml-2",children:[i&&!l&&t.jsx("button",{type:"button",onClick:t=>{t.stopPropagation(),s(null)},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),{})}),t.jsx("div",{className:"text-gray-400 transition-transform duration-200 "+(p?"rotate-180":""),children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),p&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-100",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx(()=>t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t.jsx("input",{ref:b,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:o,value:g,onChange:t=>x(t.target.value),onClick:t=>t.stopPropagation(),"aria-autocomplete":"list","aria-controls":j})]})}),t.jsx("div",{id:j,className:"max-h-60 overflow-auto",role:"listbox","aria-activedescendant":C>=0?`${j}-option-${C}`:void 0,children:0===S.length?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:g?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):S.map((e,n)=>t.jsx("div",{id:`${j}-option-${n}`,ref:t=>{w.current[n]=t},className:"px-3 py-2 text-sm cursor-pointer transition-colors duration-200 border-b border-gray-50 last:border-b-0 "+(C===n?"bg-primary-botech-100":"hover:bg-primary-botech-50"),onClick:()=>k(e),role:"option","aria-selected":(null==i?void 0:i.id)===e.id,onMouseEnter:()=>T(n),children:h?h(e):t.jsx("span",{className:"text-gray-900",children:e.name})},e.id))})]})]})},exports.StudentSummaryModal=({open:n,onClose:i,context:s="pass",student:r,generalGroups:o,sections:l=[],photoUrl:c,title:d="Resumen del estudiante",description:u="Información consolidada del estudiante.",loading:h=!1,error:m,onReload:p})=>{const[f,g]=e.useState(!0),[x,y]=e.useState(!1),[v,b]=e.useState("desktop");e.useEffect(()=>{if("undefined"==typeof window)return;const t=()=>{const t=window.innerWidth;b(t<768?"mobile":t<1200?"tablet":"desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const w="mobile"===v,j="tablet"===v;e.useEffect(()=>{if(h)g(!0),y(!1);else if(c){g(!0),y(!1);const t=new Image;t.onload=()=>{g(!1)},t.onerror=()=>{g(!1),y(!0)},t.src=c}else g(!1),y(!0)},[c,h]),e.useEffect(()=>{n||(g(!0),y(!1))},[n,r.id]);const S=e.useMemo(()=>{var t,e,n,i,s,a,l,c,d,u;const h=null!=o?o:[{id:"datos_basicos",title:"Datos básicos",rows:[{id:"nombres",label:"Nombres",value:null!==(t=r.nombres)&&void 0!==t?t:""},{id:"apellidos",label:"Apellidos",value:null!==(e=r.apellidos)&&void 0!==e?e:""},{id:"curso",label:"Curso",value:null!==(n=r.curso)&&void 0!==n?n:""},{id:"codigoFamilia",label:"Código familia",value:null!==(i=r.codigoFamilia)&&void 0!==i?i:""}]},{id:"transporte",title:"Transporte",rows:[{id:"transporte",label:"Transporte",value:null!==(s=r.transporte)&&void 0!==s?s:""},{id:"saleSolo",label:"Sale solo",value:null!==(a=r.saleSolo)&&void 0!==a?a:""},{id:"bajaSolo",label:"Baja solo",value:null!==(l=r.bajaSolo)&&void 0!==l?l:""}]},{id:"contacto",title:"Contacto y registro",rows:[{id:"direccionCasa",label:"Dirección casa",value:null!==(c=r.direccionCasa)&&void 0!==c?c:""},{id:"rfid",label:"RFID",value:null!==(d=r.rfid)&&void 0!==d?d:""},{id:"idSchoolRegistration",label:"Registro escolar",value:null!==(u=r.idSchoolRegistration)&&void 0!==u?u:""}]}];return{id:"informacion_general",title:Pl.informacion_general,items:h}},[o,r]),C=e.useMemo(()=>{var t,e;return`${null!==(t=r.nombres)&&void 0!==t?t:""} ${null!==(e=r.apellidos)&&void 0!==e?e:""}`.trim()},[r.nombres,r.apellidos]),T=e=>{switch(e.id){case"ultimas_novedades":return(n=e.items).length?t.jsx("div",{className:"space-y-4",children:n.map(e=>t.jsxs("article",{className:"rounded-2xl border border-blue-200 bg-gradient-to-br from-blue-50 to-blue-100/50 p-4 text-sm shadow-sm ring-1 ring-blue-100",style:{borderRadius:24,border:"1px solid #BFDBFE",background:"linear-gradient(135deg, #EFF6FF 0%, rgba(219, 234, 254, 0.7) 100%)",padding:20,boxShadow:"0 18px 32px rgba(59, 130, 246, 0.15)"},children:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-blue-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-blue-800",children:[t.jsx(Ya,{className:"h-3.5 w-3.5"})," ",e.tipo]}),t.jsxs("time",{dateTime:e.fecha,className:"flex items-center gap-2 text-xs font-medium text-blue-700",children:[t.jsx(_a,{className:"h-3.5 w-3.5"}),pl(e.fecha)]})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-blue-900",children:[t.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:["Estado: ",t.jsx("span",{className:"text-sm font-bold",children:e.estado})]}),t.jsxs("p",{className:"text-sm",children:[t.jsx("span",{className:"font-semibold",children:"Responsable:"})," ",e.responsable]}),t.jsx("p",{className:"text-sm leading-relaxed",children:e.descripcion})]}),e.respuesta&&t.jsxs("p",{className:"rounded-xl bg-white/70 px-3 py-2 text-sm text-blue-900 shadow-inner ring-1 ring-blue-100",children:[t.jsx("span",{className:"font-semibold",children:"Respuesta:"})," ",e.respuesta]})]},e.id))}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin novedades recientes."});case"personas_autorizadas":return(e=>e.length?t.jsx("div",{className:"grid gap-4",children:e.map(e=>t.jsxs("article",{className:"rounded-2xl border border-emerald-200 bg-gradient-to-br from-emerald-50 to-emerald-100/40 p-4 text-sm shadow-sm ring-1 ring-emerald-100",style:{borderRadius:24,border:"1px solid #A7F3D0",background:"linear-gradient(135deg, #ECFDF5 0%, rgba(209, 250, 229, 0.65) 100%)",padding:20,boxShadow:"0 18px 32px rgba(16, 185, 129, 0.12)"},children:[t.jsxs("header",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-white text-emerald-600 shadow-inner ring-1 ring-emerald-100",children:t.jsx(tl,{className:"h-5 w-5"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-sm font-semibold text-emerald-900",children:e.nombreCompleto}),t.jsxs("p",{className:"text-xs text-emerald-700",children:[e.tipoDocumento," • ",e.numeroDocumento]})]})]}),t.jsx("span",{className:"rounded-full bg-emerald-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:e.estado})]}),t.jsxs("dl",{className:"mt-4 grid gap-3 text-xs text-emerald-900 sm:grid-cols-2",children:[t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Código familia"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.codigoFamilia})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Vigencia"}),t.jsxs("dd",{className:"text-sm font-semibold",children:[e.vigencia.desde," – ",e.vigencia.hasta]})]}),t.jsxs("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100 sm:col-span-2",children:[t.jsx("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Autorizado por"}),t.jsx("dd",{className:"text-sm font-semibold",children:e.autorizadoPor})]})]})]},`${e.numeroDocumento}-${e.vigencia.desde}`))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No hay personas autorizadas registradas."}))(e.items);case"ultimos_movimientos":return(e=>e.length?t.jsxs("div",{className:"relative space-y-4 text-sm",style:{position:"relative"},children:[t.jsx("div",{className:"absolute left-[1.15rem] top-3 bottom-3 w-px bg-slate-200",style:{position:"absolute",left:28,top:12,bottom:12,width:2,backgroundColor:wl}}),e.map((e,n)=>{var i;const s=null!==(i=yl[e.tipo.toUpperCase()])&&void 0!==i?i:Ka;return t.jsxs("div",{className:"relative pl-14",style:{position:"relative",paddingLeft:74},children:[t.jsx("div",{className:"absolute left-0 top-1 flex h-10 w-10 items-center justify-center rounded-full bg-white text-slate-600 shadow-sm ring-1 ring-slate-200",style:{position:"absolute",left:6,top:4,width:46,height:46,borderRadius:"50%",backgroundColor:vl,color:Sl,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 16px 30px rgba(15, 23, 42, 0.08)",border:`1px solid ${wl}`},children:t.jsx(s,{size:16})}),t.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm ring-1 ring-slate-100",style:{borderRadius:24,border:`1px solid ${wl}`,backgroundColor:vl,padding:20,boxShadow:"0 18px 32px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{className:"flex items-center justify-between text-xs text-slate-500",children:[t.jsx("span",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-slate-700",children:e.tipo}),t.jsx("time",{dateTime:e.fecha,children:pl(e.fecha)})]}),t.jsxs("div",{className:"mt-3 space-y-2 text-slate-700",children:[t.jsxs("p",{children:[t.jsx("span",{className:"font-semibold",children:"Lector:"})," ",e.lector.descripcion," (",e.lector.id,")"]}),e.observaciones&&t.jsx("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm shadow-inner ring-1 ring-slate-100",children:e.observaciones})]})]})]},`${e.fecha}-${n}`)})]}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin movimientos recientes."}))(e.items);case"paradas":return(e=>e.length?t.jsx("div",{className:"student-summary-paradas",style:{display:"grid",gap:w?14:j?16:18},children:e.map((e,n)=>{var i,s,r,o;const a=`Parada ${null!==(i=e.orden)&&void 0!==i?i:n+1}`,l=null!==(s=e.time)&&void 0!==s?s:e.horaProgramada;return t.jsxs("article",{style:{borderRadius:24,border:`1px solid ${wl}`,backgroundColor:vl,padding:20,boxShadow:"0 20px 38px rgba(59, 130, 246, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:w?"flex-start":"center",justifyContent:"space-between",gap:16},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:44,height:44,borderRadius:14,backgroundColor:"#EFF6FF",color:"#1D4ED8",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(Ga,{size:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl},children:a}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:15,fontWeight:600,color:jl},children:null!==(r=e.address)&&void 0!==r?r:"Dirección no disponible"})]})]}),l&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,borderRadius:999,padding:w?"6px 12px":"6px 14px",backgroundColor:bl,border:`1px solid ${wl}`,fontSize:12,fontWeight:600,color:Sl},children:[t.jsx(Xa,{size:12}),l]})]}),t.jsxs("div",{style:{marginTop:16,display:"grid",gap:w?10:12,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(180px, 1fr))"},children:[e.estado&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:bl,border:`1px solid ${wl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Estado"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:e.estado})]}),e.horaReal&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:bl,border:`1px solid ${wl}`,padding:"12px 16px"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Hora real"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:e.horaReal})]}),e.observaciones&&t.jsx("div",{style:{borderRadius:18,backgroundColor:"#EEF2FF",border:`1px solid ${wl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:t.jsx("p",{style:{margin:0,fontSize:12,fontWeight:600,color:"#4338CA"},children:e.observaciones})}),e.coordinates&&t.jsxs("div",{style:{borderRadius:18,backgroundColor:bl,border:`1px solid ${wl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:[t.jsx("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Coordenadas"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:[e.coordinates.lat.toFixed(6),", ",e.coordinates.lng.toFixed(6)]})]})]})]},null!==(o=e.id)&&void 0!==o?o:`${n}`)})}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin paradas registradas."}))(e.items);case"recorridos":return(e=>e.length?t.jsx("div",{className:"student-summary-recorridos",style:{display:"grid",gap:w?16:j?18:20},children:e.map(e=>{var n,i,s,r;return t.jsxs("article",{style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:22,boxShadow:"0 22px 44px rgba(79, 70, 229, 0.1)"},children:[t.jsxs("header",{style:{display:"flex",flexDirection:w?"column":"row",alignItems:"flex-start",justifyContent:"space-between",gap:18},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t.jsx("div",{style:{width:w?42:46,height:w?42:46,borderRadius:16,backgroundColor:"#EDE9FE",color:"#4338CA",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx(Za,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("p",{style:{margin:0,fontSize:w?11:12,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl},children:"Recorrido"}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?15:16,fontWeight:600,color:jl},children:e.nombreRecorrido}),e.tipoRecorrido&&t.jsx("p",{style:{margin:"2px 0 0",fontSize:w?12:13,color:Sl},children:e.tipoRecorrido})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-end"},children:[e.estadoActual&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:"#E0E7FF",color:"#312E81",fontSize:12,fontWeight:600},children:e.estadoActual}),e.numeroFlota&&t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:bl,color:Sl,fontSize:12,fontWeight:600},children:["Flota ",e.numeroFlota]}),e.placaBus&&t.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:bl,color:Sl,fontSize:12,fontWeight:600},children:e.placaBus})]})]}),t.jsxs("div",{style:{marginTop:20,display:"grid",gap:w?12:14,gridTemplateColumns:w?"1fr":"repeat(auto-fit, minmax(220px, 1fr))"},children:[(e.horaInicio||e.horaFin)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Horario"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:[null!==(n=e.horaInicio)&&void 0!==n?n:"—"," – ",null!==(i=e.horaFin)&&void 0!==i?i:"—"]})]}),(e.nombreAuxiliar||e.nombreOperario)&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Equipo"}),t.jsxs("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:["Auxiliar: ",null!==(s=e.nombreAuxiliar)&&void 0!==s?s:"—"]}),t.jsxs("p",{style:{margin:"2px 0 0",fontSize:14,fontWeight:600,color:jl},children:["Operario: ",null!==(r=e.nombreOperario)&&void 0!==r?r:"—"]})]}),e.diasRecorrido&&t.jsxs("div",{style:{borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px"},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Cl},children:"Días programados"}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:jl},children:e.diasRecorrido})]})]}),e.ultimoEvento&&t.jsx("div",{style:{marginTop:18,borderRadius:20,backgroundColor:"#EEF2FF",border:`1px solid ${wl}`,padding:w?"12px 16px":"14px 18px",color:"#312E81",fontSize:14,fontWeight:600},children:e.ultimoEvento})]},e.idRecorrido)})}):t.jsx("p",{className:"text-sm text-gray-500",children:"Sin recorridos asociados."}))(e.items);default:return null}var n},E=null!=l?l:[];return t.jsxs(rl,{open:n,onClose:i,size:"xl",overlayClassName:"z-[1000]",className:"z-[1001] [&_.modal-content]:!max-h-[80vh] [&_.modal-body]:!max-h-none [&_.modal-body]:!overflow-visible",title:d,description:u,children:[t.jsxs(nl,{className:"px-4 pb-6",children:[m&&t.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[t.jsx("p",{className:"font-semibold",children:"No se pudo cargar el resumen."}),t.jsx("p",{className:"mt-1",children:m}),p&&t.jsx(a,{variant:"secondary",onClick:p,className:"mt-3",children:"Reintentar"})]}),t.jsxs("div",{className:"space-y-8 px-1",style:{display:"flex",flexDirection:"column",gap:w?24:32,maxWidth:1180,margin:"0 auto",width:"100%"},children:[t.jsxs("div",{className:"student-summary-layout",style:{display:"grid",gap:w?20:j?24:28,gridTemplateColumns:w||j?"1fr":"minmax(320px, 360px) minmax(640px, 1fr)",alignItems:"stretch",width:"100%"},children:[t.jsx("aside",{className:"student-summary-profile",style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:w?20:j?26:32,textAlign:"center",boxShadow:"0 26px 48px rgba(15, 23, 42, 0.1)"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:w?18:24},children:[t.jsx("div",{style:{position:"relative",width:w?110:j?128:140,height:w?110:j?128:140,overflow:"hidden",borderRadius:"50%",border:`4px solid ${vl}`,backgroundColor:bl,boxShadow:"0 20px 40px rgba(15, 23, 42, 0.14)"},children:f?t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:bl},children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-slate-500"})}):c&&!x?t.jsx("img",{src:c,alt:C||"Foto del estudiante",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:bl,color:Sl},children:t.jsx(Qa,{size:w?48:j?56:60})})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[t.jsx("h2",{style:{margin:0,fontSize:w?18:22,fontWeight:600,color:jl},children:C||"Nombre no disponible"}),r.curso&&t.jsxs("p",{style:{margin:0,fontSize:w?13:15,color:Sl},children:["Curso"," ",t.jsx("span",{style:{fontWeight:600,color:"#4338CA"},children:r.curso})]})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[r.id&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,backgroundColor:bl,border:`1px solid ${wl}`,borderRadius:20,padding:w?"10px 16px":"12px 20px",boxShadow:"0 14px 28px rgba(15, 23, 42, 0.08)",minWidth:w?200:240},children:[t.jsx("span",{style:{fontSize:w?10:11,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl,fontWeight:700},children:"Identificador estudiante"}),t.jsx("span",{style:{fontSize:17,fontWeight:600,color:jl},children:r.id})]}),t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",padding:w?"5px 14px":"6px 16px",borderRadius:999,fontSize:12,fontWeight:600,backgroundColor:El,color:kl,letterSpacing:"0.04em"},children:["Contexto: ",s.toUpperCase()]})]})]})}),t.jsx("div",{className:"student-summary-general-wrapper",style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:32,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:(e=>{var n;const i=null!==(n=xl[e.id])&&void 0!==n?n:qa,s=w?1:j?2:3,r=Math.min(Math.max(e.items.length,1),s);return t.jsxs("section",{className:"student-summary-general",style:{display:"flex",flexDirection:"column",gap:24},children:[t.jsxs("header",{className:"student-summary-general__header",style:{display:"flex",flexDirection:w?"column":"row",gap:16,alignItems:"flex-start",paddingLeft:w?0:4},children:[t.jsx("div",{className:"student-summary-general__header-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?46:56,height:w?46:56,borderRadius:18,backgroundColor:Tl,color:vl,boxShadow:"0 18px 30px rgba(17, 24, 39, 0.18)"},children:t.jsx(i,{size:w?18:22})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?16:18,fontWeight:600,color:jl},children:e.title}),t.jsx("p",{style:{margin:"6px 0 0",fontSize:w?13:14,color:Sl},children:"Información clave agrupada en tarjetas para una lectura rápida."})]})]}),t.jsx("div",{className:"student-summary-general__grid",style:{display:"grid",gap:w?14:j?18:20,gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`},children:e.items.map(e=>{var n;const s=null!==(n=fl[e.id])&&void 0!==n?n:i;return t.jsxs("article",{className:"student-summary-card",style:{borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,boxShadow:"0 18px 35px rgba(15, 23, 42, 0.08)",padding:w?16:j?18:20,display:"flex",flexDirection:"column",gap:14},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,paddingBottom:12,borderBottom:`1px solid ${wl}`},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:16,backgroundColor:bl,color:Sl},children:t.jsx(s,{size:20})}),t.jsx("h4",{style:{margin:0,fontSize:14,fontWeight:600,color:jl},children:e.title})]}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:e.rows.map(e=>{var n;const i=null!==(n=gl[e.id])&&void 0!==n?n:qa;return t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:w?10:12,borderRadius:20,backgroundColor:bl,border:`1px solid ${wl}`,padding:w?"10px 14px":"12px 16px",boxShadow:"0 12px 22px rgba(15, 23, 42, 0.05)"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?36:40,height:w?36:40,borderRadius:"50%",backgroundColor:vl,color:Sl,boxShadow:"0 12px 20px rgba(15, 23, 42, 0.06)"},children:t.jsx(i,{size:w?14:16})}),t.jsxs("div",{style:{minWidth:0},children:[t.jsx("p",{style:{margin:0,fontSize:w?10:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Cl},children:e.label}),t.jsx("p",{style:{margin:"4px 0 0",fontSize:w?13:14,fontWeight:600,color:jl,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:(s=e.value,null==s?"—":"string"==typeof s?s.trim()?s:"—":s)})]})]},e.id);var s})})]},e.id)})})]})})(S)})]}),E.length>0?t.jsx("div",{className:"student-summary-modules",style:{display:"grid",gap:w?18:j?20:24,gridTemplateColumns:w?"1fr":j?"repeat(auto-fit, minmax(300px, 1fr))":"repeat(auto-fit, minmax(360px, 1fr))"},children:E.map(e=>{var n,i,s,r;const o=null!==(n=xl[e.id])&&void 0!==n?n:qa,a=null!==(s=null!==(i=e.title)&&void 0!==i?i:Pl[e.id])&&void 0!==s?s:"Sección";return t.jsxs("section",{className:"student-summary-module",style:{display:"flex",flexDirection:"column",gap:16,borderRadius:26,border:`1px solid ${wl}`,backgroundColor:vl,padding:w?18:j?22:24,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:[t.jsxs("header",{style:{display:"flex",gap:14,alignItems:"flex-start"},children:[t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:w?40:46,height:w?40:46,borderRadius:16,backgroundColor:bl,color:Sl},children:t.jsx(o,{size:w?18:20})}),t.jsxs("div",{children:[t.jsx("h3",{style:{margin:0,fontSize:w?15:17,fontWeight:600,color:jl},children:a}),(null===(r=e.meta)||void 0===r?void 0:r.maxItems)&&t.jsxs("p",{style:{margin:"6px 0 0",fontSize:12,color:Sl},children:["Mostrando hasta ",e.meta.maxItems," registros recientes."]})]})]}),t.jsx("div",{className:"flex-1",children:T(e)})]},e.id)})}):!h&&!m&&t.jsx("div",{className:"flex h-48 items-center justify-center",children:t.jsx("span",{className:"text-sm text-gray-500",children:"Sin información adicional disponible."})})]})]}),t.jsx(il,{children:t.jsx(a,{variant:"secondary",onClick:i,children:"Cerrar"})})]})},exports.UploadStudentsExcelButton=({backend:i,label:s="Cargar Lista de Estudiantes en Excel",className:r,variant:o="primary",clientName:l,onSuccess:c,onError:d})=>{const u=e.useRef(null),[h,m]=e.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(a,{variant:o,onClick:()=>{var t;null===(t=u.current)||void 0===t||t.click()},className:r,children:h?"Subiendo...":s}),t.jsx("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:t=>Ia(void 0,void 0,void 0,function*(){var e,s,r,o,a,h,p,f;const g=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!g)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(g.name)))if(0!==g.size)try{m(!0);let t=l;if("85"===i&&!t){const{value:e}=yield n.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void m(!1);t=e}const e=yield Ua(g,i,t);let s="El archivo se ha cargado correctamente";(null==e?void 0:e.message)?s=e.message:"string"==typeof e&&(s=e),yield n.fire({title:"¡Carga exitosa!",text:s,icon:"success",confirmButtonText:"OK"}),null==c||c()}catch(t){console.error("Upload students excel failed",t),console.error("Error details:",t);let e="Hubo un problema al subir el archivo";const i=t;e=null!==(f=null!==(h=null!==(o=null===(r=null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.data)||void 0===r?void 0:r.message)&&void 0!==o?o:"string"==typeof(null===(a=null==i?void 0:i.response)||void 0===a?void 0:a.data)?i.response.data:void 0)&&void 0!==h?h:(null===(p=null==i?void 0:i.response)||void 0===p?void 0:p.statusText)?`Error ${i.response.status}: ${i.response.statusText}`:void 0)&&void 0!==f?f:e,yield n.fire({title:"Error en la carga",text:e,icon:"error",confirmButtonText:"OK"}),null==d||d(t)}finally{u.current&&(u.current.value=""),m(!1)}else yield n.fire({title:"Archivo vacío",text:"El archivo seleccionado está vacío",icon:"warning",confirmButtonText:"OK"});else yield n.fire({title:"Archivo inválido",text:"El archivo debe ser un Excel (.xlsx o .xls)",icon:"warning",confirmButtonText:"OK"})})})]})},exports.downloadStudentsExcel=Wa,exports.generateTableColumns=function(t,e){return Object.keys(t).filter(t=>-1===e.indexOf(t)).map(t=>({key:t,header:t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim(),accessor:e=>{var n;return null!==(n=e[t])&&void 0!==n?n:"-"}}))},exports.getBackendPrefix=$a,exports.uploadStudentsExcel=Ua,exports.useModal=function(t=!1){const[n,i]=e.useState(t);return{open:n,onOpen:e.useCallback(()=>i(!0),[]),onClose:e.useCallback(()=>i(!1),[]),toggle:e.useCallback(()=>i(t=>!t),[]),setOpen:i}};
2
2
  //# sourceMappingURL=index.js.map