From b2bb38bb5580712d8f0a80e8ce26e4a9a64b7539 Mon Sep 17 00:00:00 2001 From: ucfx <65844371+ucfx@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:21:13 +0100 Subject: [PATCH] Updates --- assets/index-B3KpdI7e.css | 1 + assets/index-Dlg-2Z8J.js | 48 --------------------------------------- assets/index-P9Si_Nv0.js | 48 +++++++++++++++++++++++++++++++++++++++ assets/index-dzSu2VQM.css | 1 - index.html | 6 ++--- 5 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 assets/index-B3KpdI7e.css delete mode 100644 assets/index-Dlg-2Z8J.js create mode 100644 assets/index-P9Si_Nv0.js delete mode 100644 assets/index-dzSu2VQM.css diff --git a/assets/index-B3KpdI7e.css b/assets/index-B3KpdI7e.css new file mode 100644 index 0000000..0cd611f --- /dev/null +++ b/assets/index-B3KpdI7e.css @@ -0,0 +1 @@ +*{padding:0;margin:0;box-sizing:border-box}body{background:#222;font-family:consolas}.tic-tac-toe{width:fit-content;margin:40px auto;text-align:center}.tic-tac-toe h1{color:#eee}.tic-tac-toe button{padding:8px 12px;margin:25px;background:transparent;border:2px solid #eee;color:#eee;width:100px;border-radius:5px;transition:.2s;font-weight:700;cursor:pointer}.tic-tac-toe button:hover{background:#eee;color:#222}.tic-tac-toe .game{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:fit-content;margin:0 auto}.turn{display:flex;justify-content:center;margin:15px auto;width:fit-content;position:relative;border-radius:10px}.turn .square,.winner .square{width:70px;height:70px;pointer-events:none;border-color:transparent}.turn .square span.x:before,.turn .square span.x:after{background:#222;transition:.2s}.turn .square span.o{transition:.2s;border-color:#222}.turn:after{position:absolute;content:"";width:50%;height:100%;top:0;background:#49ff58;border-radius:9px;z-index:-1;transition:.2s}.turn.left:after{left:0}.turn.left span.o{border-color:#eee}.turn.right span.x:before,.turn.right span.x:after{background:#eee}.turn.right:after{left:50%}.winner{position:absolute;width:100vw;height:100vh;top:0;left:0;display:grid;place-items:center;background-color:#000000b3}.winner .text{background:#111;width:70%;max-width:400px;height:300px;border:2px solid #eee;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px}.winner .text h2{font-size:2.5em;margin:15px 0;color:#eee}.winner .win{margin:0 auto;width:fit-content;border:2px solid #eee;border-radius:10px;display:flex;gap:15px}.square{width:100px;height:100px;border:2px solid #eee;border-radius:5px;display:grid;place-items:center;cursor:pointer}.square span{display:block;position:relative;width:70%;height:70%;border-radius:50%;border:8px solid transparent}.square span.x:after,.square span.x:before{position:absolute;content:"";width:150%;height:8px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg);background:#62fffc;border-radius:5px}.square span.x:after{transform:translate(-50%,-50%) rotate(45deg);opacity:1}.square span.o{border-color:#ffa02e} diff --git a/assets/index-Dlg-2Z8J.js b/assets/index-Dlg-2Z8J.js deleted file mode 100644 index 6ceaab6..0000000 --- a/assets/index-Dlg-2Z8J.js +++ /dev/null @@ -1,48 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kf={exports:{}},yo={},Cf={exports:{}},F={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Yr=Symbol.for("react.element"),rm=Symbol.for("react.portal"),im=Symbol.for("react.fragment"),om=Symbol.for("react.strict_mode"),sm=Symbol.for("react.profiler"),lm=Symbol.for("react.provider"),am=Symbol.for("react.context"),um=Symbol.for("react.forward_ref"),cm=Symbol.for("react.suspense"),fm=Symbol.for("react.memo"),dm=Symbol.for("react.lazy"),su=Symbol.iterator;function hm(e){return e===null||typeof e!="object"?null:(e=su&&e[su]||e["@@iterator"],typeof e=="function"?e:null)}var Ef={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rf=Object.assign,Vf={};function Yn(e,t,n){this.props=e,this.context=t,this.refs=Vf,this.updater=n||Ef}Yn.prototype.isReactComponent={};Yn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mf(){}Mf.prototype=Yn.prototype;function jl(e,t,n){this.props=e,this.context=t,this.refs=Vf,this.updater=n||Ef}var Ol=jl.prototype=new Mf;Ol.constructor=jl;Rf(Ol,Yn.prototype);Ol.isPureReactComponent=!0;var lu=Array.isArray,Lf=Object.prototype.hasOwnProperty,zl={current:null},Df={key:!0,ref:!0,__self:!0,__source:!0};function Af(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Lf.call(t,r)&&!Df.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,te=R[Y];if(0>>1;Yi(Bo,N))Gti(ii,Bo)?(R[Y]=ii,R[Gt]=N,Y=Gt):(R[Y]=Bo,R[Kt]=N,Y=Kt);else if(Gti(ii,N))R[Y]=ii,R[Gt]=N,Y=Gt;else break e}}return D}function i(R,D){var N=R.sortIndex-D.sortIndex;return N!==0?N:R.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,d=3,g=!1,y=!1,v=!1,T=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(R){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=R)r(u),D.sortIndex=D.expirationTime,t(a,D);else break;D=n(u)}}function w(R){if(v=!1,p(R),!y)if(n(a)!==null)y=!0,Ce(S);else{var D=n(u);D!==null&&Ht(w,D.startTime-R)}}function S(R,D){y=!1,v&&(v=!1,m(P),P=-1),g=!0;var N=d;try{for(p(D),f=n(a);f!==null&&(!(f.expirationTime>D)||R&&!ee());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,d=f.priorityLevel;var te=Y(f.expirationTime<=D);D=e.unstable_now(),typeof te=="function"?f.callback=te:f===n(a)&&r(a),p(D)}else r(a);f=n(a)}if(f!==null)var ri=!0;else{var Kt=n(u);Kt!==null&&Ht(w,Kt.startTime-D),ri=!1}return ri}finally{f=null,d=N,g=!1}}var k=!1,E=null,P=-1,A=5,M=-1;function ee(){return!(e.unstable_now()-MR||125Y?(R.sortIndex=N,t(u,R),n(a)===null&&R===n(u)&&(v?(m(P),P=-1):v=!0,Ht(w,N-Y))):(R.sortIndex=te,t(a,R),y||g||(y=!0,Ce(S))),R},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(R){var D=d;return function(){var N=d;d=D;try{return R.apply(this,arguments)}finally{d=N}}}})(Of);jf.exports=Of;var Cm=jf.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Em=C,Me=Cm;function x(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vs=Object.prototype.hasOwnProperty,Rm=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,uu={},cu={};function Vm(e){return Vs.call(cu,e)?!0:Vs.call(uu,e)?!1:Rm.test(e)?cu[e]=!0:(uu[e]=!0,!1)}function Mm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Lm(e,t,n,r){if(t===null||typeof t>"u"||Mm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function we(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ae[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ae[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ae[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ae[e]=new we(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ae[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ae[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ae[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ae[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ae[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bl=/[\-:]([a-z])/g;function Ul(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bl,Ul);ae[t]=new we(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bl,Ul);ae[t]=new we(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bl,Ul);ae[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ae[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});ae.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ae[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function $l(e,t,n,r){var i=ae.hasOwnProperty(t)?ae[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var a=` -`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Wo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ar(e):""}function Dm(e){switch(e.tag){case 5:return ar(e.type);case 16:return ar("Lazy");case 13:return ar("Suspense");case 19:return ar("SuspenseList");case 0:case 2:case 15:return e=Ho(e.type,!1),e;case 11:return e=Ho(e.type.render,!1),e;case 1:return e=Ho(e.type,!0),e;default:return""}}function As(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wn:return"Fragment";case vn:return"Portal";case Ms:return"Profiler";case Wl:return"StrictMode";case Ls:return"Suspense";case Ds:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bf:return(e.displayName||"Context")+".Consumer";case If:return(e._context.displayName||"Context")+".Provider";case Hl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Kl:return t=e.displayName||null,t!==null?t:As(e.type)||"Memo";case yt:t=e._payload,e=e._init;try{return As(e(t))}catch{}}return null}function Am(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return As(t);case 8:return t===Wl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Nt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $f(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _m(e){var t=$f(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function li(e){e._valueTracker||(e._valueTracker=_m(e))}function Wf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$f(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _s(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function du(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Nt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hf(e,t){t=t.checked,t!=null&&$l(e,"checked",t,!1)}function Ns(e,t){Hf(e,t);var n=Nt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fs(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fs(e,t.type,Nt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fs(e,t,n){(t!=="number"||Bi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function Nn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nm=["Webkit","ms","Moz","O"];Object.keys(hr).forEach(function(e){Nm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hr[t]=hr[e]})});function Yf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hr.hasOwnProperty(e)&&hr[e]?(""+t).trim():t+"px"}function Xf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Yf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Fm=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zs(e,t){if(t){if(Fm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function Is(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bs=null;function Gl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Us=null,Fn=null,jn=null;function gu(e){if(e=qr(e)){if(typeof Us!="function")throw Error(x(280));var t=e.stateNode;t&&(t=Po(t),Us(e.stateNode,e.type,t))}}function Zf(e){Fn?jn?jn.push(e):jn=[e]:Fn=e}function qf(){if(Fn){var e=Fn,t=jn;if(jn=Fn=null,gu(e),t)for(e=0;e>>=0,e===0?32:31-(Gm(e)/Qm|0)|0}var ui=64,ci=4194304;function cr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=cr(l):(o&=s,o!==0&&(r=cr(o)))}else s=n&~i,s!==0?r=cr(s):o!==0&&(r=cr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Xr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function qm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mr),Cu=" ",Eu=!1;function yd(e,t){switch(e){case"keyup":return Cg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function Rg(e,t){switch(e){case"compositionend":return vd(t);case"keypress":return t.which!==32?null:(Eu=!0,Cu);case"textInput":return e=t.data,e===Cu&&Eu?null:e;default:return null}}function Vg(e,t){if(Sn)return e==="compositionend"||!ea&&yd(e,t)?(e=md(),Vi=ql=Pt=null,Sn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lu(n)}}function Pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Td(){for(var e=window,t=Bi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bi(e.document)}return t}function ta(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Og(e){var t=Td(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pd(n.ownerDocument.documentElement,n)){if(r!==null&&ta(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Du(n,o);var s=Du(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,xn=null,Qs=null,yr=null,Ys=!1;function Au(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ys||xn==null||xn!==Bi(r)||(r=xn,"selectionStart"in r&&ta(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yr&&_r(yr,r)||(yr=r,r=Qi(Qs,"onSelect"),0kn||(e.current=el[kn],el[kn]=null,kn--)}function I(e,t){kn++,el[kn]=e.current,e.current=t}var Ft={},me=Bt(Ft),Pe=Bt(!1),an=Ft;function Un(e,t){var n=e.type.contextTypes;if(!n)return Ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function Xi(){U(Pe),U(me)}function Iu(e,t,n){if(me.current!==Ft)throw Error(x(168));I(me,t),I(Pe,n)}function Ad(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(x(108,Am(e)||"Unknown",i));return G({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ft,an=me.current,I(me,e),I(Pe,Pe.current),!0}function Bu(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=Ad(e,t,an),r.__reactInternalMemoizedMergedChildContext=e,U(Pe),U(me),I(me,e)):U(Pe),I(Pe,n)}var tt=null,To=!1,is=!1;function _d(e){tt===null?tt=[e]:tt.push(e)}function Xg(e){To=!0,_d(e)}function Ut(){if(!is&&tt!==null){is=!0;var e=0,t=O;try{var n=tt;for(O=1;e>=s,i-=s,nt=1<<32-Ke(t)+i|n<P?(A=E,E=null):A=E.sibling;var M=d(m,E,p[P],w);if(M===null){E===null&&(E=A);break}e&&E&&M.alternate===null&&t(m,E),h=o(M,h,P),k===null?S=M:k.sibling=M,k=M,E=A}if(P===p.length)return n(m,E),$&&Yt(m,P),S;if(E===null){for(;PP?(A=E,E=null):A=E.sibling;var ee=d(m,E,M.value,w);if(ee===null){E===null&&(E=A);break}e&&E&&ee.alternate===null&&t(m,E),h=o(ee,h,P),k===null?S=ee:k.sibling=ee,k=ee,E=A}if(M.done)return n(m,E),$&&Yt(m,P),S;if(E===null){for(;!M.done;P++,M=p.next())M=f(m,M.value,w),M!==null&&(h=o(M,h,P),k===null?S=M:k.sibling=M,k=M);return $&&Yt(m,P),S}for(E=r(m,E);!M.done;P++,M=p.next())M=g(E,m,P,M.value,w),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?P:M.key),h=o(M,h,P),k===null?S=M:k.sibling=M,k=M);return e&&E.forEach(function(pt){return t(m,pt)}),$&&Yt(m,P),S}function T(m,h,p,w){if(typeof p=="object"&&p!==null&&p.type===wn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case si:e:{for(var S=p.key,k=h;k!==null;){if(k.key===S){if(S=p.type,S===wn){if(k.tag===7){n(m,k.sibling),h=i(k,p.props.children),h.return=m,m=h;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===yt&&Wu(S)===k.type){n(m,k.sibling),h=i(k,p.props),h.ref=ir(m,k,p),h.return=m,m=h;break e}n(m,k);break}else t(m,k);k=k.sibling}p.type===wn?(h=sn(p.props.children,m.mode,w,p.key),h.return=m,m=h):(w=ji(p.type,p.key,p.props,null,m.mode,w),w.ref=ir(m,h,p),w.return=m,m=w)}return s(m);case vn:e:{for(k=p.key;h!==null;){if(h.key===k)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(m,h.sibling),h=i(h,p.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=ds(p,m.mode,w),h.return=m,m=h}return s(m);case yt:return k=p._init,T(m,h,k(p._payload),w)}if(ur(p))return y(m,h,p,w);if(bn(p))return v(m,h,p,w);yi(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(m,h.sibling),h=i(h,p),h.return=m,m=h):(n(m,h),h=fs(p,m.mode,w),h.return=m,m=h),s(m)):n(m,h)}return T}var Wn=Od(!0),zd=Od(!1),bi=Bt(null),eo=null,Rn=null,oa=null;function sa(){oa=Rn=eo=null}function la(e){var t=bi.current;U(bi),e._currentValue=t}function rl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function zn(e,t){eo=e,oa=Rn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xe=!0),e.firstContext=null)}function Ie(e){var t=e._currentValue;if(oa!==e)if(e={context:e,memoizedValue:t,next:null},Rn===null){if(eo===null)throw Error(x(308));Rn=e,eo.dependencies={lanes:0,firstContext:e}}else Rn=Rn.next=e;return t}var tn=null;function aa(e){tn===null?tn=[e]:tn.push(e)}function Id(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,aa(t)):(n.next=i.next,i.next=n),t.interleaved=n,ft(e,r)}function ft(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var vt=!1;function ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,j&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ft(e,n)}return i=r.interleaved,i===null?(t.next=t,aa(r)):(t.next=i.next,i.next=t),r.interleaved=t,ft(e,n)}function Li(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}function Hu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function to(e,t,n,r){var i=e.updateQueue;vt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var d=l.lane,g=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(d=t,g=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(g,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,d=typeof y=="function"?y.call(g,f,d):y,d==null)break e;f=G({},f,d);break e;case 2:vt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else g={eventTime:g,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=g,a=f):c=c.next=g,s|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);fn|=s,e.lanes=s,e.memoizedState=f}}function Ku(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ss.transition;ss.transition={};try{e(!1),t()}finally{O=n,ss.transition=r}}function rh(){return Be().memoizedState}function bg(e,t,n){var r=Lt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ih(e))oh(t,n);else if(n=Id(e,t,n,r),n!==null){var i=ye();Ge(n,e,r,i),sh(n,t,r)}}function ey(e,t,n){var r=Lt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ih(e))oh(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Qe(l,s)){var a=t.interleaved;a===null?(i.next=i,aa(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Id(e,t,i,r),n!==null&&(i=ye(),Ge(n,e,r,i),sh(n,t,r))}}function ih(e){var t=e.alternate;return e===K||t!==null&&t===K}function oh(e,t){vr=ro=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yl(e,n)}}var io={readContext:Ie,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},ty={readContext:Ie,useCallback:function(e,t){return Xe().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:Qu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ai(4194308,4,Jd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ai(4,2,e,t)},useMemo:function(e,t){var n=Xe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xe();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bg.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Xe();return e={current:e},t.memoizedState=e},useState:Gu,useDebugValue:ya,useDeferredValue:function(e){return Xe().memoizedState=e},useTransition:function(){var e=Gu(!1),t=e[0];return e=Jg.bind(null,e[1]),Xe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,i=Xe();if($){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),re===null)throw Error(x(349));cn&30||Hd(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Qu(Gd.bind(null,r,o,e),[e]),r.flags|=2048,Ur(9,Kd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Xe(),t=re.identifierPrefix;if($){var n=rt,r=nt;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ir++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ze]=t,e[jr]=r,gh(e,t,!1,!1),t.stateNode=e;e:{switch(s=Is(n,r),n){case"dialog":B("cancel",e),B("close",e),i=r;break;case"iframe":case"object":case"embed":B("load",e),i=r;break;case"video":case"audio":for(i=0;iGn&&(t.flags|=128,r=!0,or(o,!1),t.lanes=4194304)}else{if(!r)if(e=no(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),or(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!$)return ce(t),null}else 2*Z()-o.renderingStartTime>Gn&&n!==1073741824&&(t.flags|=128,r=!0,or(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Z(),t.sibling=null,n=W.current,I(W,r?n&1|2:n&1),t):(ce(t),null);case 22:case 23:return Ta(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(ce(t),t.subtreeFlags&6&&(t.flags|=8192)):ce(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function uy(e,t){switch(ra(t),t.tag){case 1:return Te(t.type)&&Xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hn(),U(Pe),U(me),da(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fa(t),null;case 13:if(U(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(W),null;case 4:return Hn(),null;case 10:return la(t.type._context),null;case 22:case 23:return Ta(),null;case 24:return null;default:return null}}var wi=!1,de=!1,cy=typeof WeakSet=="function"?WeakSet:Set,V=null;function Vn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function dl(e,t,n){try{n()}catch(r){Q(e,t,r)}}var ic=!1;function fy(e,t){if(Xs=Ki,e=Td(),ta(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=s),d===o&&++c===r&&(a=s),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zs={focusedElem:e,selectionRange:n},Ki=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,T=y.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:$e(t.type,v),T);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(w){Q(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return y=ic,ic=!1,y}function wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&dl(t,n,o)}i=i.next}while(i!==r)}}function Eo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function hl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wh(e){var t=e.alternate;t!==null&&(e.alternate=null,wh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ze],delete t[jr],delete t[bs],delete t[Qg],delete t[Yg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Sh(e){return e.tag===5||e.tag===3||e.tag===4}function oc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yi));else if(r!==4&&(e=e.child,e!==null))for(pl(e,t,n),e=e.sibling;e!==null;)pl(e,t,n),e=e.sibling}function ml(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ml(e,t,n),e=e.sibling;e!==null;)ml(e,t,n),e=e.sibling}var oe=null,We=!1;function mt(e,t,n){for(n=n.child;n!==null;)xh(e,t,n),n=n.sibling}function xh(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount=="function")try{qe.onCommitFiberUnmount(vo,n)}catch{}switch(n.tag){case 5:de||Vn(n,t);case 6:var r=oe,i=We;oe=null,mt(e,t,n),oe=r,We=i,oe!==null&&(We?(e=oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oe.removeChild(n.stateNode));break;case 18:oe!==null&&(We?(e=oe,n=n.stateNode,e.nodeType===8?rs(e.parentNode,n):e.nodeType===1&&rs(e,n),Dr(e)):rs(oe,n.stateNode));break;case 4:r=oe,i=We,oe=n.stateNode.containerInfo,We=!0,mt(e,t,n),oe=r,We=i;break;case 0:case 11:case 14:case 15:if(!de&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&dl(n,t,s),i=i.next}while(i!==r)}mt(e,t,n);break;case 1:if(!de&&(Vn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Q(n,t,l)}mt(e,t,n);break;case 21:mt(e,t,n);break;case 22:n.mode&1?(de=(r=de)||n.memoizedState!==null,mt(e,t,n),de=r):mt(e,t,n);break;default:mt(e,t,n)}}function sc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cy),t.forEach(function(r){var i=Sy.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ue(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hy(r/1960))-r,10e?16:e,Tt===null)var r=!1;else{if(e=Tt,Tt=null,lo=0,j&6)throw Error(x(331));var i=j;for(j|=4,V=e.current;V!==null;){var o=V,s=o.child;if(V.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aZ()-xa?on(e,0):Sa|=n),ke(e,t)}function Mh(e,t){t===0&&(e.mode&1?(t=ci,ci<<=1,!(ci&130023424)&&(ci=4194304)):t=1);var n=ye();e=ft(e,t),e!==null&&(Xr(e,t,n),ke(e,n))}function wy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Mh(e,n)}function Sy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(t),Mh(e,n)}var Lh;Lh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xe=!1,ly(e,t,n);xe=!!(e.flags&131072)}else xe=!1,$&&t.flags&1048576&&Nd(t,Ji,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_i(e,t),e=t.pendingProps;var i=Un(t,me.current);zn(t,n),i=pa(null,t,r,e,i,n);var o=ma();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(r)?(o=!0,Zi(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ua(t),i.updater=Co,t.stateNode=i,i._reactInternals=t,ol(t,r,e,n),t=al(null,t,r,!0,o,n)):(t.tag=0,$&&o&&na(t),ge(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_i(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Py(r),e=$e(r,e),i){case 0:t=ll(null,t,r,e,n);break e;case 1:t=tc(null,t,r,e,n);break e;case 11:t=bu(null,t,r,e,n);break e;case 14:t=ec(null,t,r,$e(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),ll(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),tc(e,t,r,i,n);case 3:e:{if(hh(t),e===null)throw Error(x(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Bd(e,t),to(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Kn(Error(x(423)),t),t=nc(e,t,r,n,i);break e}else if(r!==i){i=Kn(Error(x(424)),t),t=nc(e,t,r,n,i);break e}else for(Re=Rt(t.stateNode.containerInfo.firstChild),Ve=t,$=!0,He=null,n=zd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($n(),r===i){t=dt(e,t,n);break e}ge(e,t,r,n)}t=t.child}return t;case 5:return Ud(t),e===null&&nl(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,qs(r,i)?s=null:o!==null&&qs(r,o)&&(t.flags|=32),dh(e,t),ge(e,t,s,n),t.child;case 6:return e===null&&nl(t),null;case 13:return ph(e,t,n);case 4:return ca(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):ge(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),bu(e,t,r,i,n);case 7:return ge(e,t,t.pendingProps,n),t.child;case 8:return ge(e,t,t.pendingProps.children,n),t.child;case 12:return ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,I(bi,r._currentValue),r._currentValue=s,o!==null)if(Qe(o.value,s)){if(o.children===i.children&&!Pe.current){t=dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=ot(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),rl(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(x(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),rl(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zn(t,n),i=Ie(i),r=r(i),t.flags|=1,ge(e,t,r,n),t.child;case 14:return r=t.type,i=$e(r,t.pendingProps),i=$e(r.type,i),ec(e,t,r,i,n);case 15:return ch(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),_i(e,t),t.tag=1,Te(r)?(e=!0,Zi(t)):e=!1,zn(t,n),lh(t,r,i),ol(t,r,i,n),al(null,t,r,!0,e,n);case 19:return mh(e,t,n);case 22:return fh(e,t,n)}throw Error(x(156,t.tag))};function Dh(e,t){return id(e,t)}function xy(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oe(e,t,n,r){return new xy(e,t,n,r)}function Ca(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Py(e){if(typeof e=="function")return Ca(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hl)return 11;if(e===Kl)return 14}return 2}function Dt(e,t){var n=e.alternate;return n===null?(n=Oe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ji(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Ca(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wn:return sn(n.children,i,o,t);case Wl:s=8,i|=8;break;case Ms:return e=Oe(12,n,t,i|2),e.elementType=Ms,e.lanes=o,e;case Ls:return e=Oe(13,n,t,i),e.elementType=Ls,e.lanes=o,e;case Ds:return e=Oe(19,n,t,i),e.elementType=Ds,e.lanes=o,e;case Uf:return Vo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case If:s=10;break e;case Bf:s=9;break e;case Hl:s=11;break e;case Kl:s=14;break e;case yt:s=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=Oe(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function sn(e,t,n,r){return e=Oe(7,e,r,t),e.lanes=n,e}function Vo(e,t,n,r){return e=Oe(22,e,r,t),e.elementType=Uf,e.lanes=n,e.stateNode={isHidden:!1},e}function fs(e,t,n){return e=Oe(6,e,null,t),e.lanes=n,e}function ds(e,t,n){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ty(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Go(0),this.expirationTimes=Go(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Go(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ea(e,t,n,r,i,o,s,l,a){return e=new Ty(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ua(o),e}function ky(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fh)}catch(e){console.error(e)}}Fh(),Ff.exports=De;var My=Ff.exports,pc=My;Rs.createRoot=pc.createRoot,Rs.hydrateRoot=pc.hydrateRoot;const La=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),_o=C.createContext({}),No=C.createContext(null),Da=typeof document<"u",Aa=Da?C.useLayoutEffect:C.useEffect,jh=C.createContext({strict:!1}),_a=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ly="framerAppearId",Oh="data-"+_a(Ly),Dy={skipAnimations:!1,useManualTiming:!1};class mc{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Ay(e){let t=new mc,n=new mc,r=0,i=!1,o=!1;const s=new WeakSet,l={schedule:(a,u=!1,c=!1)=>{const f=c&&i,d=f?t:n;return u&&s.add(a),d.add(a)&&f&&i&&(r=t.order.length),a},cancel:a=>{n.remove(a),s.delete(a)},process:a=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(f[d]=Ay(()=>n=!0),f),{}),s=f=>{o[f].process(i)},l=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,_y),1),i.timestamp=f,i.isProcessing=!0,Pi.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(l))},a=()=>{n=!0,r=!0,i.isProcessing||e(l)};return{schedule:Pi.reduce((f,d)=>{const g=o[d];return f[d]=(y,v=!1,T=!1)=>(n||a(),g.schedule(y,v,T)),f},{}),cancel:f=>Pi.forEach(d=>o[d].cancel(f)),state:i,steps:o}}const{schedule:Na,cancel:Jw}=zh(queueMicrotask,!1);function Ny(e,t,n,r){const{visualElement:i}=C.useContext(_o),o=C.useContext(jh),s=C.useContext(No),l=C.useContext(La).reducedMotion,a=C.useRef();r=r||o.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=a.current;C.useInsertionEffect(()=>{u&&u.update(n,s)});const c=C.useRef(!!(n[Oh]&&!window.HandoffComplete));return Aa(()=>{u&&(Na.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function Ln(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Fy(e,t,n){return C.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ln(n)&&(n.current=r))},[t])}function Wr(e){return typeof e=="string"||Array.isArray(e)}function Fo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Fa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ja=["initial",...Fa];function jo(e){return Fo(e.animate)||ja.some(t=>Wr(e[t]))}function Ih(e){return!!(jo(e)||e.variants)}function jy(e,t){if(jo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wr(n)?n:void 0,animate:Wr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Oy(e){const{initial:t,animate:n}=jy(e,C.useContext(_o));return C.useMemo(()=>({initial:t,animate:n}),[gc(t),gc(n)])}function gc(e){return Array.isArray(e)?e.join(" "):e}const yc={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"]},Hr={};for(const e in yc)Hr[e]={isEnabled:t=>yc[e].some(n=>!!t[n])};function zy(e){for(const t in e)Hr[t]={...Hr[t],...e[t]}}const Oa=C.createContext({}),Bh=C.createContext({}),Iy=Symbol.for("motionComponentSymbol");function By({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&zy(e);function o(l,a){let u;const c={...C.useContext(La),...l,layoutId:Uy(l)},{isStatic:f}=c,d=Oy(l),g=r(l,f);if(!f&&Da){d.visualElement=Ny(i,g,c,t);const y=C.useContext(Bh),v=C.useContext(jh).strict;d.visualElement&&(u=d.visualElement.loadFeatures(c,v,e,y))}return _.jsxs(_o.Provider,{value:d,children:[u&&d.visualElement?_.jsx(u,{visualElement:d.visualElement,...c}):null,n(i,l,Fy(g,d.visualElement,a),g,f,d.visualElement)]})}const s=C.forwardRef(o);return s[Iy]=i,s}function Uy({layoutId:e}){const t=C.useContext(Oa).id;return t&&e!==void 0?t+"-"+e:e}function $y(e){function t(r,i={}){return By(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Wy=["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 za(e){return typeof e!="string"||e.includes("-")?!1:!!(Wy.indexOf(e)>-1||/[A-Z]/u.test(e))}const co={};function Hy(e){Object.assign(co,e)}const br=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mn=new Set(br);function Uh(e,{layout:t,layoutId:n}){return mn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!co[e]||e==="opacity")}const he=e=>!!(e&&e.getVelocity),Ky={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gy=br.length;function Qy(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),Wh=$h("--"),Yy=$h("var(--"),Ia=e=>Yy(e)?Xy.test(e.split("/*")[0].trim()):!1,Xy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,jt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Pr={...qn,transform:e=>jt(0,1,e)},Ti={...qn,default:1},Tr=e=>Math.round(e*1e5)/1e5,Ba=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,qy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Jy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ei(e){return typeof e=="string"}const ti=e=>({test:t=>ei(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=ti("deg"),be=ti("%"),L=ti("px"),by=ti("vh"),ev=ti("vw"),vc={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},wc={...qn,transform:Math.round},Hh={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,size:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:Ti,scaleX:Ti,scaleY:Ti,scaleZ:Ti,skew:gt,skewX:gt,skewY:gt,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Pr,originX:vc,originY:vc,originZ:L,zIndex:wc,backgroundPositionX:L,backgroundPositionY:L,fillOpacity:Pr,strokeOpacity:Pr,numOctaves:wc};function Ua(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:l}=e;let a=!1,u=!1,c=!0;for(const f in t){const d=t[f];if(Wh(f)){o[f]=d;continue}const g=Hh[f],y=Zy(d,g);if(mn.has(f)){if(a=!0,s[f]=y,!c)continue;d!==(g.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,l[f]=y):i[f]=y}if(t.transform||(a||r?i.transform=Qy(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:d="50%",originZ:g=0}=l;i.transformOrigin=`${f} ${d} ${g}`}}const $a=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Kh(e,t,n){for(const r in t)!he(t[r])&&!Uh(r,n)&&(e[r]=t[r])}function tv({transformTemplate:e},t,n){return C.useMemo(()=>{const r=$a();return Ua(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function nv(e,t,n){const r=e.style||{},i={};return Kh(i,r,e),Object.assign(i,tv(e,t,n)),i}function rv(e,t,n){const r={},i=nv(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const iv=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||iv.has(e)}let Gh=e=>!fo(e);function ov(e){e&&(Gh=t=>t.startsWith("on")?!fo(t):e(t))}try{ov(require("@emotion/is-prop-valid").default)}catch{}function sv(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gh(i)||n===!0&&fo(i)||!t&&!fo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Sc(e,t,n){return typeof e=="string"?e:L.transform(t+n*e)}function lv(e,t,n){const r=Sc(t,e.x,e.width),i=Sc(n,e.y,e.height);return`${r} ${i}`}const av={offset:"stroke-dashoffset",array:"stroke-dasharray"},uv={offset:"strokeDashoffset",array:"strokeDasharray"};function cv(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?av:uv;e[o.offset]=L.transform(-r);const s=L.transform(t),l=L.transform(n);e[o.array]=`${s} ${l}`}function Wa(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...u},c,f,d){if(Ua(e,u,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:y,dimensions:v}=e;g.transform&&(v&&(y.transform=g.transform),delete g.transform),v&&(i!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=lv(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),s!==void 0&&cv(g,s,l,a,!1)}const Qh=()=>({...$a(),attrs:{}}),Ha=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fv(e,t,n,r){const i=C.useMemo(()=>{const o=Qh();return Wa(o,t,{enableHardwareAcceleration:!1},Ha(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Kh(o,e.style,e),i.style={...o,...i.style}}return i}function dv(e=!1){return(n,r,i,{latestValues:o},s)=>{const a=(za(n)?fv:rv)(r,o,s,n),u=sv(r,typeof n=="string",e),c=n!==C.Fragment?{...u,...a,ref:i}:{},{children:f}=r,d=C.useMemo(()=>he(f)?f.get():f,[f]);return C.createElement(n,{...c,children:d})}}function Yh(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Xh=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 Zh(e,t,n,r){Yh(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xh.has(i)?i:_a(i),t.attrs[i])}function Ka(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(he(i[s])||t.style&&he(t.style[s])||Uh(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function qh(e,t,n){const r=Ka(e,t,n);for(const i in e)if(he(e[i])||he(t[i])){const o=br.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function Ga(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Jh(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sl=e=>Array.isArray(e),hv=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),pv=e=>Sl(e)?e[e.length-1]||0:e;function Oi(e){const t=he(e)?e.get():e;return hv(t)?t.toValue():t}function mv({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:gv(r,i,o,e),renderState:t()};return n&&(s.mount=l=>n(r,l,s)),s}const bh=e=>(t,n)=>{const r=C.useContext(_o),i=C.useContext(No),o=()=>mv(e,t,r,i);return n?o():Jh(o)};function gv(e,t,n,r){const i={},o=r(e,{});for(const d in o)i[d]=Oi(o[d]);let{initial:s,animate:l}=e;const a=jo(e),u=Ih(e);t&&u&&!a&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?l:s;return f&&typeof f!="boolean"&&!Fo(f)&&(Array.isArray(f)?f:[f]).forEach(g=>{const y=Ga(e,g);if(!y)return;const{transitionEnd:v,transition:T,...m}=y;for(const h in m){let p=m[h];if(Array.isArray(p)){const w=c?p.length-1:0;p=p[w]}p!==null&&(i[h]=p)}for(const h in v)i[h]=v[h]}),i}const pe=e=>e,{schedule:z,cancel:Ot,state:se,steps:hs}=zh(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0),yv={useVisualState:bh({scrapeMotionValuesFromProps:qh,createRenderState:Qh,onMount:(e,t,{renderState:n,latestValues:r})=>{z.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),z.render(()=>{Wa(n,r,{enableHardwareAcceleration:!1},Ha(t.tagName),e.transformTemplate),Zh(t,n)})}})},vv={useVisualState:bh({scrapeMotionValuesFromProps:Ka,createRenderState:$a})};function wv(e,{forwardMotionProps:t=!1},n,r){return{...za(e)?yv:vv,preloadedFeatures:n,useRender:dv(t),createVisualElement:r,Component:e}}function it(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ep=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Oo(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Sv=e=>t=>ep(t)&&e(t,Oo(t));function st(e,t,n,r){return it(e,t,Sv(n),r)}const xv=(e,t)=>n=>t(e(n)),lt=(...e)=>e.reduce(xv);function tp(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const xc=tp("dragHorizontal"),Pc=tp("dragVertical");function np(e){let t=!1;if(e==="y")t=Pc();else if(e==="x")t=xc();else{const n=xc(),r=Pc();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function rp(){const e=np(!0);return e?(e(),!1):!0}class $t{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Tc(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,s)=>{if(o.pointerType==="touch"||rp())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t);const a=l[r];a&&z.postRender(()=>a(o,s))};return st(e.current,n,i,{passive:!e.getProps()[r]})}class Pv extends $t{mount(){this.unmount=lt(Tc(this.node,!0),Tc(this.node,!1))}unmount(){}}class Tv extends $t{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(it(this.node.current,"focus",()=>this.onFocus()),it(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ip=(e,t)=>t?e===t?!0:ip(e,t.parentElement):!1;function ps(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Oo(n))}class kv extends $t{constructor(){super(...arguments),this.removeStartListeners=pe,this.removeEndListeners=pe,this.removeAccessibleListeners=pe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=st(window,"pointerup",(l,a)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps(),d=!f&&!ip(this.node.current,l.target)?c:u;d&&z.update(()=>d(l,a))},{passive:!(r.onTap||r.onPointerUp)}),s=st(window,"pointercancel",(l,a)=>this.cancelPress(l,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=lt(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=l=>{l.key!=="Enter"||!this.checkPressEnd()||ps("up",(a,u)=>{const{onTap:c}=this.node.getProps();c&&z.postRender(()=>c(a,u))})};this.removeEndListeners(),this.removeEndListeners=it(this.node.current,"keyup",s),ps("down",(l,a)=>{this.startPress(l,a)})},n=it(this.node.current,"keydown",t),r=()=>{this.isPressing&&ps("cancel",(o,s)=>this.cancelPress(o,s))},i=it(this.node.current,"blur",r);this.removeAccessibleListeners=lt(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&z.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!rp()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&z.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=st(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=it(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=lt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const xl=new WeakMap,ms=new WeakMap,Cv=e=>{const t=xl.get(e.target);t&&t(e)},Ev=e=>{e.forEach(Cv)};function Rv({root:e,...t}){const n=e||document;ms.has(n)||ms.set(n,{});const r=ms.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ev,{root:e,...t})),r[i]}function Vv(e,t,n){const r=Rv(t);return xl.set(e,n),r.observe(e),()=>{xl.delete(e),r.unobserve(e)}}const Mv={some:0,all:1};class Lv extends $t{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Mv[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(a)};return Vv(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dv(t,n))&&this.startObserver()}unmount(){}}function Dv({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Av={inView:{Feature:Lv},tap:{Feature:kv},focus:{Feature:Tv},hover:{Feature:Pv}};function op(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function Nv(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function zo(e,t,n){const r=e.getProps();return Ga(r,t,n!==void 0?n:r.custom,_v(e),Nv(e))}const At=e=>e*1e3,at=e=>e/1e3,Fv={type:"spring",stiffness:500,damping:25,restSpeed:10},jv=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ov={type:"keyframes",duration:.8},zv={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Iv=(e,{keyframes:t})=>t.length>2?Ov:mn.has(e)?e.startsWith("scale")?jv(t[1]):Fv:zv;function Bv({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:l,from:a,elapsed:u,...c}){return!!Object.keys(c).length}function Qa(e,t){return e[t]||e.default||e}const Uv=e=>e!==null;function Io(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Uv),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}let zi;function $v(){zi=void 0}const _t={now:()=>(zi===void 0&&_t.set(se.isProcessing||Dy.useManualTiming?se.timestamp:performance.now()),zi),set:e=>{zi=e,queueMicrotask($v)}},sp=e=>/^0[^.\s]+$/u.test(e);function Wv(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sp(e):!0}let Pl=pe;const lp=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Hv=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Kv(e){const t=Hv.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function ap(e,t,n=1){const[r,i]=Kv(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return lp(s)?parseFloat(s):s}return Ia(i)?ap(i,t,n+1):i}const Gv=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),kc=e=>e===qn||e===L,Cc=(e,t)=>parseFloat(e.split(", ")[t]),Ec=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Cc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?Cc(o[1],e):0}},Qv=new Set(["x","y","z"]),Yv=br.filter(e=>!Qv.has(e));function Xv(e){const t=[];return Yv.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Qn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ec(4,13),y:Ec(5,14)};Qn.translateX=Qn.x;Qn.translateY=Qn.y;const up=e=>t=>t.test(e),Zv={test:e=>e==="auto",parse:e=>e},cp=[qn,L,be,gt,ev,by,Zv],Rc=e=>cp.find(up(e)),ln=new Set;let Tl=!1,kl=!1;function fp(){if(kl){const e=Array.from(ln).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Xv(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var l;(l=r.getValue(o))===null||l===void 0||l.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kl=!1,Tl=!1,ln.forEach(e=>e.complete()),ln.clear()}function dp(){ln.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kl=!0)})}function qv(){dp(),fp()}class Ya{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ln.add(this),Tl||(Tl=!0,z.read(dp),z.resolveKeyframes(fp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;on=>!!(ei(n)&&Jy.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),hp=(e,t,n)=>r=>{if(!ei(r))return r;const[i,o,s,l]=r.match(Ba);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},Jv=e=>jt(0,255,e),gs={...qn,transform:e=>Math.round(Jv(e))},rn={test:Xa("rgb","red"),parse:hp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gs.transform(e)+", "+gs.transform(t)+", "+gs.transform(n)+", "+Tr(Pr.transform(r))+")"};function bv(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Cl={test:Xa("#"),parse:bv,transform:rn.transform},Dn={test:Xa("hsl","hue"),parse:hp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+be.transform(Tr(t))+", "+be.transform(Tr(n))+", "+Tr(Pr.transform(r))+")"},fe={test:e=>rn.test(e)||Cl.test(e)||Dn.test(e),parse:e=>rn.test(e)?rn.parse(e):Dn.test(e)?Dn.parse(e):Cl.parse(e),transform:e=>ei(e)?e:e.hasOwnProperty("red")?rn.transform(e):Dn.transform(e)};function e0(e){var t,n;return isNaN(e)&&ei(e)&&(((t=e.match(Ba))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(qy))===null||n===void 0?void 0:n.length)||0)>0}const pp="number",mp="color",t0="var",n0="var(",Vc="${}",r0=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(r0,a=>(fe.test(a)?(r.color.push(o),i.push(mp),n.push(fe.parse(a))):a.startsWith(n0)?(r.var.push(o),i.push(t0),n.push(a)):(r.number.push(o),i.push(pp),n.push(parseFloat(a))),++o,Vc)).split(Vc);return{values:n,split:l,indexes:r,types:i}}function gp(e){return Kr(e).values}function yp(e){const{split:t,types:n}=Kr(e),r=t.length;return i=>{let o="";for(let s=0;stypeof e=="number"?0:e;function o0(e){const t=gp(e);return yp(e)(t.map(i0))}const zt={test:e0,parse:gp,createTransformer:yp,getAnimatableNone:o0},s0=new Set(["brightness","contrast","saturate","opacity"]);function l0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ba)||[];if(!r)return e;const i=n.replace(r,"");let o=s0.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const a0=/\b([a-z-]*)\(.*?\)/gu,El={...zt,getAnimatableNone:e=>{const t=e.match(a0);return t?t.map(l0).join(" "):e}},u0={...Hh,color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:El,WebkitFilter:El},Za=e=>u0[e];function vp(e,t){let n=Za(e);return n!==El&&(n=zt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const c0=new Set(["auto","none","0"]);function f0(e,t,n){let r=0,i;for(;r{n.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function d0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Mc=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zt.test(e)||e==="0")&&!e.startsWith("url("));function h0(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n{this.resolveFinishedPromise=t})}}function xp(e,t){return t?e*(1e3/t):0}const m0=5;function Pp(e,t,n){const r=Math.max(t-m0,0);return xp(n-e(r),t-r)}const ys=.001,g0=.01,y0=10,v0=.05,w0=1;function S0({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=jt(v0,w0,s),e=jt(g0,y0,at(e)),s<1?(i=u=>{const c=u*s,f=c*e,d=c-n,g=Rl(u,s),y=Math.exp(-f);return ys-d/g*y},o=u=>{const f=u*s*e,d=f*n+n,g=Math.pow(s,2)*Math.pow(u,2)*e,y=Math.exp(-f),v=Rl(Math.pow(u,2),s);return(-i(u)+ys>0?-1:1)*((d-g)*y)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-ys+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const l=5/e,a=P0(i,o,l);if(e=At(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const x0=12;function P0(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function C0(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Lc(e,k0)&&Lc(e,T0)){const n=S0(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Tp({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:l,damping:a,mass:u,duration:c,velocity:f,isResolvedFromDuration:d}=C0({...r,velocity:-at(r.velocity||0)}),g=f||0,y=a/(2*Math.sqrt(l*u)),v=o-i,T=at(Math.sqrt(l/u)),m=Math.abs(v)<5;n||(n=m?.01:2),t||(t=m?.005:.5);let h;if(y<1){const p=Rl(T,y);h=w=>{const S=Math.exp(-y*T*w);return o-S*((g+y*T*v)/p*Math.sin(p*w)+v*Math.cos(p*w))}}else if(y===1)h=p=>o-Math.exp(-T*p)*(v+(g+T*v)*p);else{const p=T*Math.sqrt(y*y-1);h=w=>{const S=Math.exp(-y*T*w),k=Math.min(p*w,300);return o-S*((g+y*T*v)*Math.sinh(k)+p*v*Math.cosh(k))/p}}return{calculatedDuration:d&&c||null,next:p=>{const w=h(p);if(d)s.done=p>=c;else{let S=g;p!==0&&(y<1?S=Pp(h,p,w):S=0);const k=Math.abs(S)<=n,E=Math.abs(o-w)<=t;s.done=k&&E}return s.value=s.done?o:w,s}}}function Dc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:l,max:a,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},g=P=>l!==void 0&&Pa,y=P=>l===void 0?a:a===void 0||Math.abs(l-P)-v*Math.exp(-P/r),p=P=>m+h(P),w=P=>{const A=h(P),M=p(P);d.done=Math.abs(A)<=u,d.value=d.done?m:M};let S,k;const E=P=>{g(d.value)&&(S=P,k=Tp({keyframes:[d.value,y(d.value)],velocity:Pp(p,P,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:P=>{let A=!1;return!k&&S===void 0&&(A=!0,w(P),E(P)),S!==void 0&&P>=S?k.next(P-S):(!A&&w(P),d)}}}const kp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,E0=1e-7,R0=12;function V0(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=kp(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>E0&&++lV0(o,0,1,e,n);return o=>o===0||o===1?o:kp(i(o),t,r)}const M0=ni(.42,0,1,1),L0=ni(0,0,.58,1),Cp=ni(.42,0,.58,1),D0=e=>Array.isArray(e)&&typeof e[0]!="number",Ep=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rp=e=>t=>1-e(1-t),qa=e=>1-Math.sin(Math.acos(e)),Vp=Rp(qa),A0=Ep(qa),Mp=ni(.33,1.53,.69,.99),Ja=Rp(Mp),_0=Ep(Ja),N0=e=>(e*=2)<1?.5*Ja(e):.5*(2-Math.pow(2,-10*(e-1))),Ac={linear:pe,easeIn:M0,easeInOut:Cp,easeOut:L0,circIn:qa,circInOut:A0,circOut:Vp,backIn:Ja,backInOut:_0,backOut:Mp,anticipate:N0},_c=e=>{if(Array.isArray(e)){Pl(e.length===4);const[t,n,r,i]=e;return ni(t,n,r,i)}else if(typeof e=="string")return Pl(Ac[e]!==void 0),Ac[e];return e},Gr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},H=(e,t,n)=>e+(t-e)*n;function vs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function F0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=vs(a,l,e+1/3),o=vs(a,l,e),s=vs(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const ws=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},j0=[Cl,rn,Dn],O0=e=>j0.find(t=>t.test(e));function Nc(e){const t=O0(e);let n=t.parse(e);return t===Dn&&(n=F0(n)),n}const Fc=(e,t)=>{const n=Nc(e),r=Nc(t),i={...n};return o=>(i.red=ws(n.red,r.red,o),i.green=ws(n.green,r.green,o),i.blue=ws(n.blue,r.blue,o),i.alpha=H(n.alpha,r.alpha,o),rn.transform(i))},Vl=new Set(["none","hidden"]);function z0(e,t){return Vl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ml(e,t){return n=>n>0?t:e}function I0(e,t){return n=>H(e,t,n)}function ba(e){return typeof e=="number"?I0:typeof e=="string"?Ia(e)?Ml:fe.test(e)?Fc:$0:Array.isArray(e)?Lp:typeof e=="object"?fe.test(e)?Fc:B0:Ml}function Lp(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>ba(o)(o,t[s]));return o=>{for(let s=0;s{for(const o in r)n[o]=r[o](i);return n}}function U0(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=zt.createTransformer(t),r=Kr(e),i=Kr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Vl.has(e)&&!i.values.length||Vl.has(t)&&!r.values.length?z0(e,t):lt(Lp(U0(r,i),i.values),n):Ml(e,t)};function Dp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?H(e,t,n):ba(e)(e,t)}function W0(e,t,n){const r=[],i=n||Dp,o=e.length-1;for(let s=0;st[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=W0(t,r,i),l=s.length,a=u=>{let c=0;if(l>1)for(;ca(jt(e[0],e[o-1],u)):a}function K0(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Gr(0,t,r);e.push(H(n,1,i))}}function G0(e){const t=[0];return K0(t,e.length-1),t}function Q0(e,t){return e.map(n=>n*t)}function Y0(e,t){return e.map(()=>t||Cp).splice(0,e.length-1)}function ho({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=D0(r)?r.map(_c):_c(r),o={done:!1,value:t[0]},s=Q0(n&&n.length===t.length?n:G0(t),e),l=H0(s,t,{ease:Array.isArray(i)?i:Y0(t,i)});return{calculatedDuration:e,next:a=>(o.value=l(a),o.done=a>=e,o)}}const jc=2e4;function X0(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=jc?1/0:t}const Z0=e=>{const t=({timestamp:n})=>e(n);return{start:()=>z.update(t,!0),stop:()=>Ot(t),now:()=>se.isProcessing?se.timestamp:_t.now()}},q0={decay:Dc,inertia:Dc,tween:ho,keyframes:ho,spring:Tp},J0=e=>e/100;class eu extends Sp{constructor({KeyframeResolver:t=Ya,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:r,motionValue:i,keyframes:o}=this.options,s=(l,a)=>this.onKeyframesResolved(l,a);r&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,s,r,i):this.resolver=new t(o,s,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,l=q0[n]||ho;let a,u;l!==ho&&typeof t[0]!="number"&&(a=lt(J0,Dp(t[0],t[1])),t=[0,100]);const c=l({...this.options,keyframes:t});o==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=X0(c));const{calculatedDuration:f}=c,d=f+i,g=d*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:f,resolvedDuration:d,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return o.next(0);const{delay:d,repeat:g,repeatType:y,repeatDelay:v,onUpdate:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-d*(this.speed>=0?1:-1),h=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let p=this.currentTime,w=o;if(g){const P=Math.min(this.currentTime,c)/f;let A=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&A--,A=Math.min(A,g+1),!!(A%2)&&(y==="reverse"?(M=1-M,v&&(M-=v/f)):y==="mirror"&&(w=s)),p=jt(0,1,M)*f}const S=h?{done:!1,value:a[0]}:w.next(p);l&&(S.value=l(S.value));let{done:k}=S;!h&&u!==null&&(k=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&i!==void 0&&(S.value=Io(a,this.options,i)),T&&T(S.value),E&&this.finish(),S}get duration(){const{resolved:t}=this;return t?at(t.calculatedDuration):0}get time(){return at(this.currentTime)}set time(t){t=At(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=at(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Z0,onPlay:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ap=e=>Array.isArray(e)&&typeof e[0]=="number";function _p(e){return!!(!e||typeof e=="string"&&e in tu||Ap(e)||Array.isArray(e)&&e.every(_p))}const dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dr([0,.65,.55,1]),circOut:dr([.55,0,1,.45]),backIn:dr([.31,.01,.66,-.59]),backOut:dr([.33,1.53,.69,.99])};function b0(e){return Np(e)||tu.easeOut}function Np(e){if(e)return Ap(e)?dr(e):Array.isArray(e)?e.map(b0):tu[e]}function e1(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:l,times:a}={}){const u={[t]:n};a&&(u.offset=a);const c=Np(l);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const t1=d0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),n1=new Set(["opacity","clipPath","filter","transform"]),po=10,r1=2e4;function i1(e){return e.type==="spring"||e.name==="backgroundColor"||!_p(e.ease)}function o1(e,t){const n=new eu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(o,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:s,type:l,motionValue:a,name:u}=this.options;if(!(!((r=a.owner)===null||r===void 0)&&r.current))return!1;if(i1(this.options)){const{onComplete:f,onUpdate:d,motionValue:g,...y}=this.options,v=o1(t,y);t=v.keyframes,t.length===1&&(t[1]=t[0]),i=v.duration,o=v.times,s=v.ease,l="keyframes"}const c=e1(a.owner.current,u,t,{...this.options,duration:i,times:o,ease:s});return c.startTime=_t.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(Io(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:o,type:l,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return at(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return at(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=At(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return pe;const{animation:r}=n;r.timeline=t,r.onfinish=null}return pe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:l}=t;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:a,onUpdate:u,onComplete:c,...f}=this.options,d=new eu({...f,keyframes:r,duration:i,type:o,ease:s,times:l,isGenerator:!0}),g=At(this.time);a.setWithVelocity(d.sample(g-po).value,d.sample(g).value,po)}this.cancel()}}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:l}=t;return t1()&&r&&n1.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&s!==0&&l!=="inertia"}}const nu=(e,t,n,r={},i,o)=>s=>{const l=Qa(r,e)||{},a=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-At(a);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};Bv(l)||(c={...c,...Iv(e,c)}),c.duration&&(c.duration=At(c.duration)),c.repeatDelay&&(c.repeatDelay=At(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const d=Io(c.keyframes,l);if(d!==void 0){z.update(()=>{c.onUpdate(d),c.onComplete()});return}}return!o&&Oc.supports(c)?new Oc(c):new eu(c)};function mo(e){return!!(he(e)&&e.add)}function ru(e,t){e.indexOf(t)===-1&&e.push(t)}function iu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ou{constructor(){this.subscriptions=[]}add(t){return ru(this.subscriptions,t),()=>iu(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class l1{constructor(t,n={}){this.version="11.2.0",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=_t.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.canTrackVelocity=s1(this.current),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_t.now()}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ou);const r=this.events[t].add(n);return t==="change"?()=>{r(),z.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_t.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zc);return xp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qr(e,t){return new l1(e,t)}function a1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function u1(e,t){const n=zo(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const l=pv(o[s]);a1(e,s,l)}}function c1({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Fp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:l,...a}=t;const u=e.getValue("willChange");r&&(s=r);const c=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const g=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),y=a[d];if(y===void 0||f&&c1(f,d))continue;const v={delay:n,elapsed:0,...Qa(s||{},d)};let T=!1;if(window.HandoffAppearAnimations){const p=e.getProps()[Oh];if(p){const w=window.HandoffAppearAnimations(p,d);w!==null&&(v.elapsed=w,T=!0)}}g.start(nu(d,g,y,e.shouldReduceMotion&&mn.has(d)?{type:!1}:v,e,T));const m=g.animation;m&&(mo(u)&&(u.add(d),m.then(()=>u.remove(d))),c.push(m))}return l&&Promise.all(c).then(()=>{z.update(()=>{l&&u1(e,l)})}),c}function Ll(e,t,n={}){var r;const i=zo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Fp(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=o;return f1(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[u,c]=a==="beforeChildren"?[s,l]:[l,s];return u().then(()=>c())}else return Promise.all([s(),l(n.delay)])}function f1(e,t,n=0,r=0,i=1,o){const s=[],l=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(d1).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Ll(u,t,{...o,delay:n+a(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function d1(e,t){return e.sortNodePosition(t)}function h1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Ll(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Ll(e,t,n);else{const i=typeof t=="function"?zo(e,t,n.custom):t;r=Promise.all(Fp(e,i,n))}return r.then(()=>{z.postRender(()=>{e.notify("AnimationComplete",t)})})}const p1=[...Fa].reverse(),m1=Fa.length;function g1(e){return t=>Promise.all(t.map(({animation:n,options:r})=>h1(e,n,r)))}function y1(e){let t=g1(e);const n=w1();let r=!0;const i=a=>(u,c)=>{var f;const d=zo(e,c,a==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:g,transitionEnd:y,...v}=d;u={...u,...v,...y}}return u};function o(a){t=a(e)}function s(a){const u=e.getProps(),c=e.getVariantContext(!0)||{},f=[],d=new Set;let g={},y=1/0;for(let T=0;Ty&&w,A=!1;const M=Array.isArray(p)?p:[p];let ee=M.reduce(i(m),{});S===!1&&(ee={});const{prevResolvedValues:pt={}}=h,Wt={...pt,...ee},Jn=ie=>{P=!0,d.has(ie)&&(A=!0,d.delete(ie)),h.needsAnimating[ie]=!0;const Ce=e.getValue(ie);Ce&&(Ce.liveStyle=!1)};for(const ie in Wt){const Ce=ee[ie],Ht=pt[ie];if(g.hasOwnProperty(ie))continue;let R=!1;Sl(Ce)&&Sl(Ht)?R=!op(Ce,Ht):R=Ce!==Ht,R?Ce!=null?Jn(ie):d.add(ie):Ce!==void 0&&d.has(ie)?Jn(ie):h.protectedKeys[ie]=!0}h.prevProp=p,h.prevResolvedValues=ee,h.isActive&&(g={...g,...ee}),r&&e.blockInitialAnimation&&(P=!1),P&&(!k||A)&&f.push(...M.map(ie=>({animation:ie,options:{type:m}})))}if(d.size){const T={};d.forEach(m=>{const h=e.getBaseTarget(m),p=e.getValue(m);p&&(p.liveStyle=!0),T[m]=h??null}),f.push({animation:T})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function l(a,u){var c;if(n[a].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var g;return(g=d.animationState)===null||g===void 0?void 0:g.setActive(a,u)}),n[a].isActive=u;const f=s(a);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>n}}function v1(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!op(t,e):!1}function Qt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function w1(){return{animate:Qt(!0),whileInView:Qt(),whileHover:Qt(),whileTap:Qt(),whileDrag:Qt(),whileFocus:Qt(),exit:Qt()}}class S1 extends $t{constructor(t){super(t),t.animationState||(t.animationState=y1(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Fo(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let x1=0;class P1 extends $t{constructor(){super(...arguments),this.id=x1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const T1={animation:{Feature:S1},exit:{Feature:P1}},Ic=(e,t)=>Math.abs(e-t);function k1(e,t){const n=Ic(e.x,t.x),r=Ic(e.y,t.y);return Math.sqrt(n**2+r**2)}class jp{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!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=xs(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,g=k1(f.offset,{x:0,y:0})>=3;if(!d&&!g)return;const{point:y}=f,{timestamp:v}=se;this.history.push({...y,timestamp:v});const{onStart:T,onMove:m}=this.handlers;d||(T&&T(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ss(d,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=xs(f.type==="pointercancel"?this.lastMoveEventInfo:Ss(d,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,T),y&&y(f,T)},!ep(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=Oo(t),l=Ss(s,this.transformPagePoint),{point:a}=l,{timestamp:u}=se;this.history=[{...a,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,xs(l,this.history)),this.removeListeners=lt(st(this.contextWindow,"pointermove",this.handlePointerMove),st(this.contextWindow,"pointerup",this.handlePointerUp),st(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ot(this.updatePoint)}}function Ss(e,t){return t?{point:t(e.point)}:e}function Bc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xs({point:e},t){return{point:e,delta:Bc(e,Op(t)),offset:Bc(e,C1(t)),velocity:E1(t,.1)}}function C1(e){return e[0]}function Op(e){return e[e.length-1]}function E1(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Op(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>At(t)));)n--;if(!r)return{x:0,y:0};const o=at(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Le(e){return e.max-e.min}function Dl(e,t=0,n=.01){return Math.abs(e-t)<=n}function Uc(e,t,n,r=.5){e.origin=r,e.originPoint=H(t.min,t.max,e.origin),e.scale=Le(n)/Le(t),(Dl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(Dl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function kr(e,t,n,r){Uc(e.x,t.x,n.x,r?r.originX:void 0),Uc(e.y,t.y,n.y,r?r.originY:void 0)}function $c(e,t,n){e.min=n.min+t.min,e.max=e.min+Le(t)}function R1(e,t,n){$c(e.x,t.x,n.x),$c(e.y,t.y,n.y)}function Wc(e,t,n){e.min=t.min-n.min,e.max=e.min+Le(t)}function Cr(e,t,n){Wc(e.x,t.x,n.x),Wc(e.y,t.y,n.y)}function V1(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?H(n,e,r.max):Math.min(e,n)),e}function Hc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function M1(e,{top:t,left:n,bottom:r,right:i}){return{x:Hc(e.x,n,i),y:Hc(e.y,t,r)}}function Kc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Gr(t.min,t.max-r,e.min):r>i&&(n=Gr(e.min,e.max-i,t.min)),jt(0,1,n)}function A1(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Al=.35;function _1(e=Al){return e===!1?e=0:e===!0&&(e=Al),{x:Gc(e,"left","right"),y:Gc(e,"top","bottom")}}function Gc(e,t,n){return{min:Qc(e,t),max:Qc(e,n)}}function Qc(e,t){return typeof e=="number"?e:e[t]||0}const Yc=()=>({translate:0,scale:1,origin:0,originPoint:0}),An=()=>({x:Yc(),y:Yc()}),Xc=()=>({min:0,max:0}),X=()=>({x:Xc(),y:Xc()});function Ne(e){return[e("x"),e("y")]}function zp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function N1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function F1(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ps(e){return e===void 0||e===1}function _l({scale:e,scaleX:t,scaleY:n}){return!Ps(e)||!Ps(t)||!Ps(n)}function Zt(e){return _l(e)||Ip(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ip(e){return Zc(e.x)||Zc(e.y)}function Zc(e){return e&&e!=="0%"}function go(e,t,n){const r=e-n,i=t*r;return n+i}function qc(e,t,n,r,i){return i!==void 0&&(e=go(e,i,r)),go(e,n,r)+t}function Nl(e,t=0,n=1,r,i){e.min=qc(e.min,t,n,r,i),e.max=qc(e.max,t,n,r,i)}function Bp(e,{x:t,y:n}){Nl(e.x,t.translate,t.scale,t.originPoint),Nl(e.y,n.translate,n.scale,n.originPoint)}function j1(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let l=0;l1.0000000000001||e<.999999999999?e:1}function wt(e,t){e.min=e.min+t,e.max=e.max+t}function bc(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=H(e.min,e.max,o);Nl(e,t[n],t[r],s,t.scale)}const O1=["x","scaleX","originX"],z1=["y","scaleY","originY"];function _n(e,t){bc(e.x,t,O1),bc(e.y,t,z1)}function Up(e,t){return zp(F1(e.getBoundingClientRect(),t))}function I1(e,t,n){const r=Up(e,n),{scroll:i}=t;return i&&(wt(r.x,i.offset.x),wt(r.y,i.offset.y)),r}const $p=({current:e})=>e?e.ownerDocument.defaultView:null,B1=new WeakMap;class U1{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Oo(c,"page").point)},o=(c,f)=>{const{drag:d,dragPropagation:g,onDragStart:y}=this.getProps();if(d&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=np(d),!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),Ne(T=>{let m=this.getAxisMotionValue(T).get()||0;if(be.test(m)){const{projection:h}=this.visualElement;if(h&&h.layout){const p=h.layout.layoutBox[T];p&&(m=Le(p)*(parseFloat(m)/100))}}this.originPoint[T]=m}),y&&z.postRender(()=>y(c,f));const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(c,f)=>{const{dragPropagation:d,dragDirectionLock:g,onDirectionLock:y,onDrag:v}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:T}=f;if(g&&this.currentDirection===null){this.currentDirection=$1(T),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,T),this.updateAxis("y",f.point,T),this.visualElement.render(),v&&v(c,f)},l=(c,f)=>this.stop(c,f),a=()=>Ne(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new jp(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:$p(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&z.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ki(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=V1(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Ln(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=M1(i.layoutBox,n):this.constraints=!1,this.elastic=_1(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ne(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=A1(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ln(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=I1(r,i.root,this.visualElement.getTransformPagePoint());let s=L1(i.layout.layoutBox,o);if(n){const l=n(N1(s));this.hasMutatedConstraints=!!l,l&&(s=zp(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=Ne(c=>{if(!ki(c,n,this.currentDirection))return;let f=a&&a[c]||{};s&&(f={min:0,max:0});const d=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(nu(t,r,0,n,this.visualElement))}stopAnimation(){Ne(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ne(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ne(n=>{const{drag:r}=this.getProps();if(!ki(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n];o.set(t[n]-H(s,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ln(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ne(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const a=l.get();i[s]=D1({min:a,max:a},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ne(s=>{if(!ki(s,t,null))return;const l=this.getAxisMotionValue(s),{min:a,max:u}=this.constraints[s];l.set(H(a,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;B1.set(this.visualElement,this);const t=this.visualElement.current,n=st(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Ln(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=it(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ne(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=a[c].translate,f.set(f.get()+a[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Al,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function ki(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $1(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class W1 extends $t{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new U1(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const ef=e=>(t,n)=>{e&&z.postRender(()=>e(t,n))};class H1 extends $t{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new jp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$p(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ef(t),onStart:ef(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&z.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=st(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function K1(){const e=C.useContext(No);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.useId();return C.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function tf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=tf(e,t.target.x),r=tf(e,t.target.y);return`${n}% ${r}%`}},G1={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=zt.parse(e);if(i.length>5)return r;const o=zt.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=a;const u=H(l,a,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class Q1 extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Hy(Y1),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||z.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Na.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wp(e){const[t,n]=K1(),r=C.useContext(Oa);return _.jsx(Q1,{...e,layoutGroup:r,switchLayoutGroup:C.useContext(Bh),isPresent:t,safeToRemove:n})}const Y1={borderRadius:{...lr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lr,borderTopRightRadius:lr,borderBottomLeftRadius:lr,borderBottomRightRadius:lr,boxShadow:G1},Hp=["TopLeft","TopRight","BottomLeft","BottomRight"],X1=Hp.length,nf=e=>typeof e=="string"?parseFloat(e):e,rf=e=>typeof e=="number"||L.test(e);function Z1(e,t,n,r,i,o){i?(e.opacity=H(0,n.opacity!==void 0?n.opacity:1,q1(r)),e.opacityExit=H(t.opacity!==void 0?t.opacity:1,0,J1(r))):o&&(e.opacity=H(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Gr(e,t,r))}function sf(e,t){e.min=t.min,e.max=t.max}function _e(e,t){sf(e.x,t.x),sf(e.y,t.y)}function lf(e,t,n,r,i){return e-=t,e=go(e,1/n,r),i!==void 0&&(e=go(e,1/i,r)),e}function b1(e,t=0,n=1,r=.5,i,o=e,s=e){if(be.test(t)&&(t=parseFloat(t),t=H(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=H(o.min,o.max,r);e===o&&(l-=t),e.min=lf(e.min,t,n,l,i),e.max=lf(e.max,t,n,l,i)}function af(e,t,[n,r,i],o,s){b1(e,t[n],t[r],t[i],t.scale,o,s)}const ew=["x","scaleX","originX"],tw=["y","scaleY","originY"];function uf(e,t,n,r){af(e.x,t,ew,n?n.x:void 0,r?r.x:void 0),af(e.y,t,tw,n?n.y:void 0,r?r.y:void 0)}function cf(e){return e.translate===0&&e.scale===1}function Gp(e){return cf(e.x)&&cf(e.y)}function nw(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Qp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function ff(e){return Le(e.x)/Le(e.y)}class rw{constructor(){this.members=[]}add(t){ru(this.members,t),t.scheduleRender()}remove(t){if(iu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function df(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:g,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const iw=(e,t)=>e.depth-t.depth;class ow{constructor(){this.children=[],this.isDirty=!1}add(t){ru(this.children,t),this.isDirty=!0}remove(t){iu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iw),this.isDirty=!1,this.children.forEach(t)}}function sw(e,t){const n=_t.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ot(r),e(o-t))};return z.read(r,!0),()=>Ot(r)}function lw(e){window.MotionDebug&&window.MotionDebug.record(e)}function aw(e){return e instanceof SVGElement&&e.tagName!=="svg"}function uw(e,t,n){const r=he(e)?e:Qr(e);return r.start(nu("",r,t,n)),r.animation}const Ts=["","X","Y","Z"],cw={visibility:"hidden"},hf=1e3;let fw=0;const qt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ks(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Yp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=fw++,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,qt.totalNodes=qt.resolvedTargetDeltas=qt.recalculatedProjection=0,this.nodes.forEach(pw),this.nodes.forEach(ww),this.nodes.forEach(Sw),this.nodes.forEach(mw),lw(qt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=sw(d,250),Ii.hasAnimatedSinceResize&&(Ii.hasAnimatedSinceResize=!1,this.nodes.forEach(mf))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Cw,{onLayoutAnimationStart:T,onLayoutAnimationComplete:m}=c.getProps(),h=!this.targetLayout||!Qp(this.targetLayout,y)||g,p=!d&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||p||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,p);const w={...Qa(v,"layout"),onPlay:T,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ot(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(xw),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!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 c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(gw),this.sharedNodes.forEach(Pw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){z.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 a=0;a{const S=w/1e3;gf(f.x,s.x,S),gf(f.y,s.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cr(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Tw(this.relativeTarget,this.relativeTargetOrigin,d,S),p&&nw(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=X()),_e(p,this.relativeTarget)),v&&(this.animationValues=c,Z1(c,u,this.latestValues,S,h,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{Ii.hasAnimatedSinceResize=!0,this.currentAnimation=uw(0,hf,{...s,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=s;if(!(!l||!a||!u)){if(this!==s&&this.layout&&u&&Xp(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||X();const f=Le(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+f;const d=Le(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+d}_e(l,a),_n(l,c),kr(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new rw),this.sharedNodes.get(s).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:l}=this.options;return l?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:l}=this.options;return l?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:a}=s;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const u={};a.z&&ks("z",s,u,this.animationValues);for(let c=0;c{var l;return(l=s.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(pf),this.root.sharedNodes.clear()}}}function dw(e){e.updateLayout()}function hw(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?Ne(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],g=Le(d);d.min=r[f].min,d.max=d.min+g}):Xp(o,n.layoutBox,r)&&Ne(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],g=Le(r[f]);d.max=d.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const l=An();kr(l,r,n.layoutBox);const a=An();s?kr(a,e.applyTransform(i,!0),n.measuredBox):kr(a,r,n.layoutBox);const u=!Gp(l);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:g}=f;if(d&&g){const y=X();Cr(y,n.layoutBox,d.layoutBox);const v=X();Cr(v,r,g.layoutBox),Qp(y,v)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function pw(e){qt.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mw(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gw(e){e.clearSnapshot()}function pf(e){e.clearMeasurements()}function yw(e){e.isLayoutDirty=!1}function vw(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function mf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ww(e){e.resolveTargetDelta()}function Sw(e){e.calcProjection()}function xw(e){e.resetSkewAndRotation()}function Pw(e){e.removeLeadSnapshot()}function gf(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function yf(e,t,n,r){e.min=H(t.min,n.min,r),e.max=H(t.max,n.max,r)}function Tw(e,t,n,r){yf(e.x,t.x,n.x,r),yf(e.y,t.y,n.y,r)}function kw(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Cw={duration:.45,ease:[.4,0,.1,1]},vf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wf=vf("applewebkit/")&&!vf("chrome/")?Math.round:pe;function Sf(e){e.min=wf(e.min),e.max=wf(e.max)}function Ew(e){Sf(e.x),Sf(e.y)}function Xp(e,t,n){return e==="position"||e==="preserve-aspect"&&!Dl(ff(t),ff(n),.2)}const Rw=Yp({attachResizeListener:(e,t)=>it(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Cs={current:void 0},Zp=Yp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cs.current){const e=new Rw({});e.mount(window),e.setOptions({layoutScroll:!0}),Cs.current=e}return Cs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Vw={pan:{Feature:H1},drag:{Feature:W1,ProjectionNode:Zp,MeasureLayout:Wp}},Fl={current:null},qp={current:!1};function Mw(){if(qp.current=!0,!!Da)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addListener(t),t()}else Fl.current=!1}function Lw(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(he(o))e.addValue(i,o),mo(r)&&r.add(i);else if(he(s))e.addValue(i,Qr(o,{owner:e})),mo(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const l=e.getValue(i);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,Qr(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const xf=new WeakMap,Dw=[...cp,fe,zt],Aw=e=>Dw.find(up(e)),Jp=Object.keys(Hr),_w=Jp.length,Pf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Nw=ja.length;function bp(e){if(e)return e.options.allowProjection!==!1?e.projection:bp(e.parent)}class Fw{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},l={}){this.resolveKeyframes=(d,g,y,v)=>new this.KeyframeResolver(d,g,y,v,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ya,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=()=>z.render(this.render,!1,!0);const{latestValues:a,renderState:u}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=jo(n),this.isVariantNode=Ih(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const g=f[d];a[d]!==void 0&&he(g)&&(g.set(a[d],!1),mo(c)&&c.add(d))}}mount(t){this.current=t,xf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qp.current||Mw(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var t;xf.delete(this.current),this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(t=this.features[n])===null||t===void 0||t.unmount();this.current=null}bindToMotionValue(t,n){const r=mn.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,l;for(let a=0;a<_w;a++){const u=Jp[a],{isEnabled:c,Feature:f,ProjectionNode:d,MeasureLayout:g}=Hr[u];d&&(s=d),c(n)&&(!this.features[u]&&f&&(this.features[u]=new f(this)),g&&(l=g))}if((this.type==="html"||this.type==="svg")&&!this.projection&&s){this.projection=new s(this.latestValues,bp(this.parent));const{layoutId:a,layout:u,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:g}=n;this.projection.setOptions({layoutId:a,layout:u,alwaysMeasureLayout:!!c||f&&Ln(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:g})}return l}updateFeatures(){for(const t in this.features){const n=this.features[t];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):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(lp(i)||sp(i))?i=parseFloat(i):!Aw(i)&&zt.test(n)&&(i=vp(t,n)),this.setBaseTarget(t,he(i)?i.get():i)),he(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const s=Ga(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(i=s[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!he(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ou),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class em extends Fw{constructor(){super(...arguments),this.KeyframeResolver=wp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function jw(e){return window.getComputedStyle(e)}class Ow extends em{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(mn.has(n)){const r=Za(n);return r&&r.default||0}else{const r=jw(t),i=(Wh(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Up(t,n)}build(t,n,r,i){Ua(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ka(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;he(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Yh(t,n,r,i)}}class zw extends em{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(mn.has(n)){const r=Za(n);return r&&r.default||0}return n=Xh.has(n)?n:_a(n),t.getAttribute(n)}measureInstanceViewportBox(){return X()}scrapeMotionValuesFromProps(t,n,r){return qh(t,n,r)}build(t,n,r,i){Wa(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Zh(t,n,r,i)}mount(t){this.isSVGTag=Ha(t.tagName),super.mount(t)}}const Iw=(e,t)=>za(e)?new zw(t,{enableHardwareAcceleration:!1}):new Ow(t,{allowProjection:e!==C.Fragment,enableHardwareAcceleration:!0}),Bw={layout:{ProjectionNode:Zp,MeasureLayout:Wp}},Uw={...T1,...Av,...Vw,...Bw},bt=$y((e,t)=>wv(e,t,Uw,Iw));function tm(){const e=C.useRef(!1);return Aa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function $w(){const e=tm(),[t,n]=C.useState(0),r=C.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.useCallback(()=>z.postRender(r),[r]),t]}class Ww extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Hw({children:e,isPresent:t}){const n=C.useId(),r=C.useRef(null),i=C.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=C.useContext(La);return C.useInsertionEffect(()=>{const{width:s,height:l,top:a,left:u}=i.current;if(t||!r.current||!s||!l)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${s}px !important; - height: ${l}px !important; - top: ${a}px !important; - left: ${u}px !important; - } - `),()=>{document.head.removeChild(c)}},[t]),_.jsx(Ww,{isPresent:t,childRef:r,sizeRef:i,children:C.cloneElement(e,{ref:r})})}const Es=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const l=Jh(Kw),a=C.useId(),u=C.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:c=>{l.set(c,!0);for(const f of l.values())if(!f)return;r&&r()},register:c=>(l.set(c,!1),()=>l.delete(c))}),o?[Math.random()]:[n]);return C.useMemo(()=>{l.forEach((c,f)=>l.set(f,!1))},[n]),C.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),s==="popLayout"&&(e=_.jsx(Hw,{isPresent:n,children:e})),_.jsx(No.Provider,{value:u,children:e})};function Kw(){return new Map}function Gw(e){return C.useEffect(()=>()=>e(),[])}const Jt=e=>e.key||"";function Qw(e,t){e.forEach(n=>{const r=Jt(n);t.set(r,n)})}function Yw(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const Xw=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const l=C.useContext(Oa).forceRender||$w()[0],a=tm(),u=Yw(e);let c=u;const f=C.useRef(new Map).current,d=C.useRef(c),g=C.useRef(new Map).current,y=C.useRef(!0);if(Aa(()=>{y.current=!1,Qw(u,g),d.current=c}),Gw(()=>{y.current=!0,g.clear(),f.clear()}),y.current)return _.jsx(_.Fragment,{children:c.map(h=>_.jsx(Es,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s,children:h},Jt(h)))});c=[...c];const v=d.current.map(Jt),T=u.map(Jt),m=v.length;for(let h=0;h{if(T.indexOf(p)!==-1)return;const w=g.get(p);if(!w)return;const S=v.indexOf(p);let k=h;if(!k){const E=()=>{f.delete(p);const P=Array.from(g.keys()).filter(A=>!T.includes(A));if(P.forEach(A=>g.delete(A)),d.current=u.filter(A=>{const M=Jt(A);return M===p||P.includes(M)}),!f.size){if(a.current===!1)return;l(),r&&r()}};k=_.jsx(Es,{isPresent:!1,onExitComplete:E,custom:t,presenceAffectsLayout:o,mode:s,children:w},Jt(w)),f.set(p,k)}c.splice(S,0,k)}),c=c.map(h=>{const p=h.key;return f.has(p)?h:_.jsx(Es,{isPresent:!0,presenceAffectsLayout:o,mode:s,children:h},Jt(h))}),_.jsx(_.Fragment,{children:f.size?c:c.map(h=>C.cloneElement(h))})},Tf=({resetGame:e})=>_.jsx("button",{onClick:()=>e(),children:"New Game"}),yn=({ind:e,updateSquares:t,clsName:n})=>{const r=()=>{t(e)};return _.jsx(bt.div,{initial:{scale:0},animate:{scale:1},className:"square",onClick:r,children:n&&_.jsx(bt.span,{initial:{scale:0},animate:{scale:1},className:n})})};function Zw(){const[e,t]=C.useState(Array(9).fill("")),[n,r]=C.useState("x"),[i,o]=C.useState(null),s=()=>{for(let c of e)if(!c)return!1;return!0},l=()=>{const c=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];for(let f of c){const[d,g,y]=f;if(e[d]&&e[d]===e[g]&&e[d]===e[y])return e[d]}return null},a=c=>{if(e[c]||i)return;const f=e;f[c]=n,t(f),r(n==="x"?"o":"x");const d=l();d?o(d):s()&&o("x | o")},u=()=>{t(Array(9).fill("")),r("x"),o(null)};return _.jsxs("div",{className:"tic-tac-toe",children:[_.jsx("h1",{children:" TIC-TAC-TOE "}),_.jsx(Tf,{resetGame:u}),_.jsx("div",{className:"game",children:Array.from("012345678").map(c=>_.jsx(yn,{ind:c,updateSquares:a,clsName:e[c]},c))}),_.jsxs("div",{className:`turn ${n==="x"?"left":"right"}`,children:[_.jsx(yn,{clsName:"x"}),_.jsx(yn,{clsName:"o"})]}),_.jsx(Xw,{children:i&&_.jsx(bt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"winner",children:_.jsxs(bt.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0,opacity:0},className:"text",children:[_.jsx(bt.h2,{initial:{scale:0,y:100},animate:{scale:1,y:0,transition:{y:{delay:.7},duration:.7}},children:i==="x | o"?"No Winner :/":"Win !! :)"}),_.jsx(bt.div,{initial:{scale:0},animate:{scale:1,transition:{delay:1.3,duration:.2}},className:"win",children:i==="x | o"?_.jsxs(_.Fragment,{children:[_.jsx(yn,{clsName:"x"}),_.jsx(yn,{clsName:"o"})]}):_.jsx(_.Fragment,{children:_.jsx(yn,{clsName:i})})}),_.jsx(bt.div,{initial:{scale:0},animate:{scale:1,transition:{delay:1.5,duration:.3}},children:_.jsx(Tf,{resetGame:u})})]},"child-box")},"parent-box")})]})}const qw=Rs.createRoot(document.getElementById("root"));qw.render(_.jsx(vm.StrictMode,{children:_.jsx(Zw,{})})); diff --git a/assets/index-P9Si_Nv0.js b/assets/index-P9Si_Nv0.js new file mode 100644 index 0000000..e32bf40 --- /dev/null +++ b/assets/index-P9Si_Nv0.js @@ -0,0 +1,48 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function im(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ef={exports:{}},vo={},Mf={exports:{}},F={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Yr=Symbol.for("react.element"),om=Symbol.for("react.portal"),sm=Symbol.for("react.fragment"),lm=Symbol.for("react.strict_mode"),am=Symbol.for("react.profiler"),um=Symbol.for("react.provider"),cm=Symbol.for("react.context"),fm=Symbol.for("react.forward_ref"),dm=Symbol.for("react.suspense"),hm=Symbol.for("react.memo"),pm=Symbol.for("react.lazy"),au=Symbol.iterator;function mm(e){return e===null||typeof e!="object"?null:(e=au&&e[au]||e["@@iterator"],typeof e=="function"?e:null)}var Rf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vf=Object.assign,Af={};function Yn(e,t,n){this.props=e,this.context=t,this.refs=Af,this.updater=n||Rf}Yn.prototype.isReactComponent={};Yn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Df(){}Df.prototype=Yn.prototype;function Il(e,t,n){this.props=e,this.context=t,this.refs=Af,this.updater=n||Rf}var zl=Il.prototype=new Df;zl.constructor=Il;Vf(zl,Yn.prototype);zl.isPureReactComponent=!0;var uu=Array.isArray,Lf=Object.prototype.hasOwnProperty,Bl={current:null},_f={key:!0,ref:!0,__self:!0,__source:!0};function Nf(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Lf.call(t,r)&&!_f.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,te=M[Y];if(0>>1;Yi(Uo,N))Gti(ii,Uo)?(M[Y]=ii,M[Gt]=N,Y=Gt):(M[Y]=Uo,M[Kt]=N,Y=Kt);else if(Gti(ii,N))M[Y]=ii,M[Gt]=N,Y=Gt;else break e}}return L}function i(M,L){var N=M.sortIndex-L.sortIndex;return N!==0?N:M.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,f=null,d=3,g=!1,y=!1,v=!1,P=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(M){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=M)r(u),L.sortIndex=L.expirationTime,t(a,L);else break;L=n(u)}}function w(M){if(v=!1,p(M),!y)if(n(a)!==null)y=!0,Ce(S);else{var L=n(u);L!==null&&Ht(w,L.startTime-M)}}function S(M,L){y=!1,v&&(v=!1,m(T),T=-1),g=!0;var N=d;try{for(p(L),f=n(a);f!==null&&(!(f.expirationTime>L)||M&&!ee());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,d=f.priorityLevel;var te=Y(f.expirationTime<=L);L=e.unstable_now(),typeof te=="function"?f.callback=te:f===n(a)&&r(a),p(L)}else r(a);f=n(a)}if(f!==null)var ri=!0;else{var Kt=n(u);Kt!==null&&Ht(w,Kt.startTime-L),ri=!1}return ri}finally{f=null,d=N,g=!1}}var k=!1,E=null,T=-1,_=5,V=-1;function ee(){return!(e.unstable_now()-V<_)}function pt(){if(E!==null){var M=e.unstable_now();V=M;var L=!0;try{L=E(!0,M)}finally{L?Wt():(k=!1,E=null)}}else k=!1}var Wt;if(typeof h=="function")Wt=function(){h(pt)};else if(typeof MessageChannel<"u"){var Jn=new MessageChannel,ie=Jn.port2;Jn.port1.onmessage=pt,Wt=function(){ie.postMessage(null)}}else Wt=function(){P(pt,0)};function Ce(M){E=M,k||(k=!0,Wt())}function Ht(M,L){T=P(function(){M(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,Ce(S))},e.unstable_forceFrameRate=function(M){0>M||125Y?(M.sortIndex=N,t(u,M),n(a)===null&&M===n(u)&&(v?(m(T),T=-1):v=!0,Ht(w,N-Y))):(M.sortIndex=te,t(a,M),y||g||(y=!0,Ce(S))),M},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(M){var L=d;return function(){var N=d;d=L;try{return M.apply(this,arguments)}finally{d=N}}}})(zf);If.exports=zf;var Mm=If.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rm=C,Ve=Mm;function x(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vs=Object.prototype.hasOwnProperty,Vm=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fu={},du={};function Am(e){return Vs.call(du,e)?!0:Vs.call(fu,e)?!1:Vm.test(e)?du[e]=!0:(fu[e]=!0,!1)}function Dm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Lm(e,t,n,r){if(t===null||typeof t>"u"||Dm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function we(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ae[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ae[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ae[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ae[e]=new we(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ae[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ae[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ae[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ae[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ae[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var $l=/[\-:]([a-z])/g;function Wl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($l,Wl);ae[t]=new we(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($l,Wl);ae[t]=new we(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($l,Wl);ae[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ae[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});ae.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ae[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hl(e,t,n,r){var i=ae.hasOwnProperty(t)?ae[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var a=` +`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Ho=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ar(e):""}function _m(e){switch(e.tag){case 5:return ar(e.type);case 16:return ar("Lazy");case 13:return ar("Suspense");case 19:return ar("SuspenseList");case 0:case 2:case 15:return e=Ko(e.type,!1),e;case 11:return e=Ko(e.type.render,!1),e;case 1:return e=Ko(e.type,!0),e;default:return""}}function _s(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wn:return"Fragment";case vn:return"Portal";case As:return"Profiler";case Kl:return"StrictMode";case Ds:return"Suspense";case Ls:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $f:return(e.displayName||"Context")+".Consumer";case Uf:return(e._context.displayName||"Context")+".Provider";case Gl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ql:return t=e.displayName||null,t!==null?t:_s(e.type)||"Memo";case yt:t=e._payload,e=e._init;try{return _s(e(t))}catch{}}return null}function Nm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _s(t);case 8:return t===Kl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Nt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fm(e){var t=Hf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function li(e){e._valueTracker||(e._valueTracker=Fm(e))}function Kf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ns(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Nt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gf(e,t){t=t.checked,t!=null&&Hl(e,"checked",t,!1)}function Fs(e,t){Gf(e,t);var n=Nt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?js(e,t.type,n):t.hasOwnProperty("defaultValue")&&js(e,t.type,Nt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function js(e,t,n){(t!=="number"||Bi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function Nn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jm=["Webkit","ms","Moz","O"];Object.keys(hr).forEach(function(e){jm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hr[t]=hr[e]})});function Zf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hr.hasOwnProperty(e)&&hr[e]?(""+t).trim():t+"px"}function qf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Zf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Om=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zs(e,t){if(t){if(Om[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function Bs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Us=null;function Yl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $s=null,Fn=null,jn=null;function vu(e){if(e=qr(e)){if(typeof $s!="function")throw Error(x(280));var t=e.stateNode;t&&(t=To(t),$s(e.stateNode,e.type,t))}}function Jf(e){Fn?jn?jn.push(e):jn=[e]:Fn=e}function bf(){if(Fn){var e=Fn,t=jn;if(jn=Fn=null,vu(e),t)for(e=0;e>>=0,e===0?32:31-(Ym(e)/Xm|0)|0}var ui=64,ci=4194304;function cr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=cr(l):(o&=s,o!==0&&(r=cr(o)))}else s=n&~i,s!==0?r=cr(s):o!==0&&(r=cr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Xr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function bm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mr),Mu=" ",Ru=!1;function wd(e,t){switch(e){case"keyup":return Mg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function Vg(e,t){switch(e){case"compositionend":return Sd(t);case"keypress":return t.which!==32?null:(Ru=!0,Mu);case"textInput":return e=t.data,e===Mu&&Ru?null:e;default:return null}}function Ag(e,t){if(Sn)return e==="compositionend"||!na&&wd(e,t)?(e=yd(),Ri=bl=Pt=null,Sn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lu(n)}}function kd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cd(){for(var e=window,t=Bi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bi(e.document)}return t}function ra(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function zg(e){var t=Cd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&kd(n.ownerDocument.documentElement,n)){if(r!==null&&ra(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_u(n,o);var s=_u(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,xn=null,Ys=null,yr=null,Xs=!1;function Nu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xs||xn==null||xn!==Bi(r)||(r=xn,"selectionStart"in r&&ra(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yr&&_r(yr,r)||(yr=r,r=Qi(Ys,"onSelect"),0kn||(e.current=tl[kn],tl[kn]=null,kn--)}function z(e,t){kn++,tl[kn]=e.current,e.current=t}var Ft={},me=Bt(Ft),Pe=Bt(!1),an=Ft;function Un(e,t){var n=e.type.contextTypes;if(!n)return Ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function Xi(){U(Pe),U(me)}function Uu(e,t,n){if(me.current!==Ft)throw Error(x(168));z(me,t),z(Pe,n)}function Nd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(x(108,Nm(e)||"Unknown",i));return G({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ft,an=me.current,z(me,e),z(Pe,Pe.current),!0}function $u(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=Nd(e,t,an),r.__reactInternalMemoizedMergedChildContext=e,U(Pe),U(me),z(me,e)):U(Pe),z(Pe,n)}var tt=null,ko=!1,os=!1;function Fd(e){tt===null?tt=[e]:tt.push(e)}function qg(e){ko=!0,Fd(e)}function Ut(){if(!os&&tt!==null){os=!0;var e=0,t=O;try{var n=tt;for(O=1;e>=s,i-=s,nt=1<<32-Ke(t)+i|n<T?(_=E,E=null):_=E.sibling;var V=d(m,E,p[T],w);if(V===null){E===null&&(E=_);break}e&&E&&V.alternate===null&&t(m,E),h=o(V,h,T),k===null?S=V:k.sibling=V,k=V,E=_}if(T===p.length)return n(m,E),$&&Yt(m,T),S;if(E===null){for(;TT?(_=E,E=null):_=E.sibling;var ee=d(m,E,V.value,w);if(ee===null){E===null&&(E=_);break}e&&E&&ee.alternate===null&&t(m,E),h=o(ee,h,T),k===null?S=ee:k.sibling=ee,k=ee,E=_}if(V.done)return n(m,E),$&&Yt(m,T),S;if(E===null){for(;!V.done;T++,V=p.next())V=f(m,V.value,w),V!==null&&(h=o(V,h,T),k===null?S=V:k.sibling=V,k=V);return $&&Yt(m,T),S}for(E=r(m,E);!V.done;T++,V=p.next())V=g(E,m,T,V.value,w),V!==null&&(e&&V.alternate!==null&&E.delete(V.key===null?T:V.key),h=o(V,h,T),k===null?S=V:k.sibling=V,k=V);return e&&E.forEach(function(pt){return t(m,pt)}),$&&Yt(m,T),S}function P(m,h,p,w){if(typeof p=="object"&&p!==null&&p.type===wn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case si:e:{for(var S=p.key,k=h;k!==null;){if(k.key===S){if(S=p.type,S===wn){if(k.tag===7){n(m,k.sibling),h=i(k,p.props.children),h.return=m,m=h;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===yt&&Ku(S)===k.type){n(m,k.sibling),h=i(k,p.props),h.ref=ir(m,k,p),h.return=m,m=h;break e}n(m,k);break}else t(m,k);k=k.sibling}p.type===wn?(h=sn(p.props.children,m.mode,w,p.key),h.return=m,m=h):(w=ji(p.type,p.key,p.props,null,m.mode,w),w.ref=ir(m,h,p),w.return=m,m=w)}return s(m);case vn:e:{for(k=p.key;h!==null;){if(h.key===k)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(m,h.sibling),h=i(h,p.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=hs(p,m.mode,w),h.return=m,m=h}return s(m);case yt:return k=p._init,P(m,h,k(p._payload),w)}if(ur(p))return y(m,h,p,w);if(bn(p))return v(m,h,p,w);yi(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(m,h.sibling),h=i(h,p),h.return=m,m=h):(n(m,h),h=ds(p,m.mode,w),h.return=m,m=h),s(m)):n(m,h)}return P}var Wn=zd(!0),Bd=zd(!1),bi=Bt(null),eo=null,Mn=null,la=null;function aa(){la=Mn=eo=null}function ua(e){var t=bi.current;U(bi),e._currentValue=t}function il(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function In(e,t){eo=e,la=Mn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xe=!0),e.firstContext=null)}function ze(e){var t=e._currentValue;if(la!==e)if(e={context:e,memoizedValue:t,next:null},Mn===null){if(eo===null)throw Error(x(308));Mn=e,eo.dependencies={lanes:0,firstContext:e}}else Mn=Mn.next=e;return t}var tn=null;function ca(e){tn===null?tn=[e]:tn.push(e)}function Ud(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ca(t)):(n.next=i.next,i.next=n),t.interleaved=n,ft(e,r)}function ft(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var vt=!1;function fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $d(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,j&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ft(e,n)}return i=r.interleaved,i===null?(t.next=t,ca(r)):(t.next=i.next,i.next=t),r.interleaved=t,ft(e,n)}function Ai(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zl(e,n)}}function Gu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function to(e,t,n,r){var i=e.updateQueue;vt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var f=i.baseState;s=0,c=u=a=null,l=o;do{var d=l.lane,g=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(d=t,g=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(g,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,d=typeof y=="function"?y.call(g,f,d):y,d==null)break e;f=G({},f,d);break e;case 2:vt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else g={eventTime:g,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=g,a=f):c=c.next=g,s|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);fn|=s,e.lanes=s,e.memoizedState=f}}function Qu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ls.transition;ls.transition={};try{e(!1),t()}finally{O=n,ls.transition=r}}function oh(){return Be().memoizedState}function ty(e,t,n){var r=At(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sh(e))lh(t,n);else if(n=Ud(e,t,n,r),n!==null){var i=ye();Ge(n,e,r,i),ah(n,t,r)}}function ny(e,t,n){var r=At(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sh(e))lh(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Qe(l,s)){var a=t.interleaved;a===null?(i.next=i,ca(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Ud(e,t,i,r),n!==null&&(i=ye(),Ge(n,e,r,i),ah(n,t,r))}}function sh(e){var t=e.alternate;return e===K||t!==null&&t===K}function lh(e,t){vr=ro=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ah(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zl(e,n)}}var io={readContext:ze,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},ry={readContext:ze,useCallback:function(e,t){return Xe().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Xu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Li(4194308,4,eh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){return Li(4,2,e,t)},useMemo:function(e,t){var n=Xe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xe();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ty.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Xe();return e={current:e},t.memoizedState=e},useState:Yu,useDebugValue:wa,useDeferredValue:function(e){return Xe().memoizedState=e},useTransition:function(){var e=Yu(!1),t=e[0];return e=ey.bind(null,e[1]),Xe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,i=Xe();if($){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),re===null)throw Error(x(349));cn&30||Gd(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Xu(Yd.bind(null,r,o,e),[e]),r.flags|=2048,Ur(9,Qd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Xe(),t=re.identifierPrefix;if($){var n=rt,r=nt;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ze]=t,e[jr]=r,vh(e,t,!1,!1),t.stateNode=e;e:{switch(s=Bs(n,r),n){case"dialog":B("cancel",e),B("close",e),i=r;break;case"iframe":case"object":case"embed":B("load",e),i=r;break;case"video":case"audio":for(i=0;iGn&&(t.flags|=128,r=!0,or(o,!1),t.lanes=4194304)}else{if(!r)if(e=no(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),or(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!$)return ce(t),null}else 2*Z()-o.renderingStartTime>Gn&&n!==1073741824&&(t.flags|=128,r=!0,or(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Z(),t.sibling=null,n=W.current,z(W,r?n&1|2:n&1),t):(ce(t),null);case 22:case 23:return Ca(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(ce(t),t.subtreeFlags&6&&(t.flags|=8192)):ce(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function fy(e,t){switch(oa(t),t.tag){case 1:return Te(t.type)&&Xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hn(),U(Pe),U(me),pa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ha(t),null;case 13:if(U(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(W),null;case 4:return Hn(),null;case 10:return ua(t.type._context),null;case 22:case 23:return Ca(),null;case 24:return null;default:return null}}var wi=!1,de=!1,dy=typeof WeakSet=="function"?WeakSet:Set,R=null;function Rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function hl(e,t,n){try{n()}catch(r){Q(e,t,r)}}var sc=!1;function hy(e,t){if(Zs=Ki,e=Cd(),ra(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=s),d===o&&++c===r&&(a=s),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(qs={focusedElem:e,selectionRange:n},Ki=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,P=y.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:$e(t.type,v),P);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(w){Q(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return y=sc,sc=!1,y}function wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&hl(t,n,o)}i=i.next}while(i!==r)}}function Mo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xh(e){var t=e.alternate;t!==null&&(e.alternate=null,xh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ze],delete t[jr],delete t[el],delete t[Xg],delete t[Zg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ph(e){return e.tag===5||e.tag===3||e.tag===4}function lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ph(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ml(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yi));else if(r!==4&&(e=e.child,e!==null))for(ml(e,t,n),e=e.sibling;e!==null;)ml(e,t,n),e=e.sibling}function gl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gl(e,t,n),e=e.sibling;e!==null;)gl(e,t,n),e=e.sibling}var oe=null,We=!1;function mt(e,t,n){for(n=n.child;n!==null;)Th(e,t,n),n=n.sibling}function Th(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount=="function")try{qe.onCommitFiberUnmount(wo,n)}catch{}switch(n.tag){case 5:de||Rn(n,t);case 6:var r=oe,i=We;oe=null,mt(e,t,n),oe=r,We=i,oe!==null&&(We?(e=oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):oe.removeChild(n.stateNode));break;case 18:oe!==null&&(We?(e=oe,n=n.stateNode,e.nodeType===8?is(e.parentNode,n):e.nodeType===1&&is(e,n),Dr(e)):is(oe,n.stateNode));break;case 4:r=oe,i=We,oe=n.stateNode.containerInfo,We=!0,mt(e,t,n),oe=r,We=i;break;case 0:case 11:case 14:case 15:if(!de&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&hl(n,t,s),i=i.next}while(i!==r)}mt(e,t,n);break;case 1:if(!de&&(Rn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Q(n,t,l)}mt(e,t,n);break;case 21:mt(e,t,n);break;case 22:n.mode&1?(de=(r=de)||n.memoizedState!==null,mt(e,t,n),de=r):mt(e,t,n);break;default:mt(e,t,n)}}function ac(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dy),t.forEach(function(r){var i=Py.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ue(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*my(r/1960))-r,10e?16:e,Tt===null)var r=!1;else{if(e=Tt,Tt=null,lo=0,j&6)throw Error(x(331));var i=j;for(j|=4,R=e.current;R!==null;){var o=R,s=o.child;if(R.flags&16){var l=o.deletions;if(l!==null){for(var a=0;aZ()-Ta?on(e,0):Pa|=n),ke(e,t)}function Dh(e,t){t===0&&(e.mode&1?(t=ci,ci<<=1,!(ci&130023424)&&(ci=4194304)):t=1);var n=ye();e=ft(e,t),e!==null&&(Xr(e,t,n),ke(e,n))}function xy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dh(e,n)}function Py(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(t),Dh(e,n)}var Lh;Lh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return xe=!1,uy(e,t,n);xe=!!(e.flags&131072)}else xe=!1,$&&t.flags&1048576&&jd(t,Ji,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_i(e,t),e=t.pendingProps;var i=Un(t,me.current);In(t,n),i=ga(null,t,r,e,i,n);var o=ya();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(r)?(o=!0,Zi(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,fa(t),i.updater=Eo,t.stateNode=i,i._reactInternals=t,sl(t,r,e,n),t=ul(null,t,r,!0,o,n)):(t.tag=0,$&&o&&ia(t),ge(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_i(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ky(r),e=$e(r,e),i){case 0:t=al(null,t,r,e,n);break e;case 1:t=rc(null,t,r,e,n);break e;case 11:t=tc(null,t,r,e,n);break e;case 14:t=nc(null,t,r,$e(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),al(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),rc(e,t,r,i,n);case 3:e:{if(mh(t),e===null)throw Error(x(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$d(e,t),to(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Kn(Error(x(423)),t),t=ic(e,t,r,n,i);break e}else if(r!==i){i=Kn(Error(x(424)),t),t=ic(e,t,r,n,i);break e}else for(Me=Mt(t.stateNode.containerInfo.firstChild),Re=t,$=!0,He=null,n=Bd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($n(),r===i){t=dt(e,t,n);break e}ge(e,t,r,n)}t=t.child}return t;case 5:return Wd(t),e===null&&rl(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Js(r,i)?s=null:o!==null&&Js(r,o)&&(t.flags|=32),ph(e,t),ge(e,t,s,n),t.child;case 6:return e===null&&rl(t),null;case 13:return gh(e,t,n);case 4:return da(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):ge(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),tc(e,t,r,i,n);case 7:return ge(e,t,t.pendingProps,n),t.child;case 8:return ge(e,t,t.pendingProps.children,n),t.child;case 12:return ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,z(bi,r._currentValue),r._currentValue=s,o!==null)if(Qe(o.value,s)){if(o.children===i.children&&!Pe.current){t=dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=ot(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),il(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(x(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),il(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,In(t,n),i=ze(i),r=r(i),t.flags|=1,ge(e,t,r,n),t.child;case 14:return r=t.type,i=$e(r,t.pendingProps),i=$e(r.type,i),nc(e,t,r,i,n);case 15:return dh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$e(r,i),_i(e,t),t.tag=1,Te(r)?(e=!0,Zi(t)):e=!1,In(t,n),uh(t,r,i),sl(t,r,i,n),ul(null,t,r,!0,e,n);case 19:return yh(e,t,n);case 22:return hh(e,t,n)}throw Error(x(156,t.tag))};function _h(e,t){return sd(e,t)}function Ty(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oe(e,t,n,r){return new Ty(e,t,n,r)}function Ma(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ky(e){if(typeof e=="function")return Ma(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gl)return 11;if(e===Ql)return 14}return 2}function Dt(e,t){var n=e.alternate;return n===null?(n=Oe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ji(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Ma(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wn:return sn(n.children,i,o,t);case Kl:s=8,i|=8;break;case As:return e=Oe(12,n,t,i|2),e.elementType=As,e.lanes=o,e;case Ds:return e=Oe(13,n,t,i),e.elementType=Ds,e.lanes=o,e;case Ls:return e=Oe(19,n,t,i),e.elementType=Ls,e.lanes=o,e;case Wf:return Vo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Uf:s=10;break e;case $f:s=9;break e;case Gl:s=11;break e;case Ql:s=14;break e;case yt:s=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=Oe(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function sn(e,t,n,r){return e=Oe(7,e,r,t),e.lanes=n,e}function Vo(e,t,n,r){return e=Oe(22,e,r,t),e.elementType=Wf,e.lanes=n,e.stateNode={isHidden:!1},e}function ds(e,t,n){return e=Oe(6,e,null,t),e.lanes=n,e}function hs(e,t,n){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cy(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qo(0),this.expirationTimes=Qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ra(e,t,n,r,i,o,s,l,a){return e=new Cy(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fa(o),e}function Ey(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Oh)}catch(e){console.error(e)}}Oh(),Of.exports=De;var Dy=Of.exports,gc=Dy;Rs.createRoot=gc.createRoot,Rs.hydrateRoot=gc.hydrateRoot;const La=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),No=C.createContext({}),Fo=C.createContext(null),_a=typeof document<"u",Na=_a?C.useLayoutEffect:C.useEffect,Ih=C.createContext({strict:!1}),Fa=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ly="framerAppearId",zh="data-"+Fa(Ly),_y={skipAnimations:!1,useManualTiming:!1};class yc{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Ny(e){let t=new yc,n=new yc,r=0,i=!1,o=!1;const s=new WeakSet,l={schedule:(a,u=!1,c=!1)=>{const f=c&&i,d=f?t:n;return u&&s.add(a),d.add(a)&&f&&i&&(r=t.order.length),a},cancel:a=>{n.remove(a),s.delete(a)},process:a=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(f[d]=Ny(()=>n=!0),f),{}),s=f=>{o[f].process(i)},l=()=>{const f=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(f-i.timestamp,Fy),1),i.timestamp=f,i.isProcessing=!0,Pi.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(l))},a=()=>{n=!0,r=!0,i.isProcessing||e(l)};return{schedule:Pi.reduce((f,d)=>{const g=o[d];return f[d]=(y,v=!1,P=!1)=>(n||a(),g.schedule(y,v,P)),f},{}),cancel:f=>Pi.forEach(d=>o[d].cancel(f)),state:i,steps:o}}const{schedule:ja,cancel:nS}=Bh(queueMicrotask,!1);function jy(e,t,n,r){const{visualElement:i}=C.useContext(No),o=C.useContext(Ih),s=C.useContext(Fo),l=C.useContext(La).reducedMotion,a=C.useRef();r=r||o.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const u=a.current;C.useInsertionEffect(()=>{u&&u.update(n,s)});const c=C.useRef(!!(n[zh]&&!window.HandoffComplete));return Na(()=>{u&&(ja.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function An(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oy(e,t,n){return C.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):An(n)&&(n.current=r))},[t])}function Wr(e){return typeof e=="string"||Array.isArray(e)}function jo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Oa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ia=["initial",...Oa];function Oo(e){return jo(e.animate)||Ia.some(t=>Wr(e[t]))}function Uh(e){return!!(Oo(e)||e.variants)}function Iy(e,t){if(Oo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wr(n)?n:void 0,animate:Wr(r)?r:void 0}}return e.inherit!==!1?t:{}}function zy(e){const{initial:t,animate:n}=Iy(e,C.useContext(No));return C.useMemo(()=>({initial:t,animate:n}),[vc(t),vc(n)])}function vc(e){return Array.isArray(e)?e.join(" "):e}const wc={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"]},Hr={};for(const e in wc)Hr[e]={isEnabled:t=>wc[e].some(n=>!!t[n])};function By(e){for(const t in e)Hr[t]={...Hr[t],...e[t]}}const za=C.createContext({}),$h=C.createContext({}),Uy=Symbol.for("motionComponentSymbol");function $y({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&By(e);function o(l,a){let u;const c={...C.useContext(La),...l,layoutId:Wy(l)},{isStatic:f}=c,d=zy(l),g=r(l,f);if(!f&&_a){d.visualElement=jy(i,g,c,t);const y=C.useContext($h),v=C.useContext(Ih).strict;d.visualElement&&(u=d.visualElement.loadFeatures(c,v,e,y))}return D.jsxs(No.Provider,{value:d,children:[u&&d.visualElement?D.jsx(u,{visualElement:d.visualElement,...c}):null,n(i,l,Oy(g,d.visualElement,a),g,f,d.visualElement)]})}const s=C.forwardRef(o);return s[Uy]=i,s}function Wy({layoutId:e}){const t=C.useContext(za).id;return t&&e!==void 0?t+"-"+e:e}function Hy(e){function t(r,i={}){return $y(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Ky=["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 Ba(e){return typeof e!="string"||e.includes("-")?!1:!!(Ky.indexOf(e)>-1||/[A-Z]/u.test(e))}const co={};function Gy(e){Object.assign(co,e)}const br=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mn=new Set(br);function Wh(e,{layout:t,layoutId:n}){return mn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!co[e]||e==="opacity")}const he=e=>!!(e&&e.getVelocity),Qy={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yy=br.length;function Xy(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),Kh=Hh("--"),Zy=Hh("var(--"),Ua=e=>Zy(e)?qy.test(e.split("/*")[0].trim()):!1,qy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Jy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,jt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Pr={...qn,transform:e=>jt(0,1,e)},Ti={...qn,default:1},Tr=e=>Math.round(e*1e5)/1e5,$a=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,by=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ev=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ei(e){return typeof e=="string"}const ti=e=>({test:t=>ei(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=ti("deg"),be=ti("%"),A=ti("px"),tv=ti("vh"),nv=ti("vw"),Sc={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},xc={...qn,transform:Math.round},Gh={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:Ti,scaleX:Ti,scaleY:Ti,scaleZ:Ti,skew:gt,skewX:gt,skewY:gt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:Pr,originX:Sc,originY:Sc,originZ:A,zIndex:xc,backgroundPositionX:A,backgroundPositionY:A,fillOpacity:Pr,strokeOpacity:Pr,numOctaves:xc};function Wa(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:l}=e;let a=!1,u=!1,c=!0;for(const f in t){const d=t[f];if(Kh(f)){o[f]=d;continue}const g=Gh[f],y=Jy(d,g);if(mn.has(f)){if(a=!0,s[f]=y,!c)continue;d!==(g.default||0)&&(c=!1)}else f.startsWith("origin")?(u=!0,l[f]=y):i[f]=y}if(t.transform||(a||r?i.transform=Xy(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:d="50%",originZ:g=0}=l;i.transformOrigin=`${f} ${d} ${g}`}}const Ha=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qh(e,t,n){for(const r in t)!he(t[r])&&!Wh(r,n)&&(e[r]=t[r])}function rv({transformTemplate:e},t,n){return C.useMemo(()=>{const r=Ha();return Wa(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function iv(e,t,n){const r=e.style||{},i={};return Qh(i,r,e),Object.assign(i,rv(e,t,n)),i}function ov(e,t,n){const r={},i=iv(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const sv=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sv.has(e)}let Yh=e=>!fo(e);function lv(e){e&&(Yh=t=>t.startsWith("on")?!fo(t):e(t))}try{lv(require("@emotion/is-prop-valid").default)}catch{}function av(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Yh(i)||n===!0&&fo(i)||!t&&!fo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Pc(e,t,n){return typeof e=="string"?e:A.transform(t+n*e)}function uv(e,t,n){const r=Pc(t,e.x,e.width),i=Pc(n,e.y,e.height);return`${r} ${i}`}const cv={offset:"stroke-dashoffset",array:"stroke-dasharray"},fv={offset:"strokeDashoffset",array:"strokeDasharray"};function dv(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?cv:fv;e[o.offset]=A.transform(-r);const s=A.transform(t),l=A.transform(n);e[o.array]=`${s} ${l}`}function Ka(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...u},c,f,d){if(Wa(e,u,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:y,dimensions:v}=e;g.transform&&(v&&(y.transform=g.transform),delete g.transform),v&&(i!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=uv(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),s!==void 0&&dv(g,s,l,a,!1)}const Xh=()=>({...Ha(),attrs:{}}),Ga=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hv(e,t,n,r){const i=C.useMemo(()=>{const o=Xh();return Ka(o,t,{enableHardwareAcceleration:!1},Ga(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Qh(o,e.style,e),i.style={...o,...i.style}}return i}function pv(e=!1){return(n,r,i,{latestValues:o},s)=>{const a=(Ba(n)?hv:ov)(r,o,s,n),u=av(r,typeof n=="string",e),c=n!==C.Fragment?{...u,...a,ref:i}:{},{children:f}=r,d=C.useMemo(()=>he(f)?f.get():f,[f]);return C.createElement(n,{...c,children:d})}}function Zh(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const qh=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 Jh(e,t,n,r){Zh(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(qh.has(i)?i:Fa(i),t.attrs[i])}function Qa(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(he(i[s])||t.style&&he(t.style[s])||Wh(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function bh(e,t,n){const r=Qa(e,t,n);for(const i in e)if(he(e[i])||he(t[i])){const o=br.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function Ya(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function ep(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const xl=e=>Array.isArray(e),mv=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),gv=e=>xl(e)?e[e.length-1]||0:e;function Oi(e){const t=he(e)?e.get():e;return mv(t)?t.toValue():t}function yv({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:vv(r,i,o,e),renderState:t()};return n&&(s.mount=l=>n(r,l,s)),s}const tp=e=>(t,n)=>{const r=C.useContext(No),i=C.useContext(Fo),o=()=>yv(e,t,r,i);return n?o():ep(o)};function vv(e,t,n,r){const i={},o=r(e,{});for(const d in o)i[d]=Oi(o[d]);let{initial:s,animate:l}=e;const a=Oo(e),u=Uh(e);t&&u&&!a&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?l:s;return f&&typeof f!="boolean"&&!jo(f)&&(Array.isArray(f)?f:[f]).forEach(g=>{const y=Ya(e,g);if(!y)return;const{transitionEnd:v,transition:P,...m}=y;for(const h in m){let p=m[h];if(Array.isArray(p)){const w=c?p.length-1:0;p=p[w]}p!==null&&(i[h]=p)}for(const h in v)i[h]=v[h]}),i}const pe=e=>e,{schedule:I,cancel:Ot,state:se,steps:ps}=Bh(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0),wv={useVisualState:tp({scrapeMotionValuesFromProps:bh,createRenderState:Xh,onMount:(e,t,{renderState:n,latestValues:r})=>{I.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),I.render(()=>{Ka(n,r,{enableHardwareAcceleration:!1},Ga(t.tagName),e.transformTemplate),Jh(t,n)})}})},Sv={useVisualState:tp({scrapeMotionValuesFromProps:Qa,createRenderState:Ha})};function xv(e,{forwardMotionProps:t=!1},n,r){return{...Ba(e)?wv:Sv,preloadedFeatures:n,useRender:pv(t),createVisualElement:r,Component:e}}function it(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const np=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Io(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Pv=e=>t=>np(t)&&e(t,Io(t));function st(e,t,n,r){return it(e,t,Pv(n),r)}const Tv=(e,t)=>n=>t(e(n)),lt=(...e)=>e.reduce(Tv);function rp(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Tc=rp("dragHorizontal"),kc=rp("dragVertical");function ip(e){let t=!1;if(e==="y")t=kc();else if(e==="x")t=Tc();else{const n=Tc(),r=kc();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function op(){const e=ip(!0);return e?(e(),!1):!0}class $t{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Cc(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,s)=>{if(o.pointerType==="touch"||op())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t);const a=l[r];a&&I.postRender(()=>a(o,s))};return st(e.current,n,i,{passive:!e.getProps()[r]})}class kv extends $t{mount(){this.unmount=lt(Cc(this.node,!0),Cc(this.node,!1))}unmount(){}}class Cv extends $t{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(it(this.node.current,"focus",()=>this.onFocus()),it(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const sp=(e,t)=>t?e===t?!0:sp(e,t.parentElement):!1;function ms(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Io(n))}class Ev extends $t{constructor(){super(...arguments),this.removeStartListeners=pe,this.removeEndListeners=pe,this.removeAccessibleListeners=pe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=st(window,"pointerup",(l,a)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps(),d=!f&&!sp(this.node.current,l.target)?c:u;d&&I.update(()=>d(l,a))},{passive:!(r.onTap||r.onPointerUp)}),s=st(window,"pointercancel",(l,a)=>this.cancelPress(l,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=lt(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=l=>{l.key!=="Enter"||!this.checkPressEnd()||ms("up",(a,u)=>{const{onTap:c}=this.node.getProps();c&&I.postRender(()=>c(a,u))})};this.removeEndListeners(),this.removeEndListeners=it(this.node.current,"keyup",s),ms("down",(l,a)=>{this.startPress(l,a)})},n=it(this.node.current,"keydown",t),r=()=>{this.isPressing&&ms("cancel",(o,s)=>this.cancelPress(o,s))},i=it(this.node.current,"blur",r);this.removeAccessibleListeners=lt(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&I.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!op()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&I.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=st(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=it(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=lt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pl=new WeakMap,gs=new WeakMap,Mv=e=>{const t=Pl.get(e.target);t&&t(e)},Rv=e=>{e.forEach(Mv)};function Vv({root:e,...t}){const n=e||document;gs.has(n)||gs.set(n,{});const r=gs.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rv,{root:e,...t})),r[i]}function Av(e,t,n){const r=Vv(t);return Pl.set(e,n),r.observe(e),()=>{Pl.delete(e),r.unobserve(e)}}const Dv={some:0,all:1};class Lv extends $t{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Dv[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(a)};return Av(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_v(t,n))&&this.startObserver()}unmount(){}}function _v({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Nv={inView:{Feature:Lv},tap:{Feature:Ev},focus:{Feature:Cv},hover:{Feature:kv}};function lp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function jv(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function zo(e,t,n){const r=e.getProps();return Ya(r,t,n!==void 0?n:r.custom,Fv(e),jv(e))}const Lt=e=>e*1e3,at=e=>e/1e3,Ov={type:"spring",stiffness:500,damping:25,restSpeed:10},Iv=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zv={type:"keyframes",duration:.8},Bv={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Uv=(e,{keyframes:t})=>t.length>2?zv:mn.has(e)?e.startsWith("scale")?Iv(t[1]):Ov:Bv;function $v({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:l,from:a,elapsed:u,...c}){return!!Object.keys(c).length}function Xa(e,t){return e[t]||e.default||e}const Wv=e=>e!==null;function Bo(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Wv),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}let Ii;function Hv(){Ii=void 0}const _t={now:()=>(Ii===void 0&&_t.set(se.isProcessing||_y.useManualTiming?se.timestamp:performance.now()),Ii),set:e=>{Ii=e,queueMicrotask(Hv)}},ap=e=>/^0[^.\s]+$/u.test(e);function Kv(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ap(e):!0}let Tl=pe;const up=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Gv=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qv(e){const t=Gv.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function cp(e,t,n=1){const[r,i]=Qv(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return up(s)?parseFloat(s):s}return Ua(i)?cp(i,t,n+1):i}const Yv=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ec=e=>e===qn||e===A,Mc=(e,t)=>parseFloat(e.split(", ")[t]),Rc=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Mc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?Mc(o[1],e):0}},Xv=new Set(["x","y","z"]),Zv=br.filter(e=>!Xv.has(e));function qv(e){const t=[];return Zv.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Qn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Rc(4,13),y:Rc(5,14)};Qn.translateX=Qn.x;Qn.translateY=Qn.y;const fp=e=>t=>t.test(e),Jv={test:e=>e==="auto",parse:e=>e},dp=[qn,A,be,gt,nv,tv,Jv],Vc=e=>dp.find(fp(e)),ln=new Set;let kl=!1,Cl=!1;function hp(){if(Cl){const e=Array.from(ln).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=qv(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var l;(l=r.getValue(o))===null||l===void 0||l.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Cl=!1,kl=!1,ln.forEach(e=>e.complete()),ln.clear()}function pp(){ln.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cl=!0)})}function bv(){pp(),hp()}class Za{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ln.add(this),kl||(kl=!0,I.read(pp),I.resolveKeyframes(hp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;on=>!!(ei(n)&&ev.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),mp=(e,t,n)=>r=>{if(!ei(r))return r;const[i,o,s,l]=r.match($a);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},e0=e=>jt(0,255,e),ys={...qn,transform:e=>Math.round(e0(e))},rn={test:qa("rgb","red"),parse:mp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ys.transform(e)+", "+ys.transform(t)+", "+ys.transform(n)+", "+Tr(Pr.transform(r))+")"};function t0(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const El={test:qa("#"),parse:t0,transform:rn.transform},Dn={test:qa("hsl","hue"),parse:mp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+be.transform(Tr(t))+", "+be.transform(Tr(n))+", "+Tr(Pr.transform(r))+")"},fe={test:e=>rn.test(e)||El.test(e)||Dn.test(e),parse:e=>rn.test(e)?rn.parse(e):Dn.test(e)?Dn.parse(e):El.parse(e),transform:e=>ei(e)?e:e.hasOwnProperty("red")?rn.transform(e):Dn.transform(e)};function n0(e){var t,n;return isNaN(e)&&ei(e)&&(((t=e.match($a))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(by))===null||n===void 0?void 0:n.length)||0)>0}const gp="number",yp="color",r0="var",i0="var(",Ac="${}",o0=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ho(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(o0,a=>(fe.test(a)?(r.color.push(o),i.push(yp),n.push(fe.parse(a))):a.startsWith(i0)?(r.var.push(o),i.push(r0),n.push(a)):(r.number.push(o),i.push(gp),n.push(parseFloat(a))),++o,Ac)).split(Ac);return{values:n,split:l,indexes:r,types:i}}function vp(e){return ho(e).values}function wp(e){const{split:t,types:n}=ho(e),r=t.length;return i=>{let o="";for(let s=0;stypeof e=="number"?0:e;function l0(e){const t=vp(e);return wp(e)(t.map(s0))}const It={test:n0,parse:vp,createTransformer:wp,getAnimatableNone:l0},a0=new Set(["brightness","contrast","saturate","opacity"]);function u0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($a)||[];if(!r)return e;const i=n.replace(r,"");let o=a0.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const c0=/\b([a-z-]*)\(.*?\)/gu,Ml={...It,getAnimatableNone:e=>{const t=e.match(c0);return t?t.map(u0).join(" "):e}},f0={...Gh,color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:Ml,WebkitFilter:Ml},Ja=e=>f0[e];function Sp(e,t){let n=Ja(e);return n!==Ml&&(n=It),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const d0=new Set(["auto","none","0"]);function h0(e,t,n){let r=0,i;for(;r{n.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function p0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Dc=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(It.test(e)||e==="0")&&!e.startsWith("url("));function m0(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n{this.resolveFinishedPromise=t})}}function Tp(e,t){return t?e*(1e3/t):0}const y0=5;function kp(e,t,n){const r=Math.max(t-y0,0);return Tp(n-e(r),t-r)}const vs=.001,v0=.01,w0=10,S0=.05,x0=1;function P0({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=jt(S0,x0,s),e=jt(v0,w0,at(e)),s<1?(i=u=>{const c=u*s,f=c*e,d=c-n,g=Rl(u,s),y=Math.exp(-f);return vs-d/g*y},o=u=>{const f=u*s*e,d=f*n+n,g=Math.pow(s,2)*Math.pow(u,2)*e,y=Math.exp(-f),v=Rl(Math.pow(u,2),s);return(-i(u)+vs>0?-1:1)*((d-g)*y)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-vs+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const l=5/e,a=k0(i,o,l);if(e=Lt(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const T0=12;function k0(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function M0(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Lc(e,E0)&&Lc(e,C0)){const n=P0(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Cp({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:l,damping:a,mass:u,duration:c,velocity:f,isResolvedFromDuration:d}=M0({...r,velocity:-at(r.velocity||0)}),g=f||0,y=a/(2*Math.sqrt(l*u)),v=o-i,P=at(Math.sqrt(l/u)),m=Math.abs(v)<5;n||(n=m?.01:2),t||(t=m?.005:.5);let h;if(y<1){const p=Rl(P,y);h=w=>{const S=Math.exp(-y*P*w);return o-S*((g+y*P*v)/p*Math.sin(p*w)+v*Math.cos(p*w))}}else if(y===1)h=p=>o-Math.exp(-P*p)*(v+(g+P*v)*p);else{const p=P*Math.sqrt(y*y-1);h=w=>{const S=Math.exp(-y*P*w),k=Math.min(p*w,300);return o-S*((g+y*P*v)*Math.sinh(k)+p*v*Math.cosh(k))/p}}return{calculatedDuration:d&&c||null,next:p=>{const w=h(p);if(d)s.done=p>=c;else{let S=g;p!==0&&(y<1?S=kp(h,p,w):S=0);const k=Math.abs(S)<=n,E=Math.abs(o-w)<=t;s.done=k&&E}return s.value=s.done?o:w,s}}}function _c({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:l,max:a,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},g=T=>l!==void 0&&Ta,y=T=>l===void 0?a:a===void 0||Math.abs(l-T)-v*Math.exp(-T/r),p=T=>m+h(T),w=T=>{const _=h(T),V=p(T);d.done=Math.abs(_)<=u,d.value=d.done?m:V};let S,k;const E=T=>{g(d.value)&&(S=T,k=Cp({keyframes:[d.value,y(d.value)],velocity:kp(p,T,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:T=>{let _=!1;return!k&&S===void 0&&(_=!0,w(T),E(T)),S!==void 0&&T>=S?k.next(T-S):(!_&&w(T),d)}}}const Ep=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,R0=1e-7,V0=12;function A0(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=Ep(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>R0&&++lA0(o,0,1,e,n);return o=>o===0||o===1?o:Ep(i(o),t,r)}const D0=ni(.42,0,1,1),L0=ni(0,0,.58,1),Mp=ni(.42,0,.58,1),_0=e=>Array.isArray(e)&&typeof e[0]!="number",Rp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vp=e=>t=>1-e(1-t),ba=e=>1-Math.sin(Math.acos(e)),Ap=Vp(ba),N0=Rp(ba),Dp=ni(.33,1.53,.69,.99),eu=Vp(Dp),F0=Rp(eu),j0=e=>(e*=2)<1?.5*eu(e):.5*(2-Math.pow(2,-10*(e-1))),Nc={linear:pe,easeIn:D0,easeInOut:Mp,easeOut:L0,circIn:ba,circInOut:N0,circOut:Ap,backIn:eu,backInOut:F0,backOut:Dp,anticipate:j0},Fc=e=>{if(Array.isArray(e)){Tl(e.length===4);const[t,n,r,i]=e;return ni(t,n,r,i)}else if(typeof e=="string")return Tl(Nc[e]!==void 0),Nc[e];return e},Kr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},H=(e,t,n)=>e+(t-e)*n;function ws(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function O0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=ws(a,l,e+1/3),o=ws(a,l,e),s=ws(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Ss=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},I0=[El,rn,Dn],z0=e=>I0.find(t=>t.test(e));function jc(e){const t=z0(e);let n=t.parse(e);return t===Dn&&(n=O0(n)),n}const Oc=(e,t)=>{const n=jc(e),r=jc(t),i={...n};return o=>(i.red=Ss(n.red,r.red,o),i.green=Ss(n.green,r.green,o),i.blue=Ss(n.blue,r.blue,o),i.alpha=H(n.alpha,r.alpha,o),rn.transform(i))};function Vl(e,t){return n=>n>0?t:e}function B0(e,t){return n=>H(e,t,n)}function tu(e){return typeof e=="number"?B0:typeof e=="string"?Ua(e)?Vl:fe.test(e)?Oc:W0:Array.isArray(e)?Lp:typeof e=="object"?fe.test(e)?Oc:U0:Vl}function Lp(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>tu(o)(o,t[s]));return o=>{for(let s=0;s{for(const o in r)n[o]=r[o](i);return n}}function $0(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=It.createTransformer(t),r=ho(e),i=ho(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?lt(Lp($0(r,i),i.values),n):Vl(e,t)};function _p(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?H(e,t,n):tu(e)(e,t)}function H0(e,t,n){const r=[],i=n||_p,o=e.length-1;for(let s=0;st[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=H0(t,r,i),l=s.length,a=u=>{let c=0;if(l>1)for(;ca(jt(e[0],e[o-1],u)):a}function G0(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Kr(0,t,r);e.push(H(n,1,i))}}function Q0(e){const t=[0];return G0(t,e.length-1),t}function Y0(e,t){return e.map(n=>n*t)}function X0(e,t){return e.map(()=>t||Mp).splice(0,e.length-1)}function po({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=_0(r)?r.map(Fc):Fc(r),o={done:!1,value:t[0]},s=Y0(n&&n.length===t.length?n:Q0(t),e),l=K0(s,t,{ease:Array.isArray(i)?i:X0(t,i)});return{calculatedDuration:e,next:a=>(o.value=l(a),o.done=a>=e,o)}}const Ic=2e4;function Z0(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Ic?1/0:t}const q0=e=>{const t=({timestamp:n})=>e(n);return{start:()=>I.update(t,!0),stop:()=>Ot(t),now:()=>se.isProcessing?se.timestamp:_t.now()}},J0={decay:_c,inertia:_c,tween:po,keyframes:po,spring:Cp},b0=e=>e/100;class nu extends Pp{constructor({KeyframeResolver:t=Za,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:r,motionValue:i,keyframes:o}=this.options,s=(l,a)=>this.onKeyframesResolved(l,a);r&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,s,r,i):this.resolver=new t(o,s,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,l=J0[n]||po;let a,u;l!==po&&typeof t[0]!="number"&&(a=lt(b0,_p(t[0],t[1])),t=[0,100]);const c=l({...this.options,keyframes:t});o==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Z0(c));const{calculatedDuration:f}=c,d=f+i,g=d*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:f,resolvedDuration:d,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return o.next(0);const{delay:d,repeat:g,repeatType:y,repeatDelay:v,onUpdate:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-d*(this.speed>=0?1:-1),h=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let p=this.currentTime,w=o;if(g){const T=Math.min(this.currentTime,c)/f;let _=Math.floor(T),V=T%1;!V&&T>=1&&(V=1),V===1&&_--,_=Math.min(_,g+1),!!(_%2)&&(y==="reverse"?(V=1-V,v&&(V-=v/f)):y==="mirror"&&(w=s)),p=jt(0,1,V)*f}const S=h?{done:!1,value:a[0]}:w.next(p);l&&(S.value=l(S.value));let{done:k}=S;!h&&u!==null&&(k=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&i!==void 0&&(S.value=Bo(a,this.options,i)),P&&P(S.value),E&&this.finish(),S}get duration(){const{resolved:t}=this;return t?at(t.calculatedDuration):0}get time(){return at(this.currentTime)}set time(t){t=Lt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=at(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=q0,onPlay:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Np=e=>Array.isArray(e)&&typeof e[0]=="number";function Fp(e){return!!(!e||typeof e=="string"&&e in ru||Np(e)||Array.isArray(e)&&e.every(Fp))}const dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ru={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dr([0,.65,.55,1]),circOut:dr([.55,0,1,.45]),backIn:dr([.31,.01,.66,-.59]),backOut:dr([.33,1.53,.69,.99])};function e1(e){return jp(e)||ru.easeOut}function jp(e){if(e)return Np(e)?dr(e):Array.isArray(e)?e.map(e1):ru[e]}function t1(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:l,times:a}={}){const u={[t]:n};a&&(u.offset=a);const c=jp(l);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const n1=p0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),r1=new Set(["opacity","clipPath","filter","transform"]),mo=10,i1=2e4;function o1(e){return e.type==="spring"||e.name==="backgroundColor"||!Fp(e.ease)}function s1(e,t){const n=new nu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(o,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:s,type:l,motionValue:a,name:u}=this.options;if(!(!((r=a.owner)===null||r===void 0)&&r.current))return!1;if(o1(this.options)){const{onComplete:f,onUpdate:d,motionValue:g,...y}=this.options,v=s1(t,y);t=v.keyframes,t.length===1&&(t[1]=t[0]),i=v.duration,o=v.times,s=v.ease,l="keyframes"}const c=t1(a.owner.current,u,t,{...this.options,duration:i,times:o,ease:s});return c.startTime=_t.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(Bo(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:o,type:l,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return at(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return at(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Lt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return pe;const{animation:r}=n;r.timeline=t,r.onfinish=null}return pe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:l}=t;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:a,onUpdate:u,onComplete:c,...f}=this.options,d=new nu({...f,keyframes:r,duration:i,type:o,ease:s,times:l,isGenerator:!0}),g=Lt(this.time);a.setWithVelocity(d.sample(g-mo).value,d.sample(g).value,mo)}this.cancel()}}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:l}=t;return n1()&&r&&r1.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&s!==0&&l!=="inertia"}}const iu=(e,t,n,r={},i,o)=>s=>{const l=Xa(r,e)||{},a=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Lt(a);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};$v(l)||(c={...c,...Uv(e,c)}),c.duration&&(c.duration=Lt(c.duration)),c.repeatDelay&&(c.repeatDelay=Lt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!o&&t.get()!==void 0){const d=Bo(c.keyframes,l);if(d!==void 0){I.update(()=>{c.onUpdate(d),c.onComplete()});return}}return!o&&zc.supports(c)?new zc(c):new nu(c)};function go(e){return!!(he(e)&&e.add)}function ou(e,t){e.indexOf(t)===-1&&e.push(t)}function su(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class lu{constructor(){this.subscriptions=[]}add(t){return ou(this.subscriptions,t),()=>su(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class a1{constructor(t,n={}){this.version="11.1.9",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=_t.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.canTrackVelocity=l1(this.current),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_t.now()}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new lu);const r=this.events[t].add(n);return t==="change"?()=>{r(),I.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_t.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Bc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bc);return Tp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gr(e,t){return new a1(e,t)}function u1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gr(n))}function c1(e,t){const n=zo(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const l=gv(o[s]);u1(e,s,l)}}function f1({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Op(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:l,...a}=t;const u=e.getValue("willChange");r&&(s=r);const c=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const g=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),y=a[d];if(y===void 0||f&&f1(f,d))continue;const v={delay:n,elapsed:0,...Xa(s||{},d)};let P=!1;if(window.HandoffAppearAnimations){const p=e.getProps()[zh];if(p){const w=window.HandoffAppearAnimations(p,d);w!==null&&(v.elapsed=w,P=!0)}}g.start(iu(d,g,y,e.shouldReduceMotion&&mn.has(d)?{type:!1}:v,e,P));const m=g.animation;m&&(go(u)&&(u.add(d),m.then(()=>u.remove(d))),c.push(m))}return l&&Promise.all(c).then(()=>{I.update(()=>{l&&c1(e,l)})}),c}function Al(e,t,n={}){var r;const i=zo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Op(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=o;return d1(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[u,c]=a==="beforeChildren"?[s,l]:[l,s];return u().then(()=>c())}else return Promise.all([s(),l(n.delay)])}function d1(e,t,n=0,r=0,i=1,o){const s=[],l=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(h1).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Al(u,t,{...o,delay:n+a(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function h1(e,t){return e.sortNodePosition(t)}function p1(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Al(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Al(e,t,n);else{const i=typeof t=="function"?zo(e,t,n.custom):t;r=Promise.all(Op(e,i,n))}return r.then(()=>{I.postRender(()=>{e.notify("AnimationComplete",t)})})}const m1=[...Oa].reverse(),g1=Oa.length;function y1(e){return t=>Promise.all(t.map(({animation:n,options:r})=>p1(e,n,r)))}function v1(e){let t=y1(e);const n=S1();let r=!0;const i=a=>(u,c)=>{var f;const d=zo(e,c,a==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:g,transitionEnd:y,...v}=d;u={...u,...v,...y}}return u};function o(a){t=a(e)}function s(a){const u=e.getProps(),c=e.getVariantContext(!0)||{},f=[],d=new Set;let g={},y=1/0;for(let P=0;Py&&w,_=!1;const V=Array.isArray(p)?p:[p];let ee=V.reduce(i(m),{});S===!1&&(ee={});const{prevResolvedValues:pt={}}=h,Wt={...pt,...ee},Jn=ie=>{T=!0,d.has(ie)&&(_=!0,d.delete(ie)),h.needsAnimating[ie]=!0;const Ce=e.getValue(ie);Ce&&(Ce.liveStyle=!1)};for(const ie in Wt){const Ce=ee[ie],Ht=pt[ie];if(g.hasOwnProperty(ie))continue;let M=!1;xl(Ce)&&xl(Ht)?M=!lp(Ce,Ht):M=Ce!==Ht,M?Ce!=null?Jn(ie):d.add(ie):Ce!==void 0&&d.has(ie)?Jn(ie):h.protectedKeys[ie]=!0}h.prevProp=p,h.prevResolvedValues=ee,h.isActive&&(g={...g,...ee}),r&&e.blockInitialAnimation&&(T=!1),T&&(!k||_)&&f.push(...V.map(ie=>({animation:ie,options:{type:m}})))}if(d.size){const P={};d.forEach(m=>{const h=e.getBaseTarget(m),p=e.getValue(m);p&&(p.liveStyle=!0),P[m]=h??null}),f.push({animation:P})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function l(a,u){var c;if(n[a].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var g;return(g=d.animationState)===null||g===void 0?void 0:g.setActive(a,u)}),n[a].isActive=u;const f=s(a);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>n}}function w1(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lp(t,e):!1}function Qt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function S1(){return{animate:Qt(!0),whileInView:Qt(),whileHover:Qt(),whileTap:Qt(),whileDrag:Qt(),whileFocus:Qt(),exit:Qt()}}class x1 extends $t{constructor(t){super(t),t.animationState||(t.animationState=v1(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),jo(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let P1=0;class T1 extends $t{constructor(){super(...arguments),this.id=P1++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const k1={animation:{Feature:x1},exit:{Feature:T1}},Uc=(e,t)=>Math.abs(e-t);function C1(e,t){const n=Uc(e.x,t.x),r=Uc(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ip{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!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=Ps(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,g=C1(f.offset,{x:0,y:0})>=3;if(!d&&!g)return;const{point:y}=f,{timestamp:v}=se;this.history.push({...y,timestamp:v});const{onStart:P,onMove:m}=this.handlers;d||(P&&P(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=xs(d,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=Ps(f.type==="pointercancel"?this.lastMoveEventInfo:xs(d,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,P),y&&y(f,P)},!np(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=Io(t),l=xs(s,this.transformPagePoint),{point:a}=l,{timestamp:u}=se;this.history=[{...a,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Ps(l,this.history)),this.removeListeners=lt(st(this.contextWindow,"pointermove",this.handlePointerMove),st(this.contextWindow,"pointerup",this.handlePointerUp),st(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ot(this.updatePoint)}}function xs(e,t){return t?{point:t(e.point)}:e}function $c(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ps({point:e},t){return{point:e,delta:$c(e,zp(t)),offset:$c(e,E1(t)),velocity:M1(t,.1)}}function E1(e){return e[0]}function zp(e){return e[e.length-1]}function M1(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=zp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Lt(t)));)n--;if(!r)return{x:0,y:0};const o=at(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Ae(e){return e.max-e.min}function Dl(e,t=0,n=.01){return Math.abs(e-t)<=n}function Wc(e,t,n,r=.5){e.origin=r,e.originPoint=H(t.min,t.max,e.origin),e.scale=Ae(n)/Ae(t),(Dl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=H(n.min,n.max,e.origin)-e.originPoint,(Dl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function kr(e,t,n,r){Wc(e.x,t.x,n.x,r?r.originX:void 0),Wc(e.y,t.y,n.y,r?r.originY:void 0)}function Hc(e,t,n){e.min=n.min+t.min,e.max=e.min+Ae(t)}function R1(e,t,n){Hc(e.x,t.x,n.x),Hc(e.y,t.y,n.y)}function Kc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ae(t)}function Cr(e,t,n){Kc(e.x,t.x,n.x),Kc(e.y,t.y,n.y)}function V1(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?H(n,e,r.max):Math.min(e,n)),e}function Gc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function A1(e,{top:t,left:n,bottom:r,right:i}){return{x:Gc(e.x,n,i),y:Gc(e.y,t,r)}}function Qc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Kr(t.min,t.max-r,e.min):r>i&&(n=Kr(e.min,e.max-i,t.min)),jt(0,1,n)}function _1(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ll=.35;function N1(e=Ll){return e===!1?e=0:e===!0&&(e=Ll),{x:Yc(e,"left","right"),y:Yc(e,"top","bottom")}}function Yc(e,t,n){return{min:Xc(e,t),max:Xc(e,n)}}function Xc(e,t){return typeof e=="number"?e:e[t]||0}const Zc=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ln=()=>({x:Zc(),y:Zc()}),qc=()=>({min:0,max:0}),X=()=>({x:qc(),y:qc()});function Ne(e){return[e("x"),e("y")]}function Bp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function F1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function j1(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ts(e){return e===void 0||e===1}function _l({scale:e,scaleX:t,scaleY:n}){return!Ts(e)||!Ts(t)||!Ts(n)}function Zt(e){return _l(e)||Up(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Up(e){return Jc(e.x)||Jc(e.y)}function Jc(e){return e&&e!=="0%"}function yo(e,t,n){const r=e-n,i=t*r;return n+i}function bc(e,t,n,r,i){return i!==void 0&&(e=yo(e,i,r)),yo(e,n,r)+t}function Nl(e,t=0,n=1,r,i){e.min=bc(e.min,t,n,r,i),e.max=bc(e.max,t,n,r,i)}function $p(e,{x:t,y:n}){Nl(e.x,t.translate,t.scale,t.originPoint),Nl(e.y,n.translate,n.scale,n.originPoint)}function O1(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let l=0;l1.0000000000001||e<.999999999999?e:1}function wt(e,t){e.min=e.min+t,e.max=e.max+t}function tf(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=H(e.min,e.max,o);Nl(e,t[n],t[r],s,t.scale)}const I1=["x","scaleX","originX"],z1=["y","scaleY","originY"];function _n(e,t){tf(e.x,t,I1),tf(e.y,t,z1)}function Wp(e,t){return Bp(j1(e.getBoundingClientRect(),t))}function B1(e,t,n){const r=Wp(e,n),{scroll:i}=t;return i&&(wt(r.x,i.offset.x),wt(r.y,i.offset.y)),r}const Hp=({current:e})=>e?e.ownerDocument.defaultView:null,U1=new WeakMap;class $1{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Io(c,"page").point)},o=(c,f)=>{const{drag:d,dragPropagation:g,onDragStart:y}=this.getProps();if(d&&!g&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ip(d),!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),Ne(P=>{let m=this.getAxisMotionValue(P).get()||0;if(be.test(m)){const{projection:h}=this.visualElement;if(h&&h.layout){const p=h.layout.layoutBox[P];p&&(m=Ae(p)*(parseFloat(m)/100))}}this.originPoint[P]=m}),y&&I.postRender(()=>y(c,f));const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(c,f)=>{const{dragPropagation:d,dragDirectionLock:g,onDirectionLock:y,onDrag:v}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:P}=f;if(g&&this.currentDirection===null){this.currentDirection=W1(P),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,P),this.updateAxis("y",f.point,P),this.visualElement.render(),v&&v(c,f)},l=(c,f)=>this.stop(c,f),a=()=>Ne(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ip(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Hp(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ki(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=V1(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&An(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=A1(i.layoutBox,n):this.constraints=!1,this.elastic=N1(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ne(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=_1(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!An(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=B1(r,i.root,this.visualElement.getTransformPagePoint());let s=D1(i.layout.layoutBox,o);if(n){const l=n(F1(s));this.hasMutatedConstraints=!!l,l&&(s=Bp(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=Ne(c=>{if(!ki(c,n,this.currentDirection))return;let f=a&&a[c]||{};s&&(f={min:0,max:0});const d=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(iu(t,r,0,n,this.visualElement))}stopAnimation(){Ne(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ne(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ne(n=>{const{drag:r}=this.getProps();if(!ki(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n];o.set(t[n]-H(s,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!An(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ne(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const a=l.get();i[s]=L1({min:a,max:a},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ne(s=>{if(!ki(s,t,null))return;const l=this.getAxisMotionValue(s),{min:a,max:u}=this.constraints[s];l.set(H(a,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;U1.set(this.visualElement,this);const t=this.visualElement.current,n=st(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();An(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=it(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ne(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=a[c].translate,f.set(f.get()+a[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Ll,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function ki(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function W1(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class H1 extends $t{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new $1(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const nf=e=>(t,n)=>{e&&I.postRender(()=>e(t,n))};class K1 extends $t{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new Ip(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nf(t),onStart:nf(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&I.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=st(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function G1(){const e=C.useContext(Fo);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.useId();return C.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const zi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(A.test(e))e=parseFloat(e);else return e;const n=rf(e,t.target.x),r=rf(e,t.target.y);return`${n}% ${r}%`}},Q1={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=It.parse(e);if(i.length>5)return r;const o=It.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=a;const u=H(l,a,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class Y1 extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Gy(X1),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||I.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ja.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Kp(e){const[t,n]=G1(),r=C.useContext(za);return D.jsx(Y1,{...e,layoutGroup:r,switchLayoutGroup:C.useContext($h),isPresent:t,safeToRemove:n})}const X1={borderRadius:{...lr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lr,borderTopRightRadius:lr,borderBottomLeftRadius:lr,borderBottomRightRadius:lr,boxShadow:Q1},Gp=["TopLeft","TopRight","BottomLeft","BottomRight"],Z1=Gp.length,of=e=>typeof e=="string"?parseFloat(e):e,sf=e=>typeof e=="number"||A.test(e);function q1(e,t,n,r,i,o){i?(e.opacity=H(0,n.opacity!==void 0?n.opacity:1,J1(r)),e.opacityExit=H(t.opacity!==void 0?t.opacity:1,0,b1(r))):o&&(e.opacity=H(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Kr(e,t,r))}function af(e,t){e.min=t.min,e.max=t.max}function _e(e,t){af(e.x,t.x),af(e.y,t.y)}function uf(e,t,n,r,i){return e-=t,e=yo(e,1/n,r),i!==void 0&&(e=yo(e,1/i,r)),e}function ew(e,t=0,n=1,r=.5,i,o=e,s=e){if(be.test(t)&&(t=parseFloat(t),t=H(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=H(o.min,o.max,r);e===o&&(l-=t),e.min=uf(e.min,t,n,l,i),e.max=uf(e.max,t,n,l,i)}function cf(e,t,[n,r,i],o,s){ew(e,t[n],t[r],t[i],t.scale,o,s)}const tw=["x","scaleX","originX"],nw=["y","scaleY","originY"];function ff(e,t,n,r){cf(e.x,t,tw,n?n.x:void 0,r?r.x:void 0),cf(e.y,t,nw,n?n.y:void 0,r?r.y:void 0)}function df(e){return e.translate===0&&e.scale===1}function Yp(e){return df(e.x)&&df(e.y)}function rw(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Xp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function hf(e){return Ae(e.x)/Ae(e.y)}class iw{constructor(){this.members=[]}add(t){ou(this.members,t),t.scheduleRender()}remove(t){if(su(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function pf(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:g,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const ow=(e,t)=>e.depth-t.depth;class sw{constructor(){this.children=[],this.isDirty=!1}add(t){ou(this.children,t),this.isDirty=!0}remove(t){su(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ow),this.isDirty=!1,this.children.forEach(t)}}function lw(e,t){const n=_t.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ot(r),e(o-t))};return I.read(r,!0),()=>Ot(r)}function aw(e){window.MotionDebug&&window.MotionDebug.record(e)}function uw(e){return e instanceof SVGElement&&e.tagName!=="svg"}function cw(e,t,n){const r=he(e)?e:Gr(e);return r.start(iu("",r,t,n)),r.animation}const ks=["","X","Y","Z"],fw={visibility:"hidden"},mf=1e3;let dw=0;const qt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Cs(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Zp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=dw++,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,qt.totalNodes=qt.resolvedTargetDeltas=qt.recalculatedProjection=0,this.nodes.forEach(mw),this.nodes.forEach(Sw),this.nodes.forEach(xw),this.nodes.forEach(gw),aw(qt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=lw(d,250),zi.hasAnimatedSinceResize&&(zi.hasAnimatedSinceResize=!1,this.nodes.forEach(yf))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Ew,{onLayoutAnimationStart:P,onLayoutAnimationComplete:m}=c.getProps(),h=!this.targetLayout||!Xp(this.targetLayout,y)||g,p=!d&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||p||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,p);const w={...Xa(v,"layout"),onPlay:P,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||yf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ot(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(Pw),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!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 c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(yw),this.sharedNodes.forEach(Tw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.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 a=0;a{const S=w/1e3;vf(f.x,s.x,S),vf(f.y,s.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cr(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kw(this.relativeTarget,this.relativeTargetOrigin,d,S),p&&rw(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=X()),_e(p,this.relativeTarget)),v&&(this.animationValues=c,q1(c,u,this.latestValues,S,h,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{zi.hasAnimatedSinceResize=!0,this.currentAnimation=cw(0,mf,{...s,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=s;if(!(!l||!a||!u)){if(this!==s&&this.layout&&u&&qp(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||X();const f=Ae(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+f;const d=Ae(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+d}_e(l,a),_n(l,c),kr(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new iw),this.sharedNodes.get(s).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:l}=this.options;return l?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:l}=this.options;return l?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:a}=s;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const u={};a.z&&Cs("z",s,u,this.animationValues);for(let c=0;c{var l;return(l=s.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(gf),this.root.sharedNodes.clear()}}}function hw(e){e.updateLayout()}function pw(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?Ne(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],g=Ae(d);d.min=r[f].min,d.max=d.min+g}):qp(o,n.layoutBox,r)&&Ne(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],g=Ae(r[f]);d.max=d.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const l=Ln();kr(l,r,n.layoutBox);const a=Ln();s?kr(a,e.applyTransform(i,!0),n.measuredBox):kr(a,r,n.layoutBox);const u=!Yp(l);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:g}=f;if(d&&g){const y=X();Cr(y,n.layoutBox,d.layoutBox);const v=X();Cr(v,r,g.layoutBox),Xp(y,v)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function mw(e){qt.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function gw(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yw(e){e.clearSnapshot()}function gf(e){e.clearMeasurements()}function vw(e){e.isLayoutDirty=!1}function ww(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sw(e){e.resolveTargetDelta()}function xw(e){e.calcProjection()}function Pw(e){e.resetSkewAndRotation()}function Tw(e){e.removeLeadSnapshot()}function vf(e,t,n){e.translate=H(t.translate,0,n),e.scale=H(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function wf(e,t,n,r){e.min=H(t.min,n.min,r),e.max=H(t.max,n.max,r)}function kw(e,t,n,r){wf(e.x,t.x,n.x,r),wf(e.y,t.y,n.y,r)}function Cw(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ew={duration:.45,ease:[.4,0,.1,1]},Sf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),xf=Sf("applewebkit/")&&!Sf("chrome/")?Math.round:pe;function Pf(e){e.min=xf(e.min),e.max=xf(e.max)}function Mw(e){Pf(e.x),Pf(e.y)}function qp(e,t,n){return e==="position"||e==="preserve-aspect"&&!Dl(hf(t),hf(n),.2)}const Rw=Zp({attachResizeListener:(e,t)=>it(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Es={current:void 0},Jp=Zp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Es.current){const e=new Rw({});e.mount(window),e.setOptions({layoutScroll:!0}),Es.current=e}return Es.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Vw={pan:{Feature:K1},drag:{Feature:H1,ProjectionNode:Jp,MeasureLayout:Kp}},Fl={current:null},bp={current:!1};function Aw(){if(bp.current=!0,!!_a)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addListener(t),t()}else Fl.current=!1}function Dw(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(he(o))e.addValue(i,o),go(r)&&r.add(i);else if(he(s))e.addValue(i,Gr(o,{owner:e})),go(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const l=e.getValue(i);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,Gr(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Tf=new WeakMap,Lw=[...dp,fe,It],_w=e=>Lw.find(fp(e)),em=Object.keys(Hr),Nw=em.length,kf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Fw=Ia.length;function tm(e){if(e)return e.options.allowProjection!==!1?e.projection:tm(e.parent)}class jw{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},l={}){this.resolveKeyframes=(d,g,y,v)=>new this.KeyframeResolver(d,g,y,v,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Za,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=()=>I.render(this.render,!1,!0);const{latestValues:a,renderState:u}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Oo(n),this.isVariantNode=Uh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const g=f[d];a[d]!==void 0&&he(g)&&(g.set(a[d],!1),go(c)&&c.add(d))}}mount(t){this.current=t,Tf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),bp.current||Aw(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var t;Tf.delete(this.current),this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(t=this.features[n])===null||t===void 0||t.unmount();this.current=null}bindToMotionValue(t,n){const r=mn.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&I.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,l;for(let a=0;athis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:g})}return l}updateFeatures(){for(const t in this.features){const n=this.features[t];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):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Gr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(up(i)||ap(i))?i=parseFloat(i):!_w(i)&&It.test(n)&&(i=Sp(t,n)),this.setBaseTarget(t,he(i)?i.get():i)),he(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const s=Ya(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(i=s[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!he(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new lu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class nm extends jw{constructor(){super(...arguments),this.KeyframeResolver=xp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function Ow(e){return window.getComputedStyle(e)}class Iw extends nm{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(mn.has(n)){const r=Ja(n);return r&&r.default||0}else{const r=Ow(t),i=(Kh(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Wp(t,n)}build(t,n,r,i){Wa(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Qa(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;he(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Zh(t,n,r,i)}}class zw extends nm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(mn.has(n)){const r=Ja(n);return r&&r.default||0}return n=qh.has(n)?n:Fa(n),t.getAttribute(n)}measureInstanceViewportBox(){return X()}scrapeMotionValuesFromProps(t,n,r){return bh(t,n,r)}build(t,n,r,i){Ka(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Jh(t,n,r,i)}mount(t){this.isSVGTag=Ga(t.tagName),super.mount(t)}}const Bw=(e,t)=>Ba(e)?new zw(t,{enableHardwareAcceleration:!1}):new Iw(t,{allowProjection:e!==C.Fragment,enableHardwareAcceleration:!0}),Uw={layout:{ProjectionNode:Jp,MeasureLayout:Kp}},$w={...k1,...Nv,...Vw,...Uw},bt=Hy((e,t)=>xv(e,t,$w,Bw));function rm(){const e=C.useRef(!1);return Na(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Ww(){const e=rm(),[t,n]=C.useState(0),r=C.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.useCallback(()=>I.postRender(r),[r]),t]}class Hw extends C.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Kw({children:e,isPresent:t}){const n=C.useId(),r=C.useRef(null),i=C.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=C.useContext(La);return C.useInsertionEffect(()=>{const{width:s,height:l,top:a,left:u}=i.current;if(t||!r.current||!s||!l)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return o&&(c.nonce=o),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${s}px !important; + height: ${l}px !important; + top: ${a}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(c)}},[t]),D.jsx(Hw,{isPresent:t,childRef:r,sizeRef:i,children:C.cloneElement(e,{ref:r})})}const Ms=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const l=ep(Gw),a=C.useId(),u=C.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:c=>{l.set(c,!0);for(const f of l.values())if(!f)return;r&&r()},register:c=>(l.set(c,!1),()=>l.delete(c))}),o?[Math.random()]:[n]);return C.useMemo(()=>{l.forEach((c,f)=>l.set(f,!1))},[n]),C.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),s==="popLayout"&&(e=D.jsx(Kw,{isPresent:n,children:e})),D.jsx(Fo.Provider,{value:u,children:e})};function Gw(){return new Map}function Qw(e){return C.useEffect(()=>()=>e(),[])}const Jt=e=>e.key||"";function Yw(e,t){e.forEach(n=>{const r=Jt(n);t.set(r,n)})}function Xw(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const Zw=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const l=C.useContext(za).forceRender||Ww()[0],a=rm(),u=Xw(e);let c=u;const f=C.useRef(new Map).current,d=C.useRef(c),g=C.useRef(new Map).current,y=C.useRef(!0);if(Na(()=>{y.current=!1,Yw(u,g),d.current=c}),Qw(()=>{y.current=!0,g.clear(),f.clear()}),y.current)return D.jsx(D.Fragment,{children:c.map(h=>D.jsx(Ms,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s,children:h},Jt(h)))});c=[...c];const v=d.current.map(Jt),P=u.map(Jt),m=v.length;for(let h=0;h{if(P.indexOf(p)!==-1)return;const w=g.get(p);if(!w)return;const S=v.indexOf(p);let k=h;if(!k){const E=()=>{f.delete(p);const T=Array.from(g.keys()).filter(_=>!P.includes(_));if(T.forEach(_=>g.delete(_)),d.current=u.filter(_=>{const V=Jt(_);return V===p||T.includes(V)}),!f.size){if(a.current===!1)return;l(),r&&r()}};k=D.jsx(Ms,{isPresent:!1,onExitComplete:E,custom:t,presenceAffectsLayout:o,mode:s,children:w},Jt(w)),f.set(p,k)}c.splice(S,0,k)}),c=c.map(h=>{const p=h.key;return f.has(p)?h:D.jsx(Ms,{isPresent:!0,presenceAffectsLayout:o,mode:s,children:h},Jt(h))}),D.jsx(D.Fragment,{children:f.size?c:c.map(h=>C.cloneElement(h))})},qw=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]],Qr=e=>{for(let t of qw){const[n,r,i]=t;if(e[n]&&e[n]===e[r]&&e[n]===e[i])return e[n]}return null},jl=e=>e.every(t=>t!==""),Ol=(e,t,n)=>{const r=Qr(e);if(r==="o")return 10-t;if(r==="x")return t-10;if(jl(e))return 0;if(n){let i=-1/0;for(let o=0;o{if(t==="easy"){const o=e.reduce((s,l,a)=>l===""?[...s,a]:s,[]);return o[Math.floor(Math.random()*o.length)]}if(t==="medium"&&Math.random()<.5){const o=e.reduce((s,l,a)=>l===""?[...s,a]:s,[]);return o[Math.floor(Math.random()*o.length)]}let n=-1/0,r=-1;const i=[4,0,2,6,8];for(let o=0;on&&(n=s,r=o)}return r},bw=()=>{const[e,t]=C.useState(Array(9).fill("")),[n,r]=C.useState("x"),[i,o]=C.useState(null),[s,l]=C.useState(!1),[a,u]=C.useState("easy"),c=y=>{if(e[y]||i||s&&n==="o")return;const v=[...e];v[y]=n,t(v),r(n==="x"?"o":"x");const P=Qr(v);P?o(P):jl(v)&&o("x | o")};C.useEffect(()=>{if(s&&n==="o"&&!i){const y=Jw([...e],a);if(y!==-1){const v=[...e];v[y]="o",t(v),r("x");const P=Qr(v);P?o(P):jl(v)&&o("x | o")}}},[n,s,i,a]);const f=()=>{t(Array(9).fill("")),r("x"),o(null)};return{squares:e,turn:n,winner:i,isAiMode:s,difficulty:a,updateSquares:c,resetGame:f,toggleAiMode:()=>{l(!s),f()},changeDifficulty:()=>{const y=["easy","medium","hard"],v=y.indexOf(a),P=y[(v+1)%y.length];u(P),f()}}},Cf=({resetGame:e})=>D.jsx("button",{onClick:()=>e(),children:"New Game"}),yn=({ind:e,updateSquares:t,clsName:n})=>{const r=()=>{t(e)};return D.jsx(bt.div,{initial:{scale:0},animate:{scale:1},className:"square",onClick:r,children:n&&D.jsx(bt.span,{initial:{scale:0},animate:{scale:1},className:n})})};function eS(){const{squares:e,turn:t,winner:n,isAiMode:r,difficulty:i,updateSquares:o,resetGame:s,toggleAiMode:l,changeDifficulty:a}=bw();return D.jsxs("div",{className:"tic-tac-toe",children:[D.jsxs("h1",{children:["TIC-TAC-TOE",r?` (AI Mode - ${i.charAt(0).toUpperCase()+i.slice(1)} Level)`:""]}),D.jsxs("div",{className:"game-controls",children:[D.jsx(Cf,{resetGame:s,text:"Reset Game"}),D.jsx("button",{onClick:l,className:"ai-toggle",children:r?"Disable AI":"Enable AI"}),r&&D.jsx("button",{onClick:a,className:"difficulty-toggle",children:i.charAt(0).toUpperCase()+i.slice(1)})]}),D.jsx("div",{className:"game",children:Array.from("012345678").map(u=>D.jsx(yn,{ind:u,updateSquares:o,clsName:e[u]},u))}),D.jsxs("div",{className:`turn ${t==="x"?"left":"right"}`,children:[D.jsx(yn,{clsName:"x"}),D.jsx(yn,{clsName:"o"})]}),D.jsx(Zw,{children:n&&D.jsx(bt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"winner",children:D.jsxs(bt.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0,opacity:0},className:"text",children:[D.jsx(bt.h2,{initial:{scale:0,y:100},animate:{scale:1,y:0,transition:{y:{delay:.7},duration:.7}},children:n==="x | o"?"No Winner :/":"Win !! :)"}),D.jsx(bt.div,{initial:{scale:0},animate:{scale:1,transition:{delay:1.3,duration:.2}},className:"win",children:n==="x | o"?D.jsxs(D.Fragment,{children:[D.jsx(yn,{clsName:"x"}),D.jsx(yn,{clsName:"o"})]}):D.jsx(D.Fragment,{children:D.jsx(yn,{clsName:n})})}),D.jsx(bt.div,{initial:{scale:0},animate:{scale:1,transition:{delay:1.5,duration:.3}},children:D.jsx(Cf,{resetGame:s,text:"Play Again"})})]},"child-box")},"parent-box")})]})}const tS=Rs.createRoot(document.getElementById("root"));tS.render(D.jsx(Sm.StrictMode,{children:D.jsx(eS,{})})); diff --git a/assets/index-dzSu2VQM.css b/assets/index-dzSu2VQM.css deleted file mode 100644 index 749ed11..0000000 --- a/assets/index-dzSu2VQM.css +++ /dev/null @@ -1 +0,0 @@ -*{padding:0;margin:0;box-sizing:border-box}body{background:#222;font-family:consolas}.tic-tac-toe{width:fit-content;margin:40px auto;text-align:center}.tic-tac-toe h1{color:#eee}.tic-tac-toe button{padding:8px 12px;margin:25px;background:transparent;border:2px solid #eee;color:#eee;width:100px;border-radius:5px;transition:.2s;font-weight:700;cursor:pointer}.tic-tac-toe button:hover{background:#eee;color:#222}.tic-tac-toe .game{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.turn{display:flex;justify-content:center;margin:15px auto;width:fit-content;position:relative;border-radius:10px}.turn .square,.winner .square{width:70px;height:70px;pointer-events:none;border-color:transparent}.turn .square span.x:before,.turn .square span.x:after{background:#222;transition:.2s}.turn .square span.o{transition:.2s;border-color:#222}.turn:after{position:absolute;content:"";width:50%;height:100%;top:0;background:#49ff58;border-radius:9px;z-index:-1;transition:.2s}.turn.left:after{left:0}.turn.left span.o{border-color:#eee}.turn.right span.x:before,.turn.right span.x:after{background:#eee}.turn.right:after{left:50%}.winner{position:absolute;width:100vw;height:100vh;top:0;left:0;display:grid;place-items:center;background-color:#000000b3}.winner .text{background:#111;width:70%;max-width:400px;height:300px;border:2px solid #eee;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px}.winner .text h2{font-size:2.5em;margin:15px 0;color:#eee}.winner .win{margin:0 auto;width:fit-content;border:2px solid #eee;border-radius:10px;display:flex;gap:15px}.square{width:100px;height:100px;border:2px solid #eee;border-radius:5px;display:grid;place-items:center;cursor:pointer}.square span{display:block;position:relative;width:70%;height:70%;border-radius:50%;border:8px solid transparent}.square span.x:after,.square span.x:before{position:absolute;content:"";width:150%;height:8px;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg);background:#62fffc;border-radius:5px}.square span.x:after{transform:translate(-50%,-50%) rotate(45deg);opacity:1}.square span.o{border-color:#ffa02e} diff --git a/index.html b/index.html index 4db3c37..0c4f6ed 100644 --- a/index.html +++ b/index.html @@ -3,13 +3,13 @@ - + TIC TAC TOE - - + +