@ukpc-lib/react 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var Su=require("../index.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),P=require("react"),C=require("../styled-e695695c.cjs"),ho=require("react-dom"),Ls=require("react-router-dom"),po=require("axios");function mo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const j=mo(P),go="_avartarDropdownMenu_zliwx_13",yo="_navbar_zliwx_25",vo="_userContainer_zliwx_53",xo="_userFullName_zliwx_59",bo="_userAvatar_zliwx_66",To="_relative_zliwx_74",G={"avatar-dropdown-item":"_avatar-dropdown-item_zliwx_1",avartarDropdownMenu:go,navbar:yo,"navbar-container":"_navbar-container_zliwx_36","right-side-container":"_right-side-container_zliwx_44",userContainer:vo,userFullName:xo,userAvatar:bo,relative:To,"cursor-pointer":"_cursor-pointer_zliwx_78"};function Po(){return v.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("circle",{cx:"16.928",cy:"7",r:"2",fill:"#E01B00",stroke:"white"})]})}function wo(){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[v.jsx("path",{d:"M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",stroke:"white","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M15.9965 11.5H16.0054",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M11.9955 11.5H12.0045",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M7.99451 11.5H8.00349",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})}const So="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAArCAYAAAADgWq5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3XSURBVHgBtVl7jFxVGf/dO3feMzuzO/tuu92y2xIoCEgCgUQogSIKhBIgaAxpFdREITxMVCrYNqB/+A8QCYQYbIuJUTChGqBQDCkaMUCgW0qtpe12t933drezs/N+XX/fuefOzK6l0KInPb2POfec3/m+3/c6a+ALNNu247xczL6Ofbm+j+suLck+pK972XcYhrEbX6AZOItGoGt4uZ99jQtu+tAnmP7kIPLz8yiwS/NHmxDr6kJTdzfaVq5qnGIb+/azAX9GgDXQTQJUQB3Y+SqOvL1bgXVB6nELv2OvcqllX74Uq2+8SV2buBE40n+QwHfgfwlYq34r+7rU+Bj2vvgH/Ou1VxXIxeAaW7Xht6ph1NGzCfAr7/meC3wb+xYCH8IXBaylurWQnu/d++IfMUCwRS1Nuz7mFN813lfVUrYh3xi1lWXIlXd/F1eww5H2rQQ9gLMFTCAP8PJEamIcO+77AebHx+u/6Y8FrItNJDqVL2Awm8WJQhFejwedfj9WhIJosjz8wKCkUdupu6koOX7n08+60haKPHnGgAlEuLp5bGAPdm78yUKO6tU4cQ3w/uQc3pqYwkypQOAGTNNU3SJoi+N6wmFclWjmBnxqvEja1rMJcF8kghseeRT9V62Rl5s595bPDZggxE29fPD11/DWLx9f/FsNqFwrvP5l6DjenZmBKN40TM5qqrEeAUzJGnz28Rpgv6atFRdGQmrXjjG6QrDV/Q0/+zlWf/1GebWB82//TMAE0svLnpnDh+N/umfDaY1KfnlrdBw7R8ZguyQxPJSsoW493JDHY7JbaiGhSNCycEt3J3oDgZp2qi5HOMgbjuCOp59B+8pV4rsvWWyIpwJ8ND0x0fvKQ/dDPIJh1yWgWVsbW6xU8au9+8jXAqUJWJRo2OdDiGqPBv1ojcUQIRVOptOYnEsjky+iUrXREw3jm91dihQ26VPRs0NvoKmrk6DJ6c6uAQK+pBGftQis8LZ3z/ZtIGjFQRJS78zQ05q1u/0nk5ghWOFoazCAloCFGIF2xKPobmtHW1sCifZWeP1e5DM5jJPjHxwaxsGpJE5WykhYlprZI1IWr0FOGASd4tpv/OIx3PHrZy4mJuHzZhejuYgKDxza9Tqkm4ah5Ck8NUzpjhG5z/L7QQIWsGGfFzGvGJeeUMZY5G0oxGgXRYBSjsSi6GpvwZoL+7GqM4GhbM5hkOEIw6SkDcN5ISIZ2fOh6mz36ziwEDCb7CK+94UXHFAKsHMVQzK1lIWfakq+T4p0+RwhWP5Tm1CcVAbFb7w+xwA9XnVvkS4RbuCS5Z18tvT8LmgO0+s5axrY5Ri8gH3gVICvPvLmG0hPTjjSNVyp6kk5Uhii7Mm01W9i1X6S1yLR7apj78ozKEPjDqoVlIsFLmIjJNKm6wpEI2iOBMhzT10wohmzDtSloGAZ2bNngZRNTYcNwt0ju3Y5vK19jIZJG7ssZiuL93kMTSmC5X3Acnq1lEM2lUQ2OYsTY2PI8BoOeOEXgVfLiPqtmmBqVGt4NrWG3932vCvlNY1GtyYzOYmpfR9pKsgWRa91ryBvXZ8pb1PFspo0YJpqxIlCCf6qiRx3eWwkidBkCj2JGfT3LsU+Gtp83sbyZcsRpTtDbhYtytWJUVfrkwqRbE0rJ4xilBIu0MtQO7fwzQ6XEldPfVQHa7vc1cZlurs26+9eOngIQ/MpeMmVeCiAXNWLXBkEVuDVwniqiH2Tafzz4Cj2T6QwkytifHYOyfQ8ZuYLeHN4FEUKxZWuY6v63k039NqDf/+bPK5TEiYdJOnunT16xLFu6TqKyVURTEvZwwlVBsaFUsqdAZlKBWYuj85QBJmq5A8mYpEw5uYraPUauHBZBxf18LuqChSlSgnnLO1AjnTxaA+huCl5BqUt63q0x6gq92lj+shhnEdaiCezND+QPHrUIbzgMZ3Q61ib7QQPdevwWh6DtPIygXpMD4p0Cx0RA+cnOlUaWShXkZsvYwkN7LLz+5AtVbF0SbcKzyGfhfTMNFYtaVXaMVzfRrCOlzE0TL0Z3owO7HEdw8UCuFfuMlOTNWnWrFWnhY5DdpnsXFfEYxjN5NSGKpw0ncsy8kVRplkcn06izQ+E6IujzQlcviqH9/49zIhmoY9AffQyYZ8fZsmjMghnaqNuIRLWbceQhculTMYFHK8Bzk1POzvUiY3zrVnLqZRJmI6UpfU3t+AfKt00tTHaODw2gQIHlctlTCaLGDqZwfzvX6Ira0IgEMTw1BRGR4awsiOOsBVg2uFXvK2vZzgobVN5oaqjYOXedOuthWZTATJr8V1RQyeCqMm1LvCepihDcRDJYlEBrkqgEP5yBQ8DhD8eRlu8CSuW96ClOYYSc2SDGjs6PonxZAqdTdRWuGlBpm+gIXuzDQfTwvSlIXBo92S7oExDewudLi7yxVEm5ndfcAF5yOSFq3jok6Ufm8sjze+C8WYsWXUuWnpXoBgM4/3jE9gzPO4EFY4zqqiF4gU+uOaLtZfQHsttIuEhuQl3dEB8sZs1aUY4FDCqTvJj63xN5wwtrCSaKc2xXAEpZmIrOoSfQILG1kOpfuXSS9Ddswz+YBA9zIGPkUIf7NuvpNfmDao5lJUYjo93c2xXy66bbersdPEOCWDJO+FjHpo1Jl1y1KkgXkIrwmiwP7Fjr6STlpcuK48CxTybztDQPEimUojxuv+99zB9bNihVjGNALUS9AfgJTWWB6M1Cdq60qsVBg0kWQxYkKiir43qVY5bAxLVeAxolaDm0G19dbO2CsdWCCBPQ5tIZZArVVQSP8nodGB4BIPDx5FlsLDI11lyt1wu4bJ4u/LpCpBZpwOABlpAGZ68be1b6QJOWpLRc1fJ2Ipz4nAduespFrkzxx8bdSMQAyMnyzpnzpdKBJpFdzSIJYkE+np70HtOL6KRIGZnZnF8cgpLQzG0+ILaMzR4h0XN1bNE1kRfn5KuVNSul/jzkssuX/9hLTXXEm2wW1tPXPOZXPBktqAqCFXq2I5WsswpjlWqSsm5cgXTLE5l+OiJWRW66d/wTr6E/oAP7bBrLs02Tln+qLW6LrpInnbLfy7gHd5weH3b6gswvf/jU+7VjXYizP0nTuCVw4MYnJsjjx2LrlYNRQ01iEAHZ1MYTqbhHRxVJdOKzg60NUUUzY4UWH14vehg4r+UX3QxexNe1845XAWyd1x4ESIdisNvNwLeLfw4785vxKc3PaIJUFUewlXcXKmM96nSd1h0jpKfZeYQMkqqZhnnkZhN0JJrlLgrcVs2k41YOICVXe0Is3SS9LNKflveELyMdCelCGDfT6Es529Ly0VE1by6Mudd//XXu3TYVgPMhyRV81Tr6gs2hds7kZUwDcegxjNZvM0INnBihiCrzBuY7DA5N0XkBGXy2SlHbFUuqQcxWOYYzQTbxoJTPLz4a8u0MG34lR8uku9hJvUVApT8Q3zJKLndzA2vLuYQ4PswtdJ/3doaHVx9u01OW5KX/vBexeNksYSXh4bxG6aRH88lafisJKhan1e6l1mZl++YC9CtSTBQZRQX9jMpipGf3bEQ2mlsQapdNpOn1McrTJhsllN8V2IlIqqrUAiSYko499LtZVjMvh+N4XgojC996y7BJW53y38BFinzIlLGSGe3A5RuyCYYARkMhuBjkJCTHK+EXk7u8zIXIPAycwKTwKFDu0+iGe+EGuliFWmTIdwMqdouwM3IKLGFErWTzeeoMQMZFqVObmyq0N659qvou/Y6gfZU49lEo4Shy+mB23+6EfGubiVBOQTxM2cQNYqqg4xuIuEgAYdo8WFGsRC7FQjBE4ygxKQmbfiQZSQrBOPwNLczKMUQZj0X4qYdz2io2k96kXm1SFlaLp9XjqEl0Yqbb7vN5e7mBRixqLknPwcPHIh/f/16ZHOyc+a8THIU6bmJEvnX6KttisuSKpjSKfG8QRLxMMF5+E42E6CGAtyccF/AWtz8PKNhS2sCkzRk0ZyYhJfjm1ta8Ojjj2FpT88pT37MxYD1gAfPPe88/GjjwwRoOZWAlPOUkgD1UbqKEuwRhvQwzx18lg9NLOETTHoSXDTKbC7EMCzGJxV2RdduUl3LfPIs3kjCdSaTJqU8yFPad939HQErQ799qvNiC6do4kJE0jevu3VTUyyOTQ9vRIVG4UpHpCxNXJiU8/KuSj6KNIsMvR66Lj8NVDyBAJPNCUjRiKWlLG7RrRWzrFyWdC/Fgw//GBddrE6mtnzaqbyB0zT3fHhsdBQP3XsfxkZGlBsSFSr1GI6f9pLT8l7O0WQTeXIxSm2UuMkcjSrRkqBXKCkteSW1FP/LoNPBpCZL6XposE8+ywNAZow42/PhBtBSpL7M3rv9+efx2+eeo0S99VTQcNSq/CoBi5pzLJcsbkKkn+W9ABa35UjYUvmBeIeeZT24+rpr8bWbbkIoHB6CQ4Pdp8PzmYA16F44R1nrJ5jT/m7rVvz19TecPJaqFsDlakXxWYCJNCt89mgDbWluVvx0D7mjTU248qqrsO7225BgksS2Q4NNfhaWzwW4AbicDTzB3jtJ4HsHBvDmzp0YPHQYhVKRbi6oKFIgOKGFBAhpQb4Pkt8r+s7B5VdcgWvWrhWJyk+SH2w2zuDPX2cEuAH4Gl42sK933w0ePowZhu9JHpWmyM8y3ZvwOMoz4r7+foLtc4cmNdAnjf/33+lOA14k7/4VdDkW/iV0Dk6RMARH9QOfR/Wf1v4D3Fe7Fu3OpbsAAAAASUVORK5CYII=",X={"modal-overlay":"_modal-overlay_10n3k_1","modal-title":"_modal-title_10n3k_12","modal-footer":"_modal-footer_10n3k_19","modal-container":"_modal-container_10n3k_25","modal-button":"_modal-button_10n3k_43","confirm-btn":"_confirm-btn_10n3k_51","text-white":"_text-white_10n3k_55","text-sm":"_text-sm_10n3k_59"};function ks({isOpen:t,onClose:e,onConfirm:n}){if(!t)return null;function s(i){var r;((r=i.target)==null?void 0:r.id)==="modal-wrapper"&&e()}return v.jsx("div",{onClick:s,className:X["modal-overlay"],id:"modal-wrapper",children:v.jsxs("div",{className:X["modal-container"],children:[v.jsx("h3",{className:X["modal-title"],children:"Log out"}),v.jsx("p",{className:X["text-sm"],children:"Are you sure want to log out?"}),v.jsxs("div",{className:X["modal-footer"],children:[v.jsx("button",{className:X["modal-button"],onClick:e,children:"Cancel"}),v.jsx("button",{onClick:n,className:`${X["text-white"]} ${X["confirm-btn"]} ${X["modal-button"]}`,children:"Confirm"})]})]})})}function Co({logo:t,user:e,baseUrl:n,style:s,classNames:i=""}){const r=t||"/public/assets/icons/logo-header.png";return v.jsx("nav",{className:`${G.navbar} ${i}`,style:s,children:v.jsxs("div",{className:G["navbar-container"],children:[v.jsx("img",{src:r,alt:"logo-header"}),v.jsxs("div",{className:G["right-side-container"],children:[v.jsxs("div",{className:G.userContainer,children:[v.jsx("p",{className:G.userFullName,children:`${e==null?void 0:e.firstName} ${e==null?void 0:e.lastName}`}),v.jsx(Ao,{baseUrl:n,avatarUrl:e==null?void 0:e.avatarUrl})]}),v.jsx("span",{className:G["cursor-pointer"],children:v.jsx(Po,{})}),v.jsx("span",{className:G["cursor-pointer"],children:v.jsx(wo,{})})]})]})})}function Ao({avatarUrl:t,baseUrl:e}){const[n,s]=P.useState(!1),[i,r]=P.useState(!1),o=P.useRef(null),a=P.useRef(null),l=()=>{window.location.href=`${e}/authentication/logout?callbackUrl=${window.location.origin}`};return P.useEffect(()=>{function c(u){u.target!==a.current&&u.target!==o.current&&s(!1)}return window.addEventListener("click",c),()=>window.removeEventListener("click",c)},[]),v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:G.relative,children:[v.jsx("img",{ref:o,onClick:()=>s(c=>!c),alt:"user avatar",className:G.userAvatar,src:t||So}),n&&v.jsx("div",{ref:a,className:G.avartarDropdownMenu,children:v.jsxs("ul",{children:[v.jsx("li",{className:G["avatar-dropdown-item"],children:"Profile"}),v.jsx("li",{onClick:()=>r(!0),className:G["avatar-dropdown-item"],children:"Logout"})]})})]}),v.jsx(ks,{isOpen:i,onClose:()=>r(!1),onConfirm:l})]})}var ze={},Bs={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Bs);var We=Bs.exports,pe={};function Vo(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Mo(t,e=166){let n;function s(...i){const r=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(r,e)}return s.clear=()=>{clearTimeout(n)},s}function Do(t,e){return process.env.NODE_ENV==="production"?()=>null:(n,s,i,r,o)=>{const a=i||"<<anonymous>>",l=o||s;return typeof n[s]<"u"?new Error(`The ${r} \`${l}\` of \`${a}\` is deprecated. ${e}`):null}}function Ro(t,e){var n,s;return j.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(s=t.type)==null||(s=s._payload)==null||(s=s.value)==null?void 0:s.muiName)!==-1}function Is(t){return t&&t.ownerDocument||document}function jo(t){return Is(t).defaultView||window}function Os(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Eo=typeof window<"u"?j.useLayoutEffect:j.useEffect,Fs=Eo;let Pn=0;function Lo(t){const[e,n]=j.useState(t),s=t||e;return j.useEffect(()=>{e==null&&(Pn+=1,n(`mui-${Pn}`))},[e]),s}const wn=j["useId".toString()];function ko(t){if(wn!==void 0){const e=wn();return t??e}return Lo(t)}function Bo(t,e,n,s,i){if(process.env.NODE_ENV==="production")return null;const r=i||e;return typeof t[e]<"u"?new Error(`The prop \`${r}\` is not supported. Please remove it.`):null}function Io({controlled:t,default:e,name:n,state:s="value"}){const{current:i}=j.useRef(t!==void 0),[r,o]=j.useState(e),a=i?t:r;if(process.env.NODE_ENV!=="production"){j.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${s} state of ${n} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
2
- `))},[s,n,t]);const{current:c}=j.useRef(e);j.useEffect(()=>{!i&&c!==e&&console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
3
- `))},[JSON.stringify(e)])}const l=j.useCallback(c=>{i||o(c)},[]);return[a,l]}function Oo(t){const e=j.useRef(t);return Fs(()=>{e.current=t}),j.useRef((...n)=>(0,e.current)(...n)).current}function Fo(...t){return j.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Os(n,e)})},t)}let oe=!0,Me=!1,Sn;const No={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function _o(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&No[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function Uo(t){t.metaKey||t.altKey||t.ctrlKey||(oe=!0)}function me(){oe=!1}function zo(){this.visibilityState==="hidden"&&Me&&(oe=!0)}function Wo(t){t.addEventListener("keydown",Uo,!0),t.addEventListener("mousedown",me,!0),t.addEventListener("pointerdown",me,!0),t.addEventListener("touchstart",me,!0),t.addEventListener("visibilitychange",zo,!0)}function Go(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return oe||_o(e)}function $o(){const t=j.useCallback(i=>{i!=null&&Wo(i.ownerDocument)},[]),e=j.useRef(!1);function n(){return e.current?(Me=!0,window.clearTimeout(Sn),Sn=window.setTimeout(()=>{Me=!1},100),e.current=!1,!0):!1}function s(i){return Go(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:s,onBlur:n,ref:t}}function qo(t){return C.generateUtilityClass("MuiSvgIcon",t)}C.generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ho=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Ko=t=>{const{color:e,fontSize:n,classes:s}=t,i={root:["root",e!=="inherit"&&`color${C.capitalize(e)}`,`fontSize${C.capitalize(n)}`]};return C.composeClasses(i,qo,s)},Yo=C.styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${C.capitalize(n.color)}`],e[`fontSize${C.capitalize(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,s,i,r,o,a,l,c,u,f,h,d,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(s=n.create)==null?void 0:s.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((r=t.typography)==null||(o=r.pxToRem)==null?void 0:o.call(r,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(d=(t.vars||t).palette)==null||(d=d.action)==null?void 0:d.active,disabled:(p=(t.vars||t).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[e.color]}}),Ge=j.forwardRef(function(e,n){const s=C.useThemeProps({props:e,name:"MuiSvgIcon"}),{children:i,className:r,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=s,d=C._objectWithoutPropertiesLoose(s,Ho),p=j.isValidElement(i)&&i.type==="svg",m=C._extends({},s,{color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:p}),x={};u||(x.viewBox=h);const T=Ko(m);return v.jsxs(Yo,C._extends({as:a,className:C.clsx(T.root,r),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},x,d,p&&i.props,{ownerState:m,children:[p?i.props.children:i,f?v.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Ge.propTypes={children:C.PropTypes.node,classes:C.PropTypes.object,className:C.PropTypes.string,color:C.PropTypes.oneOfType([C.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),C.PropTypes.string]),component:C.PropTypes.elementType,fontSize:C.PropTypes.oneOfType([C.PropTypes.oneOf(["inherit","large","medium","small"]),C.PropTypes.string]),htmlColor:C.PropTypes.string,inheritViewBox:C.PropTypes.bool,shapeRendering:C.PropTypes.string,sx:C.PropTypes.oneOfType([C.PropTypes.arrayOf(C.PropTypes.oneOfType([C.PropTypes.func,C.PropTypes.object,C.PropTypes.bool])),C.PropTypes.func,C.PropTypes.object]),titleAccess:C.PropTypes.string,viewBox:C.PropTypes.string});Ge.muiName="SvgIcon";const Cn=Ge;function Xo(t,e){function n(s,i){return v.jsx(Cn,C._extends({"data-testid":`${e}Icon`,ref:i},s,{children:t}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=Cn.muiName,j.memo(j.forwardRef(n))}const Qo={configure:t=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
4
- `)),C.ClassNameGenerator.configure(t)}},Zo=Object.freeze(Object.defineProperty({__proto__:null,capitalize:C.capitalize,createChainedFunction:Vo,createSvgIcon:Xo,debounce:Mo,deprecatedPropType:Do,isMuiElement:Ro,ownerDocument:Is,ownerWindow:jo,requirePropFactory:C.requirePropFactory,setRef:Os,unstable_ClassNameGenerator:Qo,unstable_useEnhancedEffect:Fs,unstable_useId:ko,unsupportedProp:Bo,useControlled:Io,useEventCallback:Oo,useForkRef:Fo,useIsFocusVisible:$o},Symbol.toStringTag,{value:"Module"})),Jo=C.getAugmentedNamespace(Zo);var An;function $e(){return An||(An=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=Jo}(pe)),pe}var tr=We;Object.defineProperty(ze,"__esModule",{value:!0});var Ns=ze.default=void 0,er=tr($e()),nr=v;Ns=ze.default=(0,er.default)((0,nr.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight");var qe={},sr=We;Object.defineProperty(qe,"__esModule",{value:!0});var _s=qe.default=void 0,ir=sr($e()),or=v;_s=qe.default=(0,ir.default)((0,or.jsx)("path",{d:"M4 18h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h8c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1m17.3 7.88L17.42 12l2.88-2.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L15.3 11.3c-.39.39-.39 1.02 0 1.41l3.59 3.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42"}),"MenuOpenRounded");var He={},rr=We;Object.defineProperty(He,"__esModule",{value:!0});var Us=He.default=void 0,ar=rr($e()),lr=v;Us=He.default=(0,ar.default)((0,lr.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1"}),"MenuRounded");const zs=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),re=P.createContext({}),Ke=P.createContext(null),ae=typeof document<"u",cr=ae?P.useLayoutEffect:P.useEffect,Ws=P.createContext({strict:!1}),Ye=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),ur="framerAppearId",Gs="data-"+Ye(ur);function fr(t,e,n,s){const{visualElement:i}=P.useContext(re),r=P.useContext(Ws),o=P.useContext(Ke),a=P.useContext(zs).reducedMotion,l=P.useRef();s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;P.useInsertionEffect(()=>{c&&c.update(n,o)});const u=P.useRef(!!(n[Gs]&&!window.HandoffComplete));return cr(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),P.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function xt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function hr(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):xt(n)&&(n.current=s))},[e])}function Bt(t){return typeof t=="string"||Array.isArray(t)}function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Xe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qe=["initial",...Xe];function ce(t){return le(t.animate)||Qe.some(e=>Bt(t[e]))}function $s(t){return!!(ce(t)||t.variants)}function dr(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Bt(n)?n:void 0,animate:Bt(s)?s:void 0}}return t.inherit!==!1?e:{}}function pr(t){const{initial:e,animate:n}=dr(t,P.useContext(re));return P.useMemo(()=>({initial:e,animate:n}),[Vn(e),Vn(n)])}function Vn(t){return Array.isArray(t)?t.join(" "):t}const Mn={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"]},It={};for(const t in Mn)It[t]={isEnabled:e=>Mn[t].some(n=>!!e[n])};function mr(t){for(const e in t)It[e]={...It[e],...t[e]}}const qs=P.createContext({}),Hs=P.createContext({}),gr=Symbol.for("motionComponentSymbol");function yr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&mr(t);function r(a,l){let c;const u={...P.useContext(zs),...a,layoutId:vr(a)},{isStatic:f}=u,h=pr(a),d=s(a,f);if(!f&&ae){h.visualElement=fr(i,d,u,e);const p=P.useContext(Hs),m=P.useContext(Ws).strict;h.visualElement&&(c=h.visualElement.loadFeatures(u,m,t,p))}return j.createElement(re.Provider,{value:h},c&&h.visualElement?j.createElement(c,{visualElement:h.visualElement,...u}):null,n(i,a,hr(d,h.visualElement,l),d,f,h.visualElement))}const o=P.forwardRef(r);return o[gr]=i,o}function vr({layoutId:t}){const e=P.useContext(qs).id;return e&&t!==void 0?e+"-"+t:t}function xr(t){function e(s,i={}){return yr(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const br=["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 Ze(t){return typeof t!="string"||t.includes("-")?!1:!!(br.indexOf(t)>-1||/[A-Z]/.test(t))}const Qt={};function Tr(t){Object.assign(Qt,t)}const Ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set(Ft);function Ks(t,{layout:e,layoutId:n}){return pt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const _=t=>!!(t&&t.getVelocity),Pr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wr=Ft.length;function Sr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let r="";for(let o=0;o<wr;o++){const a=Ft[o];if(t[a]!==void 0){const l=Pr[a]||a;r+=`${l}(${t[a]}) `}}return e&&!t.z&&(r+="translateZ(0)"),r=r.trim(),i?r=i(t,s?"":r):n&&s&&(r="none"),r}const Ys=t=>e=>typeof e=="string"&&e.startsWith(t),Xs=Ys("--"),De=Ys("var(--"),Cr=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Ar=(t,e)=>e&&typeof t=="number"?e.transform(t):t,rt=(t,e,n)=>Math.min(Math.max(n,t),e),mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},jt={...mt,transform:t=>rt(0,1,t)},Gt={...mt,default:1},Et=t=>Math.round(t*1e5)/1e5,ue=/(-)?([\d]*\.?[\d])+/g,Qs=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Vr=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Nt(t){return typeof t=="string"}const _t=t=>({test:e=>Nt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),nt=_t("deg"),H=_t("%"),w=_t("px"),Mr=_t("vh"),Dr=_t("vw"),Dn={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(t*100)},Rn={...mt,transform:Math.round},Zs={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,size:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:nt,skewX:nt,skewY:nt,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:jt,originX:Dn,originY:Dn,originZ:w,zIndex:Rn,fillOpacity:jt,strokeOpacity:jt,numOctaves:Rn};function Je(t,e,n,s){const{style:i,vars:r,transform:o,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const f in e){const h=e[f];if(Xs(f)){r[f]=h;continue}const d=Zs[f],p=Ar(h,d);if(pt.has(f)){if(l=!0,o[f]=p,!u)continue;h!==(d.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,a[f]=p):i[f]=p}if(e.transform||(l||s?i.transform=Sr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const tn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Js(t,e,n){for(const s in e)!_(e[s])&&!Ks(s,n)&&(t[s]=e[s])}function Rr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=tn();return Je(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function jr(t,e,n){const s=t.style||{},i={};return Js(i,s,t),Object.assign(i,Rr(t,e,n)),t.transformValues?t.transformValues(i):i}function Er(t,e,n){const s={},i=jr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Lr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Lr.has(t)}let ti=t=>!Zt(t);function kr(t){t&&(ti=e=>e.startsWith("on")?!Zt(e):t(e))}try{kr(require("@emotion/is-prop-valid").default)}catch{}function Br(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ti(i)||n===!0&&Zt(i)||!e&&!Zt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function jn(t,e,n){return typeof t=="string"?t:w.transform(e+n*t)}function Ir(t,e,n){const s=jn(e,t.x,t.width),i=jn(n,t.y,t.height);return`${s} ${i}`}const Or={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fr={offset:"strokeDashoffset",array:"strokeDasharray"};function Nr(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Or:Fr;t[r.offset]=w.transform(-s);const o=w.transform(e),a=w.transform(n);t[r.array]=`${o} ${a}`}function en(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,f,h){if(Je(t,c,u,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(i!==void 0||r!==void 0||p.transform)&&(p.transformOrigin=Ir(m,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),o!==void 0&&Nr(d,o,a,l,!1)}const ei=()=>({...tn(),attrs:{}}),nn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function _r(t,e,n,s){const i=P.useMemo(()=>{const r=ei();return en(r,e,{enableHardwareAcceleration:!1},nn(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Js(r,t.style,t),i.style={...r,...i.style}}return i}function Ur(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Ze(n)?_r:Er)(s,r,o,n),u={...Br(s,typeof n=="string",t),...l,ref:i},{children:f}=s,h=P.useMemo(()=>_(f)?f.get():f,[f]);return P.createElement(n,{...u,children:h})}}function ni(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const si=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"]);function ii(t,e,n,s){ni(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(si.has(i)?i:Ye(i),e.attrs[i])}function sn(t,e){const{style:n}=t,s={};for(const i in n)(_(n[i])||e.style&&_(e.style[i])||Ks(i,t))&&(s[i]=n[i]);return s}function oi(t,e){const n=sn(t,e);for(const s in t)if(_(t[s])||_(e[s])){const i=Ft.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function on(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function zr(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Jt=t=>Array.isArray(t),Wr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Gr=t=>Jt(t)?t[t.length-1]||0:t;function Yt(t){const e=_(t)?t.get():t;return Wr(e)?e.toValue():e}function $r({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:qr(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const ri=t=>(e,n)=>{const s=P.useContext(re),i=P.useContext(Ke),r=()=>$r(t,e,s,i);return n?r():zr(r)};function qr(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=Yt(r[h]);let{initial:o,animate:a}=t;const l=ce(t),c=$s(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!le(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=on(t,d);if(!p)return;const{transitionEnd:m,transition:x,...T}=p;for(const y in T){let g=T[y];if(Array.isArray(g)){const b=u?g.length-1:0;g=g[b]}g!==null&&(i[y]=g)}for(const y in m)i[y]=m[y]}),i}const k=t=>t;class En{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Hr(t){let e=new En,n=new En,s=0,i=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&i,h=f?e:n;return c&&o.add(l),h.add(l)&&f&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){r=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];u(l),o.has(u)&&(a.schedule(u),t())}i=!1,r&&(r=!1,a.process(l))}};return a}const $t=["prepare","read","update","preRender","render","postRender"],Kr=40;function Yr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=$t.reduce((f,h)=>(f[h]=Hr(()=>n=!0),f),{}),o=f=>r[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(f-i.timestamp,Kr),1),i.timestamp=f,i.isProcessing=!0,$t.forEach(o),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:$t.reduce((f,h)=>{const d=r[h];return f[h]=(p,m=!1,x=!1)=>(n||l(),d.schedule(p,m,x)),f},{}),cancel:f=>$t.forEach(h=>r[h].cancel(f)),state:i,steps:r}}const{schedule:M,cancel:tt,state:O,steps:ge}=Yr(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0),Xr={useVisualState:ri({scrapeMotionValuesFromProps:oi,createRenderState:ei,onMount:(t,e,{renderState:n,latestValues:s})=>{M.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),M.render(()=>{en(n,s,{enableHardwareAcceleration:!1},nn(e.tagName),t.transformTemplate),ii(e,n)})}})},Qr={useVisualState:ri({scrapeMotionValuesFromProps:sn,createRenderState:tn})};function Zr(t,{forwardMotionProps:e=!1},n,s){return{...Ze(t)?Xr:Qr,preloadedFeatures:n,useRender:Ur(e),createVisualElement:s,Component:t}}function Q(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const ai=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function fe(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Jr=t=>e=>ai(e)&&t(e,fe(e));function Z(t,e,n,s){return Q(t,e,Jr(n),s)}const ta=(t,e)=>n=>e(t(n)),it=(...t)=>t.reduce(ta);function li(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Ln=li("dragHorizontal"),kn=li("dragVertical");function ci(t){let e=!1;if(t==="y")e=kn();else if(t==="x")e=Ln();else{const n=Ln(),s=kn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function ui(){const t=ci(!0);return t?(t(),!1):!0}class lt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Bn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(r,o)=>{if(r.pointerType==="touch"||ui())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&M.update(()=>a[s](r,o))};return Z(t.current,n,i,{passive:!t.getProps()[s]})}class ea extends lt{mount(){this.unmount=it(Bn(this.node,!0),Bn(this.node,!1))}unmount(){}}class na extends lt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=it(Q(this.node.current,"focus",()=>this.onFocus()),Q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const fi=(t,e)=>e?t===e?!0:fi(t,e.parentElement):!1;function ye(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,fe(n))}class sa extends lt{constructor(){super(...arguments),this.removeStartListeners=k,this.removeEndListeners=k,this.removeAccessibleListeners=k,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=Z(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps();M.update(()=>{!f&&!fi(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(s.onTap||s.onPointerUp)}),o=Z(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=it(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||ye("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&M.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Q(this.node.current,"keyup",o),ye("down",(a,l)=>{this.startPress(a,l)})},n=Q(this.node.current,"keydown",e),s=()=>{this.isPressing&&ye("cancel",(r,o)=>this.cancelPress(r,o))},i=Q(this.node.current,"blur",s);this.removeAccessibleListeners=it(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&M.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ui()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&M.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=Z(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=Q(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=it(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Re=new WeakMap,ve=new WeakMap,ia=t=>{const e=Re.get(t.target);e&&e(t)},oa=t=>{t.forEach(ia)};function ra({root:t,...e}){const n=t||document;ve.has(n)||ve.set(n,{});const s=ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(oa,{root:t,...e})),s[i]}function aa(t,e,n){const s=ra(e);return Re.set(t,n),s.observe(t),()=>{Re.delete(t),s.unobserve(t)}}const la={some:0,all:1};class ca extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:la[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return aa(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ua(e,n))&&this.startObserver()}unmount(){}}function ua({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const fa={inView:{Feature:ca},tap:{Feature:sa},focus:{Feature:na},hover:{Feature:ea}};function hi(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function ha(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function da(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function he(t,e,n){const s=t.getProps();return on(s,e,n!==void 0?n:s.custom,ha(t),da(t))}let Ut=k,q=k;process.env.NODE_ENV!=="production"&&(Ut=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},q=(t,e)=>{if(!t)throw new Error(e)});const ot=t=>t*1e3,J=t=>t/1e3,pa={current:!1},di=t=>Array.isArray(t)&&typeof t[0]=="number";function pi(t){return!!(!t||typeof t=="string"&&mi[t]||di(t)||Array.isArray(t)&&t.every(pi))}const Rt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,mi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rt([0,.65,.55,1]),circOut:Rt([.55,0,1,.45]),backIn:Rt([.31,.01,.66,-.59]),backOut:Rt([.33,1.53,.69,.99])};function gi(t){if(t)return di(t)?Rt(t):Array.isArray(t)?t.map(gi):mi[t]}function ma(t,e,n,{delay:s=0,duration:i,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=gi(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function ga(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const yi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ya=1e-7,va=12;function xa(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=yi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>ya&&++a<va);return o}function zt(t,e,n,s){if(t===e&&n===s)return k;const i=r=>xa(r,0,1,t,n);return r=>r===0||r===1?r:yi(i(r),e,s)}const ba=zt(.42,0,1,1),Ta=zt(0,0,.58,1),vi=zt(.42,0,.58,1),Pa=t=>Array.isArray(t)&&typeof t[0]!="number",xi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,bi=t=>e=>1-t(1-e),rn=t=>1-Math.sin(Math.acos(t)),Ti=bi(rn),wa=xi(rn),Pi=zt(.33,1.53,.69,.99),an=bi(Pi),Sa=xi(an),Ca=t=>(t*=2)<1?.5*an(t):.5*(2-Math.pow(2,-10*(t-1))),In={linear:k,easeIn:ba,easeInOut:vi,easeOut:Ta,circIn:rn,circInOut:wa,circOut:Ti,backIn:an,backInOut:Sa,backOut:Pi,anticipate:Ca},On=t=>{if(Array.isArray(t)){q(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return zt(e,n,s,i)}else if(typeof t=="string")return q(In[t]!==void 0,`Invalid easing type '${t}'`),In[t];return t},ln=(t,e)=>n=>!!(Nt(n)&&Vr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),wi=(t,e,n)=>s=>{if(!Nt(s))return s;const[i,r,o,a]=s.match(ue);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Aa=t=>rt(0,255,t),xe={...mt,transform:t=>Math.round(Aa(t))},dt={test:ln("rgb","red"),parse:wi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+xe.transform(t)+", "+xe.transform(e)+", "+xe.transform(n)+", "+Et(jt.transform(s))+")"};function Va(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const je={test:ln("#"),parse:Va,transform:dt.transform},bt={test:ln("hsl","hue"),parse:wi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+H.transform(Et(e))+", "+H.transform(Et(n))+", "+Et(jt.transform(s))+")"},N={test:t=>dt.test(t)||je.test(t)||bt.test(t),parse:t=>dt.test(t)?dt.parse(t):bt.test(t)?bt.parse(t):je.parse(t),transform:t=>Nt(t)?t:t.hasOwnProperty("red")?dt.transform(t):bt.transform(t)},E=(t,e,n)=>-n*t+n*e+t;function be(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ma({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=be(l,a,t+1/3),r=be(l,a,t),o=be(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}const Te=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Da=[je,dt,bt],Ra=t=>Da.find(e=>e.test(t));function Fn(t){const e=Ra(t);q(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===bt&&(n=Ma(n)),n}const Si=(t,e)=>{const n=Fn(t),s=Fn(e),i={...n};return r=>(i.red=Te(n.red,s.red,r),i.green=Te(n.green,s.green,r),i.blue=Te(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),dt.transform(i))};function ja(t){var e,n;return isNaN(t)&&Nt(t)&&(((e=t.match(ue))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Qs))===null||n===void 0?void 0:n.length)||0)>0}const Ci={regex:Cr,countKey:"Vars",token:"${v}",parse:k},Ai={regex:Qs,countKey:"Colors",token:"${c}",parse:N.parse},Vi={regex:ue,countKey:"Numbers",token:"${n}",parse:mt.parse};function Pe(t,{regex:e,countKey:n,token:s,parse:i}){const r=t.tokenised.match(e);r&&(t["num"+n]=r.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...r.map(i)))}function te(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Pe(n,Ci),Pe(n,Ai),Pe(n,Vi),n}function Mi(t){return te(t).values}function Di(t){const{values:e,numColors:n,numVars:s,tokenised:i}=te(t),r=e.length;return o=>{let a=i;for(let l=0;l<r;l++)l<s?a=a.replace(Ci.token,o[l]):l<s+n?a=a.replace(Ai.token,N.transform(o[l])):a=a.replace(Vi.token,Et(o[l]));return a}}const Ea=t=>typeof t=="number"?0:t;function La(t){const e=Mi(t);return Di(t)(e.map(Ea))}const at={test:ja,parse:Mi,createTransformer:Di,getAnimatableNone:La},Ri=(t,e)=>n=>`${n>0?e:t}`;function ji(t,e){return typeof t=="number"?n=>E(t,e,n):N.test(t)?Si(t,e):t.startsWith("var(")?Ri(t,e):Li(t,e)}const Ei=(t,e)=>{const n=[...t],s=n.length,i=t.map((r,o)=>ji(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}},ka=(t,e)=>{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ji(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}},Li=(t,e)=>{const n=at.createTransformer(e),s=te(t),i=te(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?it(Ei(s.values,i.values),n):(Ut(!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.`),Ri(t,e))},Ot=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Nn=(t,e)=>n=>E(t,e,n);function Ba(t){return typeof t=="number"?Nn:typeof t=="string"?N.test(t)?Si:Li:Array.isArray(t)?Ei:typeof t=="object"?ka:Nn}function Ia(t,e,n){const s=[],i=n||Ba(t[0]),r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||k:e;a=it(l,a)}s.push(a)}return s}function ki(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(q(r===e.length,"Both input and output ranges must be the same length"),r===1)return()=>e[0];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Ia(e,s,i),a=o.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=Ot(t[u],t[u+1],c);return o[u](f)};return n?c=>l(rt(t[0],t[r-1],c)):l}function Oa(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ot(0,e,s);t.push(E(n,1,i))}}function Fa(t){const e=[0];return Oa(e,t.length-1),e}function Na(t,e){return t.map(n=>n*e)}function _a(t,e){return t.map(()=>e||vi).splice(0,t.length-1)}function ee({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Pa(s)?s.map(On):On(s),r={done:!1,value:e[0]},o=Na(n&&n.length===e.length?n:Fa(e),t),a=ki(o,e,{ease:Array.isArray(i)?i:_a(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}function Bi(t,e){return e?t*(1e3/e):0}const Ua=5;function Ii(t,e,n){const s=Math.max(e-Ua,0);return Bi(n-t(s),e-s)}const we=.001,za=.01,_n=10,Wa=.05,Ga=1;function $a({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r;Ut(t<=ot(_n),"Spring duration must be 10 seconds or less");let o=1-e;o=rt(Wa,Ga,o),t=rt(za,_n,J(t)),o<1?(i=c=>{const u=c*o,f=u*t,h=u-n,d=Ee(c,o),p=Math.exp(-f);return we-h/d*p},r=c=>{const f=c*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=Ee(Math.pow(c,2),o);return(-i(c)+we>0?-1:1)*((h-d)*p)/m}):(i=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-we+u*f},r=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=Ha(i,r,a);if(t=ot(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const qa=12;function Ha(t,e,n){let s=n;for(let i=1;i<qa;i++)s=s-t(s)/e(s);return s}function Ee(t,e){return t*Math.sqrt(1-e*e)}const Ka=["duration","bounce"],Ya=["stiffness","damping","mass"];function Un(t,e){return e.some(n=>t[n]!==void 0)}function Xa(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Un(t,Ya)&&Un(t,Ka)){const n=$a(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Oi({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=Xa({...s,velocity:-J(s.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=r-i,x=J(Math.sqrt(a/c)),T=Math.abs(m)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let y;if(p<1){const g=Ee(x,p);y=b=>{const S=Math.exp(-p*x*b);return r-S*((d+p*x*m)/g*Math.sin(g*b)+m*Math.cos(g*b))}}else if(p===1)y=g=>r-Math.exp(-x*g)*(m+(d+x*m)*g);else{const g=x*Math.sqrt(p*p-1);y=b=>{const S=Math.exp(-p*x*b),V=Math.min(g*b,300);return r-S*((d+p*x*m)*Math.sinh(V)+g*m*Math.cosh(V))/g}}return{calculatedDuration:h&&u||null,next:g=>{const b=y(g);if(h)o.done=g>=u;else{let S=d;g!==0&&(p<1?S=Ii(y,g,b):S=0);const V=Math.abs(S)<=n,D=Math.abs(r-b)<=e;o.done=V&&D}return o.value=o.done?r:b,o}}}function zn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const x=f+m,T=o===void 0?x:o(x);T!==x&&(m=T-f);const y=A=>-m*Math.exp(-A/s),g=A=>T+y(A),b=A=>{const L=y(A),K=g(A);h.done=Math.abs(L)<=c,h.value=h.done?T:K};let S,V;const D=A=>{d(h.value)&&(S=A,V=Oi({keyframes:[h.value,p(h.value)],velocity:Ii(g,A,h.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:A=>{let L=!1;return!V&&S===void 0&&(L=!0,b(A),D(A)),S!==void 0&&A>S?V.next(A-S):(!L&&b(A),h)}}}const Qa=t=>{const e=({timestamp:n})=>t(n);return{start:()=>M.update(e,!0),stop:()=>tt(e),now:()=>O.isProcessing?O.timestamp:performance.now()}},Wn=2e4;function Gn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Wn;)e+=n,s=t.next(e);return e>=Wn?1/0:e}const Za={decay:zn,inertia:zn,tween:ee,keyframes:ee,spring:Oi};function ne({autoplay:t=!0,delay:e=0,driver:n=Qa,keyframes:s,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:f,...h}){let d=1,p=!1,m,x;const T=()=>{x=new Promise(R=>{m=R})};T();let y;const g=Za[i]||ee;let b;g!==ee&&typeof s[0]!="number"&&(process.env.NODE_ENV!=="production"&&q(s.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),b=ki([0,100],s,{clamp:!1}),s=[0,100]);const S=g({...h,keyframes:s});let V;a==="mirror"&&(V=g({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let D="idle",A=null,L=null,K=null;S.calculatedDuration===null&&r&&(S.calculatedDuration=Gn(S));const{calculatedDuration:gt}=S;let $=1/0,Y=1/0;gt!==null&&($=gt+o,Y=$*(r+1)-o);let F=0;const yt=R=>{if(L===null)return;d>0&&(L=Math.min(L,R)),d<0&&(L=Math.min(R-Y/d,L)),A!==null?F=A:F=Math.round(R-L)*d;const At=F-e*(d>=0?1:-1),vn=d>=0?At<0:At>Y;F=Math.max(At,0),D==="finished"&&A===null&&(F=Y);let xn=F,bn=S;if(r){const de=Math.min(F,Y)/$;let Wt=Math.floor(de),ct=de%1;!ct&&de>=1&&(ct=1),ct===1&&Wt--,Wt=Math.min(Wt,r+1),!!(Wt%2)&&(a==="reverse"?(ct=1-ct,o&&(ct-=o/$)):a==="mirror"&&(bn=V)),xn=rt(0,1,ct)*$}const Vt=vn?{done:!1,value:s[0]}:bn.next(xn);b&&(Vt.value=b(Vt.value));let{done:Tn}=Vt;!vn&&gt!==null&&(Tn=d>=0?F>=Y:F<=0);const fo=A===null&&(D==="finished"||D==="running"&&Tn);return f&&f(Vt.value),fo&&Ct(),Vt},I=()=>{y&&y.stop(),y=void 0},et=()=>{D="idle",I(),m(),T(),L=K=null},Ct=()=>{D="finished",u&&u(),I(),m()},vt=()=>{if(p)return;y||(y=n(yt));const R=y.now();l&&l(),A!==null?L=R-A:(!L||D==="finished")&&(L=R),D==="finished"&&T(),K=L,A=null,D="running",y.start()};t&&vt();const yn={then(R,At){return x.then(R,At)},get time(){return J(F)},set time(R){R=ot(R),F=R,A!==null||!y||d===0?A=R:L=y.now()-R/d},get duration(){const R=S.calculatedDuration===null?Gn(S):S.calculatedDuration;return J(R)},get speed(){return d},set speed(R){R===d||!y||(d=R,yn.time=J(F))},get state(){return D},play:vt,pause:()=>{D="paused",A=F},stop:()=>{p=!0,D!=="idle"&&(D="idle",c&&c(),et())},cancel:()=>{K!==null&&yt(K),et()},complete:()=>{D="finished"},sample:R=>(L=0,yt(R))};return yn}function Ja(t){let e;return()=>(e===void 0&&(e=t()),e)}const tl=Ja(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),el=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),qt=10,nl=2e4,sl=(t,e)=>e.type==="spring"||t==="backgroundColor"||!pi(e.ease);function il(t,e,{onUpdate:n,onComplete:s,...i}){if(!(tl()&&el.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const u=()=>{l=new Promise(g=>{a=g})};u();let{keyframes:f,duration:h=300,ease:d,times:p}=i;if(sl(e,i)){const g=ne({...i,repeat:0,delay:0});let b={done:!1,value:f[0]};const S=[];let V=0;for(;!b.done&&V<nl;)b=g.sample(V),S.push(b.value),V+=qt;p=void 0,f=S,h=V-qt,d="linear"}const m=ma(t.owner.current,e,f,{...i,duration:h,ease:d,times:p}),x=()=>{c=!1,m.cancel()},T=()=>{c=!0,M.update(x),a(),u()};return m.onfinish=()=>{c||(t.set(ga(f,i)),s&&s(),T())},{then(g,b){return l.then(g,b)},attachTimeline(g){return m.timeline=g,m.onfinish=null,k},get time(){return J(m.currentTime||0)},set time(g){m.currentTime=ot(g)},get speed(){return m.playbackRate},set speed(g){m.playbackRate=g},get duration(){return J(h)},play:()=>{o||(m.play(),tt(x))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:g}=m;if(g){const b=ne({...i,autoplay:!1});t.setWithVelocity(b.sample(g-qt).value,b.sample(g).value,qt)}T()},complete:()=>{c||m.finish()},cancel:T}}function ol({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:k,pause:k,stop:k,then:r=>(r(),Promise.resolve()),cancel:k,complete:k});return e?ne({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const rl={type:"spring",stiffness:500,damping:25,restSpeed:10},al=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ll={type:"keyframes",duration:.8},cl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ul=(t,{keyframes:e})=>e.length>2?ll:pt.has(t)?t.startsWith("scale")?al(e[1]):rl:cl,Le=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(at.test(e)||e==="0")&&!e.startsWith("url(")),fl=new Set(["brightness","contrast","saturate","opacity"]);function hl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ue)||[];if(!s)return t;const i=n.replace(s,"");let r=fl.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const dl=/([a-z-]*)\(.*?\)/g,ke={...at,getAnimatableNone:t=>{const e=t.match(dl);return e?e.map(hl).join(" "):t}},pl={...Zs,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:ke,WebkitFilter:ke},cn=t=>pl[t];function Fi(t,e){let n=cn(t);return n!==ke&&(n=at),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ni=t=>/^0[^.\s]+$/.test(t);function ml(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Ni(t)}function gl(t,e,n,s){const i=Le(e,n);let r;Array.isArray(n)?r=[...n]:r=[null,n];const o=s.from!==void 0?s.from:t.get();let a;const l=[];for(let c=0;c<r.length;c++)r[c]===null&&(r[c]=c===0?o:r[c-1]),ml(r[c])&&l.push(c),typeof r[c]=="string"&&r[c]!=="none"&&r[c]!=="0"&&(a=r[c]);if(i&&l.length&&a)for(let c=0;c<l.length;c++){const u=l[c];r[u]=Fi(e,a)}return r}function yl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function un(t,e){return t[e]||t.default||t}const vl={skipAnimations:!1},fn=(t,e,n,s={})=>i=>{const r=un(s,t)||{},o=r.delay||s.delay||0;let{elapsed:a=0}=s;a=a-ot(o);const l=gl(e,t,n,r),c=l[0],u=l[l.length-1],f=Le(t,c),h=Le(t,u);Ut(f===h,`You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let d={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...r,delay:-a,onUpdate:p=>{e.set(p),r.onUpdate&&r.onUpdate(p)},onComplete:()=>{i(),r.onComplete&&r.onComplete()}};if(yl(r)||(d={...d,...ul(t,d)}),d.duration&&(d.duration=ot(d.duration)),d.repeatDelay&&(d.repeatDelay=ot(d.repeatDelay)),!f||!h||pa.current||r.type===!1||vl.skipAnimations)return ol(d);if(!s.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=il(e,t,d);if(p)return p}return ne(d)};function se(t){return!!(_(t)&&t.add)}const _i=t=>/^\-?\d*\.?\d+$/.test(t);function hn(t,e){t.indexOf(e)===-1&&t.push(e)}function dn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class pn{constructor(){this.subscriptions=[]}add(e){return hn(this.subscriptions,e),()=>dn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $n=new Set;function mn(t,e,n){t||$n.has(e)||(console.warn(e),n&&console.warn(n),$n.add(e))}const xl=t=>!isNaN(parseFloat(t));class bl{constructor(e,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:r,timestamp:o}=O;this.lastUpdated!==o&&(this.timeDelta=r,this.lastUpdated=o,M.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>M.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=xl(this.current),this.owner=n.owner}onChange(e){return process.env.NODE_ENV!=="production"&&mn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new pn);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Bi(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wt(t,e){return new bl(t,e)}const Ui=t=>e=>e.test(t),Tl={test:t=>t==="auto",parse:t=>t},zi=[mt,w,H,nt,Dr,Mr,Tl],Mt=t=>zi.find(Ui(t)),Pl=[...zi,N,at],wl=t=>Pl.find(Ui(t));function Sl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function Cl(t,e){const n=he(t,e);let{transitionEnd:s={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...s};for(const o in r){const a=Gr(r[o]);Sl(t,o,a)}}function Al(t,e,n){var s,i;const r=Object.keys(e).filter(a=>!t.hasValue(a)),o=r.length;if(o)for(let a=0;a<o;a++){const l=r[a],c=e[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(s=n[l])!==null&&s!==void 0?s:t.readValue(l))!==null&&i!==void 0?i:e[l]),u!=null&&(typeof u=="string"&&(_i(u)||Ni(u))?u=parseFloat(u):!wl(u)&&at.test(c)&&(u=Fi(l,c)),t.addValue(l,wt(u,{owner:t})),n[l]===void 0&&(n[l]=u),u!==null&&t.setBaseTarget(l,u))}}function Vl(t,e){return e?(e[t]||e.default||e).from:void 0}function Ml(t,e,n){const s={};for(const i in t){const r=Vl(i,e);if(r!==void 0)s[i]=r;else{const o=n.getValue(i);o&&(s[i]=o.get())}}return s}function Dl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Rl(t,e){const n=t.get();if(Array.isArray(e)){for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}else return n!==e}function Wi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(r=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),d=a[f];if(!h||d===void 0||u&&Dl(u,f))continue;const p={delay:n,elapsed:0,...un(r||{},f)};if(window.HandoffAppearAnimations){const T=t.getProps()[Gs];if(T){const y=window.HandoffAppearAnimations(T,f,h,M);y!==null&&(p.elapsed=y,p.isHandoff=!0)}}let m=!p.isHandoff&&!Rl(h,d);if(p.type==="spring"&&(h.getVelocity()||p.velocity)&&(m=!1),h.animation&&(m=!1),m)continue;h.start(fn(f,h,d,t.shouldReduceMotion&&pt.has(f)?{type:!1}:p));const x=h.animation;se(l)&&(l.add(f),x.then(()=>l.remove(f))),c.push(x)}return o&&Promise.all(c).then(()=>{o&&Cl(t,o)}),c}function Be(t,e,n={}){const s=he(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Wi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return jl(t,e,c+l,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function jl(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(El).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(Be(c,e,{...r,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function El(t,e){return t.sortNodePosition(e)}function Ll(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Be(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Be(t,e,n);else{const i=typeof e=="function"?he(t,e,n.custom):e;s=Promise.all(Wi(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const kl=[...Xe].reverse(),Bl=Xe.length;function Il(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ll(t,n,s)))}function Ol(t){let e=Il(t);const n=Nl();let s=!0;const i=(l,c)=>{const u=he(t,c);if(u){const{transition:f,transitionEnd:h,...d}=u;l={...l,...d,...h}}return l};function r(l){e=l(t)}function o(l,c){const u=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},m=1/0;for(let T=0;T<Bl;T++){const y=kl[T],g=n[y],b=u[y]!==void 0?u[y]:f[y],S=Bt(b),V=y===c?g.isActive:null;V===!1&&(m=T);let D=b===f[y]&&b!==u[y]&&S;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),g.protectedKeys={...p},!g.isActive&&V===null||!b&&!g.prevProp||le(b)||typeof b=="boolean")continue;let L=Fl(g.prevProp,b)||y===c&&g.isActive&&!D&&S||T>m&&S,K=!1;const gt=Array.isArray(b)?b:[b];let $=gt.reduce(i,{});V===!1&&($={});const{prevResolvedValues:Y={}}=g,F={...Y,...$},yt=I=>{L=!0,d.has(I)&&(K=!0,d.delete(I)),g.needsAnimating[I]=!0};for(const I in F){const et=$[I],Ct=Y[I];if(p.hasOwnProperty(I))continue;let vt=!1;Jt(et)&&Jt(Ct)?vt=!hi(et,Ct):vt=et!==Ct,vt?et!==void 0?yt(I):d.add(I):et!==void 0&&d.has(I)?yt(I):g.protectedKeys[I]=!0}g.prevProp=b,g.prevResolvedValues=$,g.isActive&&(p={...p,...$}),s&&t.blockInitialAnimation&&(L=!1),L&&(!D||K)&&h.push(...gt.map(I=>({animation:I,options:{type:y,...l}})))}if(d.size){const T={};d.forEach(y=>{const g=t.getBaseTarget(y);g!==void 0&&(T[y]=g)}),h.push({animation:T})}let x=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(h):Promise.resolve()}function a(l,c,u){var f;if(n[l].isActive===c)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const h=o(u,l);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n}}function Fl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!hi(e,t):!1}function ut(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nl(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whileTap:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}class _l extends lt{constructor(e){super(e),e.animationState||(e.animationState=Ol(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),le(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Ul=0;class zl extends lt{constructor(){super(...arguments),this.id=Ul++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Wl={animation:{Feature:_l},exit:{Feature:zl}},qn=(t,e)=>Math.abs(t-e);function Gl(t,e){const n=qn(t.x,e.x),s=qn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Gi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!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 f=Ce(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=Gl(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=O;this.history.push({...p,timestamp:m});const{onStart:x,onMove:T}=this.handlers;h||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Se(h,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ce(f.type==="pointercancel"?this.lastMoveEventInfo:Se(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,x),p&&p(f,x)},!ai(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=fe(e),a=Se(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=O;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Ce(a,this.history)),this.removeListeners=it(Z(this.contextWindow,"pointermove",this.handlePointerMove),Z(this.contextWindow,"pointerup",this.handlePointerUp),Z(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),tt(this.updatePoint)}}function Se(t,e){return e?{point:e(t.point)}:t}function Hn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ce({point:t},e){return{point:t,delta:Hn(t,$i(e)),offset:Hn(t,$l(e)),velocity:ql(e,.1)}}function $l(t){return t[0]}function $i(t){return t[t.length-1]}function ql(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=$i(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};const r=J(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function U(t){return t.max-t.min}function Ie(t,e=0,n=.01){return Math.abs(t-e)<=n}function Kn(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=U(n)/U(e),(Ie(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(Ie(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Lt(t,e,n,s){Kn(t.x,e.x,n.x,s?s.originX:void 0),Kn(t.y,e.y,n.y,s?s.originY:void 0)}function Yn(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}function Hl(t,e,n){Yn(t.x,e.x,n.x),Yn(t.y,e.y,n.y)}function Xn(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}function kt(t,e,n){Xn(t.x,e.x,n.x),Xn(t.y,e.y,n.y)}function Kl(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}function Qn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Yl(t,{top:e,left:n,bottom:s,right:i}){return{x:Qn(t.x,n,i),y:Qn(t.y,e,s)}}function Zn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Xl(t,e){return{x:Zn(t.x,e.x),y:Zn(t.y,e.y)}}function Ql(t,e){let n=.5;const s=U(t),i=U(e);return i>s?n=Ot(e.min,e.max-s,t.min):s>i&&(n=Ot(t.min,t.max-i,e.min)),rt(0,1,n)}function Zl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Oe=.35;function Jl(t=Oe){return t===!1?t=0:t===!0&&(t=Oe),{x:Jn(t,"left","right"),y:Jn(t,"top","bottom")}}function Jn(t,e,n){return{min:ts(t,e),max:ts(t,n)}}function ts(t,e){return typeof t=="number"?t:t[e]||0}const es=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tt=()=>({x:es(),y:es()}),ns=()=>({min:0,max:0}),B=()=>({x:ns(),y:ns()});function W(t){return[t("x"),t("y")]}function qi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function tc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ec(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ae(t){return t===void 0||t===1}function Fe({scale:t,scaleX:e,scaleY:n}){return!Ae(t)||!Ae(e)||!Ae(n)}function ft(t){return Fe(t)||Hi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Hi(t){return ss(t.x)||ss(t.y)}function ss(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function is(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function Ne(t,e=0,n=1,s,i){t.min=is(t.min,e,n,s,i),t.max=is(t.max,e,n,s,i)}function Ki(t,{x:e,y:n}){Ne(t.x,e.translate,e.scale,e.originPoint),Ne(t.y,n.translate,n.scale,n.originPoint)}function nc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const l=r.instance;l&&l.style&&l.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Pt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ki(t,o)),s&&ft(r.latestValues)&&Pt(t,r.latestValues))}e.x=os(e.x),e.y=os(e.y)}function os(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function st(t,e){t.min=t.min+e,t.max=t.max+e}function rs(t,e,[n,s,i]){const r=e[i]!==void 0?e[i]:.5,o=E(t.min,t.max,r);Ne(t,e[n],e[s],o,e.scale)}const sc=["x","scaleX","originX"],ic=["y","scaleY","originY"];function Pt(t,e){rs(t.x,e,sc),rs(t.y,e,ic)}function Yi(t,e){return qi(ec(t.getBoundingClientRect(),e))}function oc(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(st(s.x,i.offset.x),st(s.y,i.offset.y)),s}const Xi=({current:t})=>t?t.ownerDocument.defaultView:null,rc=new WeakMap;class ac{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=B(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fe(u,"page").point)},r=(u,f)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ci(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),W(x=>{let T=this.getAxisMotionValue(x).get()||0;if(H.test(T)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[x];g&&(T=U(g)*(parseFloat(T)/100))}}this.originPoint[x]=T}),p&&M.update(()=>p(u,f),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:x}=f;if(d&&this.currentDirection===null){this.currentDirection=lc(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>W(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Gi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Xi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&M.update(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ht(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Kl(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&&xt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Yl(i.layoutBox,n):this.constraints=!1,this.elastic=Jl(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&W(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Zl(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!xt(e))return!1;const s=e.current;q(s!==null,"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 r=oc(s,i.root,this.visualElement.getTransformPagePoint());let o=Xl(i.layout.layoutBox,r);if(n){const a=n(tc(o));this.hasMutatedConstraints=!!a,a&&(o=qi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=W(u=>{if(!Ht(u,n,this.currentDirection))return;let f=l&&l[u]||{};o&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(fn(e,s,0,n))}stopAnimation(){W(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){W(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){W(n=>{const{drag:s}=this.getProps();if(!Ht(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-E(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!xt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};W(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=Ql({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),W(o=>{if(!Ht(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(E(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;rc.set(this.visualElement,this);const e=this.visualElement.current,n=Z(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();xt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const o=Q(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(W(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Oe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ht(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function lc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class cc extends lt{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new ac(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}}const as=t=>(e,n)=>{t&&M.update(()=>t(e,n))};class uc extends lt{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new Gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:as(e),onStart:as(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&M.update(()=>i(r,o))}}}mount(){this.removePointerDownListener=Z(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function fc(){const t=P.useContext(Ke);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Xt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ls(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Dt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=ls(t,e.target.x),s=ls(t,e.target.y);return`${n}% ${s}%`}},hc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=at.parse(t);if(i.length>5)return s;const r=at.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}};class dc extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Tr(pc),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Xt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Qi(t){const[e,n]=fc(),s=P.useContext(qs);return P.createElement(dc,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(Hs),isPresent:e,safeToRemove:n})}const pc={borderRadius:{...Dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomLeftRadius:Dt,borderBottomRightRadius:Dt,boxShadow:hc},Zi=["TopLeft","TopRight","BottomLeft","BottomRight"],mc=Zi.length,cs=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||w.test(t);function gc(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity!==void 0?n.opacity:1,yc(s)),t.opacityExit=E(e.opacity!==void 0?e.opacity:1,0,vc(s))):r&&(t.opacity=E(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<mc;o++){const a=`border${Zi[o]}Radius`;let l=fs(e,a),c=fs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||us(l)===us(c)?(t[a]=Math.max(E(cs(l),cs(c),s),0),(H.test(c)||H.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function fs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const yc=Ji(0,.5,Ti),vc=Ji(.5,.95,k);function Ji(t,e,n){return s=>s<t?0:s>e?1:n(Ot(t,e,s))}function hs(t,e){t.min=e.min,t.max=e.max}function z(t,e){hs(t.x,e.x),hs(t.y,e.y)}function ds(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function xc(t,e=0,n=1,s=.5,i,r=t,o=t){if(H.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=ds(t.min,e,n,a,i),t.max=ds(t.max,e,n,a,i)}function ps(t,e,[n,s,i],r,o){xc(t,e[n],e[s],e[i],e.scale,r,o)}const bc=["x","scaleX","originX"],Tc=["y","scaleY","originY"];function ms(t,e,n,s){ps(t.x,e,bc,n?n.x:void 0,s?s.x:void 0),ps(t.y,e,Tc,n?n.y:void 0,s?s.y:void 0)}function gs(t){return t.translate===0&&t.scale===1}function to(t){return gs(t.x)&&gs(t.y)}function Pc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function eo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ys(t){return U(t.x)/U(t.y)}class wc{constructor(){this.members=[]}add(e){hn(this.members,e),e.scheduleRender()}remove(e){if(dn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vs(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y;if((i||r)&&(s=`translate3d(${i}px, ${r}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(s+=`rotate(${l}deg) `),c&&(s+=`rotateX(${c}deg) `),u&&(s+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(s+=`scale(${o}, ${a})`),s||"none"}const Sc=(t,e)=>t.depth-e.depth;class Cc{constructor(){this.children=[],this.isDirty=!1}add(e){hn(this.children,e),this.isDirty=!0}remove(e){dn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sc),this.isDirty=!1,this.children.forEach(e)}}function Ac(t,e){const n=performance.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(tt(s),t(r-e))};return M.read(s,!0),()=>tt(s)}function Vc(t){window.MotionDebug&&window.MotionDebug.record(t)}function Mc(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Dc(t,e,n){const s=_(t)?t:wt(t);return s.start(fn("",s,e,n)),s.animation}const xs=["","X","Y","Z"],Rc={visibility:"hidden"},bs=1e3;let jc=0;const ht={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function no({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=jc++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ht.totalNodes=ht.resolvedTargetDeltas=ht.recalculatedProjection=0,this.nodes.forEach(kc),this.nodes.forEach(Nc),this.nodes.forEach(_c),this.nodes.forEach(Bc),Vc(ht)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new pn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mc(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ac(h,250),Xt.hasAnimatedSinceResize&&(Xt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||$c,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=u.getProps(),y=!this.targetLayout||!eo(this.targetLayout,p)||d,g=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const b={...un(m,"layout"),onPlay:x,onComplete:T};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tt(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(Uc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ts);return}this.isUpdating||this.nodes.forEach(Oc),this.isUpdating=!1,this.nodes.forEach(Fc),this.nodes.forEach(Ec),this.nodes.forEach(Lc),this.clearAllSnapshots();const a=performance.now();O.delta=rt(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,ge.update.process(O),ge.preRender.process(O),ge.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Ic),this.sharedNodes.forEach(zc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=B(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!to(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||ft(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),qc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return B();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(st(a.x,l.offset.x),st(a.y,l.offset.y)),a}removeElementScroll(o){const a=B();z(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){z(a,o);const{scroll:h}=this.root;h&&(st(a.x,-h.offset.x),st(a.y,-h.offset.y))}st(a.x,u.offset.x),st(a.y,u.offset.y)}}return a}applyTransform(o,a=!1){const l=B();z(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Pt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ft(u.latestValues)&&Pt(l,u.latestValues)}return ft(this.latestValues)&&Pt(l,this.latestValues),l}removeTransform(o){const a=B();z(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ft(c.latestValues))continue;Fe(c.latestValues)&&c.updateSnapshot();const u=B(),f=c.measurePageBox();z(u,f),ms(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ft(this.latestValues)&&ms(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=O.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),kt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),z(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Hl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):z(this.target,this.layout.layoutBox),Ki(this.target,this.targetDelta)):z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),kt(this.relativeTargetOrigin,this.target,d.target),z(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ht.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Fe(this.parent.latestValues)||Hi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===O.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;z(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;nc(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Tt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Tt(),this.projectionDeltaWithTransform=Tt());const m=this.projectionTransform;Lt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=vs(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==h||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ht.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Tt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=B(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,x=this.getStack(),T=!x||x.members.length<=1,y=!!(m&&!T&&this.options.crossfade===!0&&!this.path.some(Gc));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const S=b/1e3;ws(f.x,o.x,S),ws(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wc(this.relativeTarget,this.relativeTargetOrigin,h,S),g&&Pc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=B()),z(g,this.relativeTarget)),m&&(this.animationValues=u,gc(u,c,this.latestValues,S,y,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Xt.hasAnimatedSinceResize=!0,this.currentAnimation=Dc(0,bs,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&so(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||B();const f=U(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=U(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}z(a,l),Pt(a,u),Lt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new wc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let u=0;u<xs.length;u++){const f="rotate"+xs[u];l[f]&&(c[f]=l[f],o.setStaticValue(f,0))}o.render();for(const u in c)o.setStaticValue(u,c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Rc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Yt(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Yt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ft(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=vs(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Qt){if(h[m]===void 0)continue;const{correct:x,applyTo:T}=Qt[m],y=c.transform==="none"?h[m]:x(h[m],f);if(T){const g=T.length;for(let b=0;b<g;b++)c[T[b]]=y}else c[m]=y}return this.options.layoutId&&(c.pointerEvents=f===this?Yt(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function Ec(t){t.updateLayout()}function Lc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?W(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=U(h);h.min=s[f].min,h.max=h.min+d}):so(r,n.layoutBox,s)&&W(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=U(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=Tt();Lt(a,s,n.layoutBox);const l=Tt();o?Lt(l,t.applyTransform(i,!0),n.measuredBox):Lt(l,s,n.layoutBox);const c=!to(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=B();kt(p,n.layoutBox,h.layoutBox);const m=B();kt(m,s,d.layoutBox),eo(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function kc(t){ht.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Bc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ic(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function Oc(t){t.isLayoutDirty=!1}function Fc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Nc(t){t.resolveTargetDelta()}function _c(t){t.calcProjection()}function Uc(t){t.resetRotation()}function zc(t){t.removeLeadSnapshot()}function ws(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ss(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Wc(t,e,n,s){Ss(t.x,e.x,n.x,s),Ss(t.y,e.y,n.y,s)}function Gc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $c={duration:.45,ease:[.4,0,.1,1]},Cs=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),As=Cs("applewebkit/")&&!Cs("chrome/")?Math.round:k;function Vs(t){t.min=As(t.min),t.max=As(t.max)}function qc(t){Vs(t.x),Vs(t.y)}function so(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ie(ys(e),ys(n),.2)}const Hc=no({attachResizeListener:(t,e)=>Q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ve={current:void 0},io=no({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ve.current){const t=new Hc({});t.mount(window),t.setOptions({layoutScroll:!0}),Ve.current=t}return Ve.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Kc={pan:{Feature:uc},drag:{Feature:cc,ProjectionNode:io,MeasureLayout:Qi}},Yc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xc(t){const e=Yc.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}const Qc=4;function _e(t,e,n=1){q(n<=Qc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=Xc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return _i(o)?parseFloat(o):o}else return De(i)?_e(i,e,n+1):i}function Zc(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const r=i.get();if(!De(r))return;const o=_e(r,s);o&&i.set(o)});for(const i in e){const r=e[i];if(!De(r))continue;const o=_e(r,s);o&&(e[i]=o,n||(n={}),n[i]===void 0&&(n[i]=r))}return{target:e,transitionEnd:n}}const Jc=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),oo=t=>Jc.has(t),tu=t=>Object.keys(t).some(oo),Kt=t=>t===mt||t===w,Ms=(t,e)=>parseFloat(t.split(", ")[e]),Ds=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return Ms(i[1],e);{const r=s.match(/^matrix\((.+)\)$/);return r?Ms(r[1],t):0}},eu=new Set(["x","y","z"]),nu=Ft.filter(t=>!eu.has(t));function su(t){const e=[];return nu.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const St={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:Ds(4,13),y:Ds(5,14)};St.translateX=St.x;St.translateY=St.y;const iu=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,r=getComputedStyle(i),{display:o}=r,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(c=>{a[c]=St[c](s,r)}),e.render();const l=e.measureViewportBox();return n.forEach(c=>{const u=e.getValue(c);u&&u.jump(a[c]),t[c]=St[c](l,r)}),t},ou=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(oo);let r=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let u=n[l],f=Mt(u);const h=e[l];let d;if(Jt(h)){const p=h.length,m=h[0]===null?1:0;u=h[m],f=Mt(u);for(let x=m;x<p&&h[x]!==null;x++)d?q(Mt(h[x])===d,"All keyframes must be of the same type"):(d=Mt(h[x]),q(d===f||Kt(f)&&Kt(d),"Keyframes must be of the same dimension as the current value"))}else d=Mt(h);if(f!==d)if(Kt(f)&&Kt(d)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof h=="string"?e[l]=parseFloat(h):Array.isArray(h)&&d===w&&(e[l]=h.map(parseFloat))}else f!=null&&f.transform&&(d!=null&&d.transform)&&(u===0||h===0)?u===0?c.set(d.transform(u)):e[l]=f.transform(h):(o||(r=su(t),o=!0),a.push(l),s[l]=s[l]!==void 0?s[l]:e[l],c.jump(h))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=iu(e,t,a);return r.length&&r.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),ae&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:s}}else return{target:e,transitionEnd:s}};function ru(t,e,n,s){return tu(e)?ou(t,e,n,s):{target:e,transitionEnd:s}}const au=(t,e,n,s)=>{const i=Zc(t,e,s);return e=i.target,s=i.transitionEnd,ru(t,e,n,s)},Ue={current:null},ro={current:!1};function lu(){if(ro.current=!0,!!ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ue.current=t.matches;t.addListener(e),e()}else Ue.current=!1}function cu(t,e,n){const{willChange:s}=e;for(const i in e){const r=e[i],o=n[i];if(_(r))t.addValue(i,r),se(s)&&s.add(i),process.env.NODE_ENV==="development"&&mn(r.version==="10.18.0",`Attempting to mix Framer Motion versions ${r.version} with 10.18.0 may not work as expected.`);else if(_(o))t.addValue(i,wt(r,{owner:t})),se(s)&&s.remove(i);else if(o!==r)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,wt(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Rs=new WeakMap,ao=Object.keys(It),uu=ao.length,js=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fu=Qe.length;class hu{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>M.render(this.render,!1,!0);const{latestValues:a,renderState:l}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=ce(n),this.isVariantNode=$s(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const h=u[f];a[f]!==void 0&&_(h)&&(h.set(a[f],!1),se(c)&&c.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Rs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),ro.current||lu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ue.current,process.env.NODE_ENV!=="production"&&mn(this.shouldReduceMotion!==!0,"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(){Rs.delete(this.current),this.projection&&this.projection.unmount(),tt(this.notifyUpdate),tt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=pt.has(e),i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,r){let o,a;if(process.env.NODE_ENV!=="production"&&i&&s){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Ut(!1,l):q(!1,l)}for(let l=0;l<uu;l++){const c=ao[l],{isEnabled:u,Feature:f,ProjectionNode:h,MeasureLayout:d}=It[c];h&&(o=h),u(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:f,layoutScroll:h,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||f&&xt(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:r,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<js.length;s++){const i=js[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=cu(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<fu;s++){const i=Qe[s],r=this.props[i];(Bt(r)||r===!1)&&(n[i]=r)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=on(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!_(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new pn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class lo extends hu{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},r){let o=Ml(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),o&&(o=i(o))),r){Al(this,s,o);const a=au(this,s,o,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function du(t){return window.getComputedStyle(t)}class pu extends lo{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(pt.has(n)){const s=cn(n);return s&&s.default||0}else{const s=du(e),i=(Xs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yi(e,n)}build(e,n,s,i){Je(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return sn(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){ni(e,n,s,i)}}class mu extends lo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(pt.has(n)){const s=cn(n);return s&&s.default||0}return n=si.has(n)?n:Ye(n),e.getAttribute(n)}measureInstanceViewportBox(){return B()}scrapeMotionValuesFromProps(e,n){return oi(e,n)}build(e,n,s,i){en(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){ii(e,n,s,i)}mount(e){this.isSVGTag=nn(e.tagName),super.mount(e)}}const gu=(t,e)=>Ze(t)?new mu(e,{enableHardwareAcceleration:!1}):new pu(e,{enableHardwareAcceleration:!0}),yu={layout:{ProjectionNode:io,MeasureLayout:Qi}},vu={...Wl,...fa,...Kc,...yu},gn=xr((t,e)=>Zr(t,e,vu,gu));function Es(t){for(;t.startsWith("/");)t=t.slice(1);return t}function co(t,e,n=[]){for(const s of t){if(console.log(s.path,e,s.path===e),Es(s.path||"")===Es(e))return[...n,s];if(s.children){const i=co(s.children,e,[...n,s]);if(i)return i}}return null}function xu(t){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:v.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}function bu(t){return v.jsx(Tu,{...t})}function Tu(t){const{baseUrl:e,menuPath:n}=t;console.log("baseUrl:",e);const s=Ls.useLocation();console.log("location:",s);const[i,r]=P.useState([]),[o,a]=P.useState(!1),l=(co(i,s.pathname)||[]).filter(y=>y.parentKey!==0),[c,u]=P.useState({}),f=y=>{u({...c,[y]:!c[y]})};console.log("matchPaths:",l);const h=()=>{a(!o)};P.useEffect(()=>{(async()=>{const g=e+(n||"/global-menu-config/api/v1/menu-items/user"),b=await po.get(g,{withCredentials:!0}).then(V=>V.data),S={};b.forEach(V=>{V.children&&(S[V.id]=!0)}),u(S),r(b.map(V=>({...V,parentKey:0})))})()},[e,n]);const[d,p]=P.useState(!1),m=()=>{window.location.href=`${e}/authentication/logout?callbackUrl=${window.location.origin}`},x=o?"collapsed":"expanded",T=y=>`${y} ${x}`;return v.jsxs(gn.nav,{initial:{width:"18rem"},animate:{width:o?"5rem":"18rem"},transition:{duration:.3},className:T("side-bar"),children:[v.jsx("div",{className:"h-[8px]"}),v.jsx("div",{className:T("side-bar__toggle-btn"),children:v.jsx("button",{className:"icon-btn",onClick:h,children:o?v.jsx(Us,{}):v.jsx(_s,{})})}),v.jsx("div",{id:"menu-items",className:T("mt-6 overflow-y-auto overflow-x-hidden flex-1"),children:i.map(y=>{const g=b=>l.some(S=>S.id===b);return v.jsx(uo,{item:y,isActive:g,isCollapsed:o,expanded:b=>c[b],toggleExpand:f},y.id)})}),v.jsxs("div",{className:"w-full mt-10 mb-10",children:[v.jsxs("button",{className:T("side-bar__logout-btn"),onClick:()=>p(!0),children:[v.jsx(xu,{}),v.jsx("span",{className:`ml-3 ${o?"hidden":""}`,children:"Logout"})]}),v.jsx(ks,{isOpen:d,onClose:()=>p(!1),onConfirm:m})]})]})}function uo({item:t,level:e=0,...n}){var x;const{isActive:s,isCollapsed:i,expanded:r,toggleExpand:o}=n,a=`level-${e}`,l=i?"collapsed":"expanded",c=s(t.id)?"active":"",u=(T,y=a)=>`${T} ${y} ${l} ${c}`,f=!!((x=t.children)!=null&&x.length),[h,d]=P.useState(!1),p=P.useRef();function m(T){var S;const{level:y,hovered:g,parentRef:b}=T;return!f||i&&y>=2&&!g?null:v.jsx(Pu,{parentRef:b,onlyChild:!i||i&&y<2,children:v.jsx(gn.div,{className:u("menu-item__dropdown",`level-${y}`),initial:{height:i?"auto":0},animate:{height:i||r(t.id)?"auto":0},transition:{duration:.2},children:(S=t.children)==null?void 0:S.map(V=>P.createElement(uo,{...n,key:V.id,item:V,level:y}))},+i)})}return v.jsxs("div",{ref:p,className:u("menu-item__wrapper"),onMouseEnter:()=>i&&d(!0),onMouseLeave:()=>i&&d(!1),children:[v.jsxs(Ls.Link,{to:f?"#":t.path||"#",style:{paddingLeft:`${i?"0.5rem":`${e*1}rem`}`},className:u("menu-item__link"),onClick:()=>{f&&!i&&o(t.id)},children:[e!==0&&v.jsx("div",{className:u("menu-item__icon"),children:v.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24}})}),v.jsx("span",{className:u("menu-item__label"),children:t.name}),f&&v.jsx("div",{className:u("menu-item__icon-arrow__wrapper"),children:v.jsx(Ns,{className:u(`menu-item__icon-arrow__icon ${r(t.id)?"open":"close"}`),fontSize:"small"})})]}),m({level:e+1,hovered:h,parentRef:p})]},t.id)}function Pu(t){const{children:e,parentRef:n,onlyChild:s}=t,[i,r]=P.useState({top:0,left:0});return P.useLayoutEffect(()=>{if(n.current){const o=n.current.getBoundingClientRect();r({top:o.top,left:o.left+o.width})}},[n]),s?e:ho.createPortal(v.jsx(gn.div,{style:{position:"fixed",top:i.top,left:i.left},children:e}),document.body)}exports.GlobalMenu=bu;exports.TopBar=Co;
1
+ var Su=require("../index.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),P=require("react"),C=require("../styled-e695695c.cjs"),ho=require("react-dom"),Es=require("react-router-dom"),po=require("axios");function mo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const R=mo(P),go="_avartarDropdownMenu_1jszk_13",yo="_navbar_1jszk_31",vo="_userContainer_1jszk_68",xo="_userFullName_1jszk_74",bo="_userAvatar_1jszk_81",To="_relative_1jszk_89",U={"avatar-dropdown-item":"_avatar-dropdown-item_1jszk_1",avartarDropdownMenu:go,navbar:yo,"navbar-container":"_navbar-container_1jszk_42","logo-container":"_logo-container_1jszk_50","right-side-container":"_right-side-container_1jszk_59",userContainer:vo,userFullName:xo,userAvatar:bo,relative:To,"cursor-pointer":"_cursor-pointer_1jszk_93"};function Po(){return v.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("circle",{cx:"16.928",cy:"7",r:"2",fill:"#E01B00",stroke:"white"})]})}function wo(){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[v.jsx("path",{d:"M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",stroke:"white","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M15.9965 11.5H16.0054",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M11.9955 11.5H12.0045",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M7.99451 11.5H8.00349",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})}const So="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAArCAYAAAADgWq5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3XSURBVHgBtVl7jFxVGf/dO3feMzuzO/tuu92y2xIoCEgCgUQogSIKhBIgaAxpFdREITxMVCrYNqB/+A8QCYQYbIuJUTChGqBQDCkaMUCgW0qtpe12t933drezs/N+XX/fuefOzK6l0KInPb2POfec3/m+3/c6a+ALNNu247xczL6Ofbm+j+suLck+pK972XcYhrEbX6AZOItGoGt4uZ99jQtu+tAnmP7kIPLz8yiwS/NHmxDr6kJTdzfaVq5qnGIb+/azAX9GgDXQTQJUQB3Y+SqOvL1bgXVB6nELv2OvcqllX74Uq2+8SV2buBE40n+QwHfgfwlYq34r+7rU+Bj2vvgH/Ou1VxXIxeAaW7Xht6ph1NGzCfAr7/meC3wb+xYCH8IXBaylurWQnu/d++IfMUCwRS1Nuz7mFN813lfVUrYh3xi1lWXIlXd/F1eww5H2rQQ9gLMFTCAP8PJEamIcO+77AebHx+u/6Y8FrItNJDqVL2Awm8WJQhFejwedfj9WhIJosjz8wKCkUdupu6koOX7n08+60haKPHnGgAlEuLp5bGAPdm78yUKO6tU4cQ3w/uQc3pqYwkypQOAGTNNU3SJoi+N6wmFclWjmBnxqvEja1rMJcF8kghseeRT9V62Rl5s595bPDZggxE29fPD11/DWLx9f/FsNqFwrvP5l6DjenZmBKN40TM5qqrEeAUzJGnz28Rpgv6atFRdGQmrXjjG6QrDV/Q0/+zlWf/1GebWB82//TMAE0svLnpnDh+N/umfDaY1KfnlrdBw7R8ZguyQxPJSsoW493JDHY7JbaiGhSNCycEt3J3oDgZp2qi5HOMgbjuCOp59B+8pV4rsvWWyIpwJ8ND0x0fvKQ/dDPIJh1yWgWVsbW6xU8au9+8jXAqUJWJRo2OdDiGqPBv1ojcUQIRVOptOYnEsjky+iUrXREw3jm91dihQ26VPRs0NvoKmrk6DJ6c6uAQK+pBGftQis8LZ3z/ZtIGjFQRJS78zQ05q1u/0nk5ghWOFoazCAloCFGIF2xKPobmtHW1sCifZWeP1e5DM5jJPjHxwaxsGpJE5WykhYlprZI1IWr0FOGASd4tpv/OIx3PHrZy4mJuHzZhejuYgKDxza9Tqkm4ah5Ck8NUzpjhG5z/L7QQIWsGGfFzGvGJeeUMZY5G0oxGgXRYBSjsSi6GpvwZoL+7GqM4GhbM5hkOEIw6SkDcN5ISIZ2fOh6mz36ziwEDCb7CK+94UXHFAKsHMVQzK1lIWfakq+T4p0+RwhWP5Tm1CcVAbFb7w+xwA9XnVvkS4RbuCS5Z18tvT8LmgO0+s5axrY5Ri8gH3gVICvPvLmG0hPTjjSNVyp6kk5Uhii7Mm01W9i1X6S1yLR7apj78ozKEPjDqoVlIsFLmIjJNKm6wpEI2iOBMhzT10wohmzDtSloGAZ2bNngZRNTYcNwt0ju3Y5vK19jIZJG7ssZiuL93kMTSmC5X3Acnq1lEM2lUQ2OYsTY2PI8BoOeOEXgVfLiPqtmmBqVGt4NrWG3932vCvlNY1GtyYzOYmpfR9pKsgWRa91ryBvXZ8pb1PFspo0YJpqxIlCCf6qiRx3eWwkidBkCj2JGfT3LsU+Gtp83sbyZcsRpTtDbhYtytWJUVfrkwqRbE0rJ4xilBIu0MtQO7fwzQ6XEldPfVQHa7vc1cZlurs26+9eOngIQ/MpeMmVeCiAXNWLXBkEVuDVwniqiH2Tafzz4Cj2T6QwkytifHYOyfQ8ZuYLeHN4FEUKxZWuY6v63k039NqDf/+bPK5TEiYdJOnunT16xLFu6TqKyVURTEvZwwlVBsaFUsqdAZlKBWYuj85QBJmq5A8mYpEw5uYraPUauHBZBxf18LuqChSlSgnnLO1AjnTxaA+huCl5BqUt63q0x6gq92lj+shhnEdaiCezND+QPHrUIbzgMZ3Q61ib7QQPdevwWh6DtPIygXpMD4p0Cx0RA+cnOlUaWShXkZsvYwkN7LLz+5AtVbF0SbcKzyGfhfTMNFYtaVXaMVzfRrCOlzE0TL0Z3owO7HEdw8UCuFfuMlOTNWnWrFWnhY5DdpnsXFfEYxjN5NSGKpw0ncsy8kVRplkcn06izQ+E6IujzQlcviqH9/49zIhmoY9AffQyYZ8fZsmjMghnaqNuIRLWbceQhculTMYFHK8Bzk1POzvUiY3zrVnLqZRJmI6UpfU3t+AfKt00tTHaODw2gQIHlctlTCaLGDqZwfzvX6Ira0IgEMTw1BRGR4awsiOOsBVg2uFXvK2vZzgobVN5oaqjYOXedOuthWZTATJr8V1RQyeCqMm1LvCepihDcRDJYlEBrkqgEP5yBQ8DhD8eRlu8CSuW96ClOYYSc2SDGjs6PonxZAqdTdRWuGlBpm+gIXuzDQfTwvSlIXBo92S7oExDewudLi7yxVEm5ndfcAF5yOSFq3jok6Ufm8sjze+C8WYsWXUuWnpXoBgM4/3jE9gzPO4EFY4zqqiF4gU+uOaLtZfQHsttIuEhuQl3dEB8sZs1aUY4FDCqTvJj63xN5wwtrCSaKc2xXAEpZmIrOoSfQILG1kOpfuXSS9Ddswz+YBA9zIGPkUIf7NuvpNfmDao5lJUYjo93c2xXy66bbersdPEOCWDJO+FjHpo1Jl1y1KkgXkIrwmiwP7Fjr6STlpcuK48CxTybztDQPEimUojxuv+99zB9bNihVjGNALUS9AfgJTWWB6M1Cdq60qsVBg0kWQxYkKiir43qVY5bAxLVeAxolaDm0G19dbO2CsdWCCBPQ5tIZZArVVQSP8nodGB4BIPDx5FlsLDI11lyt1wu4bJ4u/LpCpBZpwOABlpAGZ68be1b6QJOWpLRc1fJ2Ipz4nAduespFrkzxx8bdSMQAyMnyzpnzpdKBJpFdzSIJYkE+np70HtOL6KRIGZnZnF8cgpLQzG0+ILaMzR4h0XN1bNE1kRfn5KuVNSul/jzkssuX/9hLTXXEm2wW1tPXPOZXPBktqAqCFXq2I5WsswpjlWqSsm5cgXTLE5l+OiJWRW66d/wTr6E/oAP7bBrLs02Tln+qLW6LrpInnbLfy7gHd5weH3b6gswvf/jU+7VjXYizP0nTuCVw4MYnJsjjx2LrlYNRQ01iEAHZ1MYTqbhHRxVJdOKzg60NUUUzY4UWH14vehg4r+UX3QxexNe1845XAWyd1x4ESIdisNvNwLeLfw4785vxKc3PaIJUFUewlXcXKmM96nSd1h0jpKfZeYQMkqqZhnnkZhN0JJrlLgrcVs2k41YOICVXe0Is3SS9LNKflveELyMdCelCGDfT6Es529Ly0VE1by6Mudd//XXu3TYVgPMhyRV81Tr6gs2hds7kZUwDcegxjNZvM0INnBihiCrzBuY7DA5N0XkBGXy2SlHbFUuqQcxWOYYzQTbxoJTPLz4a8u0MG34lR8uku9hJvUVApT8Q3zJKLndzA2vLuYQ4PswtdJ/3doaHVx9u01OW5KX/vBexeNksYSXh4bxG6aRH88lafisJKhan1e6l1mZl++YC9CtSTBQZRQX9jMpipGf3bEQ2mlsQapdNpOn1McrTJhsllN8V2IlIqqrUAiSYko499LtZVjMvh+N4XgojC996y7BJW53y38BFinzIlLGSGe3A5RuyCYYARkMhuBjkJCTHK+EXk7u8zIXIPAycwKTwKFDu0+iGe+EGuliFWmTIdwMqdouwM3IKLGFErWTzeeoMQMZFqVObmyq0N659qvou/Y6gfZU49lEo4Shy+mB23+6EfGubiVBOQTxM2cQNYqqg4xuIuEgAYdo8WFGsRC7FQjBE4ygxKQmbfiQZSQrBOPwNLczKMUQZj0X4qYdz2io2k96kXm1SFlaLp9XjqEl0Yqbb7vN5e7mBRixqLknPwcPHIh/f/16ZHOyc+a8THIU6bmJEvnX6KttisuSKpjSKfG8QRLxMMF5+E42E6CGAtyccF/AWtz8PKNhS2sCkzRk0ZyYhJfjm1ta8Ojjj2FpT88pT37MxYD1gAfPPe88/GjjwwRoOZWAlPOUkgD1UbqKEuwRhvQwzx18lg9NLOETTHoSXDTKbC7EMCzGJxV2RdduUl3LfPIs3kjCdSaTJqU8yFPad939HQErQ799qvNiC6do4kJE0jevu3VTUyyOTQ9vRIVG4UpHpCxNXJiU8/KuSj6KNIsMvR66Lj8NVDyBAJPNCUjRiKWlLG7RrRWzrFyWdC/Fgw//GBddrE6mtnzaqbyB0zT3fHhsdBQP3XsfxkZGlBsSFSr1GI6f9pLT8l7O0WQTeXIxSm2UuMkcjSrRkqBXKCkteSW1FP/LoNPBpCZL6XposE8+ywNAZow42/PhBtBSpL7M3rv9+efx2+eeo0S99VTQcNSq/CoBi5pzLJcsbkKkn+W9ABa35UjYUvmBeIeeZT24+rpr8bWbbkIoHB6CQ4Pdp8PzmYA16F44R1nrJ5jT/m7rVvz19TecPJaqFsDlakXxWYCJNCt89mgDbWluVvx0D7mjTU248qqrsO7225BgksS2Q4NNfhaWzwW4AbicDTzB3jtJ4HsHBvDmzp0YPHQYhVKRbi6oKFIgOKGFBAhpQb4Pkt8r+s7B5VdcgWvWrhWJyk+SH2w2zuDPX2cEuAH4Gl42sK933w0ePowZhu9JHpWmyM8y3ZvwOMoz4r7+foLtc4cmNdAnjf/33+lOA14k7/4VdDkW/iV0Dk6RMARH9QOfR/Wf1v4D3Fe7Fu3OpbsAAAAASUVORK5CYII=",X={"modal-overlay":"_modal-overlay_10n3k_1","modal-title":"_modal-title_10n3k_12","modal-footer":"_modal-footer_10n3k_19","modal-container":"_modal-container_10n3k_25","modal-button":"_modal-button_10n3k_43","confirm-btn":"_confirm-btn_10n3k_51","text-white":"_text-white_10n3k_55","text-sm":"_text-sm_10n3k_59"};function Ls({isOpen:t,onClose:e,onConfirm:n}){if(!t)return null;function s(i){var r;((r=i.target)==null?void 0:r.id)==="modal-wrapper"&&e()}return v.jsx("div",{onClick:s,className:X["modal-overlay"],id:"modal-wrapper",children:v.jsxs("div",{className:X["modal-container"],children:[v.jsx("h3",{className:X["modal-title"],children:"Log out"}),v.jsx("p",{className:X["text-sm"],children:"Are you sure want to log out?"}),v.jsxs("div",{className:X["modal-footer"],children:[v.jsx("button",{className:X["modal-button"],onClick:e,children:"Cancel"}),v.jsx("button",{onClick:n,className:`${X["text-white"]} ${X["confirm-btn"]} ${X["modal-button"]}`,children:"Confirm"})]})]})})}function Co({logo:t,user:e,baseUrl:n,style:s,classNames:i=""}){const r=t||"/public/assets/icons/logo-header.png";return v.jsx("nav",{className:`${U.navbar} ${i}`,style:s,children:v.jsxs("div",{className:U["navbar-container"],children:[v.jsx("div",{className:U["logo-container"],children:v.jsx("img",{src:r,alt:"logo-header"})}),v.jsxs("div",{className:U["right-side-container"],children:[v.jsxs("div",{className:U.userContainer,children:[v.jsx("p",{className:U.userFullName,children:`${e==null?void 0:e.firstName} ${e==null?void 0:e.lastName}`}),v.jsx(Ao,{baseUrl:n,avatarUrl:e==null?void 0:e.avatarUrl})]}),v.jsx("span",{className:U["cursor-pointer"],children:v.jsx(Po,{})}),v.jsx("span",{className:U["cursor-pointer"],children:v.jsx(wo,{})})]})]})})}function Ao({avatarUrl:t,baseUrl:e}){const[n,s]=P.useState(!1),[i,r]=P.useState(!1),o=P.useRef(null),a=P.useRef(null),l=()=>{window.location.href=`${e}/authentication/logout?callbackUrl=${window.location.href}`};return P.useEffect(()=>{function c(u){u.target!==a.current&&u.target!==o.current&&s(!1)}return window.addEventListener("click",c),()=>window.removeEventListener("click",c)},[]),v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:U.relative,children:[v.jsx("img",{ref:o,onClick:()=>s(c=>!c),alt:"user avatar",className:U.userAvatar,src:t||So}),n&&v.jsx("div",{ref:a,className:U.avartarDropdownMenu,children:v.jsxs("ul",{children:[v.jsx("li",{className:U["avatar-dropdown-item"],children:"Profile"}),v.jsx("li",{onClick:()=>r(!0),className:U["avatar-dropdown-item"],children:"Logout"})]})})]}),v.jsx(Ls,{isOpen:i,onClose:()=>r(!1),onConfirm:l})]})}var ze={},Bs={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Bs);var We=Bs.exports,pe={};function Vo(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function Mo(t,e=166){let n;function s(...i){const r=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(r,e)}return s.clear=()=>{clearTimeout(n)},s}function Do(t,e){return process.env.NODE_ENV==="production"?()=>null:(n,s,i,r,o)=>{const a=i||"<<anonymous>>",l=o||s;return typeof n[s]<"u"?new Error(`The ${r} \`${l}\` of \`${a}\` is deprecated. ${e}`):null}}function jo(t,e){var n,s;return R.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(s=t.type)==null||(s=s._payload)==null||(s=s.value)==null?void 0:s.muiName)!==-1}function Is(t){return t&&t.ownerDocument||document}function Ro(t){return Is(t).defaultView||window}function Os(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const ko=typeof window<"u"?R.useLayoutEffect:R.useEffect,Fs=ko;let Pn=0;function Eo(t){const[e,n]=R.useState(t),s=t||e;return R.useEffect(()=>{e==null&&(Pn+=1,n(`mui-${Pn}`))},[e]),s}const wn=R["useId".toString()];function Lo(t){if(wn!==void 0){const e=wn();return t??e}return Eo(t)}function Bo(t,e,n,s,i){if(process.env.NODE_ENV==="production")return null;const r=i||e;return typeof t[e]<"u"?new Error(`The prop \`${r}\` is not supported. Please remove it.`):null}function Io({controlled:t,default:e,name:n,state:s="value"}){const{current:i}=R.useRef(t!==void 0),[r,o]=R.useState(e),a=i?t:r;if(process.env.NODE_ENV!=="production"){R.useEffect(()=>{i!==(t!==void 0)&&console.error([`MUI: A component is changing the ${i?"":"un"}controlled ${s} state of ${n} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
2
+ `))},[s,n,t]);const{current:c}=R.useRef(e);R.useEffect(()=>{!i&&c!==e&&console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
3
+ `))},[JSON.stringify(e)])}const l=R.useCallback(c=>{i||o(c)},[]);return[a,l]}function Oo(t){const e=R.useRef(t);return Fs(()=>{e.current=t}),R.useRef((...n)=>(0,e.current)(...n)).current}function Fo(...t){return R.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Os(n,e)})},t)}let oe=!0,Me=!1,Sn;const No={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function _o(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&No[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function Uo(t){t.metaKey||t.altKey||t.ctrlKey||(oe=!0)}function me(){oe=!1}function zo(){this.visibilityState==="hidden"&&Me&&(oe=!0)}function Wo(t){t.addEventListener("keydown",Uo,!0),t.addEventListener("mousedown",me,!0),t.addEventListener("pointerdown",me,!0),t.addEventListener("touchstart",me,!0),t.addEventListener("visibilitychange",zo,!0)}function Go(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return oe||_o(e)}function $o(){const t=R.useCallback(i=>{i!=null&&Wo(i.ownerDocument)},[]),e=R.useRef(!1);function n(){return e.current?(Me=!0,window.clearTimeout(Sn),Sn=window.setTimeout(()=>{Me=!1},100),e.current=!1,!0):!1}function s(i){return Go(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:s,onBlur:n,ref:t}}function qo(t){return C.generateUtilityClass("MuiSvgIcon",t)}C.generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ho=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Ko=t=>{const{color:e,fontSize:n,classes:s}=t,i={root:["root",e!=="inherit"&&`color${C.capitalize(e)}`,`fontSize${C.capitalize(n)}`]};return C.composeClasses(i,qo,s)},Yo=C.styled("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${C.capitalize(n.color)}`],e[`fontSize${C.capitalize(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,s,i,r,o,a,l,c,u,f,h,d,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(s=n.create)==null?void 0:s.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((r=t.typography)==null||(o=r.pxToRem)==null?void 0:o.call(r,20))||"1.25rem",medium:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((c=t.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:(f=(h=(t.vars||t).palette)==null||(h=h[e.color])==null?void 0:h.main)!=null?f:{action:(d=(t.vars||t).palette)==null||(d=d.action)==null?void 0:d.active,disabled:(p=(t.vars||t).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[e.color]}}),Ge=R.forwardRef(function(e,n){const s=C.useThemeProps({props:e,name:"MuiSvgIcon"}),{children:i,className:r,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24"}=s,d=C._objectWithoutPropertiesLoose(s,Ho),p=R.isValidElement(i)&&i.type==="svg",m=C._extends({},s,{color:o,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:p}),x={};u||(x.viewBox=h);const T=Ko(m);return v.jsxs(Yo,C._extends({as:a,className:C.clsx(T.root,r),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},x,d,p&&i.props,{ownerState:m,children:[p?i.props.children:i,f?v.jsx("title",{children:f}):null]}))});process.env.NODE_ENV!=="production"&&(Ge.propTypes={children:C.PropTypes.node,classes:C.PropTypes.object,className:C.PropTypes.string,color:C.PropTypes.oneOfType([C.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),C.PropTypes.string]),component:C.PropTypes.elementType,fontSize:C.PropTypes.oneOfType([C.PropTypes.oneOf(["inherit","large","medium","small"]),C.PropTypes.string]),htmlColor:C.PropTypes.string,inheritViewBox:C.PropTypes.bool,shapeRendering:C.PropTypes.string,sx:C.PropTypes.oneOfType([C.PropTypes.arrayOf(C.PropTypes.oneOfType([C.PropTypes.func,C.PropTypes.object,C.PropTypes.bool])),C.PropTypes.func,C.PropTypes.object]),titleAccess:C.PropTypes.string,viewBox:C.PropTypes.string});Ge.muiName="SvgIcon";const Cn=Ge;function Xo(t,e){function n(s,i){return v.jsx(Cn,C._extends({"data-testid":`${e}Icon`,ref:i},s,{children:t}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=Cn.muiName,R.memo(R.forwardRef(n))}const Qo={configure:t=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
4
+ `)),C.ClassNameGenerator.configure(t)}},Zo=Object.freeze(Object.defineProperty({__proto__:null,capitalize:C.capitalize,createChainedFunction:Vo,createSvgIcon:Xo,debounce:Mo,deprecatedPropType:Do,isMuiElement:jo,ownerDocument:Is,ownerWindow:Ro,requirePropFactory:C.requirePropFactory,setRef:Os,unstable_ClassNameGenerator:Qo,unstable_useEnhancedEffect:Fs,unstable_useId:Lo,unsupportedProp:Bo,useControlled:Io,useEventCallback:Oo,useForkRef:Fo,useIsFocusVisible:$o},Symbol.toStringTag,{value:"Module"})),Jo=C.getAugmentedNamespace(Zo);var An;function $e(){return An||(An=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=Jo}(pe)),pe}var tr=We;Object.defineProperty(ze,"__esModule",{value:!0});var Ns=ze.default=void 0,er=tr($e()),nr=v;Ns=ze.default=(0,er.default)((0,nr.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight");var qe={},sr=We;Object.defineProperty(qe,"__esModule",{value:!0});var _s=qe.default=void 0,ir=sr($e()),or=v;_s=qe.default=(0,ir.default)((0,or.jsx)("path",{d:"M4 18h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h8c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1m17.3 7.88L17.42 12l2.88-2.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L15.3 11.3c-.39.39-.39 1.02 0 1.41l3.59 3.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42"}),"MenuOpenRounded");var He={},rr=We;Object.defineProperty(He,"__esModule",{value:!0});var Us=He.default=void 0,ar=rr($e()),lr=v;Us=He.default=(0,ar.default)((0,lr.jsx)("path",{d:"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1"}),"MenuRounded");const zs=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),re=P.createContext({}),Ke=P.createContext(null),ae=typeof document<"u",cr=ae?P.useLayoutEffect:P.useEffect,Ws=P.createContext({strict:!1}),Ye=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),ur="framerAppearId",Gs="data-"+Ye(ur);function fr(t,e,n,s){const{visualElement:i}=P.useContext(re),r=P.useContext(Ws),o=P.useContext(Ke),a=P.useContext(zs).reducedMotion,l=P.useRef();s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;P.useInsertionEffect(()=>{c&&c.update(n,o)});const u=P.useRef(!!(n[Gs]&&!window.HandoffComplete));return cr(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),P.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function xt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function hr(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):xt(n)&&(n.current=s))},[e])}function Bt(t){return typeof t=="string"||Array.isArray(t)}function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Xe=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qe=["initial",...Xe];function ce(t){return le(t.animate)||Qe.some(e=>Bt(t[e]))}function $s(t){return!!(ce(t)||t.variants)}function dr(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Bt(n)?n:void 0,animate:Bt(s)?s:void 0}}return t.inherit!==!1?e:{}}function pr(t){const{initial:e,animate:n}=dr(t,P.useContext(re));return P.useMemo(()=>({initial:e,animate:n}),[Vn(e),Vn(n)])}function Vn(t){return Array.isArray(t)?t.join(" "):t}const Mn={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"]},It={};for(const t in Mn)It[t]={isEnabled:e=>Mn[t].some(n=>!!e[n])};function mr(t){for(const e in t)It[e]={...It[e],...t[e]}}const qs=P.createContext({}),Hs=P.createContext({}),gr=Symbol.for("motionComponentSymbol");function yr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&mr(t);function r(a,l){let c;const u={...P.useContext(zs),...a,layoutId:vr(a)},{isStatic:f}=u,h=pr(a),d=s(a,f);if(!f&&ae){h.visualElement=fr(i,d,u,e);const p=P.useContext(Hs),m=P.useContext(Ws).strict;h.visualElement&&(c=h.visualElement.loadFeatures(u,m,t,p))}return R.createElement(re.Provider,{value:h},c&&h.visualElement?R.createElement(c,{visualElement:h.visualElement,...u}):null,n(i,a,hr(d,h.visualElement,l),d,f,h.visualElement))}const o=P.forwardRef(r);return o[gr]=i,o}function vr({layoutId:t}){const e=P.useContext(qs).id;return e&&t!==void 0?e+"-"+t:t}function xr(t){function e(s,i={}){return yr(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const br=["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 Ze(t){return typeof t!="string"||t.includes("-")?!1:!!(br.indexOf(t)>-1||/[A-Z]/.test(t))}const Qt={};function Tr(t){Object.assign(Qt,t)}const Ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pt=new Set(Ft);function Ks(t,{layout:e,layoutId:n}){return pt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Qt[t]||t==="opacity")}const _=t=>!!(t&&t.getVelocity),Pr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wr=Ft.length;function Sr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let r="";for(let o=0;o<wr;o++){const a=Ft[o];if(t[a]!==void 0){const l=Pr[a]||a;r+=`${l}(${t[a]}) `}}return e&&!t.z&&(r+="translateZ(0)"),r=r.trim(),i?r=i(t,s?"":r):n&&s&&(r="none"),r}const Ys=t=>e=>typeof e=="string"&&e.startsWith(t),Xs=Ys("--"),De=Ys("var(--"),Cr=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Ar=(t,e)=>e&&typeof t=="number"?e.transform(t):t,rt=(t,e,n)=>Math.min(Math.max(n,t),e),mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt={...mt,transform:t=>rt(0,1,t)},Gt={...mt,default:1},kt=t=>Math.round(t*1e5)/1e5,ue=/(-)?([\d]*\.?[\d])+/g,Qs=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Vr=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Nt(t){return typeof t=="string"}const _t=t=>({test:e=>Nt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),nt=_t("deg"),H=_t("%"),w=_t("px"),Mr=_t("vh"),Dr=_t("vw"),Dn={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(t*100)},jn={...mt,transform:Math.round},Zs={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,size:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:nt,skewX:nt,skewY:nt,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Rt,originX:Dn,originY:Dn,originZ:w,zIndex:jn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:jn};function Je(t,e,n,s){const{style:i,vars:r,transform:o,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const f in e){const h=e[f];if(Xs(f)){r[f]=h;continue}const d=Zs[f],p=Ar(h,d);if(pt.has(f)){if(l=!0,o[f]=p,!u)continue;h!==(d.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,a[f]=p):i[f]=p}if(e.transform||(l||s?i.transform=Sr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const tn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Js(t,e,n){for(const s in e)!_(e[s])&&!Ks(s,n)&&(t[s]=e[s])}function jr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=tn();return Je(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function Rr(t,e,n){const s=t.style||{},i={};return Js(i,s,t),Object.assign(i,jr(t,e,n)),t.transformValues?t.transformValues(i):i}function kr(t,e,n){const s={},i=Rr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Er=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Er.has(t)}let ti=t=>!Zt(t);function Lr(t){t&&(ti=e=>e.startsWith("on")?!Zt(e):t(e))}try{Lr(require("@emotion/is-prop-valid").default)}catch{}function Br(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ti(i)||n===!0&&Zt(i)||!e&&!Zt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Rn(t,e,n){return typeof t=="string"?t:w.transform(e+n*t)}function Ir(t,e,n){const s=Rn(e,t.x,t.width),i=Rn(n,t.y,t.height);return`${s} ${i}`}const Or={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fr={offset:"strokeDashoffset",array:"strokeDasharray"};function Nr(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Or:Fr;t[r.offset]=w.transform(-s);const o=w.transform(e),a=w.transform(n);t[r.array]=`${o} ${a}`}function en(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,f,h){if(Je(t,c,u,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(i!==void 0||r!==void 0||p.transform)&&(p.transformOrigin=Ir(m,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),o!==void 0&&Nr(d,o,a,l,!1)}const ei=()=>({...tn(),attrs:{}}),nn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function _r(t,e,n,s){const i=P.useMemo(()=>{const r=ei();return en(r,e,{enableHardwareAcceleration:!1},nn(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Js(r,t.style,t),i.style={...r,...i.style}}return i}function Ur(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Ze(n)?_r:kr)(s,r,o,n),u={...Br(s,typeof n=="string",t),...l,ref:i},{children:f}=s,h=P.useMemo(()=>_(f)?f.get():f,[f]);return P.createElement(n,{...u,children:h})}}function ni(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const si=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"]);function ii(t,e,n,s){ni(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(si.has(i)?i:Ye(i),e.attrs[i])}function sn(t,e){const{style:n}=t,s={};for(const i in n)(_(n[i])||e.style&&_(e.style[i])||Ks(i,t))&&(s[i]=n[i]);return s}function oi(t,e){const n=sn(t,e);for(const s in t)if(_(t[s])||_(e[s])){const i=Ft.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function on(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function zr(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Jt=t=>Array.isArray(t),Wr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Gr=t=>Jt(t)?t[t.length-1]||0:t;function Yt(t){const e=_(t)?t.get():t;return Wr(e)?e.toValue():e}function $r({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:qr(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const ri=t=>(e,n)=>{const s=P.useContext(re),i=P.useContext(Ke),r=()=>$r(t,e,s,i);return n?r():zr(r)};function qr(t,e,n,s){const i={},r=s(t,{});for(const h in r)i[h]=Yt(r[h]);let{initial:o,animate:a}=t;const l=ce(t),c=$s(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!le(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=on(t,d);if(!p)return;const{transitionEnd:m,transition:x,...T}=p;for(const y in T){let g=T[y];if(Array.isArray(g)){const b=u?g.length-1:0;g=g[b]}g!==null&&(i[y]=g)}for(const y in m)i[y]=m[y]}),i}const L=t=>t;class kn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Hr(t){let e=new kn,n=new kn,s=0,i=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&i,h=f?e:n;return c&&o.add(l),h.add(l)&&f&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){r=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];u(l),o.has(u)&&(a.schedule(u),t())}i=!1,r&&(r=!1,a.process(l))}};return a}const $t=["prepare","read","update","preRender","render","postRender"],Kr=40;function Yr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=$t.reduce((f,h)=>(f[h]=Hr(()=>n=!0),f),{}),o=f=>r[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(f-i.timestamp,Kr),1),i.timestamp=f,i.isProcessing=!0,$t.forEach(o),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:$t.reduce((f,h)=>{const d=r[h];return f[h]=(p,m=!1,x=!1)=>(n||l(),d.schedule(p,m,x)),f},{}),cancel:f=>$t.forEach(h=>r[h].cancel(f)),state:i,steps:r}}const{schedule:M,cancel:tt,state:O,steps:ge}=Yr(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),Xr={useVisualState:ri({scrapeMotionValuesFromProps:oi,createRenderState:ei,onMount:(t,e,{renderState:n,latestValues:s})=>{M.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),M.render(()=>{en(n,s,{enableHardwareAcceleration:!1},nn(e.tagName),t.transformTemplate),ii(e,n)})}})},Qr={useVisualState:ri({scrapeMotionValuesFromProps:sn,createRenderState:tn})};function Zr(t,{forwardMotionProps:e=!1},n,s){return{...Ze(t)?Xr:Qr,preloadedFeatures:n,useRender:Ur(e),createVisualElement:s,Component:t}}function Q(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const ai=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function fe(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Jr=t=>e=>ai(e)&&t(e,fe(e));function Z(t,e,n,s){return Q(t,e,Jr(n),s)}const ta=(t,e)=>n=>e(t(n)),it=(...t)=>t.reduce(ta);function li(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const En=li("dragHorizontal"),Ln=li("dragVertical");function ci(t){let e=!1;if(t==="y")e=Ln();else if(t==="x")e=En();else{const n=En(),s=Ln();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function ui(){const t=ci(!0);return t?(t(),!1):!0}class lt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Bn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(r,o)=>{if(r.pointerType==="touch"||ui())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&M.update(()=>a[s](r,o))};return Z(t.current,n,i,{passive:!t.getProps()[s]})}class ea extends lt{mount(){this.unmount=it(Bn(this.node,!0),Bn(this.node,!1))}unmount(){}}class na extends lt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=it(Q(this.node.current,"focus",()=>this.onFocus()),Q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const fi=(t,e)=>e?t===e?!0:fi(t,e.parentElement):!1;function ye(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,fe(n))}class sa extends lt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=Z(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps();M.update(()=>{!f&&!fi(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(s.onTap||s.onPointerUp)}),o=Z(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=it(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||ye("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&M.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Q(this.node.current,"keyup",o),ye("down",(a,l)=>{this.startPress(a,l)})},n=Q(this.node.current,"keydown",e),s=()=>{this.isPressing&&ye("cancel",(r,o)=>this.cancelPress(r,o))},i=Q(this.node.current,"blur",s);this.removeAccessibleListeners=it(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&M.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ui()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&M.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=Z(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=Q(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=it(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const je=new WeakMap,ve=new WeakMap,ia=t=>{const e=je.get(t.target);e&&e(t)},oa=t=>{t.forEach(ia)};function ra({root:t,...e}){const n=t||document;ve.has(n)||ve.set(n,{});const s=ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(oa,{root:t,...e})),s[i]}function aa(t,e,n){const s=ra(e);return je.set(t,n),s.observe(t),()=>{je.delete(t),s.unobserve(t)}}const la={some:0,all:1};class ca extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:la[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return aa(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ua(e,n))&&this.startObserver()}unmount(){}}function ua({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const fa={inView:{Feature:ca},tap:{Feature:sa},focus:{Feature:na},hover:{Feature:ea}};function hi(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function ha(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function da(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function he(t,e,n){const s=t.getProps();return on(s,e,n!==void 0?n:s.custom,ha(t),da(t))}let Ut=L,q=L;process.env.NODE_ENV!=="production"&&(Ut=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},q=(t,e)=>{if(!t)throw new Error(e)});const ot=t=>t*1e3,J=t=>t/1e3,pa={current:!1},di=t=>Array.isArray(t)&&typeof t[0]=="number";function pi(t){return!!(!t||typeof t=="string"&&mi[t]||di(t)||Array.isArray(t)&&t.every(pi))}const jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,mi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function gi(t){if(t)return di(t)?jt(t):Array.isArray(t)?t.map(gi):mi[t]}function ma(t,e,n,{delay:s=0,duration:i,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=gi(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function ga(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const yi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ya=1e-7,va=12;function xa(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=yi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>ya&&++a<va);return o}function zt(t,e,n,s){if(t===e&&n===s)return L;const i=r=>xa(r,0,1,t,n);return r=>r===0||r===1?r:yi(i(r),e,s)}const ba=zt(.42,0,1,1),Ta=zt(0,0,.58,1),vi=zt(.42,0,.58,1),Pa=t=>Array.isArray(t)&&typeof t[0]!="number",xi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,bi=t=>e=>1-t(1-e),rn=t=>1-Math.sin(Math.acos(t)),Ti=bi(rn),wa=xi(rn),Pi=zt(.33,1.53,.69,.99),an=bi(Pi),Sa=xi(an),Ca=t=>(t*=2)<1?.5*an(t):.5*(2-Math.pow(2,-10*(t-1))),In={linear:L,easeIn:ba,easeInOut:vi,easeOut:Ta,circIn:rn,circInOut:wa,circOut:Ti,backIn:an,backInOut:Sa,backOut:Pi,anticipate:Ca},On=t=>{if(Array.isArray(t)){q(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return zt(e,n,s,i)}else if(typeof t=="string")return q(In[t]!==void 0,`Invalid easing type '${t}'`),In[t];return t},ln=(t,e)=>n=>!!(Nt(n)&&Vr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),wi=(t,e,n)=>s=>{if(!Nt(s))return s;const[i,r,o,a]=s.match(ue);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Aa=t=>rt(0,255,t),xe={...mt,transform:t=>Math.round(Aa(t))},dt={test:ln("rgb","red"),parse:wi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+xe.transform(t)+", "+xe.transform(e)+", "+xe.transform(n)+", "+kt(Rt.transform(s))+")"};function Va(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Re={test:ln("#"),parse:Va,transform:dt.transform},bt={test:ln("hsl","hue"),parse:wi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+H.transform(kt(e))+", "+H.transform(kt(n))+", "+kt(Rt.transform(s))+")"},N={test:t=>dt.test(t)||Re.test(t)||bt.test(t),parse:t=>dt.test(t)?dt.parse(t):bt.test(t)?bt.parse(t):Re.parse(t),transform:t=>Nt(t)?t:t.hasOwnProperty("red")?dt.transform(t):bt.transform(t)},k=(t,e,n)=>-n*t+n*e+t;function be(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ma({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=be(l,a,t+1/3),r=be(l,a,t),o=be(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}const Te=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Da=[Re,dt,bt],ja=t=>Da.find(e=>e.test(t));function Fn(t){const e=ja(t);q(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===bt&&(n=Ma(n)),n}const Si=(t,e)=>{const n=Fn(t),s=Fn(e),i={...n};return r=>(i.red=Te(n.red,s.red,r),i.green=Te(n.green,s.green,r),i.blue=Te(n.blue,s.blue,r),i.alpha=k(n.alpha,s.alpha,r),dt.transform(i))};function Ra(t){var e,n;return isNaN(t)&&Nt(t)&&(((e=t.match(ue))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Qs))===null||n===void 0?void 0:n.length)||0)>0}const Ci={regex:Cr,countKey:"Vars",token:"${v}",parse:L},Ai={regex:Qs,countKey:"Colors",token:"${c}",parse:N.parse},Vi={regex:ue,countKey:"Numbers",token:"${n}",parse:mt.parse};function Pe(t,{regex:e,countKey:n,token:s,parse:i}){const r=t.tokenised.match(e);r&&(t["num"+n]=r.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...r.map(i)))}function te(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Pe(n,Ci),Pe(n,Ai),Pe(n,Vi),n}function Mi(t){return te(t).values}function Di(t){const{values:e,numColors:n,numVars:s,tokenised:i}=te(t),r=e.length;return o=>{let a=i;for(let l=0;l<r;l++)l<s?a=a.replace(Ci.token,o[l]):l<s+n?a=a.replace(Ai.token,N.transform(o[l])):a=a.replace(Vi.token,kt(o[l]));return a}}const ka=t=>typeof t=="number"?0:t;function Ea(t){const e=Mi(t);return Di(t)(e.map(ka))}const at={test:Ra,parse:Mi,createTransformer:Di,getAnimatableNone:Ea},ji=(t,e)=>n=>`${n>0?e:t}`;function Ri(t,e){return typeof t=="number"?n=>k(t,e,n):N.test(t)?Si(t,e):t.startsWith("var(")?ji(t,e):Ei(t,e)}const ki=(t,e)=>{const n=[...t],s=n.length,i=t.map((r,o)=>Ri(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}},La=(t,e)=>{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ri(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}},Ei=(t,e)=>{const n=at.createTransformer(e),s=te(t),i=te(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?it(ki(s.values,i.values),n):(Ut(!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.`),ji(t,e))},Ot=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Nn=(t,e)=>n=>k(t,e,n);function Ba(t){return typeof t=="number"?Nn:typeof t=="string"?N.test(t)?Si:Ei:Array.isArray(t)?ki:typeof t=="object"?La:Nn}function Ia(t,e,n){const s=[],i=n||Ba(t[0]),r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||L:e;a=it(l,a)}s.push(a)}return s}function Li(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(q(r===e.length,"Both input and output ranges must be the same length"),r===1)return()=>e[0];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Ia(e,s,i),a=o.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=Ot(t[u],t[u+1],c);return o[u](f)};return n?c=>l(rt(t[0],t[r-1],c)):l}function Oa(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ot(0,e,s);t.push(k(n,1,i))}}function Fa(t){const e=[0];return Oa(e,t.length-1),e}function Na(t,e){return t.map(n=>n*e)}function _a(t,e){return t.map(()=>e||vi).splice(0,t.length-1)}function ee({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Pa(s)?s.map(On):On(s),r={done:!1,value:e[0]},o=Na(n&&n.length===e.length?n:Fa(e),t),a=Li(o,e,{ease:Array.isArray(i)?i:_a(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}function Bi(t,e){return e?t*(1e3/e):0}const Ua=5;function Ii(t,e,n){const s=Math.max(e-Ua,0);return Bi(n-t(s),e-s)}const we=.001,za=.01,_n=10,Wa=.05,Ga=1;function $a({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r;Ut(t<=ot(_n),"Spring duration must be 10 seconds or less");let o=1-e;o=rt(Wa,Ga,o),t=rt(za,_n,J(t)),o<1?(i=c=>{const u=c*o,f=u*t,h=u-n,d=ke(c,o),p=Math.exp(-f);return we-h/d*p},r=c=>{const f=c*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=ke(Math.pow(c,2),o);return(-i(c)+we>0?-1:1)*((h-d)*p)/m}):(i=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-we+u*f},r=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=Ha(i,r,a);if(t=ot(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const qa=12;function Ha(t,e,n){let s=n;for(let i=1;i<qa;i++)s=s-t(s)/e(s);return s}function ke(t,e){return t*Math.sqrt(1-e*e)}const Ka=["duration","bounce"],Ya=["stiffness","damping","mass"];function Un(t,e){return e.some(n=>t[n]!==void 0)}function Xa(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Un(t,Ya)&&Un(t,Ka)){const n=$a(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Oi({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=Xa({...s,velocity:-J(s.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=r-i,x=J(Math.sqrt(a/c)),T=Math.abs(m)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let y;if(p<1){const g=ke(x,p);y=b=>{const S=Math.exp(-p*x*b);return r-S*((d+p*x*m)/g*Math.sin(g*b)+m*Math.cos(g*b))}}else if(p===1)y=g=>r-Math.exp(-x*g)*(m+(d+x*m)*g);else{const g=x*Math.sqrt(p*p-1);y=b=>{const S=Math.exp(-p*x*b),V=Math.min(g*b,300);return r-S*((d+p*x*m)*Math.sinh(V)+g*m*Math.cosh(V))/g}}return{calculatedDuration:h&&u||null,next:g=>{const b=y(g);if(h)o.done=g>=u;else{let S=d;g!==0&&(p<1?S=Ii(y,g,b):S=0);const V=Math.abs(S)<=n,D=Math.abs(r-b)<=e;o.done=V&&D}return o.value=o.done?r:b,o}}}function zn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],h={done:!1,value:f},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const x=f+m,T=o===void 0?x:o(x);T!==x&&(m=T-f);const y=A=>-m*Math.exp(-A/s),g=A=>T+y(A),b=A=>{const E=y(A),K=g(A);h.done=Math.abs(E)<=c,h.value=h.done?T:K};let S,V;const D=A=>{d(h.value)&&(S=A,V=Oi({keyframes:[h.value,p(h.value)],velocity:Ii(g,A,h.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:A=>{let E=!1;return!V&&S===void 0&&(E=!0,b(A),D(A)),S!==void 0&&A>S?V.next(A-S):(!E&&b(A),h)}}}const Qa=t=>{const e=({timestamp:n})=>t(n);return{start:()=>M.update(e,!0),stop:()=>tt(e),now:()=>O.isProcessing?O.timestamp:performance.now()}},Wn=2e4;function Gn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Wn;)e+=n,s=t.next(e);return e>=Wn?1/0:e}const Za={decay:zn,inertia:zn,tween:ee,keyframes:ee,spring:Oi};function ne({autoplay:t=!0,delay:e=0,driver:n=Qa,keyframes:s,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:f,...h}){let d=1,p=!1,m,x;const T=()=>{x=new Promise(j=>{m=j})};T();let y;const g=Za[i]||ee;let b;g!==ee&&typeof s[0]!="number"&&(process.env.NODE_ENV!=="production"&&q(s.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),b=Li([0,100],s,{clamp:!1}),s=[0,100]);const S=g({...h,keyframes:s});let V;a==="mirror"&&(V=g({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let D="idle",A=null,E=null,K=null;S.calculatedDuration===null&&r&&(S.calculatedDuration=Gn(S));const{calculatedDuration:gt}=S;let $=1/0,Y=1/0;gt!==null&&($=gt+o,Y=$*(r+1)-o);let F=0;const yt=j=>{if(E===null)return;d>0&&(E=Math.min(E,j)),d<0&&(E=Math.min(j-Y/d,E)),A!==null?F=A:F=Math.round(j-E)*d;const At=F-e*(d>=0?1:-1),vn=d>=0?At<0:At>Y;F=Math.max(At,0),D==="finished"&&A===null&&(F=Y);let xn=F,bn=S;if(r){const de=Math.min(F,Y)/$;let Wt=Math.floor(de),ct=de%1;!ct&&de>=1&&(ct=1),ct===1&&Wt--,Wt=Math.min(Wt,r+1),!!(Wt%2)&&(a==="reverse"?(ct=1-ct,o&&(ct-=o/$)):a==="mirror"&&(bn=V)),xn=rt(0,1,ct)*$}const Vt=vn?{done:!1,value:s[0]}:bn.next(xn);b&&(Vt.value=b(Vt.value));let{done:Tn}=Vt;!vn&&gt!==null&&(Tn=d>=0?F>=Y:F<=0);const fo=A===null&&(D==="finished"||D==="running"&&Tn);return f&&f(Vt.value),fo&&Ct(),Vt},I=()=>{y&&y.stop(),y=void 0},et=()=>{D="idle",I(),m(),T(),E=K=null},Ct=()=>{D="finished",u&&u(),I(),m()},vt=()=>{if(p)return;y||(y=n(yt));const j=y.now();l&&l(),A!==null?E=j-A:(!E||D==="finished")&&(E=j),D==="finished"&&T(),K=E,A=null,D="running",y.start()};t&&vt();const yn={then(j,At){return x.then(j,At)},get time(){return J(F)},set time(j){j=ot(j),F=j,A!==null||!y||d===0?A=j:E=y.now()-j/d},get duration(){const j=S.calculatedDuration===null?Gn(S):S.calculatedDuration;return J(j)},get speed(){return d},set speed(j){j===d||!y||(d=j,yn.time=J(F))},get state(){return D},play:vt,pause:()=>{D="paused",A=F},stop:()=>{p=!0,D!=="idle"&&(D="idle",c&&c(),et())},cancel:()=>{K!==null&&yt(K),et()},complete:()=>{D="finished"},sample:j=>(E=0,yt(j))};return yn}function Ja(t){let e;return()=>(e===void 0&&(e=t()),e)}const tl=Ja(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),el=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),qt=10,nl=2e4,sl=(t,e)=>e.type==="spring"||t==="backgroundColor"||!pi(e.ease);function il(t,e,{onUpdate:n,onComplete:s,...i}){if(!(tl()&&el.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,a,l,c=!1;const u=()=>{l=new Promise(g=>{a=g})};u();let{keyframes:f,duration:h=300,ease:d,times:p}=i;if(sl(e,i)){const g=ne({...i,repeat:0,delay:0});let b={done:!1,value:f[0]};const S=[];let V=0;for(;!b.done&&V<nl;)b=g.sample(V),S.push(b.value),V+=qt;p=void 0,f=S,h=V-qt,d="linear"}const m=ma(t.owner.current,e,f,{...i,duration:h,ease:d,times:p}),x=()=>{c=!1,m.cancel()},T=()=>{c=!0,M.update(x),a(),u()};return m.onfinish=()=>{c||(t.set(ga(f,i)),s&&s(),T())},{then(g,b){return l.then(g,b)},attachTimeline(g){return m.timeline=g,m.onfinish=null,L},get time(){return J(m.currentTime||0)},set time(g){m.currentTime=ot(g)},get speed(){return m.playbackRate},set speed(g){m.playbackRate=g},get duration(){return J(h)},play:()=>{o||(m.play(),tt(x))},pause:()=>m.pause(),stop:()=>{if(o=!0,m.playState==="idle")return;const{currentTime:g}=m;if(g){const b=ne({...i,autoplay:!1});t.setWithVelocity(b.sample(g-qt).value,b.sample(g).value,qt)}T()},complete:()=>{c||m.finish()},cancel:T}}function ol({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:L,pause:L,stop:L,then:r=>(r(),Promise.resolve()),cancel:L,complete:L});return e?ne({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const rl={type:"spring",stiffness:500,damping:25,restSpeed:10},al=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ll={type:"keyframes",duration:.8},cl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ul=(t,{keyframes:e})=>e.length>2?ll:pt.has(t)?t.startsWith("scale")?al(e[1]):rl:cl,Ee=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(at.test(e)||e==="0")&&!e.startsWith("url(")),fl=new Set(["brightness","contrast","saturate","opacity"]);function hl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ue)||[];if(!s)return t;const i=n.replace(s,"");let r=fl.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const dl=/([a-z-]*)\(.*?\)/g,Le={...at,getAnimatableNone:t=>{const e=t.match(dl);return e?e.map(hl).join(" "):t}},pl={...Zs,color:N,backgroundColor:N,outlineColor:N,fill:N,stroke:N,borderColor:N,borderTopColor:N,borderRightColor:N,borderBottomColor:N,borderLeftColor:N,filter:Le,WebkitFilter:Le},cn=t=>pl[t];function Fi(t,e){let n=cn(t);return n!==Le&&(n=at),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ni=t=>/^0[^.\s]+$/.test(t);function ml(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Ni(t)}function gl(t,e,n,s){const i=Ee(e,n);let r;Array.isArray(n)?r=[...n]:r=[null,n];const o=s.from!==void 0?s.from:t.get();let a;const l=[];for(let c=0;c<r.length;c++)r[c]===null&&(r[c]=c===0?o:r[c-1]),ml(r[c])&&l.push(c),typeof r[c]=="string"&&r[c]!=="none"&&r[c]!=="0"&&(a=r[c]);if(i&&l.length&&a)for(let c=0;c<l.length;c++){const u=l[c];r[u]=Fi(e,a)}return r}function yl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function un(t,e){return t[e]||t.default||t}const vl={skipAnimations:!1},fn=(t,e,n,s={})=>i=>{const r=un(s,t)||{},o=r.delay||s.delay||0;let{elapsed:a=0}=s;a=a-ot(o);const l=gl(e,t,n,r),c=l[0],u=l[l.length-1],f=Ee(t,c),h=Ee(t,u);Ut(f===h,`You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let d={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...r,delay:-a,onUpdate:p=>{e.set(p),r.onUpdate&&r.onUpdate(p)},onComplete:()=>{i(),r.onComplete&&r.onComplete()}};if(yl(r)||(d={...d,...ul(t,d)}),d.duration&&(d.duration=ot(d.duration)),d.repeatDelay&&(d.repeatDelay=ot(d.repeatDelay)),!f||!h||pa.current||r.type===!1||vl.skipAnimations)return ol(d);if(!s.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=il(e,t,d);if(p)return p}return ne(d)};function se(t){return!!(_(t)&&t.add)}const _i=t=>/^\-?\d*\.?\d+$/.test(t);function hn(t,e){t.indexOf(e)===-1&&t.push(e)}function dn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class pn{constructor(){this.subscriptions=[]}add(e){return hn(this.subscriptions,e),()=>dn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $n=new Set;function mn(t,e,n){t||$n.has(e)||(console.warn(e),n&&console.warn(n),$n.add(e))}const xl=t=>!isNaN(parseFloat(t));class bl{constructor(e,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:r,timestamp:o}=O;this.lastUpdated!==o&&(this.timeDelta=r,this.lastUpdated=o,M.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>M.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=xl(this.current),this.owner=n.owner}onChange(e){return process.env.NODE_ENV!=="production"&&mn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new pn);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Bi(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wt(t,e){return new bl(t,e)}const Ui=t=>e=>e.test(t),Tl={test:t=>t==="auto",parse:t=>t},zi=[mt,w,H,nt,Dr,Mr,Tl],Mt=t=>zi.find(Ui(t)),Pl=[...zi,N,at],wl=t=>Pl.find(Ui(t));function Sl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function Cl(t,e){const n=he(t,e);let{transitionEnd:s={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...s};for(const o in r){const a=Gr(r[o]);Sl(t,o,a)}}function Al(t,e,n){var s,i;const r=Object.keys(e).filter(a=>!t.hasValue(a)),o=r.length;if(o)for(let a=0;a<o;a++){const l=r[a],c=e[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(s=n[l])!==null&&s!==void 0?s:t.readValue(l))!==null&&i!==void 0?i:e[l]),u!=null&&(typeof u=="string"&&(_i(u)||Ni(u))?u=parseFloat(u):!wl(u)&&at.test(c)&&(u=Fi(l,c)),t.addValue(l,wt(u,{owner:t})),n[l]===void 0&&(n[l]=u),u!==null&&t.setBaseTarget(l,u))}}function Vl(t,e){return e?(e[t]||e.default||e).from:void 0}function Ml(t,e,n){const s={};for(const i in t){const r=Vl(i,e);if(r!==void 0)s[i]=r;else{const o=n.getValue(i);o&&(s[i]=o.get())}}return s}function Dl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function jl(t,e){const n=t.get();if(Array.isArray(e)){for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}else return n!==e}function Wi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(r=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const h=t.getValue(f),d=a[f];if(!h||d===void 0||u&&Dl(u,f))continue;const p={delay:n,elapsed:0,...un(r||{},f)};if(window.HandoffAppearAnimations){const T=t.getProps()[Gs];if(T){const y=window.HandoffAppearAnimations(T,f,h,M);y!==null&&(p.elapsed=y,p.isHandoff=!0)}}let m=!p.isHandoff&&!jl(h,d);if(p.type==="spring"&&(h.getVelocity()||p.velocity)&&(m=!1),h.animation&&(m=!1),m)continue;h.start(fn(f,h,d,t.shouldReduceMotion&&pt.has(f)?{type:!1}:p));const x=h.animation;se(l)&&(l.add(f),x.then(()=>l.remove(f))),c.push(x)}return o&&Promise.all(c).then(()=>{o&&Cl(t,o)}),c}function Be(t,e,n={}){const s=he(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Wi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=i;return Rl(t,e,c+l,u,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Rl(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(kl).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(Be(c,e,{...r,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function kl(t,e){return t.sortNodePosition(e)}function El(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Be(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Be(t,e,n);else{const i=typeof e=="function"?he(t,e,n.custom):e;s=Promise.all(Wi(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const Ll=[...Xe].reverse(),Bl=Xe.length;function Il(t){return e=>Promise.all(e.map(({animation:n,options:s})=>El(t,n,s)))}function Ol(t){let e=Il(t);const n=Nl();let s=!0;const i=(l,c)=>{const u=he(t,c);if(u){const{transition:f,transitionEnd:h,...d}=u;l={...l,...d,...h}}return l};function r(l){e=l(t)}function o(l,c){const u=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},m=1/0;for(let T=0;T<Bl;T++){const y=Ll[T],g=n[y],b=u[y]!==void 0?u[y]:f[y],S=Bt(b),V=y===c?g.isActive:null;V===!1&&(m=T);let D=b===f[y]&&b!==u[y]&&S;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),g.protectedKeys={...p},!g.isActive&&V===null||!b&&!g.prevProp||le(b)||typeof b=="boolean")continue;let E=Fl(g.prevProp,b)||y===c&&g.isActive&&!D&&S||T>m&&S,K=!1;const gt=Array.isArray(b)?b:[b];let $=gt.reduce(i,{});V===!1&&($={});const{prevResolvedValues:Y={}}=g,F={...Y,...$},yt=I=>{E=!0,d.has(I)&&(K=!0,d.delete(I)),g.needsAnimating[I]=!0};for(const I in F){const et=$[I],Ct=Y[I];if(p.hasOwnProperty(I))continue;let vt=!1;Jt(et)&&Jt(Ct)?vt=!hi(et,Ct):vt=et!==Ct,vt?et!==void 0?yt(I):d.add(I):et!==void 0&&d.has(I)?yt(I):g.protectedKeys[I]=!0}g.prevProp=b,g.prevResolvedValues=$,g.isActive&&(p={...p,...$}),s&&t.blockInitialAnimation&&(E=!1),E&&(!D||K)&&h.push(...gt.map(I=>({animation:I,options:{type:y,...l}})))}if(d.size){const T={};d.forEach(y=>{const g=t.getBaseTarget(y);g!==void 0&&(T[y]=g)}),h.push({animation:T})}let x=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(h):Promise.resolve()}function a(l,c,u){var f;if(n[l].isActive===c)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const h=o(u,l);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n}}function Fl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!hi(e,t):!1}function ut(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nl(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whileTap:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}class _l extends lt{constructor(e){super(e),e.animationState||(e.animationState=Ol(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),le(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Ul=0;class zl extends lt{constructor(){super(...arguments),this.id=Ul++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Wl={animation:{Feature:_l},exit:{Feature:zl}},qn=(t,e)=>Math.abs(t-e);function Gl(t,e){const n=qn(t.x,e.x),s=qn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Gi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!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 f=Ce(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=Gl(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=O;this.history.push({...p,timestamp:m});const{onStart:x,onMove:T}=this.handlers;h||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Se(h,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ce(f.type==="pointercancel"?this.lastMoveEventInfo:Se(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,x),p&&p(f,x)},!ai(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=fe(e),a=Se(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=O;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Ce(a,this.history)),this.removeListeners=it(Z(this.contextWindow,"pointermove",this.handlePointerMove),Z(this.contextWindow,"pointerup",this.handlePointerUp),Z(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),tt(this.updatePoint)}}function Se(t,e){return e?{point:e(t.point)}:t}function Hn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ce({point:t},e){return{point:t,delta:Hn(t,$i(e)),offset:Hn(t,$l(e)),velocity:ql(e,.1)}}function $l(t){return t[0]}function $i(t){return t[t.length-1]}function ql(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=$i(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>ot(e)));)n--;if(!s)return{x:0,y:0};const r=J(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function z(t){return t.max-t.min}function Ie(t,e=0,n=.01){return Math.abs(t-e)<=n}function Kn(t,e,n,s=.5){t.origin=s,t.originPoint=k(e.min,e.max,t.origin),t.scale=z(n)/z(e),(Ie(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=k(n.min,n.max,t.origin)-t.originPoint,(Ie(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Et(t,e,n,s){Kn(t.x,e.x,n.x,s?s.originX:void 0),Kn(t.y,e.y,n.y,s?s.originY:void 0)}function Yn(t,e,n){t.min=n.min+e.min,t.max=t.min+z(e)}function Hl(t,e,n){Yn(t.x,e.x,n.x),Yn(t.y,e.y,n.y)}function Xn(t,e,n){t.min=e.min-n.min,t.max=t.min+z(e)}function Lt(t,e,n){Xn(t.x,e.x,n.x),Xn(t.y,e.y,n.y)}function Kl(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?k(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?k(n,t,s.max):Math.min(t,n)),t}function Qn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Yl(t,{top:e,left:n,bottom:s,right:i}){return{x:Qn(t.x,n,i),y:Qn(t.y,e,s)}}function Zn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Xl(t,e){return{x:Zn(t.x,e.x),y:Zn(t.y,e.y)}}function Ql(t,e){let n=.5;const s=z(t),i=z(e);return i>s?n=Ot(e.min,e.max-s,t.min):s>i&&(n=Ot(t.min,t.max-i,e.min)),rt(0,1,n)}function Zl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Oe=.35;function Jl(t=Oe){return t===!1?t=0:t===!0&&(t=Oe),{x:Jn(t,"left","right"),y:Jn(t,"top","bottom")}}function Jn(t,e,n){return{min:ts(t,e),max:ts(t,n)}}function ts(t,e){return typeof t=="number"?t:t[e]||0}const es=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tt=()=>({x:es(),y:es()}),ns=()=>({min:0,max:0}),B=()=>({x:ns(),y:ns()});function G(t){return[t("x"),t("y")]}function qi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function tc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ec(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ae(t){return t===void 0||t===1}function Fe({scale:t,scaleX:e,scaleY:n}){return!Ae(t)||!Ae(e)||!Ae(n)}function ft(t){return Fe(t)||Hi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Hi(t){return ss(t.x)||ss(t.y)}function ss(t){return t&&t!=="0%"}function ie(t,e,n){const s=t-n,i=e*s;return n+i}function is(t,e,n,s,i){return i!==void 0&&(t=ie(t,i,s)),ie(t,n,s)+e}function Ne(t,e=0,n=1,s,i){t.min=is(t.min,e,n,s,i),t.max=is(t.max,e,n,s,i)}function Ki(t,{x:e,y:n}){Ne(t.x,e.translate,e.scale,e.originPoint),Ne(t.y,n.translate,n.scale,n.originPoint)}function nc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const l=r.instance;l&&l.style&&l.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Pt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ki(t,o)),s&&ft(r.latestValues)&&Pt(t,r.latestValues))}e.x=os(e.x),e.y=os(e.y)}function os(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function st(t,e){t.min=t.min+e,t.max=t.max+e}function rs(t,e,[n,s,i]){const r=e[i]!==void 0?e[i]:.5,o=k(t.min,t.max,r);Ne(t,e[n],e[s],o,e.scale)}const sc=["x","scaleX","originX"],ic=["y","scaleY","originY"];function Pt(t,e){rs(t.x,e,sc),rs(t.y,e,ic)}function Yi(t,e){return qi(ec(t.getBoundingClientRect(),e))}function oc(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(st(s.x,i.offset.x),st(s.y,i.offset.y)),s}const Xi=({current:t})=>t?t.ownerDocument.defaultView:null,rc=new WeakMap;class ac{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=B(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fe(u,"page").point)},r=(u,f)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ci(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(x=>{let T=this.getAxisMotionValue(x).get()||0;if(H.test(T)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[x];g&&(T=z(g)*(parseFloat(T)/100))}}this.originPoint[x]=T}),p&&M.update(()=>p(u,f),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:x}=f;if(d&&this.currentDirection===null){this.currentDirection=lc(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>G(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Gi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Xi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&M.update(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ht(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Kl(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&&xt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Yl(i.layoutBox,n):this.constraints=!1,this.elastic=Jl(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&G(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Zl(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!xt(e))return!1;const s=e.current;q(s!==null,"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 r=oc(s,i.root,this.visualElement.getTransformPagePoint());let o=Xl(i.layout.layoutBox,r);if(n){const a=n(tc(o));this.hasMutatedConstraints=!!a,a&&(o=qi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=G(u=>{if(!Ht(u,n,this.currentDirection))return;let f=l&&l[u]||{};o&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(fn(e,s,0,n))}stopAnimation(){G(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){G(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){G(n=>{const{drag:s}=this.getProps();if(!Ht(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-k(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!xt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};G(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=Ql({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),G(o=>{if(!Ht(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(k(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;rc.set(this.visualElement,this);const e=this.visualElement.current,n=Z(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();xt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const o=Q(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(G(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Oe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Ht(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function lc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class cc extends lt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new ac(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const as=t=>(e,n)=>{t&&M.update(()=>t(e,n))};class uc extends lt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new Gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:as(e),onStart:as(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&M.update(()=>i(r,o))}}}mount(){this.removePointerDownListener=Z(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function fc(){const t=P.useContext(Ke);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Xt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ls(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Dt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=ls(t,e.target.x),s=ls(t,e.target.y);return`${n}% ${s}%`}},hc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=at.parse(t);if(i.length>5)return s;const r=at.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=k(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}};class dc extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Tr(pc),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Xt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Qi(t){const[e,n]=fc(),s=P.useContext(qs);return P.createElement(dc,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(Hs),isPresent:e,safeToRemove:n})}const pc={borderRadius:{...Dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomLeftRadius:Dt,borderBottomRightRadius:Dt,boxShadow:hc},Zi=["TopLeft","TopRight","BottomLeft","BottomRight"],mc=Zi.length,cs=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||w.test(t);function gc(t,e,n,s,i,r){i?(t.opacity=k(0,n.opacity!==void 0?n.opacity:1,yc(s)),t.opacityExit=k(e.opacity!==void 0?e.opacity:1,0,vc(s))):r&&(t.opacity=k(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<mc;o++){const a=`border${Zi[o]}Radius`;let l=fs(e,a),c=fs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||us(l)===us(c)?(t[a]=Math.max(k(cs(l),cs(c),s),0),(H.test(c)||H.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=k(e.rotate||0,n.rotate||0,s))}function fs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const yc=Ji(0,.5,Ti),vc=Ji(.5,.95,L);function Ji(t,e,n){return s=>s<t?0:s>e?1:n(Ot(t,e,s))}function hs(t,e){t.min=e.min,t.max=e.max}function W(t,e){hs(t.x,e.x),hs(t.y,e.y)}function ds(t,e,n,s,i){return t-=e,t=ie(t,1/n,s),i!==void 0&&(t=ie(t,1/i,s)),t}function xc(t,e=0,n=1,s=.5,i,r=t,o=t){if(H.test(e)&&(e=parseFloat(e),e=k(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=k(r.min,r.max,s);t===r&&(a-=e),t.min=ds(t.min,e,n,a,i),t.max=ds(t.max,e,n,a,i)}function ps(t,e,[n,s,i],r,o){xc(t,e[n],e[s],e[i],e.scale,r,o)}const bc=["x","scaleX","originX"],Tc=["y","scaleY","originY"];function ms(t,e,n,s){ps(t.x,e,bc,n?n.x:void 0,s?s.x:void 0),ps(t.y,e,Tc,n?n.y:void 0,s?s.y:void 0)}function gs(t){return t.translate===0&&t.scale===1}function to(t){return gs(t.x)&&gs(t.y)}function Pc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function eo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ys(t){return z(t.x)/z(t.y)}class wc{constructor(){this.members=[]}add(e){hn(this.members,e),e.scheduleRender()}remove(e){if(dn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vs(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y;if((i||r)&&(s=`translate3d(${i}px, ${r}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(s+=`rotate(${l}deg) `),c&&(s+=`rotateX(${c}deg) `),u&&(s+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(s+=`scale(${o}, ${a})`),s||"none"}const Sc=(t,e)=>t.depth-e.depth;class Cc{constructor(){this.children=[],this.isDirty=!1}add(e){hn(this.children,e),this.isDirty=!0}remove(e){dn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sc),this.isDirty=!1,this.children.forEach(e)}}function Ac(t,e){const n=performance.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(tt(s),t(r-e))};return M.read(s,!0),()=>tt(s)}function Vc(t){window.MotionDebug&&window.MotionDebug.record(t)}function Mc(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Dc(t,e,n){const s=_(t)?t:wt(t);return s.start(fn("",s,e,n)),s.animation}const xs=["","X","Y","Z"],jc={visibility:"hidden"},bs=1e3;let Rc=0;const ht={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function no({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Rc++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ht.totalNodes=ht.resolvedTargetDeltas=ht.recalculatedProjection=0,this.nodes.forEach(Lc),this.nodes.forEach(Nc),this.nodes.forEach(_c),this.nodes.forEach(Bc),Vc(ht)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new pn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mc(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ac(h,250),Xt.hasAnimatedSinceResize&&(Xt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||$c,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=u.getProps(),y=!this.targetLayout||!eo(this.targetLayout,p)||d,g=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const b={...un(m,"layout"),onPlay:x,onComplete:T};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tt(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(Uc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ts);return}this.isUpdating||this.nodes.forEach(Oc),this.isUpdating=!1,this.nodes.forEach(Fc),this.nodes.forEach(kc),this.nodes.forEach(Ec),this.clearAllSnapshots();const a=performance.now();O.delta=rt(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,ge.update.process(O),ge.preRender.process(O),ge.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Ic),this.sharedNodes.forEach(zc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=B(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!to(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||ft(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),qc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return B();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(st(a.x,l.offset.x),st(a.y,l.offset.y)),a}removeElementScroll(o){const a=B();W(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){W(a,o);const{scroll:h}=this.root;h&&(st(a.x,-h.offset.x),st(a.y,-h.offset.y))}st(a.x,u.offset.x),st(a.y,u.offset.y)}}return a}applyTransform(o,a=!1){const l=B();W(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Pt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ft(u.latestValues)&&Pt(l,u.latestValues)}return ft(this.latestValues)&&Pt(l,this.latestValues),l}removeTransform(o){const a=B();W(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ft(c.latestValues))continue;Fe(c.latestValues)&&c.updateSnapshot();const u=B(),f=c.measurePageBox();W(u,f),ms(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ft(this.latestValues)&&ms(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=O.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),Lt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),W(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=B(),this.targetWithTransforms=B()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Hl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):W(this.target,this.layout.layoutBox),Ki(this.target,this.targetDelta)):W(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=B(),this.relativeTargetOrigin=B(),Lt(this.relativeTargetOrigin,this.target,d.target),W(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ht.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Fe(this.parent.latestValues)||Hi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===O.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;W(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;nc(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Tt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Tt(),this.projectionDeltaWithTransform=Tt());const m=this.projectionTransform;Et(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=vs(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==h||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ht.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Tt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=B(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,x=this.getStack(),T=!x||x.members.length<=1,y=!!(m&&!T&&this.options.crossfade===!0&&!this.path.some(Gc));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const S=b/1e3;ws(f.x,o.x,S),ws(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wc(this.relativeTarget,this.relativeTargetOrigin,h,S),g&&Pc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=B()),W(g,this.relativeTarget)),m&&(this.animationValues=u,gc(u,c,this.latestValues,S,y,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Xt.hasAnimatedSinceResize=!0,this.currentAnimation=Dc(0,bs,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&so(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||B();const f=z(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=z(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}W(a,l),Pt(a,u),Et(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new wc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let u=0;u<xs.length;u++){const f="rotate"+xs[u];l[f]&&(c[f]=l[f],o.setStaticValue(f,0))}o.render();for(const u in c)o.setStaticValue(u,c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Yt(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Yt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ft(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=vs(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Qt){if(h[m]===void 0)continue;const{correct:x,applyTo:T}=Qt[m],y=c.transform==="none"?h[m]:x(h[m],f);if(T){const g=T.length;for(let b=0;b<g;b++)c[T[b]]=y}else c[m]=y}return this.options.layoutId&&(c.pointerEvents=f===this?Yt(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function kc(t){t.updateLayout()}function Ec(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?G(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=z(h);h.min=s[f].min,h.max=h.min+d}):so(r,n.layoutBox,s)&&G(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],d=z(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=Tt();Et(a,s,n.layoutBox);const l=Tt();o?Et(l,t.applyTransform(i,!0),n.measuredBox):Et(l,s,n.layoutBox);const c=!to(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=B();Lt(p,n.layoutBox,h.layoutBox);const m=B();Lt(m,s,d.layoutBox),eo(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Lc(t){ht.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Bc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ic(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function Oc(t){t.isLayoutDirty=!1}function Fc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Nc(t){t.resolveTargetDelta()}function _c(t){t.calcProjection()}function Uc(t){t.resetRotation()}function zc(t){t.removeLeadSnapshot()}function ws(t,e,n){t.translate=k(e.translate,0,n),t.scale=k(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ss(t,e,n,s){t.min=k(e.min,n.min,s),t.max=k(e.max,n.max,s)}function Wc(t,e,n,s){Ss(t.x,e.x,n.x,s),Ss(t.y,e.y,n.y,s)}function Gc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $c={duration:.45,ease:[.4,0,.1,1]},Cs=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),As=Cs("applewebkit/")&&!Cs("chrome/")?Math.round:L;function Vs(t){t.min=As(t.min),t.max=As(t.max)}function qc(t){Vs(t.x),Vs(t.y)}function so(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ie(ys(e),ys(n),.2)}const Hc=no({attachResizeListener:(t,e)=>Q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ve={current:void 0},io=no({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ve.current){const t=new Hc({});t.mount(window),t.setOptions({layoutScroll:!0}),Ve.current=t}return Ve.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Kc={pan:{Feature:uc},drag:{Feature:cc,ProjectionNode:io,MeasureLayout:Qi}},Yc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xc(t){const e=Yc.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}const Qc=4;function _e(t,e,n=1){q(n<=Qc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=Xc(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return _i(o)?parseFloat(o):o}else return De(i)?_e(i,e,n+1):i}function Zc(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const r=i.get();if(!De(r))return;const o=_e(r,s);o&&i.set(o)});for(const i in e){const r=e[i];if(!De(r))continue;const o=_e(r,s);o&&(e[i]=o,n||(n={}),n[i]===void 0&&(n[i]=r))}return{target:e,transitionEnd:n}}const Jc=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),oo=t=>Jc.has(t),tu=t=>Object.keys(t).some(oo),Kt=t=>t===mt||t===w,Ms=(t,e)=>parseFloat(t.split(", ")[e]),Ds=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return Ms(i[1],e);{const r=s.match(/^matrix\((.+)\)$/);return r?Ms(r[1],t):0}},eu=new Set(["x","y","z"]),nu=Ft.filter(t=>!eu.has(t));function su(t){const e=[];return nu.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const St={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:Ds(4,13),y:Ds(5,14)};St.translateX=St.x;St.translateY=St.y;const iu=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,r=getComputedStyle(i),{display:o}=r,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(c=>{a[c]=St[c](s,r)}),e.render();const l=e.measureViewportBox();return n.forEach(c=>{const u=e.getValue(c);u&&u.jump(a[c]),t[c]=St[c](l,r)}),t},ou=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(oo);let r=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let u=n[l],f=Mt(u);const h=e[l];let d;if(Jt(h)){const p=h.length,m=h[0]===null?1:0;u=h[m],f=Mt(u);for(let x=m;x<p&&h[x]!==null;x++)d?q(Mt(h[x])===d,"All keyframes must be of the same type"):(d=Mt(h[x]),q(d===f||Kt(f)&&Kt(d),"Keyframes must be of the same dimension as the current value"))}else d=Mt(h);if(f!==d)if(Kt(f)&&Kt(d)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof h=="string"?e[l]=parseFloat(h):Array.isArray(h)&&d===w&&(e[l]=h.map(parseFloat))}else f!=null&&f.transform&&(d!=null&&d.transform)&&(u===0||h===0)?u===0?c.set(d.transform(u)):e[l]=f.transform(h):(o||(r=su(t),o=!0),a.push(l),s[l]=s[l]!==void 0?s[l]:e[l],c.jump(h))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=iu(e,t,a);return r.length&&r.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),ae&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:s}}else return{target:e,transitionEnd:s}};function ru(t,e,n,s){return tu(e)?ou(t,e,n,s):{target:e,transitionEnd:s}}const au=(t,e,n,s)=>{const i=Zc(t,e,s);return e=i.target,s=i.transitionEnd,ru(t,e,n,s)},Ue={current:null},ro={current:!1};function lu(){if(ro.current=!0,!!ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ue.current=t.matches;t.addListener(e),e()}else Ue.current=!1}function cu(t,e,n){const{willChange:s}=e;for(const i in e){const r=e[i],o=n[i];if(_(r))t.addValue(i,r),se(s)&&s.add(i),process.env.NODE_ENV==="development"&&mn(r.version==="10.18.0",`Attempting to mix Framer Motion versions ${r.version} with 10.18.0 may not work as expected.`);else if(_(o))t.addValue(i,wt(r,{owner:t})),se(s)&&s.remove(i);else if(o!==r)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,wt(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const js=new WeakMap,ao=Object.keys(It),uu=ao.length,Rs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fu=Qe.length;class hu{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>M.render(this.render,!1,!0);const{latestValues:a,renderState:l}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=ce(n),this.isVariantNode=$s(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const f in u){const h=u[f];a[f]!==void 0&&_(h)&&(h.set(a[f],!1),se(c)&&c.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,js.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),ro.current||lu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ue.current,process.env.NODE_ENV!=="production"&&mn(this.shouldReduceMotion!==!0,"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(){js.delete(this.current),this.projection&&this.projection.unmount(),tt(this.notifyUpdate),tt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=pt.has(e),i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,r){let o,a;if(process.env.NODE_ENV!=="production"&&i&&s){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Ut(!1,l):q(!1,l)}for(let l=0;l<uu;l++){const c=ao[l],{isEnabled:u,Feature:f,ProjectionNode:h,MeasureLayout:d}=It[c];h&&(o=h),u(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:f,layoutScroll:h,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||f&&xt(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:r,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Rs.length;s++){const i=Rs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=cu(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<fu;s++){const i=Qe[s],r=this.props[i];(Bt(r)||r===!1)&&(n[i]=r)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=on(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!_(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new pn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class lo extends hu{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},r){let o=Ml(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),o&&(o=i(o))),r){Al(this,s,o);const a=au(this,s,o,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function du(t){return window.getComputedStyle(t)}class pu extends lo{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(pt.has(n)){const s=cn(n);return s&&s.default||0}else{const s=du(e),i=(Xs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yi(e,n)}build(e,n,s,i){Je(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return sn(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){ni(e,n,s,i)}}class mu extends lo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(pt.has(n)){const s=cn(n);return s&&s.default||0}return n=si.has(n)?n:Ye(n),e.getAttribute(n)}measureInstanceViewportBox(){return B()}scrapeMotionValuesFromProps(e,n){return oi(e,n)}build(e,n,s,i){en(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){ii(e,n,s,i)}mount(e){this.isSVGTag=nn(e.tagName),super.mount(e)}}const gu=(t,e)=>Ze(t)?new mu(e,{enableHardwareAcceleration:!1}):new pu(e,{enableHardwareAcceleration:!0}),yu={layout:{ProjectionNode:io,MeasureLayout:Qi}},vu={...Wl,...fa,...Kc,...yu},gn=xr((t,e)=>Zr(t,e,vu,gu));function ks(t){for(;t.startsWith("/");)t=t.slice(1);return t}function co(t,e,n=[]){for(const s of t){if(console.log(s.path,e,s.path===e),ks(s.path||"")===ks(e))return[...n,s];if(s.children){const i=co(s.children,e,[...n,s]);if(i)return i}}return null}function xu(t){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:v.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}function bu(t){return v.jsx(Tu,{...t})}function Tu(t){const{baseUrl:e,menuPath:n}=t;console.log("baseUrl:",e);const s=Es.useLocation();console.log("location:",s);const[i,r]=P.useState([]),[o,a]=P.useState(!1),l=(co(i,s.pathname)||[]).filter(y=>y.parentKey!==0),[c,u]=P.useState({}),f=y=>{u({...c,[y]:!c[y]})};console.log("matchPaths:",l);const h=()=>{a(!o)};P.useEffect(()=>{(async()=>{const g=e+(n||"/global-menu-config/api/v1/menu-items/user"),b=await po.get(g,{withCredentials:!0}).then(V=>V.data),S={};b.forEach(V=>{V.children&&(S[V.id]=!0)}),u(S),r(b.map(V=>({...V,parentKey:0})))})()},[e,n]);const[d,p]=P.useState(!1),m=()=>{window.location.href=`${e}/authentication/logout?callbackUrl=${window.location.href}`},x=o?"collapsed":"expanded",T=y=>`${y} ${x}`;return v.jsxs(gn.nav,{initial:{width:"18rem"},animate:{width:o?"5rem":"18rem"},transition:{duration:.3},className:T("side-bar"),children:[v.jsx("div",{className:"h-[8px]"}),v.jsx("div",{className:T("side-bar__toggle-btn"),children:v.jsx("button",{className:"icon-btn",onClick:h,children:o?v.jsx(Us,{}):v.jsx(_s,{})})}),v.jsx("div",{id:"menu-items",className:T("mt-6 overflow-y-auto overflow-x-hidden flex-1"),children:i.map(y=>{const g=b=>l.some(S=>S.id===b);return v.jsx(uo,{item:y,isActive:g,isCollapsed:o,expanded:b=>c[b],toggleExpand:f},y.id)})}),v.jsxs("div",{className:"w-full mt-10 mb-10",children:[v.jsxs("button",{className:T("side-bar__logout-btn"),onClick:()=>p(!0),children:[v.jsx(xu,{}),v.jsx("span",{className:`ml-3 ${o?"hidden":""}`,children:"Logout"})]}),v.jsx(Ls,{isOpen:d,onClose:()=>p(!1),onConfirm:m})]})]})}function uo({item:t,level:e=0,...n}){var x;const{isActive:s,isCollapsed:i,expanded:r,toggleExpand:o}=n,a=`level-${e}`,l=i?"collapsed":"expanded",c=s(t.id)?"active":"",u=(T,y=a)=>`${T} ${y} ${l} ${c}`,f=!!((x=t.children)!=null&&x.length),[h,d]=P.useState(!1),p=P.useRef();function m(T){var S;const{level:y,hovered:g,parentRef:b}=T;return!f||i&&y>=2&&!g?null:v.jsx(Pu,{parentRef:b,onlyChild:!i||i&&y<2,children:v.jsx(gn.div,{className:u("menu-item__dropdown",`level-${y}`),initial:{height:i?"auto":0},animate:{height:i||r(t.id)?"auto":0},transition:{duration:.2},children:(S=t.children)==null?void 0:S.map(V=>P.createElement(uo,{...n,key:V.id,item:V,level:y}))},+i)})}return v.jsxs("div",{ref:p,className:u("menu-item__wrapper"),onMouseEnter:()=>i&&d(!0),onMouseLeave:()=>i&&d(!1),children:[v.jsxs(Es.Link,{to:f?"#":t.path||"#",style:{paddingLeft:`${i?"0.5rem":`${e*1}rem`}`},className:u("menu-item__link"),onClick:()=>{f&&!i&&o(t.id)},children:[e!==0&&v.jsx("div",{className:u("menu-item__icon"),children:v.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24}})}),v.jsx("span",{className:u("menu-item__label"),children:t.name}),f&&v.jsx("div",{className:u("menu-item__icon-arrow__wrapper"),children:v.jsx(Ns,{className:u(`menu-item__icon-arrow__icon ${r(t.id)?"open":"close"}`),fontSize:"small"})})]}),m({level:e+1,hovered:h,parentRef:p})]},t.id)}function Pu(t){const{children:e,parentRef:n,onlyChild:s}=t,[i,r]=P.useState({top:0,left:0});return P.useLayoutEffect(()=>{if(n.current){const o=n.current.getBoundingClientRect();r({top:o.top,left:o.left+o.width})}},[n]),s?e:ho.createPortal(v.jsx(gn.div,{style:{position:"fixed",top:i.top,left:i.left},children:e}),document.body)}exports.GlobalMenu=bu;exports.TopBar=Co;