@alfatech/livechat 2025.5.0-8.1 → 2025.5.1-2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +2 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -37,7 +37,7 @@ var Wm=e=>{throw TypeError(e)};var IT=(e,t)=>()=>(t||e((t={exports:{}}).exports,
37
37
  `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Pc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ho(e):""}function hE(e){switch(e.tag){case 5:return ho(e.type);case 16:return ho("Lazy");case 13:return ho("Suspense");case 19:return ho("SuspenseList");case 0:case 2:case 15:return e=Ac(e.type,!1),e;case 11:return e=Ac(e.type.render,!1),e;case 1:return e=Ac(e.type,!0),e;default:return""}}function Nf(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 Yi:return"Fragment";case Qi:return"Portal";case Of:return"Profiler";case Nh:return"StrictMode";case jf:return"Suspense";case Mf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o1:return(e.displayName||"Context")+".Consumer";case s1:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fh:return t=e.displayName||null,t!==null?t:Nf(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Nf(e(t))}catch{}}return null}function pE(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 Nf(t);case 8:return t===Nh?"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 Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mE(e){var t=l1(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=mE(e))}function u1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(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 Df(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vr(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 c1(e,t){t=t.checked,t!=null&&Mh(e,"checked",t,!1)}function Ff(e,t){c1(e,t);var n=Vr(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")?Lf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Lf(e,t.type,Vr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jm(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 Lf(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var po=Array.isArray;function hs(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function If(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(A(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(A(92));if(po(n)){if(1<n.length)throw Error(A(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vr(n)}}function f1(e,t){var n=Vr(t.value),r=Vr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function tg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $f(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wa,h1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wa=Wa||document.createElement("div"),Wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Io(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bo={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},gE=["Webkit","ms","Moz","O"];Object.keys(bo).forEach(function(e){gE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bo[t]=bo[e]})});function p1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bo.hasOwnProperty(e)&&bo[e]?(""+t).trim():t+"px"}function m1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=p1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yE=Te({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 Vf(e,t){if(t){if(yE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Bf(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 zf=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Uf=null,ps=null,ms=null;function ng(e){if(e=Sa(e)){if(typeof Uf!="function")throw Error(A(280));var t=e.stateNode;t&&(t=Ou(t),Uf(e.stateNode,e.type,t))}}function g1(e){ps?ms?ms.push(e):ms=[e]:ps=e}function y1(){if(ps){var e=ps,t=ms;if(ms=ps=null,ng(e),t)for(e=0;e<t.length;e++)ng(t[e])}}function v1(e,t){return e(t)}function x1(){}var Rc=!1;function w1(e,t,n){if(Rc)return e(t,n);Rc=!0;try{return v1(e,t,n)}finally{Rc=!1,(ps!==null||ms!==null)&&(x1(),y1())}}function $o(e,t){var n=e.stateNode;if(n===null)return null;var r=Ou(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(A(231,t,typeof n));return n}var Hf=!1;if(Xn)try{var no={};Object.defineProperty(no,"passive",{get:function(){Hf=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{Hf=!1}function vE(e,t,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var So=!1,zl=null,Ul=!1,Wf=null,xE={onError:function(e){So=!0,zl=e}};function wE(e,t,n,r,i,s,o,a,l){So=!1,zl=null,vE.apply(xE,arguments)}function bE(e,t,n,r,i,s,o,a,l){if(wE.apply(this,arguments),So){if(So){var c=zl;So=!1,zl=null}else throw Error(A(198));Ul||(Ul=!0,Wf=c)}}function Ni(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function b1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function rg(e){if(Ni(e)!==e)throw Error(A(188))}function SE(e){var t=e.alternate;if(!t){if(t=Ni(e),t===null)throw Error(A(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return rg(i),e;if(s===r)return rg(i),t;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?e:t}function S1(e){return e=SE(e),e!==null?T1(e):null}function T1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=T1(e);if(t!==null)return t;e=e.sibling}return null}var E1=Dt.unstable_scheduleCallback,ig=Dt.unstable_cancelCallback,TE=Dt.unstable_shouldYield,EE=Dt.unstable_requestPaint,Ae=Dt.unstable_now,CE=Dt.unstable_getCurrentPriorityLevel,Ih=Dt.unstable_ImmediatePriority,C1=Dt.unstable_UserBlockingPriority,Hl=Dt.unstable_NormalPriority,kE=Dt.unstable_LowPriority,k1=Dt.unstable_IdlePriority,_u=null,_n=null;function _E(e){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(_u,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:RE,PE=Math.log,AE=Math.LN2;function RE(e){return e>>>=0,e===0?32:31-(PE(e)/AE|0)|0}var Ka=64,qa=4194304;function mo(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 Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=mo(a):(s&=o,s!==0&&(r=mo(s)))}else o=n&~i,o!==0?r=mo(o):s!==0&&(r=mo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-hn(t),i=1<<n,r|=e[n],t&=~i;return r}function OE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-hn(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=OE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Kf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _1(){var e=Ka;return Ka<<=1,!(Ka&4194240)&&(Ka=64),e}function Oc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=n}function ME(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<n;){var i=31-hn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function $h(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-hn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var le=0;function P1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var A1,Vh,R1,O1,j1,qf=!1,Ga=[],Pr=null,Ar=null,Rr=null,Vo=new Map,Bo=new Map,hr=[],NE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function sg(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bo.delete(t.pointerId)}}function ro(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Sa(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function DE(e,t,n,r,i){switch(t){case"focusin":return Pr=ro(Pr,e,t,n,r,i),!0;case"dragenter":return Ar=ro(Ar,e,t,n,r,i),!0;case"mouseover":return Rr=ro(Rr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Vo.set(s,ro(Vo.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Bo.set(s,ro(Bo.get(s)||null,e,t,n,r,i)),!0}return!1}function M1(e){var t=oi(e.target);if(t!==null){var n=Ni(t);if(n!==null){if(t=n.tag,t===13){if(t=b1(n),t!==null){e.blockedOn=t,j1(e.priority,function(){R1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);zf=r,n.target.dispatchEvent(r),zf=null}else return t=Sa(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function og(e,t,n){xl(e)&&n.delete(t)}function FE(){qf=!1,Pr!==null&&xl(Pr)&&(Pr=null),Ar!==null&&xl(Ar)&&(Ar=null),Rr!==null&&xl(Rr)&&(Rr=null),Vo.forEach(og),Bo.forEach(og)}function io(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,FE)))}function zo(e){function t(i){return io(i,e)}if(0<Ga.length){io(Ga[0],e);for(var n=1;n<Ga.length;n++){var r=Ga[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&io(Pr,e),Ar!==null&&io(Ar,e),Rr!==null&&io(Rr,e),Vo.forEach(t),Bo.forEach(t),n=0;n<hr.length;n++)r=hr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hr.length&&(n=hr[0],n.blockedOn===null);)M1(n),n.blockedOn===null&&hr.shift()}var gs=nr.ReactCurrentBatchConfig,Kl=!0;function LE(e,t,n,r){var i=le,s=gs.transition;gs.transition=null;try{le=1,Bh(e,t,n,r)}finally{le=i,gs.transition=s}}function IE(e,t,n,r){var i=le,s=gs.transition;gs.transition=null;try{le=4,Bh(e,t,n,r)}finally{le=i,gs.transition=s}}function Bh(e,t,n,r){if(Kl){var i=Gf(e,t,n,r);if(i===null)Bc(e,t,r,ql,n),sg(e,r);else if(DE(i,e,t,n,r))r.stopPropagation();else if(sg(e,r),t&4&&-1<NE.indexOf(e)){for(;i!==null;){var s=Sa(i);if(s!==null&&A1(s),s=Gf(e,t,n,r),s===null&&Bc(e,t,r,ql,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Bc(e,t,r,null,n)}}var ql=null;function Gf(e,t,n,r){if(ql=null,e=Lh(r),e=oi(e),e!==null)if(t=Ni(e),t===null)e=null;else if(n=t.tag,n===13){if(e=b1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ql=e,null}function N1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CE()){case Ih:return 1;case C1:return 4;case Hl:case kE:return 16;case k1:return 536870912;default:return 16}default:return 16}}var Er=null,zh=null,wl=null;function D1(){if(wl)return wl;var e,t=zh,n=t.length,r,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return wl=i.slice(e,1<r?1-r:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Qa(){return!0}function ag(){return!1}function Lt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Qa:ag,this.isPropagationStopped=ag,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var Ks={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uh=Lt(Ks),ba=Te({},Ks,{view:0,detail:0}),$E=Lt(ba),jc,Mc,so,Pu=Te({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==so&&(so&&e.type==="mousemove"?(jc=e.screenX-so.screenX,Mc=e.screenY-so.screenY):Mc=jc=0,so=e),jc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),lg=Lt(Pu),VE=Te({},Pu,{dataTransfer:0}),BE=Lt(VE),zE=Te({},ba,{relatedTarget:0}),Nc=Lt(zE),UE=Te({},Ks,{animationName:0,elapsedTime:0,pseudoElement:0}),HE=Lt(UE),WE=Te({},Ks,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KE=Lt(WE),qE=Te({},Ks,{data:0}),ug=Lt(qE),GE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},YE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=YE[e])?!!t[e]:!1}function Hh(){return XE}var ZE=Te({},ba,{key:function(e){if(e.key){var t=GE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?QE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hh,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),JE=Lt(ZE),eC=Te({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cg=Lt(eC),tC=Te({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hh}),nC=Lt(tC),rC=Te({},Ks,{propertyName:0,elapsedTime:0,pseudoElement:0}),iC=Lt(rC),sC=Te({},Pu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),oC=Lt(sC),aC=[9,13,27,32],Wh=Xn&&"CompositionEvent"in window,To=null;Xn&&"documentMode"in document&&(To=document.documentMode);var lC=Xn&&"TextEvent"in window&&!To,F1=Xn&&(!Wh||To&&8<To&&11>=To),fg=" ",dg=!1;function L1(e,t){switch(e){case"keyup":return aC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function uC(e,t){switch(e){case"compositionend":return I1(t);case"keypress":return t.which!==32?null:(dg=!0,fg);case"textInput":return e=t.data,e===fg&&dg?null:e;default:return null}}function cC(e,t){if(Xi)return e==="compositionend"||!Wh&&L1(e,t)?(e=D1(),wl=zh=Er=null,Xi=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return F1&&t.locale!=="ko"?null:t.data;default:return null}}var fC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fC[e.type]:t==="textarea"}function $1(e,t,n,r){g1(r),t=Gl(t,"onChange"),0<t.length&&(n=new Uh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Eo=null,Uo=null;function dC(e){Y1(e,0)}function Au(e){var t=es(e);if(u1(t))return e}function hC(e,t){if(e==="change")return t}var V1=!1;if(Xn){var Dc;if(Xn){var Fc="oninput"in document;if(!Fc){var pg=document.createElement("div");pg.setAttribute("oninput","return;"),Fc=typeof pg.oninput=="function"}Dc=Fc}else Dc=!1;V1=Dc&&(!document.documentMode||9<document.documentMode)}function mg(){Eo&&(Eo.detachEvent("onpropertychange",B1),Uo=Eo=null)}function B1(e){if(e.propertyName==="value"&&Au(Uo)){var t=[];$1(t,Uo,e,Lh(e)),w1(dC,t)}}function pC(e,t,n){e==="focusin"?(mg(),Eo=t,Uo=n,Eo.attachEvent("onpropertychange",B1)):e==="focusout"&&mg()}function mC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Au(Uo)}function gC(e,t){if(e==="click")return Au(t)}function yC(e,t){if(e==="input"||e==="change")return Au(t)}function vC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:vC;function Ho(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Rf.call(t,i)||!mn(e[i],t[i]))return!1}return!0}function gg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yg(e,t){var n=gg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=gg(n)}}function z1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U1(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Kh(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 xC(e){var t=U1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&z1(n.ownerDocument.documentElement,n)){if(r!==null&&Kh(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,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=yg(n,s);var o=yg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var wC=Xn&&"documentMode"in document&&11>=document.documentMode,Zi=null,Qf=null,Co=null,Yf=!1;function vg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yf||Zi==null||Zi!==Bl(r)||(r=Zi,"selectionStart"in r&&Kh(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}),Co&&Ho(Co,r)||(Co=r,r=Gl(Qf,"onSelect"),0<r.length&&(t=new Uh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zi)))}function Ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ji={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Lc={},H1={};Xn&&(H1=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function Ru(e){if(Lc[e])return Lc[e];if(!Ji[e])return e;var t=Ji[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in H1)return Lc[e]=t[n];return e}var W1=Ru("animationend"),K1=Ru("animationiteration"),q1=Ru("animationstart"),G1=Ru("transitionend"),Q1=new Map,xg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wr(e,t){Q1.set(e,t),Mi(t,[e])}for(var Ic=0;Ic<xg.length;Ic++){var $c=xg[Ic],bC=$c.toLowerCase(),SC=$c[0].toUpperCase()+$c.slice(1);Wr(bC,"on"+SC)}Wr(W1,"onAnimationEnd");Wr(K1,"onAnimationIteration");Wr(q1,"onAnimationStart");Wr("dblclick","onDoubleClick");Wr("focusin","onFocus");Wr("focusout","onBlur");Wr(G1,"onTransitionEnd");Ms("onMouseEnter",["mouseout","mouseover"]);Ms("onMouseLeave",["mouseout","mouseover"]);Ms("onPointerEnter",["pointerout","pointerover"]);Ms("onPointerLeave",["pointerout","pointerover"]);Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var go="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TC=new Set("cancel close invalid load scroll toggle".split(" ").concat(go));function wg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,bE(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;wg(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;wg(i,a,c),s=l}}}if(Ul)throw e=Wf,Ul=!1,Wf=null,e}function pe(e,t){var n=t[td];n===void 0&&(n=t[td]=new Set);var r=e+"__bubble";n.has(r)||(X1(t,e,2,!1),n.add(r))}function Vc(e,t,n){var r=0;t&&(r|=4),X1(n,e,r,t)}var Xa="_reactListening"+Math.random().toString(36).slice(2);function Wo(e){if(!e[Xa]){e[Xa]=!0,i1.forEach(function(n){n!=="selectionchange"&&(TC.has(n)||Vc(n,!1,e),Vc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xa]||(t[Xa]=!0,Vc("selectionchange",!1,t))}}function X1(e,t,n,r){switch(N1(t)){case 1:var i=LE;break;case 4:i=IE;break;default:i=Bh}n=i.bind(null,t,n,e),i=void 0,!Hf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Bc(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=oi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}w1(function(){var c=s,f=Lh(n),u=[];e:{var d=Q1.get(e);if(d!==void 0){var h=Uh,m=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":h=JE;break;case"focusin":m="focus",h=Nc;break;case"focusout":m="blur",h=Nc;break;case"beforeblur":case"afterblur":h=Nc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=lg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=BE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=nC;break;case W1:case K1:case q1:h=HE;break;case G1:h=iC;break;case"scroll":h=$E;break;case"wheel":h=oC;break;case"copy":case"cut":case"paste":h=KE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cg}var x=(t&4)!==0,w=!x&&e==="scroll",p=x?d!==null?d+"Capture":null:d;x=[];for(var g=c,v;g!==null;){v=g;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,p!==null&&(E=$o(g,p),E!=null&&x.push(Ko(g,E,v)))),w)break;g=g.return}0<x.length&&(d=new h(d,m,null,n,f),u.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==zf&&(m=n.relatedTarget||n.fromElement)&&(oi(m)||m[Zn]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=c,m=m?oi(m):null,m!==null&&(w=Ni(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=c),h!==m)){if(x=lg,E="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=cg,E="onPointerLeave",p="onPointerEnter",g="pointer"),w=h==null?d:es(h),v=m==null?d:es(m),d=new x(E,g+"leave",h,n,f),d.target=w,d.relatedTarget=v,E=null,oi(f)===c&&(x=new x(p,g+"enter",m,n,f),x.target=v,x.relatedTarget=w,E=x),w=E,h&&m)t:{for(x=h,p=m,g=0,v=x;v;v=qi(v))g++;for(v=0,E=p;E;E=qi(E))v++;for(;0<g-v;)x=qi(x),g--;for(;0<v-g;)p=qi(p),v--;for(;g--;){if(x===p||p!==null&&x===p.alternate)break t;x=qi(x),p=qi(p)}x=null}else x=null;h!==null&&bg(u,d,h,x,!1),m!==null&&w!==null&&bg(u,w,m,x,!0)}}e:{if(d=c?es(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var S=hC;else if(hg(d))if(V1)S=yC;else{S=mC;var C=pC}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(S=gC);if(S&&(S=S(e,c))){$1(u,S,n,f);break e}C&&C(e,d,c),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Lf(d,"number",d.value)}switch(C=c?es(c):window,e){case"focusin":(hg(C)||C.contentEditable==="true")&&(Zi=C,Qf=c,Co=null);break;case"focusout":Co=Qf=Zi=null;break;case"mousedown":Yf=!0;break;case"contextmenu":case"mouseup":case"dragend":Yf=!1,vg(u,n,f);break;case"selectionchange":if(wC)break;case"keydown":case"keyup":vg(u,n,f)}var k;if(Wh)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Xi?L1(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(F1&&n.locale!=="ko"&&(Xi||P!=="onCompositionStart"?P==="onCompositionEnd"&&Xi&&(k=D1()):(Er=f,zh="value"in Er?Er.value:Er.textContent,Xi=!0)),C=Gl(c,P),0<C.length&&(P=new ug(P,e,null,n,f),u.push({event:P,listeners:C}),k?P.data=k:(k=I1(n),k!==null&&(P.data=k)))),(k=lC?uC(e,n):cC(e,n))&&(c=Gl(c,"onBeforeInput"),0<c.length&&(f=new ug("onBeforeInput","beforeinput",null,n,f),u.push({event:f,listeners:c}),f.data=k))}Y1(u,t)})}function Ko(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=$o(e,n),s!=null&&r.unshift(Ko(e,s,i)),s=$o(e,t),s!=null&&r.push(Ko(e,s,i))),e=e.return}return r}function qi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=$o(n,s),l!=null&&o.unshift(Ko(n,l,a))):i||(l=$o(n,s),l!=null&&o.push(Ko(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var EC=/\r\n?/g,CC=/\u0000|\uFFFD/g;function Sg(e){return(typeof e=="string"?e:""+e).replace(EC,`
38
38
  `).replace(CC,"")}function Za(e,t,n){if(t=Sg(t),Sg(e)!==t&&n)throw Error(A(425))}function Ql(){}var Xf=null,Zf=null;function Jf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ed=typeof setTimeout=="function"?setTimeout:void 0,kC=typeof clearTimeout=="function"?clearTimeout:void 0,Tg=typeof Promise=="function"?Promise:void 0,_C=typeof queueMicrotask=="function"?queueMicrotask:typeof Tg<"u"?function(e){return Tg.resolve(null).then(e).catch(PC)}:ed;function PC(e){setTimeout(function(){throw e})}function zc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),zo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);zo(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Eg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qs=Math.random().toString(36).slice(2),kn="__reactFiber$"+qs,qo="__reactProps$"+qs,Zn="__reactContainer$"+qs,td="__reactEvents$"+qs,AC="__reactListeners$"+qs,RC="__reactHandles$"+qs;function oi(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Eg(e);e!==null;){if(n=e[kn])return n;e=Eg(e)}return t}e=n,n=e.parentNode}return null}function Sa(e){return e=e[kn]||e[Zn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function Ou(e){return e[qo]||null}var nd=[],ts=-1;function Kr(e){return{current:e}}function ge(e){0>ts||(e.current=nd[ts],nd[ts]=null,ts--)}function de(e,t){ts++,nd[ts]=e.current,e.current=t}var Br={},rt=Kr(Br),St=Kr(!1),Ci=Br;function Ns(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tt(e){return e=e.childContextTypes,e!=null}function Yl(){ge(St),ge(rt)}function Cg(e,t,n){if(rt.current!==Br)throw Error(A(168));de(rt,t),de(St,n)}function Z1(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(A(108,pE(e)||"Unknown",i));return Te({},n,r)}function Xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ci=rt.current,de(rt,e),de(St,St.current),!0}function kg(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=Z1(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ge(St),ge(rt),de(rt,e)):ge(St),de(St,n)}var zn=null,ju=!1,Uc=!1;function J1(e){zn===null?zn=[e]:zn.push(e)}function OC(e){ju=!0,J1(e)}function qr(){if(!Uc&&zn!==null){Uc=!0;var e=0,t=le;try{var n=zn;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zn=null,ju=!1}catch(i){throw zn!==null&&(zn=zn.slice(e+1)),E1(Ih,qr),i}finally{le=t,Uc=!1}}return null}var ns=[],rs=0,Zl=null,Jl=0,Kt=[],qt=0,ki=null,Wn=1,Kn="";function ei(e,t){ns[rs++]=Jl,ns[rs++]=Zl,Zl=e,Jl=t}function ex(e,t,n){Kt[qt++]=Wn,Kt[qt++]=Kn,Kt[qt++]=ki,ki=e;var r=Wn;e=Kn;var i=32-hn(r)-1;r&=~(1<<i),n+=1;var s=32-hn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wn=1<<32-hn(t)+i|n<<i|r,Kn=s+e}else Wn=1<<s|n<<i|r,Kn=e}function qh(e){e.return!==null&&(ei(e,1),ex(e,1,0))}function Gh(e){for(;e===Zl;)Zl=ns[--rs],ns[rs]=null,Jl=ns[--rs],ns[rs]=null;for(;e===ki;)ki=Kt[--qt],Kt[qt]=null,Kn=Kt[--qt],Kt[qt]=null,Wn=Kt[--qt],Kt[qt]=null}var Nt=null,Ot=null,ve=!1,fn=null;function tx(e,t){var n=Qt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _g(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Nt=e,Ot=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Nt=e,Ot=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Wn,overflow:Kn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Nt=e,Ot=null,!0):!1;default:return!1}}function rd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function id(e){if(ve){var t=Ot;if(t){var n=t;if(!_g(e,t)){if(rd(e))throw Error(A(418));t=Or(n.nextSibling);var r=Nt;t&&_g(e,t)?tx(r,n):(e.flags=e.flags&-4097|2,ve=!1,Nt=e)}}else{if(rd(e))throw Error(A(418));e.flags=e.flags&-4097|2,ve=!1,Nt=e}}}function Pg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Nt=e}function Ja(e){if(e!==Nt)return!1;if(!ve)return Pg(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Jf(e.type,e.memoizedProps)),t&&(t=Ot)){if(rd(e))throw nx(),Error(A(418));for(;t;)tx(e,t),t=Or(t.nextSibling)}if(Pg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(A(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ot=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ot=null}}else Ot=Nt?Or(e.stateNode.nextSibling):null;return!0}function nx(){for(var e=Ot;e;)e=Or(e.nextSibling)}function Ds(){Ot=Nt=null,ve=!1}function Qh(e){fn===null?fn=[e]:fn.push(e)}var jC=nr.ReactCurrentBatchConfig;function oo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(A(309));var r=n.stateNode}if(!r)throw Error(A(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(A(284));if(!n._owner)throw Error(A(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(A(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ag(e){var t=e._init;return t(e._payload)}function rx(e){function t(p,g){if(e){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Dr(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,E){return g===null||g.tag!==6?(g=Yc(v,p.mode,E),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,E){var S=v.type;return S===Yi?f(p,g,v.props.children,E,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Ag(S)===g.type)?(E=i(g,v.props),E.ref=oo(p,g,v),E.return=p,E):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=oo(p,g,v),E.return=p,E)}function c(p,g,v,E){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Xc(v,p.mode,E),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function f(p,g,v,E,S){return g===null||g.tag!==7?(g=bi(v,p.mode,E,S),g.return=p,g):(g=i(g,v),g.return=p,g)}function u(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Yc(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ua:return v=Pl(g.type,g.key,g.props,null,p.mode,v),v.ref=oo(p,null,g),v.return=p,v;case Qi:return g=Xc(g,p.mode,v),g.return=p,g;case cr:var E=g._init;return u(p,E(g._payload),v)}if(po(g)||to(g))return g=bi(g,p.mode,v,null),g.return=p,g;el(p,g)}return null}function d(p,g,v,E){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(p,g,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:return v.key===S?l(p,g,v,E):null;case Qi:return v.key===S?c(p,g,v,E):null;case cr:return S=v._init,d(p,g,S(v._payload),E)}if(po(v)||to(v))return S!==null?null:f(p,g,v,E,null);el(p,v)}return null}function h(p,g,v,E,S){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(v)||null,a(g,p,""+E,S);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ua:return p=p.get(E.key===null?v:E.key)||null,l(g,p,E,S);case Qi:return p=p.get(E.key===null?v:E.key)||null,c(g,p,E,S);case cr:var C=E._init;return h(p,g,v,C(E._payload),S)}if(po(E)||to(E))return p=p.get(v)||null,f(g,p,E,S,null);el(g,E)}return null}function m(p,g,v,E){for(var S=null,C=null,k=g,P=g=0,j=null;k!==null&&P<v.length;P++){k.index>P?(j=k,k=null):j=k.sibling;var M=d(p,k,v[P],E);if(M===null){k===null&&(k=j);break}e&&k&&M.alternate===null&&t(p,k),g=s(M,g,P),C===null?S=M:C.sibling=M,C=M,k=j}if(P===v.length)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;P<v.length;P++)k=u(p,v[P],E),k!==null&&(g=s(k,g,P),C===null?S=k:C.sibling=k,C=k);return ve&&ei(p,P),S}for(k=r(p,k);P<v.length;P++)j=h(k,p,P,v[P],E),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?P:j.key),g=s(j,g,P),C===null?S=j:C.sibling=j,C=j);return e&&k.forEach(function(I){return t(p,I)}),ve&&ei(p,P),S}function x(p,g,v,E){var S=to(v);if(typeof S!="function")throw Error(A(150));if(v=S.call(v),v==null)throw Error(A(151));for(var C=S=null,k=g,P=g=0,j=null,M=v.next();k!==null&&!M.done;P++,M=v.next()){k.index>P?(j=k,k=null):j=k.sibling;var I=d(p,k,M.value,E);if(I===null){k===null&&(k=j);break}e&&k&&I.alternate===null&&t(p,k),g=s(I,g,P),C===null?S=I:C.sibling=I,C=I,k=j}if(M.done)return n(p,k),ve&&ei(p,P),S;if(k===null){for(;!M.done;P++,M=v.next())M=u(p,M.value,E),M!==null&&(g=s(M,g,P),C===null?S=M:C.sibling=M,C=M);return ve&&ei(p,P),S}for(k=r(p,k);!M.done;P++,M=v.next())M=h(k,p,P,M.value,E),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?P:M.key),g=s(M,g,P),C===null?S=M:C.sibling=M,C=M);return e&&k.forEach(function(re){return t(p,re)}),ve&&ei(p,P),S}function w(p,g,v,E){if(typeof v=="object"&&v!==null&&v.type===Yi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ua:e:{for(var S=v.key,C=g;C!==null;){if(C.key===S){if(S=v.type,S===Yi){if(C.tag===7){n(p,C.sibling),g=i(C,v.props.children),g.return=p,p=g;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cr&&Ag(S)===C.type){n(p,C.sibling),g=i(C,v.props),g.ref=oo(p,C,v),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Yi?(g=bi(v.props.children,p.mode,E,v.key),g.return=p,p=g):(E=Pl(v.type,v.key,v.props,null,p.mode,E),E.ref=oo(p,g,v),E.return=p,p=E)}return o(p);case Qi:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Xc(v,p.mode,E),g.return=p,p=g}return o(p);case cr:return C=v._init,w(p,g,C(v._payload),E)}if(po(v))return m(p,g,v,E);if(to(v))return x(p,g,v,E);el(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=Yc(v,p.mode,E),g.return=p,p=g),o(p)):n(p,g)}return w}var Fs=rx(!0),ix=rx(!1),eu=Kr(null),tu=null,is=null,Yh=null;function Xh(){Yh=is=tu=null}function Zh(e){var t=eu.current;ge(eu),e._currentValue=t}function sd(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 ys(e,t){tu=e,Yh=is=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(bt=!0),e.firstContext=null)}function Zt(e){var t=e._currentValue;if(Yh!==e)if(e={context:e,memoizedValue:t,next:null},is===null){if(tu===null)throw Error(A(308));is=e,tu.dependencies={lanes:0,firstContext:e}}else is=is.next=e;return t}var ai=null;function Jh(e){ai===null?ai=[e]:ai.push(e)}function sx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Jh(t)):(n.next=i.next,i.next=n),t.interleaved=n,Jn(e,r)}function Jn(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 fr=!1;function ep(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ox(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 Gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Jn(e,n)}return i=r.interleaved,i===null?(t.next=t,Jh(r)):(t.next=i.next,i.next=t),r.interleaved=t,Jn(e,n)}function Sl(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,$h(e,n)}}function Rg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 nu(e,t,n,r){var i=e.updateQueue;fr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;o=0,f=c=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,x=a;switch(d=t,h=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){u=m.call(h,u,d);break e}u=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,d=typeof m=="function"?m.call(h,u,d):m,d==null)break e;u=Te({},u,d);break e;case 2:fr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=h,l=u):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Pi|=o,e.lanes=o,e.memoizedState=u}}function Og(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(A(191,i));i.call(r)}}}var Ta={},Pn=Kr(Ta),Go=Kr(Ta),Qo=Kr(Ta);function li(e){if(e===Ta)throw Error(A(174));return e}function tp(e,t){switch(de(Qo,t),de(Go,e),de(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$f(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$f(t,e)}ge(Pn),de(Pn,t)}function Ls(){ge(Pn),ge(Go),ge(Qo)}function ax(e){li(Qo.current);var t=li(Pn.current),n=$f(t,e.type);t!==n&&(de(Go,e),de(Pn,n))}function np(e){Go.current===e&&(ge(Pn),ge(Go))}var we=Kr(0);function ru(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hc=[];function rp(){for(var e=0;e<Hc.length;e++)Hc[e]._workInProgressVersionPrimary=null;Hc.length=0}var Tl=nr.ReactCurrentDispatcher,Wc=nr.ReactCurrentBatchConfig,_i=0,Se=null,Ne=null,Be=null,iu=!1,ko=!1,Yo=0,MC=0;function Xe(){throw Error(A(321))}function ip(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function sp(e,t,n,r,i,s){if(_i=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tl.current=e===null||e.memoizedState===null?LC:IC,e=n(r,i),ko){s=0;do{if(ko=!1,Yo=0,25<=s)throw Error(A(301));s+=1,Be=Ne=null,t.updateQueue=null,Tl.current=$C,e=n(r,i)}while(ko)}if(Tl.current=su,t=Ne!==null&&Ne.next!==null,_i=0,Be=Ne=Se=null,iu=!1,t)throw Error(A(300));return e}function op(){var e=Yo!==0;return Yo=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Se.memoizedState=Be=e:Be=Be.next=e,Be}function Jt(){if(Ne===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Be===null?Se.memoizedState:Be.next;if(t!==null)Be=t,Ne=e;else{if(e===null)throw Error(A(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Be===null?Se.memoizedState=Be=e:Be=Be.next=e}return Be}function Xo(e,t){return typeof t=="function"?t(e):t}function Kc(e){var t=Jt(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=Ne,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var f=c.lane;if((_i&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=r):l=l.next=u,Se.lanes|=f,Pi|=f}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,mn(r,t.memoizedState)||(bt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Pi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qc(e){var t=Jt(),n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);mn(s,t.memoizedState)||(bt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function lx(){}function ux(e,t){var n=Se,r=Jt(),i=t(),s=!mn(r.memoizedState,i);if(s&&(r.memoizedState=i,bt=!0),r=r.queue,ap(dx.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Zo(9,fx.bind(null,n,r,i,t),void 0,null),Ue===null)throw Error(A(349));_i&30||cx(n,t,i)}return i}function cx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fx(e,t,n,r){t.value=n,t.getSnapshot=r,hx(t)&&px(e)}function dx(e,t,n){return n(function(){hx(t)&&px(e)})}function hx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function px(e){var t=Jn(e,1);t!==null&&pn(t,e,1,-1)}function jg(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:e},t.queue=e,e=e.dispatch=FC.bind(null,Se,e),[t.memoizedState,e]}function Zo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function mx(){return Jt().memoizedState}function El(e,t,n,r){var i=wn();Se.flags|=e,i.memoizedState=Zo(1|t,n,void 0,r===void 0?null:r)}function Mu(e,t,n,r){var i=Jt();r=r===void 0?null:r;var s=void 0;if(Ne!==null){var o=Ne.memoizedState;if(s=o.destroy,r!==null&&ip(r,o.deps)){i.memoizedState=Zo(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Zo(1|t,n,s,r)}function Mg(e,t){return El(8390656,8,e,t)}function ap(e,t){return Mu(2048,8,e,t)}function gx(e,t){return Mu(4,2,e,t)}function yx(e,t){return Mu(4,4,e,t)}function vx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xx(e,t,n){return n=n!=null?n.concat([e]):null,Mu(4,4,vx.bind(null,t,e),n)}function lp(){}function wx(e,t){var n=Jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ip(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bx(e,t){var n=Jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ip(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sx(e,t,n){return _i&21?(mn(n,t)||(n=_1(),Se.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bt=!0),e.memoizedState=n)}function NC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Wc.transition;Wc.transition={};try{e(!1),t()}finally{le=n,Wc.transition=r}}function Tx(){return Jt().memoizedState}function DC(e,t,n){var r=Nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ex(e))Cx(t,n);else if(n=sx(e,t,n,r),n!==null){var i=ut();pn(n,e,r,i),kx(n,t,r)}}function FC(e,t,n){var r=Nr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ex(e))Cx(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,mn(a,o)){var l=t.interleaved;l===null?(i.next=i,Jh(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=sx(e,t,i,r),n!==null&&(i=ut(),pn(n,e,r,i),kx(n,t,r))}}function Ex(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Cx(e,t){ko=iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$h(e,n)}}var su={readContext:Zt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},LC={readContext:Zt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Mg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();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=DC.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:jg,useDebugValue:lp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=jg(!1),t=e[0];return e=NC.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=wn();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),Ue===null)throw Error(A(349));_i&30||cx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Mg(dx.bind(null,r,s,e),[e]),r.flags|=2048,Zo(9,fx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=wn(),t=Ue.identifierPrefix;if(ve){var n=Kn,r=Wn;n=(r&~(1<<32-hn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},IC={readContext:Zt,useCallback:wx,useContext:Zt,useEffect:ap,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:Kc,useRef:mx,useState:function(){return Kc(Xo)},useDebugValue:lp,useDeferredValue:function(e){var t=Jt();return Sx(t,Ne.memoizedState,e)},useTransition:function(){var e=Kc(Xo)[0],t=Jt().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1},$C={readContext:Zt,useCallback:wx,useContext:Zt,useEffect:ap,useImperativeHandle:xx,useInsertionEffect:gx,useLayoutEffect:yx,useMemo:bx,useReducer:qc,useRef:mx,useState:function(){return qc(Xo)},useDebugValue:lp,useDeferredValue:function(e){var t=Jt();return Ne===null?t.memoizedState=e:Sx(t,Ne.memoizedState,e)},useTransition:function(){var e=qc(Xo)[0],t=Jt().memoizedState;return[e,t]},useMutableSource:lx,useSyncExternalStore:ux,useId:Tx,unstable_isNewReconciler:!1};function an(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function od(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nu={isMounted:function(e){return(e=e._reactInternals)?Ni(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ut(),i=Nr(e),s=Gn(r,i);s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(pn(t,e,i,r),Sl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ut(),i=Nr(e),s=Gn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=jr(e,s,i),t!==null&&(pn(t,e,i,r),Sl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ut(),r=Nr(e),i=Gn(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(pn(t,e,r,n),Sl(t,e,r))}};function Ng(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ho(n,r)||!Ho(i,s):!0}function _x(e,t,n){var r=!1,i=Br,s=t.contextType;return typeof s=="object"&&s!==null?s=Zt(s):(i=Tt(t)?Ci:rt.current,r=t.contextTypes,s=(r=r!=null)?Ns(e,i):Br),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Nu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Dg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Nu.enqueueReplaceState(t,t.state,null)}function ad(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ep(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Zt(s):(s=Tt(t)?Ci:rt.current,i.context=Ns(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(od(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Nu.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Is(e,t){try{var n="",r=t;do n+=hE(r),r=r.return;while(r);var i=n}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Gc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ld(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var VC=typeof WeakMap=="function"?WeakMap:Map;function Px(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,vd=r),ld(e,t)},n}function Ax(e,t,n){n=Gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ld(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ld(e,t),typeof r!="function"&&(Mr===null?Mr=new Set([this]):Mr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Fg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ek.bind(null,e,t,n),t.then(e,e))}function Lg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ig(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var BC=nr.ReactCurrentOwner,bt=!1;function ot(e,t,n,r){t.child=e===null?ix(t,null,n,r):Fs(t,e.child,n,r)}function $g(e,t,n,r,i){n=n.render;var s=t.ref;return ys(t,i),r=sp(e,t,n,r,s,i),n=op(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&n&&qh(t),t.flags|=1,ot(e,t,r,i),t.child)}function Vg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!gp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rx(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ho,n(o,r)&&e.ref===t.ref)return er(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ho(s,r)&&e.ref===t.ref)if(bt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(bt=!0);else return t.lanes=e.lanes,er(e,t,i)}return ud(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(os,Rt),Rt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(os,Rt),Rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(os,Rt),Rt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(os,Rt),Rt|=r;return ot(e,t,i,n),t.child}function jx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ud(e,t,n,r,i){var s=Tt(n)?Ci:rt.current;return s=Ns(t,s),ys(t,i),n=sp(e,t,n,r,s,i),r=op(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&r&&qh(t),t.flags|=1,ot(e,t,n,i),t.child)}function Bg(e,t,n,r,i){if(Tt(n)){var s=!0;Xl(t)}else s=!1;if(ys(t,i),t.stateNode===null)Cl(e,t),_x(t,n,r),ad(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Zt(c):(c=Tt(n)?Ci:rt.current,c=Ns(t,c));var f=n.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Dg(t,o,r,c),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||St.current||fr?(typeof f=="function"&&(od(t,n,f,r),l=t.memoizedState),(a=fr||Ng(t,n,a,r,d,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ox(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:an(t.type,a),o.props=c,u=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Zt(l):(l=Tt(n)?Ci:rt.current,l=Ns(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&Dg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==u||d!==m||St.current||fr?(typeof h=="function"&&(od(t,n,h,r),m=t.memoizedState),(c=fr||Ng(t,n,c,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return cd(e,t,n,r,s,i)}function cd(e,t,n,r,i,s){jx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&kg(t,n,!1),er(e,t,s);r=t.stateNode,BC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Fs(t,e.child,null,s),t.child=Fs(t,null,a,s)):ot(e,t,a,s),t.memoizedState=r.state,i&&kg(t,n,!0),t.child}function Mx(e){var t=e.stateNode;t.pendingContext?Cg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Cg(e,t.context,!1),tp(e,t.containerInfo)}function zg(e,t,n,r,i){return Ds(),Qh(i),t.flags|=256,ot(e,t,n,r),t.child}var fd={dehydrated:null,treeContext:null,retryLane:0};function dd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return id(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=dd(n),t.memoizedState=fd,e):up(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return zC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?dd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=fd,r}return s=e.child,e=s.sibling,r=Dr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function up(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&Qh(r),Fs(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Gc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Fs(t,e.child,null,o),t.child.memoizedState=dd(o),t.memoizedState=fd,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=Gc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,bt||a){if(r=Ue,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Jn(e,i),pn(r,e,i,-1))}return mp(),r=Gc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=tk.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ot=Or(i.nextSibling),Nt=t,ve=!0,fn=null,e!==null&&(Kt[qt++]=Wn,Kt[qt++]=Kn,Kt[qt++]=ki,Wn=e.id,Kn=e.overflow,ki=t),t=up(t,r.children),t.flags|=4096,t)}function Ug(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),sd(e.return,t,n)}function Qc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ot(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ug(e,n,t);else if(e.tag===19)Ug(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,s);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function UC(e,t,n){switch(t.tag){case 3:Mx(t),Ds();break;case 5:ax(t);break;case 1:Tt(t.type)&&Xl(t);break;case 4:tp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Nx(e,t,n):(de(we,we.current&1),e=er(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return er(e,t,n)}var Fx,hd,Lx,Ix;Fx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hd=function(){};Lx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Df(e,i),r=Df(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=If(e,i),r=If(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}Vf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Lo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Lo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function ao(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function HC(e,t,n){var r=t.pendingProps;switch(Gh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Tt(t.type)&&Yl(),Ze(t),null;case 3:return r=t.stateNode,Ls(),ge(St),ge(rt),rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fn!==null&&(bd(fn),fn=null))),hd(e,t),Ze(t),null;case 5:np(t);var i=li(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Ze(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[qo]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<go.length;i++)pe(go[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Zm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":eg(r,s),pe("invalid",r)}Vf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Lo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Jm(r,s,!0);break;case"textarea":Ha(r),tg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[qo]=r,Fx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Bf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<go.length;i++)pe(go[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Zm(e,r),i=Df(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":eg(e,r),i=If(e,r),pe("invalid",e);break;default:i=r}Vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?m1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Io(e,l):typeof l=="number"&&Io(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Lo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Mh(e,s,l,o))}switch(n){case"input":Ha(e),Jm(e,r,!1);break;case"textarea":Ha(e),tg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?hs(e,!!r.multiple,s,!1):r.defaultValue!=null&&hs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Qo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Nt,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Ze(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Ot!==null&&t.mode&1&&!(t.flags&128))nx(),Ds(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Ds(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else fn!==null&&(bd(fn),fn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Fe===0&&(Fe=3):mp())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ls(),hd(e,t),e===null&&Wo(t.stateNode.containerInfo),Ze(t),null;case 10:return Zh(t.type._context),Ze(t),null;case 17:return Tt(t.type)&&Yl(),Ze(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)ao(s,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,ao(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>$s&&(t.flags|=128,r=!0,ao(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ao(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Ze(t),null}else 2*Ae()-s.renderingStartTime>$s&&n!==1073741824&&(t.flags|=128,r=!0,ao(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return pp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function WC(e,t){switch(Gh(t),t.tag){case 1:return Tt(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ls(),ge(St),ge(rt),rp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return np(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Ls(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var nl=!1,tt=!1,KC=typeof WeakSet=="function"?WeakSet:Set,F=null;function ss(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function pd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Hg=!1;function qC(e,t){if(Xf=Kl,e=U1(),Kh(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(a=o),d===s&&++f===r&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,w=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:an(t.type,x),w);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Hg,Hg=!1,m}function _o(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 s=i.destroy;i.destroy=void 0,s!==void 0&&pd(t,n,s)}i=i.next}while(i!==r)}}function Du(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 md(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 $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[qo],delete t[td],delete t[AC],delete t[RC])),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 Vx(e){return e.tag===5||e.tag===3||e.tag===4}function Wg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(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 gd(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=Ql));else if(r!==4&&(e=e.child,e!==null))for(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}function yd(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(yd(e,t,n),e=e.sibling;e!==null;)yd(e,t,n),e=e.sibling}var Ke=null,un=!1;function ar(e,t,n){for(n=n.child;n!==null;)Bx(e,t,n),n=n.sibling}function Bx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:tt||ss(n,t);case 6:var r=Ke,i=un;Ke=null,ar(e,t,n),Ke=r,un=i,Ke!==null&&(un?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(un?(e=Ke,n=n.stateNode,e.nodeType===8?zc(e.parentNode,n):e.nodeType===1&&zc(e,n),zo(e)):zc(Ke,n.stateNode));break;case 4:r=Ke,i=un,Ke=n.stateNode.containerInfo,un=!0,ar(e,t,n),Ke=r,un=i;break;case 0:case 11:case 14:case 15:if(!tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&pd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!tt&&(ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,ar(e,t,n),tt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Kg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KC),t.forEach(function(r){var i=nk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ke=a.stateNode,un=!1;break e;case 3:Ke=a.stateNode.containerInfo,un=!0;break e;case 4:Ke=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(Ke===null)throw Error(A(160));Bx(s,o,i),Ke=null,un=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ke(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zx(t,e),t=t.sibling}function zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rn(t,e),vn(e),r&4){try{_o(3,e,e.return),Du(3,e)}catch(x){ke(e,e.return,x)}try{_o(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:rn(t,e),vn(e),r&512&&n!==null&&ss(n,n.return);break;case 5:if(rn(t,e),vn(e),r&512&&n!==null&&ss(n,n.return),e.flags&32){var i=e.stateNode;try{Io(i,"")}catch(x){ke(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&c1(i,s),Bf(a,o);var c=Bf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],u=l[o+1];f==="style"?m1(i,u):f==="dangerouslySetInnerHTML"?h1(i,u):f==="children"?Io(i,u):Mh(i,f,u,c)}switch(a){case"input":Ff(i,s);break;case"textarea":f1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?hs(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?hs(i,!!s.multiple,s.defaultValue,!0):hs(i,!!s.multiple,s.multiple?[]:"",!1))}i[qo]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(rn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){ke(e,e.return,x)}}break;case 3:if(rn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:rn(t,e),vn(e);break;case 13:rn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dp=Ae())),r&4&&Kg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(c=tt)||f,rn(t,e),tt=c):rn(t,e),vn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(u=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:_o(4,d,d.return);break;case 1:ss(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){ke(r,n,x)}}break;case 5:ss(d,d.return);break;case 22:if(d.memoizedState!==null){Gg(u);continue}}h!==null?(h.return=d,F=h):Gg(u)}f=f.sibling}e:for(f=null,u=e;;){if(u.tag===5){if(f===null){f=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=p1("display",o))}catch(x){ke(e,e.return,x)}}}else if(u.tag===6){if(f===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(x){ke(e,e.return,x)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:rn(t,e),vn(e),r&4&&Kg(e);break;case 21:break;default:rn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vx(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Io(i,""),r.flags&=-33);var s=Wg(e);yd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Wg(e);gd(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function GC(e,t,n){F=e,Ux(e)}function Ux(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||tt;a=nl;var c=tt;if(nl=o,(tt=l)&&!c)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Qg(i):l!==null?(l.return=o,F=l):Qg(i);for(;s!==null;)F=s,Ux(s),s=s.sibling;F=i,nl=a,tt=c}qg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):qg(e)}}function qg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:tt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:an(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Og(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Og(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var u=f.dehydrated;u!==null&&zo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}tt||t.flags&512&&md(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Gg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Qg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{md(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{md(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var QC=Math.ceil,ou=nr.ReactCurrentDispatcher,cp=nr.ReactCurrentOwner,Yt=nr.ReactCurrentBatchConfig,se=0,Ue=null,Oe=null,Ge=0,Rt=0,os=Kr(0),Fe=0,Jo=null,Pi=0,Fu=0,fp=0,Po=null,xt=null,dp=0,$s=1/0,Bn=null,au=!1,vd=null,Mr=null,rl=!1,Cr=null,lu=0,Ao=0,xd=null,kl=-1,_l=0;function ut(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Nr(e){return e.mode&1?se&2&&Ge!==0?Ge&-Ge:jC.transition!==null?(_l===0&&(_l=_1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:N1(e.type)),e):1}function pn(e,t,n,r){if(50<Ao)throw Ao=0,xd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==Ue)&&(e===Ue&&(!(se&2)&&(Fu|=n),Fe===4&&pr(e,Ge)),Et(e,r),n===1&&se===0&&!(t.mode&1)&&($s=Ae()+500,ju&&qr()))}function Et(e,t){var n=e.callbackNode;jE(e,t);var r=Wl(e,e===Ue?Ge:0);if(r===0)n!==null&&ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ig(n),t===1)e.tag===0?OC(Yg.bind(null,e)):J1(Yg.bind(null,e)),_C(function(){!(se&6)&&qr()}),n=null;else{switch(P1(r)){case 1:n=Ih;break;case 4:n=C1;break;case 16:n=Hl;break;case 536870912:n=k1;break;default:n=Hl}n=Xx(n,Hx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hx(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(vs()&&e.callbackNode!==n)return null;var r=Wl(e,e===Ue?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Kx();(Ue!==e||Ge!==t)&&(Bn=null,$s=Ae()+500,wi(e,t));do try{ZC();break}catch(a){Wx(e,a)}while(!0);Xh(),ou.current=s,se=i,Oe!==null?t=0:(Ue=null,Ge=0,t=Fe)}if(t!==0){if(t===2&&(i=Kf(e),i!==0&&(r=i,t=wd(e,i))),t===1)throw n=Jo,wi(e,0),pr(e,r),Et(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!YC(i)&&(t=uu(e,r),t===2&&(s=Kf(e),s!==0&&(r=s,t=wd(e,s))),t===1))throw n=Jo,wi(e,0),pr(e,r),Et(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,xt,Bn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=dp+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ut(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ed(ti.bind(null,e,xt,Bn),t);break}ti(e,xt,Bn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-hn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QC(r/1960))-r,10<r){e.timeoutHandle=ed(ti.bind(null,e,xt,Bn),r);break}ti(e,xt,Bn);break;case 5:ti(e,xt,Bn);break;default:throw Error(A(329))}}}return Et(e,Ae()),e.callbackNode===n?Hx.bind(null,e):null}function wd(e,t){var n=Po;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=xt,xt=n,t!==null&&bd(t)),e}function bd(e){xt===null?xt=e:xt.push.apply(xt,e)}function YC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!mn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pr(e,t){for(t&=~fp,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-hn(t),r=1<<n;e[n]=-1,t&=~r}}function Yg(e){if(se&6)throw Error(A(327));vs();var t=Wl(e,0);if(!(t&1))return Et(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Kf(e);r!==0&&(t=r,n=wd(e,r))}if(n===1)throw n=Jo,wi(e,0),pr(e,t),Et(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,xt,Bn),Et(e,Ae()),null}function hp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&($s=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&vs();var t=se;se|=1;var n=Yt.transition,r=le;try{if(Yt.transition=null,le=1,e)return e()}finally{le=r,Yt.transition=n,se=t,!(se&6)&&qr()}}function pp(){Rt=os.current,ge(os)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kC(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Ls(),ge(St),ge(rt),rp();break;case 5:np(r);break;case 4:Ls();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Zh(r.type._context);break;case 22:case 23:pp()}n=n.return}if(Ue=e,Oe=e=Dr(e.current,null),Ge=Rt=t,Fe=0,Jo=null,fp=Fu=Pi=0,xt=Po=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Wx(e,t){do{var n=Oe;try{if(Xh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Be=Ne=Se=null,ko=!1,Yo=0,cp.current=null,n===null||n.return===null){Fe=1,Jo=t,Oe=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Ge,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,f=a,u=f.tag;if(!(f.mode&1)&&(u===0||u===11||u===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Lg(o);if(h!==null){h.flags&=-257,Ig(h,o,a,s,t),h.mode&1&&Fg(s,c,t),t=h,l=c;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Fg(s,c,t),mp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var w=Lg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Ig(w,o,a,s,t),Qh(Is(l,a));break e}}s=l=Is(l,a),Fe!==4&&(Fe=2),Po===null?Po=[s]:Po.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Px(s,l,t);Rg(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Mr===null||!Mr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Ax(s,a,t);Rg(s,E);break e}}s=s.return}while(s!==null)}Gx(n)}catch(S){t=S,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Kx(){var e=ou.current;return ou.current=su,e===null?su:e}function mp(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Ue===null||!(Pi&268435455)&&!(Fu&268435455)||pr(Ue,Ge)}function uu(e,t){var n=se;se|=2;var r=Kx();(Ue!==e||Ge!==t)&&(Bn=null,wi(e,t));do try{XC();break}catch(i){Wx(e,i)}while(!0);if(Xh(),se=n,ou.current=r,Oe!==null)throw Error(A(261));return Ue=null,Ge=0,Fe}function XC(){for(;Oe!==null;)qx(Oe)}function ZC(){for(;Oe!==null&&!TE();)qx(Oe)}function qx(e){var t=Yx(e.alternate,e,Rt);e.memoizedProps=e.pendingProps,t===null?Gx(e):Oe=t,cp.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=WC(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Oe=null;return}}else if(n=HC(n,t,Rt),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Fe===0&&(Fe=5)}function ti(e,t,n){var r=le,i=Yt.transition;try{Yt.transition=null,le=1,JC(e,t,n,r)}finally{Yt.transition=i,le=r}return null}function JC(e,t,n,r){do vs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ME(e,s),e===Ue&&(Oe=Ue=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Xx(Hl,function(){return vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Yt.transition,Yt.transition=null;var o=le;le=1;var a=se;se|=4,cp.current=null,qC(e,n),zx(n,e),xC(Zf),Kl=!!Xf,Zf=Xf=null,e.current=n,GC(n),EE(),se=a,le=o,Yt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Mr=null),_E(n.stateNode),Et(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=vd,vd=null,e;return lu&1&&e.tag!==0&&vs(),s=e.pendingLanes,s&1?e===xd?Ao++:(Ao=0,xd=e):Ao=0,qr(),null}function vs(){if(Cr!==null){var e=P1(lu),t=Yt.transition,n=le;try{if(Yt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(F=c;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:_o(8,f,s)}var u=f.child;if(u!==null)u.return=f,F=u;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if($x(f),f===c){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:_o(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Yt.transition=t}}return!1}function Xg(e,t,n){t=Is(n,t),t=Px(e,t,1),e=jr(e,t,1),t=ut(),e!==null&&(wa(e,1,t),Et(e,t))}function ke(e,t,n){if(e.tag===3)Xg(e,e,n);else for(;t!==null;){if(t.tag===3){Xg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mr===null||!Mr.has(r))){e=Is(n,e),e=Ax(t,e,1),t=jr(t,e,1),e=ut(),t!==null&&(wa(t,1,e),Et(t,e));break}}t=t.return}}function ek(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ut(),e.pingedLanes|=e.suspendedLanes&n,Ue===e&&(Ge&n)===n&&(Fe===4||Fe===3&&(Ge&130023424)===Ge&&500>Ae()-dp?wi(e,0):fp|=n),Et(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ut();e=Jn(e,t),e!==null&&(wa(e,t,n),Et(e,n))}function tk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function nk(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(A(314))}r!==null&&r.delete(t),Qx(e,n)}var Yx;Yx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return bt=!1,UC(e,t,n);bt=!!(e.flags&131072)}else bt=!1,ve&&t.flags&1048576&&ex(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ns(t,rt.current);ys(t,n),i=sp(null,t,r,e,i,n);var s=op();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,Tt(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ep(t),i.updater=Nu,t.stateNode=i,i._reactInternals=t,ad(t,r,e,n),t=cd(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&qh(t),ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ik(r),e=an(r,e),i){case 0:t=ud(null,t,r,e,n);break e;case 1:t=Bg(null,t,r,e,n);break e;case 11:t=$g(null,t,r,e,n);break e;case 14:t=Vg(null,t,r,an(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),ud(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),Bg(e,t,r,i,n);case 3:e:{if(Mx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ox(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Is(Error(A(423)),t),t=zg(e,t,r,n,i);break e}else if(r!==i){i=Is(Error(A(424)),t),t=zg(e,t,r,n,i);break e}else for(Ot=Or(t.stateNode.containerInfo.firstChild),Nt=t,ve=!0,fn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ds(),r===i){t=er(e,t,n);break e}ot(e,t,r,n)}t=t.child}return t;case 5:return ax(t),e===null&&id(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Jf(r,i)?o=null:s!==null&&Jf(r,s)&&(t.flags|=32),jx(e,t),ot(e,t,o,n),t.child;case 6:return e===null&&id(t),null;case 13:return Nx(e,t,n);case 4:return tp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fs(t,null,r,n):ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),$g(e,t,r,i,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(mn(s.value,o)){if(s.children===i.children&&!St.current){t=er(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Gn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),sd(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),sd(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ys(t,n),i=Zt(i),r=r(i),t.flags|=1,ot(e,t,r,n),t.child;case 14:return r=t.type,i=an(r,t.pendingProps),i=an(r.type,i),Vg(e,t,r,i,n);case 15:return Rx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),Cl(e,t),t.tag=1,Tt(r)?(e=!0,Xl(t)):e=!1,ys(t,n),_x(t,r,i),ad(t,r,i,n),cd(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return Ox(e,t,n)}throw Error(A(156,t.tag))};function Xx(e,t){return E1(e,t)}function rk(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 Qt(e,t,n,r){return new rk(e,t,n,r)}function gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ik(e){if(typeof e=="function")return gp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Fh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Qt(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 Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")gp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Yi:return bi(n.children,i,s,t);case Nh:o=8,i|=8;break;case Of:return e=Qt(12,n,t,i|2),e.elementType=Of,e.lanes=s,e;case jf:return e=Qt(13,n,t,i),e.elementType=jf,e.lanes=s,e;case Mf:return e=Qt(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case a1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s1:o=10;break e;case o1:o=9;break e;case Dh:o=11;break e;case Fh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Qt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Qt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Qt(22,e,r,t),e.elementType=a1,e.lanes=n,e.stateNode={isHidden:!1},e}function Yc(e,t,n){return e=Qt(6,e,null,t),e.lanes=n,e}function Xc(e,t,n){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sk(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=Oc(0),this.expirationTimes=Oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yp(e,t,n,r,i,s,o,a,l){return e=new sk(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ep(s),e}function ok(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zx(e){if(!e)return Br;e=e._reactInternals;e:{if(Ni(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Tt(n))return Z1(e,n,t)}return t}function Jx(e,t,n,r,i,s,o,a,l){return e=yp(n,r,!0,e,i,s,o,a,l),e.context=Zx(null),n=e.current,r=ut(),i=Nr(n),s=Gn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Et(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ut(),o=Nr(i);return n=Zx(n),t.context===null?t.context=n:t.pendingContext=n,t=Gn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(pn(e,i,o,s),Sl(e,i,o)),o}function cu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Zg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vp(e,t){Zg(e,t),(e=e.alternate)&&Zg(e,t)}function ak(){return null}var ew=typeof reportError=="function"?reportError:function(e){console.error(e)};function xp(e){this._internalRoot=e}$u.prototype.render=xp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=xp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Zn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&M1(e)}};function wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jg(){}function lk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=cu(o);s.call(c)}}var o=Jx(t,r,e,0,null,!1,!1,"",Jg);return e._reactRootContainer=o,e[Zn]=o.current,Wo(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=cu(l);a.call(c)}}var l=yp(e,0,!1,null,null,!1,!1,"",Jg);return e._reactRootContainer=l,e[Zn]=l.current,Wo(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=lk(n,t,e,i,r);return cu(o)}A1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mo(t.pendingLanes);n!==0&&($h(t,n|1),Et(t,Ae()),!(se&6)&&($s=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Jn(e,1);if(r!==null){var i=ut();pn(r,e,1,i)}}),vp(e,1)}};Vh=function(e){if(e.tag===13){var t=Jn(e,134217728);if(t!==null){var n=ut();pn(t,e,134217728,n)}vp(e,134217728)}};R1=function(e){if(e.tag===13){var t=Nr(e),n=Jn(e,t);if(n!==null){var r=ut();pn(n,e,t,r)}vp(e,t)}};O1=function(){return le};j1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Uf=function(e,t,n){switch(t){case"input":if(Ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ou(r);if(!i)throw Error(A(90));u1(r),Ff(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&hs(e,!!n.multiple,t,!1)}};v1=hp;x1=Ai;var uk={usingClientEntryPoint:!1,Events:[Sa,es,Ou,g1,y1,hp]},lo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ck={bundleType:lo.bundleType,version:lo.version,rendererPackageName:lo.rendererPackageName,rendererConfig:lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=S1(e),e===null?null:e.stateNode},findFiberByHostInstance:lo.findFiberByHostInstance||ak,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(ck),_n=il}catch{}}Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uk;Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(t))throw Error(A(200));return ok(e,t,null,n)};Ft.createRoot=function(e,t){if(!wp(e))throw Error(A(299));var n=!1,r="",i=ew;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=yp(e,1,!1,null,null,n,!1,r,i),e[Zn]=t.current,Wo(e.nodeType===8?e.parentNode:e),new xp(t)};Ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=S1(t),e=e===null?null:e.stateNode,e};Ft.flushSync=function(e){return Ai(e)};Ft.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};Ft.hydrateRoot=function(e,t,n){if(!wp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=ew;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jx(t,null,e,1,n??null,i,!1,s,o),e[Zn]=t.current,Wo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};Ft.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};Ft.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};Ft.unstable_batchedUpdates=hp;Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};Ft.version="18.3.1-next-f1338f8080-20240426";function tw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tw)}catch(e){console.error(e)}}tw(),t1.exports=Ft;var nw=t1.exports;const fk=Hs(nw);var rw,e0=nw;rw=e0.createRoot,e0.hydrateRoot;const dk="@alfatech/livechat",hk="v2025.05.08.1",pk="module",mk="https://api-live.alfatek.dev",gk="wss://api-live.alfatek.dev",yk=["dist","README.md"],vk="dist/widget.js",xk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},wk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},bk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},iw={name:dk,private:!1,version:hk,type:pk,apiURL:mk,wsURL:gk,files:yk,main:vk,scripts:xk,dependencies:wk,devDependencies:bk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Sk=iw.apiURL,Tk=iw.wsURL,Ek=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],Ck=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],kk={429:Ek,404:Ck};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Sk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=kk[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const bp=e=>[200,201,204].includes(e);var Gs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Wt(){}function _k(e,t){return typeof e=="function"?e(t):e}function Sd(e){return typeof e=="number"&&e>=0&&e!==1/0}function sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xs(e,t){return typeof e=="function"?e(t):e}function dn(e,t){return typeof e=="function"?e(t):e}function t0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sp(o,t.options))return!1}else if(!ea(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function n0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Sp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>Td(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ea(e[n],t[n])):!1}function ow(e,t){if(e===t)return e;const n=r0(e)&&r0(t);if(n||Td(e)&&Td(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const f=n?c:s[c];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function r0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Td(e){if(!i0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!i0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function i0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pk(e){return new Promise(t=>{setTimeout(t,e)})}function Ed(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ow(e,t):t}function Ak(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Rk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tp=Symbol();function aw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,ws,Nv,Ok=(Nv=class extends Gs{constructor(){super();H(this,hi);H(this,mr);H(this,ws);D(this,ws,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,ws))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,ws,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,ws=new WeakMap,Nv),Ep=new Ok,bs,gr,Ss,Dv,jk=(Dv=class extends Gs{constructor(){super();H(this,bs,!0);H(this,gr);H(this,Ss);D(this,Ss,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ss,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,bs)!==t&&(D(this,bs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,bs)}},bs=new WeakMap,gr=new WeakMap,Ss=new WeakMap,Dv),du=new jk;function Cd(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Mk(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?du.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zc(e){return e instanceof uw}function cw(e){let t=!1,n=0,r=!1,i;const s=Cd(),o=x=>{var w;r||(d(new uw(x)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Ep.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>lw(e.networkMode)&&e.canRun(),u=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var w;i=p=>{(r||c())&&x(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(u).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),v=e.retryDelay??Mk,E=typeof v=="function"?v(n,p):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Pk(E).then(()=>c()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Nk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var De=Nk(),pi,Fv,fw=(Fv=class{constructor(){H(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Fv),Ts,Es,Ht,Je,ma,mi,ln,Vn,Lv,Dk=(Lv=class extends fw{constructor(t){super();H(this,ln);H(this,Ts);H(this,Es);H(this,Ht);H(this,Je);H(this,ma);H(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Ht,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Ts,Fk(this.options)),this.state=t.state??T(this,Ts),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Je))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Ht).remove(this)}setData(t,n){const r=Ed(this.state.data,t,this.options);return X(this,ln,Vn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,ln,Vn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,Je))==null?void 0:r.promise;return(i=T(this,Je))==null||i.cancel(t),n?n.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Ts))}isActive(){return this.observers.some(t=>dn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Je))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Je))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Je)&&(T(this,mi)?T(this,Je).cancel({revert:!0}):T(this,Je).cancelRetry()),this.scheduleGc()),T(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,ln,Vn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Je))return T(this,Je).continueRetry(),T(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const u=aw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(u,d,this):u(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Es,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&X(this,ln,Vn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=u=>{var d,h,m,x;Zc(u)&&u.silent||X(this,ln,Vn).call(this,{type:"error",error:u}),Zc(u)||((h=(d=T(this,Ht).config).onError)==null||h.call(d,u,this),(x=(m=T(this,Ht).config).onSettled)==null||x.call(m,this.state.data,u,this)),this.scheduleGc()};return D(this,Je,cw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,h,m,x;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){a(w);return}(h=(d=T(this,Ht).config).onSuccess)==null||h.call(d,u,this),(x=(m=T(this,Ht).config).onSettled)==null||x.call(m,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{X(this,ln,Vn).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{X(this,ln,Vn).call(this,{type:"pause"})},onContinue:()=>{X(this,ln,Vn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Je).start()}},Ts=new WeakMap,Es=new WeakMap,Ht=new WeakMap,Je=new WeakMap,ma=new WeakMap,mi=new WeakMap,ln=new WeakSet,Vn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Zc(i)&&i.revert&&T(this,Es)?{...T(this,Es),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Ht).notify({query:this,type:"updated",action:t})})},Lv);function dw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Iv,Lk=(Iv=class extends Gs{constructor(t={}){super();H(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Sp(i,n);let o=this.get(s);return o||(o=new Dk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>t0(t,r)):n}notify(t){De.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){De.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){De.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Iv),Tn,it,gi,En,lr,$v,Ik=($v=class extends fw{constructor(t){super();H(this,En);H(this,Tn);H(this,it);H(this,gi);this.mutationId=t.mutationId,D(this,it,t.mutationCache),D(this,Tn,[]),this.state=t.state||hw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,it).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,f,u,d,h,m,x,w,p,g,v,E,S,C,k;D(this,gi,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,it).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,it).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((c=(l=T(this,it).config).onSuccess)==null?void 0:c.call(l,P,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,P,t,this.state.context)),await((h=(d=T(this,it).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(w=T(this,it).config).onError)==null?void 0:p.call(w,P,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,P,t,this.state.context)),await((S=(E=T(this,it).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,it).runNext(this)}}},Tn=new WeakMap,it=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),De.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,it).notify({mutation:this,type:"updated",action:t})})},$v);function hw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var At,ga,Vv,$k=(Vv=class extends Gs{constructor(t={}){super();H(this,At);H(this,ga);this.config=t,D(this,At,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new Ik({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,At).get(n)??[];r.push(t),T(this,At).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,At).has(n)){const i=(r=T(this,At).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,At).delete(n):T(this,At).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,At).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,At).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,At).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n0(n,r))}findAll(t={}){return this.getAll().filter(n=>n0(t,n))}notify(t){De.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return De.batch(()=>Promise.all(t.map(n=>n.continue().catch(Wt))))}},At=new WeakMap,ga=new WeakMap,Vv);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function s0(e){return{onFetch:(t,n)=>{var f,u,d,h,m;const r=t.options,i=(d=(u=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:u.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=aw(t.options,t.fetchOptions),g=async(v,E,S)=>{if(x)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};w(C);const k=await p(C),{maxPages:P}=t.options,j=S?Rk:Ak;return{pages:j(v.pages,k,P),pageParams:j(v.pageParams,E,P)}};if(i&&s.length){const v=i==="backward",E=v?Vk:o0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,v)}else{const v=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:o0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function o0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Vk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,Cs,ks,xr,_s,Ps,Bv,Bk=(Bv=class{constructor(e={}){H(this,Ee);H(this,yr);H(this,vr);H(this,Cs);H(this,ks);H(this,xr);H(this,_s);H(this,Ps);D(this,Ee,e.queryCache||new Lk),D(this,yr,e.mutationCache||new $k),D(this,vr,e.defaultOptions||{}),D(this,Cs,new Map),D(this,ks,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,_s,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,Ps,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,_s))==null||e.call(this),D(this,_s,void 0),(t=T(this,Ps))==null||t.call(this),D(this,Ps,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(xs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=_k(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return De.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);De.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return De.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=De.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return De.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=De.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Wt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(xs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=s0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=s0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,Cs).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Cs).values()],n={};return t.forEach(r=>{ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,ks).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ks).values()];let n={};return t.forEach(r=>{ea(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Tp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,Cs=new WeakMap,ks=new WeakMap,xr=new WeakMap,_s=new WeakMap,Ps=new WeakMap,Bv),gt,ee,ya,st,yi,As,wr,Cn,va,Rs,Os,vi,xi,br,js,ae,yo,kd,_d,Pd,Ad,Rd,Od,jd,pw,zv,zk=(zv=class extends Gs{constructor(t,n){super();H(this,ae);H(this,gt);H(this,ee);H(this,ya);H(this,st);H(this,yi);H(this,As);H(this,wr);H(this,Cn);H(this,va);H(this,Rs);H(this,Os);H(this,vi);H(this,xi);H(this,br);H(this,js,new Set);this.options=n,D(this,gt,t),D(this,Cn,null),D(this,wr,Cd()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),a0(T(this,ee),this.options)?X(this,ae,yo).call(this):this.updateResult(),X(this,ae,Ad).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Md(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Md(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Rd).call(this),X(this,ae,Od).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,gt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,jd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,gt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&l0(T(this,ee),i,this.options,r)&&X(this,ae,yo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||dn(this.options.enabled,T(this,ee))!==dn(r.enabled,T(this,ee))||xs(this.options.staleTime,T(this,ee))!==xs(r.staleTime,T(this,ee)))&&X(this,ae,kd).call(this);const o=X(this,ae,_d).call(this);s&&(T(this,ee)!==i||dn(this.options.enabled,T(this,ee))!==dn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,Pd).call(this,o)}getOptimisticResult(t){const n=T(this,gt).getQueryCache().build(T(this,gt),t),r=this.createResult(n,t);return Hk(this,r)&&(D(this,st,r),D(this,As,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,st)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,js).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,gt).defaultQueryOptions(t),r=T(this,gt).getQueryCache().build(T(this,gt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,yo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,st)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,st),o=T(this,yi),a=T(this,As),c=t!==r?t.state:T(this,ya),{state:f}=t;let u={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),M=!j&&a0(t,n),I=j&&l0(t,r,n,i);(M||I)&&(u={...u,...dw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:w}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Rs);else try{D(this,va,n.select),h=n.select(u.data),h=Ed(s==null?void 0:s.data,h,n),D(this,Rs,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,Os))==null?void 0:P.state.data,T(this,Os)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(M){D(this,Cn,M)}j!==void 0&&(w="success",h=Ed(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Rs),x=Date.now(),w="error");const p=u.fetchStatus==="fetching",g=w==="pending",v=w==="error",E=g&&p,S=h!==void 0,k={status:w,fetchStatus:u.fetchStatus,isPending:g,isSuccess:w==="success",isError:v,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:v&&!S,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&S,isStale:Cp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},M=()=>{const re=D(this,wr,k.promise=Cd());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&M();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&M();break}}return k}updateResult(t){const n=T(this,st),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,As,this.options),T(this,yi).data!==void 0&&D(this,Os,T(this,ee)),fu(r,n))return;D(this,st,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,js).size)return!0;const l=new Set(a??T(this,js));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,st)).some(c=>{const f=c;return T(this,st)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,pw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Ad).call(this)}},gt=new WeakMap,ee=new WeakMap,ya=new WeakMap,st=new WeakMap,yi=new WeakMap,As=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Rs=new WeakMap,Os=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,js=new WeakMap,ae=new WeakSet,yo=function(t){X(this,ae,jd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Wt)),n},kd=function(){X(this,ae,Rd).call(this);const t=xs(this.options.staleTime,T(this,ee));if(Ri||T(this,st).isStale||!Sd(t))return;const r=sw(T(this,st).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,st).isStale||this.updateResult()},r))},_d=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},Pd=function(t){X(this,ae,Od).call(this),D(this,br,t),!(Ri||dn(this.options.enabled,T(this,ee))===!1||!Sd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&X(this,ae,yo).call(this)},T(this,br)))},Ad=function(){X(this,ae,kd).call(this),X(this,ae,Pd).call(this,X(this,ae,_d).call(this))},Rd=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Od=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},jd=function(){const t=T(this,gt).getQueryCache().build(T(this,gt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pw=function(t){De.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,st))}),T(this,gt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},zv);function Uk(e,t){return dn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function a0(e,t){return Uk(e,t)||e.state.data!==void 0&&Md(e,t,t.refetchOnMount)}function Md(e,t,n){if(dn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cp(e,t)}return!1}function l0(e,t,n,r){return(e!==t||dn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cp(e,n)}function Cp(e,t){return dn(t.enabled,e)!==!1&&e.isStaleByTime(xs(t.staleTime,e))}function Hk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,yt,Hn,Yn,Al,Nd,Uv,Wk=(Uv=class extends Gs{constructor(t,n){super();H(this,Yn);H(this,Sr);H(this,Tr);H(this,yt);H(this,Hn);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Yn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,yt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,yt))==null?void 0:r.state.status)==="pending"&&T(this,yt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,yt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Yn,Al).call(this),X(this,Yn,Nd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,yt))==null||t.removeObserver(this),D(this,yt,void 0),X(this,Yn,Al).call(this),X(this,Yn,Nd).call(this)}mutate(t,n){var r;return D(this,Hn,n),(r=T(this,yt))==null||r.removeObserver(this),D(this,yt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,yt).addObserver(this),T(this,yt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,yt=new WeakMap,Hn=new WeakMap,Yn=new WeakSet,Al=function(){var n;const t=((n=T(this,yt))==null?void 0:n.state)??hw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Nd=function(t){De.batch(()=>{var n,r,i,s,o,a,l,c;if(T(this,Hn)&&this.hasListeners()){const f=T(this,Tr).variables,u=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Hn)).onSuccess)==null||r.call(n,t.data,f,u),(s=(i=T(this,Hn)).onSettled)==null||s.call(i,t.data,null,f,u)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Hn)).onError)==null||a.call(o,t.error,f,u),(c=(l=T(this,Hn)).onSettled)==null||c.call(l,void 0,t.error,f,u))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Uv),mw=y.createContext(void 0),gw=e=>{const t=y.useContext(mw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Kk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(mw.Provider,{value:e,children:t})),yw=y.createContext(!1),qk=()=>y.useContext(yw);yw.Provider;function Gk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qk=y.createContext(Gk()),Yk=()=>y.useContext(Qk);function vw(e,t){return typeof e=="function"?e(...t):!!e}function Dd(){}var Xk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Zk=e=>{y.useEffect(()=>{e.clearReset()},[e])},Jk=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vw(n,[e.error,r]),e_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},t_=(e,t)=>e.isLoading&&e.isFetching&&!t,n_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,u0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function r_(e,t,n){var f,u,d,h,m;const r=gw(),i=qk(),s=Yk(),o=r.defaultQueryOptions(e);(u=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",e_(o),Xk(o,s),Zk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(x=>{const w=i?Dd:l.subscribe(De.batchCalls(x));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),n_(o,c))throw u0(o,l,s);if(Jk({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,c),o.experimental_prefetchInRender&&!Ri&&t_(c,i)){const x=a?u0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(Dd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function i_(e,t){return r_(e,zk)}function xw(e,t){const n=gw(),[r]=y.useState(()=>new Wk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(De.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Dd)},[r]);if(i.error&&vw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const s_=e=>i_({queryKey:["widgets",e],queryFn:()=>o_(e)}),o_=e=>Ea(`widgets/with-link/${e}`);var B=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(B||{});function a_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Gc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ld(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var VC=typeof WeakMap=="function"?WeakMap:Map;function Px(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){au||(au=!0,vd=r),ld(e,t)},n}function Ax(e,t,n){n=Gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ld(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ld(e,t),typeof r!="function"&&(Mr===null?Mr=new Set([this]):Mr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Fg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ek.bind(null,e,t,n),t.then(e,e))}function Lg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ig(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var BC=nr.ReactCurrentOwner,bt=!1;function ot(e,t,n,r){t.child=e===null?ix(t,null,n,r):Fs(t,e.child,n,r)}function $g(e,t,n,r,i){n=n.render;var s=t.ref;return ys(t,i),r=sp(e,t,n,r,s,i),n=op(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&n&&qh(t),t.flags|=1,ot(e,t,r,i),t.child)}function Vg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!gp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rx(e,t,s,r,i)):(e=Pl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ho,n(o,r)&&e.ref===t.ref)return er(e,t,i)}return t.flags|=1,e=Dr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ho(s,r)&&e.ref===t.ref)if(bt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(bt=!0);else return t.lanes=e.lanes,er(e,t,i)}return ud(e,t,n,r,i)}function Ox(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(os,Rt),Rt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(os,Rt),Rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(os,Rt),Rt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,de(os,Rt),Rt|=r;return ot(e,t,i,n),t.child}function jx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ud(e,t,n,r,i){var s=Tt(n)?Ci:rt.current;return s=Ns(t,s),ys(t,i),n=sp(e,t,n,r,s,i),r=op(),e!==null&&!bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,er(e,t,i)):(ve&&r&&qh(t),t.flags|=1,ot(e,t,n,i),t.child)}function Bg(e,t,n,r,i){if(Tt(n)){var s=!0;Xl(t)}else s=!1;if(ys(t,i),t.stateNode===null)Cl(e,t),_x(t,n,r),ad(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Zt(c):(c=Tt(n)?Ci:rt.current,c=Ns(t,c));var f=n.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Dg(t,o,r,c),fr=!1;var d=t.memoizedState;o.state=d,nu(t,r,o,i),l=t.memoizedState,a!==r||d!==l||St.current||fr?(typeof f=="function"&&(od(t,n,f,r),l=t.memoizedState),(a=fr||Ng(t,n,a,r,d,l,c))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ox(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:an(t.type,a),o.props=c,u=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Zt(l):(l=Tt(n)?Ci:rt.current,l=Ns(t,l));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&Dg(t,o,r,l),fr=!1,d=t.memoizedState,o.state=d,nu(t,r,o,i);var m=t.memoizedState;a!==u||d!==m||St.current||fr?(typeof h=="function"&&(od(t,n,h,r),m=t.memoizedState),(c=fr||Ng(t,n,c,r,d,m,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return cd(e,t,n,r,s,i)}function cd(e,t,n,r,i,s){jx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&kg(t,n,!1),er(e,t,s);r=t.stateNode,BC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Fs(t,e.child,null,s),t.child=Fs(t,null,a,s)):ot(e,t,a,s),t.memoizedState=r.state,i&&kg(t,n,!0),t.child}function Mx(e){var t=e.stateNode;t.pendingContext?Cg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Cg(e,t.context,!1),tp(e,t.containerInfo)}function zg(e,t,n,r,i){return Ds(),Qh(i),t.flags|=256,ot(e,t,n,r),t.child}var fd={dehydrated:null,treeContext:null,retryLane:0};function dd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nx(e,t,n){var r=t.pendingProps,i=we.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),de(we,i&1),e===null)return id(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Lu(o,r,0,null),e=bi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=dd(n),t.memoizedState=fd,e):up(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return zC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Dr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Dr(a,s):(s=bi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?dd(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=fd,r}return s=e.child,e=s.sibling,r=Dr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function up(e,t){return t=Lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&Qh(r),Fs(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Gc(Error(A(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),s=bi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Fs(t,e.child,null,o),t.child.memoizedState=dd(o),t.memoizedState=fd,s);if(!(t.mode&1))return tl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(A(419)),r=Gc(s,r,void 0),tl(e,t,o,r)}if(a=(o&e.childLanes)!==0,bt||a){if(r=Ue,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Jn(e,i),pn(r,e,i,-1))}return mp(),r=Gc(Error(A(421))),tl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=tk.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ot=Or(i.nextSibling),Nt=t,ve=!0,fn=null,e!==null&&(Kt[qt++]=Wn,Kt[qt++]=Kn,Kt[qt++]=ki,Wn=e.id,Kn=e.overflow,ki=t),t=up(t,r.children),t.flags|=4096,t)}function Ug(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),sd(e.return,t,n)}function Qc(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Dx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(ot(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ug(e,n,t);else if(e.tag===19)Ug(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(we,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,s);break;case"together":Qc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(A(153));if(t.child!==null){for(e=t.child,n=Dr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function UC(e,t,n){switch(t.tag){case 3:Mx(t),Ds();break;case 5:ax(t);break;case 1:Tt(t.type)&&Xl(t);break;case 4:tp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;de(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Nx(e,t,n):(de(we,we.current&1),e=er(e,t,n),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ox(e,t,n)}return er(e,t,n)}var Fx,hd,Lx,Ix;Fx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hd=function(){};Lx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,li(Pn.current);var s=null;switch(n){case"input":i=Df(e,i),r=Df(e,r),s=[];break;case"select":i=Te({},i,{value:void 0}),r=Te({},r,{value:void 0}),s=[];break;case"textarea":i=If(e,i),r=If(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}Vf(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Lo.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Lo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function ao(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function HC(e,t,n){var r=t.pendingProps;switch(Gh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Tt(t.type)&&Yl(),Ze(t),null;case 3:return r=t.stateNode,Ls(),ge(St),ge(rt),rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ja(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fn!==null&&(bd(fn),fn=null))),hd(e,t),Ze(t),null;case 5:np(t);var i=li(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(A(166));return Ze(t),null}if(e=li(Pn.current),Ja(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[qo]=s,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<go.length;i++)pe(go[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Zm(r,s),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},pe("invalid",r);break;case"textarea":eg(r,s),pe("invalid",r)}Vf(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Za(r.textContent,a,e),i=["children",""+a]):Lo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",r)}switch(n){case"input":Ha(r),Jm(r,s,!0);break;case"textarea":Ha(r),tg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ql)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[qo]=r,Fx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Bf(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<go.length;i++)pe(go[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":Zm(e,r),i=Df(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Te({},r,{value:void 0}),pe("invalid",e);break;case"textarea":eg(e,r),i=If(e,r),pe("invalid",e);break;default:i=r}Vf(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?m1(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&h1(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Io(e,l):typeof l=="number"&&Io(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Lo.hasOwnProperty(s)?l!=null&&s==="onScroll"&&pe("scroll",e):l!=null&&Mh(e,s,l,o))}switch(n){case"input":Ha(e),Jm(e,r,!1);break;case"textarea":Ha(e),tg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?hs(e,!!r.multiple,s,!1):r.defaultValue!=null&&hs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ql)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(A(166));if(n=li(Qo.current),li(Pn.current),Ja(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(s=r.nodeValue!==n)&&(e=Nt,e!==null))switch(e.tag){case 3:Za(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Ze(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&Ot!==null&&t.mode&1&&!(t.flags&128))nx(),Ds(),t.flags|=98560,s=!1;else if(s=Ja(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(A(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[kn]=t}else Ds(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else fn!==null&&(bd(fn),fn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Fe===0&&(Fe=3):mp())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ls(),hd(e,t),e===null&&Wo(t.stateNode.containerInfo),Ze(t),null;case 10:return Zh(t.type._context),Ze(t),null;case 17:return Tt(t.type)&&Yl(),Ze(t),null;case 19:if(ge(we),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)ao(s,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,ao(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>$s&&(t.flags|=128,r=!0,ao(s,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ao(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ve)return Ze(t),null}else 2*Ae()-s.renderingStartTime>$s&&n!==1073741824&&(t.flags|=128,r=!0,ao(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=we.current,de(we,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return pp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function WC(e,t){switch(Gh(t),t.tag){case 1:return Tt(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ls(),ge(St),ge(rt),rp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return np(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));Ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return Ls(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return pp(),null;case 24:return null;default:return null}}var nl=!1,tt=!1,KC=typeof WeakSet=="function"?WeakSet:Set,F=null;function ss(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function pd(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Hg=!1;function qC(e,t){if(Xf=Kl,e=U1(),Kh(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(a=o+i),u!==s||r!==0&&u.nodeType!==3||(l=o+r),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(a=o),d===s&&++f===r&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zf={focusedElem:e,selectionRange:n},Kl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,w=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:an(t.type,x),w);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(E){ke(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=Hg,Hg=!1,m}function _o(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 s=i.destroy;i.destroy=void 0,s!==void 0&&pd(t,n,s)}i=i.next}while(i!==r)}}function Du(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 md(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 $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[qo],delete t[td],delete t[AC],delete t[RC])),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 Vx(e){return e.tag===5||e.tag===3||e.tag===4}function Wg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(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 gd(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=Ql));else if(r!==4&&(e=e.child,e!==null))for(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}function yd(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(yd(e,t,n),e=e.sibling;e!==null;)yd(e,t,n),e=e.sibling}var Ke=null,un=!1;function ar(e,t,n){for(n=n.child;n!==null;)Bx(e,t,n),n=n.sibling}function Bx(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(_u,n)}catch{}switch(n.tag){case 5:tt||ss(n,t);case 6:var r=Ke,i=un;Ke=null,ar(e,t,n),Ke=r,un=i,Ke!==null&&(un?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(un?(e=Ke,n=n.stateNode,e.nodeType===8?zc(e.parentNode,n):e.nodeType===1&&zc(e,n),zo(e)):zc(Ke,n.stateNode));break;case 4:r=Ke,i=un,Ke=n.stateNode.containerInfo,un=!0,ar(e,t,n),Ke=r,un=i;break;case 0:case 11:case 14:case 15:if(!tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&pd(n,t,o),i=i.next}while(i!==r)}ar(e,t,n);break;case 1:if(!tt&&(ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ke(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,ar(e,t,n),tt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Kg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KC),t.forEach(function(r){var i=nk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ke=a.stateNode,un=!1;break e;case 3:Ke=a.stateNode.containerInfo,un=!0;break e;case 4:Ke=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(Ke===null)throw Error(A(160));Bx(s,o,i),Ke=null,un=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ke(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zx(t,e),t=t.sibling}function zx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rn(t,e),vn(e),r&4){try{_o(3,e,e.return),Du(3,e)}catch(x){ke(e,e.return,x)}try{_o(5,e,e.return)}catch(x){ke(e,e.return,x)}}break;case 1:rn(t,e),vn(e),r&512&&n!==null&&ss(n,n.return);break;case 5:if(rn(t,e),vn(e),r&512&&n!==null&&ss(n,n.return),e.flags&32){var i=e.stateNode;try{Io(i,"")}catch(x){ke(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&c1(i,s),Bf(a,o);var c=Bf(a,s);for(o=0;o<l.length;o+=2){var f=l[o],u=l[o+1];f==="style"?m1(i,u):f==="dangerouslySetInnerHTML"?h1(i,u):f==="children"?Io(i,u):Mh(i,f,u,c)}switch(a){case"input":Ff(i,s);break;case"textarea":f1(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?hs(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?hs(i,!!s.multiple,s.defaultValue,!0):hs(i,!!s.multiple,s.multiple?[]:"",!1))}i[qo]=s}catch(x){ke(e,e.return,x)}}break;case 6:if(rn(t,e),vn(e),r&4){if(e.stateNode===null)throw Error(A(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){ke(e,e.return,x)}}break;case 3:if(rn(t,e),vn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zo(t.containerInfo)}catch(x){ke(e,e.return,x)}break;case 4:rn(t,e),vn(e);break;case 13:rn(t,e),vn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(dp=Ae())),r&4&&Kg(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(c=tt)||f,rn(t,e),tt=c):rn(t,e),vn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(F=e,f=e.child;f!==null;){for(u=F=f;F!==null;){switch(d=F,h=d.child,d.tag){case 0:case 11:case 14:case 15:_o(4,d,d.return);break;case 1:ss(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){ke(r,n,x)}}break;case 5:ss(d,d.return);break;case 22:if(d.memoizedState!==null){Gg(u);continue}}h!==null?(h.return=d,F=h):Gg(u)}f=f.sibling}e:for(f=null,u=e;;){if(u.tag===5){if(f===null){f=u;try{i=u.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=p1("display",o))}catch(x){ke(e,e.return,x)}}}else if(u.tag===6){if(f===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(x){ke(e,e.return,x)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:rn(t,e),vn(e),r&4&&Kg(e);break;case 21:break;default:rn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vx(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Io(i,""),r.flags&=-33);var s=Wg(e);yd(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Wg(e);gd(e,a,o);break;default:throw Error(A(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function GC(e,t,n){F=e,Ux(e)}function Ux(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||nl;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||tt;a=nl;var c=tt;if(nl=o,(tt=l)&&!c)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Qg(i):l!==null?(l.return=o,F=l):Qg(i);for(;s!==null;)F=s,Ux(s),s=s.sibling;F=i,nl=a,tt=c}qg(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):qg(e)}}function qg(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:tt||Du(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:an(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Og(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Og(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var u=f.dehydrated;u!==null&&zo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}tt||t.flags&512&&md(t)}catch(d){ke(t,t.return,d)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function Gg(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function Qg(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Du(4,t)}catch(l){ke(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){ke(t,i,l)}}var s=t.return;try{md(t)}catch(l){ke(t,s,l)}break;case 5:var o=t.return;try{md(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var QC=Math.ceil,ou=nr.ReactCurrentDispatcher,cp=nr.ReactCurrentOwner,Yt=nr.ReactCurrentBatchConfig,se=0,Ue=null,Oe=null,Ge=0,Rt=0,os=Kr(0),Fe=0,Jo=null,Pi=0,Fu=0,fp=0,Po=null,xt=null,dp=0,$s=1/0,Bn=null,au=!1,vd=null,Mr=null,rl=!1,Cr=null,lu=0,Ao=0,xd=null,kl=-1,_l=0;function ut(){return se&6?Ae():kl!==-1?kl:kl=Ae()}function Nr(e){return e.mode&1?se&2&&Ge!==0?Ge&-Ge:jC.transition!==null?(_l===0&&(_l=_1()),_l):(e=le,e!==0||(e=window.event,e=e===void 0?16:N1(e.type)),e):1}function pn(e,t,n,r){if(50<Ao)throw Ao=0,xd=null,Error(A(185));wa(e,n,r),(!(se&2)||e!==Ue)&&(e===Ue&&(!(se&2)&&(Fu|=n),Fe===4&&pr(e,Ge)),Et(e,r),n===1&&se===0&&!(t.mode&1)&&($s=Ae()+500,ju&&qr()))}function Et(e,t){var n=e.callbackNode;jE(e,t);var r=Wl(e,e===Ue?Ge:0);if(r===0)n!==null&&ig(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ig(n),t===1)e.tag===0?OC(Yg.bind(null,e)):J1(Yg.bind(null,e)),_C(function(){!(se&6)&&qr()}),n=null;else{switch(P1(r)){case 1:n=Ih;break;case 4:n=C1;break;case 16:n=Hl;break;case 536870912:n=k1;break;default:n=Hl}n=Xx(n,Hx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hx(e,t){if(kl=-1,_l=0,se&6)throw Error(A(327));var n=e.callbackNode;if(vs()&&e.callbackNode!==n)return null;var r=Wl(e,e===Ue?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=uu(e,r);else{t=r;var i=se;se|=2;var s=Kx();(Ue!==e||Ge!==t)&&(Bn=null,$s=Ae()+500,wi(e,t));do try{ZC();break}catch(a){Wx(e,a)}while(!0);Xh(),ou.current=s,se=i,Oe!==null?t=0:(Ue=null,Ge=0,t=Fe)}if(t!==0){if(t===2&&(i=Kf(e),i!==0&&(r=i,t=wd(e,i))),t===1)throw n=Jo,wi(e,0),pr(e,r),Et(e,Ae()),n;if(t===6)pr(e,r);else{if(i=e.current.alternate,!(r&30)&&!YC(i)&&(t=uu(e,r),t===2&&(s=Kf(e),s!==0&&(r=s,t=wd(e,s))),t===1))throw n=Jo,wi(e,0),pr(e,r),Et(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(A(345));case 2:ti(e,xt,Bn);break;case 3:if(pr(e,r),(r&130023424)===r&&(t=dp+500-Ae(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ut(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ed(ti.bind(null,e,xt,Bn),t);break}ti(e,xt,Bn);break;case 4:if(pr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-hn(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QC(r/1960))-r,10<r){e.timeoutHandle=ed(ti.bind(null,e,xt,Bn),r);break}ti(e,xt,Bn);break;case 5:ti(e,xt,Bn);break;default:throw Error(A(329))}}}return Et(e,Ae()),e.callbackNode===n?Hx.bind(null,e):null}function wd(e,t){var n=Po;return e.current.memoizedState.isDehydrated&&(wi(e,t).flags|=256),e=uu(e,t),e!==2&&(t=xt,xt=n,t!==null&&bd(t)),e}function bd(e){xt===null?xt=e:xt.push.apply(xt,e)}function YC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!mn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pr(e,t){for(t&=~fp,t&=~Fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-hn(t),r=1<<n;e[n]=-1,t&=~r}}function Yg(e){if(se&6)throw Error(A(327));vs();var t=Wl(e,0);if(!(t&1))return Et(e,Ae()),null;var n=uu(e,t);if(e.tag!==0&&n===2){var r=Kf(e);r!==0&&(t=r,n=wd(e,r))}if(n===1)throw n=Jo,wi(e,0),pr(e,t),Et(e,Ae()),n;if(n===6)throw Error(A(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,xt,Bn),Et(e,Ae()),null}function hp(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&($s=Ae()+500,ju&&qr())}}function Ai(e){Cr!==null&&Cr.tag===0&&!(se&6)&&vs();var t=se;se|=1;var n=Yt.transition,r=le;try{if(Yt.transition=null,le=1,e)return e()}finally{le=r,Yt.transition=n,se=t,!(se&6)&&qr()}}function pp(){Rt=os.current,ge(os)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kC(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(Gh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Ls(),ge(St),ge(rt),rp();break;case 5:np(r);break;case 4:Ls();break;case 13:ge(we);break;case 19:ge(we);break;case 10:Zh(r.type._context);break;case 22:case 23:pp()}n=n.return}if(Ue=e,Oe=e=Dr(e.current,null),Ge=Rt=t,Fe=0,Jo=null,fp=Fu=Pi=0,xt=Po=null,ai!==null){for(t=0;t<ai.length;t++)if(n=ai[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}ai=null}return e}function Wx(e,t){do{var n=Oe;try{if(Xh(),Tl.current=su,iu){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}iu=!1}if(_i=0,Be=Ne=Se=null,ko=!1,Yo=0,cp.current=null,n===null||n.return===null){Fe=1,Jo=t,Oe=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Ge,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,f=a,u=f.tag;if(!(f.mode&1)&&(u===0||u===11||u===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Lg(o);if(h!==null){h.flags&=-257,Ig(h,o,a,s,t),h.mode&1&&Fg(s,c,t),t=h,l=c;var m=t.updateQueue;if(m===null){var x=new Set;x.add(l),t.updateQueue=x}else m.add(l);break e}else{if(!(t&1)){Fg(s,c,t),mp();break e}l=Error(A(426))}}else if(ve&&a.mode&1){var w=Lg(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Ig(w,o,a,s,t),Qh(Is(l,a));break e}}s=l=Is(l,a),Fe!==4&&(Fe=2),Po===null?Po=[s]:Po.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Px(s,l,t);Rg(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Mr===null||!Mr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var E=Ax(s,a,t);Rg(s,E);break e}}s=s.return}while(s!==null)}Gx(n)}catch(S){t=S,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Kx(){var e=ou.current;return ou.current=su,e===null?su:e}function mp(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),Ue===null||!(Pi&268435455)&&!(Fu&268435455)||pr(Ue,Ge)}function uu(e,t){var n=se;se|=2;var r=Kx();(Ue!==e||Ge!==t)&&(Bn=null,wi(e,t));do try{XC();break}catch(i){Wx(e,i)}while(!0);if(Xh(),se=n,ou.current=r,Oe!==null)throw Error(A(261));return Ue=null,Ge=0,Fe}function XC(){for(;Oe!==null;)qx(Oe)}function ZC(){for(;Oe!==null&&!TE();)qx(Oe)}function qx(e){var t=Yx(e.alternate,e,Rt);e.memoizedProps=e.pendingProps,t===null?Gx(e):Oe=t,cp.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=WC(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Oe=null;return}}else if(n=HC(n,t,Rt),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Fe===0&&(Fe=5)}function ti(e,t,n){var r=le,i=Yt.transition;try{Yt.transition=null,le=1,JC(e,t,n,r)}finally{Yt.transition=i,le=r}return null}function JC(e,t,n,r){do vs();while(Cr!==null);if(se&6)throw Error(A(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(A(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(ME(e,s),e===Ue&&(Oe=Ue=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Xx(Hl,function(){return vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Yt.transition,Yt.transition=null;var o=le;le=1;var a=se;se|=4,cp.current=null,qC(e,n),zx(n,e),xC(Zf),Kl=!!Xf,Zf=Xf=null,e.current=n,GC(n),EE(),se=a,le=o,Yt.transition=s}else e.current=n;if(rl&&(rl=!1,Cr=e,lu=i),s=e.pendingLanes,s===0&&(Mr=null),_E(n.stateNode),Et(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(au)throw au=!1,e=vd,vd=null,e;return lu&1&&e.tag!==0&&vs(),s=e.pendingLanes,s&1?e===xd?Ao++:(Ao=0,xd=e):Ao=0,qr(),null}function vs(){if(Cr!==null){var e=P1(lu),t=Yt.transition,n=le;try{if(Yt.transition=null,le=16>e?16:e,Cr===null)var r=!1;else{if(e=Cr,Cr=null,lu=0,se&6)throw Error(A(331));var i=se;for(se|=4,F=e.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(F=c;F!==null;){var f=F;switch(f.tag){case 0:case 11:case 15:_o(8,f,s)}var u=f.child;if(u!==null)u.return=f,F=u;else for(;F!==null;){f=F;var d=f.sibling,h=f.return;if($x(f),f===c){F=null;break}if(d!==null){d.return=h,F=d;break}F=h}}}var m=s.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:_o(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,F=p;break e}F=s.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Du(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(se=i,qr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(_u,e)}catch{}r=!0}return r}finally{le=n,Yt.transition=t}}return!1}function Xg(e,t,n){t=Is(n,t),t=Px(e,t,1),e=jr(e,t,1),t=ut(),e!==null&&(wa(e,1,t),Et(e,t))}function ke(e,t,n){if(e.tag===3)Xg(e,e,n);else for(;t!==null;){if(t.tag===3){Xg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mr===null||!Mr.has(r))){e=Is(n,e),e=Ax(t,e,1),t=jr(t,e,1),e=ut(),t!==null&&(wa(t,1,e),Et(t,e));break}}t=t.return}}function ek(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ut(),e.pingedLanes|=e.suspendedLanes&n,Ue===e&&(Ge&n)===n&&(Fe===4||Fe===3&&(Ge&130023424)===Ge&&500>Ae()-dp?wi(e,0):fp|=n),Et(e,t)}function Qx(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=ut();e=Jn(e,t),e!==null&&(wa(e,t,n),Et(e,n))}function tk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function nk(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(A(314))}r!==null&&r.delete(t),Qx(e,n)}var Yx;Yx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||St.current)bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return bt=!1,UC(e,t,n);bt=!!(e.flags&131072)}else bt=!1,ve&&t.flags&1048576&&ex(t,Jl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var i=Ns(t,rt.current);ys(t,n),i=sp(null,t,r,e,i,n);var s=op();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,Tt(r)?(s=!0,Xl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ep(t),i.updater=Nu,t.stateNode=i,i._reactInternals=t,ad(t,r,e,n),t=cd(null,t,r,!0,s,n)):(t.tag=0,ve&&s&&qh(t),ot(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ik(r),e=an(r,e),i){case 0:t=ud(null,t,r,e,n);break e;case 1:t=Bg(null,t,r,e,n);break e;case 11:t=$g(null,t,r,e,n);break e;case 14:t=Vg(null,t,r,an(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),ud(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),Bg(e,t,r,i,n);case 3:e:{if(Mx(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ox(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Is(Error(A(423)),t),t=zg(e,t,r,n,i);break e}else if(r!==i){i=Is(Error(A(424)),t),t=zg(e,t,r,n,i);break e}else for(Ot=Or(t.stateNode.containerInfo.firstChild),Nt=t,ve=!0,fn=null,n=ix(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ds(),r===i){t=er(e,t,n);break e}ot(e,t,r,n)}t=t.child}return t;case 5:return ax(t),e===null&&id(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Jf(r,i)?o=null:s!==null&&Jf(r,s)&&(t.flags|=32),jx(e,t),ot(e,t,o,n),t.child;case 6:return e===null&&id(t),null;case 13:return Nx(e,t,n);case 4:return tp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fs(t,null,r,n):ot(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),$g(e,t,r,i,n);case 7:return ot(e,t,t.pendingProps,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,de(eu,r._currentValue),r._currentValue=o,s!==null)if(mn(s.value,o)){if(s.children===i.children&&!St.current){t=er(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Gn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),sd(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),sd(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ot(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ys(t,n),i=Zt(i),r=r(i),t.flags|=1,ot(e,t,r,n),t.child;case 14:return r=t.type,i=an(r,t.pendingProps),i=an(r.type,i),Vg(e,t,r,i,n);case 15:return Rx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:an(r,i),Cl(e,t),t.tag=1,Tt(r)?(e=!0,Xl(t)):e=!1,ys(t,n),_x(t,r,i),ad(t,r,i,n),cd(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return Ox(e,t,n)}throw Error(A(156,t.tag))};function Xx(e,t){return E1(e,t)}function rk(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 Qt(e,t,n,r){return new rk(e,t,n,r)}function gp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ik(e){if(typeof e=="function")return gp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dh)return 11;if(e===Fh)return 14}return 2}function Dr(e,t){var n=e.alternate;return n===null?(n=Qt(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 Pl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")gp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Yi:return bi(n.children,i,s,t);case Nh:o=8,i|=8;break;case Of:return e=Qt(12,n,t,i|2),e.elementType=Of,e.lanes=s,e;case jf:return e=Qt(13,n,t,i),e.elementType=jf,e.lanes=s,e;case Mf:return e=Qt(19,n,t,i),e.elementType=Mf,e.lanes=s,e;case a1:return Lu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s1:o=10;break e;case o1:o=9;break e;case Dh:o=11;break e;case Fh:o=14;break e;case cr:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Qt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function bi(e,t,n,r){return e=Qt(7,e,r,t),e.lanes=n,e}function Lu(e,t,n,r){return e=Qt(22,e,r,t),e.elementType=a1,e.lanes=n,e.stateNode={isHidden:!1},e}function Yc(e,t,n){return e=Qt(6,e,null,t),e.lanes=n,e}function Xc(e,t,n){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sk(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=Oc(0),this.expirationTimes=Oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yp(e,t,n,r,i,s,o,a,l){return e=new sk(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Qt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ep(s),e}function ok(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Zx(e){if(!e)return Br;e=e._reactInternals;e:{if(Ni(e)!==e||e.tag!==1)throw Error(A(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(A(171))}if(e.tag===1){var n=e.type;if(Tt(n))return Z1(e,n,t)}return t}function Jx(e,t,n,r,i,s,o,a,l){return e=yp(n,r,!0,e,i,s,o,a,l),e.context=Zx(null),n=e.current,r=ut(),i=Nr(n),s=Gn(r,i),s.callback=t??null,jr(n,s,i),e.current.lanes=i,wa(e,i,r),Et(e,r),e}function Iu(e,t,n,r){var i=t.current,s=ut(),o=Nr(i);return n=Zx(n),t.context===null?t.context=n:t.pendingContext=n,t=Gn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,o),e!==null&&(pn(e,i,o,s),Sl(e,i,o)),o}function cu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Zg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vp(e,t){Zg(e,t),(e=e.alternate)&&Zg(e,t)}function ak(){return null}var ew=typeof reportError=="function"?reportError:function(e){console.error(e)};function xp(e){this._internalRoot=e}$u.prototype.render=xp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(A(409));Iu(e,t,null,null)};$u.prototype.unmount=xp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){Iu(null,e,null,null)}),t[Zn]=null}};function $u(e){this._internalRoot=e}$u.prototype.unstable_scheduleHydration=function(e){if(e){var t=O1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hr.length&&t!==0&&t<hr[n].priority;n++);hr.splice(n,0,e),n===0&&M1(e)}};function wp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jg(){}function lk(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=cu(o);s.call(c)}}var o=Jx(t,r,e,0,null,!1,!1,"",Jg);return e._reactRootContainer=o,e[Zn]=o.current,Wo(e.nodeType===8?e.parentNode:e),Ai(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=cu(l);a.call(c)}}var l=yp(e,0,!1,null,null,!1,!1,"",Jg);return e._reactRootContainer=l,e[Zn]=l.current,Wo(e.nodeType===8?e.parentNode:e),Ai(function(){Iu(t,l,n,r)}),l}function Bu(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=cu(o);a.call(l)}}Iu(t,o,e,i)}else o=lk(n,t,e,i,r);return cu(o)}A1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mo(t.pendingLanes);n!==0&&($h(t,n|1),Et(t,Ae()),!(se&6)&&($s=Ae()+500,qr()))}break;case 13:Ai(function(){var r=Jn(e,1);if(r!==null){var i=ut();pn(r,e,1,i)}}),vp(e,1)}};Vh=function(e){if(e.tag===13){var t=Jn(e,134217728);if(t!==null){var n=ut();pn(t,e,134217728,n)}vp(e,134217728)}};R1=function(e){if(e.tag===13){var t=Nr(e),n=Jn(e,t);if(n!==null){var r=ut();pn(n,e,t,r)}vp(e,t)}};O1=function(){return le};j1=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Uf=function(e,t,n){switch(t){case"input":if(Ff(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ou(r);if(!i)throw Error(A(90));u1(r),Ff(r,i)}}}break;case"textarea":f1(e,n);break;case"select":t=n.value,t!=null&&hs(e,!!n.multiple,t,!1)}};v1=hp;x1=Ai;var uk={usingClientEntryPoint:!1,Events:[Sa,es,Ou,g1,y1,hp]},lo={findFiberByHostInstance:oi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ck={bundleType:lo.bundleType,version:lo.version,rendererPackageName:lo.rendererPackageName,rendererConfig:lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=S1(e),e===null?null:e.stateNode},findFiberByHostInstance:lo.findFiberByHostInstance||ak,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{_u=il.inject(ck),_n=il}catch{}}Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uk;Ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(t))throw Error(A(200));return ok(e,t,null,n)};Ft.createRoot=function(e,t){if(!wp(e))throw Error(A(299));var n=!1,r="",i=ew;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=yp(e,1,!1,null,null,n,!1,r,i),e[Zn]=t.current,Wo(e.nodeType===8?e.parentNode:e),new xp(t)};Ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(A(188)):(e=Object.keys(e).join(","),Error(A(268,e)));return e=S1(t),e=e===null?null:e.stateNode,e};Ft.flushSync=function(e){return Ai(e)};Ft.hydrate=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!0,n)};Ft.hydrateRoot=function(e,t,n){if(!wp(e))throw Error(A(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=ew;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Jx(t,null,e,1,n??null,i,!1,s,o),e[Zn]=t.current,Wo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $u(t)};Ft.render=function(e,t,n){if(!Vu(t))throw Error(A(200));return Bu(null,e,t,!1,n)};Ft.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(A(40));return e._reactRootContainer?(Ai(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Zn]=null})}),!0):!1};Ft.unstable_batchedUpdates=hp;Ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(A(200));if(e==null||e._reactInternals===void 0)throw Error(A(38));return Bu(e,t,n,!1,r)};Ft.version="18.3.1-next-f1338f8080-20240426";function tw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tw)}catch(e){console.error(e)}}tw(),t1.exports=Ft;var nw=t1.exports;const fk=Hs(nw);var rw,e0=nw;rw=e0.createRoot,e0.hydrateRoot;const dk="@alfatech/livechat",hk="v2025.05.12.1",pk="module",mk="https://api-live.alfatek.dev",gk="wss://api-live.alfatek.dev",yk=["dist","README.md"],vk="dist/widget.js",xk={dev:"vite",build:"tsc -b && vite build",lint:"biome lint --write",prepare:"husky",format:"biome format --write && yarn lint"},wk={"@headlessui/react":"^2.2.2","@tailwindcss/vite":"^4.1.4","@tanstack/react-query":"^5.59.20",classnames:"^2.5.1",dayjs:"^1.11.13",formik:"^2.4.6","framer-motion":"^12.7.4",react:"^18.3.1","react-dom":"^18.3.1","react-router-dom":"^6.26.2","socket.io-client":"^4.8.1",sonner:"^2.0.1",yup:"^1.4.0",zustand:"^4.5.5"},bk={"@biomejs/biome":"^1.8.3","@types/node":"^22.5.4","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@vitejs/plugin-react-swc":"^3.5.0",globals:"^15.9.0",husky:"^9.1.5",tailwindcss:"^4.1.4",typescript:"^5.5.3",vite:"^5.4.1"},iw={name:dk,private:!1,version:hk,type:pk,apiURL:mk,wsURL:gk,files:yk,main:vk,scripts:xk,dependencies:wk,devDependencies:bk,"lint-staged":{"./**/*.{js,ts,tsx,json}":["npm run format"]}},Sk=iw.apiURL,Tk=iw.wsURL,Ek=e=>[{limit:Number.parseInt(e.headers.get("X-Ratelimit-Limit")||"0"),remaining:Number.parseInt(e.headers.get("X-Ratelimit-Remaining")||"0"),reset:Number.parseInt(e.headers.get("X-Ratelimit-Reset")||"0"),retryAfter:Number.parseInt(e.headers.get("Retry-After")||"0")},429],Ck=(e,t)=>[{message:"message"in t?t.message:"Not Found"},404],kk={429:Ek,404:Ck};async function Ea(e,t={}){const n={};!(t.body instanceof FormData)&&t.body&&(n["Content-Type"]="application/json");const r=await fetch(`${Sk}/${e}`,{...t,credentials:"include",headers:{...t.headers,...n}}).catch(s=>(console.log("err::",s),new Response(null,{status:500})));if(!r.ok){let s={};try{return s=await r.json(),[s,r.status]}catch{console.log("response: ",r)}const o=kk[r.status];return o?o(r,s):[{},r.status]}const i=r.headers.get("Content-Type");return i&&i.includes("application/json")?[await r.json(),r.status]:[await r.text(),r.status]}const bp=e=>[200,201,204].includes(e);var Gs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function Wt(){}function _k(e,t){return typeof e=="function"?e(t):e}function Sd(e){return typeof e=="number"&&e>=0&&e!==1/0}function sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xs(e,t){return typeof e=="function"?e(t):e}function dn(e,t){return typeof e=="function"?e(t):e}function t0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sp(o,t.options))return!1}else if(!ea(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function n0(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Oi(t.options.mutationKey)!==Oi(s))return!1}else if(!ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Sp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Oi)(e)}function Oi(e){return JSON.stringify(e,(t,n)=>Td(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ea(e[n],t[n])):!1}function ow(e,t){if(e===t)return e;const n=r0(e)&&r0(t);if(n||Td(e)&&Td(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const f=n?c:s[c];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,l++):(a[f]=ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function r0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Td(e){if(!i0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!i0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function i0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pk(e){return new Promise(t=>{setTimeout(t,e)})}function Ed(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ow(e,t):t}function Ak(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Rk(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tp=Symbol();function aw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hi,mr,ws,Nv,Ok=(Nv=class extends Gs{constructor(){super();H(this,hi);H(this,mr);H(this,ws);D(this,ws,t=>{if(!Ri&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,mr)||this.setEventListener(T(this,ws))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,mr))==null||t.call(this),D(this,mr,void 0))}setEventListener(t){var n;D(this,ws,t),(n=T(this,mr))==null||n.call(this),D(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,hi)!==t&&(D(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,hi)=="boolean"?T(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,mr=new WeakMap,ws=new WeakMap,Nv),Ep=new Ok,bs,gr,Ss,Dv,jk=(Dv=class extends Gs{constructor(){super();H(this,bs,!0);H(this,gr);H(this,Ss);D(this,Ss,t=>{if(!Ri&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,gr)||this.setEventListener(T(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,gr))==null||t.call(this),D(this,gr,void 0))}setEventListener(t){var n;D(this,Ss,t),(n=T(this,gr))==null||n.call(this),D(this,gr,t(this.setOnline.bind(this)))}setOnline(t){T(this,bs)!==t&&(D(this,bs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,bs)}},bs=new WeakMap,gr=new WeakMap,Ss=new WeakMap,Dv),du=new jk;function Cd(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Mk(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?du.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zc(e){return e instanceof uw}function cw(e){let t=!1,n=0,r=!1,i;const s=Cd(),o=x=>{var w;r||(d(new uw(x)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Ep.isFocused()&&(e.networkMode==="always"||du.isOnline())&&e.canRun(),f=()=>lw(e.networkMode)&&e.canRun(),u=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),i==null||i(),s.resolve(x))},d=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),i==null||i(),s.reject(x))},h=()=>new Promise(x=>{var w;i=p=>{(r||c())&&x(p)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(u).catch(p=>{var C;if(r)return;const g=e.retry??(Ri?0:3),v=e.retryDelay??Mk,E=typeof v=="function"?v(n,p):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!S){d(p);return}n++,(C=e.onFail)==null||C.call(e,n,p),Pk(E).then(()=>c()?void 0:h()).then(()=>{t?d(p):m()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),s)}}function Nk(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var De=Nk(),pi,Fv,fw=(Fv=class{constructor(){H(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sd(this.gcTime)&&D(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ri?1/0:5*60*1e3))}clearGcTimeout(){T(this,pi)&&(clearTimeout(T(this,pi)),D(this,pi,void 0))}},pi=new WeakMap,Fv),Ts,Es,Ht,Je,ma,mi,ln,Vn,Lv,Dk=(Lv=class extends fw{constructor(t){super();H(this,ln);H(this,Ts);H(this,Es);H(this,Ht);H(this,Je);H(this,ma);H(this,mi);D(this,mi,!1),D(this,ma,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,Ht,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Ts,Fk(this.options)),this.state=t.state??T(this,Ts),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Je))==null?void 0:t.promise}setOptions(t){this.options={...T(this,ma),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Ht).remove(this)}setData(t,n){const r=Ed(this.state.data,t,this.options);return X(this,ln,Vn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,ln,Vn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,Je))==null?void 0:r.promise;return(i=T(this,Je))==null||i.cancel(t),n?n.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Ts))}isActive(){return this.observers.some(t=>dn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Je))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Je))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Je)&&(T(this,mi)?T(this,Je).cancel({revert:!0}):T(this,Je).cancelRetry()),this.scheduleGc()),T(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,ln,Vn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Je))return T(this,Je).continueRetry(),T(this,Je).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(D(this,mi,!0),r.signal)})},s=()=>{const u=aw(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return i(d),D(this,mi,!1),this.options.persister?this.options.persister(u,d,this):u(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),D(this,Es,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&X(this,ln,Vn).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=u=>{var d,h,m,x;Zc(u)&&u.silent||X(this,ln,Vn).call(this,{type:"error",error:u}),Zc(u)||((h=(d=T(this,Ht).config).onError)==null||h.call(d,u,this),(x=(m=T(this,Ht).config).onSettled)==null||x.call(m,this.state.data,u,this)),this.scheduleGc()};return D(this,Je,cw({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,h,m,x;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){a(w);return}(h=(d=T(this,Ht).config).onSuccess)==null||h.call(d,u,this),(x=(m=T(this,Ht).config).onSettled)==null||x.call(m,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{X(this,ln,Vn).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{X(this,ln,Vn).call(this,{type:"pause"})},onContinue:()=>{X(this,ln,Vn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),T(this,Je).start()}},Ts=new WeakMap,Es=new WeakMap,Ht=new WeakMap,Je=new WeakMap,ma=new WeakMap,mi=new WeakMap,ln=new WeakSet,Vn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Zc(i)&&i.revert&&T(this,Es)?{...T(this,Es),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),De.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Ht).notify({query:this,type:"updated",action:t})})},Lv);function dw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sn,Iv,Lk=(Iv=class extends Gs{constructor(t={}){super();H(this,Sn);this.config=t,D(this,Sn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Sp(i,n);let o=this.get(s);return o||(o=new Dk({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,Sn).has(t.queryHash)||(T(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Sn).get(t)}getAll(){return[...T(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>t0(t,r)):n}notify(t){De.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){De.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){De.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Iv),Tn,it,gi,En,lr,$v,Ik=($v=class extends fw{constructor(t){super();H(this,En);H(this,Tn);H(this,it);H(this,gi);this.mutationId=t.mutationId,D(this,it,t.mutationCache),D(this,Tn,[]),this.state=t.state||hw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Tn).includes(t)||(T(this,Tn).push(t),this.clearGcTimeout(),T(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,Tn,T(this,Tn).filter(n=>n!==t)),this.scheduleGc(),T(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():T(this,it).remove(this))}continue(){var t;return((t=T(this,gi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,c,f,u,d,h,m,x,w,p,g,v,E,S,C,k;D(this,gi,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,j)=>{X(this,En,lr).call(this,{type:"failed",failureCount:P,error:j})},onPause:()=>{X(this,En,lr).call(this,{type:"pause"})},onContinue:()=>{X(this,En,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,it).canRun(this)}));const n=this.state.status==="pending",r=!T(this,gi).canStart();try{if(!n){X(this,En,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(i=T(this,it).config).onMutate)==null?void 0:s.call(i,t,this));const j=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));j!==this.state.context&&X(this,En,lr).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const P=await T(this,gi).start();return await((c=(l=T(this,it).config).onSuccess)==null?void 0:c.call(l,P,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,P,t,this.state.context)),await((h=(d=T(this,it).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,P,null,t,this.state.context)),X(this,En,lr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(w=T(this,it).config).onError)==null?void 0:p.call(w,P,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,P,t,this.state.context)),await((S=(E=T(this,it).config).onSettled)==null?void 0:S.call(E,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,t,this.state.context)),P}finally{X(this,En,lr).call(this,{type:"error",error:P})}}finally{T(this,it).runNext(this)}}},Tn=new WeakMap,it=new WeakMap,gi=new WeakMap,En=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),De.batch(()=>{T(this,Tn).forEach(r=>{r.onMutationUpdate(t)}),T(this,it).notify({mutation:this,type:"updated",action:t})})},$v);function hw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var At,ga,Vv,$k=(Vv=class extends Gs{constructor(t={}){super();H(this,At);H(this,ga);this.config=t,D(this,At,new Map),D(this,ga,Date.now())}build(t,n,r){const i=new Ik({mutationCache:this,mutationId:++Ba(this,ga)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=sl(t),r=T(this,At).get(n)??[];r.push(t),T(this,At).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=sl(t);if(T(this,At).has(n)){const i=(r=T(this,At).get(n))==null?void 0:r.filter(s=>s!==t);i&&(i.length===0?T(this,At).delete(n):T(this,At).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=T(this,At).get(sl(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=T(this,At).get(sl(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){De.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...T(this,At).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n0(n,r))}findAll(t={}){return this.getAll().filter(n=>n0(t,n))}notify(t){De.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return De.batch(()=>Promise.all(t.map(n=>n.continue().catch(Wt))))}},At=new WeakMap,ga=new WeakMap,Vv);function sl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function s0(e){return{onFetch:(t,n)=>{var f,u,d,h,m;const r=t.options,i=(d=(u=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:u.fetchMore)==null?void 0:d.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=aw(t.options,t.fetchOptions),g=async(v,E,S)=>{if(x)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const C={queryKey:t.queryKey,pageParam:E,direction:S?"backward":"forward",meta:t.options.meta};w(C);const k=await p(C),{maxPages:P}=t.options,j=S?Rk:Ak;return{pages:j(v.pages,k,P),pageParams:j(v.pageParams,E,P)}};if(i&&s.length){const v=i==="backward",E=v?Vk:o0,S={pages:s,pageParams:o},C=E(r,S);a=await g(S,C,v)}else{const v=e??s.length;do{const E=l===0?o[0]??r.initialPageParam:o0(r,a);if(l>0&&E==null)break;a=await g(a,E),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function o0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Vk(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ee,yr,vr,Cs,ks,xr,_s,Ps,Bv,Bk=(Bv=class{constructor(e={}){H(this,Ee);H(this,yr);H(this,vr);H(this,Cs);H(this,ks);H(this,xr);H(this,_s);H(this,Ps);D(this,Ee,e.queryCache||new Lk),D(this,yr,e.mutationCache||new $k),D(this,vr,e.defaultOptions||{}),D(this,Cs,new Map),D(this,ks,new Map),D(this,xr,0)}mount(){Ba(this,xr)._++,T(this,xr)===1&&(D(this,_s,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onFocus())})),D(this,Ps,du.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ee).onOnline())})))}unmount(){var e,t;Ba(this,xr)._--,T(this,xr)===0&&((e=T(this,_s))==null||e.call(this),D(this,_s,void 0),(t=T(this,Ps))==null||t.call(this),D(this,Ps,void 0))}isFetching(e){return T(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=T(this,Ee).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(xs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return T(this,Ee).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,Ee).get(r.queryHash),s=i==null?void 0:i.state.data,o=_k(t,s);if(o!==void 0)return T(this,Ee).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return De.batch(()=>T(this,Ee).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,Ee).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,Ee);De.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,Ee),r={type:"active",...e};return De.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=De.batch(()=>T(this,Ee).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return De.batch(()=>{if(T(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=De.batch(()=>T(this,Ee).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Wt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,Ee).build(this,t);return n.isStaleByTime(xs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=s0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=s0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return du.isOnline()?T(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ee)}getMutationCache(){return T(this,yr)}getDefaultOptions(){return T(this,vr)}setDefaultOptions(e){D(this,vr,e)}setQueryDefaults(e,t){T(this,Cs).set(Oi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,Cs).values()],n={};return t.forEach(r=>{ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,ks).set(Oi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ks).values()];let n={};return t.forEach(r=>{ea(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,vr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Tp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,vr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ee).clear(),T(this,yr).clear()}},Ee=new WeakMap,yr=new WeakMap,vr=new WeakMap,Cs=new WeakMap,ks=new WeakMap,xr=new WeakMap,_s=new WeakMap,Ps=new WeakMap,Bv),gt,ee,ya,st,yi,As,wr,Cn,va,Rs,Os,vi,xi,br,js,ae,yo,kd,_d,Pd,Ad,Rd,Od,jd,pw,zv,zk=(zv=class extends Gs{constructor(t,n){super();H(this,ae);H(this,gt);H(this,ee);H(this,ya);H(this,st);H(this,yi);H(this,As);H(this,wr);H(this,Cn);H(this,va);H(this,Rs);H(this,Os);H(this,vi);H(this,xi);H(this,br);H(this,js,new Set);this.options=n,D(this,gt,t),D(this,Cn,null),D(this,wr,Cd()),this.options.experimental_prefetchInRender||T(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ee).addObserver(this),a0(T(this,ee),this.options)?X(this,ae,yo).call(this):this.updateResult(),X(this,ae,Ad).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Md(T(this,ee),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Md(T(this,ee),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,Rd).call(this),X(this,ae,Od).call(this),T(this,ee).removeObserver(this)}setOptions(t,n){const r=this.options,i=T(this,ee);if(this.options=T(this,gt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dn(this.options.enabled,T(this,ee))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,jd).call(this),T(this,ee).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&T(this,gt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ee),observer:this});const s=this.hasListeners();s&&l0(T(this,ee),i,this.options,r)&&X(this,ae,yo).call(this),this.updateResult(n),s&&(T(this,ee)!==i||dn(this.options.enabled,T(this,ee))!==dn(r.enabled,T(this,ee))||xs(this.options.staleTime,T(this,ee))!==xs(r.staleTime,T(this,ee)))&&X(this,ae,kd).call(this);const o=X(this,ae,_d).call(this);s&&(T(this,ee)!==i||dn(this.options.enabled,T(this,ee))!==dn(r.enabled,T(this,ee))||o!==T(this,br))&&X(this,ae,Pd).call(this,o)}getOptimisticResult(t){const n=T(this,gt).getQueryCache().build(T(this,gt),t),r=this.createResult(n,t);return Hk(this,r)&&(D(this,st,r),D(this,As,this.options),D(this,yi,T(this,ee).state)),r}getCurrentResult(){return T(this,st)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){T(this,js).add(t)}getCurrentQuery(){return T(this,ee)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,gt).defaultQueryOptions(t),r=T(this,gt).getQueryCache().build(T(this,gt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,ae,yo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,st)))}createResult(t,n){var P;const r=T(this,ee),i=this.options,s=T(this,st),o=T(this,yi),a=T(this,As),c=t!==r?t.state:T(this,ya),{state:f}=t;let u={...f},d=!1,h;if(n._optimisticResults){const j=this.hasListeners(),M=!j&&a0(t,n),I=j&&l0(t,r,n,i);(M||I)&&(u={...u,...dw(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:w}=u;if(n.select&&u.data!==void 0)if(s&&u.data===(o==null?void 0:o.data)&&n.select===T(this,va))h=T(this,Rs);else try{D(this,va,n.select),h=n.select(u.data),h=Ed(s==null?void 0:s.data,h,n),D(this,Rs,h),D(this,Cn,null)}catch(j){D(this,Cn,j)}else h=u.data;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let j;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((P=T(this,Os))==null?void 0:P.state.data,T(this,Os)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),D(this,Cn,null)}catch(M){D(this,Cn,M)}j!==void 0&&(w="success",h=Ed(s==null?void 0:s.data,j,n),d=!0)}T(this,Cn)&&(m=T(this,Cn),h=T(this,Rs),x=Date.now(),w="error");const p=u.fetchStatus==="fetching",g=w==="pending",v=w==="error",E=g&&p,S=h!==void 0,k={status:w,fetchStatus:u.fetchStatus,isPending:g,isSuccess:w==="success",isError:v,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:p,isRefetching:p&&!g,isLoadingError:v&&!S,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&S,isStale:Cp(t,n),refetch:this.refetch,promise:T(this,wr)};if(this.options.experimental_prefetchInRender){const j=re=>{k.status==="error"?re.reject(k.error):k.data!==void 0&&re.resolve(k.data)},M=()=>{const re=D(this,wr,k.promise=Cd());j(re)},I=T(this,wr);switch(I.status){case"pending":t.queryHash===r.queryHash&&j(I);break;case"fulfilled":(k.status==="error"||k.data!==I.value)&&M();break;case"rejected":(k.status!=="error"||k.error!==I.reason)&&M();break}}return k}updateResult(t){const n=T(this,st),r=this.createResult(T(this,ee),this.options);if(D(this,yi,T(this,ee).state),D(this,As,this.options),T(this,yi).data!==void 0&&D(this,Os,T(this,ee)),fu(r,n))return;D(this,st,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!T(this,js).size)return!0;const l=new Set(a??T(this,js));return this.options.throwOnError&&l.add("error"),Object.keys(T(this,st)).some(c=>{const f=c;return T(this,st)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,ae,pw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,Ad).call(this)}},gt=new WeakMap,ee=new WeakMap,ya=new WeakMap,st=new WeakMap,yi=new WeakMap,As=new WeakMap,wr=new WeakMap,Cn=new WeakMap,va=new WeakMap,Rs=new WeakMap,Os=new WeakMap,vi=new WeakMap,xi=new WeakMap,br=new WeakMap,js=new WeakMap,ae=new WeakSet,yo=function(t){X(this,ae,jd).call(this);let n=T(this,ee).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Wt)),n},kd=function(){X(this,ae,Rd).call(this);const t=xs(this.options.staleTime,T(this,ee));if(Ri||T(this,st).isStale||!Sd(t))return;const r=sw(T(this,st).dataUpdatedAt,t)+1;D(this,vi,setTimeout(()=>{T(this,st).isStale||this.updateResult()},r))},_d=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ee)):this.options.refetchInterval)??!1},Pd=function(t){X(this,ae,Od).call(this),D(this,br,t),!(Ri||dn(this.options.enabled,T(this,ee))===!1||!Sd(T(this,br))||T(this,br)===0)&&D(this,xi,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&X(this,ae,yo).call(this)},T(this,br)))},Ad=function(){X(this,ae,kd).call(this),X(this,ae,Pd).call(this,X(this,ae,_d).call(this))},Rd=function(){T(this,vi)&&(clearTimeout(T(this,vi)),D(this,vi,void 0))},Od=function(){T(this,xi)&&(clearInterval(T(this,xi)),D(this,xi,void 0))},jd=function(){const t=T(this,gt).getQueryCache().build(T(this,gt),this.options);if(t===T(this,ee))return;const n=T(this,ee);D(this,ee,t),D(this,ya,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pw=function(t){De.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,st))}),T(this,gt).getQueryCache().notify({query:T(this,ee),type:"observerResultsUpdated"})})},zv);function Uk(e,t){return dn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function a0(e,t){return Uk(e,t)||e.state.data!==void 0&&Md(e,t,t.refetchOnMount)}function Md(e,t,n){if(dn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cp(e,t)}return!1}function l0(e,t,n,r){return(e!==t||dn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cp(e,n)}function Cp(e,t){return dn(t.enabled,e)!==!1&&e.isStaleByTime(xs(t.staleTime,e))}function Hk(e,t){return!fu(e.getCurrentResult(),t)}var Sr,Tr,yt,Hn,Yn,Al,Nd,Uv,Wk=(Uv=class extends Gs{constructor(t,n){super();H(this,Yn);H(this,Sr);H(this,Tr);H(this,yt);H(this,Hn);D(this,Sr,t),this.setOptions(n),this.bindMethods(),X(this,Yn,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=T(this,Sr).defaultMutationOptions(t),fu(this.options,n)||T(this,Sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,yt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Oi(n.mutationKey)!==Oi(this.options.mutationKey)?this.reset():((r=T(this,yt))==null?void 0:r.state.status)==="pending"&&T(this,yt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=T(this,yt))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,Yn,Al).call(this),X(this,Yn,Nd).call(this,t)}getCurrentResult(){return T(this,Tr)}reset(){var t;(t=T(this,yt))==null||t.removeObserver(this),D(this,yt,void 0),X(this,Yn,Al).call(this),X(this,Yn,Nd).call(this)}mutate(t,n){var r;return D(this,Hn,n),(r=T(this,yt))==null||r.removeObserver(this),D(this,yt,T(this,Sr).getMutationCache().build(T(this,Sr),this.options)),T(this,yt).addObserver(this),T(this,yt).execute(t)}},Sr=new WeakMap,Tr=new WeakMap,yt=new WeakMap,Hn=new WeakMap,Yn=new WeakSet,Al=function(){var n;const t=((n=T(this,yt))==null?void 0:n.state)??hw();D(this,Tr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Nd=function(t){De.batch(()=>{var n,r,i,s,o,a,l,c;if(T(this,Hn)&&this.hasListeners()){const f=T(this,Tr).variables,u=T(this,Tr).context;(t==null?void 0:t.type)==="success"?((r=(n=T(this,Hn)).onSuccess)==null||r.call(n,t.data,f,u),(s=(i=T(this,Hn)).onSettled)==null||s.call(i,t.data,null,f,u)):(t==null?void 0:t.type)==="error"&&((a=(o=T(this,Hn)).onError)==null||a.call(o,t.error,f,u),(c=(l=T(this,Hn)).onSettled)==null||c.call(l,void 0,t.error,f,u))}this.listeners.forEach(f=>{f(T(this,Tr))})})},Uv),mw=y.createContext(void 0),gw=e=>{const t=y.useContext(mw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Kk=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(mw.Provider,{value:e,children:t})),yw=y.createContext(!1),qk=()=>y.useContext(yw);yw.Provider;function Gk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Qk=y.createContext(Gk()),Yk=()=>y.useContext(Qk);function vw(e,t){return typeof e=="function"?e(...t):!!e}function Dd(){}var Xk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Zk=e=>{y.useEffect(()=>{e.clearReset()},[e])},Jk=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&vw(n,[e.error,r]),e_=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},t_=(e,t)=>e.isLoading&&e.isFetching&&!t,n_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,u0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function r_(e,t,n){var f,u,d,h,m;const r=gw(),i=qk(),s=Yk(),o=r.defaultQueryOptions(e);(u=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",e_(o),Xk(o,s),Zk(s);const a=!r.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(x=>{const w=i?Dd:l.subscribe(De.batchCalls(x));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),n_(o,c))throw u0(o,l,s);if(Jk({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,c),o.experimental_prefetchInRender&&!Ri&&t_(c,i)){const x=a?u0(o,l,s):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;x==null||x.catch(Dd).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function i_(e,t){return r_(e,zk)}function xw(e,t){const n=gw(),[r]=y.useState(()=>new Wk(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(De.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=y.useCallback((o,a)=>{r.mutate(o,a).catch(Dd)},[r]);if(i.error&&vw(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const s_=e=>i_({queryKey:["widgets",e],queryFn:()=>o_(e)}),o_=e=>Ea(`widgets/with-link/${e}`);var B=(e=>(e.Border="widget_border",e.Background="widget_background",e.InputBackground="widget_input_background",e.InputText="widget_input_text",e.InputBorder="widget_input_border",e.ButtonBackground="widget_button_background",e.ButtonText="widget_button_text",e.TooltipBackground="widget_tooltip_background",e.TooltipText="widget_tooltip_text",e.TooltipBorder="widget_tooltip_border",e.HeaderBackground="widget_header_background",e.HeaderText="widget_header_text",e.HeaderBorder="widget_header_border",e.FooterBackground="widget_footer_background",e.FooterText="widget_footer_text",e.FooterBorder="widget_footer_border",e.MessageAdminBackground="widget_message_admin_background",e.MessageAdminText="widget_message_admin_text",e.MessageVisitorBackground="widget_message_visitor_background",e.MessageVisitorText="widget_message_visitor_text",e.GreeterTopBackground="widget_greeter_top_background",e.GreeterTopText="widget_greeter_top_text",e.GreeterBackground="widget_greeter_background",e.GreeterText="widget_greeter_text",e.GreeterBorder="widget_greeter_border",e.GreeterButtonBackground="widget_greeter_button_background",e.GreeterButtonText="widget_greeter_button_text",e))(B||{});function a_(e){return!!e&&typeof e.public_id=="string"&&typeof e.link_id=="string"&&typeof e.name=="string"&&typeof e.is_browser_notification_enabled=="boolean"&&typeof e.is_hidden_on_offline=="boolean"&&typeof e.is_upload_disabled=="boolean"}/**
41
41
  * @remix-run/router v1.21.0
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -92,7 +92,7 @@ Error generating stack: `+s.message+`
92
92
  ${d}px !important;
93
93
  top: ${c}px !important;
94
94
  }
95
- `),()=>{document.head.removeChild(h)}},[t]),b.jsx($2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const B2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Rp(z2),c=y.useId();let f=!0,u=y.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(u={...u}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=b.jsx(V2,{isPresent:n,anchorX:a,children:e})),b.jsx(Hu.Provider,{value:u,children:e})};function z2(){return new Map}function Iw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function b0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const na=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Iw(o),f=y.useMemo(()=>b0(e),[e]),u=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=Rp(()=>new Map),[x,w]=y.useState(f),[p,g]=y.useState(f);Lw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);u.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,u.length,u.join("-")]);const v=[];if(f!==x){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);u.includes(P)||(S.splice(C,0,k),v.push(k))}return s==="wait"&&v.length&&(S=v),g(b0(S)),w(f),null}const{forceRender:E}=y.useContext(Ap);return b.jsx(b.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||u.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(M=>{M||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(c==null||c()),r&&r())};return b.jsx(B2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Mp(e,t){e.indexOf(t)===-1&&e.push(t)}function Np(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Vd=()=>{};const Bd={skipAnimations:!1,useManualTiming:!1};function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fp{constructor(){this.subscriptions=[]}add(t){return Mp(this.subscriptions,t),()=>Np(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 s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function $w(e,t){return t?e*(1e3/t):0}const U2=Dp(()=>window.ScrollTimeline!==void 0);class H2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(U2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class W2 extends H2{then(t,n){return this.finished.finally(t).then(()=>{})}}const S0={value:null,addProjectionMetrics:null},Lp=e=>Array.isArray(e)&&typeof e[0]=="number",K2={};function q2(e,t){const n=Dp(e);return()=>K2[t]??n()}const ia=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,zd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vo([0,.65,.55,1]),circOut:vo([.55,0,1,.45]),backIn:vo([.31,.01,.66,-.59]),backOut:vo([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"&&ia()?Vw(e,t):Lp(e)?vo(e):Array.isArray(e)?e.map(n=>Bw(n,t)||zd.easeOut):zd[e]}function G2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const f={[t]:n};l&&(f.offset=l);const u=Bw(a,i);return Array.isArray(u)&&(f.easing=u),e.animate(f,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Ip(e){return typeof e=="function"&&"applyToOptions"in e}function $p(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Vp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function Q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vp(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function zw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in zd||ia())||Lp(e)||Array.isArray(e)&&e.every(zw))}function T0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function Y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(u){o.has(u)&&(f.schedule(u),e()),l++,u(a)}const f={schedule:(u,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&S0.value&&S0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(u))}};return f}const X2=40;function Uw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=Y2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:f,render:u,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,X2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),f.process(i),u.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const v=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),v.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:Bp,cancel:DI}=Uw(queueMicrotask,!1),{schedule:he,cancel:zr,state:qe,steps:tf}=Uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xt,!0);let Rl;function Z2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(qe.isProcessing||Bd.useManualTiming?qe.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Z2)}},on={x:!1,y:!1};function Hw(){return on.x||on.y}function J2(e){return e==="x"||e==="y"?on[e]?null:(on[e]=!0,()=>{on[e]=!1}):on.x||on.y?null:(on.x=on.y=!0,()=>{on.x=on.y=!1})}function eP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ww(e,t){const n=eP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function E0(e){return!(e.pointerType==="touch"||Hw())}function tP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{if(!E0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const f=u=>{E0(u)&&(c(u),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Kw=(e,t)=>t?e===t?!0:Kw(e,t.parentElement):!1,zp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rP(e){return nP.has(e.tagName)||e.tabIndex!==-1}const xo=new WeakSet;function C0(e){return t=>{t.key==="Enter"&&e(t)}}function nf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=C0(()=>{if(xo.has(n))return;nf(n,"down");const i=C0(()=>{nf(n,"up")}),s=()=>nf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function k0(e){return zp(e)&&!Hw()}function sP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{const l=a.currentTarget;if(!k0(a)||xo.has(l))return;xo.add(l);const c=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",d),!(!k0(h)||!xo.has(l))&&(xo.delete(l),typeof c=="function"&&c(h,{success:m}))},u=h=>{f(h,l===window||l===document||n.useGlobalTarget||Kw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>iP(c,i)),!rP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const _0=30,oP=e=>!isNaN(parseFloat(e));class aP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&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.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.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=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return $w(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 sa(e,t){return new aP(e,t)}const qw=y.createContext({strict:!1}),P0={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"]},Bs={};for(const e in P0)Bs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function lP(e){for(const t in e)Bs[t]={...Bs[t],...e[t]}}const uP=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 gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let Gw=e=>!gu(e);function cP(e){e&&(Gw=t=>t.startsWith("on")?!gu(t):e(t))}try{cP(require("@emotion/is-prop-valid").default)}catch{}function fP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Up=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hp=["initial",...Up];function qu(e){return Ku(e.animate)||Hp.some(t=>oa(e[t]))}function Qw(e){return!!(qu(e)||e.variants)}function hP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function pP(e){const{initial:t,animate:n}=hP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[A0(t),A0(n)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const mP=Symbol.for("motionComponentSymbol");function as(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):as(n)&&(n.current=r))},[t])}const Wp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yP="framerAppearId",Yw="data-"+Wp(yP),Xw=y.createContext({});function vP(e,t,n,r,i){var x,w;const{visualElement:s}=y.useContext(Wu),o=y.useContext(qw),a=y.useContext(Hu),l=y.useContext(jp).reducedMotion,c=y.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=c.current,u=y.useContext(Xw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&xP(c.current,n,i,u);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Yw],m=y.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Lw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Bp.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function xP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&as(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:c})}function Zw(e){if(e)return e.options.allowProjection!==!1?e.projection:Zw(e.parent)}function wP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&lP(e);function s(a,l){let c;const f={...y.useContext(jp),...a,layoutId:bP(a)},{isStatic:u}=f,d=pP(a),h=r(a,u);if(!u&&Op){SP();const m=TP(f);c=m.MeasureLayout,d.visualElement=vP(i,h,f,t,m.ProjectionNode)}return b.jsxs(Wu.Provider,{value:d,children:[c&&d.visualElement?b.jsx(c,{visualElement:d.visualElement,...f}):null,n(i,a,gP(h,d.visualElement,l),h,u,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[mP]=i,o}function bP({layoutId:e}){const t=y.useContext(Ap).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){y.useContext(qw).strict}function TP(e){const{drag:t,layout:n}=Bs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Jw=e=>t=>typeof t=="string"&&t.startsWith(e),Kp=Jw("--"),EP=Jw("var(--"),qp=e=>EP(e)?CP.test(e.split("/*")[0].trim()):!1,CP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function kP(e){for(const t in e)aa[t]=e[t],Kp(t)&&(aa[t].isCSSVariable=!0)}const Qs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ii=new Set(Qs);function eb(e,{layout:t,layoutId:n}){return Ii.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const nt=e=>!!(e&&e.getVelocity),tb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,tr=(e,t,n)=>n>t?t:n<e?e:n,Ys={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Ys,transform:e=>tr(0,1,e)},ll={...Ys,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),K=_a("px"),_P=_a("vh"),PP=_a("vw"),R0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},AP={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},RP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:la,originX:R0,originY:R0,originZ:K},O0={...Ys,transform:Math.round},Gp={...AP,...RP,zIndex:O0,size:K,fillOpacity:la,strokeOpacity:la,numOctaves:O0},OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jP=Qs.length;function MP(e,t,n){let r="",i=!0;for(let s=0;s<jP;s++){const o=Qs[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=tb(a,Gp[o]);if(!l){i=!1;const f=OP[o]||o;r+=`${f}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Ii.has(l)){o=!0;continue}else if(Kp(l)){i[l]=c;continue}else{const f=tb(c,Gp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=MP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${c} ${f}`}}const Yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nb(e,t,n){for(const r in t)!nt(t[r])&&!eb(r,n)&&(e[r]=t[r])}function NP({transformTemplate:e},t){return y.useMemo(()=>{const n=Yp();return Qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DP(e,t){const n=e.style||{},r={};return nb(r,n,e),Object.assign(r,NP(e,t)),r}function FP(e,t){const n={},r=DP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["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 Xp(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const IP={offset:"stroke-dashoffset",array:"stroke-dasharray"},$P={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?IP:$P;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function j0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function BP(e,t,n){const r=j0(t,e.x,e.width),i=j0(n,e.y,e.height);return`${r} ${i}`}function Zp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u){if(Qp(e,c,u),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=BP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&VP(d,o,a,l,!1)}const rb=()=>({...Yp(),attrs:{}}),Jp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zP(e,t,n,r){const i=y.useMemo(()=>{const s=rb();return Zp(s,t,Jp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nb(s,e.style,e),i.style={...s,...i.style}}return i}function UP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xp(n)?zP:FP)(r,s,o,n),c=fP(r,typeof n=="string",e),f=n!==y.Fragment?{...c,...l,ref:i}:{},{children:u}=r,d=y.useMemo(()=>nt(u)?u.get():u,[u]);return y.createElement(n,{...f,children:d})}}function M0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function em(e,t,n,r){if(typeof t=="function"){const[i,s]=M0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=M0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Ud=e=>Array.isArray(e),HP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WP=e=>Ud(e)?e[e.length-1]||0:e;function Ol(e){const t=nt(e)?e.get():e;return HP(t)?t.toValue():t}function KP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:qP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ib=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>KP(e,t,r,i);return n?s():Rp(s)};function qP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),c=Qw(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const u=f?a:o;if(u&&typeof u!="boolean"&&!Ku(u)){const d=Array.isArray(u)?u:[u];for(let h=0;h<d.length;h++){const m=em(e,d[h]);if(m){const{transitionEnd:x,transition:w,...p}=m;for(const g in p){let v=p[g];if(Array.isArray(v)){const E=f?v.length-1:0;v=v[E]}v!==null&&(i[g]=v)}for(const g in x)i[g]=x[g]}}}return i}function tm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(nt(r[o])||t.style&&nt(t.style[o])||eb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const GP={useVisualState:ib({scrapeMotionValuesFromProps:tm,createRenderState:Yp})};function sb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ob(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ab=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 lb(e,t,n,r){ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ab.has(i)?i:Wp(i),t.attrs[i])}function ub(e,t,n){const r=tm(e,t,n);for(const i in e)if(nt(e[i])||nt(t[i])){const s=Qs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const N0=["x","y","width","height","cx","cy","r"],QP={useVisualState:ib({scrapeMotionValuesFromProps:ub,createRenderState:rb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(Ii.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<N0.length;a++){const l=N0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{sb(n,r),he.render(()=>{Zp(r,i,Jp(n.tagName),e.transformTemplate),lb(n,r)})})}})};function YP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xp(r)?QP:GP,preloadedFeatures:e,useRender:UP(i),createVisualElement:t,Component:r};return wP(o)}}function ua(e,t,n){const r=e.getProps();return em(r,t,n!==void 0?n:r.custom,e)}const cb=new Set(["width","height","top","left","right","bottom",...Qs]);function XP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function ZP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=WP(s[o]);XP(e,o,a)}}function JP(e){return!!(nt(e)&&e.add)}function Hd(e,t){const n=e.getValue("willChange");if(JP(n))return n.add(t);if(!n&&Bd.WillChange){const r=new Bd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fb(e){return e.props[Yw]}const db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=db(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>eA&&++a<tA);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Xt;const i=s=>nA(s,0,1,e,n);return s=>s===0||s===1?s:db(i(s),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pb=e=>t=>1-e(1-t),mb=Pa(.33,1.53,.69,.99),nm=pb(mb),gb=hb(nm),yb=e=>(e*=2)<1?.5*nm(e):.5*(2-Math.pow(2,-10*(e-1))),rm=e=>1-Math.sin(Math.acos(e)),vb=pb(rm),xb=hb(rm),wb=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wb(e):!0}const Ro=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iA(e){return e==null}const sA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sm=(e,t)=>n=>!!(typeof n=="string"&&sA.test(n)&&n.startsWith(e)||t&&!iA(n)&&Object.prototype.hasOwnProperty.call(n,t)),bb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(im);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oA=e=>tr(0,255,e),rf={...Ys,transform:e=>Math.round(oA(e))},ui={test:sm("rgb","red"),parse:bb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rf.transform(e)+", "+rf.transform(t)+", "+rf.transform(n)+", "+Ro(la.transform(r))+")"};function aA(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 Wd={test:sm("#"),parse:aA,transform:ui.transform},ls={test:sm("hsl","hue"),parse:bb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Ro(t))+", "+jn.transform(Ro(n))+", "+Ro(la.transform(r))+")"},et={test:e=>ui.test(e)||Wd.test(e)||ls.test(e),parse:e=>ui.test(e)?ui.parse(e):ls.test(e)?ls.parse(e):Wd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):ls.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const Sb="number",Tb="color",cA="var",fA="var(",D0="${}",dA=/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 ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(dA,l=>(et.test(l)?(r.color.push(s),i.push(Tb),n.push(et.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(cA),n.push(l)):(r.number.push(s),i.push(Sb),n.push(parseFloat(l))),++s,D0)).split(D0);return{values:n,split:a,indexes:r,types:i}}function Eb(e){return ca(e).values}function Cb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Sb?s+=Ro(i[o]):a===Tb?s+=et.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=Eb(e);return Cb(e)(t.map(hA))}const Ur={test:uA,parse:Eb,createTransformer:Cb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(im)||[];if(!r)return e;const i=n.replace(r,"");let s=mA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Kd={...Ur,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},vA={...Gp,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Kd,WebkitFilter:Kd},kb=e=>vA[e];function _b(e,t){let n=kb(e);return n!==Kd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xA=new Set(["auto","none","0"]);function wA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!xA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_b(n,i)}const ci=e=>e*180/Math.PI,qd=e=>{const t=ci(Math.atan2(e[1],e[0]));return Gd(t)},bA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qd,rotateZ:qd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Gd=e=>(e=e%360,e<0&&(e+=360),e),F0=qd,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:I0,scale:e=>(L0(e)+I0(e))/2,rotateX:e=>Gd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>Gd(ci(Math.atan2(-e[2],e[0]))),rotateZ:F0,rotate:F0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $0(e){return e.includes("scale")?1:0}function Qd(e,t){if(!e||e==="none")return $0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bA,i=a}if(!i)return $0(t);const s=r[t],o=i[1].split(",").map(EA);return typeof s=="function"?s(o):o[s]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qd(n,t)};function EA(e){return parseFloat(e.trim())}const V0=e=>e===Ys||e===K,CA=new Set(["x","y","z"]),kA=Qs.filter(e=>!CA.has(e));function _A(e){const t=[];return kA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const zs={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:(e,{transform:t})=>Qd(t,"x"),y:(e,{transform:t})=>Qd(t,"y")};zs.translateX=zs.x;zs.translateY=zs.y;const Si=new Set;let Yd=!1,Xd=!1;function Pb(){if(Xd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=_A(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(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xd=!1,Yd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Ab(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xd=!0)})}function PA(){Ab(),Pb()}class om{constructor(t,n,r,i,s,o=!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=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Yd||(Yd=!0,he.read(Ab),he.resolveKeyframes(Pb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ob(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rb(o)?parseFloat(o):o}return qp(i)?Ob(i,t,n+1):i}const jb=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},Mb=[Ys,K,jn,ur,PP,_P,OA],B0=e=>Mb.find(jb(e));class Nb extends om{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),qp(c))){const f=Ob(c,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cb.has(r)||t.length!==2)return;const[i,s]=t,o=B0(i),a=B0(s);if(o!==a)if(V0(o)&&V0(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)rA(t[i])&&r.push(i);r.length&&wA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=zs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function jA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function MA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=z0(i,t),a=z0(s,t);return!o||!a?!1:jA(e)||(n==="spring"||Ip(n))&&r}const NA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(NA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const DA=40;class Db{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>DA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!MA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function sf(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 FA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=sf(l,a,e+1/3),s=sf(l,a,e),o=sf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const of=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LA=[Wd,ui,ls],IA=e=>LA.find(t=>t.test(e));function U0(e){const t=IA(e);if(!t)return!1;let n=t.parse(e);return t===ls&&(n=FA(n)),n}const H0=(e,t)=>{const n=U0(e),r=U0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=of(n.red,r.red,s),i.green=of(n.green,r.green,s),i.blue=of(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},$A=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce($A),Zd=new Set(["none","hidden"]);function VA(e,t){return Zd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>be(e,t,n)}function am(e){return typeof e=="number"?BA:typeof e=="string"?qp(e)?yu:et.test(e)?H0:HA:Array.isArray(e)?Fb:typeof e=="object"?et.test(e)?H0:zA:yu}function Fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>am(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function zA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=am(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function UA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const HA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(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?Zd.has(e)&&!i.values.length||Zd.has(t)&&!r.values.length?VA(e,t):Aa(Fb(UA(r,i),i.values),n):yu(e,t)};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):am(e)(e,t)}const WA=5;function Ib(e,t,n){const r=Math.max(t-WA,0);return $w(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},af=.001;function KA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=tr(Ce.minDamping,Ce.maxDamping,o),e=tr(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=c=>{const f=c*o,u=f*e,d=f-n,h=Jd(c,o),m=Math.exp(-u);return af-d/h*m},s=c=>{const u=c*o*e,d=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),x=Jd(Math.pow(c,2),o);return(-i(c)+af>0?-1:1)*((d-h)*m)/x}):(i=c=>{const f=Math.exp(-c*e),u=(c-n)*e+1;return-af+f*u},s=c=>{const f=Math.exp(-c*e),u=(n-c)*(e*e);return f*u});const a=5/e,l=GA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const qA=12;function GA(e,t,n){let r=n;for(let i=1;i<qA;i++)r=r-e(r)/t(r);return r}function Jd(e,t){return e*Math.sqrt(1-t*t)}const QA=["duration","bounce"],YA=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function XA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!W0(e,YA)&&W0(e,QA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*tr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:f,duration:u,velocity:d,isResolvedFromDuration:h}=XA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,x=c/(2*Math.sqrt(l*f)),w=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(w)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let v;if(x<1){const S=Jd(p,x);v=C=>{const k=Math.exp(-x*p*C);return o-k*((m+x*p*w)/S*Math.sin(S*C)+w*Math.cos(S*C))}}else if(x===1)v=S=>o-Math.exp(-p*S)*(w+(m+p*w)*S);else{const S=p*Math.sqrt(x*x-1);v=C=>{const k=Math.exp(-x*p*C),P=Math.min(S*C,300);return o-k*((m+x*p*w)*Math.sinh(P)+S*w*Math.cosh(P))/S}}const E={calculatedDuration:h&&u||null,next:S=>{const C=v(S);if(h)a.done=S>=u;else{let k=0;x<1&&(k=S===0?An(m):Ib(v,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Vp(E),mu),C=Vw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=Q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=e[0],d={done:!1,value:u},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const w=u+x,p=o===void 0?w:o(w);p!==w&&(x=p-u);const g=P=>-x*Math.exp(-P/r),v=P=>p+g(P),E=P=>{const j=g(P),M=v(P);d.done=Math.abs(j)<=c,d.value=d.done?p:M};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Ib(v,P,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const ZA=Pa(.42,0,1,1),JA=Pa(0,0,.58,1),$b=Pa(.42,0,.58,1),eR=e=>Array.isArray(e)&&typeof e[0]!="number",q0={linear:Xt,easeIn:ZA,easeInOut:$b,easeOut:JA,circIn:rm,circInOut:xb,circOut:vb,backIn:nm,backInOut:gb,backOut:mb,anticipate:yb},G0=e=>{if(Lp(e)){Vd(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return Vd(q0[e]!==void 0),q0[e];return e};function tR(e,t,n){const r=[],i=n||Lb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Xt:t;a=Aa(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Vd(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tR(t,r,i),l=a.length,c=f=>{if(o&&f<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(f<e[u+1]);u++);const d=ra(e[u],e[u+1],f);return a[u](d)};return n?f=>c(tr(e[0],e[s-1],f)):c}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||$b).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=eR(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>qe.isProcessing?qe.timestamp:On.now()}},lR={decay:K0,inertia:K0,tween:xu,keyframes:xu,spring:vu},uR=e=>e/100;class lm extends Db{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,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:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||om,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Ip(n)?n:lR[n]||xu;let l,c;a!==xu&&typeof t[0]!="number"&&(l=Aa(uR,Lb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Vp(f));const{calculatedDuration:u}=f,d=u+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:d,totalDuration:h}}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:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/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 p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let v=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/u;let j=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(M=1-M,x&&(M-=x/u)):m==="mirror"&&(E=o)),v=tr(0,1,M)*u}const S=g?{done:!1,value:l[0]}:E.next(v);a&&(S.value=a(S.value));let{done:C}=S;!g&&c!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),w&&w(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(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=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const cR=new Set(["opacity","clipPath","filter","transform"]),fR=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,dR=2e4;function hR(e){return Ip(e.type)||e.type==="spring"||!zw(e.ease)}function pR(e,t){const n=new lm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<dR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const Vb={anticipate:yb,backInOut:gb,circInOut:xb};function mR(e){return e in Vb}class Q0 extends Db{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Nb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&mR(s)&&(s=Vb[s]),hR(this.options)){const{onComplete:u,onUpdate:d,motionValue:h,element:m,...x}=this.options,w=pR(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const f=G2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(T0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:u}=this.options;a.set(Gu(t,this.options,n)),u&&u(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}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}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xt;const{animation:r}=n;T0(r,t)}return Xt}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;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:u,element:d,...h}=this.options,m=new lm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=An(this.time);c.setWithVelocity(m.sample(x-wu).value,m.sample(x).value,wu)}const{onStop:l}=this.options;l&&l(),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:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return fR()&&r&&cR.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const gR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vR={type:"keyframes",duration:.8},xR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?vR:Ii.has(e)?e.startsWith("scale")?yR(t[1]):gR:xR;function bR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const um=(e,t,n,r={},i,s)=>o=>{const a=$p(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bR(a)||(f={...f,...wR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let u=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(u=!0)),f.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new W2([])}return!s&&Q0.supports(f)?new Q0(f):new lm(f)};function SR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const u=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||c&&SR(c,f))continue;const h={delay:n,...$p(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const w=fb(e);if(w){const p=window.MotionHandoffAnimation(w,f,he);p!==null&&(h.startTime=p,m=!0)}}Hd(e,f),u.start(um(f,u,d,e.shouldReduceMotion&&cb.has(f)?{type:!1}:h,e,m));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&ZP(e,o)})}),l}function eh(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Bb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return TR(e,t,f+c,u,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,f]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function TR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(ER).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(eh(c,t,{...s,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function ER(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>eh(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=eh(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const kR=Hp.length;function Ub(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ub(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=Hp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const _R=[...Up].reverse(),PR=Up.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=Y0(),r=!0;const i=l=>(c,f)=>{var d;const u=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(u){const{transition:h,transitionEnd:m,...x}=u;c={...c,...x,...m}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,f=Ub(e.parent)||{},u=[],d=new Set;let h={},m=1/0;for(let w=0;w<PR;w++){const p=_R[w],g=n[p],v=c[p]!==void 0?c[p]:f[p],E=oa(v),S=p===l?g.isActive:null;S===!1&&(m=w);let C=v===f[p]&&v!==c[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Ku(v)||typeof v=="boolean")continue;const k=OR(g.prevProp,v);let P=k||p===l&&g.isActive&&!C&&E||w>m&&E,j=!1;const M=Array.isArray(v)?v:[v];let I=M.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let z=!1;Ud(O)&&Ud(L)?z=!zb(O,L):z=O!==L,z?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=v,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&u.push(...M.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const w={};if(typeof c.initial!="boolean"){const p=ua(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),w[p]=g??null}),u.push({animation:w})}let x=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let MR=0;class NR extends Gr{constructor(){super(...arguments),this.id=MR++}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,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DR={animation:{Feature:jR},exit:{Feature:NR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const FR=e=>t=>zp(t)&&e(t,Ra(t));function Oo(e,t,n,r){return fa(e,t,FR(n),r)}function Hb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IR(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}}const Wb=1e-4,$R=1-Wb,VR=1+Wb,Kb=.01,BR=0-Kb,zR=0+Kb;function lt(e){return e.max-e.min}function UR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=lt(n)/lt(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=VR||isNaN(e.scale))&&(e.scale=1),(e.translate>=BR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n){e.min=n.min+t.min,e.max=e.min+lt(t)}function HR(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+lt(t)}function Mo(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}const ey=()=>({translate:0,scale:1,origin:0,originPoint:0}),us=()=>({x:ey(),y:ey()}),ty=()=>({min:0,max:0}),Pe=()=>({x:ty(),y:ty()});function Ut(e){return[e("x"),e("y")]}function lf(e){return e===void 0||e===1}function th({scale:e,scaleX:t,scaleY:n}){return!lf(e)||!lf(t)||!lf(n)}function ni(e){return th(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ry(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function nh(e,t=0,n=1,r,i){e.min=ry(e.min,t,n,r,i),e.max=ry(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){nh(e.x,t.translate,t.scale,t.originPoint),nh(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,sy=1.0000000000001;function WR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&fs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&ni(s.latestValues)&&fs(e,s.latestValues))}t.x<sy&&t.x>iy&&(t.x=1),t.y<sy&&t.y>iy&&(t.y=1)}function cs(e,t){e.min=e.min+t,e.max=e.max+t}function oy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);nh(e,t,n,s,r)}function fs(e,t){oy(e.x,t.x,t.scaleX,t.scale,t.originX),oy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Hb(IR(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=Qb(e,n),{scroll:i}=t;return i&&(cs(r.x,i.offset.x),cs(r.y,i.offset.y)),r}const Yb=({current:e})=>e?e.ownerDocument.defaultView:null,ay=(e,t)=>Math.abs(e-t);function qR(e,t){const n=ay(e.x,t.x),r=ay(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=cf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=qR(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:x}=qe;this.history.push({...m,timestamp:x});const{onStart:w,onMove:p}=this.handlers;d||(w&&w(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=uf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=cf(u.type==="pointercancel"?this.lastMoveEventInfo:uf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,w),m&&m(u,w)},!zp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=uf(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=qe;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,cf(a,this.history)),this.removeListeners=Aa(Oo(this.contextWindow,"pointermove",this.handlePointerMove),Oo(this.contextWindow,"pointerup",this.handlePointerUp),Oo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function uf(e,t){return t?{point:t(e.point)}:e}function ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cf({point:e},t){return{point:e,delta:ly(e,Zb(t)),offset:ly(e,GR(t)),velocity:QR(t,.1)}}function GR(e){return e[0]}function Zb(e){return e[e.length-1]}function QR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function uy(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 XR(e,{top:t,left:n,bottom:r,right:i}){return{x:uy(e.x,n,i),y:uy(e.y,t,r)}}function cy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZR(e,t){return{x:cy(e.x,t.x),y:cy(e.y,t.y)}}function JR(e,t){let n=.5;const r=lt(e),i=lt(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),tr(0,1,n)}function eO(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 rh=.35;function tO(e=rh){return e===!1?e=0:e===!0&&(e=rh),{x:fy(e,"left","right"),y:fy(e,"top","bottom")}}function fy(e,t,n){return{min:dy(e,t),max:dy(e,n)}}function dy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;class rO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ut(w=>{let p=this.getAxisMotionValue(w).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[w];v&&(p=lt(v)*(parseFloat(p)/100))}}this.originPoint[w]=p}),m&&he.postRender(()=>m(f,u)),Hd(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:w}=u;if(h&&this.currentDirection===null){this.currentDirection=iO(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,w),this.updateAxis("y",u.point,w),this.visualElement.render(),x&&x(f,u)},a=(f,u)=>this.stop(f,u),l=()=>Ut(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Yb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&as(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XR(r.layoutBox,t):this.constraints=!1,this.elastic=tO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ut(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!as(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=ZR(i.layout.layoutBox,s);if(n){const a=n(LR(o));this.hasMutatedConstraints=!!a,a&&(o=Hb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ut(f=>{if(!ul(f,n,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Hd(this.visualElement,t),r.start(um(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ut(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ut(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?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){Ut(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!as(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ut(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=JR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ut(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=Oo(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();as(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ut(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=rh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sO extends Gr{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class oO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new Xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hy(t),onStart:hy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Oo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function py(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=py(e,t.target.x),r=py(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class lO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;kP(uO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Bp.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 Jb(e){const[t,n]=Iw(),r=y.useContext(Ap);return b.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Xw),isPresent:t,safeToRemove:n})}const uO={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:aO};function cO(e,t,n){const r=nt(e)?e:sa(e);return r.start(um("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Mp(this.children,t),this.isDirty=!0}remove(t){Np(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}}function pO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const eS=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=eS.length,my=e=>typeof e=="string"?parseFloat(e):e,gy=e=>typeof e=="number"||K.test(e);function gO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,yO(r)),e.opacityExit=be(t.opacity??1,0,vO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<mO;o++){const a=`border${eS[o]}Radius`;let l=yy(t,a),c=yy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gy(l)===gy(c)?(e[a]=Math.max(be(my(l),my(c),r),0),(jn.test(c)||jn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function yy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=tS(0,.5,vb),vO=tS(.5,.95,Xt);function tS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function vy(e,t){e.min=t.min,e.max=t.max}function Vt(e,t){vy(e.x,t.x),vy(e.y,t.y)}function xy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function xO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=wy(e.min,t,n,a,i),e.max=wy(e.max,t,n,a,i)}function by(e,t,[n,r,i],s,o){xO(e,t[n],t[r],t[i],t.scale,s,o)}const wO=["x","scaleX","originX"],bO=["y","scaleY","originY"];function Sy(e,t,n,r){by(e.x,t,wO,n?n.x:void 0,r?r.x:void 0),by(e.y,t,bO,n?n.y:void 0,r?r.y:void 0)}function Ty(e){return e.translate===0&&e.scale===1}function nS(e){return Ty(e.x)&&Ty(e.y)}function Ey(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rS(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function ky(e){return lt(e.x)/lt(e.y)}function _y(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TO{constructor(){this.members=[]}add(t){Mp(this.members,t),t.scheduleRender()}remove(t){if(Np(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 s=this.members[i];if(s.isPresent!==!1){r=s;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 EO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:u,rotateY:d,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ff=["","X","Y","Z"],CO={visibility:"hidden"},Py=1e3;let kO=0;function df(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iS(r)}function sS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(NO),this.nodes.forEach(DO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Fp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=pO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VO,{onLayoutAnimationStart:w,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!rS(this.targetLayout,m),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,v);const E={...$p(x,"layout"),onPlay:w,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(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(FO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const u=this.path[f];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ay);return}this.isUpdating||this.nodes.forEach(jO),this.isUpdating=!1,this.nodes.forEach(MO),this.nodes.forEach(_O),this.nodes.forEach(PO),this.clearAllSnapshots();const a=On.now();qe.delta=tr(0,1e3/60,a-qe.timestamp),qe.timestamp=a,qe.isProcessing=!0,tf.update.process(qe),tf.preRender.process(qe),tf.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!lt(this.snapshot.measuredBox.x)&&!lt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(zO))){const{scroll:f}=this.root;f&&(cs(a.x,f.offset.x),cs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(Vt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:u,options:d}=f;f!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Vt(a,o),cs(a.x,u.offset.x),cs(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();Vt(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&fs(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&fs(l,f.latestValues)}return ni(this.latestValues)&&fs(l,this.latestValues),l}removeTransform(o){const a=Pe();Vt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ni(c.latestValues))continue;th(c.latestValues)&&c.updateSnapshot();const f=Pe(),u=c.measurePageBox();Vt(f,u),Sy(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Sy(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=qe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||th(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===qe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;Vt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,d=this.treeScale.y;WR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xy(this.prevProjectionDelta.x,this.projectionDelta.x),xy(this.prevProjectionDelta.y,this.projectionDelta.y)),jo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==d||!_y(this.projectionDelta.x,this.prevProjectionDelta.x)||!_y(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=us(),this.projectionDelta=us(),this.projectionDeltaWithTransform=us()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},f={...this.latestValues},u=us();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,w=this.getStack(),p=!w||w.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some($O));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Oy(u.x,o.x,S),Oy(u.y,o.y,S),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IO(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&SO(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Pe()),Vt(v,this.relativeTarget)),x&&(this.animationValues=f,gO(f,c,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=cO(0,Py,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&oS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Pe();const u=lt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=lt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Vt(a,l),fs(a,f),jo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&df("z",o,c,this.animationValues);for(let f=0;f<ff.length;f++)df(`rotate${ff[f]}`,o,c,this.animationValues),df(`skew${ff[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=EO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:u,y:d}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${d.origin*100}% 0`,c.animationValues?a.opacity=c===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=c===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:w}=aa[h],p=a.transform==="none"?f[h]:m(f[h],c);if(x){const g=x.length;for(let v=0;v<g;v++)a[x[v]]=p}else w?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=c===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ay),this.root.sharedNodes.clear()}}}function _O(e){e.updateLayout()}function PO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ut(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=lt(d);d.min=r[u].min,d.max=d.min+h}):oS(s,t.layoutBox,r)&&Ut(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=lt(r[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=us();jo(a,r,t.layoutBox);const l=us();o?jo(l,e.applyTransform(i,!0),t.measuredBox):jo(l,r,t.layoutBox);const c=!nS(a);let f=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),rS(m,x)||(f=!0),u.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function Ay(e){e.clearMeasurements()}function jO(e){e.isLayoutDirty=!1}function MO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function DO(e){e.calcProjection()}function FO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function IO(e,t,n,r){jy(e.x,t.x,n.x,r),jy(e.y,t.y,n.y,r)}function $O(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},My=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ny=My("applewebkit/")&&!My("chrome/")?Math.round:Xt;function Dy(e){e.min=Ny(e.min),e.max=Ny(e.max)}function BO(e){Dy(e.x),Dy(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!UR(ky(t),ky(n),.2)}function zO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const UO=sS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hf={current:void 0},aS=sS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hf.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),hf.current=e}return hf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HO={pan:{Feature:oO},drag:{Feature:sO,ProjectionNode:aS,MeasureLayout:Jb}};function Fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=tP(t,(n,r)=>(Fy(this.node,r,"Start"),i=>Fy(this.node,i,"End"))))}unmount(){}}class KO extends Gr{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=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ly(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=sP(t,(n,r)=>(Ly(this.node,r,"Start"),(i,{success:s})=>Ly(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ih=new WeakMap,pf=new WeakMap,GO=e=>{const t=ih.get(e.target);t&&t(e)},QO=e=>{e.forEach(GO)};function YO({root:e,...t}){const n=e||document;pf.has(n)||pf.set(n,{});const r=pf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(QO,{root:e,...t})),r[i]}function XO(e,t,n){const r=YO(t);return ih.set(e,n),r.observe(e),()=>{ih.delete(e),r.unobserve(e)}}const ZO={some:0,all:1};class JO extends Gr{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:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZO[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ej(t,n))&&this.startObserver()}unmount(){}}function ej({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tj={inView:{Feature:JO},tap:{Feature:qO},focus:{Feature:KO},hover:{Feature:WO}},nj={layout:{ProjectionNode:aS,MeasureLayout:Jb}},sh={current:null},lS={current:!1};function rj(){if(lS.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sh.current=e.matches;e.addListener(t),t()}else sh.current=!1}const ij=[...Mb,et,Ur],sj=e=>ij.find(jb(e)),oj=new WeakMap;function aj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(nt(i))e.addValue(r,i);else if(nt(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=om,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&nt(m)&&m.set(l[h],!1)}}mount(t){this.current=t,oj.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)),lS.current||rj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:sh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ii.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bs){const n=Bs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}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;r<Iy.length;r++){const i=Iy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const 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=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rb(r)||wb(r))?r=parseFloat(r):!sj(r)&&Ur.test(n)&&(r=_b(t,n)),this.setBaseTarget(t,nt(r)?r.get():r)),nt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=em(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!nt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class uS extends lj{constructor(){super(...arguments),this.KeyframeResolver=Nb}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]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uj(e){return window.getComputedStyle(e)}class cj extends uS{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(t,n){if(Ii.has(n))return TA(t,n);{const r=uj(t),i=(Kp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){Qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}}class fj extends uS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&sb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ii.has(n)){const r=kb(n);return r&&r.default||0}return n=ab.has(n)?n:Wp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ub(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Zp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){lb(t,n,r,i)}mount(t){this.isSVGTag=Jp(t.tagName),super.mount(t)}}const dj=(e,t)=>Xp(e)?new fj(t):new cj(t,{allowProjection:e!==y.Fragment}),hj=YP({...DR,...tj,...HO,...nj},dj),gn=dP(hj),pj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Bt=e=>{const[t,n]=e.split("-");return pj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const cS=y.createContext({}),mj={[B.Background]:"",[B.Border]:"initial",[B.TooltipText]:Bt("blue-700"),[B.TooltipBackground]:Bt("blue-100"),[B.TooltipBorder]:Bt("blue-500"),[B.HeaderBackground]:Bt("zink-600"),[B.HeaderBorder]:"initial",[B.HeaderText]:"white",[B.FooterBackground]:"",[B.FooterBorder]:"",[B.FooterText]:"",[B.MessageAdminBackground]:"",[B.MessageAdminText]:"",[B.MessageVisitorBackground]:"",[B.MessageVisitorText]:"",[B.GreeterBackground]:"white",[B.GreeterText]:"",[B.GreeterBorder]:"",[B.GreeterTopBackground]:Bt("zink-600"),[B.GreeterTopText]:"white",[B.GreeterButtonBackground]:Bt("blue-500"),[B.GreeterButtonText]:Bt("white"),[B.ButtonBackground]:Bt("blue-500"),[B.ButtonText]:Bt("white"),[B.InputBackground]:Bt("white"),[B.InputText]:Bt("gray-800"),[B.InputBorder]:Bt("slate-200")},gj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},yj=e=>{const t={...mj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function vj({children:e,widget:t}){const n=yj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>gj[r];return b.jsx(cS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const Ln=()=>y.useContext(cS);function Qn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=B.ButtonText,bgKey:c=B.ButtonBackground,animations:f={},withoutTheming:u,...d}){const h=Ln();return b.jsx(gn.button,{type:t,className:ze("flex items-center justify-center focus:!ring-0",{"rounded-full":o&&i!=="xs","rounded-md":!o},a,F2[n][r],L2[i][o?"rounded":"default"]),disabled:s,style:!u&&{color:h.getColor(l),backgroundColor:h.getColor(c),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function Me(){}Me.Home=function(t){return b.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:b.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};Me.Chat=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});Me.Menu=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});Me.MessageTyping=({className:e="size-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});Me.Check=function(t){return b.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:b.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};Me.Website=function(t){return b.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[b.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),b.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),b.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};Me.ArrowDown=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});Me.XCircle=({className:e="e-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});Me.X=({className:e="e-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});const Nn=Object.create(null);Nn.open="0";Nn.close="1";Nn.ping="2";Nn.pong="3";Nn.message="4";Nn.upgrade="5";Nn.noop="6";const Ml=Object.create(null);Object.keys(Nn).forEach(e=>{Ml[Nn[e]]=e});const oh={type:"error",data:"parser error"},fS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dS=typeof ArrayBuffer=="function",hS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cm=({type:e,data:t},n,r)=>fS&&t instanceof Blob?n?r(t):$y(t,r):dS&&(t instanceof ArrayBuffer||hS(t))?n?r(t):$y(new Blob([t]),r):r(Nn[e]+(t||"")),$y=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mf;function xj(e,t){if(fS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vy).then(t);if(dS&&(e.data instanceof ArrayBuffer||hS(e.data)))return t(Vy(e.data));cm(e,!1,n=>{mf||(mf=new TextEncoder),t(mf.encode(n))})}const By="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<By.length;e++)wo[By.charCodeAt(e)]=e;const wj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)s=wo[e.charCodeAt(r)],o=wo[e.charCodeAt(r+1)],a=wo[e.charCodeAt(r+2)],l=wo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return c},bj=typeof ArrayBuffer=="function",fm=(e,t)=>{if(typeof e!="string")return{type:"message",data:pS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sj(e.substring(1),t)}:Ml[n]?e.length>1?{type:Ml[n],data:e.substring(1)}:{type:Ml[n]}:oh},Sj=(e,t)=>{if(bj){const n=wj(e);return pS(n,t)}else return{base64:!0,data:e}},pS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mS="",Tj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{cm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mS))})})},Ej=(e,t)=>{const n=e.split(mS),r=[];for(let i=0;i<n.length;i++){const s=fm(n[i],t);if(r.push(s),s.type==="error")break}return r};function Cj(){return new TransformStream({transform(e,t){xj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let gf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function kj(e,t){gf||(gf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(oh);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(fm(s?l:gf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(oh);break}}}})}const gS=4;function je(e){if(e)return _j(e)}function _j(e){for(var t in je.prototype)e[t]=je.prototype[t];return e}je.prototype.on=je.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};je.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};je.prototype.off=je.prototype.removeListener=je.prototype.removeAllListeners=je.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};je.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};je.prototype.emitReserved=je.prototype.emit;je.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};je.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pj="arraybuffer";function yS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Aj=Gt.setTimeout,Rj=Gt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Aj.bind(Gt),e.clearTimeoutFn=Rj.bind(Gt)):(e.setTimeoutFn=Gt.setTimeout.bind(Gt),e.clearTimeoutFn=Gt.clearTimeout.bind(Gt))}const Oj=1.33;function jj(e){return typeof e=="string"?Mj(e):Math.ceil((e.byteLength||e.size)*Oj)}function Mj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Nj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Fj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dm extends je{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Fj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fm(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Nj(t);return n.length?"?"+n:""}}class Lj extends dm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ej(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xS=!1;try{xS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ij=xS;function $j(){}class Vj extends Lj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Mn extends je{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Mn.requestsCount++,Mn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$j,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Mn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Mn.requestsCount=0;Mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zy);else if(typeof addEventListener=="function"){const e="onpagehide"in Gt?"pagehide":"unload";addEventListener(e,zy,!1)}}function zy(){for(let e in Mn.requests)Mn.requests.hasOwnProperty(e)&&Mn.requests[e].abort()}const Bj=function(){const e=wS({xdomain:!1});return e&&e.responseType!==null}();class zj extends Vj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mn(wS,this.uri(),t)}}function wS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ij))return new XMLHttpRequest}catch{}if(!t)try{return new Gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uj extends dm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=bS?{}:yS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;cm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yf=Gt.WebSocket||Gt.MozWebSocket;class Hj extends Uj{createSocket(t,n,r){return bS?new yf(t,n,r):n?new yf(t,n):new yf(t)}doWrite(t,n){this.ws.send(n)}}class Wj extends dm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=kj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Cj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Kj={websocket:Hj,webtransport:Wj,polling:zj},qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ah(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qj.exec(e||""),s={},o=14;for(;o--;)s[Gj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Qj(s,s.path),s.queryKey=Yj(s,s.query),s}function Qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const lh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nl=[];lh&&addEventListener("offline",()=>{Nl.forEach(e=>e())},!1);class Lr extends je{constructor(t,n){if(super(),this.binaryType=Pj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=ah(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=ah(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dj(this.opts.query)),lh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=jj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),lh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nl.indexOf(this._offlineEventListener);r!==-1&&Nl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=gS;class Xj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=u=>{const d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zj=class extends Xj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Kj[i]).filter(i=>!!i)),super(t,r)}};function Jj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ah(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const eM=typeof ArrayBuffer=="function",tM=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,SS=Object.prototype.toString,nM=typeof Blob=="function"||typeof Blob<"u"&&SS.call(Blob)==="[object BlobConstructor]",rM=typeof File=="function"||typeof File<"u"&&SS.call(File)==="[object FileConstructor]";function hm(e){return eM&&(e instanceof ArrayBuffer||tM(e))||nM&&e instanceof Blob||rM&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function iM(e){const t=[],n=e.data,r=e;return r.data=uh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function uh(e,t){if(!e)return e;if(hm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=uh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=uh(e[r],t));return n}return e}function sM(e,t){return e.data=ch(e.data,t),delete e.attachments,e}function ch(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ch(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ch(e[n],t));return e}const oM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],aM=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class lM{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=iM(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Uy(e){return Object.prototype.toString.call(e)==="[object Object]"}class pm extends je{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new uM(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(hm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(pm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Uy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Uy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oM.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uM{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sM(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pm,Encoder:lM,get PacketType(){return te},protocol:aM},Symbol.toStringTag,{value:"Module"}));function cn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TS extends je{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(fM.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,u=n.pop();this._registerAckCallback(f,u),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Xs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Xs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Xs.prototype.reset=function(){this.attempts=0};Xs.prototype.setMin=function(e){this.ms=e};Xs.prototype.setMax=function(e){this.max=e};Xs.prototype.setJitter=function(e){this.jitter=e};class fh extends je{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cM;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=cn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=cn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new TS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const co={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=co[i]&&s in co[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new fh(r,t):(co[i]||(co[i]=new fh(r,t)),l=co[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:fh,Socket:TS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},ES=y.createContext(null),$i=()=>y.useContext(ES),dM=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const u=Fl(Tk,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});u.on("error",d=>{console.error("Websocket error",d)}),u.on("connect",()=>{n(u),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(u,d)=>{t&&t.on(u,d)},c=(u,d)=>{t&&t.off(u,d)},f=(u,d,h)=>{t&&t.emit(u,d,h)};return b.jsx(ES.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:c,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),at=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(at||{});const mm=e=>{const t=_w(),n=(r,i)=>{var o;const s=((o=_I.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},hM=()=>xw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),pM=e=>Ea(`clients/${e}/chats`),dh=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),mM=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),gM=()=>xw({mutationFn:e=>mM(e.rating,e.comment)}),CS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},gm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function kS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=en(),r=Ln();return b.jsxs(gn.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:ze("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(B.TooltipBackground),color:r.getColor(B.TooltipText)},children:[b.jsx(gn.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(B.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),b.jsx("div",{className:ze("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const yM="/notify.mp3",vf=async()=>{await new Audio(yM).play()};function vM({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=$i(),{isHaveChat:i,open:s}=en(),[o,a]=y.useState(0),[l,c]=y.useState(null),f=(u,d)=>{if(l&&clearInterval(l),u||!i||d===0||Number.isNaN(d)){window.document.title=n,c(null);return}const h=setInterval(()=>{if(u||!i||d===0||Number.isNaN(d)){window.document.title=n,clearInterval(h),c(null);return}const m=`${d} Yeni mesajınız var! - ${n}`;window.document.title!==m?window.document.title=m:window.document.title=n},1e3);return c(h),()=>{clearInterval(h),c(null)}};return y.useEffect(()=>f(s,o),[o,s]),y.useEffect(()=>{if(!r||!i||s)return;const u=()=>{!i||s||(a(d=>d+1),vf())};return r.on(at.MessageAgentCreate,u),r.on(at.ChatUserAssignee,vf),()=>{r.off(at.MessageAgentCreate,u),r.off(at.ChatUserAssignee,vf)}},[r,i,s]),!i||o===0?t?e:null:b.jsx(kS,{text:"Yeni mesajlar var!"})}function xM({children:e,defaultOpen:t,border:n}){var p,g,v,E;const r=$i(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=en(),[c]=y.useState(!0),f=mm(),u=ka(),d=Ln(),h=gm();y.useEffect(()=>{a&&u.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},w=()=>{s(!1),o(!1),dh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(at.Banned,w),()=>{r.off(at.Banned,w)}},[]),b.jsx("section",{className:"relative w-full h-full",children:b.jsxs(na,{children:[i&&b.jsx(gn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"22.5rem",height:h?"":((E=(v=l==null?void 0:l.appearance)==null?void 0:v.design)==null?void 0:E.height)||"32rem",left:h?"0":"",borderColor:d.getColor(B.Border)},className:ze("fixed z-300 rounded-md",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),b.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:b.jsxs(na,{children:[!i&&b.jsx(vM,{fallback:b.jsx(kS,{}),fallbackOpen:c}),!i&&b.jsxs(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[b.jsx(gn.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:ze("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(B.ButtonBackground)}}),b.jsx(Me.Chat,{className:"size-6"})]}),i&&!h&&b.jsx(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:b.jsx(Me.X,{className:"size-6"})})]})})]})})}function _S(e){const{widget:t}=en();return b.jsx(vj,{widget:t,children:b.jsx(xM,{...e})})}function Vi(e){this._maxSize=e,this.clear()}Vi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Vi.prototype.get=function(e){return this._values[e]};Vi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var wM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,PS=/^\d+$/,bM=/^\d/,SM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,TM=/^\s*(['"]?)(.*?)(\1)\s*$/,ym=512,Hy=new Vi(ym),Wy=new Vi(ym),Ky=new Vi(ym),Ti={Cache:Vi,split:hh,normalizePath:xf,setter:function(e){var t=xf(e);return Wy.get(e)||Wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=xf(e);return Ky.get(e)||Ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(vm(n)||PS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){EM(Array.isArray(e)?e:hh(e),t,n)}};function xf(e){return Hy.get(e)||Hy.set(e,hh(e).map(function(t){return t.replace(TM,"$2")}))}function hh(e){return e.match(wM)||[""]}function EM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(_M(i)&&(i='"'+i+'"'),a=vm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function vm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function CM(e){return e.match(bM)&&!e.match(PS)}function kM(e){return SM.test(e)}function _M(e){return!vm(e)&&(CM(e)||kM(e))}const PM=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(PM)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),xm=(e,t)=>Xu(e).join(t).toLowerCase(),AS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),AM=e=>Zu(AS(e)),RM=e=>xm(e,"_"),OM=e=>xm(e,"-"),jM=e=>Zu(xm(e," ")),MM=e=>Xu(e).map(Zu).join(" ");var wf={words:Xu,upperFirst:Zu,camelCase:AS,pascalCase:AM,snakeCase:RM,kebabCase:OM,sentenceCase:jM,titleCase:MM},wm={exports:{}};wm.exports=function(e){return RS(NM(e),e)};wm.exports.array=RS;function RS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=DM(t),a=FM(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(c,f,u){if(u.has(c)){var d;try{d=", node was:"+JSON.stringify(c)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),f=h.length){u.add(c);do{var m=h[--f];l(m,a.get(m),u)}while(f);u.delete(c)}r[--n]=c}}}function NM(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function DM(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function FM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var LM=wm.exports;const IM=Hs(LM),$M=Object.prototype.toString,VM=Error.prototype.toString,BM=RegExp.prototype.toString,zM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",UM=/^Symbol\((.*)\)(.*)$/;function HM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return HM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zM.call(e).replace(UM,"Symbol($1)");const r=$M.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+VM.call(e)+"]":r==="RegExp"?BM.call(e):null}function Ir(e,t){let n=qy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=qy(this[r],t);return s!==null?s:i},2)}function OS(e){return e==null?[]:[].concat(e)}let jS,MS,NS,WM=/\$\{\s*(\w+)\s*\}/g;jS=Symbol.toStringTag;class Gy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[jS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],OS(t).forEach(s=>{if(wt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}MS=Symbol.hasInstance;NS=Symbol.toStringTag;class wt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(WM,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Gy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[NS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,wt)}static[MS](t){return Gy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},pt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},KM={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ph={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},qM={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},GM={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},QM={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return wt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:pt,number:KM,date:ph,object:Il,array:GM,boolean:qM,tuple:QM});const bm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!bm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class Bi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Bi.prototype.__isYupRef=!0;const fi=e=>e==null;function Gi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:f,params:u,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:w=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return Bi.isRef(I)?I.getValue(n,m,x):I}function v(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},u,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new wt(wt.formatError(I.message||d,re),n,re.path,I.type||c,re.disableStackTrace);return ie.params=re,ie}const E=w?a:l;let S={path:r,parent:m,type:c,from:i.from,createError:v,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{wt.isError(I)?E(I):I?l(null):E(v())},k=I=>{wt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var M;if(j=f.call(S,n,S),typeof((M=j)==null?void 0:M.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function YM(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,c)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",d=c?parseInt(f,10):0;if(e.innerType||u){if(u&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=u?e.spec.types[d]:e.innerType}if(!c){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(Bi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function ds(e,t=new Map){if(bm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=ds(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,ds(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(ds(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=ds(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ds(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
95
+ `),()=>{document.head.removeChild(h)}},[t]),b.jsx($2,{isPresent:t,childRef:i,sizeRef:s,children:y.cloneElement(e,{ref:i})})}const B2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Rp(z2),c=y.useId();let f=!0,u=y.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&f&&(u={...u}),y.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=b.jsx(V2,{isPresent:n,anchorX:a,children:e})),b.jsx(Hu.Provider,{value:u,children:e})};function z2(){return new Map}function Iw(e=!0){const t=y.useContext(Hu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=y.useId();y.useEffect(()=>{if(e)return i(s)},[e]);const o=y.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ol=e=>e.key||"";function b0(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const na=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,c]=Iw(o),f=y.useMemo(()=>b0(e),[e]),u=o&&!l?[]:f.map(ol),d=y.useRef(!0),h=y.useRef(f),m=Rp(()=>new Map),[x,w]=y.useState(f),[p,g]=y.useState(f);Lw(()=>{d.current=!1,h.current=f;for(let S=0;S<p.length;S++){const C=ol(p[S]);u.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[p,u.length,u.join("-")]);const v=[];if(f!==x){let S=[...f];for(let C=0;C<p.length;C++){const k=p[C],P=ol(k);u.includes(P)||(S.splice(C,0,k),v.push(k))}return s==="wait"&&v.length&&(S=v),g(b0(S)),w(f),null}const{forceRender:E}=y.useContext(Ap);return b.jsx(b.Fragment,{children:p.map(S=>{const C=ol(S),k=o&&!l?!1:f===p||u.includes(C),P=()=>{if(m.has(C))m.set(C,!0);else return;let j=!0;m.forEach(M=>{M||(j=!1)}),j&&(E==null||E(),g(h.current),o&&(c==null||c()),r&&r())};return b.jsx(B2,{isPresent:k,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:k?void 0:P,anchorX:a,children:S},C)})})};function Mp(e,t){e.indexOf(t)===-1&&e.push(t)}function Np(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Vd=()=>{};const Bd={skipAnimations:!1,useManualTiming:!1};function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xt=e=>e,ra=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fp{constructor(){this.subscriptions=[]}add(t){return Mp(this.subscriptions,t),()=>Np(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 s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=e=>e*1e3,Rn=e=>e/1e3;function $w(e,t){return t?e*(1e3/t):0}const U2=Dp(()=>window.ScrollTimeline!==void 0);class H2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(U2()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class W2 extends H2{then(t,n){return this.finished.finally(t).then(()=>{})}}const S0={value:null,addProjectionMetrics:null},Lp=e=>Array.isArray(e)&&typeof e[0]=="number",K2={};function q2(e,t){const n=Dp(e);return()=>K2[t]??n()}const ia=q2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vw=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},vo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,zd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vo([0,.65,.55,1]),circOut:vo([.55,0,1,.45]),backIn:vo([.31,.01,.66,-.59]),backOut:vo([.33,1.53,.69,.99])};function Bw(e,t){if(e)return typeof e=="function"&&ia()?Vw(e,t):Lp(e)?vo(e):Array.isArray(e)?e.map(n=>Bw(n,t)||zd.easeOut):zd[e]}function G2(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},c=void 0){const f={[t]:n};l&&(f.offset=l);const u=Bw(a,i);return Array.isArray(u)&&(f.easing=u),e.animate(f,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal",pseudoElement:c})}function Ip(e){return typeof e=="function"&&"applyToOptions"in e}function $p(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const mu=2e4;function Vp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mu;)t+=n,r=e.next(t);return t>=mu?1/0:t}function Q2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Vp(r),mu);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rn(i)}}function zw(e){return!!(typeof e=="function"&&ia()||!e||typeof e=="string"&&(e in zd||ia())||Lp(e)||Array.isArray(e)&&e.every(zw))}function T0(e,t){e.timeline=t,e.onfinish=null}const al=["read","resolveKeyframes","update","preRender","render","postRender"];function Y2(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(u){o.has(u)&&(f.schedule(u),e()),l++,u(a)}const f={schedule:(u,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),t&&S0.value&&S0.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,f.process(u))}};return f}const X2=40;function Uw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=al.reduce((p,g)=>(p[g]=Y2(s,t?g:void 0),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:f,render:u,postRender:d}=o,h=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,X2),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),f.process(i),u.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:al.reduce((p,g)=>{const v=o[g];return p[g]=(E,S=!1,C=!1)=>(n||m(),v.schedule(E,S,C)),p},{}),cancel:p=>{for(let g=0;g<al.length;g++)o[al[g]].cancel(p)},state:i,steps:o}}const{schedule:Bp,cancel:DI}=Uw(queueMicrotask,!1),{schedule:he,cancel:zr,state:qe,steps:tf}=Uw(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xt,!0);let Rl;function Z2(){Rl=void 0}const On={now:()=>(Rl===void 0&&On.set(qe.isProcessing||Bd.useManualTiming?qe.timestamp:performance.now()),Rl),set:e=>{Rl=e,queueMicrotask(Z2)}},on={x:!1,y:!1};function Hw(){return on.x||on.y}function J2(e){return e==="x"||e==="y"?on[e]?null:(on[e]=!0,()=>{on[e]=!1}):on.x||on.y?null:(on.x=on.y=!0,()=>{on.x=on.y=!1})}function eP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ww(e,t){const n=eP(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function E0(e){return!(e.pointerType==="touch"||Hw())}function tP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{if(!E0(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const f=u=>{E0(u)&&(c(u),l.removeEventListener("pointerleave",f))};l.addEventListener("pointerleave",f,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Kw=(e,t)=>t?e===t?!0:Kw(e,t.parentElement):!1,zp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,nP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rP(e){return nP.has(e.tagName)||e.tabIndex!==-1}const xo=new WeakSet;function C0(e){return t=>{t.key==="Enter"&&e(t)}}function nf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=C0(()=>{if(xo.has(n))return;nf(n,"down");const i=C0(()=>{nf(n,"up")}),s=()=>nf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function k0(e){return zp(e)&&!Hw()}function sP(e,t,n={}){const[r,i,s]=Ww(e,n),o=a=>{const l=a.currentTarget;if(!k0(a)||xo.has(l))return;xo.add(l);const c=t(l,a),f=(h,m)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",d),!(!k0(h)||!xo.has(l))&&(xo.delete(l),typeof c=="function"&&c(h,{success:m}))},u=h=>{f(h,l===window||l===document||n.useGlobalTarget||Kw(l,h.target))},d=h=>{f(h,!1)};window.addEventListener("pointerup",u,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>iP(c,i)),!rP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}const _0=30,oP=e=>!isNaN(parseFloat(e));class aP{constructor(t,n={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=On.now();this.updatedAt!==s&&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.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fp);const r=this.events[t].add(n);return t==="change"?()=>{r(),he.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=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_0);return $w(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 sa(e,t){return new aP(e,t)}const qw=y.createContext({strict:!1}),P0={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"]},Bs={};for(const e in P0)Bs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function lP(e){for(const t in e)Bs[t]={...Bs[t],...e[t]}}const uP=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 gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let Gw=e=>!gu(e);function cP(e){e&&(Gw=t=>t.startsWith("on")?!gu(t):e(t))}try{cP(require("@emotion/is-prop-valid").default)}catch{}function fP(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Gw(i)||n===!0&&gu(i)||!t&&!gu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function dP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wu=y.createContext({});function Ku(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oa(e){return typeof e=="string"||Array.isArray(e)}const Up=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hp=["initial",...Up];function qu(e){return Ku(e.animate)||Hp.some(t=>oa(e[t]))}function Qw(e){return!!(qu(e)||e.variants)}function hP(e,t){if(qu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oa(n)?n:void 0,animate:oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function pP(e){const{initial:t,animate:n}=hP(e,y.useContext(Wu));return y.useMemo(()=>({initial:t,animate:n}),[A0(t),A0(n)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const mP=Symbol.for("motionComponentSymbol");function as(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gP(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):as(n)&&(n.current=r))},[t])}const Wp=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yP="framerAppearId",Yw="data-"+Wp(yP),Xw=y.createContext({});function vP(e,t,n,r,i){var x,w;const{visualElement:s}=y.useContext(Wu),o=y.useContext(qw),a=y.useContext(Hu),l=y.useContext(jp).reducedMotion,c=y.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const f=c.current,u=y.useContext(Xw);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&xP(c.current,n,i,u);const d=y.useRef(!1);y.useInsertionEffect(()=>{f&&d.current&&f.update(n,a)});const h=n[Yw],m=y.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,h)));return Lw(()=>{f&&(d.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Bp.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),m.current=!1))}),f}function xP(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zw(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&as(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:l,layoutRoot:c})}function Zw(e){if(e)return e.options.allowProjection!==!1?e.projection:Zw(e.parent)}function wP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&lP(e);function s(a,l){let c;const f={...y.useContext(jp),...a,layoutId:bP(a)},{isStatic:u}=f,d=pP(a),h=r(a,u);if(!u&&Op){SP();const m=TP(f);c=m.MeasureLayout,d.visualElement=vP(i,h,f,t,m.ProjectionNode)}return b.jsxs(Wu.Provider,{value:d,children:[c&&d.visualElement?b.jsx(c,{visualElement:d.visualElement,...f}):null,n(i,a,gP(h,d.visualElement,l),h,u,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=y.forwardRef(s);return o[mP]=i,o}function bP({layoutId:e}){const t=y.useContext(Ap).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){y.useContext(qw).strict}function TP(e){const{drag:t,layout:n}=Bs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Jw=e=>t=>typeof t=="string"&&t.startsWith(e),Kp=Jw("--"),EP=Jw("var(--"),qp=e=>EP(e)?CP.test(e.split("/*")[0].trim()):!1,CP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,aa={};function kP(e){for(const t in e)aa[t]=e[t],Kp(t)&&(aa[t].isCSSVariable=!0)}const Qs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ii=new Set(Qs);function eb(e,{layout:t,layoutId:n}){return Ii.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const nt=e=>!!(e&&e.getVelocity),tb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,tr=(e,t,n)=>n>t?t:n<e?e:n,Ys={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},la={...Ys,transform:e=>tr(0,1,e)},ll={...Ys,default:1},_a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ur=_a("deg"),jn=_a("%"),K=_a("px"),_P=_a("vh"),PP=_a("vw"),R0={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},AP={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},RP={rotate:ur,rotateX:ur,rotateY:ur,rotateZ:ur,scale:ll,scaleX:ll,scaleY:ll,scaleZ:ll,skew:ur,skewX:ur,skewY:ur,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:la,originX:R0,originY:R0,originZ:K},O0={...Ys,transform:Math.round},Gp={...AP,...RP,zIndex:O0,size:K,fillOpacity:la,strokeOpacity:la,numOctaves:O0},OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jP=Qs.length;function MP(e,t,n){let r="",i=!0;for(let s=0;s<jP;s++){const o=Qs[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=tb(a,Gp[o]);if(!l){i=!1;const f=OP[o]||o;r+=`${f}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Qp(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Ii.has(l)){o=!0;continue}else if(Kp(l)){i[l]=c;continue}else{const f=tb(c,Gp[l]);l.startsWith("origin")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=MP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:f=0}=s;r.transformOrigin=`${l} ${c} ${f}`}}const Yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nb(e,t,n){for(const r in t)!nt(t[r])&&!eb(r,n)&&(e[r]=t[r])}function NP({transformTemplate:e},t){return y.useMemo(()=>{const n=Yp();return Qp(n,t,e),Object.assign({},n.vars,n.style)},[t])}function DP(e,t){const n=e.style||{},r={};return nb(r,n,e),Object.assign(r,NP(e,t)),r}function FP(e,t){const n={},r=DP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["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 Xp(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const IP={offset:"stroke-dashoffset",array:"stroke-dasharray"},$P={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?IP:$P;e[s.offset]=K.transform(-r);const o=K.transform(t),a=K.transform(n);e[s.array]=`${o} ${a}`}function j0(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function BP(e,t,n){const r=j0(t,e.x,e.width),i=j0(n,e.y,e.height);return`${r} ${i}`}function Zp(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,u){if(Qp(e,c,u),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:m}=e;d.transform&&(m&&(h.transform=d.transform),delete d.transform),m&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=BP(m,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&VP(d,o,a,l,!1)}const rb=()=>({...Yp(),attrs:{}}),Jp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zP(e,t,n,r){const i=y.useMemo(()=>{const s=rb();return Zp(s,t,Jp(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nb(s,e.style,e),i.style={...s,...i.style}}return i}function UP(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Xp(n)?zP:FP)(r,s,o,n),c=fP(r,typeof n=="string",e),f=n!==y.Fragment?{...c,...l,ref:i}:{},{children:u}=r,d=y.useMemo(()=>nt(u)?u.get():u,[u]);return y.createElement(n,{...f,children:d})}}function M0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function em(e,t,n,r){if(typeof t=="function"){const[i,s]=M0(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=M0(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const Ud=e=>Array.isArray(e),HP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WP=e=>Ud(e)?e[e.length-1]||0:e;function Ol(e){const t=nt(e)?e.get():e;return HP(t)?t.toValue():t}function KP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:qP(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ib=e=>(t,n)=>{const r=y.useContext(Wu),i=y.useContext(Hu),s=()=>KP(e,t,r,i);return n?s():Rp(s)};function qP(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Ol(s[d]);let{initial:o,animate:a}=e;const l=qu(e),c=Qw(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const u=f?a:o;if(u&&typeof u!="boolean"&&!Ku(u)){const d=Array.isArray(u)?u:[u];for(let h=0;h<d.length;h++){const m=em(e,d[h]);if(m){const{transitionEnd:x,transition:w,...p}=m;for(const g in p){let v=p[g];if(Array.isArray(v)){const E=f?v.length-1:0;v=v[E]}v!==null&&(i[g]=v)}for(const g in x)i[g]=x[g]}}}return i}function tm(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(nt(r[o])||t.style&&nt(t.style[o])||eb(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const GP={useVisualState:ib({scrapeMotionValuesFromProps:tm,createRenderState:Yp})};function sb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ob(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ab=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 lb(e,t,n,r){ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ab.has(i)?i:Wp(i),t.attrs[i])}function ub(e,t,n){const r=tm(e,t,n);for(const i in e)if(nt(e[i])||nt(t[i])){const s=Qs.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const N0=["x","y","width","height","cx","cy","r"],QP={useVisualState:ib({scrapeMotionValuesFromProps:ub,createRenderState:rb,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(Ii.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<N0.length;a++){const l=N0[a];e[l]!==t[l]&&(o=!0)}o&&he.read(()=>{sb(n,r),he.render(()=>{Zp(r,i,Jp(n.tagName),e.transformTemplate),lb(n,r)})})}})};function YP(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Xp(r)?QP:GP,preloadedFeatures:e,useRender:UP(i),createVisualElement:t,Component:r};return wP(o)}}function ua(e,t,n){const r=e.getProps();return em(r,t,n!==void 0?n:r.custom,e)}const cb=new Set(["width","height","top","left","right","bottom",...Qs]);function XP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sa(n))}function ZP(e,t){const n=ua(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=WP(s[o]);XP(e,o,a)}}function JP(e){return!!(nt(e)&&e.add)}function Hd(e,t){const n=e.getValue("willChange");if(JP(n))return n.add(t);if(!n&&Bd.WillChange){const r=new Bd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fb(e){return e.props[Yw]}const db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=db(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>eA&&++a<tA);return o}function Pa(e,t,n,r){if(e===t&&n===r)return Xt;const i=s=>nA(s,0,1,e,n);return s=>s===0||s===1?s:db(i(s),t,r)}const hb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pb=e=>t=>1-e(1-t),mb=Pa(.33,1.53,.69,.99),nm=pb(mb),gb=hb(nm),yb=e=>(e*=2)<1?.5*nm(e):.5*(2-Math.pow(2,-10*(e-1))),rm=e=>1-Math.sin(Math.acos(e)),vb=pb(rm),xb=hb(rm),wb=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wb(e):!0}const Ro=e=>Math.round(e*1e5)/1e5,im=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iA(e){return e==null}const sA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sm=(e,t)=>n=>!!(typeof n=="string"&&sA.test(n)&&n.startsWith(e)||t&&!iA(n)&&Object.prototype.hasOwnProperty.call(n,t)),bb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(im);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},oA=e=>tr(0,255,e),rf={...Ys,transform:e=>Math.round(oA(e))},ui={test:sm("rgb","red"),parse:bb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+rf.transform(e)+", "+rf.transform(t)+", "+rf.transform(n)+", "+Ro(la.transform(r))+")"};function aA(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 Wd={test:sm("#"),parse:aA,transform:ui.transform},ls={test:sm("hsl","hue"),parse:bb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jn.transform(Ro(t))+", "+jn.transform(Ro(n))+", "+Ro(la.transform(r))+")"},et={test:e=>ui.test(e)||Wd.test(e)||ls.test(e),parse:e=>ui.test(e)?ui.parse(e):ls.test(e)?ls.parse(e):Wd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ui.transform(e):ls.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(im))==null?void 0:t.length)||0)+(((n=e.match(lA))==null?void 0:n.length)||0)>0}const Sb="number",Tb="color",cA="var",fA="var(",D0="${}",dA=/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 ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(dA,l=>(et.test(l)?(r.color.push(s),i.push(Tb),n.push(et.parse(l))):l.startsWith(fA)?(r.var.push(s),i.push(cA),n.push(l)):(r.number.push(s),i.push(Sb),n.push(parseFloat(l))),++s,D0)).split(D0);return{values:n,split:a,indexes:r,types:i}}function Eb(e){return ca(e).values}function Cb(e){const{split:t,types:n}=ca(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Sb?s+=Ro(i[o]):a===Tb?s+=et.transform(i[o]):s+=i[o]}return s}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=Eb(e);return Cb(e)(t.map(hA))}const Ur={test:uA,parse:Eb,createTransformer:Cb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(im)||[];if(!r)return e;const i=n.replace(r,"");let s=mA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Kd={...Ur,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},vA={...Gp,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Kd,WebkitFilter:Kd},kb=e=>vA[e];function _b(e,t){let n=kb(e);return n!==Kd&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const xA=new Set(["auto","none","0"]);function wA(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!xA.has(s)&&ca(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_b(n,i)}const ci=e=>e*180/Math.PI,qd=e=>{const t=ci(Math.atan2(e[1],e[0]));return Gd(t)},bA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qd,rotateZ:qd,skewX:e=>ci(Math.atan(e[1])),skewY:e=>ci(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Gd=e=>(e=e%360,e<0&&(e+=360),e),F0=qd,L0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),I0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:L0,scaleY:I0,scale:e=>(L0(e)+I0(e))/2,rotateX:e=>Gd(ci(Math.atan2(e[6],e[5]))),rotateY:e=>Gd(ci(Math.atan2(-e[2],e[0]))),rotateZ:F0,rotate:F0,skewX:e=>ci(Math.atan(e[4])),skewY:e=>ci(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function $0(e){return e.includes("scale")?1:0}function Qd(e,t){if(!e||e==="none")return $0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SA,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=bA,i=a}if(!i)return $0(t);const s=r[t],o=i[1].split(",").map(EA);return typeof s=="function"?s(o):o[s]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qd(n,t)};function EA(e){return parseFloat(e.trim())}const V0=e=>e===Ys||e===K,CA=new Set(["x","y","z"]),kA=Qs.filter(e=>!CA.has(e));function _A(e){const t=[];return kA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const zs={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:(e,{transform:t})=>Qd(t,"x"),y:(e,{transform:t})=>Qd(t,"y")};zs.translateX=zs.x;zs.translateY=zs.y;const Si=new Set;let Yd=!1,Xd=!1;function Pb(){if(Xd){const e=Array.from(Si).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=_A(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(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xd=!1,Yd=!1,Si.forEach(e=>e.complete()),Si.clear()}function Ab(){Si.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xd=!0)})}function PA(){Ab(),Pb()}class om{constructor(t,n,r,i,s,o=!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=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Si.add(this),Yd||(Yd=!0,he.read(Ab),he.resolveKeyframes(Pb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Si.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Si.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function RA(e){const t=AA.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Ob(e,t,n=1){const[r,i]=RA(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Rb(o)?parseFloat(o):o}return qp(i)?Ob(i,t,n+1):i}const jb=e=>t=>t.test(e),OA={test:e=>e==="auto",parse:e=>e},Mb=[Ys,K,jn,ur,PP,_P,OA],B0=e=>Mb.find(jb(e));class Nb extends om{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),qp(c))){const f=Ob(c,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cb.has(r)||t.length!==2)return;const[i,s]=t,o=B0(i),a=B0(s);if(o!==a)if(V0(o)&&V0(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)rA(t[i])&&r.push(i);r.length&&wA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=zs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=zs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const z0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function jA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function MA(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=z0(i,t),a=z0(s,t);return!o||!a?!1:jA(e)||(n==="spring"||Ip(n))&&r}const NA=e=>e!==null;function Gu(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(NA),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const DA=40;class Db{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=On.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>DA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=On.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!MA(t,r,i,s))if(o)this.options.duration=0;else{l&&l(Gu(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const be=(e,t,n)=>e+(t-e)*n;function sf(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 FA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=sf(l,a,e+1/3),s=sf(l,a,e),o=sf(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function yu(e,t){return n=>n>0?t:e}const of=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LA=[Wd,ui,ls],IA=e=>LA.find(t=>t.test(e));function U0(e){const t=IA(e);if(!t)return!1;let n=t.parse(e);return t===ls&&(n=FA(n)),n}const H0=(e,t)=>{const n=U0(e),r=U0(t);if(!n||!r)return yu(e,t);const i={...n};return s=>(i.red=of(n.red,r.red,s),i.green=of(n.green,r.green,s),i.blue=of(n.blue,r.blue,s),i.alpha=be(n.alpha,r.alpha,s),ui.transform(i))},$A=(e,t)=>n=>t(e(n)),Aa=(...e)=>e.reduce($A),Zd=new Set(["none","hidden"]);function VA(e,t){return Zd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>be(e,t,n)}function am(e){return typeof e=="number"?BA:typeof e=="string"?qp(e)?yu:et.test(e)?H0:HA:Array.isArray(e)?Fb:typeof e=="object"?et.test(e)?H0:zA:yu}function Fb(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>am(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function zA(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=am(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function UA(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const HA=(e,t)=>{const n=Ur.createTransformer(t),r=ca(e),i=ca(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?Zd.has(e)&&!i.values.length||Zd.has(t)&&!r.values.length?VA(e,t):Aa(Fb(UA(r,i),i.values),n):yu(e,t)};function Lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?be(e,t,n):am(e)(e,t)}const WA=5;function Ib(e,t,n){const r=Math.max(t-WA,0);return $w(n-e(r),t-r)}const Ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},af=.001;function KA({duration:e=Ce.duration,bounce:t=Ce.bounce,velocity:n=Ce.velocity,mass:r=Ce.mass}){let i,s,o=1-t;o=tr(Ce.minDamping,Ce.maxDamping,o),e=tr(Ce.minDuration,Ce.maxDuration,Rn(e)),o<1?(i=c=>{const f=c*o,u=f*e,d=f-n,h=Jd(c,o),m=Math.exp(-u);return af-d/h*m},s=c=>{const u=c*o*e,d=u*n+n,h=Math.pow(o,2)*Math.pow(c,2)*e,m=Math.exp(-u),x=Jd(Math.pow(c,2),o);return(-i(c)+af>0?-1:1)*((d-h)*m)/x}):(i=c=>{const f=Math.exp(-c*e),u=(c-n)*e+1;return-af+f*u},s=c=>{const f=Math.exp(-c*e),u=(n-c)*(e*e);return f*u});const a=5/e,l=GA(i,s,a);if(e=An(e),isNaN(l))return{stiffness:Ce.stiffness,damping:Ce.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const qA=12;function GA(e,t,n){let r=n;for(let i=1;i<qA;i++)r=r-e(r)/t(r);return r}function Jd(e,t){return e*Math.sqrt(1-t*t)}const QA=["duration","bounce"],YA=["stiffness","damping","mass"];function W0(e,t){return t.some(n=>e[n]!==void 0)}function XA(e){let t={velocity:Ce.velocity,stiffness:Ce.stiffness,damping:Ce.damping,mass:Ce.mass,isResolvedFromDuration:!1,...e};if(!W0(e,YA)&&W0(e,QA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*tr(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ce.mass,stiffness:i,damping:s}}else{const n=KA(e);t={...t,...n,mass:Ce.mass},t.isResolvedFromDuration=!0}return t}function vu(e=Ce.visualDuration,t=Ce.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:f,duration:u,velocity:d,isResolvedFromDuration:h}=XA({...n,velocity:-Rn(n.velocity||0)}),m=d||0,x=c/(2*Math.sqrt(l*f)),w=o-s,p=Rn(Math.sqrt(l/f)),g=Math.abs(w)<5;r||(r=g?Ce.restSpeed.granular:Ce.restSpeed.default),i||(i=g?Ce.restDelta.granular:Ce.restDelta.default);let v;if(x<1){const S=Jd(p,x);v=C=>{const k=Math.exp(-x*p*C);return o-k*((m+x*p*w)/S*Math.sin(S*C)+w*Math.cos(S*C))}}else if(x===1)v=S=>o-Math.exp(-p*S)*(w+(m+p*w)*S);else{const S=p*Math.sqrt(x*x-1);v=C=>{const k=Math.exp(-x*p*C),P=Math.min(S*C,300);return o-k*((m+x*p*w)*Math.sinh(P)+S*w*Math.cosh(P))/S}}const E={calculatedDuration:h&&u||null,next:S=>{const C=v(S);if(h)a.done=S>=u;else{let k=0;x<1&&(k=S===0?An(m):Ib(v,S,C));const P=Math.abs(k)<=r,j=Math.abs(o-C)<=i;a.done=P&&j}return a.value=a.done?o:C,a},toString:()=>{const S=Math.min(Vp(E),mu),C=Vw(k=>E.next(S*k).value,S,30);return S+"ms "+C},toTransition:()=>{}};return E}vu.applyToOptions=e=>{const t=Q2(e,100,vu);return e.ease=ia()?t.ease:"easeOut",e.duration=An(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const u=e[0],d={done:!1,value:u},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let x=n*t;const w=u+x,p=o===void 0?w:o(w);p!==w&&(x=p-u);const g=P=>-x*Math.exp(-P/r),v=P=>p+g(P),E=P=>{const j=g(P),M=v(P);d.done=Math.abs(j)<=c,d.value=d.done?p:M};let S,C;const k=P=>{h(d.value)&&(S=P,C=vu({keyframes:[d.value,m(d.value)],velocity:Ib(v,P,d.value),damping:i,stiffness:s,restDelta:c,restSpeed:f}))};return k(0),{calculatedDuration:null,next:P=>{let j=!1;return!C&&S===void 0&&(j=!0,E(P),k(P)),S!==void 0&&P>=S?C.next(P-S):(!j&&E(P),d)}}}const ZA=Pa(.42,0,1,1),JA=Pa(0,0,.58,1),$b=Pa(.42,0,.58,1),eR=e=>Array.isArray(e)&&typeof e[0]!="number",q0={linear:Xt,easeIn:ZA,easeInOut:$b,easeOut:JA,circIn:rm,circInOut:xb,circOut:vb,backIn:nm,backInOut:gb,backOut:mb,anticipate:yb},G0=e=>{if(Lp(e)){Vd(e.length===4);const[t,n,r,i]=e;return Pa(t,n,r,i)}else if(typeof e=="string")return Vd(q0[e]!==void 0),q0[e];return e};function tR(e,t,n){const r=[],i=n||Lb,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Xt:t;a=Aa(l,a)}r.push(a)}return r}function nR(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Vd(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=tR(t,r,i),l=a.length,c=f=>{if(o&&f<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(f<e[u+1]);u++);const d=ra(e[u],e[u+1],f);return a[u](d)};return n?f=>c(tr(e[0],e[s-1],f)):c}function rR(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ra(0,t,r);e.push(be(n,1,i))}}function iR(e){const t=[0];return rR(t,e.length-1),t}function sR(e,t){return e.map(n=>n*t)}function oR(e,t){return e.map(()=>t||$b).splice(0,e.length-1)}function xu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=eR(r)?r.map(G0):G0(r),s={done:!1,value:t[0]},o=sR(n&&n.length===t.length?n:iR(t),e),a=nR(o,t,{ease:Array.isArray(i)?i:oR(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const aR=e=>{const t=({timestamp:n})=>e(n);return{start:()=>he.update(t,!0),stop:()=>zr(t),now:()=>qe.isProcessing?qe.timestamp:On.now()}},lR={decay:K0,inertia:K0,tween:xu,keyframes:xu,spring:vu},uR=e=>e/100;class lm extends Db{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,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:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||om,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=Ip(n)?n:lR[n]||xu;let l,c;a!==xu&&typeof t[0]!="number"&&(l=Aa(uR,Lb(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=Vp(f));const{calculatedDuration:u}=f,d=u+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:u,resolvedDuration:d,totalDuration:h}}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:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:f,resolvedDuration:u}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:m,repeatDelay:x,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/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 p=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>f;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let v=this.currentTime,E=s;if(h){const P=Math.min(this.currentTime,f)/u;let j=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&j--,j=Math.min(j,h+1),!!(j%2)&&(m==="reverse"?(M=1-M,x&&(M-=x/u)):m==="mirror"&&(E=o)),v=tr(0,1,M)*u}const S=g?{done:!1,value:l[0]}:E.next(v);a&&(S.value=a(S.value));let{done:C}=S;!g&&c!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(S.value=Gu(l,this.options,i)),w&&w(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Rn(t.calculatedDuration):0}get time(){return Rn(this.currentTime)}set time(t){t=An(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=Rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aR,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const cR=new Set(["opacity","clipPath","filter","transform"]),fR=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wu=10,dR=2e4;function hR(e){return Ip(e.type)||e.type==="spring"||!zw(e.ease)}function pR(e,t){const n=new lm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<dR;)r=n.sample(s),i.push(r.value),s+=wu;return{times:void 0,keyframes:i,duration:s-wu,ease:"linear"}}const Vb={anticipate:yb,backInOut:gb,circInOut:xb};function mR(e){return e in Vb}class Q0 extends Db{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Nb(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ia()&&mR(s)&&(s=Vb[s]),hR(this.options)){const{onComplete:u,onUpdate:d,motionValue:h,element:m,...x}=this.options,w=pR(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,i=w.times,s=w.ease,o="keyframes"}const f=G2(a.owner.current,l,t,{...this.options,duration:r,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(T0(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:u}=this.options;a.set(Gu(t,this.options,n)),u&&u(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=An(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}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}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xt;const{animation:r}=n;T0(r,t)}return Xt}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;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:f,onComplete:u,element:d,...h}=this.options,m=new lm({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),x=An(this.time);c.setWithVelocity(m.sample(x-wu).value,m.sample(x).value,wu)}const{onStop:l}=this.options;l&&l(),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:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return fR()&&r&&cR.has(r)&&(r!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const gR={type:"spring",stiffness:500,damping:25,restSpeed:10},yR=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vR={type:"keyframes",duration:.8},xR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?vR:Ii.has(e)?e.startsWith("scale")?yR(t[1]):gR:xR;function bR({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const um=(e,t,n,r={},i,s)=>o=>{const a=$p(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-An(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bR(a)||(f={...f,...wR(e,f)}),f.duration&&(f.duration=An(f.duration)),f.repeatDelay&&(f.repeatDelay=An(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let u=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(u=!0)),f.allowFlatten=!a.type&&!a.ease,u&&!s&&t.get()!==void 0){const d=Gu(f.keyframes,a);if(d!==void 0)return he.update(()=>{f.onUpdate(d),f.onComplete()}),new W2([])}return!s&&Q0.supports(f)?new Q0(f):new lm(f)};function SR({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const u=e.getValue(f,e.latestValues[f]??null),d=a[f];if(d===void 0||c&&SR(c,f))continue;const h={delay:n,...$p(s||{},f)};let m=!1;if(window.MotionHandoffAnimation){const w=fb(e);if(w){const p=window.MotionHandoffAnimation(w,f,he);p!==null&&(h.startTime=p,m=!0)}}Hd(e,f),u.start(um(f,u,d,e.shouldReduceMotion&&cb.has(f)?{type:!1}:h,e,m));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{he.update(()=>{o&&ZP(e,o)})}),l}function eh(e,t,n={}){var l;const r=ua(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Bb(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return TR(e,t,f+c,u,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,f]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(n.delay)])}function TR(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(ER).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(eh(c,t,{...s,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function ER(e,t){return e.sortNodePosition(t)}function CR(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>eh(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=eh(e,t,n);else{const i=typeof t=="function"?ua(e,t,n.custom):t;r=Promise.all(Bb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const kR=Hp.length;function Ub(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ub(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kR;n++){const r=Hp[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}const _R=[...Up].reverse(),PR=Up.length;function AR(e){return t=>Promise.all(t.map(({animation:n,options:r})=>CR(e,n,r)))}function RR(e){let t=AR(e),n=Y0(),r=!0;const i=l=>(c,f)=>{var d;const u=ua(e,f,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(u){const{transition:h,transitionEnd:m,...x}=u;c={...c,...x,...m}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,f=Ub(e.parent)||{},u=[],d=new Set;let h={},m=1/0;for(let w=0;w<PR;w++){const p=_R[w],g=n[p],v=c[p]!==void 0?c[p]:f[p],E=oa(v),S=p===l?g.isActive:null;S===!1&&(m=w);let C=v===f[p]&&v!==c[p]&&E;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),g.protectedKeys={...h},!g.isActive&&S===null||!v&&!g.prevProp||Ku(v)||typeof v=="boolean")continue;const k=OR(g.prevProp,v);let P=k||p===l&&g.isActive&&!C&&E||w>m&&E,j=!1;const M=Array.isArray(v)?v:[v];let I=M.reduce(i(p),{});S===!1&&(I={});const{prevResolvedValues:re={}}=g,ie={...re,...I},xe=ne=>{P=!0,d.has(ne)&&(j=!0,d.delete(ne)),g.needsAnimating[ne]=!0;const O=e.getValue(ne);O&&(O.liveStyle=!1)};for(const ne in ie){const O=I[ne],L=re[ne];if(h.hasOwnProperty(ne))continue;let z=!1;Ud(O)&&Ud(L)?z=!zb(O,L):z=O!==L,z?O!=null?xe(ne):d.add(ne):O!==void 0&&d.has(ne)?xe(ne):g.protectedKeys[ne]=!0}g.prevProp=v,g.prevResolvedValues=I,g.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&k)||j)&&u.push(...M.map(ne=>({animation:ne,options:{type:p}})))}if(d.size){const w={};if(typeof c.initial!="boolean"){const p=ua(e,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(w.transition=p.transition)}d.forEach(p=>{const g=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),w[p]=g??null}),u.push({animation:w})}let x=!!u.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(u):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)==null||u.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y0(),r=!0}}}function OR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zb(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jR extends Gr{constructor(t){super(t),t.animationState||(t.animationState=RR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ku(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let MR=0;class NR extends Gr{constructor(){super(...arguments),this.id=MR++}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,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DR={animation:{Feature:jR},exit:{Feature:NR}};function fa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const FR=e=>t=>zp(t)&&e(t,Ra(t));function Oo(e,t,n,r){return fa(e,t,FR(n),r)}function Hb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IR(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}}const Wb=1e-4,$R=1-Wb,VR=1+Wb,Kb=.01,BR=0-Kb,zR=0+Kb;function lt(e){return e.max-e.min}function UR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=lt(n)/lt(t),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$R&&e.scale<=VR||isNaN(e.scale))&&(e.scale=1),(e.translate>=BR&&e.translate<=zR||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n){e.min=n.min+t.min,e.max=e.min+lt(t)}function HR(e,t,n){Z0(e.x,t.x,n.x),Z0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+lt(t)}function Mo(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}const ey=()=>({translate:0,scale:1,origin:0,originPoint:0}),us=()=>({x:ey(),y:ey()}),ty=()=>({min:0,max:0}),Pe=()=>({x:ty(),y:ty()});function Ut(e){return[e("x"),e("y")]}function lf(e){return e===void 0||e===1}function th({scale:e,scaleX:t,scaleY:n}){return!lf(e)||!lf(t)||!lf(n)}function ni(e){return th(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function bu(e,t,n){const r=e-n,i=t*r;return n+i}function ry(e,t,n,r,i){return i!==void 0&&(e=bu(e,i,r)),bu(e,n,r)+t}function nh(e,t=0,n=1,r,i){e.min=ry(e.min,t,n,r,i),e.max=ry(e.max,t,n,r,i)}function Gb(e,{x:t,y:n}){nh(e.x,t.translate,t.scale,t.originPoint),nh(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,sy=1.0000000000001;function WR(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&fs(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Gb(e,o)),r&&ni(s.latestValues)&&fs(e,s.latestValues))}t.x<sy&&t.x>iy&&(t.x=1),t.y<sy&&t.y>iy&&(t.y=1)}function cs(e,t){e.min=e.min+t,e.max=e.max+t}function oy(e,t,n,r,i=.5){const s=be(e.min,e.max,i);nh(e,t,n,s,r)}function fs(e,t){oy(e.x,t.x,t.scaleX,t.scale,t.originX),oy(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Hb(IR(e.getBoundingClientRect(),t))}function KR(e,t,n){const r=Qb(e,n),{scroll:i}=t;return i&&(cs(r.x,i.offset.x),cs(r.y,i.offset.y)),r}const Yb=({current:e})=>e?e.ownerDocument.defaultView:null,ay=(e,t)=>Math.abs(e-t);function qR(e,t){const n=ay(e.x,t.x),r=ay(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xb{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=cf(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=qR(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=u,{timestamp:x}=qe;this.history.push({...m,timestamp:x});const{onStart:w,onMove:p}=this.handlers;d||(w&&w(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=uf(d,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=cf(u.type==="pointercancel"?this.lastMoveEventInfo:uf(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,w),m&&m(u,w)},!zp(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ra(t),a=uf(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=qe;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,cf(a,this.history)),this.removeListeners=Aa(Oo(this.contextWindow,"pointermove",this.handlePointerMove),Oo(this.contextWindow,"pointerup",this.handlePointerUp),Oo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function uf(e,t){return t?{point:t(e.point)}:e}function ly(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cf({point:e},t){return{point:e,delta:ly(e,Zb(t)),offset:ly(e,GR(t)),velocity:QR(t,.1)}}function GR(e){return e[0]}function Zb(e){return e[e.length-1]}function QR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>An(t)));)n--;if(!r)return{x:0,y:0};const s=Rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YR(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function uy(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 XR(e,{top:t,left:n,bottom:r,right:i}){return{x:uy(e.x,n,i),y:uy(e.y,t,r)}}function cy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZR(e,t){return{x:cy(e.x,t.x),y:cy(e.y,t.y)}}function JR(e,t){let n=.5;const r=lt(e),i=lt(t);return i>r?n=ra(t.min,t.max-r,e.min):r>i&&(n=ra(e.min,e.max-i,t.min)),tr(0,1,n)}function eO(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 rh=.35;function tO(e=rh){return e===!1?e=0:e===!0&&(e=rh),{x:fy(e,"left","right"),y:fy(e,"top","bottom")}}function fy(e,t,n){return{min:dy(e,t),max:dy(e,n)}}function dy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;class rO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ra(f).point)},s=(f,u)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J2(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ut(w=>{let p=this.getAxisMotionValue(w).get()||0;if(jn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const v=g.layout.layoutBox[w];v&&(p=lt(v)*(parseFloat(p)/100))}}this.originPoint[w]=p}),m&&he.postRender(()=>m(f,u)),Hd(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(f,u)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:w}=u;if(h&&this.currentDirection===null){this.currentDirection=iO(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",u.point,w),this.updateAxis("y",u.point,w),this.visualElement.render(),x&&x(f,u)},a=(f,u)=>this.stop(f,u),l=()=>Ut(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)==null?void 0:u.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xb(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Yb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&he.postRender(()=>s(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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ul(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YR(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&as(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XR(r.layoutBox,t):this.constraints=!1,this.elastic=tO(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ut(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eO(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!as(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=KR(r,i.root,this.visualElement.getTransformPagePoint());let o=ZR(i.layout.layoutBox,s);if(n){const a=n(LR(o));this.hasMutatedConstraints=!!a,a&&(o=Hb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ut(f=>{if(!ul(f,n,this.currentDirection))return;let u=l&&l[f]||{};o&&(u={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Hd(this.visualElement,t),r.start(um(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ut(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ut(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?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){Ut(n=>{const{drag:r}=this.getProps();if(!ul(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-be(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!as(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ut(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=JR({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ut(o=>{if(!ul(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(be(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=Oo(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();as(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),he.read(r);const o=fa(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ut(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=l[f].translate,u.set(u.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=rh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function ul(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sO extends Gr{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const hy=e=>(t,n)=>{e&&he.postRender(()=>e(t,n))};class oO extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new Xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:hy(t),onStart:hy(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&he.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Oo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function py(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=py(e,t.target.x),r=py(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const s=Ur.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=be(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class lO extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;kP(uO),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||he.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Bp.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 Jb(e){const[t,n]=Iw(),r=y.useContext(Ap);return b.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(Xw),isPresent:t,safeToRemove:n})}const uO={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:aO};function cO(e,t,n){const r=nt(e)?e:sa(e);return r.start(um("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;class hO{constructor(){this.children=[],this.isDirty=!1}add(t){Mp(this.children,t),this.isDirty=!0}remove(t){Np(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}}function pO(e,t){const n=On.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(zr(r),e(s-t))};return he.read(r,!0),()=>zr(r)}const eS=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=eS.length,my=e=>typeof e=="string"?parseFloat(e):e,gy=e=>typeof e=="number"||K.test(e);function gO(e,t,n,r,i,s){i?(e.opacity=be(0,n.opacity??1,yO(r)),e.opacityExit=be(t.opacity??1,0,vO(r))):s&&(e.opacity=be(t.opacity??1,n.opacity??1,r));for(let o=0;o<mO;o++){const a=`border${eS[o]}Radius`;let l=yy(t,a),c=yy(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gy(l)===gy(c)?(e[a]=Math.max(be(my(l),my(c),r),0),(jn.test(c)||jn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=be(t.rotate||0,n.rotate||0,r))}function yy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=tS(0,.5,vb),vO=tS(.5,.95,Xt);function tS(e,t,n){return r=>r<e?0:r>t?1:n(ra(e,t,r))}function vy(e,t){e.min=t.min,e.max=t.max}function Vt(e,t){vy(e.x,t.x),vy(e.y,t.y)}function xy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wy(e,t,n,r,i){return e-=t,e=bu(e,1/n,r),i!==void 0&&(e=bu(e,1/i,r)),e}function xO(e,t=0,n=1,r=.5,i,s=e,o=e){if(jn.test(t)&&(t=parseFloat(t),t=be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=be(s.min,s.max,r);e===s&&(a-=t),e.min=wy(e.min,t,n,a,i),e.max=wy(e.max,t,n,a,i)}function by(e,t,[n,r,i],s,o){xO(e,t[n],t[r],t[i],t.scale,s,o)}const wO=["x","scaleX","originX"],bO=["y","scaleY","originY"];function Sy(e,t,n,r){by(e.x,t,wO,n?n.x:void 0,r?r.x:void 0),by(e.y,t,bO,n?n.y:void 0,r?r.y:void 0)}function Ty(e){return e.translate===0&&e.scale===1}function nS(e){return Ty(e.x)&&Ty(e.y)}function Ey(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Ey(e.x,t.x)&&Ey(e.y,t.y)}function Cy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rS(e,t){return Cy(e.x,t.x)&&Cy(e.y,t.y)}function ky(e){return lt(e.x)/lt(e.y)}function _y(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TO{constructor(){this.members=[]}add(t){Mp(this.members,t),t.scheduleRender()}remove(t){if(Np(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 s=this.members[i];if(s.isPresent!==!1){r=s;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 EO(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:f,rotateX:u,rotateY:d,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),u&&(r+=`rotateX(${u}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ff=["","X","Y","Z"],CO={visibility:"hidden"},Py=1e3;let kO=0;function df(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",he,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iS(r)}function sS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=kO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(AO),this.nodes.forEach(NO),this.nodes.forEach(DO),this.nodes.forEach(RO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Fp),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=pO(d,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ry))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||VO,{onLayoutAnimationStart:w,onLayoutAnimationComplete:p}=f.getProps(),g=!this.targetLayout||!rS(this.targetLayout,m),v=!d&&h;if(this.options.layoutRoot||this.resumeFrom||v||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,v);const E={...$p(x,"layout"),onPlay:w,onComplete:p};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else d||Ry(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(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(FO),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const u=this.path[f];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ay);return}this.isUpdating||this.nodes.forEach(jO),this.isUpdating=!1,this.nodes.forEach(MO),this.nodes.forEach(_O),this.nodes.forEach(PO),this.clearAllSnapshots();const a=On.now();qe.delta=tr(0,1e3/60,a-qe.timestamp),qe.timestamp=a,qe.isProcessing=!0,tf.update.process(qe),tf.preRender.process(qe),tf.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bp.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OO),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!lt(this.snapshot.measuredBox.x)&&!lt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!nS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,f=c!==this.prevTransformTemplateValue;o&&(a||ni(this.latestValues)||f)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BO(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Pe();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(zO))){const{scroll:f}=this.root;f&&(cs(a.x,f.offset.x),cs(a.y,f.offset.y))}return a}removeElementScroll(o){var l;const a=Pe();if(Vt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const f=this.path[c],{scroll:u,options:d}=f;f!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Vt(a,o),cs(a.x,u.offset.x),cs(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=Pe();Vt(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&fs(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ni(f.latestValues)&&fs(l,f.latestValues)}return ni(this.latestValues)&&fs(l,this.latestValues),l}removeTransform(o){const a=Pe();Vt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ni(c.latestValues))continue;th(c.latestValues)&&c.updateSnapshot();const f=Pe(),u=c.measurePageBox();Vt(f,u),Sy(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,f)}return ni(this.latestValues)&&Sy(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:u}=this.options;if(!(!this.layout||!(f||u))){if(this.resolvedRelativeTargetAt=qe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Gb(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Mo(this.relativeTargetOrigin,this.target,h.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||th(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===qe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;Vt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,d=this.treeScale.y;WR(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xy(this.prevProjectionDelta.x,this.projectionDelta.x),xy(this.prevProjectionDelta.y,this.projectionDelta.y)),jo(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==d||!_y(this.projectionDelta.x,this.prevProjectionDelta.x)||!_y(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=us(),this.projectionDelta=us(),this.projectionDeltaWithTransform=us()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},f={...this.latestValues},u=us();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=Pe(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,w=this.getStack(),p=!w||w.members.length<=1,g=!!(x&&!p&&this.options.crossfade===!0&&!this.path.some($O));this.animationProgress=0;let v;this.mixTargetDelta=E=>{const S=E/1e3;Oy(u.x,o.x,S),Oy(u.y,o.y,S),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IO(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&SO(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Pe()),Vt(v,this.relativeTarget)),x&&(this.animationValues=f,gO(f,c,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{jl.hasAnimatedSinceResize=!0,this.currentAnimation=cO(0,Py,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&oS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Pe();const u=lt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=lt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Vt(a,l),fs(a,f),jo(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TO),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&df("z",o,c,this.animationValues);for(let f=0;f<ff.length;f++)df(`rotate${ff[f]}`,o,c,this.animationValues),df(`skew${ff[f]}`,o,c,this.animationValues);o.render();for(const f in c)o.setStaticValue(f,c[f]),this.animationValues&&(this.animationValues[f]=c[f]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return CO;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Ol(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const f=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=EO(this.projectionDeltaWithTransform,this.treeScale,f),l&&(a.transform=l(f,a.transform));const{x:u,y:d}=this.projectionDelta;a.transformOrigin=`${u.origin*100}% ${d.origin*100}% 0`,c.animationValues?a.opacity=c===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=c===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in aa){if(f[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:w}=aa[h],p=a.transform==="none"?f[h]:m(f[h],c);if(x){const g=x.length;for(let v=0;v<g;v++)a[x[v]]=p}else w?this.options.visualElement.renderState.vars[h]=p:a[h]=p}return this.options.layoutId&&(a.pointerEvents=c===this?Ol(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ay),this.root.sharedNodes.clear()}}}function _O(e){e.updateLayout()}function PO(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ut(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=lt(d);d.min=r[u].min,d.max=d.min+h}):oS(s,t.layoutBox,r)&&Ut(u=>{const d=o?t.measuredBox[u]:t.layoutBox[u],h=lt(r[u]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+h)});const a=us();jo(a,r,t.layoutBox);const l=us();o?jo(l,e.applyTransform(i,!0),t.measuredBox):jo(l,r,t.layoutBox);const c=!nS(a);let f=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const m=Pe();Mo(m,t.layoutBox,d.layoutBox);const x=Pe();Mo(x,r,h.layoutBox),rS(m,x)||(f=!0),u.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function AO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function RO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OO(e){e.clearSnapshot()}function Ay(e){e.clearMeasurements()}function jO(e){e.isLayoutDirty=!1}function MO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ry(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function DO(e){e.calcProjection()}function FO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jy(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function IO(e,t,n,r){jy(e.x,t.x,n.x,r),jy(e.y,t.y,n.y,r)}function $O(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},My=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ny=My("applewebkit/")&&!My("chrome/")?Math.round:Xt;function Dy(e){e.min=Ny(e.min),e.max=Ny(e.max)}function BO(e){Dy(e.x),Dy(e.y)}function oS(e,t,n){return e==="position"||e==="preserve-aspect"&&!UR(ky(t),ky(n),.2)}function zO(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const UO=sS({attachResizeListener:(e,t)=>fa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hf={current:void 0},aS=sS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hf.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),hf.current=e}return hf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HO={pan:{Feature:oO},drag:{Feature:sO,ProjectionNode:aS,MeasureLayout:Jb}};function Fy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class WO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=tP(t,(n,r)=>(Fy(this.node,r,"Start"),i=>Fy(this.node,i,"End"))))}unmount(){}}class KO extends Gr{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=Aa(fa(this.node.current,"focus",()=>this.onFocus()),fa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ly(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&he.postRender(()=>s(t,Ra(t)))}class qO extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=sP(t,(n,r)=>(Ly(this.node,r,"Start"),(i,{success:s})=>Ly(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ih=new WeakMap,pf=new WeakMap,GO=e=>{const t=ih.get(e.target);t&&t(e)},QO=e=>{e.forEach(GO)};function YO({root:e,...t}){const n=e||document;pf.has(n)||pf.set(n,{});const r=pf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(QO,{root:e,...t})),r[i]}function XO(e,t,n){const r=YO(t);return ih.set(e,n),r.observe(e),()=>{ih.delete(e),r.unobserve(e)}}const ZO={some:0,all:1};class JO extends Gr{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:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:ZO[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),d=c?f:u;d&&d(l)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ej(t,n))&&this.startObserver()}unmount(){}}function ej({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tj={inView:{Feature:JO},tap:{Feature:qO},focus:{Feature:KO},hover:{Feature:WO}},nj={layout:{ProjectionNode:aS,MeasureLayout:Jb}},sh={current:null},lS={current:!1};function rj(){if(lS.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sh.current=e.matches;e.addListener(t),t()}else sh.current=!1}const ij=[...Mb,et,Ur],sj=e=>ij.find(jb(e)),oj=new WeakMap;function aj(e,t,n){for(const r in t){const i=t[r],s=n[r];if(nt(i))e.addValue(r,i);else if(nt(s))e.addValue(r,sa(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,sa(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=om,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=On.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,he.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:f}=o;this.onUpdate=f,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=qu(n),this.isVariantNode=Qw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&nt(m)&&m.set(l[h],!1)}}mount(t){this.current=t,oj.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)),lS.current||rj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:sh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ii.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&he.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bs){const n=Bs[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}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;r<Iy.length;r++){const i=Iy[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const 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=sa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Rb(r)||wb(r))?r=parseFloat(r):!sj(r)&&Ur.test(n)&&(r=_b(t,n)),this.setBaseTarget(t,nt(r)?r.get():r)),nt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=em(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!nt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class uS extends lj{constructor(){super(...arguments),this.KeyframeResolver=Nb}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]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uj(e){return window.getComputedStyle(e)}class cj extends uS{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(t,n){if(Ii.has(n))return TA(t,n);{const r=uj(t),i=(Kp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){Qp(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}}class fj extends uS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&sb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ii.has(n)){const r=kb(n);return r&&r.default||0}return n=ab.has(n)?n:Wp(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ub(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&he.postRender(this.updateDimensions)}build(t,n,r){Zp(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){lb(t,n,r,i)}mount(t){this.isSVGTag=Jp(t.tagName),super.mount(t)}}const dj=(e,t)=>Xp(e)?new fj(t):new cj(t,{allowProjection:e!==y.Fragment}),hj=YP({...DR,...tj,...HO,...nj},dj),gn=dP(hj),pj=e=>["zink","slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"].includes(e),Bt=e=>{const[t,n]=e.split("-");return pj(t)?n?`var(--color-${t}-${n})`:`var(--color-${e}-500)`:`var(--color-${e})`};var dr=(e=>(e.None="none",e.Sm="sm",e.Md="md",e.Lg="lg",e.Xl="xl",e.Full="full",e))(dr||{});const cS=y.createContext({}),mj={[B.Background]:"",[B.Border]:"initial",[B.TooltipText]:Bt("blue-700"),[B.TooltipBackground]:Bt("blue-100"),[B.TooltipBorder]:Bt("blue-500"),[B.HeaderBackground]:Bt("zink-600"),[B.HeaderBorder]:"initial",[B.HeaderText]:"white",[B.FooterBackground]:"",[B.FooterBorder]:"",[B.FooterText]:"",[B.MessageAdminBackground]:"",[B.MessageAdminText]:"",[B.MessageVisitorBackground]:"",[B.MessageVisitorText]:"",[B.GreeterBackground]:"white",[B.GreeterText]:"",[B.GreeterBorder]:"",[B.GreeterTopBackground]:Bt("zink-600"),[B.GreeterTopText]:"white",[B.GreeterButtonBackground]:Bt("blue-500"),[B.GreeterButtonText]:Bt("white"),[B.ButtonBackground]:Bt("blue-500"),[B.ButtonText]:Bt("white"),[B.InputBackground]:Bt("white"),[B.InputText]:Bt("gray-800"),[B.InputBorder]:Bt("slate-200")},gj={[dr.None]:"0px",[dr.Sm]:"var(--radius-xs)",[dr.Md]:"var(--radius-sm)",[dr.Lg]:"var(--radius-md)",[dr.Xl]:"var(--radius-lg)",[dr.Full]:"calc(infinity * 1px)"},yj=e=>{const t={...mj};if(!e||!e.appearance||!e.appearance.design||!e.appearance.design.colors)return t;for(const n in e.appearance.design.colors){const r=n;e.appearance.design.colors[r]&&(t[r]=e.appearance.design.colors[r])}return t};function vj({children:e,widget:t}){const n=yj(t),r=t&&t.appearance&&t.appearance.design&&t.appearance.design.border_radius?t.appearance.design.border_radius:dr.Md,i=o=>n[o],s=()=>gj[r];return b.jsx(cS.Provider,{value:{colors:n,getColor:i,getRadius:s},children:e})}const Ln=()=>y.useContext(cS);function Qn({children:e,type:t="button",variant:n="primary",kind:r="solid",size:i="md",disabled:s=!1,rounded:o=!1,className:a,textKey:l=B.ButtonText,bgKey:c=B.ButtonBackground,animations:f={},withoutTheming:u,...d}){const h=Ln();return b.jsx(gn.button,{type:t,className:ze("flex items-center justify-center focus:!ring-0",{"rounded-full":o&&i!=="xs","rounded-md":!o},a,F2[n][r],L2[i][o?"rounded":"default"]),disabled:s,style:!u&&{color:h.getColor(l),backgroundColor:h.getColor(c),...o?{}:{borderRadius:h.getRadius()}},...f,...d,children:e})}function Me(){}Me.Home=function(t){return b.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",height:"1em",width:"1em",...t,children:b.jsx("path",{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 00.707-1.707l-9-9a.999.999 0 00-1.414 0l-9 9A1 1 0 003 13zm7 7v-5h4v5h-4zm2-15.586l6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"})})};Me.Chat=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});Me.Menu=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})});Me.MessageTyping=({className:e="size-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})});Me.Check=function(t){return b.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",height:"1em",width:"1em",...t,children:b.jsx("path",{d:"M12.736 3.97a.733.733 0 011.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 01-1.065.02L3.217 8.384a.757.757 0 010-1.06.733.733 0 011.047 0l3.052 3.093 5.4-6.425a.247.247 0 01.02-.022z"})})};Me.Website=function(t){return b.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:[b.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14 7a1 1 0 00-1 1v8a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1h-4zm3 2h-2v6h2V9z",clipRule:"evenodd"}),b.jsx("path",{fill:"currentColor",d:"M6 7a1 1 0 000 2h4a1 1 0 100-2H6zM6 11a1 1 0 100 2h4a1 1 0 100-2H6zM5 16a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z"}),b.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 3a3 3 0 00-3 3v12a3 3 0 003 3h16a3 3 0 003-3V6a3 3 0 00-3-3H4zm16 2H4a1 1 0 00-1 1v12a1 1 0 001 1h16a1 1 0 001-1V6a1 1 0 00-1-1z",clipRule:"evenodd"})]})};Me.ArrowDown=e=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})});Me.XCircle=({className:e="e-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})});Me.X=({className:e="e-5",...t})=>b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,...t,children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})});const Nn=Object.create(null);Nn.open="0";Nn.close="1";Nn.ping="2";Nn.pong="3";Nn.message="4";Nn.upgrade="5";Nn.noop="6";const Ml=Object.create(null);Object.keys(Nn).forEach(e=>{Ml[Nn[e]]=e});const oh={type:"error",data:"parser error"},fS=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dS=typeof ArrayBuffer=="function",hS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cm=({type:e,data:t},n,r)=>fS&&t instanceof Blob?n?r(t):$y(t,r):dS&&(t instanceof ArrayBuffer||hS(t))?n?r(t):$y(new Blob([t]),r):r(Nn[e]+(t||"")),$y=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let mf;function xj(e,t){if(fS&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vy).then(t);if(dS&&(e.data instanceof ArrayBuffer||hS(e.data)))return t(Vy(e.data));cm(e,!1,n=>{mf||(mf=new TextEncoder),t(mf.encode(n))})}const By="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<By.length;e++)wo[By.charCodeAt(e)]=e;const wj=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)s=wo[e.charCodeAt(r)],o=wo[e.charCodeAt(r+1)],a=wo[e.charCodeAt(r+2)],l=wo[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return c},bj=typeof ArrayBuffer=="function",fm=(e,t)=>{if(typeof e!="string")return{type:"message",data:pS(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sj(e.substring(1),t)}:Ml[n]?e.length>1?{type:Ml[n],data:e.substring(1)}:{type:Ml[n]}:oh},Sj=(e,t)=>{if(bj){const n=wj(e);return pS(n,t)}else return{base64:!0,data:e}},pS=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mS="",Tj=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{cm(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mS))})})},Ej=(e,t)=>{const n=e.split(mS),r=[];for(let i=0;i<n.length;i++){const s=fm(n[i],t);if(r.push(s),s.type==="error")break}return r};function Cj(){return new TransformStream({transform(e,t){xj(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let gf;function cl(e){return e.reduce((t,n)=>t+n.length,0)}function fl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function kj(e,t){gf||(gf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(cl(n)<1)break;const l=fl(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(cl(n)<2)break;const l=fl(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(cl(n)<8)break;const l=fl(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(oh);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(cl(n)<i)break;const l=fl(n,i);a.enqueue(fm(s?l:gf.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(oh);break}}}})}const gS=4;function je(e){if(e)return _j(e)}function _j(e){for(var t in je.prototype)e[t]=je.prototype[t];return e}je.prototype.on=je.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};je.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};je.prototype.off=je.prototype.removeListener=je.prototype.removeAllListeners=je.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};je.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};je.prototype.emitReserved=je.prototype.emit;je.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};je.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Qu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pj="arraybuffer";function yS(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Aj=Gt.setTimeout,Rj=Gt.clearTimeout;function Yu(e,t){t.useNativeTimers?(e.setTimeoutFn=Aj.bind(Gt),e.clearTimeoutFn=Rj.bind(Gt)):(e.setTimeoutFn=Gt.setTimeout.bind(Gt),e.clearTimeoutFn=Gt.clearTimeout.bind(Gt))}const Oj=1.33;function jj(e){return typeof e=="string"?Mj(e):Math.ceil((e.byteLength||e.size)*Oj)}function Mj(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vS(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Nj(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dj(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Fj extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dm extends je{constructor(t){super(),this.writable=!1,Yu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Fj(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fm(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Nj(t);return n.length?"?"+n:""}}class Lj extends dm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ej(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vS()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xS=!1;try{xS=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ij=xS;function $j(){}class Vj extends Lj{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Mn extends je{constructor(t,n,r){super(),this.createRequest=t,Yu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yS(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Mn.requestsCount++,Mn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=$j,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Mn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Mn.requestsCount=0;Mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zy);else if(typeof addEventListener=="function"){const e="onpagehide"in Gt?"pagehide":"unload";addEventListener(e,zy,!1)}}function zy(){for(let e in Mn.requests)Mn.requests.hasOwnProperty(e)&&Mn.requests[e].abort()}const Bj=function(){const e=wS({xdomain:!1});return e&&e.responseType!==null}();class zj extends Vj{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bj&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mn(wS,this.uri(),t)}}function wS(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ij))return new XMLHttpRequest}catch{}if(!t)try{return new Gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const bS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uj extends dm{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=bS?{}:yS(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;cm(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vS()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const yf=Gt.WebSocket||Gt.MozWebSocket;class Hj extends Uj{createSocket(t,n,r){return bS?new yf(t,n,r):n?new yf(t,n):new yf(t)}doWrite(t,n){this.ws.send(n)}}class Wj extends dm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=kj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Cj();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Qu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Kj={websocket:Hj,webtransport:Wj,polling:zj},qj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ah(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qj.exec(e||""),s={},o=14;for(;o--;)s[Gj[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Qj(s,s.path),s.queryKey=Yj(s,s.query),s}function Qj(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Yj(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const lh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nl=[];lh&&addEventListener("offline",()=>{Nl.forEach(e=>e())},!1);class Lr extends je{constructor(t,n){if(super(),this.binaryType=Pj,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=ah(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=ah(n.host).host);Yu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Dj(this.opts.query)),lh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gS,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=jj(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Qu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Lr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),lh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Nl.indexOf(this._offlineEventListener);r!==-1&&Nl.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Lr.protocol=gS;class Xj extends Lr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=u=>{const d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function c(u){n&&u.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zj=class extends Xj{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Kj[i]).filter(i=>!!i)),super(t,r)}};function Jj(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=ah(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const eM=typeof ArrayBuffer=="function",tM=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,SS=Object.prototype.toString,nM=typeof Blob=="function"||typeof Blob<"u"&&SS.call(Blob)==="[object BlobConstructor]",rM=typeof File=="function"||typeof File<"u"&&SS.call(File)==="[object FileConstructor]";function hm(e){return eM&&(e instanceof ArrayBuffer||tM(e))||nM&&e instanceof Blob||rM&&e instanceof File}function Dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dl(e[n]))return!0;return!1}if(hm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dl(e[n]))return!0;return!1}function iM(e){const t=[],n=e.data,r=e;return r.data=uh(n,t),r.attachments=t.length,{packet:r,buffers:t}}function uh(e,t){if(!e)return e;if(hm(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=uh(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=uh(e[r],t));return n}return e}function sM(e,t){return e.data=ch(e.data,t),delete e.attachments,e}function ch(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ch(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ch(e[n],t));return e}const oM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],aM=5;var te;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(te||(te={}));class lM{constructor(t){this.replacer=t}encode(t){return(t.type===te.EVENT||t.type===te.ACK)&&Dl(t)?this.encodeAsBinary({type:t.type===te.EVENT?te.BINARY_EVENT:te.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===te.BINARY_EVENT||t.type===te.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=iM(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Uy(e){return Object.prototype.toString.call(e)==="[object Object]"}class pm extends je{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===te.BINARY_EVENT;r||n.type===te.BINARY_ACK?(n.type=r?te.EVENT:te.ACK,this.reconstructor=new uM(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(hm(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(te[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===te.BINARY_EVENT||r.type===te.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(pm.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case te.CONNECT:return Uy(n);case te.DISCONNECT:return n===void 0;case te.CONNECT_ERROR:return typeof n=="string"||Uy(n);case te.EVENT:case te.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&oM.indexOf(n[0])===-1);case te.ACK:case te.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uM{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sM(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pm,Encoder:lM,get PacketType(){return te},protocol:aM},Symbol.toStringTag,{value:"Module"}));function cn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class TS extends je{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(fM.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:te.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,u=n.pop();this._registerAckCallback(f,u),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case te.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case te.EVENT:case te.BINARY_EVENT:this.onevent(t);break;case te.ACK:case te.BINARY_ACK:this.onack(t);break;case te.DISCONNECT:this.ondisconnect();break;case te.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:te.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Xs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Xs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Xs.prototype.reset=function(){this.attempts=0};Xs.prototype.setMin=function(e){this.ms=e};Xs.prototype.setMax=function(e){this.max=e};Xs.prototype.setJitter=function(e){this.jitter=e};class fh extends je{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Yu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cM;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zj(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=cn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=cn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Qu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new TS(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const co={};function Fl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jj(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=co[i]&&s in co[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new fh(r,t):(co[i]||(co[i]=new fh(r,t)),l=co[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Fl,{Manager:fh,Socket:TS,io:Fl,connect:Fl});const Ll=e=>{const t=document.cookie.split(";").find(n=>n.includes(e));return t?t.split("=")[1]:null},ES=y.createContext(null),$i=()=>y.useContext(ES),dM=({children:e})=>{const[t,n]=y.useState(null),[r,i]=y.useState(!1),s=()=>{const u=Fl(Tk,{transports:["websocket"],auth:{customer_token:Ll("customer_token"),device_id:Ll("device_id"),customer_refresh_token:Ll("customer_refresh_token")}});u.on("error",d=>{console.error("Websocket error",d)}),u.on("connect",()=>{n(u),i(!0)})},o=()=>{t&&(t.connect(),i(!0))},a=()=>{t&&(t.disconnect(),i(!1))},l=(u,d)=>{t&&t.on(u,d)},c=(u,d)=>{t&&t.off(u,d)},f=(u,d,h)=>{t&&t.emit(u,d,h)};return b.jsx(ES.Provider,{value:{socket:t,connected:r,connect:s,reconnect:o,disconnect:a,on:l,off:c,emit:f},children:e})};var Dn=(e=>(e.ChatView="chat:user:view",e.ChatClose="chat:user:close",e.MessageList="message:list",e.MessageCreate="message:create",e.MessageTyping="message:typing",e.WidgetOpen="widget:open",e.WidgetClose="widget:close",e.PageChange="page-change",e))(Dn||{}),at=(e=>(e.MessageAgentCreate="message:agent:create",e.MessageAgentTyping="message:agent:typing",e.Banned="banned",e.ChatUserClose="chat:user:close",e.ChatUserAssignee="chat:user:assignee",e))(at||{});const mm=e=>{const t=_w(),n=(r,i)=>{var o;const s=((o=_I.find(a=>a.name===r))==null?void 0:o.path)??"/";return typeof i=="object"&&s.includes(":")?Object.entries(i).reduce((a,[l,c])=>a.replace(`:${l}`,c),s):i?`${s}?${i}`:s};return{push:(r,i)=>{t(n(r,i),e)},path:n}},hM=()=>xw({mutationFn:e=>Ea(`clients/${e.client_id}/chats`,{method:"POST",body:JSON.stringify({inputs:e.inputs,client_id:void 0,widget_id:e.widget_id,history:e.history})})}),pM=e=>Ea(`clients/${e}/chats`),dh=e=>Ea(`clients/${e}/chats`,{method:"DELETE"}),mM=(e,t)=>Ea("review",{method:"POST",body:JSON.stringify({rating:e,comment:t})}),gM=()=>xw({mutationFn:e=>mM(e.rating,e.comment)}),CS=(e,t,n)=>{const r=typeof window<"u"?window:void 0;y.useEffect(()=>(r.addEventListener(e,t),()=>{r.removeEventListener(e,t,!1)}),[e,t,r])},gm=()=>typeof window<"u"?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent):!1;function kS({text:e}){var i,s,o,a;const{widget:t,isHaveChat:n}=en(),r=Ln();return b.jsxs(gn.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:10},transition:{type:"spring",damping:20,stiffness:300},className:ze("absolute bottom-full mb-3 p-3 shadow-lg whitespace-nowrap","w-auto right-0"),style:{borderRadius:r.getRadius(),backgroundColor:r.getColor(B.TooltipBackground),color:r.getColor(B.TooltipText)},children:[b.jsx(gn.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},className:"text-sm font-medium",style:{color:r.getColor(B.TooltipText)},children:e||(n?(s=(i=t==null?void 0:t.appearance)==null?void 0:i.design)==null?void 0:s.tooltip_message_active:(a=(o=t==null?void 0:t.appearance)==null?void 0:o.design)==null?void 0:a.tooltip_message)||"Bizimle sohbet edin!"}),b.jsx("div",{className:ze("absolute bottom-0 right-4 w-3 h-3 transform rotate-45 translate-y-1.5 bg-blue-100")})]})}const yM="/notify.mp3",vf=async()=>{await new Audio(yM).play()};function vM({fallback:e,fallbackOpen:t}){const[n]=y.useState(window.document.title),r=$i(),{isHaveChat:i,open:s}=en(),[o,a]=y.useState(!0),[l,c]=y.useState(0),[f,u]=y.useState(null),d=(h,m)=>{if(f&&clearInterval(f),h||!i||m===0||Number.isNaN(m)){window.document.title=n,u(null);return}const x=setInterval(()=>{if(h||!i||m===0||Number.isNaN(m)){window.document.title=n,clearInterval(x),u(null);return}const w=`${m} Yeni mesajınız var! - ${n}`;window.document.title!==w?window.document.title=w:window.document.title=n},1e3);return u(x),()=>{clearInterval(x),u(null)}};return y.useEffect(()=>d(s&&o,l),[l,s,o]),y.useEffect(()=>{const h=()=>{a(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",h,!1),()=>{document.removeEventListener("visibilitychange",h)}},[]),y.useEffect(()=>{if(!r||!i||s&&o)return;const h=()=>{!i||s&&o||(c(m=>m+1),vf())};return r.on(at.MessageAgentCreate,h),r.on(at.ChatUserAssignee,vf),()=>{r.off(at.MessageAgentCreate,h),r.off(at.ChatUserAssignee,vf)}},[r,i,s,o]),s?null:!i||l===0?t?e:null:b.jsx(kS,{text:"Yeni mesajlar var!"})}function xM({children:e,defaultOpen:t,border:n}){var p,g,v,E;const r=$i(),{open:i,setOpen:s,setIsHaveChat:o,isHaveChat:a,widget:l}=en(),[c]=y.useState(!0),f=mm(),u=ka(),d=Ln(),h=gm();y.useEffect(()=>{a&&u.pathname==="/"&&f.push("chat")},[a]);const m=()=>{s(!0),r&&r.emit(Dn.WidgetOpen,{})},x=()=>{s(!1),r&&r.emit(Dn.WidgetClose,{})},w=()=>{s(!1),o(!1),dh(l.client_id),f.push("registration")};return y.useEffect(()=>{if(t&&s(!0),!(!r||!l))return r.on(at.Banned,w),()=>{r.off(at.Banned,w)}},[]),b.jsx("section",{className:"relative w-full h-full",children:b.jsxs(na,{children:[i&&b.jsx(gn.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:10},transition:{type:"spring",damping:25,stiffness:300},style:{width:h?"":((g=(p=l==null?void 0:l.appearance)==null?void 0:p.design)==null?void 0:g.width)||"22.5rem",height:h?"":((E=(v=l==null?void 0:l.appearance)==null?void 0:v.design)==null?void 0:E.height)||"32rem",left:h?"0":"",borderColor:d.getColor(B.Border)},className:ze("fixed z-300 rounded-md",{"border border-solid dark:border-zink-500":n,"bottom-12 right-12":!h,"bottom-0 right-0":h}),children:e}),b.jsx("div",{className:"absolute bottom-0 right-0 z-400",children:b.jsxs(na,{children:[b.jsx(vM,{fallback:b.jsx(kS,{}),fallbackOpen:c}),!i&&b.jsxs(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,className:"relative",onClick:m,children:[b.jsx(gn.span,{initial:{scale:.8,opacity:0},animate:{scale:[1,1.2,1],opacity:[.7,0,.7]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,repeatType:"loop"},className:ze("absolute -z-10 w-full h-full rounded-full opacity-30"),style:{backgroundColor:d.getColor(B.ButtonBackground)}}),b.jsx(Me.Chat,{className:"size-6"})]}),i&&!h&&b.jsx(Qn,{animations:{whileHover:{scale:1.1},whileTap:{scale:.95}},size:"lg",rounded:!0,onClick:x,children:b.jsx(Me.X,{className:"size-6"})})]})})]})})}function _S(e){const{widget:t}=en();return b.jsx(vj,{widget:t,children:b.jsx(xM,{...e})})}function Vi(e){this._maxSize=e,this.clear()}Vi.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Vi.prototype.get=function(e){return this._values[e]};Vi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var wM=/[^.^\]^[]+|(?=\[\]|\.\.)/g,PS=/^\d+$/,bM=/^\d/,SM=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,TM=/^\s*(['"]?)(.*?)(\1)\s*$/,ym=512,Hy=new Vi(ym),Wy=new Vi(ym),Ky=new Vi(ym),Ti={Cache:Vi,split:hh,normalizePath:xf,setter:function(e){var t=xf(e);return Wy.get(e)||Wy.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var l=t[s];if(l==="__proto__"||l==="constructor"||l==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=xf(e);return Ky.get(e)||Ky.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(vm(n)||PS.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){EM(Array.isArray(e)?e:hh(e),t,n)}};function xf(e){return Hy.get(e)||Hy.set(e,hh(e).map(function(t){return t.replace(TM,"$2")}))}function hh(e){return e.match(wM)||[""]}function EM(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(_M(i)&&(i='"'+i+'"'),a=vm(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function vm(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function CM(e){return e.match(bM)&&!e.match(PS)}function kM(e){return SM.test(e)}function _M(e){return!vm(e)&&(CM(e)||kM(e))}const PM=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Xu=e=>e.match(PM)||[],Zu=e=>e[0].toUpperCase()+e.slice(1),xm=(e,t)=>Xu(e).join(t).toLowerCase(),AS=e=>Xu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),AM=e=>Zu(AS(e)),RM=e=>xm(e,"_"),OM=e=>xm(e,"-"),jM=e=>Zu(xm(e," ")),MM=e=>Xu(e).map(Zu).join(" ");var wf={words:Xu,upperFirst:Zu,camelCase:AS,pascalCase:AM,snakeCase:RM,kebabCase:OM,sentenceCase:jM,titleCase:MM},wm={exports:{}};wm.exports=function(e){return RS(NM(e),e)};wm.exports.array=RS;function RS(e,t){var n=e.length,r=new Array(n),i={},s=n,o=DM(t),a=FM(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||l(e[s],s,new Set);return r;function l(c,f,u){if(u.has(c)){var d;try{d=", node was:"+JSON.stringify(c)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),f=h.length){u.add(c);do{var m=h[--f];l(m,a.get(m),u)}while(f);u.delete(c)}r[--n]=c}}}function NM(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function DM(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function FM(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var LM=wm.exports;const IM=Hs(LM),$M=Object.prototype.toString,VM=Error.prototype.toString,BM=RegExp.prototype.toString,zM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",UM=/^Symbol\((.*)\)(.*)$/;function HM(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function qy(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return HM(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return zM.call(e).replace(UM,"Symbol($1)");const r=$M.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+VM.call(e)+"]":r==="RegExp"?BM.call(e):null}function Ir(e,t){let n=qy(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=qy(this[r],t);return s!==null?s:i},2)}function OS(e){return e==null?[]:[].concat(e)}let jS,MS,NS,WM=/\$\{\s*(\w+)\s*\}/g;jS=Symbol.toStringTag;class Gy{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[jS]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],OS(t).forEach(s=>{if(wt.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}MS=Symbol.hasInstance;NS=Symbol.toStringTag;class wt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(WM,(i,s)=>Ir(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new Gy(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[NS]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,wt)}static[MS](t){return Gy[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let bn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${Ir(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ir(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ir(n,!0)}\``+i}},pt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},KM={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ph={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},qM={isValue:"${path} field must be ${value}"},Il={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},GM={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},QM={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${Ir(n,!0)}\``}return wt.formatError(bn.notType,e)}};Object.assign(Object.create(null),{mixed:bn,string:pt,number:KM,date:ph,object:Il,array:GM,boolean:qM,tuple:QM});const bm=e=>e&&e.__isYupSchema__;class Su{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new Su(t,(a,l)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!bm(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const dl={context:"$",value:"."};class Bi{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===dl.context,this.isValue=this.key[0]===dl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?dl.context:this.isValue?dl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ti.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Bi.prototype.__isYupRef=!0;const fi=e=>e==null;function Gi(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,l){const{name:c,test:f,params:u,message:d,skipAbsent:h}=e;let{parent:m,context:x,abortEarly:w=o.spec.abortEarly,disableStackTrace:p=o.spec.disableStackTrace}=i;function g(I){return Bi.isRef(I)?I.getValue(n,m,x):I}function v(I={}){const re=Object.assign({value:n,originalValue:s,label:o.spec.label,path:I.path||r,spec:o.spec,disableStackTrace:I.disableStackTrace||p},u,I.params);for(const xe of Object.keys(re))re[xe]=g(re[xe]);const ie=new wt(wt.formatError(I.message||d,re),n,re.path,I.type||c,re.disableStackTrace);return ie.params=re,ie}const E=w?a:l;let S={path:r,parent:m,type:c,from:i.from,createError:v,resolve:g,options:i,originalValue:s,schema:o};const C=I=>{wt.isError(I)?E(I):I?l(null):E(v())},k=I=>{wt.isError(I)?E(I):a(I)};if(h&&fi(n))return C(!0);let j;try{var M;if(j=f.call(S,n,S),typeof((M=j)==null?void 0:M.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(C,k)}}catch(I){k(I);return}C(j)}return t.OPTIONS=e,t}function YM(e,t,n,r=n){let i,s,o;return t?(Ti.forEach(t,(a,l,c)=>{let f=l?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let u=e.type==="tuple",d=c?parseInt(f,10):0;if(e.innerType||u){if(u&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&d>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[d],e=u?e.spec.types[d]:e.innerType}if(!c){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=l?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Tu extends Set{describe(){const t=[];for(const n of this.values())t.push(Bi.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Tu(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function ds(e,t=new Map){if(bm(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=ds(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,ds(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(ds(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=ds(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Tu,this._blacklist=new Tu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(bn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ds(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&fi(s))return s;let o=Ir(t),a=Ir(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
96
96
 
97
97
  attempted value: ${o}
98
98
  `+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,l=t;a||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let f of Object.values(this.internalTests))f&&c.push(f);this.runTests({path:s,value:l,originalValue:o,options:n,tests:c},r,f=>{if(f.length)return i(f,l);this.runTests({path:s,value:l,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:l,options:c}=t,f=x=>{i||(i=!0,n(x,o))},u=x=>{i||(i=!0,r(x,o))},d=s.length,h=[];if(!d)return u([]);let m={value:o,originalValue:a,path:l,options:c,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(m,f,function(g){g&&(Array.isArray(g)?h.push(...g):h.push(g)),--d<=0&&u(h)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let c=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${i||""}[${l?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(u,d,h)=>this.resolve(f)._validate(c,f,d,h)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(l,c)=>{wt.isError(l)&&(l.value=c),a(l)},(l,c)=>{l.length?a(new wt(l,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,l)=>{throw wt.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new wt(a,t,void 0,void 0,o);s=l}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(wt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(wt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ds(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Gi({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Gi({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=bn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=bn.notNull){return this.nullability(!1,t)}required(t=bn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=bn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Gi(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=OS(t).map(s=>new Bi(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Su(i,n):Su.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Gi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=bn.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Gi({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=bn.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Gi({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,f)=>f.findIndex(u=>u.name===l.name)===c)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=YM(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const XM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ZM(e){const t=mh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function mh(e){var t,n;const r=XM.exec(e);return r?{year:$n(r[1]),month:$n(r[2],1)-1,day:$n(r[3],1),hour:$n(r[4]),minute:$n(r[5]),second:$n(r[6]),millisecond:r[7]?$n(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:$n(r[10]),minuteOffset:$n(r[11])}:null}function $n(e,t=0){return Number(e)||t}let JM=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eN=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,tN=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,nN="^\\d{4}-\\d{2}-\\d{2}",rN="\\d{2}:\\d{2}:\\d{2}",iN="(([+-]\\d{2}(:?\\d{2})?)|Z)",sN=new RegExp(`${nN}T${rN}(\\.\\d+)?${iN}$`),oN=e=>fi(e)||e===e.trim(),aN={}.toString();function Eu(){return new DS}class DS extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===aN?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||bn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=pt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=pt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=pt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||pt.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=pt.email){return this.matches(JM,{name:"email",message:t,excludeEmptyString:!0})}url(t=pt.url){return this.matches(eN,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=pt.uuid){return this.matches(tN,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(sN,{name:"datetime",message:n||pt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||pt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=mh(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||pt.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=mh(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=pt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:oN})}lowercase(t=pt.lowercase){return this.transform(n=>fi(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toLowerCase()})}uppercase(t=pt.uppercase){return this.transform(n=>fi(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>fi(n)||n===n.toUpperCase()})}}Eu.prototype=DS.prototype;let lN=new Date(""),uN=e=>Object.prototype.toString.call(e)==="[object Date]";class Ju extends Fn{constructor(){super({type:"date",check(t){return uN(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=ZM(t),isNaN(t)?Ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Bi.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=ph.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=ph.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}Ju.INVALID_DATE=lN;Ju.prototype;function cN(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let l=Ti.split(o)[0];r.add(l),i.has(`${a}-${l}`)||n.push([a,l])}for(const o of Object.keys(e)){let a=e[o];r.add(o),Bi.isRef(a)&&a.isSibling?s(a.path,o):bm(a)&&"deps"in a&&a.deps.forEach(l=>s(l,o))}return IM.array(Array.from(r),n).reverse()}function Qy(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function FS(e){return(t,n)=>Qy(e,t)-Qy(e,n)}const fN=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function $l(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=$l(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=$l(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map($l)}):"optional"in e?e.optional():e}const dN=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ti.getter(Ti.join(n),!0)(e);return!!(i&&r in i)};let Yy=e=>Object.prototype.toString.call(e)==="[object Object]";function Xy(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const hN=FS([]);function Sm(e){return new LS(e)}class LS extends Fn{constructor(t){super({type:"object",check(n){return Yy(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=hN,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(u=>!this._nodes.includes(u))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const u of a){let d=s[u],h=u in i;if(d){let m,x=i[u];c.path=(n.path?`${n.path}.`:"")+u,d=d.resolve({value:x,context:n.context,parent:l});let w=d instanceof Fn?d.spec:void 0,p=w==null?void 0:w.strict;if(w!=null&&w.strip){f=f||u in i;continue}m=!n.__validating||!p?d.cast(i[u],c):i[u],m!==void 0&&(l[u]=m)}else h&&!o&&(l[u]=i[u]);(h!==u in l||l[u]!==i[u])&&(f=!0)}return f?l:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(l,c)=>{if(!a||!Yy(c)){i(l,c);return}o=o||c;let f=[];for(let u of this._nodes){let d=this.fields[u];!d||Bi.isRef(d)||f.push(d.asNestedTest({options:n,key:u,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:c,originalValue:o,options:n},r,u=>{i(u.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=cN(t,n),r._sortErrors=FS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return $l(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ti.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return dN(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(fN)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Il.exact,test(n){if(n==null)return!0;const r=Xy(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Il.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=Xy(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Il.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(wf.camelCase)}snakeCase(){return this.transformKeys(wf.snakeCase)}constantCase(){return this.transformKeys(t=>wf.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}Sm.prototype=LS.prototype;var pN=function(t){return mN(t)&&!gN(t)};function mN(e){return!!e&&typeof e=="object"}function gN(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||xN(e)}var yN=typeof Symbol=="function"&&Symbol.for,vN=yN?Symbol.for("react.element"):60103;function xN(e){return e.$$typeof===vN}function wN(e){return Array.isArray(e)?[]:{}}function Cu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?da(wN(e),e,t):e}function bN(e,t,n){return e.concat(t).map(function(r){return Cu(r,n)})}function SN(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(i){r[i]=Cu(e[i],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=Cu(t[i],n):r[i]=da(e[i],t[i],n)}),r}function da(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||bN,n.isMergeableObject=n.isMergeableObject||pN;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):SN(e,t,n):Cu(t,n)}da.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return da(r,i,n)},{})};var gh=da,IS=typeof global=="object"&&global&&global.Object===Object&&global,TN=typeof self=="object"&&self&&self.Object===Object&&self,In=IS||TN||Function("return this")(),Hr=In.Symbol,$S=Object.prototype,EN=$S.hasOwnProperty,CN=$S.toString,fo=Hr?Hr.toStringTag:void 0;function kN(e){var t=EN.call(e,fo),n=e[fo];try{e[fo]=void 0;var r=!0}catch{}var i=CN.call(e);return r&&(t?e[fo]=n:delete e[fo]),i}var _N=Object.prototype,PN=_N.toString;function AN(e){return PN.call(e)}var RN="[object Null]",ON="[object Undefined]",Zy=Hr?Hr.toStringTag:void 0;function zi(e){return e==null?e===void 0?ON:RN:Zy&&Zy in Object(e)?kN(e):AN(e)}function VS(e,t){return function(n){return e(t(n))}}var Tm=VS(Object.getPrototypeOf,Object);function Ui(e){return e!=null&&typeof e=="object"}var jN="[object Object]",MN=Function.prototype,NN=Object.prototype,BS=MN.toString,DN=NN.hasOwnProperty,FN=BS.call(Object);function Jy(e){if(!Ui(e)||zi(e)!=jN)return!1;var t=Tm(e);if(t===null)return!0;var n=DN.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BS.call(n)==FN}function LN(){this.__data__=[],this.size=0}function zS(e,t){return e===t||e!==e&&t!==t}function ec(e,t){for(var n=e.length;n--;)if(zS(e[n][0],t))return n;return-1}var IN=Array.prototype,$N=IN.splice;function VN(e){var t=this.__data__,n=ec(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$N.call(t,n,1),--this.size,!0}function BN(e){var t=this.__data__,n=ec(t,e);return n<0?void 0:t[n][1]}function zN(e){return ec(this.__data__,e)>-1}function UN(e,t){var n=this.__data__,r=ec(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rr.prototype.clear=LN;rr.prototype.delete=VN;rr.prototype.get=BN;rr.prototype.has=zN;rr.prototype.set=UN;function HN(){this.__data__=new rr,this.size=0}function WN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KN(e){return this.__data__.get(e)}function qN(e){return this.__data__.has(e)}function Oa(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GN="[object AsyncFunction]",QN="[object Function]",YN="[object GeneratorFunction]",XN="[object Proxy]";function US(e){if(!Oa(e))return!1;var t=zi(e);return t==QN||t==YN||t==GN||t==XN}var bf=In["__core-js_shared__"],ev=function(){var e=/[^.]+$/.exec(bf&&bf.keys&&bf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ZN(e){return!!ev&&ev in e}var JN=Function.prototype,eD=JN.toString;function Hi(e){if(e!=null){try{return eD.call(e)}catch{}try{return e+""}catch{}}return""}var tD=/[\\^$.*+?()[\]{}|]/g,nD=/^\[object .+?Constructor\]$/,rD=Function.prototype,iD=Object.prototype,sD=rD.toString,oD=iD.hasOwnProperty,aD=RegExp("^"+sD.call(oD).replace(tD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lD(e){if(!Oa(e)||ZN(e))return!1;var t=US(e)?aD:nD;return t.test(Hi(e))}function uD(e,t){return e==null?void 0:e[t]}function Wi(e,t){var n=uD(e,t);return lD(n)?n:void 0}var ha=Wi(In,"Map"),pa=Wi(Object,"create");function cD(){this.__data__=pa?pa(null):{},this.size=0}function fD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dD="__lodash_hash_undefined__",hD=Object.prototype,pD=hD.hasOwnProperty;function mD(e){var t=this.__data__;if(pa){var n=t[e];return n===dD?void 0:n}return pD.call(t,e)?t[e]:void 0}var gD=Object.prototype,yD=gD.hasOwnProperty;function vD(e){var t=this.__data__;return pa?t[e]!==void 0:yD.call(t,e)}var xD="__lodash_hash_undefined__";function wD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?xD:t,this}function ji(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ji.prototype.clear=cD;ji.prototype.delete=fD;ji.prototype.get=mD;ji.prototype.has=vD;ji.prototype.set=wD;function bD(){this.size=0,this.__data__={hash:new ji,map:new(ha||rr),string:new ji}}function SD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function tc(e,t){var n=e.__data__;return SD(t)?n[typeof t=="string"?"string":"hash"]:n.map}function TD(e){var t=tc(this,e).delete(e);return this.size-=t?1:0,t}function ED(e){return tc(this,e).get(e)}function CD(e){return tc(this,e).has(e)}function kD(e,t){var n=tc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qr.prototype.clear=bD;Qr.prototype.delete=TD;Qr.prototype.get=ED;Qr.prototype.has=CD;Qr.prototype.set=kD;var _D=200;function PD(e,t){var n=this.__data__;if(n instanceof rr){var r=n.__data__;if(!ha||r.length<_D-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Qr(r)}return n.set(e,t),this.size=n.size,this}function Zs(e){var t=this.__data__=new rr(e);this.size=t.size}Zs.prototype.clear=HN;Zs.prototype.delete=WN;Zs.prototype.get=KN;Zs.prototype.has=qN;Zs.prototype.set=PD;function AD(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var tv=function(){try{var e=Wi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function HS(e,t,n){t=="__proto__"&&tv?tv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var RD=Object.prototype,OD=RD.hasOwnProperty;function WS(e,t,n){var r=e[t];(!(OD.call(e,t)&&zS(r,n))||n===void 0&&!(t in e))&&HS(e,t,n)}function nc(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?HS(n,a,l):WS(n,a,l)}return n}function jD(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var MD="[object Arguments]";function nv(e){return Ui(e)&&zi(e)==MD}var KS=Object.prototype,ND=KS.hasOwnProperty,DD=KS.propertyIsEnumerable,FD=nv(function(){return arguments}())?nv:function(e){return Ui(e)&&ND.call(e,"callee")&&!DD.call(e,"callee")},ja=Array.isArray;function LD(){return!1}var qS=typeof jt=="object"&&jt&&!jt.nodeType&&jt,rv=qS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,ID=rv&&rv.exports===qS,iv=ID?In.Buffer:void 0,$D=iv?iv.isBuffer:void 0,GS=$D||LD,VD=9007199254740991,BD=/^(?:0|[1-9]\d*)$/;function zD(e,t){var n=typeof e;return t=t??VD,!!t&&(n=="number"||n!="symbol"&&BD.test(e))&&e>-1&&e%1==0&&e<t}var UD=9007199254740991;function QS(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UD}var HD="[object Arguments]",WD="[object Array]",KD="[object Boolean]",qD="[object Date]",GD="[object Error]",QD="[object Function]",YD="[object Map]",XD="[object Number]",ZD="[object Object]",JD="[object RegExp]",e3="[object Set]",t3="[object String]",n3="[object WeakMap]",r3="[object ArrayBuffer]",i3="[object DataView]",s3="[object Float32Array]",o3="[object Float64Array]",a3="[object Int8Array]",l3="[object Int16Array]",u3="[object Int32Array]",c3="[object Uint8Array]",f3="[object Uint8ClampedArray]",d3="[object Uint16Array]",h3="[object Uint32Array]",me={};me[s3]=me[o3]=me[a3]=me[l3]=me[u3]=me[c3]=me[f3]=me[d3]=me[h3]=!0;me[HD]=me[WD]=me[r3]=me[KD]=me[i3]=me[qD]=me[GD]=me[QD]=me[YD]=me[XD]=me[ZD]=me[JD]=me[e3]=me[t3]=me[n3]=!1;function p3(e){return Ui(e)&&QS(e.length)&&!!me[zi(e)]}function Em(e){return function(t){return e(t)}}var YS=typeof jt=="object"&&jt&&!jt.nodeType&&jt,No=YS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,m3=No&&No.exports===YS,Sf=m3&&IS.process,Us=function(){try{var e=No&&No.require&&No.require("util").types;return e||Sf&&Sf.binding&&Sf.binding("util")}catch{}}(),sv=Us&&Us.isTypedArray,g3=sv?Em(sv):p3,y3=Object.prototype,v3=y3.hasOwnProperty;function XS(e,t){var n=ja(e),r=!n&&FD(e),i=!n&&!r&&GS(e),s=!n&&!r&&!i&&g3(e),o=n||r||i||s,a=o?jD(e.length,String):[],l=a.length;for(var c in e)(t||v3.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zD(c,l)))&&a.push(c);return a}var x3=Object.prototype;function Cm(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||x3;return e===n}var w3=VS(Object.keys,Object),b3=Object.prototype,S3=b3.hasOwnProperty;function T3(e){if(!Cm(e))return w3(e);var t=[];for(var n in Object(e))S3.call(e,n)&&n!="constructor"&&t.push(n);return t}function ZS(e){return e!=null&&QS(e.length)&&!US(e)}function km(e){return ZS(e)?XS(e):T3(e)}function E3(e,t){return e&&nc(t,km(t),e)}function C3(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var k3=Object.prototype,_3=k3.hasOwnProperty;function P3(e){if(!Oa(e))return C3(e);var t=Cm(e),n=[];for(var r in e)r=="constructor"&&(t||!_3.call(e,r))||n.push(r);return n}function _m(e){return ZS(e)?XS(e,!0):P3(e)}function A3(e,t){return e&&nc(t,_m(t),e)}var JS=typeof jt=="object"&&jt&&!jt.nodeType&&jt,ov=JS&&typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,R3=ov&&ov.exports===JS,av=R3?In.Buffer:void 0,lv=av?av.allocUnsafe:void 0;function O3(e,t){if(t)return e.slice();var n=e.length,r=lv?lv(n):new e.constructor(n);return e.copy(r),r}function eT(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function j3(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function tT(){return[]}var M3=Object.prototype,N3=M3.propertyIsEnumerable,uv=Object.getOwnPropertySymbols,Pm=uv?function(e){return e==null?[]:(e=Object(e),j3(uv(e),function(t){return N3.call(e,t)}))}:tT;function D3(e,t){return nc(e,Pm(e),t)}function nT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var F3=Object.getOwnPropertySymbols,rT=F3?function(e){for(var t=[];e;)nT(t,Pm(e)),e=Tm(e);return t}:tT;function L3(e,t){return nc(e,rT(e),t)}function iT(e,t,n){var r=t(e);return ja(e)?r:nT(r,n(e))}function I3(e){return iT(e,km,Pm)}function $3(e){return iT(e,_m,rT)}var yh=Wi(In,"DataView"),vh=Wi(In,"Promise"),xh=Wi(In,"Set"),wh=Wi(In,"WeakMap"),cv="[object Map]",V3="[object Object]",fv="[object Promise]",dv="[object Set]",hv="[object WeakMap]",pv="[object DataView]",B3=Hi(yh),z3=Hi(ha),U3=Hi(vh),H3=Hi(xh),W3=Hi(wh),Un=zi;(yh&&Un(new yh(new ArrayBuffer(1)))!=pv||ha&&Un(new ha)!=cv||vh&&Un(vh.resolve())!=fv||xh&&Un(new xh)!=dv||wh&&Un(new wh)!=hv)&&(Un=function(e){var t=zi(e),n=t==V3?e.constructor:void 0,r=n?Hi(n):"";if(r)switch(r){case B3:return pv;case z3:return cv;case U3:return fv;case H3:return dv;case W3:return hv}return t});var K3=Object.prototype,q3=K3.hasOwnProperty;function G3(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&q3.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var mv=In.Uint8Array;function Am(e){var t=new e.constructor(e.byteLength);return new mv(t).set(new mv(e)),t}function Q3(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Y3=/\w*$/;function X3(e){var t=new e.constructor(e.source,Y3.exec(e));return t.lastIndex=e.lastIndex,t}var gv=Hr?Hr.prototype:void 0,yv=gv?gv.valueOf:void 0;function Z3(e){return yv?Object(yv.call(e)):{}}function J3(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var eF="[object Boolean]",tF="[object Date]",nF="[object Map]",rF="[object Number]",iF="[object RegExp]",sF="[object Set]",oF="[object String]",aF="[object Symbol]",lF="[object ArrayBuffer]",uF="[object DataView]",cF="[object Float32Array]",fF="[object Float64Array]",dF="[object Int8Array]",hF="[object Int16Array]",pF="[object Int32Array]",mF="[object Uint8Array]",gF="[object Uint8ClampedArray]",yF="[object Uint16Array]",vF="[object Uint32Array]";function xF(e,t,n){var r=e.constructor;switch(t){case lF:return Am(e);case eF:case tF:return new r(+e);case uF:return Q3(e,n);case cF:case fF:case dF:case hF:case pF:case mF:case gF:case yF:case vF:return J3(e,n);case nF:return new r;case rF:case oF:return new r(e);case iF:return X3(e);case sF:return new r;case aF:return Z3(e)}}var vv=Object.create,wF=function(){function e(){}return function(t){if(!Oa(t))return{};if(vv)return vv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function bF(e){return typeof e.constructor=="function"&&!Cm(e)?wF(Tm(e)):{}}var SF="[object Map]";function TF(e){return Ui(e)&&Un(e)==SF}var xv=Us&&Us.isMap,EF=xv?Em(xv):TF,CF="[object Set]";function kF(e){return Ui(e)&&Un(e)==CF}var wv=Us&&Us.isSet,_F=wv?Em(wv):kF,PF=1,AF=2,RF=4,sT="[object Arguments]",OF="[object Array]",jF="[object Boolean]",MF="[object Date]",NF="[object Error]",oT="[object Function]",DF="[object GeneratorFunction]",FF="[object Map]",LF="[object Number]",aT="[object Object]",IF="[object RegExp]",$F="[object Set]",VF="[object String]",BF="[object Symbol]",zF="[object WeakMap]",UF="[object ArrayBuffer]",HF="[object DataView]",WF="[object Float32Array]",KF="[object Float64Array]",qF="[object Int8Array]",GF="[object Int16Array]",QF="[object Int32Array]",YF="[object Uint8Array]",XF="[object Uint8ClampedArray]",ZF="[object Uint16Array]",JF="[object Uint32Array]",fe={};fe[sT]=fe[OF]=fe[UF]=fe[HF]=fe[jF]=fe[MF]=fe[WF]=fe[KF]=fe[qF]=fe[GF]=fe[QF]=fe[FF]=fe[LF]=fe[aT]=fe[IF]=fe[$F]=fe[VF]=fe[BF]=fe[YF]=fe[XF]=fe[ZF]=fe[JF]=!0;fe[NF]=fe[oT]=fe[zF]=!1;function Do(e,t,n,r,i,s){var o,a=t&PF,l=t&AF,c=t&RF;if(o!==void 0)return o;if(!Oa(e))return e;var f=ja(e);if(f){if(o=G3(e),!a)return eT(e,o)}else{var u=Un(e),d=u==oT||u==DF;if(GS(e))return O3(e,a);if(u==aT||u==sT||d&&!i){if(o=l||d?{}:bF(e),!a)return l?L3(e,A3(o,e)):D3(e,E3(o,e))}else{if(!fe[u])return i?e:{};o=xF(e,u,a)}}s||(s=new Zs);var h=s.get(e);if(h)return h;s.set(e,o),_F(e)?e.forEach(function(w){o.add(Do(w,t,n,w,e,s))}):EF(e)&&e.forEach(function(w,p){o.set(p,Do(w,t,n,p,e,s))});var m=c?l?$3:I3:l?_m:km,x=f?void 0:m(e);return AD(x||e,function(w,p){x&&(p=w,w=e[p]),WS(o,p,Do(w,t,n,p,e,s))}),o}var e5=1,t5=4;function hl(e){return Do(e,e5|t5)}var bv=Array.isArray,Sv=Object.keys,n5=Object.prototype.hasOwnProperty,r5=typeof Element<"u";function bh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=bv(e),r=bv(t),i,s,o;if(n&&r){if(s=e.length,s!=t.length)return!1;for(i=s;i--!==0;)if(!bh(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var a=e instanceof Date,l=t instanceof Date;if(a!=l)return!1;if(a&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!=f)return!1;if(c&&f)return e.toString()==t.toString();var u=Sv(e);if(s=u.length,s!==Sv(t).length)return!1;for(i=s;i--!==0;)if(!n5.call(t,u[i]))return!1;if(r5&&e instanceof Element&&t instanceof Element)return e===t;for(i=s;i--!==0;)if(o=u[i],!(o==="_owner"&&e.$$typeof)&&!bh(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var i5=function(t,n){try{return bh(t,n)}catch(r){if(r.message&&r.message.match(/stack|recursion/i)||r.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",r.name,r.message),!1;throw r}};const ri=Hs(i5);var s5=4;function Tv(e){return Do(e,s5)}function lT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var o5="[object Symbol]";function Rm(e){return typeof e=="symbol"||Ui(e)&&zi(e)==o5}var a5="Expected a function";function Om(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(a5);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Om.Cache||Qr),n}Om.Cache=Qr;var l5=500;function u5(e){var t=Om(e,function(r){return n.size===l5&&n.clear(),r}),n=t.cache;return t}var c5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f5=/\\(\\)?/g,d5=u5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(c5,function(n,r,i,s){t.push(i?s.replace(f5,"$1"):r||n)}),t}),h5=1/0;function p5(e){if(typeof e=="string"||Rm(e))return e;var t=e+"";return t=="0"&&1/e==-h5?"-0":t}var m5=1/0,Ev=Hr?Hr.prototype:void 0,Cv=Ev?Ev.toString:void 0;function uT(e){if(typeof e=="string")return e;if(ja(e))return lT(e,uT)+"";if(Rm(e))return Cv?Cv.call(e):"";var t=e+"";return t=="0"&&1/e==-m5?"-0":t}function g5(e){return e==null?"":uT(e)}function cT(e){return ja(e)?lT(e,p5):Rm(e)?[e]:eT(d5(g5(e)))}var fT={exports:{}},ue={};/** @license React v16.13.1