@opencx/widget 3.0.15 → 3.0.16

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.
@@ -37,7 +37,7 @@ var vie=Object.defineProperty;var rO=lt=>{throw TypeError(lt)};var wie=(lt,Qe,St
37
37
  `+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=s);break}}}finally{kh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?tu(e):""}function OO(e){switch(e.tag){case 5:return tu(e.type);case 16:return tu("Lazy");case 13:return tu("Suspense");case 19:return tu("SuspenseList");case 0:case 2:case 15:return e=Rh(e.type,!1),e;case 11:return e=Rh(e.type.render,!1),e;case 1:return e=Rh(e.type,!0),e;default:return""}}function Nh(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 Co:return"Fragment";case So:return"Portal";case Eh:return"Profiler";case xh:return"StrictMode";case _h:return"Suspense";case Sh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gw:return(e.displayName||"Context")+".Consumer";case mw:return(e._context.displayName||"Context")+".Provider";case Th:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ch:return t=e.displayName||null,t!==null?t:Nh(e.type)||"Memo";case Ni:t=e._payload,e=e._init;try{return Nh(e(t))}catch{}}return null}function DO(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 Nh(t);case 8:return t===xh?"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 Pi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ww(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LO(e){var t=ww(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,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.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 Cc(e){e._valueTracker||(e._valueTracker=LO(e))}function bw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ww(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ac(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 Ph(e,t){var n=t.checked;return ct({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pi(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 Ew(e,t){t=t.checked,t!=null&&bh(e,"checked",t,!1)}function Ih(e,t){Ew(e,t);var n=Pi(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")?Oh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oh(e,t.type,Pi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tw(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 Oh(e,t,n){(t!=="number"||Ac(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var nu=Array.isArray;function Ao(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=""+Pi(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 Dh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return ct({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _w(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(nu(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pi(n)}}function Sw(e,t){var n=Pi(t.value),r=Pi(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 Cw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Aw(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 Lh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Aw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var kc,kw=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(kc=kc||document.createElement("div"),kc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=kc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ru(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var iu={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},MO=["Webkit","ms","Moz","O"];Object.keys(iu).forEach(function(e){MO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),iu[t]=iu[e]})});function Rw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||iu.hasOwnProperty(e)&&iu[e]?(""+t).trim():t+"px"}function Nw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Rw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var FO=ct({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 Mh(e,t){if(t){if(FO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Fh(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 Bh=null;function jh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Uh=null,ko=null,Ro=null;function Pw(e){if(e=Cu(e)){if(typeof Uh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Qc(t),Uh(e.stateNode,e.type,t))}}function Iw(e){ko?Ro?Ro.push(e):Ro=[e]:ko=e}function Ow(){if(ko){var e=ko,t=Ro;if(Ro=ko=null,Pw(e),t)for(e=0;e<t.length;e++)Pw(t[e])}}function Dw(e,t){return e(t)}function Lw(){}var Hh=!1;function Mw(e,t,n){if(Hh)return e(t,n);Hh=!0;try{return Dw(e,t,n)}finally{Hh=!1,(ko!==null||Ro!==null)&&(Lw(),Ow())}}function au(e,t){var n=e.stateNode;if(n===null)return null;var r=Qc(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(Q(231,t,typeof n));return n}var zh=!1;if(ei)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){zh=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch{zh=!1}function BO(e,t,n,r,i,a,o,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var su=!1,Rc=null,Nc=!1,Vh=null,jO={onError:function(e){su=!0,Rc=e}};function UO(e,t,n,r,i,a,o,s,u){su=!1,Rc=null,BO.apply(jO,arguments)}function HO(e,t,n,r,i,a,o,s,u){if(UO.apply(this,arguments),su){if(su){var l=Rc;su=!1,Rc=null}else throw Error(Q(198));Nc||(Nc=!0,Vh=l)}}function La(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 Fw(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 Bw(e){if(La(e)!==e)throw Error(Q(188))}function zO(e){var t=e.alternate;if(!t){if(t=La(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Bw(i),e;if(a===r)return Bw(i),t;a=a.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function jw(e){return e=zO(e),e!==null?Uw(e):null}function Uw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Uw(e);if(t!==null)return t;e=e.sibling}return null}var Hw=Dn.unstable_scheduleCallback,zw=Dn.unstable_cancelCallback,VO=Dn.unstable_shouldYield,$O=Dn.unstable_requestPaint,xt=Dn.unstable_now,WO=Dn.unstable_getCurrentPriorityLevel,$h=Dn.unstable_ImmediatePriority,Vw=Dn.unstable_UserBlockingPriority,Pc=Dn.unstable_NormalPriority,YO=Dn.unstable_LowPriority,$w=Dn.unstable_IdlePriority,Ic=null,Or=null;function qO(e){if(Or&&typeof Or.onCommitFiberRoot=="function")try{Or.onCommitFiberRoot(Ic,e,void 0,(e.current.flags&128)===128)}catch{}}var hr=Math.clz32?Math.clz32:XO,GO=Math.log,KO=Math.LN2;function XO(e){return e>>>=0,e===0?32:31-(GO(e)/KO|0)|0}var Oc=64,Dc=4194304;function uu(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 Lc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=uu(s):(a&=o,a!==0&&(r=uu(a)))}else o=n&~i,o!==0?r=uu(o):a!==0&&(r=uu(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&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-hr(t),i=1<<n,r|=e[n],t&=~i;return r}function QO(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 ZO(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-hr(a),s=1<<o,u=i[o];u===-1?(!(s&n)||s&r)&&(i[o]=QO(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}}function Wh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ww(){var e=Oc;return Oc<<=1,!(Oc&4194240)&&(Oc=64),e}function Yh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hr(t),e[t]=n}function JO(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-hr(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function qh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-hr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qe=0;function Yw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var qw,Gh,Gw,Kw,Xw,Kh=!1,Mc=[],Ii=null,Oi=null,Di=null,cu=new Map,du=new Map,Li=[],eD="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 Qw(e,t){switch(e){case"focusin":case"focusout":Ii=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Di=null;break;case"pointerover":case"pointerout":cu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(t.pointerId)}}function fu(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Cu(t),t!==null&&Gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function tD(e,t,n,r,i){switch(t){case"focusin":return Ii=fu(Ii,e,t,n,r,i),!0;case"dragenter":return Oi=fu(Oi,e,t,n,r,i),!0;case"mouseover":return Di=fu(Di,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return cu.set(a,fu(cu.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,du.set(a,fu(du.get(a)||null,e,t,n,r,i)),!0}return!1}function Zw(e){var t=Ma(e.target);if(t!==null){var n=La(t);if(n!==null){if(t=n.tag,t===13){if(t=Fw(n),t!==null){e.blockedOn=t,Xw(e.priority,function(){Gw(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 Fc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bh=r,n.target.dispatchEvent(r),Bh=null}else return t=Cu(n),t!==null&&Gh(t),e.blockedOn=n,!1;t.shift()}return!0}function Jw(e,t,n){Fc(e)&&n.delete(t)}function nD(){Kh=!1,Ii!==null&&Fc(Ii)&&(Ii=null),Oi!==null&&Fc(Oi)&&(Oi=null),Di!==null&&Fc(Di)&&(Di=null),cu.forEach(Jw),du.forEach(Jw)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,Kh||(Kh=!0,Dn.unstable_scheduleCallback(Dn.unstable_NormalPriority,nD)))}function hu(e){function t(i){return pu(i,e)}if(0<Mc.length){pu(Mc[0],e);for(var n=1;n<Mc.length;n++){var r=Mc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ii!==null&&pu(Ii,e),Oi!==null&&pu(Oi,e),Di!==null&&pu(Di,e),cu.forEach(t),du.forEach(t),n=0;n<Li.length;n++)r=Li[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Li.length&&(n=Li[0],n.blockedOn===null);)Zw(n),n.blockedOn===null&&Li.shift()}var No=ti.ReactCurrentBatchConfig,Bc=!0;function rD(e,t,n,r){var i=qe,a=No.transition;No.transition=null;try{qe=1,Xh(e,t,n,r)}finally{qe=i,No.transition=a}}function iD(e,t,n,r){var i=qe,a=No.transition;No.transition=null;try{qe=4,Xh(e,t,n,r)}finally{qe=i,No.transition=a}}function Xh(e,t,n,r){if(Bc){var i=Qh(e,t,n,r);if(i===null)hm(e,t,r,jc,n),Qw(e,r);else if(tD(i,e,t,n,r))r.stopPropagation();else if(Qw(e,r),t&4&&-1<eD.indexOf(e)){for(;i!==null;){var a=Cu(i);if(a!==null&&qw(a),a=Qh(e,t,n,r),a===null&&hm(e,t,r,jc,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else hm(e,t,r,null,n)}}var jc=null;function Qh(e,t,n,r){if(jc=null,e=jh(r),e=Ma(e),e!==null)if(t=La(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Fw(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 jc=e,null}function eb(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(WO()){case $h:return 1;case Vw:return 4;case Pc:case YO:return 16;case $w:return 536870912;default:return 16}default:return 16}}var Mi=null,Zh=null,Uc=null;function tb(){if(Uc)return Uc;var e,t=Zh,n=t.length,r,i="value"in Mi?Mi.value:Mi.textContent,a=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[a-r];r++);return Uc=i.slice(e,1<r?1-r:void 0)}function Hc(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 zc(){return!0}function nb(){return!1}function Ln(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?zc:nb,this.isPropagationStopped=nb,this}return ct(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=zc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zc)},persist:function(){},isPersistent:zc}),t}var Po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jh=Ln(Po),mu=ct({},Po,{view:0,detail:0}),aD=Ln(mu),em,tm,gu,Vc=ct({},mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rm,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!==gu&&(gu&&e.type==="mousemove"?(em=e.screenX-gu.screenX,tm=e.screenY-gu.screenY):tm=em=0,gu=e),em)},movementY:function(e){return"movementY"in e?e.movementY:tm}}),rb=Ln(Vc),oD=ct({},Vc,{dataTransfer:0}),sD=Ln(oD),uD=ct({},mu,{relatedTarget:0}),nm=Ln(uD),lD=ct({},Po,{animationName:0,elapsedTime:0,pseudoElement:0}),cD=Ln(lD),dD=ct({},Po,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fD=Ln(dD),pD=ct({},Po,{data:0}),ib=Ln(pD),hD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mD={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"},gD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gD[e])?!!t[e]:!1}function rm(){return yD}var vD=ct({},mu,{key:function(e){if(e.key){var t=hD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rm,charCode:function(e){return e.type==="keypress"?Hc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wD=Ln(vD),bD=ct({},Vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ab=Ln(bD),xD=ct({},mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rm}),ED=Ln(xD),TD=ct({},Po,{propertyName:0,elapsedTime:0,pseudoElement:0}),_D=Ln(TD),SD=ct({},Vc,{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}),CD=Ln(SD),AD=[9,13,27,32],im=ei&&"CompositionEvent"in window,yu=null;ei&&"documentMode"in document&&(yu=document.documentMode);var kD=ei&&"TextEvent"in window&&!yu,ob=ei&&(!im||yu&&8<yu&&11>=yu),sb=" ",ub=!1;function lb(e,t){switch(e){case"keyup":return AD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Io=!1;function RD(e,t){switch(e){case"compositionend":return cb(t);case"keypress":return t.which!==32?null:(ub=!0,sb);case"textInput":return e=t.data,e===sb&&ub?null:e;default:return null}}function ND(e,t){if(Io)return e==="compositionend"||!im&&lb(e,t)?(e=tb(),Uc=Zh=Mi=null,Io=!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 ob&&t.locale!=="ko"?null:t.data;default:return null}}var PD={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 db(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PD[e.type]:t==="textarea"}function fb(e,t,n,r){Iw(r),t=Gc(t,"onChange"),0<t.length&&(n=new Jh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var vu=null,wu=null;function ID(e){Nb(e,0)}function $c(e){var t=Fo(e);if(bw(t))return e}function OD(e,t){if(e==="change")return t}var pb=!1;if(ei){var am;if(ei){var om="oninput"in document;if(!om){var hb=document.createElement("div");hb.setAttribute("oninput","return;"),om=typeof hb.oninput=="function"}am=om}else am=!1;pb=am&&(!document.documentMode||9<document.documentMode)}function mb(){vu&&(vu.detachEvent("onpropertychange",gb),wu=vu=null)}function gb(e){if(e.propertyName==="value"&&$c(wu)){var t=[];fb(t,wu,e,jh(e)),Mw(ID,t)}}function DD(e,t,n){e==="focusin"?(mb(),vu=t,wu=n,vu.attachEvent("onpropertychange",gb)):e==="focusout"&&mb()}function LD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $c(wu)}function MD(e,t){if(e==="click")return $c(t)}function FD(e,t){if(e==="input"||e==="change")return $c(t)}function BD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mr=typeof Object.is=="function"?Object.is:BD;function bu(e,t){if(mr(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(!yh.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function yb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vb(e,t){var n=yb(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=yb(n)}}function wb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bb(){for(var e=window,t=Ac();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ac(e.document)}return t}function sm(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 jD(e){var t=bb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wb(n.ownerDocument.documentElement,n)){if(r!==null&&sm(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,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=vb(n,a);var o=vb(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(),a>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 UD=ei&&"documentMode"in document&&11>=document.documentMode,Oo=null,um=null,xu=null,lm=!1;function xb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lm||Oo==null||Oo!==Ac(r)||(r=Oo,"selectionStart"in r&&sm(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}),xu&&bu(xu,r)||(xu=r,r=Gc(um,"onSelect"),0<r.length&&(t=new Jh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oo)))}function Wc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Do={animationend:Wc("Animation","AnimationEnd"),animationiteration:Wc("Animation","AnimationIteration"),animationstart:Wc("Animation","AnimationStart"),transitionend:Wc("Transition","TransitionEnd")},cm={},Eb={};ei&&(Eb=document.createElement("div").style,"AnimationEvent"in window||(delete Do.animationend.animation,delete Do.animationiteration.animation,delete Do.animationstart.animation),"TransitionEvent"in window||delete Do.transitionend.transition);function Yc(e){if(cm[e])return cm[e];if(!Do[e])return e;var t=Do[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Eb)return cm[e]=t[n];return e}var Tb=Yc("animationend"),_b=Yc("animationiteration"),Sb=Yc("animationstart"),Cb=Yc("transitionend"),Ab=new Map,kb="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 Fi(e,t){Ab.set(e,t),Da(t,[e])}for(var dm=0;dm<kb.length;dm++){var fm=kb[dm],HD=fm.toLowerCase(),zD=fm[0].toUpperCase()+fm.slice(1);Fi(HD,"on"+zD)}Fi(Tb,"onAnimationEnd"),Fi(_b,"onAnimationIteration"),Fi(Sb,"onAnimationStart"),Fi("dblclick","onDoubleClick"),Fi("focusin","onFocus"),Fi("focusout","onBlur"),Fi(Cb,"onTransitionEnd"),_o("onMouseEnter",["mouseout","mouseover"]),_o("onMouseLeave",["mouseout","mouseover"]),_o("onPointerEnter",["pointerout","pointerover"]),_o("onPointerLeave",["pointerout","pointerover"]),Da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Da("onBeforeInput",["compositionend","keypress","textInput","paste"]),Da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eu="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(" "),VD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eu));function Rb(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,HO(r,t,void 0,e),e.currentTarget=null}function Nb(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 a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==a&&i.isPropagationStopped())break e;Rb(i,s,l),a=u}else for(o=0;o<r.length;o++){if(s=r[o],u=s.instance,l=s.currentTarget,s=s.listener,u!==a&&i.isPropagationStopped())break e;Rb(i,s,l),a=u}}}if(Nc)throw e=Vh,Nc=!1,Vh=null,e}function nt(e,t){var n=t[bm];n===void 0&&(n=t[bm]=new Set);var r=e+"__bubble";n.has(r)||(Pb(t,e,2,!1),n.add(r))}function pm(e,t,n){var r=0;t&&(r|=4),Pb(n,e,r,t)}var qc="_reactListening"+Math.random().toString(36).slice(2);function Tu(e){if(!e[qc]){e[qc]=!0,fw.forEach(function(n){n!=="selectionchange"&&(VD.has(n)||pm(n,!1,e),pm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qc]||(t[qc]=!0,pm("selectionchange",!1,t))}}function Pb(e,t,n,r){switch(eb(t)){case 1:var i=rD;break;case 4:i=iD;break;default:i=Xh}n=i.bind(null,t,n,e),i=void 0,!zh||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 hm(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ma(s),o===null)return;if(u=o.tag,u===5||u===6){r=a=o;continue e}s=s.parentNode}}r=r.return}Mw(function(){var l=a,c=jh(n),d=[];e:{var f=Ab.get(e);if(f!==void 0){var p=Jh,m=e;switch(e){case"keypress":if(Hc(n)===0)break e;case"keydown":case"keyup":p=wD;break;case"focusin":m="focus",p=nm;break;case"focusout":m="blur",p=nm;break;case"beforeblur":case"afterblur":p=nm;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":p=rb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=sD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=ED;break;case Tb:case _b:case Sb:p=cD;break;case Cb:p=_D;break;case"scroll":p=aD;break;case"wheel":p=CD;break;case"copy":case"cut":case"paste":p=fD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=ab}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var w=l,b;w!==null;){b=w;var T=b.stateNode;if(b.tag===5&&T!==null&&(b=T,y!==null&&(T=au(w,y),T!=null&&g.push(_u(w,T,b)))),x)break;w=w.return}0<g.length&&(f=new p(f,m,null,n,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Bh&&(m=n.relatedTarget||n.fromElement)&&(Ma(m)||m[ni]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=l,m=m?Ma(m):null,m!==null&&(x=La(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=l),p!==m)){if(g=rb,T="onMouseLeave",y="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(g=ab,T="onPointerLeave",y="onPointerEnter",w="pointer"),x=p==null?f:Fo(p),b=m==null?f:Fo(m),f=new g(T,w+"leave",p,n,c),f.target=x,f.relatedTarget=b,T=null,Ma(c)===l&&(g=new g(y,w+"enter",m,n,c),g.target=b,g.relatedTarget=x,T=g),x=T,p&&m)t:{for(g=p,y=m,w=0,b=g;b;b=Lo(b))w++;for(b=0,T=y;T;T=Lo(T))b++;for(;0<w-b;)g=Lo(g),w--;for(;0<b-w;)y=Lo(y),b--;for(;w--;){if(g===y||y!==null&&g===y.alternate)break t;g=Lo(g),y=Lo(y)}g=null}else g=null;p!==null&&Ib(d,f,p,g,!1),m!==null&&x!==null&&Ib(d,x,m,g,!0)}}e:{if(f=l?Fo(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=OD;else if(db(f))if(pb)S=FD;else{S=LD;var _=DD}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=MD);if(S&&(S=S(e,l))){fb(d,S,n,c);break e}_&&_(e,f,l),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&Oh(f,"number",f.value)}switch(_=l?Fo(l):window,e){case"focusin":(db(_)||_.contentEditable==="true")&&(Oo=_,um=l,xu=null);break;case"focusout":xu=um=Oo=null;break;case"mousedown":lm=!0;break;case"contextmenu":case"mouseup":case"dragend":lm=!1,xb(d,n,c);break;case"selectionchange":if(UD)break;case"keydown":case"keyup":xb(d,n,c)}var N;if(im)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Io?lb(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(ob&&n.locale!=="ko"&&(Io||D!=="onCompositionStart"?D==="onCompositionEnd"&&Io&&(N=tb()):(Mi=c,Zh="value"in Mi?Mi.value:Mi.textContent,Io=!0)),_=Gc(l,D),0<_.length&&(D=new ib(D,e,null,n,c),d.push({event:D,listeners:_}),N?D.data=N:(N=cb(n),N!==null&&(D.data=N)))),(N=kD?RD(e,n):ND(e,n))&&(l=Gc(l,"onBeforeInput"),0<l.length&&(c=new ib("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:l}),c.data=N))}Nb(d,t)})}function _u(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=au(e,n),a!=null&&r.unshift(_u(e,a,i)),a=au(e,t),a!=null&&r.push(_u(e,a,i))),e=e.return}return r}function Lo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ib(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&l!==null&&(s=l,i?(u=au(n,a),u!=null&&o.unshift(_u(n,u,s))):i||(u=au(n,a),u!=null&&o.push(_u(n,u,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $D=/\r\n?/g,WD=/\u0000|\uFFFD/g;function Ob(e){return(typeof e=="string"?e:""+e).replace($D,`
38
38
  `).replace(WD,"")}function Kc(e,t,n){if(t=Ob(t),Ob(e)!==t&&n)throw Error(Q(425))}function Xc(){}var mm=null,gm=null;function ym(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 vm=typeof setTimeout=="function"?setTimeout:void 0,YD=typeof clearTimeout=="function"?clearTimeout:void 0,Db=typeof Promise=="function"?Promise:void 0,qD=typeof queueMicrotask=="function"?queueMicrotask:typeof Db<"u"?function(e){return Db.resolve(null).then(e).catch(GD)}:vm;function GD(e){setTimeout(function(){throw e})}function wm(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),hu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);hu(t)}function Bi(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 Lb(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 Mo=Math.random().toString(36).slice(2),Dr="__reactFiber$"+Mo,Su="__reactProps$"+Mo,ni="__reactContainer$"+Mo,bm="__reactEvents$"+Mo,KD="__reactListeners$"+Mo,XD="__reactHandles$"+Mo;function Ma(e){var t=e[Dr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ni]||n[Dr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lb(e);e!==null;){if(n=e[Dr])return n;e=Lb(e)}return t}e=n,n=e.parentNode}return null}function Cu(e){return e=e[Dr]||e[ni],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Qc(e){return e[Su]||null}var xm=[],Bo=-1;function ji(e){return{current:e}}function rt(e){0>Bo||(e.current=xm[Bo],xm[Bo]=null,Bo--)}function et(e,t){Bo++,xm[Bo]=e.current,e.current=t}var Ui={},qt=ji(Ui),vn=ji(!1),Fa=Ui;function jo(e,t){var n=e.type.contextTypes;if(!n)return Ui;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function wn(e){return e=e.childContextTypes,e!=null}function Zc(){rt(vn),rt(qt)}function Mb(e,t,n){if(qt.current!==Ui)throw Error(Q(168));et(qt,t),et(vn,n)}function Fb(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(Q(108,DO(e)||"Unknown",i));return ct({},n,r)}function Jc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ui,Fa=qt.current,et(qt,e),et(vn,vn.current),!0}function Bb(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=Fb(e,t,Fa),r.__reactInternalMemoizedMergedChildContext=e,rt(vn),rt(qt),et(qt,e)):rt(vn),et(vn,n)}var ri=null,ed=!1,Em=!1;function jb(e){ri===null?ri=[e]:ri.push(e)}function QD(e){ed=!0,jb(e)}function Hi(){if(!Em&&ri!==null){Em=!0;var e=0,t=qe;try{var n=ri;for(qe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ri=null,ed=!1}catch(i){throw ri!==null&&(ri=ri.slice(e+1)),Hw($h,Hi),i}finally{qe=t,Em=!1}}return null}var Uo=[],Ho=0,td=null,nd=0,Qn=[],Zn=0,Ba=null,ii=1,ai="";function ja(e,t){Uo[Ho++]=nd,Uo[Ho++]=td,td=e,nd=t}function Ub(e,t,n){Qn[Zn++]=ii,Qn[Zn++]=ai,Qn[Zn++]=Ba,Ba=e;var r=ii;e=ai;var i=32-hr(r)-1;r&=~(1<<i),n+=1;var a=32-hr(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ii=1<<32-hr(t)+i|n<<i|r,ai=a+e}else ii=1<<a|n<<i|r,ai=e}function Tm(e){e.return!==null&&(ja(e,1),Ub(e,1,0))}function _m(e){for(;e===td;)td=Uo[--Ho],Uo[Ho]=null,nd=Uo[--Ho],Uo[Ho]=null;for(;e===Ba;)Ba=Qn[--Zn],Qn[Zn]=null,ai=Qn[--Zn],Qn[Zn]=null,ii=Qn[--Zn],Qn[Zn]=null}var Mn=null,Fn=null,ot=!1,gr=null;function Hb(e,t){var n=nr(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 zb(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,Mn=e,Fn=Bi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mn=e,Fn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ba!==null?{id:ii,overflow:ai}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mn=e,Fn=null,!0):!1;default:return!1}}function Sm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cm(e){if(ot){var t=Fn;if(t){var n=t;if(!zb(e,t)){if(Sm(e))throw Error(Q(418));t=Bi(n.nextSibling);var r=Mn;t&&zb(e,t)?Hb(r,n):(e.flags=e.flags&-4097|2,ot=!1,Mn=e)}}else{if(Sm(e))throw Error(Q(418));e.flags=e.flags&-4097|2,ot=!1,Mn=e}}}function Vb(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function rd(e){if(e!==Mn)return!1;if(!ot)return Vb(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ym(e.type,e.memoizedProps)),t&&(t=Fn)){if(Sm(e))throw $b(),Error(Q(418));for(;t;)Hb(e,t),t=Bi(t.nextSibling)}if(Vb(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Fn=Bi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Fn=null}}else Fn=Mn?Bi(e.stateNode.nextSibling):null;return!0}function $b(){for(var e=Fn;e;)e=Bi(e.nextSibling)}function zo(){Fn=Mn=null,ot=!1}function Am(e){gr===null?gr=[e]:gr.push(e)}var ZD=ti.ReactCurrentBatchConfig;function Au(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(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function id(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wb(e){var t=e._init;return t(e._payload)}function Yb(e){function t(y,w){if(e){var b=y.deletions;b===null?(y.deletions=[w],y.flags|=16):b.push(w)}}function n(y,w){if(!e)return null;for(;w!==null;)t(y,w),w=w.sibling;return null}function r(y,w){for(y=new Map;w!==null;)w.key!==null?y.set(w.key,w):y.set(w.index,w),w=w.sibling;return y}function i(y,w){return y=Ki(y,w),y.index=0,y.sibling=null,y}function a(y,w,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<w?(y.flags|=2,w):b):(y.flags|=2,w)):(y.flags|=1048576,w)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function s(y,w,b,T){return w===null||w.tag!==6?(w=vg(b,y.mode,T),w.return=y,w):(w=i(w,b),w.return=y,w)}function u(y,w,b,T){var S=b.type;return S===Co?c(y,w,b.props.children,T,b.key):w!==null&&(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ni&&Wb(S)===w.type)?(T=i(w,b.props),T.ref=Au(y,w,b),T.return=y,T):(T=kd(b.type,b.key,b.props,null,y.mode,T),T.ref=Au(y,w,b),T.return=y,T)}function l(y,w,b,T){return w===null||w.tag!==4||w.stateNode.containerInfo!==b.containerInfo||w.stateNode.implementation!==b.implementation?(w=wg(b,y.mode,T),w.return=y,w):(w=i(w,b.children||[]),w.return=y,w)}function c(y,w,b,T,S){return w===null||w.tag!==7?(w=qa(b,y.mode,T,S),w.return=y,w):(w=i(w,b),w.return=y,w)}function d(y,w,b){if(typeof w=="string"&&w!==""||typeof w=="number")return w=vg(""+w,y.mode,b),w.return=y,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Sc:return b=kd(w.type,w.key,w.props,null,y.mode,b),b.ref=Au(y,null,w),b.return=y,b;case So:return w=wg(w,y.mode,b),w.return=y,w;case Ni:var T=w._init;return d(y,T(w._payload),b)}if(nu(w)||eu(w))return w=qa(w,y.mode,b,null),w.return=y,w;id(y,w)}return null}function f(y,w,b,T){var S=w!==null?w.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:s(y,w,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Sc:return b.key===S?u(y,w,b,T):null;case So:return b.key===S?l(y,w,b,T):null;case Ni:return S=b._init,f(y,w,S(b._payload),T)}if(nu(b)||eu(b))return S!==null?null:c(y,w,b,T,null);id(y,b)}return null}function p(y,w,b,T,S){if(typeof T=="string"&&T!==""||typeof T=="number")return y=y.get(b)||null,s(w,y,""+T,S);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Sc:return y=y.get(T.key===null?b:T.key)||null,u(w,y,T,S);case So:return y=y.get(T.key===null?b:T.key)||null,l(w,y,T,S);case Ni:var _=T._init;return p(y,w,b,_(T._payload),S)}if(nu(T)||eu(T))return y=y.get(b)||null,c(w,y,T,S,null);id(w,T)}return null}function m(y,w,b,T){for(var S=null,_=null,N=w,D=w=0,V=null;N!==null&&D<b.length;D++){N.index>D?(V=N,N=null):V=N.sibling;var P=f(y,N,b[D],T);if(P===null){N===null&&(N=V);break}e&&N&&P.alternate===null&&t(y,N),w=a(P,w,D),_===null?S=P:_.sibling=P,_=P,N=V}if(D===b.length)return n(y,N),ot&&ja(y,D),S;if(N===null){for(;D<b.length;D++)N=d(y,b[D],T),N!==null&&(w=a(N,w,D),_===null?S=N:_.sibling=N,_=N);return ot&&ja(y,D),S}for(N=r(y,N);D<b.length;D++)V=p(N,y,D,b[D],T),V!==null&&(e&&V.alternate!==null&&N.delete(V.key===null?D:V.key),w=a(V,w,D),_===null?S=V:_.sibling=V,_=V);return e&&N.forEach(function($){return t(y,$)}),ot&&ja(y,D),S}function g(y,w,b,T){var S=eu(b);if(typeof S!="function")throw Error(Q(150));if(b=S.call(b),b==null)throw Error(Q(151));for(var _=S=null,N=w,D=w=0,V=null,P=b.next();N!==null&&!P.done;D++,P=b.next()){N.index>D?(V=N,N=null):V=N.sibling;var $=f(y,N,P.value,T);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(y,N),w=a($,w,D),_===null?S=$:_.sibling=$,_=$,N=V}if(P.done)return n(y,N),ot&&ja(y,D),S;if(N===null){for(;!P.done;D++,P=b.next())P=d(y,P.value,T),P!==null&&(w=a(P,w,D),_===null?S=P:_.sibling=P,_=P);return ot&&ja(y,D),S}for(N=r(y,N);!P.done;D++,P=b.next())P=p(N,y,D,P.value,T),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?D:P.key),w=a(P,w,D),_===null?S=P:_.sibling=P,_=P);return e&&N.forEach(function(H){return t(y,H)}),ot&&ja(y,D),S}function x(y,w,b,T){if(typeof b=="object"&&b!==null&&b.type===Co&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Sc:e:{for(var S=b.key,_=w;_!==null;){if(_.key===S){if(S=b.type,S===Co){if(_.tag===7){n(y,_.sibling),w=i(_,b.props.children),w.return=y,y=w;break e}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ni&&Wb(S)===_.type){n(y,_.sibling),w=i(_,b.props),w.ref=Au(y,_,b),w.return=y,y=w;break e}n(y,_);break}else t(y,_);_=_.sibling}b.type===Co?(w=qa(b.props.children,y.mode,T,b.key),w.return=y,y=w):(T=kd(b.type,b.key,b.props,null,y.mode,T),T.ref=Au(y,w,b),T.return=y,y=T)}return o(y);case So:e:{for(_=b.key;w!==null;){if(w.key===_)if(w.tag===4&&w.stateNode.containerInfo===b.containerInfo&&w.stateNode.implementation===b.implementation){n(y,w.sibling),w=i(w,b.children||[]),w.return=y,y=w;break e}else{n(y,w);break}else t(y,w);w=w.sibling}w=wg(b,y.mode,T),w.return=y,y=w}return o(y);case Ni:return _=b._init,x(y,w,_(b._payload),T)}if(nu(b))return m(y,w,b,T);if(eu(b))return g(y,w,b,T);id(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,w!==null&&w.tag===6?(n(y,w.sibling),w=i(w,b),w.return=y,y=w):(n(y,w),w=vg(b,y.mode,T),w.return=y,y=w),o(y)):n(y,w)}return x}var Vo=Yb(!0),qb=Yb(!1),ad=ji(null),od=null,$o=null,km=null;function Rm(){km=$o=od=null}function Nm(e){var t=ad.current;rt(ad),e._currentValue=t}function Pm(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 Wo(e,t){od=e,km=$o=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(bn=!0),e.firstContext=null)}function Jn(e){var t=e._currentValue;if(km!==e)if(e={context:e,memoizedValue:t,next:null},$o===null){if(od===null)throw Error(Q(308));$o=e,od.dependencies={lanes:0,firstContext:e}}else $o=$o.next=e;return t}var Ua=null;function Im(e){Ua===null?Ua=[e]:Ua.push(e)}function Gb(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Im(t)):(n.next=i.next,i.next=n),t.interleaved=n,oi(e,r)}function oi(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 zi=!1;function Om(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kb(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 si(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ue&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,oi(e,n)}return i=r.interleaved,i===null?(t.next=t,Im(r)):(t.next=i.next,i.next=t),r.interleaved=t,oi(e,n)}function sd(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,qh(e,n)}}function Xb(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=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};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,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 ud(e,t,n,r){var i=e.updateQueue;zi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,o===null?a=l:o.next=l,o=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(a!==null){var d=i.baseState;o=0,c=l=u=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=ct({},d,f);break e;case 2:zi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=p,u=d):c=c.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Va|=o,e.lanes=o,e.memoizedState=d}}function Qb(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(Q(191,i));i.call(r)}}}var ku={},Lr=ji(ku),Ru=ji(ku),Nu=ji(ku);function Ha(e){if(e===ku)throw Error(Q(174));return e}function Dm(e,t){switch(et(Nu,t),et(Ru,e),et(Lr,ku),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lh(t,e)}rt(Lr),et(Lr,t)}function Yo(){rt(Lr),rt(Ru),rt(Nu)}function Zb(e){Ha(Nu.current);var t=Ha(Lr.current),n=Lh(t,e.type);t!==n&&(et(Ru,e),et(Lr,n))}function Lm(e){Ru.current===e&&(rt(Lr),rt(Ru))}var dt=ji(0);function ld(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 Mm=[];function Fm(){for(var e=0;e<Mm.length;e++)Mm[e]._workInProgressVersionPrimary=null;Mm.length=0}var cd=ti.ReactCurrentDispatcher,Bm=ti.ReactCurrentBatchConfig,za=0,ft=null,Nt=null,Ot=null,dd=!1,Pu=!1,Iu=0,JD=0;function Gt(){throw Error(Q(321))}function jm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function Um(e,t,n,r,i,a){if(za=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cd.current=e===null||e.memoizedState===null?r6:i6,e=n(r,i),Pu){a=0;do{if(Pu=!1,Iu=0,25<=a)throw Error(Q(301));a+=1,Ot=Nt=null,t.updateQueue=null,cd.current=a6,e=n(r,i)}while(Pu)}if(cd.current=hd,t=Nt!==null&&Nt.next!==null,za=0,Ot=Nt=ft=null,dd=!1,t)throw Error(Q(300));return e}function Hm(){var e=Iu!==0;return Iu=0,e}function Mr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?ft.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function er(){if(Nt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Nt.next;var t=Ot===null?ft.memoizedState:Ot.next;if(t!==null)Ot=t,Nt=e;else{if(e===null)throw Error(Q(310));Nt=e,e={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},Ot===null?ft.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function Ou(e,t){return typeof t=="function"?t(e):t}function zm(e){var t=er(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=Nt,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var s=o=null,u=null,l=a;do{var c=l.lane;if((za&c)===c)u!==null&&(u=u.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};u===null?(s=u=d,o=r):u=u.next=d,ft.lanes|=c,Va|=c}l=l.next}while(l!==null&&l!==a);u===null?o=r:u.next=s,mr(r,t.memoizedState)||(bn=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,ft.lanes|=a,Va|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vm(e){var t=er(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);mr(a,t.memoizedState)||(bn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Jb(){}function ex(e,t){var n=ft,r=er(),i=t(),a=!mr(r.memoizedState,i);if(a&&(r.memoizedState=i,bn=!0),r=r.queue,$m(rx.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Ot!==null&&Ot.memoizedState.tag&1){if(n.flags|=2048,Du(9,nx.bind(null,n,r,i,t),void 0,null),Dt===null)throw Error(Q(349));za&30||tx(n,t,i)}return i}function tx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function nx(e,t,n,r){t.value=n,t.getSnapshot=r,ix(t)&&ax(e)}function rx(e,t,n){return n(function(){ix(t)&&ax(e)})}function ix(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function ax(e){var t=oi(e,1);t!==null&&br(t,e,1,-1)}function ox(e){var t=Mr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ou,lastRenderedState:e},t.queue=e,e=e.dispatch=n6.bind(null,ft,e),[t.memoizedState,e]}function Du(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.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 sx(){return er().memoizedState}function fd(e,t,n,r){var i=Mr();ft.flags|=e,i.memoizedState=Du(1|t,n,void 0,r===void 0?null:r)}function pd(e,t,n,r){var i=er();r=r===void 0?null:r;var a=void 0;if(Nt!==null){var o=Nt.memoizedState;if(a=o.destroy,r!==null&&jm(r,o.deps)){i.memoizedState=Du(t,n,a,r);return}}ft.flags|=e,i.memoizedState=Du(1|t,n,a,r)}function ux(e,t){return fd(8390656,8,e,t)}function $m(e,t){return pd(2048,8,e,t)}function lx(e,t){return pd(4,2,e,t)}function cx(e,t){return pd(4,4,e,t)}function dx(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 fx(e,t,n){return n=n!=null?n.concat([e]):null,pd(4,4,dx.bind(null,t,e),n)}function Wm(){}function px(e,t){var n=er();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hx(e,t){var n=er();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mx(e,t,n){return za&21?(mr(n,t)||(n=Ww(),ft.lanes|=n,Va|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bn=!0),e.memoizedState=n)}function e6(e,t){var n=qe;qe=n!==0&&4>n?n:4,e(!0);var r=Bm.transition;Bm.transition={};try{e(!1),t()}finally{qe=n,Bm.transition=r}}function gx(){return er().memoizedState}function t6(e,t,n){var r=qi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yx(e))vx(t,n);else if(n=Gb(e,t,n,r),n!==null){var i=dn();br(n,e,r,i),wx(n,t,r)}}function n6(e,t,n){var r=qi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yx(e))vx(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,mr(s,o)){var u=t.interleaved;u===null?(i.next=i,Im(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Gb(e,t,i,r),n!==null&&(i=dn(),br(n,e,r,i),wx(n,t,r))}}function yx(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function vx(e,t){Pu=dd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qh(e,n)}}var hd={readContext:Jn,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},r6={readContext:Jn,useCallback:function(e,t){return Mr().memoizedState=[e,t===void 0?null:t],e},useContext:Jn,useEffect:ux,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fd(4194308,4,dx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fd(4194308,4,e,t)},useInsertionEffect:function(e,t){return fd(4,2,e,t)},useMemo:function(e,t){var n=Mr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Mr();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=t6.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Mr();return e={current:e},t.memoizedState=e},useState:ox,useDebugValue:Wm,useDeferredValue:function(e){return Mr().memoizedState=e},useTransition:function(){var e=ox(!1),t=e[0];return e=e6.bind(null,e[1]),Mr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ft,i=Mr();if(ot){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Dt===null)throw Error(Q(349));za&30||tx(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ux(rx.bind(null,r,a,e),[e]),r.flags|=2048,Du(9,nx.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Mr(),t=Dt.identifierPrefix;if(ot){var n=ai,r=ii;n=(r&~(1<<32-hr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Iu++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=JD++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},i6={readContext:Jn,useCallback:px,useContext:Jn,useEffect:$m,useImperativeHandle:fx,useInsertionEffect:lx,useLayoutEffect:cx,useMemo:hx,useReducer:zm,useRef:sx,useState:function(){return zm(Ou)},useDebugValue:Wm,useDeferredValue:function(e){var t=er();return mx(t,Nt.memoizedState,e)},useTransition:function(){var e=zm(Ou)[0],t=er().memoizedState;return[e,t]},useMutableSource:Jb,useSyncExternalStore:ex,useId:gx,unstable_isNewReconciler:!1},a6={readContext:Jn,useCallback:px,useContext:Jn,useEffect:$m,useImperativeHandle:fx,useInsertionEffect:lx,useLayoutEffect:cx,useMemo:hx,useReducer:Vm,useRef:sx,useState:function(){return Vm(Ou)},useDebugValue:Wm,useDeferredValue:function(e){var t=er();return Nt===null?t.memoizedState=e:mx(t,Nt.memoizedState,e)},useTransition:function(){var e=Vm(Ou)[0],t=er().memoizedState;return[e,t]},useMutableSource:Jb,useSyncExternalStore:ex,useId:gx,unstable_isNewReconciler:!1};function yr(e,t){if(e&&e.defaultProps){t=ct({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ym(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ct({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var md={isMounted:function(e){return(e=e._reactInternals)?La(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=dn(),i=qi(e),a=si(r,i);a.payload=t,n!=null&&(a.callback=n),t=Vi(e,a,i),t!==null&&(br(t,e,i,r),sd(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=dn(),i=qi(e),a=si(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Vi(e,a,i),t!==null&&(br(t,e,i,r),sd(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=dn(),r=qi(e),i=si(n,r);i.tag=2,t!=null&&(i.callback=t),t=Vi(e,i,r),t!==null&&(br(t,e,r,n),sd(t,e,r))}};function bx(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!bu(n,r)||!bu(i,a):!0}function xx(e,t,n){var r=!1,i=Ui,a=t.contextType;return typeof a=="object"&&a!==null?a=Jn(a):(i=wn(t)?Fa:qt.current,r=t.contextTypes,a=(r=r!=null)?jo(e,i):Ui),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=md,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ex(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&&md.enqueueReplaceState(t,t.state,null)}function qm(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Om(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Jn(a):(a=wn(t)?Fa:qt.current,i.context=jo(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Ym(e,t,a,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&&md.enqueueReplaceState(i,i.state,null),ud(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function qo(e,t){try{var n="",r=t;do n+=OO(r),r=r.return;while(r);var i=n}catch(a){i=`
39
39
  Error generating stack: `+a.message+`
40
- `+a.stack}return{value:e,source:t,stack:i,digest:null}}function Gm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Km(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var o6=typeof WeakMap=="function"?WeakMap:Map;function Tx(e,t,n){n=si(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ed||(Ed=!0,cg=r),Km(e,t)},n}function _x(e,t,n){n=si(-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(){Km(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Km(e,t),typeof r!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Sx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new o6;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=b6.bind(null,e,t,n),t.then(e,e))}function Cx(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 Ax(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=si(-1,1),t.tag=2,Vi(n,t,1))),n.lanes|=1),e)}var s6=ti.ReactCurrentOwner,bn=!1;function cn(e,t,n,r){t.child=e===null?qb(t,null,n,r):Vo(t,e.child,n,r)}function kx(e,t,n,r,i){n=n.render;var a=t.ref;return Wo(t,i),r=Um(e,t,n,r,a,i),n=Hm(),e!==null&&!bn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&n&&Tm(t),t.flags|=1,cn(e,t,r,i),t.child)}function Rx(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!yg(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Nx(e,t,a,r,i)):(e=kd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:bu,n(o,r)&&e.ref===t.ref)return ui(e,t,i)}return t.flags|=1,e=Ki(a,r),e.ref=t.ref,e.return=t,t.child=e}function Nx(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(bu(a,r)&&e.ref===t.ref)if(bn=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(bn=!0);else return t.lanes=e.lanes,ui(e,t,i)}return Xm(e,t,n,r,i)}function Px(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Ko,Bn),Bn|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(Ko,Bn),Bn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,et(Ko,Bn),Bn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,et(Ko,Bn),Bn|=r;return cn(e,t,i,n),t.child}function Ix(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xm(e,t,n,r,i){var a=wn(n)?Fa:qt.current;return a=jo(t,a),Wo(t,i),n=Um(e,t,n,r,a,i),r=Hm(),e!==null&&!bn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&r&&Tm(t),t.flags|=1,cn(e,t,n,i),t.child)}function Ox(e,t,n,r,i){if(wn(n)){var a=!0;Jc(t)}else a=!1;if(Wo(t,i),t.stateNode===null)yd(e,t),xx(t,n,r),qm(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=Jn(l):(l=wn(n)?Fa:qt.current,l=jo(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||u!==l)&&Ex(t,o,r,l),zi=!1;var f=t.memoizedState;o.state=f,ud(t,r,o,i),u=t.memoizedState,s!==r||f!==u||vn.current||zi?(typeof c=="function"&&(Ym(t,n,c,r),u=t.memoizedState),(s=zi||bx(t,n,s,r,f,u,l))?(d||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=u),o.props=r,o.state=u,o.context=l,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Kb(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:yr(t.type,s),o.props=l,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Jn(u):(u=wn(n)?Fa:qt.current,u=jo(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||f!==u)&&Ex(t,o,r,u),zi=!1,f=t.memoizedState,o.state=f,ud(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||vn.current||zi?(typeof p=="function"&&(Ym(t,n,p,r),m=t.memoizedState),(l=zi||bx(t,n,l,r,f,m,u)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=l):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Qm(e,t,n,r,a,i)}function Qm(e,t,n,r,i,a){Ix(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Bb(t,n,!1),ui(e,t,a);r=t.stateNode,s6.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Vo(t,e.child,null,a),t.child=Vo(t,null,s,a)):cn(e,t,s,a),t.memoizedState=r.state,i&&Bb(t,n,!0),t.child}function Dx(e){var t=e.stateNode;t.pendingContext?Mb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mb(e,t.context,!1),Dm(e,t.containerInfo)}function Lx(e,t,n,r,i){return zo(),Am(i),t.flags|=256,cn(e,t,n,r),t.child}var Zm={dehydrated:null,treeContext:null,retryLane:0};function Jm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mx(e,t,n){var r=t.pendingProps,i=dt.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),et(dt,i&1),e===null)return Cm(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,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Rd(o,r,0,null),e=qa(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Jm(n),t.memoizedState=Zm,e):eg(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return u6(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Ki(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Ki(s,a):(a=qa(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Jm(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Zm,r}return a=e.child,e=a.sibling,r=Ki(a,{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 eg(e,t){return t=Rd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gd(e,t,n,r){return r!==null&&Am(r),Vo(t,e.child,null,n),e=eg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function u6(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Gm(Error(Q(422))),gd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Rd({mode:"visible",children:r.children},i,0,null),a=qa(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Vo(t,e.child,null,o),t.child.memoizedState=Jm(o),t.memoizedState=Zm,a);if(!(t.mode&1))return gd(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(Q(419)),r=Gm(a,r,void 0),gd(e,t,o,r)}if(s=(o&e.childLanes)!==0,bn||s){if(r=Dt,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!==a.retryLane&&(a.retryLane=i,oi(e,i),br(r,e,i,-1))}return gg(),r=Gm(Error(Q(421))),gd(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=x6.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fn=Bi(i.nextSibling),Mn=t,ot=!0,gr=null,e!==null&&(Qn[Zn++]=ii,Qn[Zn++]=ai,Qn[Zn++]=Ba,ii=e.id,ai=e.overflow,Ba=t),t=eg(t,r.children),t.flags|=4096,t)}function Fx(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Pm(e.return,t,n)}function tg(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Bx(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(cn(e,t,r.children,n),r=dt.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&&Fx(e,n,t);else if(e.tag===19)Fx(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(et(dt,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&&ld(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),tg(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ld(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}tg(t,!0,n,null,a);break;case"together":tg(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ui(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Ki(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ki(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function l6(e,t,n){switch(t.tag){case 3:Dx(t),zo();break;case 5:Zb(t);break;case 1:wn(t.type)&&Jc(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;et(ad,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(et(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?Mx(e,t,n):(et(dt,dt.current&1),e=ui(e,t,n),e!==null?e.sibling:null);et(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Bx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,Px(e,t,n)}return ui(e,t,n)}var jx,ng,Ux,Hx;jx=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}},ng=function(){},Ux=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ha(Lr.current);var a=null;switch(n){case"input":i=Ph(e,i),r=Ph(e,r),a=[];break;case"select":i=ct({},i,{value:void 0}),r=ct({},r,{value:void 0}),a=[];break;case"textarea":i=Dh(e,i),r=Dh(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xc)}Mh(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Js.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(a=a||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Js.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&nt("scroll",e),a||s===u||(a=[])):(a=a||[]).push(l,u))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Hx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lu(e,t){if(!ot)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 Kt(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 c6(e,t,n){var r=t.pendingProps;switch(_m(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(t),null;case 1:return wn(t.type)&&Zc(),Kt(t),null;case 3:return r=t.stateNode,Yo(),rt(vn),rt(qt),Fm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(rd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gr!==null&&(pg(gr),gr=null))),ng(e,t),Kt(t),null;case 5:Lm(t);var i=Ha(Nu.current);if(n=t.type,e!==null&&t.stateNode!=null)Ux(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Kt(t),null}if(e=Ha(Lr.current),rd(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Dr]=t,r[Su]=a,e=(t.mode&1)!==0,n){case"dialog":nt("cancel",r),nt("close",r);break;case"iframe":case"object":case"embed":nt("load",r);break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],r);break;case"source":nt("error",r);break;case"img":case"image":case"link":nt("error",r),nt("load",r);break;case"details":nt("toggle",r);break;case"input":xw(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":_w(r,a),nt("invalid",r)}Mh(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Kc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Kc(r.textContent,s,e),i=["children",""+s]):Js.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":Cc(r),Tw(r,a,!0);break;case"textarea":Cc(r),Cw(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Xc)}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=Aw(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[Dr]=t,e[Su]=r,jx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Fh(n,r),n){case"dialog":nt("cancel",e),nt("close",e),i=r;break;case"iframe":case"object":case"embed":nt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],e);i=r;break;case"source":nt("error",e),i=r;break;case"img":case"image":case"link":nt("error",e),nt("load",e),i=r;break;case"details":nt("toggle",e),i=r;break;case"input":xw(e,r),i=Ph(e,r),nt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ct({},r,{value:void 0}),nt("invalid",e);break;case"textarea":_w(e,r),i=Dh(e,r),nt("invalid",e);break;default:i=r}Mh(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="style"?Nw(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&kw(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ru(e,u):typeof u=="number"&&ru(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Js.hasOwnProperty(a)?u!=null&&a==="onScroll"&&nt("scroll",e):u!=null&&bh(e,a,u,o))}switch(n){case"input":Cc(e),Tw(e,r,!1);break;case"textarea":Cc(e),Cw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Ao(e,!!r.multiple,a,!1):r.defaultValue!=null&&Ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Xc)}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 Kt(t),null;case 6:if(e&&t.stateNode!=null)Hx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Ha(Nu.current),Ha(Lr.current),rd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Dr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:Kc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Kc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Dr]=t,t.stateNode=r}return Kt(t),null;case 13:if(rt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Fn!==null&&t.mode&1&&!(t.flags&128))$b(),zo(),t.flags|=98560,a=!1;else if(a=rd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Q(317));a[Dr]=t}else zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kt(t),a=!1}else gr!==null&&(pg(gr),gr=null),a=!0;if(!a)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||dt.current&1?Pt===0&&(Pt=3):gg())),t.updateQueue!==null&&(t.flags|=4),Kt(t),null);case 4:return Yo(),ng(e,t),e===null&&Tu(t.stateNode.containerInfo),Kt(t),null;case 10:return Nm(t.type._context),Kt(t),null;case 17:return wn(t.type)&&Zc(),Kt(t),null;case 19:if(rt(dt),a=t.memoizedState,a===null)return Kt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Lu(a,!1);else{if(Pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ld(e),o!==null){for(t.flags|=128,Lu(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return et(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&xt()>Xo&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304)}else{if(!r)if(e=ld(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ot)return Kt(t),null}else 2*xt()-a.renderingStartTime>Xo&&n!==1073741824&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=xt(),t.sibling=null,n=dt.current,et(dt,r?n&1|2:n&1),t):(Kt(t),null);case 22:case 23:return mg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bn&1073741824&&(Kt(t),t.subtreeFlags&6&&(t.flags|=8192)):Kt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function d6(e,t){switch(_m(t),t.tag){case 1:return wn(t.type)&&Zc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(),rt(vn),rt(qt),Fm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lm(t),null;case 13:if(rt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(dt),null;case 4:return Yo(),null;case 10:return Nm(t.type._context),null;case 22:case 23:return mg(),null;case 24:return null;default:return null}}var vd=!1,Xt=!1,f6=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Go(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function rg(e,t,n){try{n()}catch(r){yt(e,t,r)}}var zx=!1;function p6(e,t){if(mm=Bc,e=bb(),sm(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,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(u=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=o),f===a&&++c===r&&(u=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(gm={focusedElem:e,selectionRange:n},Bc=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;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 g=m.memoizedProps,x=m.memoizedState,y=t.stateNode,w=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:yr(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){yt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=zx,zx=!1,m}function Mu(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 a=i.destroy;i.destroy=void 0,a!==void 0&&rg(t,n,a)}i=i.next}while(i!==r)}}function wd(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 ig(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 Vx(e){var t=e.alternate;t!==null&&(e.alternate=null,Vx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dr],delete t[Su],delete t[bm],delete t[KD],delete t[XD])),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 $x(e){return e.tag===5||e.tag===3||e.tag===4}function Wx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$x(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 ag(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=Xc));else if(r!==4&&(e=e.child,e!==null))for(ag(e,t,n),e=e.sibling;e!==null;)ag(e,t,n),e=e.sibling}function og(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(og(e,t,n),e=e.sibling;e!==null;)og(e,t,n),e=e.sibling}var Ht=null,vr=!1;function $i(e,t,n){for(n=n.child;n!==null;)Yx(e,t,n),n=n.sibling}function Yx(e,t,n){if(Or&&typeof Or.onCommitFiberUnmount=="function")try{Or.onCommitFiberUnmount(Ic,n)}catch{}switch(n.tag){case 5:Xt||Go(n,t);case 6:var r=Ht,i=vr;Ht=null,$i(e,t,n),Ht=r,vr=i,Ht!==null&&(vr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(vr?(e=Ht,n=n.stateNode,e.nodeType===8?wm(e.parentNode,n):e.nodeType===1&&wm(e,n),hu(e)):wm(Ht,n.stateNode));break;case 4:r=Ht,i=vr,Ht=n.stateNode.containerInfo,vr=!0,$i(e,t,n),Ht=r,vr=i;break;case 0:case 11:case 14:case 15:if(!Xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&rg(n,t,o),i=i.next}while(i!==r)}$i(e,t,n);break;case 1:if(!Xt&&(Go(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){yt(n,t,s)}$i(e,t,n);break;case 21:$i(e,t,n);break;case 22:n.mode&1?(Xt=(r=Xt)||n.memoizedState!==null,$i(e,t,n),Xt=r):$i(e,t,n);break;default:$i(e,t,n)}}function qx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new f6),t.forEach(function(r){var i=E6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,vr=!1;break e;case 3:Ht=s.stateNode.containerInfo,vr=!0;break e;case 4:Ht=s.stateNode.containerInfo,vr=!0;break e}s=s.return}if(Ht===null)throw Error(Q(160));Yx(a,o,i),Ht=null,vr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){yt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gx(t,e),t=t.sibling}function Gx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wr(t,e),Fr(e),r&4){try{Mu(3,e,e.return),wd(3,e)}catch(g){yt(e,e.return,g)}try{Mu(5,e,e.return)}catch(g){yt(e,e.return,g)}}break;case 1:wr(t,e),Fr(e),r&512&&n!==null&&Go(n,n.return);break;case 5:if(wr(t,e),Fr(e),r&512&&n!==null&&Go(n,n.return),e.flags&32){var i=e.stateNode;try{ru(i,"")}catch(g){yt(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&Ew(i,a),Fh(s,o);var l=Fh(s,a);for(o=0;o<u.length;o+=2){var c=u[o],d=u[o+1];c==="style"?Nw(i,d):c==="dangerouslySetInnerHTML"?kw(i,d):c==="children"?ru(i,d):bh(i,c,d,l)}switch(s){case"input":Ih(i,a);break;case"textarea":Sw(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Ao(i,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Ao(i,!!a.multiple,a.defaultValue,!0):Ao(i,!!a.multiple,a.multiple?[]:"",!1))}i[Su]=a}catch(g){yt(e,e.return,g)}}break;case 6:if(wr(t,e),Fr(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){yt(e,e.return,g)}}break;case 3:if(wr(t,e),Fr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hu(t.containerInfo)}catch(g){yt(e,e.return,g)}break;case 4:wr(t,e),Fr(e);break;case 13:wr(t,e),Fr(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(lg=xt())),r&4&&qx(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Xt=(l=Xt)||c,wr(t,e),Xt=l):wr(t,e),Fr(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(ue=e,c=e.child;c!==null;){for(d=ue=c;ue!==null;){switch(f=ue,p=f.child,f.tag){case 0:case 11:case 14:case 15:Mu(4,f,f.return);break;case 1:Go(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){yt(r,n,g)}}break;case 5:Go(f,f.return);break;case 22:if(f.memoizedState!==null){Qx(d);continue}}p!==null?(p.return=f,ue=p):Qx(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,u=d.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Rw("display",o))}catch(g){yt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(g){yt(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wr(t,e),Fr(e),r&4&&qx(e);break;case 21:break;default:wr(t,e),Fr(e)}}function Fr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($x(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ru(i,""),r.flags&=-33);var a=Wx(e);og(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=Wx(e);ag(e,s,o);break;default:throw Error(Q(161))}}catch(u){yt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function h6(e,t,n){ue=e,Kx(e)}function Kx(e,t,n){for(var r=(e.mode&1)!==0;ue!==null;){var i=ue,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||vd;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Xt;s=vd;var l=Xt;if(vd=o,(Xt=u)&&!l)for(ue=i;ue!==null;)o=ue,u=o.child,o.tag===22&&o.memoizedState!==null?Zx(i):u!==null?(u.return=o,ue=u):Zx(i);for(;a!==null;)ue=a,Kx(a),a=a.sibling;ue=i,vd=s,Xt=l}Xx(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ue=a):Xx(e)}}function Xx(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xt||wd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:yr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Qb(t,a,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}Qb(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&hu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Xt||t.flags&512&&ig(t)}catch(f){yt(t,t.return,f)}}if(t===e){ue=null;break}if(n=t.sibling,n!==null){n.return=t.return,ue=n;break}ue=t.return}}function Qx(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ue=n;break}ue=t.return}}function Zx(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wd(4,t)}catch(u){yt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){yt(t,i,u)}}var a=t.return;try{ig(t)}catch(u){yt(t,a,u)}break;case 5:var o=t.return;try{ig(t)}catch(u){yt(t,o,u)}}}catch(u){yt(t,t.return,u)}if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}var m6=Math.ceil,bd=ti.ReactCurrentDispatcher,sg=ti.ReactCurrentOwner,tr=ti.ReactCurrentBatchConfig,Ue=0,Dt=null,Ct=null,zt=0,Bn=0,Ko=ji(0),Pt=0,Fu=null,Va=0,xd=0,ug=0,Bu=null,xn=null,lg=0,Xo=1/0,li=null,Ed=!1,cg=null,Wi=null,Td=!1,Yi=null,_d=0,ju=0,dg=null,Sd=-1,Cd=0;function dn(){return Ue&6?xt():Sd!==-1?Sd:Sd=xt()}function qi(e){return e.mode&1?Ue&2&&zt!==0?zt&-zt:ZD.transition!==null?(Cd===0&&(Cd=Ww()),Cd):(e=qe,e!==0||(e=window.event,e=e===void 0?16:eb(e.type)),e):1}function br(e,t,n,r){if(50<ju)throw ju=0,dg=null,Error(Q(185));lu(e,n,r),(!(Ue&2)||e!==Dt)&&(e===Dt&&(!(Ue&2)&&(xd|=n),Pt===4&&Gi(e,zt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Xo=xt()+500,ed&&Hi()))}function En(e,t){var n=e.callbackNode;ZO(e,t);var r=Lc(e,e===Dt?zt:0);if(r===0)n!==null&&zw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zw(n),t===1)e.tag===0?QD(eE.bind(null,e)):jb(eE.bind(null,e)),qD(function(){!(Ue&6)&&Hi()}),n=null;else{switch(Yw(r)){case 1:n=$h;break;case 4:n=Vw;break;case 16:n=Pc;break;case 536870912:n=$w;break;default:n=Pc}n=uE(n,Jx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jx(e,t){if(Sd=-1,Cd=0,Ue&6)throw Error(Q(327));var n=e.callbackNode;if(Qo()&&e.callbackNode!==n)return null;var r=Lc(e,e===Dt?zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ad(e,r);else{t=r;var i=Ue;Ue|=2;var a=nE();(Dt!==e||zt!==t)&&(li=null,Xo=xt()+500,Wa(e,t));do try{v6();break}catch(s){tE(e,s)}while(!0);Rm(),bd.current=a,Ue=i,Ct!==null?t=0:(Dt=null,zt=0,t=Pt)}if(t!==0){if(t===2&&(i=Wh(e),i!==0&&(r=i,t=fg(e,i))),t===1)throw n=Fu,Wa(e,0),Gi(e,r),En(e,xt()),n;if(t===6)Gi(e,r);else{if(i=e.current.alternate,!(r&30)&&!g6(i)&&(t=Ad(e,r),t===2&&(a=Wh(e),a!==0&&(r=a,t=fg(e,a))),t===1))throw n=Fu,Wa(e,0),Gi(e,r),En(e,xt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Ya(e,xn,li);break;case 3:if(Gi(e,r),(r&130023424)===r&&(t=lg+500-xt(),10<t)){if(Lc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){dn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vm(Ya.bind(null,e,xn,li),t);break}Ya(e,xn,li);break;case 4:if(Gi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-hr(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=xt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m6(r/1960))-r,10<r){e.timeoutHandle=vm(Ya.bind(null,e,xn,li),r);break}Ya(e,xn,li);break;case 5:Ya(e,xn,li);break;default:throw Error(Q(329))}}}return En(e,xt()),e.callbackNode===n?Jx.bind(null,e):null}function fg(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(Wa(e,t).flags|=256),e=Ad(e,t),e!==2&&(t=xn,xn=n,t!==null&&pg(t)),e}function pg(e){xn===null?xn=e:xn.push.apply(xn,e)}function g6(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],a=i.getSnapshot;i=i.value;try{if(!mr(a(),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 Gi(e,t){for(t&=~ug,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-hr(t),r=1<<n;e[n]=-1,t&=~r}}function eE(e){if(Ue&6)throw Error(Q(327));Qo();var t=Lc(e,0);if(!(t&1))return En(e,xt()),null;var n=Ad(e,t);if(e.tag!==0&&n===2){var r=Wh(e);r!==0&&(t=r,n=fg(e,r))}if(n===1)throw n=Fu,Wa(e,0),Gi(e,t),En(e,xt()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ya(e,xn,li),En(e,xt()),null}function hg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Xo=xt()+500,ed&&Hi())}}function $a(e){Yi!==null&&Yi.tag===0&&!(Ue&6)&&Qo();var t=Ue;Ue|=1;var n=tr.transition,r=qe;try{if(tr.transition=null,qe=1,e)return e()}finally{qe=r,tr.transition=n,Ue=t,!(Ue&6)&&Hi()}}function mg(){Bn=Ko.current,rt(Ko)}function Wa(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,YD(n)),Ct!==null)for(n=Ct.return;n!==null;){var r=n;switch(_m(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zc();break;case 3:Yo(),rt(vn),rt(qt),Fm();break;case 5:Lm(r);break;case 4:Yo();break;case 13:rt(dt);break;case 19:rt(dt);break;case 10:Nm(r.type._context);break;case 22:case 23:mg()}n=n.return}if(Dt=e,Ct=e=Ki(e.current,null),zt=Bn=t,Pt=0,Fu=null,ug=xd=Va=0,xn=Bu=null,Ua!==null){for(t=0;t<Ua.length;t++)if(n=Ua[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ua=null}return e}function tE(e,t){do{var n=Ct;try{if(Rm(),cd.current=hd,dd){for(var r=ft.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}dd=!1}if(za=0,Ot=Nt=ft=null,Pu=!1,Iu=0,sg.current=null,n===null||n.return===null){Pt=1,Fu=t,Ct=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=zt,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Cx(o);if(p!==null){p.flags&=-257,Ax(p,o,s,a,t),p.mode&1&&Sx(a,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}else{if(!(t&1)){Sx(a,l,t),gg();break e}u=Error(Q(426))}}else if(ot&&s.mode&1){var x=Cx(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Ax(x,o,s,a,t),Am(qo(u,s));break e}}a=u=qo(u,s),Pt!==4&&(Pt=2),Bu===null?Bu=[a]:Bu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=Tx(a,u,t);Xb(a,y);break e;case 1:s=u;var w=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Wi===null||!Wi.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var T=_x(a,s,t);Xb(a,T);break e}}a=a.return}while(a!==null)}iE(n)}catch(S){t=S,Ct===n&&n!==null&&(Ct=n=n.return);continue}break}while(!0)}function nE(){var e=bd.current;return bd.current=hd,e===null?hd:e}function gg(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Dt===null||!(Va&268435455)&&!(xd&268435455)||Gi(Dt,zt)}function Ad(e,t){var n=Ue;Ue|=2;var r=nE();(Dt!==e||zt!==t)&&(li=null,Wa(e,t));do try{y6();break}catch(i){tE(e,i)}while(!0);if(Rm(),Ue=n,bd.current=r,Ct!==null)throw Error(Q(261));return Dt=null,zt=0,Pt}function y6(){for(;Ct!==null;)rE(Ct)}function v6(){for(;Ct!==null&&!VO();)rE(Ct)}function rE(e){var t=sE(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?iE(e):Ct=t,sg.current=null}function iE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=d6(n,t),n!==null){n.flags&=32767,Ct=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pt=6,Ct=null;return}}else if(n=c6(n,t,Bn),n!==null){Ct=n;return}if(t=t.sibling,t!==null){Ct=t;return}Ct=t=e}while(t!==null);Pt===0&&(Pt=5)}function Ya(e,t,n){var r=qe,i=tr.transition;try{tr.transition=null,qe=1,w6(e,t,n,r)}finally{tr.transition=i,qe=r}return null}function w6(e,t,n,r){do Qo();while(Yi!==null);if(Ue&6)throw Error(Q(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(Q(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(JO(e,a),e===Dt&&(Ct=Dt=null,zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Td||(Td=!0,uE(Pc,function(){return Qo(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=tr.transition,tr.transition=null;var o=qe;qe=1;var s=Ue;Ue|=4,sg.current=null,p6(e,n),Gx(n,e),jD(gm),Bc=!!mm,gm=mm=null,e.current=n,h6(n),$O(),Ue=s,qe=o,tr.transition=a}else e.current=n;if(Td&&(Td=!1,Yi=e,_d=i),a=e.pendingLanes,a===0&&(Wi=null),qO(n.stateNode),En(e,xt()),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(Ed)throw Ed=!1,e=cg,cg=null,e;return _d&1&&e.tag!==0&&Qo(),a=e.pendingLanes,a&1?e===dg?ju++:(ju=0,dg=e):ju=0,Hi(),null}function Qo(){if(Yi!==null){var e=Yw(_d),t=tr.transition,n=qe;try{if(tr.transition=null,qe=16>e?16:e,Yi===null)var r=!1;else{if(e=Yi,Yi=null,_d=0,Ue&6)throw Error(Q(331));var i=Ue;for(Ue|=4,ue=e.current;ue!==null;){var a=ue,o=a.child;if(ue.flags&16){var s=a.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(ue=l;ue!==null;){var c=ue;switch(c.tag){case 0:case 11:case 15:Mu(8,c,a)}var d=c.child;if(d!==null)d.return=c,ue=d;else for(;ue!==null;){c=ue;var f=c.sibling,p=c.return;if(Vx(c),c===l){ue=null;break}if(f!==null){f.return=p,ue=f;break}ue=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}ue=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ue=o;else e:for(;ue!==null;){if(a=ue,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Mu(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,ue=y;break e}ue=a.return}}var w=e.current;for(ue=w;ue!==null;){o=ue;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ue=b;else e:for(o=w;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:wd(9,s)}}catch(S){yt(s,s.return,S)}if(s===o){ue=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,ue=T;break e}ue=s.return}}if(Ue=i,Hi(),Or&&typeof Or.onPostCommitFiberRoot=="function")try{Or.onPostCommitFiberRoot(Ic,e)}catch{}r=!0}return r}finally{qe=n,tr.transition=t}}return!1}function aE(e,t,n){t=qo(n,t),t=Tx(e,t,1),e=Vi(e,t,1),t=dn(),e!==null&&(lu(e,1,t),En(e,t))}function yt(e,t,n){if(e.tag===3)aE(e,e,n);else for(;t!==null;){if(t.tag===3){aE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wi===null||!Wi.has(r))){e=qo(n,e),e=_x(t,e,1),t=Vi(t,e,1),e=dn(),t!==null&&(lu(t,1,e),En(t,e));break}}t=t.return}}function b6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=dn(),e.pingedLanes|=e.suspendedLanes&n,Dt===e&&(zt&n)===n&&(Pt===4||Pt===3&&(zt&130023424)===zt&&500>xt()-lg?Wa(e,0):ug|=n),En(e,t)}function oE(e,t){t===0&&(e.mode&1?(t=Dc,Dc<<=1,!(Dc&130023424)&&(Dc=4194304)):t=1);var n=dn();e=oi(e,t),e!==null&&(lu(e,t,n),En(e,n))}function x6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),oE(e,n)}function E6(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(Q(314))}r!==null&&r.delete(t),oE(e,n)}var sE;sE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)bn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return bn=!1,l6(e,t,n);bn=!!(e.flags&131072)}else bn=!1,ot&&t.flags&1048576&&Ub(t,nd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yd(e,t),e=t.pendingProps;var i=jo(t,qt.current);Wo(t,n),i=Um(null,t,r,e,i,n);var a=Hm();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,wn(r)?(a=!0,Jc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Om(t),i.updater=md,t.stateNode=i,i._reactInternals=t,qm(t,r,e,n),t=Qm(null,t,r,!0,a,n)):(t.tag=0,ot&&a&&Tm(t),cn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=_6(r),e=yr(r,e),i){case 0:t=Xm(null,t,r,e,n);break e;case 1:t=Ox(null,t,r,e,n);break e;case 11:t=kx(null,t,r,e,n);break e;case 14:t=Rx(null,t,r,yr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),Xm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),Ox(e,t,r,i,n);case 3:e:{if(Dx(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Kb(e,t),ud(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=qo(Error(Q(423)),t),t=Lx(e,t,r,n,i);break e}else if(r!==i){i=qo(Error(Q(424)),t),t=Lx(e,t,r,n,i);break e}else for(Fn=Bi(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,gr=null,n=qb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zo(),r===i){t=ui(e,t,n);break e}cn(e,t,r,n)}t=t.child}return t;case 5:return Zb(t),e===null&&Cm(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,ym(r,i)?o=null:a!==null&&ym(r,a)&&(t.flags|=32),Ix(e,t),cn(e,t,o,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return Mx(e,t,n);case 4:return Dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vo(t,null,r,n):cn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),kx(e,t,r,i,n);case 7:return cn(e,t,t.pendingProps,n),t.child;case 8:return cn(e,t,t.pendingProps.children,n),t.child;case 12:return cn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,et(ad,r._currentValue),r._currentValue=o,a!==null)if(mr(a.value,o)){if(a.children===i.children&&!vn.current){t=ui(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=si(-1,n&-n),u.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Pm(a.return,n,t),s.lanes|=n;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Pm(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}cn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wo(t,n),i=Jn(i),r=r(i),t.flags|=1,cn(e,t,r,n),t.child;case 14:return r=t.type,i=yr(r,t.pendingProps),i=yr(r.type,i),Rx(e,t,r,i,n);case 15:return Nx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),yd(e,t),t.tag=1,wn(r)?(e=!0,Jc(t)):e=!1,Wo(t,n),xx(t,r,i),qm(t,r,i,n),Qm(null,t,r,!0,e,n);case 19:return Bx(e,t,n);case 22:return Px(e,t,n)}throw Error(Q(156,t.tag))};function uE(e,t){return Hw(e,t)}function T6(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 nr(e,t,n,r){return new T6(e,t,n,r)}function yg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _6(e){if(typeof e=="function")return yg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Th)return 11;if(e===Ch)return 14}return 2}function Ki(e,t){var n=e.alternate;return n===null?(n=nr(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 kd(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")yg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Co:return qa(n.children,i,a,t);case xh:o=8,i|=8;break;case Eh:return e=nr(12,n,t,i|2),e.elementType=Eh,e.lanes=a,e;case _h:return e=nr(13,n,t,i),e.elementType=_h,e.lanes=a,e;case Sh:return e=nr(19,n,t,i),e.elementType=Sh,e.lanes=a,e;case yw:return Rd(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mw:o=10;break e;case gw:o=9;break e;case Th:o=11;break e;case Ch:o=14;break e;case Ni:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=nr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function qa(e,t,n,r){return e=nr(7,e,r,t),e.lanes=n,e}function Rd(e,t,n,r){return e=nr(22,e,r,t),e.elementType=yw,e.lanes=n,e.stateNode={isHidden:!1},e}function vg(e,t,n){return e=nr(6,e,null,t),e.lanes=n,e}function wg(e,t,n){return t=nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S6(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=Yh(0),this.expirationTimes=Yh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function bg(e,t,n,r,i,a,o,s,u){return e=new S6(e,t,n,s,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=nr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Om(a),e}function C6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:So,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function lE(e){if(!e)return Ui;e=e._reactInternals;e:{if(La(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(wn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(wn(n))return Fb(e,n,t)}return t}function cE(e,t,n,r,i,a,o,s,u){return e=bg(n,r,!0,e,i,a,o,s,u),e.context=lE(null),n=e.current,r=dn(),i=qi(n),a=si(r,i),a.callback=t??null,Vi(n,a,i),e.current.lanes=i,lu(e,i,r),En(e,r),e}function Nd(e,t,n,r){var i=t.current,a=dn(),o=qi(i);return n=lE(n),t.context===null?t.context=n:t.pendingContext=n,t=si(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Vi(i,t,o),e!==null&&(br(e,i,o,a),sd(e,i,o)),o}function Pd(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 dE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xg(e,t){dE(e,t),(e=e.alternate)&&dE(e,t)}function A6(){return null}var fE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Eg(e){this._internalRoot=e}Id.prototype.render=Eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Nd(e,t,null,null)},Id.prototype.unmount=Eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$a(function(){Nd(null,e,null,null)}),t[ni]=null}};function Id(e){this._internalRoot=e}Id.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Li.length&&t!==0&&t<Li[n].priority;n++);Li.splice(n,0,e),n===0&&Zw(e)}};function Tg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Od(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pE(){}function k6(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=Pd(o);a.call(l)}}var o=cE(t,r,e,0,null,!1,!1,"",pE);return e._reactRootContainer=o,e[ni]=o.current,Tu(e.nodeType===8?e.parentNode:e),$a(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Pd(u);s.call(l)}}var u=bg(e,0,!1,null,null,!1,!1,"",pE);return e._reactRootContainer=u,e[ni]=u.current,Tu(e.nodeType===8?e.parentNode:e),$a(function(){Nd(t,u,n,r)}),u}function Dd(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var u=Pd(o);s.call(u)}}Nd(t,o,e,i)}else o=k6(n,t,e,i,r);return Pd(o)}qw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=uu(t.pendingLanes);n!==0&&(qh(t,n|1),En(t,xt()),!(Ue&6)&&(Xo=xt()+500,Hi()))}break;case 13:$a(function(){var r=oi(e,1);if(r!==null){var i=dn();br(r,e,1,i)}}),xg(e,1)}},Gh=function(e){if(e.tag===13){var t=oi(e,134217728);if(t!==null){var n=dn();br(t,e,134217728,n)}xg(e,134217728)}},Gw=function(e){if(e.tag===13){var t=qi(e),n=oi(e,t);if(n!==null){var r=dn();br(n,e,t,r)}xg(e,t)}},Kw=function(){return qe},Xw=function(e,t){var n=qe;try{return qe=e,t()}finally{qe=n}},Uh=function(e,t,n){switch(t){case"input":if(Ih(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=Qc(r);if(!i)throw Error(Q(90));bw(r),Ih(r,i)}}}break;case"textarea":Sw(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}},Dw=hg,Lw=$a;var R6={usingClientEntryPoint:!1,Events:[Cu,Fo,Qc,Iw,Ow,hg]},Uu={findFiberByHostInstance:Ma,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},N6={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ti.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jw(e),e===null?null:e.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||A6,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 Ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ld.isDisabled&&Ld.supportsFiber)try{Ic=Ld.inject(N6),Or=Ld}catch{}}On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R6,On.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tg(t))throw Error(Q(200));return C6(e,t,null,n)},On.createRoot=function(e,t){if(!Tg(e))throw Error(Q(299));var n=!1,r="",i=fE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=bg(e,1,!1,null,null,n,!1,r,i),e[ni]=t.current,Tu(e.nodeType===8?e.parentNode:e),new Eg(t)},On.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=jw(t),e=e===null?null:e.stateNode,e},On.flushSync=function(e){return $a(e)},On.hydrate=function(e,t,n){if(!Od(t))throw Error(Q(200));return Dd(null,e,t,!0,n)},On.hydrateRoot=function(e,t,n){if(!Tg(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=fE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=cE(t,null,e,1,n??null,i,!1,a,o),e[ni]=t.current,Tu(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 Id(t)},On.render=function(e,t,n){if(!Od(t))throw Error(Q(200));return Dd(null,e,t,!1,n)},On.unmountComponentAtNode=function(e){if(!Od(e))throw Error(Q(40));return e._reactRootContainer?($a(function(){Dd(null,null,e,!1,function(){e._reactRootContainer=null,e[ni]=null})}),!0):!1},On.unstable_batchedUpdates=hg,On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Od(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Dd(e,t,n,!1,r)},On.version="18.3.1-next-f1338f8080-20240426";function hE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hE)}catch(e){console.error(e)}}hE(),lw.exports=On;var Zo=lw.exports,mE,gE=Zo;mE=gE.createRoot,gE.hydrateRoot;const yE="3.0.15";function Md(e){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(e)}var P6=/^\s+/,I6=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=O6(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(t){return this._a=TE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=wE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=wE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=vE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=vE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return bE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return F6(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(st(this._r,255)*100)+"%",g:Math.round(st(this._g,255)*100)+"%",b:Math.round(st(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%)":"rgba("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K6[bE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+xE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+xE(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(H6,arguments)},brighten:function(){return this._applyModification(z6,arguments)},darken:function(){return this._applyModification(V6,arguments)},desaturate:function(){return this._applyModification(B6,arguments)},saturate:function(){return this._applyModification(j6,arguments)},greyscale:function(){return this._applyModification(U6,arguments)},spin:function(){return this._applyModification($6,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(q6,arguments)},complement:function(){return this._applyCombination(W6,arguments)},monochromatic:function(){return this._applyCombination(G6,arguments)},splitcomplement:function(){return this._applyCombination(Y6,arguments)},triad:function(){return this._applyCombination(EE,[3])},tetrad:function(){return this._applyCombination(EE,[4])}},fe.fromRatio=function(e,t){if(Md(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Hu(e[r]));e=n}return fe(e,t)};function O6(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=J6(e)),Md(e)=="object"&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=D6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(r=Hu(e.s),i=Hu(e.v),t=M6(e.h,r,i),o=!0,s="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(r=Hu(e.s),a=Hu(e.l),t=L6(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=TE(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function D6(e,t,n){return{r:st(e,255)*255,g:st(t,255)*255,b:st(n,255)*255}}function vE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var u=r-i;switch(o=s>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,l:s}}function L6(e,t,n){var r,i,a;e=st(e,360),t=st(t,100),n=st(n,100);function o(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=o(u,s,e+1/3),i=o(u,s,e),a=o(u,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function wE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=r,u=r-i;if(o=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,v:s}}function M6(e,t,n){e=st(e,360)*6,t=st(t,100),n=st(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,o,a,a,s,n][u],c=[s,n,n,o,a,a][u],d=[a,a,s,n,n,o][u];return{r:l*255,g:c*255,b:d*255}}function bE(e,t,n,r){var i=[xr(Math.round(e).toString(16)),xr(Math.round(t).toString(16)),xr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function F6(e,t,n,r,i){var a=[xr(Math.round(e).toString(16)),xr(Math.round(t).toString(16)),xr(Math.round(n).toString(16)),xr(_E(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function xE(e,t,n,r){var i=[xr(_E(r)),xr(Math.round(e).toString(16)),xr(Math.round(t).toString(16)),xr(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function B6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Fd(n.s),fe(n)}function j6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Fd(n.s),fe(n)}function U6(e){return fe(e).desaturate(100)}function H6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Fd(n.l),fe(n)}function z6(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function V6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Fd(n.l),fe(n)}function $6(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function W6(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function EE(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,a=1;a<t;a++)r.push(fe({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function Y6(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function q6(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,a=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(fe(r));return a}function G6(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(fe({h:r,s:i,v:a})),a=(a+s)%1;return o}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return fe(o)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,a;switch(a=!1,i=eL(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},fe.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,u;n=n||{},o=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)a=fe.readability(e,t[l]),a>i&&(i=a,r=fe(t[l]));return fe.isReadable(e,r,{level:s,size:u})||!o?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var _g=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K6=fe.hexNames=X6(_g);function X6(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function TE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function st(e,t){Q6(e)&&(e="100%");var n=Z6(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Fd(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function Q6(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Z6(e){return typeof e=="string"&&e.indexOf("%")!=-1}function xr(e){return e.length==1?"0"+e:""+e}function Hu(e){return e<=1&&(e=e*100+"%"),e}function _E(e){return Math.round(parseFloat(e)*255).toString(16)}function SE(e){return jn(e)/255}var Er=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ci(e){return!!Er.CSS_UNIT.exec(e)}function J6(e){e=e.replace(P6,"").replace(I6,"").toLowerCase();var t=!1;if(_g[e])e=_g[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Er.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Er.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Er.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Er.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Er.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Er.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Er.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:SE(n[4]),format:t?"name":"hex8"}:(n=Er.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Er.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:SE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Er.hex3.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function eL(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const tL=400,CE=600,Bd={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},AE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function nL(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))})}function zu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Sg=e=>Array.isArray(e);function kE(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}function Vu(e){return typeof e=="string"||Array.isArray(e)}function RE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cg(e,t,n,r){if(typeof t=="function"){const[i,a]=RE(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=RE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function jd(e,t,n){const r=e.getProps();return Cg(r,t,n!==void 0?n:r.custom,e)}const Ag=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kg=["initial",...Ag],$u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xi=new Set($u),di=e=>e*1e3,fi=e=>e/1e3,rL={type:"spring",stiffness:500,damping:25,restSpeed:10},iL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),aL={type:"keyframes",duration:.8},oL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sL=(e,{keyframes:t})=>t.length>2?aL:Xi.has(e)?e.startsWith("scale")?iL(t[1]):rL:oL;function Rg(e,t){return e?e[t]||e.default||e:void 0}const uL={skipAnimations:!1,useManualTiming:!1},lL=e=>e!==null;function Ud(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(lL),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Qt=e=>e;function cL(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(l){a.has(l)&&(u.schedule(l),e()),l(o)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&a.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),a.delete(l)},process:l=>{if(o=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const Hd=["read","resolveKeyframes","update","preRender","render","postRender"],dL=40;function NE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Hd.reduce((y,w)=>(y[w]=cL(a),y),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=o,p=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,dL),1),i.timestamp=y,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Hd.reduce((y,w)=>{const b=o[w];return y[w]=(T,S=!1,_=!1)=>(n||m(),b.schedule(T,S,_)),y},{}),cancel:y=>{for(let w=0;w<Hd.length;w++)o[Hd[w]].cancel(y)},state:i,steps:o}}const{schedule:Xe,cancel:Qi,state:Vt,steps:Ng}=NE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qt,!0),PE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fL=1e-7,pL=12;function hL(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=PE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>fL&&++s<pL);return o}function Wu(e,t,n,r){if(e===t&&n===r)return Qt;const i=a=>hL(a,0,1,e,n);return a=>a===0||a===1?a:PE(i(a),t,r)}const IE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,OE=e=>t=>1-e(1-t),DE=Wu(.33,1.53,.69,.99),Pg=OE(DE),LE=IE(Pg),ME=e=>(e*=2)<1?.5*Pg(e):.5*(2-Math.pow(2,-10*(e-1))),Ig=e=>1-Math.sin(Math.acos(e)),FE=OE(Ig),BE=IE(Ig),jE=e=>/^0[^.\s]+$/u.test(e);function mL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jE(e):!0}let Og=Qt;const UE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),HE=e=>t=>typeof t=="string"&&t.startsWith(e),zE=HE("--"),gL=HE("var(--"),Dg=e=>gL(e)?yL.test(e.split("/*")[0].trim()):!1,yL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wL(e){const t=vL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function VE(e,t,n=1){const[r,i]=wL(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return UE(o)?parseFloat(o):o}return Dg(i)?VE(i,t,n+1):i}const Zi=(e,t,n)=>n>t?t:n<e?e:n,Jo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yu={...Jo,transform:e=>Zi(0,1,e)},zd={...Jo,default:1},qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ji=qu("deg"),Br=qu("%"),ye=qu("px"),bL=qu("vh"),xL=qu("vw"),$E={...Br,parse:e=>Br.parse(e)/100,transform:e=>Br.transform(e*100)},EL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),WE=e=>e===Jo||e===ye,YE=(e,t)=>parseFloat(e.split(", ")[t]),qE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return YE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?YE(a[1],e):0}},TL=new Set(["x","y","z"]),_L=$u.filter(e=>!TL.has(e));function SL(e){const t=[];return _L.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const es={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:qE(4,13),y:qE(5,14)};es.translateX=es.x,es.translateY=es.y;const GE=e=>t=>t.test(e),KE=[Jo,ye,Br,Ji,xL,bL,{test:e=>e==="auto",parse:e=>e}],XE=e=>KE.find(GE(e)),Ga=new Set;let Lg=!1,Mg=!1;function QE(){if(Mg){const e=Array.from(Ga).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=SL(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(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Mg=!1,Lg=!1,Ga.forEach(e=>e.complete()),Ga.clear()}function ZE(){Ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mg=!0)})}function CL(){ZE(),QE()}class Fg{constructor(t,n,r,i,a,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=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ga.add(this),Lg||(Lg=!0,Xe.read(ZE),Xe.resolveKeyframes(QE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ga.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ga.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Gu=e=>Math.round(e*1e5)/1e5,Bg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AL(e){return e==null}const kL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jg=(e,t)=>n=>!!(typeof n=="string"&&kL.test(n)&&n.startsWith(e)||t&&!AL(n)&&Object.prototype.hasOwnProperty.call(n,t)),JE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Bg);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},RL=e=>Zi(0,255,e),Ug={...Jo,transform:e=>Math.round(RL(e))},Ka={test:jg("rgb","red"),parse:JE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ug.transform(e)+", "+Ug.transform(t)+", "+Ug.transform(n)+", "+Gu(Yu.transform(r))+")"};function NL(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 Hg={test:jg("#"),parse:NL,transform:Ka.transform},ts={test:jg("hsl","hue"),parse:JE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Br.transform(Gu(t))+", "+Br.transform(Gu(n))+", "+Gu(Yu.transform(r))+")"},Zt={test:e=>Ka.test(e)||Hg.test(e)||ts.test(e),parse:e=>Ka.test(e)?Ka.parse(e):ts.test(e)?ts.parse(e):Hg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ka.transform(e):ts.transform(e)},PL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IL(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Bg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(PL))===null||n===void 0?void 0:n.length)||0)>0}const eT="number",tT="color",OL="var",DL="var(",nT="${}",LL=/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 Ku(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(LL,u=>(Zt.test(u)?(r.color.push(a),i.push(tT),n.push(Zt.parse(u))):u.startsWith(DL)?(r.var.push(a),i.push(OL),n.push(u)):(r.number.push(a),i.push(eT),n.push(parseFloat(u))),++a,nT)).split(nT);return{values:n,split:s,indexes:r,types:i}}function rT(e){return Ku(e).values}function iT(e){const{split:t,types:n}=Ku(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===eT?a+=Gu(i[o]):s===tT?a+=Zt.transform(i[o]):a+=i[o]}return a}}const ML=e=>typeof e=="number"?0:e;function FL(e){const t=rT(e);return iT(e)(t.map(ML))}const ea={test:IL,parse:rT,createTransformer:iT,getAnimatableNone:FL},BL=new Set(["brightness","contrast","saturate","opacity"]);function jL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bg)||[];if(!r)return e;const i=n.replace(r,"");let a=BL.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const UL=/\b([a-z-]*)\(.*?\)/gu,zg={...ea,getAnimatableNone:e=>{const t=e.match(UL);return t?t.map(jL).join(" "):e}},HL={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},zL={rotate:Ji,rotateX:Ji,rotateY:Ji,rotateZ:Ji,scale:zd,scaleX:zd,scaleY:zd,scaleZ:zd,skew:Ji,skewX:Ji,skewY:Ji,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Yu,originX:$E,originY:$E,originZ:ye},aT={...Jo,transform:Math.round},Vg={...HL,...zL,zIndex:aT,size:ye,fillOpacity:Yu,strokeOpacity:Yu,numOctaves:aT},VL={...Vg,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:zg,WebkitFilter:zg},$g=e=>VL[e];function oT(e,t){let n=$g(e);return n!==zg&&(n=ea),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $L=new Set(["auto","none","0"]);function WL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!$L.has(a)&&Ku(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=oT(n,i)}class sT extends Fg{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Dg(l))){const c=VE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!EL.has(r)||t.length!==2)return;const[i,a]=t,o=XE(i),s=XE(a);if(o!==s)if(WE(o)&&WE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)mL(t[i])&&r.push(i);r.length&&WL(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=es[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 t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=es[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function Wg(e){return typeof e=="function"}let Vd;function YL(){Vd=void 0}const jr={now:()=>(Vd===void 0&&jr.set(Vt.isProcessing||uL.useManualTiming?Vt.timestamp:performance.now()),Vd),set:e=>{Vd=e,queueMicrotask(YL)}},uT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ea.test(e)||e==="0")&&!e.startsWith("url("));function qL(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 GL(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=uT(i,t),s=uT(a,t);return!o||!s?!1:qL(e)||(n==="spring"||Wg(n))&&r}const KL=40;class lT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=jr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>KL?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&CL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=jr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!GL(t,r,i,a))if(o)this.options.duration=0;else{u==null||u(Ud(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function cT(e,t){return t?e*(1e3/t):0}const XL=5;function dT(e,t,n){const r=Math.max(t-XL,0);return cT(n-e(r),t-r)}const Yg=.001,QL=.01,ZL=10,JL=.05,e4=1;function t4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Zi(JL,e4,o),e=Zi(QL,ZL,fi(e)),o<1?(i=l=>{const c=l*o,d=c*e,f=c-n,p=qg(l,o),m=Math.exp(-d);return Yg-f/p*m},a=l=>{const d=l*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(l,2)*e,m=Math.exp(-d),g=qg(Math.pow(l,2),o);return(-i(l)+Yg>0?-1:1)*((f-p)*m)/g}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Yg+c*d},a=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=r4(i,a,s);if(e=di(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const n4=12;function r4(e,t,n){let r=n;for(let i=1;i<n4;i++)r=r-e(r)/t(r);return r}function qg(e,t){return e*Math.sqrt(1-t*t)}const i4=["duration","bounce"],a4=["stiffness","damping","mass"];function fT(e,t){return t.some(n=>e[n]!==void 0)}function o4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!fT(e,a4)&&fT(e,i4)){const n=t4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function pT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=o4({...r,velocity:-fi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),g=a-i,x=fi(Math.sqrt(s/l)),y=Math.abs(g)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let w;if(m<1){const b=qg(x,m);w=T=>{const S=Math.exp(-m*x*T);return a-S*((p+m*x*g)/b*Math.sin(b*T)+g*Math.cos(b*T))}}else if(m===1)w=b=>a-Math.exp(-x*b)*(g+(p+x*g)*b);else{const b=x*Math.sqrt(m*m-1);w=T=>{const S=Math.exp(-m*x*T),_=Math.min(b*T,300);return a-S*((p+m*x*g)*Math.sinh(_)+b*g*Math.cosh(_))/b}}return{calculatedDuration:f&&c||null,next:b=>{const T=w(b);if(f)o.done=b>=c;else{let S=0;m<1&&(S=b===0?di(p):dT(w,b,T));const _=Math.abs(S)<=n,N=Math.abs(a-T)<=t;o.done=_&&N}return o.value=o.done?a:T,o}}}function hT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>s!==void 0&&D<s||u!==void 0&&D>u,m=D=>s===void 0?u:u===void 0||Math.abs(s-D)<Math.abs(u-D)?s:u;let g=n*t;const x=d+g,y=o===void 0?x:o(x);y!==x&&(g=y-d);const w=D=>-g*Math.exp(-D/r),b=D=>y+w(D),T=D=>{const V=w(D),P=b(D);f.done=Math.abs(V)<=l,f.value=f.done?y:P};let S,_;const N=D=>{p(f.value)&&(S=D,_=pT({keyframes:[f.value,m(f.value)],velocity:dT(b,D,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return N(0),{calculatedDuration:null,next:D=>{let V=!1;return!_&&S===void 0&&(V=!0,T(D),N(D)),S!==void 0&&D>=S?_.next(D-S):(!V&&T(D),f)}}}const s4=Wu(.42,0,1,1),u4=Wu(0,0,.58,1),mT=Wu(.42,0,.58,1),l4=e=>Array.isArray(e)&&typeof e[0]!="number",Gg=e=>Array.isArray(e)&&typeof e[0]=="number",gT={linear:Qt,easeIn:s4,easeInOut:mT,easeOut:u4,circIn:Ig,circInOut:BE,circOut:FE,backIn:Pg,backInOut:LE,backOut:DE,anticipate:ME},yT=e=>{if(Gg(e)){Og(e.length===4);const[t,n,r,i]=e;return Wu(t,n,r,i)}else if(typeof e=="string")return Og(gT[e]!==void 0),gT[e];return e},c4=(e,t)=>n=>t(e(n)),pi=(...e)=>e.reduce(c4),ns=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},pt=(e,t,n)=>e+(t-e)*n;function Kg(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 d4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Kg(u,s,e+1/3),a=Kg(u,s,e),o=Kg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function $d(e,t){return n=>n>0?t:e}const Xg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},f4=[Hg,Ka,ts],p4=e=>f4.find(t=>t.test(e));function vT(e){const t=p4(e);if(!t)return!1;let n=t.parse(e);return t===ts&&(n=d4(n)),n}const wT=(e,t)=>{const n=vT(e),r=vT(t);if(!n||!r)return $d(e,t);const i={...n};return a=>(i.red=Xg(n.red,r.red,a),i.green=Xg(n.green,r.green,a),i.blue=Xg(n.blue,r.blue,a),i.alpha=pt(n.alpha,r.alpha,a),Ka.transform(i))},Qg=new Set(["none","hidden"]);function h4(e,t){return Qg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function m4(e,t){return n=>pt(e,t,n)}function Zg(e){return typeof e=="number"?m4:typeof e=="string"?Dg(e)?$d:Zt.test(e)?wT:v4:Array.isArray(e)?bT:typeof e=="object"?Zt.test(e)?wT:g4:$d}function bT(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Zg(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function g4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Zg(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function y4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=u,i[o]++}return r}const v4=(e,t)=>{const n=ea.createTransformer(t),r=Ku(e),i=Ku(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?Qg.has(e)&&!i.values.length||Qg.has(t)&&!r.values.length?h4(e,t):pi(bT(y4(r,i),i.values),n):$d(e,t)};function xT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Zg(e)(e,t)}function w4(e,t,n){const r=[],i=n||xT,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||Qt:t;s=pi(u,s)}r.push(s)}return r}function b4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Og(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=w4(t,r,i),s=o.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=ns(e[c],e[c+1],l);return o[c](d)};return n?l=>u(Zi(e[0],e[a-1],l)):u}function x4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ns(0,t,r);e.push(pt(n,1,i))}}function E4(e){const t=[0];return x4(t,e.length-1),t}function T4(e,t){return e.map(n=>n*t)}function _4(e,t){return e.map(()=>t||mT).splice(0,e.length-1)}function Wd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=l4(r)?r.map(yT):yT(r),a={done:!1,value:t[0]},o=T4(n&&n.length===t.length?n:E4(t),e),s=b4(o,t,{ease:Array.isArray(i)?i:_4(t,i)});return{calculatedDuration:e,next:u=>(a.value=s(u),a.done=u>=e,a)}}const ET=2e4;function S4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ET;)t+=n,r=e.next(t);return t>=ET?1/0:t}const C4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Qi(t),now:()=>Vt.isProcessing?Vt.timestamp:jr.now()}},A4={decay:hT,inertia:hT,tween:Wd,keyframes:Wd,spring:pT},k4=e=>e/100;class Jg extends lT{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:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Fg,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=Wg(n)?n:A4[n]||Wd;let u,l;s!==Wd&&typeof t[0]!="number"&&(u=pi(k4,xT(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});a==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=S4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}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:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return a.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:g,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,T=a;if(p){const D=Math.min(this.currentTime,c)/d;let V=Math.floor(D),P=D%1;!P&&D>=1&&(P=1),P===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(P=1-P,g&&(P-=g/d)):m==="mirror"&&(T=o)),b=Zi(0,1,P)*d}const S=w?{done:!1,value:u[0]}:T.next(b);s&&(S.value=s(S.value));let{done:_}=S;!w&&l!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return N&&i!==void 0&&(S.value=Ud(u,this.options,i)),x&&x(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?fi(t.calculatedDuration):0}get time(){return fi(this.currentTime)}set time(t){t=di(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=fi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=C4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),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(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const TT=new Set(["opacity","clipPath","filter","transform"]),R4=10,N4=(e,t)=>{let n="";const r=Math.max(Math.round(t/R4),2);for(let i=0;i<r;i++)n+=e(ns(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function e0(e){let t;return()=>(t===void 0&&(t=e()),t)}const P4={linearEasing:void 0};function I4(e,t){const n=e0(e);return()=>{var r;return(r=P4[t])!==null&&r!==void 0?r:n()}}const Yd=I4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function _T(e){return!!(typeof e=="function"&&Yd()||!e||typeof e=="string"&&(e in t0||Yd())||Gg(e)||Array.isArray(e)&&e.every(_T))}const Xu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,t0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xu([0,.65,.55,1]),circOut:Xu([.55,0,1,.45]),backIn:Xu([.31,.01,.66,-.59]),backOut:Xu([.33,1.53,.69,.99])};function ST(e,t){if(e)return typeof e=="function"&&Yd()?N4(e,t):Gg(e)?Xu(e):Array.isArray(e)?e.map(n=>ST(n,t)||t0.easeOut):t0[e]}function O4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=ST(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function CT(e,t){e.timeline=t,e.onfinish=null}const D4=e0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qd=10,L4=2e4;function M4(e){return Wg(e.type)||e.type==="spring"||!_T(e.ease)}function F4(e,t){const n=new Jg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<L4;)r=n.sample(a),i.push(r.value),a+=qd;return{times:void 0,keyframes:i,duration:a-qd,ease:"linear"}}const AT={anticipate:ME,backInOut:LE,circInOut:BE};function B4(e){return e in AT}class kT extends lT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new sT(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Yd()&&B4(o)&&(o=AT[o]),M4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:g,...x}=this.options,y=F4(t,x);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,a=y.times,o=y.ease,s="keyframes"}const d=O4(u.owner.current,l,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(CT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Ud(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return fi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return fi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=di(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}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 Qt;const{animation:r}=n;CT(r,t)}return Qt}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:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Jg({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),g=di(this.time);l.setWithVelocity(m.sample(g-qd).value,m.sample(g).value,qd)}const{onStop:u}=this.options;u&&u(),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:a,damping:o,type:s}=t;return D4()&&r&&TT.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const j4=e0(()=>window.ScrollTimeline!==void 0);class U4{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}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=>j4()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function H4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const n0=(e,t,n,r={},i,a)=>o=>{const s=Rg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-di(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};H4(s)||(c={...c,...sL(e,c)}),c.duration&&(c.duration=di(c.duration)),c.repeatDelay&&(c.repeatDelay=di(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const f=Ud(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new U4([])}return!a&&kT.supports(c)?new kT(c):new Jg(c)},z4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),V4=e=>Sg(e)?e[e.length-1]||0:e;function r0(e,t){e.indexOf(t)===-1&&e.push(t)}function i0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class a0{constructor(){this.subscriptions=[]}add(t){return r0(this.subscriptions,t),()=>i0(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 a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const RT=30,$4=e=>!isNaN(parseFloat(e));class W4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=jr.now();this.updatedAt!==a&&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=jr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=$4(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 a0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.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=jr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>RT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,RT);return cT(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 Qu(e,t){return new W4(e,t)}function Y4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qu(n))}function q4(e,t){const n=jd(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=V4(a[o]);Y4(e,o,s)}}const Gd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),NT="data-"+Gd("framerAppearId");function PT(e){return e.props[NT]}const Jt=e=>!!(e&&e.getVelocity);function G4(e){return!!(Jt(e)&&e.add)}function o0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(G4(n))return n.add(t)}function K4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function IT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(o=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=u[d];if(p===void 0||c&&K4(c,d))continue;const m={delay:n,...Rg(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=PT(e);if(y){const w=window.MotionHandoffAnimation(y,d,Xe);w!==null&&(m.startTime=w,g=!0)}}o0(e,d),f.start(n0(d,f,p,e.shouldReduceMotion&&Xi.has(d)?{type:!1}:m,e,g));const x=f.animation;x&&l.push(x)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&q4(e,s)})}),l}function s0(e,t,n={}){var r;const i=jd(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(IT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return X4(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[l,c]=u==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function X4(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(Q4).forEach((l,c)=>{l.notify("AnimationStart",t),o.push(s0(l,t,{...a,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(o)}function Q4(e,t){return e.sortNodePosition(t)}function Z4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>s0(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=s0(e,t,n);else{const i=typeof t=="function"?jd(e,t,n.custom):t;r=Promise.all(IT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const J4=kg.length;function OT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?OT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<J4;n++){const r=kg[n],i=e.props[r];(Vu(i)||i===!1)&&(t[r]=i)}return t}const eM=[...Ag].reverse(),tM=Ag.length;function nM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Z4(e,n,r)))}function rM(e){let t=nM(e),n=DT(),r=!0;const i=u=>(l,c)=>{var d;const f=jd(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;l={...l,...g,...m}}return l};function a(u){t=u(e)}function o(u){const{props:l}=e,c=OT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<tM;x++){const y=eM[x],w=n[y],b=l[y]!==void 0?l[y]:c[y],T=Vu(b),S=y===u?w.isActive:null;S===!1&&(m=x);let _=b===c[y]&&b!==l[y]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),w.protectedKeys={...p},!w.isActive&&S===null||!b&&!w.prevProp||zu(b)||typeof b=="boolean")continue;const N=iM(w.prevProp,b);let D=N||y===u&&w.isActive&&!_&&T||x>m&&T,V=!1;const P=Array.isArray(b)?b:[b];let $=P.reduce(i(y),{});S===!1&&($={});const{prevResolvedValues:H={}}=w,X={...H,...$},Y=ee=>{D=!0,f.has(ee)&&(V=!0,f.delete(ee)),w.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=H[ee];if(p.hasOwnProperty(ee))continue;let A=!1;Sg(F)&&Sg(B)?A=!kE(F,B):A=F!==B,A?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):w.protectedKeys[ee]=!0}w.prevProp=b,w.prevResolvedValues=$,w.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(_&&N)||V)&&d.push(...P.map(ee=>({animation:ee,options:{type:y}})))}if(f.size){const x={};f.forEach(y=>{const w=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=w??null}),d.push({animation:x})}let g=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=o(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=DT(),r=!0}}}function iM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kE(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function DT(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}class ta{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aM extends ta{constructor(t){super(t),t.animationState||(t.animationState=rM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zu(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===void 0||t.call(this)}}let oM=0;class sM extends ta{constructor(){super(...arguments),this.id=oM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const uM={animation:{Feature:aM},exit:{Feature:sM}},LT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Kd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const lM=e=>t=>LT(t)&&e(t,Kd(t));function hi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mi(e,t,n,r){return hi(e,t,lM(n),r)}const MT=(e,t)=>Math.abs(e-t);function cM(e,t){const n=MT(e.x,t.x),r=MT(e.y,t.y);return Math.sqrt(n**2+r**2)}class FT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!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 d=l0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=cM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:g}=Vt;this.history.push({...m,timestamp:g});const{onStart:x,onMove:y}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=u0(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=l0(d.type==="pointercancel"?this.lastMoveEventInfo:u0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,x),m&&m(d,x)},!LT(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Kd(t),s=u0(o,this.transformPagePoint),{point:u}=s,{timestamp:l}=Vt;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,l0(s,this.history)),this.removeListeners=pi(mi(this.contextWindow,"pointermove",this.handlePointerMove),mi(this.contextWindow,"pointerup",this.handlePointerUp),mi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qi(this.updatePoint)}}function u0(e,t){return t?{point:t(e.point)}:e}function BT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function l0({point:e},t){return{point:e,delta:BT(e,jT(t)),offset:BT(e,dM(t)),velocity:fM(t,.1)}}function dM(e){return e[0]}function jT(e){return e[e.length-1]}function fM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=jT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>di(t)));)n--;if(!r)return{x:0,y:0};const a=fi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function UT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=UT("dragHorizontal"),zT=UT("dragVertical");function VT(e){let t=!1;if(e==="y")t=zT();else if(e==="x")t=HT();else{const n=HT(),r=zT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function $T(){const e=VT(!0);return e?(e(),!1):!0}function rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const WT=1e-4,pM=1-WT,hM=1+WT,YT=.01,mM=0-YT,gM=0+YT;function Un(e){return e.max-e.min}function yM(e,t,n){return Math.abs(e-t)<=n}function qT(e,t,n,r=.5){e.origin=r,e.originPoint=pt(t.min,t.max,e.origin),e.scale=Un(n)/Un(t),e.translate=pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=pM&&e.scale<=hM||isNaN(e.scale))&&(e.scale=1),(e.translate>=mM&&e.translate<=gM||isNaN(e.translate))&&(e.translate=0)}function Zu(e,t,n,r){qT(e.x,t.x,n.x,r?r.originX:void 0),qT(e.y,t.y,n.y,r?r.originY:void 0)}function GT(e,t,n){e.min=n.min+t.min,e.max=e.min+Un(t)}function vM(e,t,n){GT(e.x,t.x,n.x),GT(e.y,t.y,n.y)}function KT(e,t,n){e.min=t.min-n.min,e.max=e.min+Un(t)}function Ju(e,t,n){KT(e.x,t.x,n.x),KT(e.y,t.y,n.y)}function wM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?pt(n,e,r.max):Math.min(e,n)),e}function XT(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 bM(e,{top:t,left:n,bottom:r,right:i}){return{x:XT(e.x,n,i),y:XT(e.y,t,r)}}function QT(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 xM(e,t){return{x:QT(e.x,t.x),y:QT(e.y,t.y)}}function EM(e,t){let n=.5;const r=Un(e),i=Un(t);return i>r?n=ns(t.min,t.max-r,e.min):r>i&&(n=ns(e.min,e.max-i,t.min)),Zi(0,1,n)}function TM(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 c0=.35;function _M(e=c0){return e===!1?e=0:e===!0&&(e=c0),{x:ZT(e,"left","right"),y:ZT(e,"top","bottom")}}function ZT(e,t,n){return{min:JT(e,t),max:JT(e,n)}}function JT(e,t){return typeof e=="number"?e:e[t]||0}const e2=()=>({translate:0,scale:1,origin:0,originPoint:0}),is=()=>({x:e2(),y:e2()}),t2=()=>({min:0,max:0}),Et=()=>({x:t2(),y:t2()});function rr(e){return[e("x"),e("y")]}function n2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function CM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function d0(e){return e===void 0||e===1}function f0({scale:e,scaleX:t,scaleY:n}){return!d0(e)||!d0(t)||!d0(n)}function Qa(e){return f0(e)||r2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function r2(e){return i2(e.x)||i2(e.y)}function i2(e){return e&&e!=="0%"}function Xd(e,t,n){const r=e-n,i=t*r;return n+i}function a2(e,t,n,r,i){return i!==void 0&&(e=Xd(e,i,r)),Xd(e,n,r)+t}function p0(e,t=0,n=1,r,i){e.min=a2(e.min,t,n,r,i),e.max=a2(e.max,t,n,r,i)}function o2(e,{x:t,y:n}){p0(e.x,t.translate,t.scale,t.originPoint),p0(e.y,n.translate,n.scale,n.originPoint)}const s2=.999999999999,u2=1.0000000000001;function AM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&os(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,o2(e,o)),r&&Qa(a.latestValues)&&os(e,a.latestValues))}t.x<u2&&t.x>s2&&(t.x=1),t.y<u2&&t.y>s2&&(t.y=1)}function as(e,t){e.min=e.min+t,e.max=e.max+t}function l2(e,t,n,r,i=.5){const a=pt(e.min,e.max,i);p0(e,t,n,a,r)}function os(e,t){l2(e.x,t.x,t.scaleX,t.scale,t.originX),l2(e.y,t.y,t.scaleY,t.scale,t.originY)}function c2(e,t){return n2(CM(e.getBoundingClientRect(),t))}function kM(e,t,n){const r=c2(e,n),{scroll:i}=t;return i&&(as(r.x,i.offset.x),as(r.y,i.offset.y)),r}const d2=({current:e})=>e?e.ownerDocument.defaultView:null,RM=new WeakMap;class NM{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Kd(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rr(x=>{let y=this.getAxisMotionValue(x).get()||0;if(Br.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[x];b&&(y=Un(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),m&&Xe.postRender(()=>m(c,d)),o0(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(p&&this.currentDirection===null){this.currentDirection=PM(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),g&&g(c,d)},s=(c,d)=>this.stop(c,d),u=()=>rr(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new FT(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:d2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Xe.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Qd(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=wM(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&rs(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=bM(i.layoutBox,n):this.constraints=!1,this.elastic=_M(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=TM(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=kM(r,i.root,this.visualElement.getTransformPagePoint());let o=xM(i.layout.layoutBox,a);if(n){const s=n(SM(o));this.hasMutatedConstraints=!!s,s&&(o=n2(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=rr(c=>{if(!Qd(c,n,this.currentDirection))return;let d=u&&u[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return o0(this.visualElement,t),r.start(n0(t,r,0,n,this.visualElement,!1))}stopAnimation(){rr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rr(n=>{const{drag:r}=this.getProps();if(!Qd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-pt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!rs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const u=s.get();i[o]=EM({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rr(o=>{if(!Qd(o,t,null))return;const s=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];s.set(pt(u,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;RM.set(this.visualElement,this);const t=this.visualElement.current,n=mi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();rs(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const o=hi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(rr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=c0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Qd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class IM extends ta{constructor(t){super(t),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new NM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const f2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class OM extends ta{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(t){this.session=new FT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:f2(t),onStart:f2(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=mi(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 Zd=v.createContext(null);function DM(){const e=v.useContext(Zd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const a=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const h0=v.createContext({}),p2=v.createContext({}),Jd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function h2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const el={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=h2(e,t.target.x),r=h2(e,t.target.y);return`${n}% ${r}%`}},LM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ea.parse(e);if(i.length>5)return r;const a=ea.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=u;const l=pt(s,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),a(i)}},ef={};function MM(e){Object.assign(ef,e)}const{schedule:m0,cancel:Eie}=NE(queueMicrotask,!1);class FM extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;MM(BM),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Jd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),m0.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 m2(e){const[t,n]=DM(),r=v.useContext(h0);return E.jsx(FM,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(p2),isPresent:t,safeToRemove:n})}const BM={borderRadius:{...el,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:el,borderTopRightRadius:el,borderBottomLeftRadius:el,borderBottomRightRadius:el,boxShadow:LM},g2=["TopLeft","TopRight","BottomLeft","BottomRight"],jM=g2.length,y2=e=>typeof e=="string"?parseFloat(e):e,v2=e=>typeof e=="number"||ye.test(e);function UM(e,t,n,r,i,a){i?(e.opacity=pt(0,n.opacity!==void 0?n.opacity:1,HM(r)),e.opacityExit=pt(t.opacity!==void 0?t.opacity:1,0,zM(r))):a&&(e.opacity=pt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<jM;o++){const s=`border${g2[o]}Radius`;let u=w2(t,s),l=w2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||v2(u)===v2(l)?(e[s]=Math.max(pt(y2(u),y2(l),r),0),(Br.test(l)||Br.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function w2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const HM=b2(0,.5,FE),zM=b2(.5,.95,Qt);function b2(e,t,n){return r=>r<e?0:r>t?1:n(ns(e,t,r))}function x2(e,t){e.min=t.min,e.max=t.max}function ir(e,t){x2(e.x,t.x),x2(e.y,t.y)}function E2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function T2(e,t,n,r,i){return e-=t,e=Xd(e,1/n,r),i!==void 0&&(e=Xd(e,1/i,r)),e}function VM(e,t=0,n=1,r=.5,i,a=e,o=e){if(Br.test(t)&&(t=parseFloat(t),t=pt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=pt(a.min,a.max,r);e===a&&(s-=t),e.min=T2(e.min,t,n,s,i),e.max=T2(e.max,t,n,s,i)}function _2(e,t,[n,r,i],a,o){VM(e,t[n],t[r],t[i],t.scale,a,o)}const $M=["x","scaleX","originX"],WM=["y","scaleY","originY"];function S2(e,t,n,r){_2(e.x,t,$M,n?n.x:void 0,r?r.x:void 0),_2(e.y,t,WM,n?n.y:void 0,r?r.y:void 0)}function C2(e){return e.translate===0&&e.scale===1}function A2(e){return C2(e.x)&&C2(e.y)}function k2(e,t){return e.min===t.min&&e.max===t.max}function YM(e,t){return k2(e.x,t.x)&&k2(e.y,t.y)}function R2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function N2(e,t){return R2(e.x,t.x)&&R2(e.y,t.y)}function P2(e){return Un(e.x)/Un(e.y)}function I2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class qM{constructor(){this.members=[]}add(t){r0(this.members,t),t.scheduleRender()}remove(t){if(i0(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 a=this.members[i];if(a.isPresent!==!1){r=a;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 GM(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const KM=(e,t)=>e.depth-t.depth;class XM{constructor(){this.children=[],this.isDirty=!1}add(t){r0(this.children,t),this.isDirty=!0}remove(t){i0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(KM),this.isDirty=!1,this.children.forEach(t)}}function tf(e){const t=Jt(e)?e.get():e;return z4(t)?t.toValue():t}function QM(e,t){const n=jr.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Qi(r),e(a-t))};return Xe.read(r,!0),()=>Qi(r)}function ZM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function JM(e,t,n){const r=Jt(e)?e:Qu(e);return r.start(n0("",r,t,n)),r.animation}const Za={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tl=typeof window<"u"&&window.MotionDebug!==void 0,g0=["","X","Y","Z"],e5={visibility:"hidden"},O2=1e3;let t5=0;function y0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function D2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=PT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&D2(r)}function L2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=t5++,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,tl&&(Za.totalNodes=Za.resolvedTargetDeltas=Za.recalculatedProjection=0),this.nodes.forEach(i5),this.nodes.forEach(l5),this.nodes.forEach(c5),this.nodes.forEach(a5),tl&&window.MotionDebug.record(Za)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new XM)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new a0),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const u=this.eventHandlers.get(o);u&&u.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ZM(o),this.instance=o;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=QM(f,250),Jd.hasAnimatedSinceResize&&(Jd.hasAnimatedSinceResize=!1,this.nodes.forEach(F2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||m5,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=c.getProps(),w=!this.targetLayout||!N2(this.targetLayout,m)||p,b=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...Rg(g,"layout"),onPlay:x,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||F2(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,Qi(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(d5),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&&D2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(M2);return}this.isUpdating||this.nodes.forEach(s5),this.isUpdating=!1,this.nodes.forEach(u5),this.nodes.forEach(n5),this.nodes.forEach(r5),this.clearAllSnapshots();const s=jr.now();Vt.delta=Zi(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Ng.update.process(Vt),Ng.preRender.process(Vt),Ng.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(o5),this.sharedNodes.forEach(f5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!A2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&(s||Qa(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return o&&(u=this.removeTransform(u)),g5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Et();const u=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(y5))){const{scroll:c}=this.root;c&&(as(u.x,c.offset.x),as(u.y,c.offset.y))}return u}removeElementScroll(o){var s;const u=Et();if(ir(u,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ir(u,o),as(u.x,d.offset.x),as(u.y,d.offset.y))}return u}applyTransform(o,s=!1){const u=Et();ir(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&os(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Qa(c.latestValues)&&os(u,c.latestValues)}return Qa(this.latestValues)&&os(u,this.latestValues),u}removeTransform(o){const s=Et();ir(s,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Qa(l.latestValues))continue;f0(l.latestValues)&&l.updateSnapshot();const c=Et(),d=l.measurePageBox();ir(c,d),S2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Qa(this.latestValues)&&S2(s,this.latestValues),s}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!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),Ju(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Et(),this.targetWithTransforms=Et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ir(this.target,this.layout.layoutBox),o2(this.target,this.targetDelta)):ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),Ju(this.relativeTargetOrigin,this.target,p.target),ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tl&&Za.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||f0(this.parent.latestValues)||r2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Vt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=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||d))return;ir(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;AM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Et());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(E2(this.prevProjectionDelta.x,this.projectionDelta.x),E2(this.prevProjectionDelta.y,this.projectionDelta.y)),Zu(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!I2(this.projectionDelta.x,this.prevProjectionDelta.x)||!I2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),tl&&Za.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=is(),this.projectionDelta=is(),this.projectionDeltaWithTransform=is()}setAnimationOrigin(o,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=is();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Et(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),y=!x||x.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(h5));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const S=T/1e3;B2(d.x,o.x,S),B2(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ju(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p5(this.relativeTarget,this.relativeTargetOrigin,f,S),b&&YM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Et()),ir(b,this.relativeTarget)),g&&(this.animationValues=c,UM(c,l,this.latestValues,S,w,y)),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&&(Qi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Jd.hasAnimatedSinceResize=!0,this.currentAnimation=JM(0,O2,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},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(O2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=o;if(!(!s||!u||!l)){if(this!==o&&this.layout&&l&&V2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Et();const d=Un(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+d;const f=Un(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}ir(s,u),os(s,c),Zu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new qM),this.sharedNodes.get(o).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&y0("z",o,l,this.animationValues);for(let c=0;c<g0.length;c++)y0(`rotate${g0[c]}`,o,l,this.animationValues),y0(`skew${g0[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}getProjectionStyles(o){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return e5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=tf(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=tf(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Qa(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=GM(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in ef){if(f[g]===void 0)continue;const{correct:x,applyTo:y}=ef[g],w=l.transform==="none"?f[g]:x(f[g],d);if(y){const b=y.length;for(let T=0;T<b;T++)l[y[T]]=w}else l[g]=w}return this.options.layoutId&&(l.pointerEvents=d===this?tf(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(M2),this.root.sharedNodes.clear()}}}function n5(e){e.updateLayout()}function r5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?rr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(f);f.min=r[d].min,f.max=f.min+p}):V2(a,n.layoutBox,r)&&rr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=is();Zu(s,r,n.layoutBox);const u=is();o?Zu(u,e.applyTransform(i,!0),n.measuredBox):Zu(u,r,n.layoutBox);const l=!A2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Et();Ju(m,n.layoutBox,f.layoutBox);const g=Et();Ju(g,r,p.layoutBox),N2(m,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function i5(e){tl&&Za.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function a5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function o5(e){e.clearSnapshot()}function M2(e){e.clearMeasurements()}function s5(e){e.isLayoutDirty=!1}function u5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function F2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function l5(e){e.resolveTargetDelta()}function c5(e){e.calcProjection()}function d5(e){e.resetSkewAndRotation()}function f5(e){e.removeLeadSnapshot()}function B2(e,t,n){e.translate=pt(t.translate,0,n),e.scale=pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function j2(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function p5(e,t,n,r){j2(e.x,t.x,n.x,r),j2(e.y,t.y,n.y,r)}function h5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const m5={duration:.45,ease:[.4,0,.1,1]},U2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),H2=U2("applewebkit/")&&!U2("chrome/")?Math.round:Qt;function z2(e){e.min=H2(e.min),e.max=H2(e.max)}function g5(e){z2(e.x),z2(e.y)}function V2(e,t,n){return e==="position"||e==="preserve-aspect"&&!yM(P2(t),P2(n),.2)}function y5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const v5=L2({attachResizeListener:(e,t)=>hi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),v0={current:void 0},$2=L2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!v0.current){const e=new v5({});e.mount(window),e.setOptions({layoutScroll:!0}),v0.current=e}return v0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),w5={pan:{Feature:OM},drag:{Feature:IM,ProjectionNode:$2,MeasureLayout:m2}};function W2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||$T())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Xe.postRender(()=>u(a,o))};return mi(e.current,n,i,{passive:!e.getProps()[r]})}class b5 extends ta{mount(){this.unmount=pi(W2(this.node,!0),W2(this.node,!1))}unmount(){}}class x5 extends ta{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=pi(hi(this.node.current,"focus",()=>this.onFocus()),hi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Y2=(e,t)=>t?e===t?!0:Y2(e,t.parentElement):!1;function w0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Kd(n))}class E5 extends ta{constructor(){super(...arguments),this.removeStartListeners=Qt,this.removeEndListeners=Qt,this.removeAccessibleListeners=Qt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=mi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Y2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),o=mi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=pi(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||w0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=hi(this.node.current,"keyup",o),w0("down",(s,u)=>{this.startPress(s,u)})},n=hi(this.node.current,"keydown",t),r=()=>{this.isPressing&&w0("cancel",(a,o)=>this.cancelPress(a,o))},i=hi(this.node.current,"blur",r);this.removeAccessibleListeners=pi(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$T()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=mi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=hi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const b0=new WeakMap,x0=new WeakMap,T5=e=>{const t=b0.get(e.target);t&&t(e)},_5=e=>{e.forEach(T5)};function S5({root:e,...t}){const n=e||document;x0.has(n)||x0.set(n,{});const r=x0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_5,{root:e,...t})),r[i]}function C5(e,t,n){const r=S5(t);return b0.set(e,n),r.observe(e),()=>{b0.delete(e),r.unobserve(e)}}const A5={some:0,all:1};class k5 extends ta{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:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:A5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return C5(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(R5(t,n))&&this.startObserver()}unmount(){}}function R5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const N5={inView:{Feature:k5},tap:{Feature:E5},focus:{Feature:x5},hover:{Feature:b5}},P5={layout:{ProjectionNode:$2,MeasureLayout:m2}},E0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nf=v.createContext({}),T0=typeof window<"u",q2=T0?v.useLayoutEffect:v.useEffect,G2=v.createContext({strict:!1});function I5(e,t,n,r,i){var a,o;const{visualElement:s}=v.useContext(nf),u=v.useContext(G2),l=v.useContext(Zd),c=v.useContext(E0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(p2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&O5(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[NT],g=v.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return q2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),m0.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,m)}),g.current=!1))}),f}function O5(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:K2(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&rs(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function K2(e){if(e)return e.options.allowProjection!==!1?e.projection:K2(e.parent)}function D5(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):rs(n)&&(n.current=r))},[t])}function rf(e){return zu(e.animate)||kg.some(t=>Vu(e[t]))}function X2(e){return!!(rf(e)||e.variants)}function L5(e,t){if(rf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vu(n)?n:void 0,animate:Vu(r)?r:void 0}}return e.inherit!==!1?t:{}}function M5(e){const{initial:t,animate:n}=L5(e,v.useContext(nf));return v.useMemo(()=>({initial:t,animate:n}),[Q2(t),Q2(n)])}function Q2(e){return Array.isArray(e)?e.join(" "):e}const Z2={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"]},ss={};for(const e in Z2)ss[e]={isEnabled:t=>Z2[e].some(n=>!!t[n])};function F5(e){for(const t in e)ss[t]={...ss[t],...e[t]}}const B5=Symbol.for("motionComponentSymbol");function j5({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&F5(e);function a(s,u){let l;const c={...v.useContext(E0),...s,layoutId:U5(s)},{isStatic:d}=c,f=M5(s),p=r(s,d);if(!d&&T0){H5();const m=z5(c);l=m.MeasureLayout,f.visualElement=I5(i,p,c,t,m.ProjectionNode)}return E.jsxs(nf.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,D5(p,f.visualElement,u),p,d,f.visualElement)]})}const o=v.forwardRef(a);return o[B5]=i,o}function U5({layoutId:e}){const t=v.useContext(h0).id;return t&&e!==void 0?t+"-"+e:e}function H5(e,t){v.useContext(G2).strict}function z5(e){const{drag:t,layout:n}=ss;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 V5=["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 _0(e){return typeof e!="string"||e.includes("-")?!1:!!(V5.indexOf(e)>-1||/[A-Z]/u.test(e))}function J2(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const e_=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 t_(e,t,n,r){J2(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(e_.has(i)?i:Gd(i),t.attrs[i])}function n_(e,{layout:t,layoutId:n}){return Xi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ef[e]||e==="opacity")}function S0(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(Jt(i[o])||t.style&&Jt(t.style[o])||n_(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),a}function r_(e,t,n){const r=S0(e,t,n);for(const i in e)if(Jt(e[i])||Jt(t[i])){const a=$u.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function C0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function $5(e){if(Xi.has(e))return"transform";if(TT.has(e))return Gd(e)}function W5({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const u={latestValues:Y5(i,a,o,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const i_=e=>(t,n)=>{const r=v.useContext(nf),i=v.useContext(Zd),a=()=>W5(e,t,r,i,n);return n?a():C0(a)};function a_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const a=Cg(e,r[i]);if(a){const{transitionEnd:o,transition:s,...u}=a;n(u,o)}}}function Y5(e,t,n,r,i){var a;const o={},s=new Set,u=r&&((a=e.style)===null||a===void 0?void 0:a.willChange)===void 0,l=i(e,{});for(const x in l)o[x]=tf(l[x]);let{initial:c,animate:d}=e;const f=rf(e),p=X2(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const g=m?d:c;return g&&typeof g!="boolean"&&!zu(g)&&a_(e,g,(x,y)=>{for(const w in x){let b=x[w];if(Array.isArray(b)){const T=m?b.length-1:0;b=b[T]}b!==null&&(o[w]=b)}for(const w in y)o[w]=y[w]}),u&&(d&&c!==!1&&!zu(d)&&a_(e,d,x=>{for(const y in x){const w=$5(y);w&&s.add(w)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const A0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),o_=()=>({...A0(),attrs:{}}),s_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,q5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G5=$u.length;function K5(e,t,n){let r="",i=!0;for(let a=0;a<G5;a++){const o=$u[a],s=e[o];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(o.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=s_(s,Vg[o]);if(!u){i=!1;const c=q5[o]||o;r+=`${c}(${l}) `}n&&(t[o]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function k0(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const u in t){const l=t[u];if(Xi.has(u)){o=!0;continue}else if(zE(u)){i[u]=l;continue}else{const c=s_(l,Vg[u]);u.startsWith("origin")?(s=!0,a[u]=c):r[u]=c}}if(t.transform||(o||n?r.transform=K5(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=a;r.transformOrigin=`${u} ${l} ${c}`}}function u_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function X5(e,t,n){const r=u_(t,e.x,e.width),i=u_(n,e.y,e.height);return`${r} ${i}`}const Q5={offset:"stroke-dashoffset",array:"stroke-dasharray"},Z5={offset:"strokeDashoffset",array:"strokeDasharray"};function J5(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Q5:Z5;e[a.offset]=ye.transform(-r);const o=ye.transform(t),s=ye.transform(n);e[a.array]=`${o} ${s}`}function R0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(k0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=X5(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&J5(f,o,s,u,!1)}const N0=e=>typeof e=="string"&&e.toLowerCase()==="svg",e8={useVisualState:i_({scrapeMotionValuesFromProps:r_,createRenderState:o_,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{R0(n,r,N0(t.tagName),e.transformTemplate),t_(t,n)})}})},t8={useVisualState:i_({applyWillChange:!0,scrapeMotionValuesFromProps:S0,createRenderState:A0})};function l_(e,t,n){for(const r in t)!Jt(t[r])&&!n_(r,n)&&(e[r]=t[r])}function n8({transformTemplate:e},t){return v.useMemo(()=>{const n=A0();return k0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function r8(e,t){const n=e.style||{},r={};return l_(r,n,e),Object.assign(r,n8(e,t)),r}function i8(e,t){const n={},r=r8(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 a8=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 af(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||a8.has(e)}let c_=e=>!af(e);function o8(e){e&&(c_=t=>t.startsWith("on")?!af(t):e(t))}try{o8(require("@emotion/is-prop-valid").default)}catch{}function s8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(c_(i)||n===!0&&af(i)||!t&&!af(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function u8(e,t,n,r){const i=v.useMemo(()=>{const a=o_();return R0(a,t,N0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};l_(a,e.style,e),i.style={...a,...i.style}}return i}function l8(e=!1){return(n,r,i,{latestValues:a},o)=>{const u=(_0(n)?u8:i8)(r,a,o,n),l=s8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>Jt(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function c8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={..._0(r)?e8:t8,preloadedFeatures:e,useRender:l8(i),createVisualElement:t,Component:r};return j5(o)}}const P0={current:null},d_={current:!1};function d8(){if(d_.current=!0,!!T0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>P0.current=e.matches;e.addListener(t),t()}else P0.current=!1}function f8(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Jt(i))e.addValue(r,i);else if(Jt(a))e.addValue(r,Qu(i,{owner:e}));else if(a!==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,Qu(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const f_=new WeakMap,p8=[...KE,Zt,ea],h8=e=>p8.find(GE(e)),p_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class m8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Fg,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 f=jr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=rf(n),this.isVariantNode=X2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&Jt(p)&&p.set(u[f],!1)}}mount(t){this.current=t,f_.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)),d_.current||d8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:P0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){f_.delete(this.current),this.projection&&this.projection.unmount(),Qi(this.notifyUpdate),Qi(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=Xi.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),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 ss){const n=ss[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 a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Et()}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<p_.length;r++){const i=p_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=f8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const 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=Qu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(UE(i)||jE(i))?i=parseFloat(i):!h8(i)&&ea.test(n)&&(i=oT(t,n)),this.setBaseTarget(t,Jt(i)?i.get():i)),Jt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Cg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Jt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new a0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class h_ extends m8{constructor(){super(...arguments),this.KeyframeResolver=sT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function g8(e){return window.getComputedStyle(e)}class y8 extends h_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=J2}readValueFromInstance(t,n){if(Xi.has(n)){const r=$g(n);return r&&r.default||0}else{const r=g8(t),i=(zE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return c2(t,n)}build(t,n,r){k0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return S0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class v8 extends h_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xi.has(n)){const r=$g(n);return r&&r.default||0}return n=e_.has(n)?n:Gd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return r_(t,n,r)}build(t,n,r){R0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){t_(t,n,r,i)}mount(t){this.isSVGTag=N0(t.tagName),super.mount(t)}}const w8=(e,t)=>_0(e)?new v8(t):new y8(t,{allowProjection:e!==v.Fragment}),b8=c8({...uM,...N5,...w5,...P5},w8),us=nL(b8);class x8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function E8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=v.useContext(E0);return v.useInsertionEffect(()=>{const{width:o,height:s,top:u,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
40
+ `+a.stack}return{value:e,source:t,stack:i,digest:null}}function Gm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Km(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var o6=typeof WeakMap=="function"?WeakMap:Map;function Tx(e,t,n){n=si(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ed||(Ed=!0,cg=r),Km(e,t)},n}function _x(e,t,n){n=si(-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(){Km(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Km(e,t),typeof r!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Sx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new o6;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=b6.bind(null,e,t,n),t.then(e,e))}function Cx(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 Ax(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=si(-1,1),t.tag=2,Vi(n,t,1))),n.lanes|=1),e)}var s6=ti.ReactCurrentOwner,bn=!1;function cn(e,t,n,r){t.child=e===null?qb(t,null,n,r):Vo(t,e.child,n,r)}function kx(e,t,n,r,i){n=n.render;var a=t.ref;return Wo(t,i),r=Um(e,t,n,r,a,i),n=Hm(),e!==null&&!bn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&n&&Tm(t),t.flags|=1,cn(e,t,r,i),t.child)}function Rx(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!yg(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Nx(e,t,a,r,i)):(e=kd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:bu,n(o,r)&&e.ref===t.ref)return ui(e,t,i)}return t.flags|=1,e=Ki(a,r),e.ref=t.ref,e.return=t,t.child=e}function Nx(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(bu(a,r)&&e.ref===t.ref)if(bn=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(bn=!0);else return t.lanes=e.lanes,ui(e,t,i)}return Xm(e,t,n,r,i)}function Px(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Ko,Bn),Bn|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(Ko,Bn),Bn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,et(Ko,Bn),Bn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,et(Ko,Bn),Bn|=r;return cn(e,t,i,n),t.child}function Ix(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xm(e,t,n,r,i){var a=wn(n)?Fa:qt.current;return a=jo(t,a),Wo(t,i),n=Um(e,t,n,r,a,i),r=Hm(),e!==null&&!bn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ui(e,t,i)):(ot&&r&&Tm(t),t.flags|=1,cn(e,t,n,i),t.child)}function Ox(e,t,n,r,i){if(wn(n)){var a=!0;Jc(t)}else a=!1;if(Wo(t,i),t.stateNode===null)yd(e,t),xx(t,n,r),qm(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=Jn(l):(l=wn(n)?Fa:qt.current,l=jo(t,l));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||u!==l)&&Ex(t,o,r,l),zi=!1;var f=t.memoizedState;o.state=f,ud(t,r,o,i),u=t.memoizedState,s!==r||f!==u||vn.current||zi?(typeof c=="function"&&(Ym(t,n,c,r),u=t.memoizedState),(s=zi||bx(t,n,s,r,f,u,l))?(d||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=u),o.props=r,o.state=u,o.context=l,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Kb(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:yr(t.type,s),o.props=l,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Jn(u):(u=wn(n)?Fa:qt.current,u=jo(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||f!==u)&&Ex(t,o,r,u),zi=!1,f=t.memoizedState,o.state=f,ud(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||vn.current||zi?(typeof p=="function"&&(Ym(t,n,p,r),m=t.memoizedState),(l=zi||bx(t,n,l,r,f,m,u)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=l):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Qm(e,t,n,r,a,i)}function Qm(e,t,n,r,i,a){Ix(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Bb(t,n,!1),ui(e,t,a);r=t.stateNode,s6.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Vo(t,e.child,null,a),t.child=Vo(t,null,s,a)):cn(e,t,s,a),t.memoizedState=r.state,i&&Bb(t,n,!0),t.child}function Dx(e){var t=e.stateNode;t.pendingContext?Mb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mb(e,t.context,!1),Dm(e,t.containerInfo)}function Lx(e,t,n,r,i){return zo(),Am(i),t.flags|=256,cn(e,t,n,r),t.child}var Zm={dehydrated:null,treeContext:null,retryLane:0};function Jm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mx(e,t,n){var r=t.pendingProps,i=dt.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),et(dt,i&1),e===null)return Cm(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,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Rd(o,r,0,null),e=qa(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Jm(n),t.memoizedState=Zm,e):eg(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return u6(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Ki(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Ki(s,a):(a=qa(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Jm(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Zm,r}return a=e.child,e=a.sibling,r=Ki(a,{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 eg(e,t){return t=Rd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gd(e,t,n,r){return r!==null&&Am(r),Vo(t,e.child,null,n),e=eg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function u6(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Gm(Error(Q(422))),gd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Rd({mode:"visible",children:r.children},i,0,null),a=qa(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Vo(t,e.child,null,o),t.child.memoizedState=Jm(o),t.memoizedState=Zm,a);if(!(t.mode&1))return gd(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(Q(419)),r=Gm(a,r,void 0),gd(e,t,o,r)}if(s=(o&e.childLanes)!==0,bn||s){if(r=Dt,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!==a.retryLane&&(a.retryLane=i,oi(e,i),br(r,e,i,-1))}return gg(),r=Gm(Error(Q(421))),gd(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=x6.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fn=Bi(i.nextSibling),Mn=t,ot=!0,gr=null,e!==null&&(Qn[Zn++]=ii,Qn[Zn++]=ai,Qn[Zn++]=Ba,ii=e.id,ai=e.overflow,Ba=t),t=eg(t,r.children),t.flags|=4096,t)}function Fx(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Pm(e.return,t,n)}function tg(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Bx(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(cn(e,t,r.children,n),r=dt.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&&Fx(e,n,t);else if(e.tag===19)Fx(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(et(dt,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&&ld(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),tg(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ld(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}tg(t,!0,n,null,a);break;case"together":tg(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ui(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Ki(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ki(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function l6(e,t,n){switch(t.tag){case 3:Dx(t),zo();break;case 5:Zb(t);break;case 1:wn(t.type)&&Jc(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;et(ad,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(et(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?Mx(e,t,n):(et(dt,dt.current&1),e=ui(e,t,n),e!==null?e.sibling:null);et(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Bx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),et(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,Px(e,t,n)}return ui(e,t,n)}var jx,ng,Ux,Hx;jx=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}},ng=function(){},Ux=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ha(Lr.current);var a=null;switch(n){case"input":i=Ph(e,i),r=Ph(e,r),a=[];break;case"select":i=ct({},i,{value:void 0}),r=ct({},r,{value:void 0}),a=[];break;case"textarea":i=Dh(e,i),r=Dh(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xc)}Mh(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Js.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var u=r[l];if(s=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(a=a||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Js.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&nt("scroll",e),a||s===u||(a=[])):(a=a||[]).push(l,u))}n&&(a=a||[]).push("style",n);var l=a;(t.updateQueue=l)&&(t.flags|=4)}},Hx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lu(e,t){if(!ot)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 Kt(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 c6(e,t,n){var r=t.pendingProps;switch(_m(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(t),null;case 1:return wn(t.type)&&Zc(),Kt(t),null;case 3:return r=t.stateNode,Yo(),rt(vn),rt(qt),Fm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(rd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gr!==null&&(pg(gr),gr=null))),ng(e,t),Kt(t),null;case 5:Lm(t);var i=Ha(Nu.current);if(n=t.type,e!==null&&t.stateNode!=null)Ux(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Kt(t),null}if(e=Ha(Lr.current),rd(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Dr]=t,r[Su]=a,e=(t.mode&1)!==0,n){case"dialog":nt("cancel",r),nt("close",r);break;case"iframe":case"object":case"embed":nt("load",r);break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],r);break;case"source":nt("error",r);break;case"img":case"image":case"link":nt("error",r),nt("load",r);break;case"details":nt("toggle",r);break;case"input":xw(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":_w(r,a),nt("invalid",r)}Mh(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Kc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Kc(r.textContent,s,e),i=["children",""+s]):Js.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":Cc(r),Tw(r,a,!0);break;case"textarea":Cc(r),Cw(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Xc)}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=Aw(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[Dr]=t,e[Su]=r,jx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Fh(n,r),n){case"dialog":nt("cancel",e),nt("close",e),i=r;break;case"iframe":case"object":case"embed":nt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Eu.length;i++)nt(Eu[i],e);i=r;break;case"source":nt("error",e),i=r;break;case"img":case"image":case"link":nt("error",e),nt("load",e),i=r;break;case"details":nt("toggle",e),i=r;break;case"input":xw(e,r),i=Ph(e,r),nt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ct({},r,{value:void 0}),nt("invalid",e);break;case"textarea":_w(e,r),i=Dh(e,r),nt("invalid",e);break;default:i=r}Mh(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="style"?Nw(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&kw(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ru(e,u):typeof u=="number"&&ru(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Js.hasOwnProperty(a)?u!=null&&a==="onScroll"&&nt("scroll",e):u!=null&&bh(e,a,u,o))}switch(n){case"input":Cc(e),Tw(e,r,!1);break;case"textarea":Cc(e),Cw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pi(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Ao(e,!!r.multiple,a,!1):r.defaultValue!=null&&Ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Xc)}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 Kt(t),null;case 6:if(e&&t.stateNode!=null)Hx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=Ha(Nu.current),Ha(Lr.current),rd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Dr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:Kc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Kc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Dr]=t,t.stateNode=r}return Kt(t),null;case 13:if(rt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Fn!==null&&t.mode&1&&!(t.flags&128))$b(),zo(),t.flags|=98560,a=!1;else if(a=rd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Q(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Q(317));a[Dr]=t}else zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kt(t),a=!1}else gr!==null&&(pg(gr),gr=null),a=!0;if(!a)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||dt.current&1?Pt===0&&(Pt=3):gg())),t.updateQueue!==null&&(t.flags|=4),Kt(t),null);case 4:return Yo(),ng(e,t),e===null&&Tu(t.stateNode.containerInfo),Kt(t),null;case 10:return Nm(t.type._context),Kt(t),null;case 17:return wn(t.type)&&Zc(),Kt(t),null;case 19:if(rt(dt),a=t.memoizedState,a===null)return Kt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Lu(a,!1);else{if(Pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ld(e),o!==null){for(t.flags|=128,Lu(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return et(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&xt()>Xo&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304)}else{if(!r)if(e=ld(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Lu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ot)return Kt(t),null}else 2*xt()-a.renderingStartTime>Xo&&n!==1073741824&&(t.flags|=128,r=!0,Lu(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=xt(),t.sibling=null,n=dt.current,et(dt,r?n&1|2:n&1),t):(Kt(t),null);case 22:case 23:return mg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bn&1073741824&&(Kt(t),t.subtreeFlags&6&&(t.flags|=8192)):Kt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function d6(e,t){switch(_m(t),t.tag){case 1:return wn(t.type)&&Zc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(),rt(vn),rt(qt),Fm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lm(t),null;case 13:if(rt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(dt),null;case 4:return Yo(),null;case 10:return Nm(t.type._context),null;case 22:case 23:return mg(),null;case 24:return null;default:return null}}var vd=!1,Xt=!1,f6=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Go(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function rg(e,t,n){try{n()}catch(r){yt(e,t,r)}}var zx=!1;function p6(e,t){if(mm=Bc,e=bb(),sm(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,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(u=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===i&&(s=o),f===a&&++c===r&&(u=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(gm={focusedElem:e,selectionRange:n},Bc=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;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 g=m.memoizedProps,x=m.memoizedState,y=t.stateNode,w=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:yr(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(T){yt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=zx,zx=!1,m}function Mu(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 a=i.destroy;i.destroy=void 0,a!==void 0&&rg(t,n,a)}i=i.next}while(i!==r)}}function wd(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 ig(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 Vx(e){var t=e.alternate;t!==null&&(e.alternate=null,Vx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dr],delete t[Su],delete t[bm],delete t[KD],delete t[XD])),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 $x(e){return e.tag===5||e.tag===3||e.tag===4}function Wx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$x(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 ag(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=Xc));else if(r!==4&&(e=e.child,e!==null))for(ag(e,t,n),e=e.sibling;e!==null;)ag(e,t,n),e=e.sibling}function og(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(og(e,t,n),e=e.sibling;e!==null;)og(e,t,n),e=e.sibling}var Ht=null,vr=!1;function $i(e,t,n){for(n=n.child;n!==null;)Yx(e,t,n),n=n.sibling}function Yx(e,t,n){if(Or&&typeof Or.onCommitFiberUnmount=="function")try{Or.onCommitFiberUnmount(Ic,n)}catch{}switch(n.tag){case 5:Xt||Go(n,t);case 6:var r=Ht,i=vr;Ht=null,$i(e,t,n),Ht=r,vr=i,Ht!==null&&(vr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(vr?(e=Ht,n=n.stateNode,e.nodeType===8?wm(e.parentNode,n):e.nodeType===1&&wm(e,n),hu(e)):wm(Ht,n.stateNode));break;case 4:r=Ht,i=vr,Ht=n.stateNode.containerInfo,vr=!0,$i(e,t,n),Ht=r,vr=i;break;case 0:case 11:case 14:case 15:if(!Xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&rg(n,t,o),i=i.next}while(i!==r)}$i(e,t,n);break;case 1:if(!Xt&&(Go(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){yt(n,t,s)}$i(e,t,n);break;case 21:$i(e,t,n);break;case 22:n.mode&1?(Xt=(r=Xt)||n.memoizedState!==null,$i(e,t,n),Xt=r):$i(e,t,n);break;default:$i(e,t,n)}}function qx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new f6),t.forEach(function(r){var i=E6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,vr=!1;break e;case 3:Ht=s.stateNode.containerInfo,vr=!0;break e;case 4:Ht=s.stateNode.containerInfo,vr=!0;break e}s=s.return}if(Ht===null)throw Error(Q(160));Yx(a,o,i),Ht=null,vr=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(l){yt(i,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gx(t,e),t=t.sibling}function Gx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wr(t,e),Fr(e),r&4){try{Mu(3,e,e.return),wd(3,e)}catch(g){yt(e,e.return,g)}try{Mu(5,e,e.return)}catch(g){yt(e,e.return,g)}}break;case 1:wr(t,e),Fr(e),r&512&&n!==null&&Go(n,n.return);break;case 5:if(wr(t,e),Fr(e),r&512&&n!==null&&Go(n,n.return),e.flags&32){var i=e.stateNode;try{ru(i,"")}catch(g){yt(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&Ew(i,a),Fh(s,o);var l=Fh(s,a);for(o=0;o<u.length;o+=2){var c=u[o],d=u[o+1];c==="style"?Nw(i,d):c==="dangerouslySetInnerHTML"?kw(i,d):c==="children"?ru(i,d):bh(i,c,d,l)}switch(s){case"input":Ih(i,a);break;case"textarea":Sw(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Ao(i,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Ao(i,!!a.multiple,a.defaultValue,!0):Ao(i,!!a.multiple,a.multiple?[]:"",!1))}i[Su]=a}catch(g){yt(e,e.return,g)}}break;case 6:if(wr(t,e),Fr(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){yt(e,e.return,g)}}break;case 3:if(wr(t,e),Fr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hu(t.containerInfo)}catch(g){yt(e,e.return,g)}break;case 4:wr(t,e),Fr(e);break;case 13:wr(t,e),Fr(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(lg=xt())),r&4&&qx(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Xt=(l=Xt)||c,wr(t,e),Xt=l):wr(t,e),Fr(e),r&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!c&&e.mode&1)for(ue=e,c=e.child;c!==null;){for(d=ue=c;ue!==null;){switch(f=ue,p=f.child,f.tag){case 0:case 11:case 14:case 15:Mu(4,f,f.return);break;case 1:Go(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){yt(r,n,g)}}break;case 5:Go(f,f.return);break;case 22:if(f.memoizedState!==null){Qx(d);continue}}p!==null?(p.return=f,ue=p):Qx(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,l?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,u=d.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Rw("display",o))}catch(g){yt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(g){yt(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wr(t,e),Fr(e),r&4&&qx(e);break;case 21:break;default:wr(t,e),Fr(e)}}function Fr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($x(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ru(i,""),r.flags&=-33);var a=Wx(e);og(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=Wx(e);ag(e,s,o);break;default:throw Error(Q(161))}}catch(u){yt(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function h6(e,t,n){ue=e,Kx(e)}function Kx(e,t,n){for(var r=(e.mode&1)!==0;ue!==null;){var i=ue,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||vd;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Xt;s=vd;var l=Xt;if(vd=o,(Xt=u)&&!l)for(ue=i;ue!==null;)o=ue,u=o.child,o.tag===22&&o.memoizedState!==null?Zx(i):u!==null?(u.return=o,ue=u):Zx(i);for(;a!==null;)ue=a,Kx(a),a=a.sibling;ue=i,vd=s,Xt=l}Xx(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ue=a):Xx(e)}}function Xx(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xt||wd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:yr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Qb(t,a,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}Qb(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var c=l.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&hu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Xt||t.flags&512&&ig(t)}catch(f){yt(t,t.return,f)}}if(t===e){ue=null;break}if(n=t.sibling,n!==null){n.return=t.return,ue=n;break}ue=t.return}}function Qx(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ue=n;break}ue=t.return}}function Zx(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wd(4,t)}catch(u){yt(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){yt(t,i,u)}}var a=t.return;try{ig(t)}catch(u){yt(t,a,u)}break;case 5:var o=t.return;try{ig(t)}catch(u){yt(t,o,u)}}}catch(u){yt(t,t.return,u)}if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}var m6=Math.ceil,bd=ti.ReactCurrentDispatcher,sg=ti.ReactCurrentOwner,tr=ti.ReactCurrentBatchConfig,Ue=0,Dt=null,Ct=null,zt=0,Bn=0,Ko=ji(0),Pt=0,Fu=null,Va=0,xd=0,ug=0,Bu=null,xn=null,lg=0,Xo=1/0,li=null,Ed=!1,cg=null,Wi=null,Td=!1,Yi=null,_d=0,ju=0,dg=null,Sd=-1,Cd=0;function dn(){return Ue&6?xt():Sd!==-1?Sd:Sd=xt()}function qi(e){return e.mode&1?Ue&2&&zt!==0?zt&-zt:ZD.transition!==null?(Cd===0&&(Cd=Ww()),Cd):(e=qe,e!==0||(e=window.event,e=e===void 0?16:eb(e.type)),e):1}function br(e,t,n,r){if(50<ju)throw ju=0,dg=null,Error(Q(185));lu(e,n,r),(!(Ue&2)||e!==Dt)&&(e===Dt&&(!(Ue&2)&&(xd|=n),Pt===4&&Gi(e,zt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Xo=xt()+500,ed&&Hi()))}function En(e,t){var n=e.callbackNode;ZO(e,t);var r=Lc(e,e===Dt?zt:0);if(r===0)n!==null&&zw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zw(n),t===1)e.tag===0?QD(eE.bind(null,e)):jb(eE.bind(null,e)),qD(function(){!(Ue&6)&&Hi()}),n=null;else{switch(Yw(r)){case 1:n=$h;break;case 4:n=Vw;break;case 16:n=Pc;break;case 536870912:n=$w;break;default:n=Pc}n=uE(n,Jx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jx(e,t){if(Sd=-1,Cd=0,Ue&6)throw Error(Q(327));var n=e.callbackNode;if(Qo()&&e.callbackNode!==n)return null;var r=Lc(e,e===Dt?zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ad(e,r);else{t=r;var i=Ue;Ue|=2;var a=nE();(Dt!==e||zt!==t)&&(li=null,Xo=xt()+500,Wa(e,t));do try{v6();break}catch(s){tE(e,s)}while(!0);Rm(),bd.current=a,Ue=i,Ct!==null?t=0:(Dt=null,zt=0,t=Pt)}if(t!==0){if(t===2&&(i=Wh(e),i!==0&&(r=i,t=fg(e,i))),t===1)throw n=Fu,Wa(e,0),Gi(e,r),En(e,xt()),n;if(t===6)Gi(e,r);else{if(i=e.current.alternate,!(r&30)&&!g6(i)&&(t=Ad(e,r),t===2&&(a=Wh(e),a!==0&&(r=a,t=fg(e,a))),t===1))throw n=Fu,Wa(e,0),Gi(e,r),En(e,xt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:Ya(e,xn,li);break;case 3:if(Gi(e,r),(r&130023424)===r&&(t=lg+500-xt(),10<t)){if(Lc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){dn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vm(Ya.bind(null,e,xn,li),t);break}Ya(e,xn,li);break;case 4:if(Gi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-hr(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=xt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m6(r/1960))-r,10<r){e.timeoutHandle=vm(Ya.bind(null,e,xn,li),r);break}Ya(e,xn,li);break;case 5:Ya(e,xn,li);break;default:throw Error(Q(329))}}}return En(e,xt()),e.callbackNode===n?Jx.bind(null,e):null}function fg(e,t){var n=Bu;return e.current.memoizedState.isDehydrated&&(Wa(e,t).flags|=256),e=Ad(e,t),e!==2&&(t=xn,xn=n,t!==null&&pg(t)),e}function pg(e){xn===null?xn=e:xn.push.apply(xn,e)}function g6(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],a=i.getSnapshot;i=i.value;try{if(!mr(a(),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 Gi(e,t){for(t&=~ug,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-hr(t),r=1<<n;e[n]=-1,t&=~r}}function eE(e){if(Ue&6)throw Error(Q(327));Qo();var t=Lc(e,0);if(!(t&1))return En(e,xt()),null;var n=Ad(e,t);if(e.tag!==0&&n===2){var r=Wh(e);r!==0&&(t=r,n=fg(e,r))}if(n===1)throw n=Fu,Wa(e,0),Gi(e,t),En(e,xt()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ya(e,xn,li),En(e,xt()),null}function hg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Xo=xt()+500,ed&&Hi())}}function $a(e){Yi!==null&&Yi.tag===0&&!(Ue&6)&&Qo();var t=Ue;Ue|=1;var n=tr.transition,r=qe;try{if(tr.transition=null,qe=1,e)return e()}finally{qe=r,tr.transition=n,Ue=t,!(Ue&6)&&Hi()}}function mg(){Bn=Ko.current,rt(Ko)}function Wa(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,YD(n)),Ct!==null)for(n=Ct.return;n!==null;){var r=n;switch(_m(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zc();break;case 3:Yo(),rt(vn),rt(qt),Fm();break;case 5:Lm(r);break;case 4:Yo();break;case 13:rt(dt);break;case 19:rt(dt);break;case 10:Nm(r.type._context);break;case 22:case 23:mg()}n=n.return}if(Dt=e,Ct=e=Ki(e.current,null),zt=Bn=t,Pt=0,Fu=null,ug=xd=Va=0,xn=Bu=null,Ua!==null){for(t=0;t<Ua.length;t++)if(n=Ua[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Ua=null}return e}function tE(e,t){do{var n=Ct;try{if(Rm(),cd.current=hd,dd){for(var r=ft.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}dd=!1}if(za=0,Ot=Nt=ft=null,Pu=!1,Iu=0,sg.current=null,n===null||n.return===null){Pt=1,Fu=t,Ct=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=zt,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var l=u,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Cx(o);if(p!==null){p.flags&=-257,Ax(p,o,s,a,t),p.mode&1&&Sx(a,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}else{if(!(t&1)){Sx(a,l,t),gg();break e}u=Error(Q(426))}}else if(ot&&s.mode&1){var x=Cx(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Ax(x,o,s,a,t),Am(qo(u,s));break e}}a=u=qo(u,s),Pt!==4&&(Pt=2),Bu===null?Bu=[a]:Bu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=Tx(a,u,t);Xb(a,y);break e;case 1:s=u;var w=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Wi===null||!Wi.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var T=_x(a,s,t);Xb(a,T);break e}}a=a.return}while(a!==null)}iE(n)}catch(S){t=S,Ct===n&&n!==null&&(Ct=n=n.return);continue}break}while(!0)}function nE(){var e=bd.current;return bd.current=hd,e===null?hd:e}function gg(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Dt===null||!(Va&268435455)&&!(xd&268435455)||Gi(Dt,zt)}function Ad(e,t){var n=Ue;Ue|=2;var r=nE();(Dt!==e||zt!==t)&&(li=null,Wa(e,t));do try{y6();break}catch(i){tE(e,i)}while(!0);if(Rm(),Ue=n,bd.current=r,Ct!==null)throw Error(Q(261));return Dt=null,zt=0,Pt}function y6(){for(;Ct!==null;)rE(Ct)}function v6(){for(;Ct!==null&&!VO();)rE(Ct)}function rE(e){var t=sE(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?iE(e):Ct=t,sg.current=null}function iE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=d6(n,t),n!==null){n.flags&=32767,Ct=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pt=6,Ct=null;return}}else if(n=c6(n,t,Bn),n!==null){Ct=n;return}if(t=t.sibling,t!==null){Ct=t;return}Ct=t=e}while(t!==null);Pt===0&&(Pt=5)}function Ya(e,t,n){var r=qe,i=tr.transition;try{tr.transition=null,qe=1,w6(e,t,n,r)}finally{tr.transition=i,qe=r}return null}function w6(e,t,n,r){do Qo();while(Yi!==null);if(Ue&6)throw Error(Q(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(Q(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(JO(e,a),e===Dt&&(Ct=Dt=null,zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Td||(Td=!0,uE(Pc,function(){return Qo(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=tr.transition,tr.transition=null;var o=qe;qe=1;var s=Ue;Ue|=4,sg.current=null,p6(e,n),Gx(n,e),jD(gm),Bc=!!mm,gm=mm=null,e.current=n,h6(n),$O(),Ue=s,qe=o,tr.transition=a}else e.current=n;if(Td&&(Td=!1,Yi=e,_d=i),a=e.pendingLanes,a===0&&(Wi=null),qO(n.stateNode),En(e,xt()),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(Ed)throw Ed=!1,e=cg,cg=null,e;return _d&1&&e.tag!==0&&Qo(),a=e.pendingLanes,a&1?e===dg?ju++:(ju=0,dg=e):ju=0,Hi(),null}function Qo(){if(Yi!==null){var e=Yw(_d),t=tr.transition,n=qe;try{if(tr.transition=null,qe=16>e?16:e,Yi===null)var r=!1;else{if(e=Yi,Yi=null,_d=0,Ue&6)throw Error(Q(331));var i=Ue;for(Ue|=4,ue=e.current;ue!==null;){var a=ue,o=a.child;if(ue.flags&16){var s=a.deletions;if(s!==null){for(var u=0;u<s.length;u++){var l=s[u];for(ue=l;ue!==null;){var c=ue;switch(c.tag){case 0:case 11:case 15:Mu(8,c,a)}var d=c.child;if(d!==null)d.return=c,ue=d;else for(;ue!==null;){c=ue;var f=c.sibling,p=c.return;if(Vx(c),c===l){ue=null;break}if(f!==null){f.return=p,ue=f;break}ue=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}ue=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ue=o;else e:for(;ue!==null;){if(a=ue,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Mu(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,ue=y;break e}ue=a.return}}var w=e.current;for(ue=w;ue!==null;){o=ue;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ue=b;else e:for(o=w;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:wd(9,s)}}catch(S){yt(s,s.return,S)}if(s===o){ue=null;break e}var T=s.sibling;if(T!==null){T.return=s.return,ue=T;break e}ue=s.return}}if(Ue=i,Hi(),Or&&typeof Or.onPostCommitFiberRoot=="function")try{Or.onPostCommitFiberRoot(Ic,e)}catch{}r=!0}return r}finally{qe=n,tr.transition=t}}return!1}function aE(e,t,n){t=qo(n,t),t=Tx(e,t,1),e=Vi(e,t,1),t=dn(),e!==null&&(lu(e,1,t),En(e,t))}function yt(e,t,n){if(e.tag===3)aE(e,e,n);else for(;t!==null;){if(t.tag===3){aE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wi===null||!Wi.has(r))){e=qo(n,e),e=_x(t,e,1),t=Vi(t,e,1),e=dn(),t!==null&&(lu(t,1,e),En(t,e));break}}t=t.return}}function b6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=dn(),e.pingedLanes|=e.suspendedLanes&n,Dt===e&&(zt&n)===n&&(Pt===4||Pt===3&&(zt&130023424)===zt&&500>xt()-lg?Wa(e,0):ug|=n),En(e,t)}function oE(e,t){t===0&&(e.mode&1?(t=Dc,Dc<<=1,!(Dc&130023424)&&(Dc=4194304)):t=1);var n=dn();e=oi(e,t),e!==null&&(lu(e,t,n),En(e,n))}function x6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),oE(e,n)}function E6(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(Q(314))}r!==null&&r.delete(t),oE(e,n)}var sE;sE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||vn.current)bn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return bn=!1,l6(e,t,n);bn=!!(e.flags&131072)}else bn=!1,ot&&t.flags&1048576&&Ub(t,nd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yd(e,t),e=t.pendingProps;var i=jo(t,qt.current);Wo(t,n),i=Um(null,t,r,e,i,n);var a=Hm();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,wn(r)?(a=!0,Jc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Om(t),i.updater=md,t.stateNode=i,i._reactInternals=t,qm(t,r,e,n),t=Qm(null,t,r,!0,a,n)):(t.tag=0,ot&&a&&Tm(t),cn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=_6(r),e=yr(r,e),i){case 0:t=Xm(null,t,r,e,n);break e;case 1:t=Ox(null,t,r,e,n);break e;case 11:t=kx(null,t,r,e,n);break e;case 14:t=Rx(null,t,r,yr(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),Xm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),Ox(e,t,r,i,n);case 3:e:{if(Dx(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Kb(e,t),ud(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=qo(Error(Q(423)),t),t=Lx(e,t,r,n,i);break e}else if(r!==i){i=qo(Error(Q(424)),t),t=Lx(e,t,r,n,i);break e}else for(Fn=Bi(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,gr=null,n=qb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zo(),r===i){t=ui(e,t,n);break e}cn(e,t,r,n)}t=t.child}return t;case 5:return Zb(t),e===null&&Cm(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,ym(r,i)?o=null:a!==null&&ym(r,a)&&(t.flags|=32),Ix(e,t),cn(e,t,o,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return Mx(e,t,n);case 4:return Dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vo(t,null,r,n):cn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),kx(e,t,r,i,n);case 7:return cn(e,t,t.pendingProps,n),t.child;case 8:return cn(e,t,t.pendingProps.children,n),t.child;case 12:return cn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,et(ad,r._currentValue),r._currentValue=o,a!==null)if(mr(a.value,o)){if(a.children===i.children&&!vn.current){t=ui(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=si(-1,n&-n),u.tag=2;var l=a.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Pm(a.return,n,t),s.lanes|=n;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Q(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Pm(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}cn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wo(t,n),i=Jn(i),r=r(i),t.flags|=1,cn(e,t,r,n),t.child;case 14:return r=t.type,i=yr(r,t.pendingProps),i=yr(r.type,i),Rx(e,t,r,i,n);case 15:return Nx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:yr(r,i),yd(e,t),t.tag=1,wn(r)?(e=!0,Jc(t)):e=!1,Wo(t,n),xx(t,r,i),qm(t,r,i,n),Qm(null,t,r,!0,e,n);case 19:return Bx(e,t,n);case 22:return Px(e,t,n)}throw Error(Q(156,t.tag))};function uE(e,t){return Hw(e,t)}function T6(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 nr(e,t,n,r){return new T6(e,t,n,r)}function yg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _6(e){if(typeof e=="function")return yg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Th)return 11;if(e===Ch)return 14}return 2}function Ki(e,t){var n=e.alternate;return n===null?(n=nr(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 kd(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")yg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Co:return qa(n.children,i,a,t);case xh:o=8,i|=8;break;case Eh:return e=nr(12,n,t,i|2),e.elementType=Eh,e.lanes=a,e;case _h:return e=nr(13,n,t,i),e.elementType=_h,e.lanes=a,e;case Sh:return e=nr(19,n,t,i),e.elementType=Sh,e.lanes=a,e;case yw:return Rd(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mw:o=10;break e;case gw:o=9;break e;case Th:o=11;break e;case Ch:o=14;break e;case Ni:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=nr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function qa(e,t,n,r){return e=nr(7,e,r,t),e.lanes=n,e}function Rd(e,t,n,r){return e=nr(22,e,r,t),e.elementType=yw,e.lanes=n,e.stateNode={isHidden:!1},e}function vg(e,t,n){return e=nr(6,e,null,t),e.lanes=n,e}function wg(e,t,n){return t=nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S6(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=Yh(0),this.expirationTimes=Yh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function bg(e,t,n,r,i,a,o,s,u){return e=new S6(e,t,n,s,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=nr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Om(a),e}function C6(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:So,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function lE(e){if(!e)return Ui;e=e._reactInternals;e:{if(La(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(wn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(wn(n))return Fb(e,n,t)}return t}function cE(e,t,n,r,i,a,o,s,u){return e=bg(n,r,!0,e,i,a,o,s,u),e.context=lE(null),n=e.current,r=dn(),i=qi(n),a=si(r,i),a.callback=t??null,Vi(n,a,i),e.current.lanes=i,lu(e,i,r),En(e,r),e}function Nd(e,t,n,r){var i=t.current,a=dn(),o=qi(i);return n=lE(n),t.context===null?t.context=n:t.pendingContext=n,t=si(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Vi(i,t,o),e!==null&&(br(e,i,o,a),sd(e,i,o)),o}function Pd(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 dE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xg(e,t){dE(e,t),(e=e.alternate)&&dE(e,t)}function A6(){return null}var fE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Eg(e){this._internalRoot=e}Id.prototype.render=Eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Nd(e,t,null,null)},Id.prototype.unmount=Eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$a(function(){Nd(null,e,null,null)}),t[ni]=null}};function Id(e){this._internalRoot=e}Id.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Li.length&&t!==0&&t<Li[n].priority;n++);Li.splice(n,0,e),n===0&&Zw(e)}};function Tg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Od(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pE(){}function k6(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=Pd(o);a.call(l)}}var o=cE(t,r,e,0,null,!1,!1,"",pE);return e._reactRootContainer=o,e[ni]=o.current,Tu(e.nodeType===8?e.parentNode:e),$a(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Pd(u);s.call(l)}}var u=bg(e,0,!1,null,null,!1,!1,"",pE);return e._reactRootContainer=u,e[ni]=u.current,Tu(e.nodeType===8?e.parentNode:e),$a(function(){Nd(t,u,n,r)}),u}function Dd(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var u=Pd(o);s.call(u)}}Nd(t,o,e,i)}else o=k6(n,t,e,i,r);return Pd(o)}qw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=uu(t.pendingLanes);n!==0&&(qh(t,n|1),En(t,xt()),!(Ue&6)&&(Xo=xt()+500,Hi()))}break;case 13:$a(function(){var r=oi(e,1);if(r!==null){var i=dn();br(r,e,1,i)}}),xg(e,1)}},Gh=function(e){if(e.tag===13){var t=oi(e,134217728);if(t!==null){var n=dn();br(t,e,134217728,n)}xg(e,134217728)}},Gw=function(e){if(e.tag===13){var t=qi(e),n=oi(e,t);if(n!==null){var r=dn();br(n,e,t,r)}xg(e,t)}},Kw=function(){return qe},Xw=function(e,t){var n=qe;try{return qe=e,t()}finally{qe=n}},Uh=function(e,t,n){switch(t){case"input":if(Ih(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=Qc(r);if(!i)throw Error(Q(90));bw(r),Ih(r,i)}}}break;case"textarea":Sw(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}},Dw=hg,Lw=$a;var R6={usingClientEntryPoint:!1,Events:[Cu,Fo,Qc,Iw,Ow,hg]},Uu={findFiberByHostInstance:Ma,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},N6={bundleType:Uu.bundleType,version:Uu.version,rendererPackageName:Uu.rendererPackageName,rendererConfig:Uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ti.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jw(e),e===null?null:e.stateNode},findFiberByHostInstance:Uu.findFiberByHostInstance||A6,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 Ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ld.isDisabled&&Ld.supportsFiber)try{Ic=Ld.inject(N6),Or=Ld}catch{}}On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R6,On.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tg(t))throw Error(Q(200));return C6(e,t,null,n)},On.createRoot=function(e,t){if(!Tg(e))throw Error(Q(299));var n=!1,r="",i=fE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=bg(e,1,!1,null,null,n,!1,r,i),e[ni]=t.current,Tu(e.nodeType===8?e.parentNode:e),new Eg(t)},On.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(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=jw(t),e=e===null?null:e.stateNode,e},On.flushSync=function(e){return $a(e)},On.hydrate=function(e,t,n){if(!Od(t))throw Error(Q(200));return Dd(null,e,t,!0,n)},On.hydrateRoot=function(e,t,n){if(!Tg(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=fE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=cE(t,null,e,1,n??null,i,!1,a,o),e[ni]=t.current,Tu(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 Id(t)},On.render=function(e,t,n){if(!Od(t))throw Error(Q(200));return Dd(null,e,t,!1,n)},On.unmountComponentAtNode=function(e){if(!Od(e))throw Error(Q(40));return e._reactRootContainer?($a(function(){Dd(null,null,e,!1,function(){e._reactRootContainer=null,e[ni]=null})}),!0):!1},On.unstable_batchedUpdates=hg,On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Od(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Dd(e,t,n,!1,r)},On.version="18.3.1-next-f1338f8080-20240426";function hE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hE)}catch(e){console.error(e)}}hE(),lw.exports=On;var Zo=lw.exports,mE,gE=Zo;mE=gE.createRoot,gE.hydrateRoot;const yE="3.0.16";function Md(e){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(e)}var P6=/^\s+/,I6=/\s+$/;function fe(e,t){if(e=e||"",t=t||{},e instanceof fe)return e;if(!(this instanceof fe))return new fe(e,t);var n=O6(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}fe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(t){return this._a=TE(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=wE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=wE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=vE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=vE(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return bE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return F6(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(st(this._r,255)*100)+"%",g:Math.round(st(this._g,255)*100)+"%",b:Math.round(st(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%)":"rgba("+Math.round(st(this._r,255)*100)+"%, "+Math.round(st(this._g,255)*100)+"%, "+Math.round(st(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K6[bE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+xE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+xE(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,a=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return fe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(H6,arguments)},brighten:function(){return this._applyModification(z6,arguments)},darken:function(){return this._applyModification(V6,arguments)},desaturate:function(){return this._applyModification(B6,arguments)},saturate:function(){return this._applyModification(j6,arguments)},greyscale:function(){return this._applyModification(U6,arguments)},spin:function(){return this._applyModification($6,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(q6,arguments)},complement:function(){return this._applyCombination(W6,arguments)},monochromatic:function(){return this._applyCombination(G6,arguments)},splitcomplement:function(){return this._applyCombination(Y6,arguments)},triad:function(){return this._applyCombination(EE,[3])},tetrad:function(){return this._applyCombination(EE,[4])}},fe.fromRatio=function(e,t){if(Md(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Hu(e[r]));e=n}return fe(e,t)};function O6(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=J6(e)),Md(e)=="object"&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=D6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(r=Hu(e.s),i=Hu(e.v),t=M6(e.h,r,i),o=!0,s="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(r=Hu(e.s),a=Hu(e.l),t=L6(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=TE(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function D6(e,t,n){return{r:st(e,255)*255,g:st(t,255)*255,b:st(n,255)*255}}function vE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var u=r-i;switch(o=s>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,l:s}}function L6(e,t,n){var r,i,a;e=st(e,360),t=st(t,100),n=st(n,100);function o(l,c,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?l+(c-l)*6*d:d<1/2?c:d<2/3?l+(c-l)*(2/3-d)*6:l}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=o(u,s,e+1/3),i=o(u,s,e),a=o(u,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function wE(e,t,n){e=st(e,255),t=st(t,255),n=st(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=r,u=r-i;if(o=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:o,v:s}}function M6(e,t,n){e=st(e,360)*6,t=st(t,100),n=st(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6,l=[n,o,a,a,s,n][u],c=[s,n,n,o,a,a][u],d=[a,a,s,n,n,o][u];return{r:l*255,g:c*255,b:d*255}}function bE(e,t,n,r){var i=[xr(Math.round(e).toString(16)),xr(Math.round(t).toString(16)),xr(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function F6(e,t,n,r,i){var a=[xr(Math.round(e).toString(16)),xr(Math.round(t).toString(16)),xr(Math.round(n).toString(16)),xr(_E(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function xE(e,t,n,r){var i=[xr(_E(r)),xr(Math.round(e).toString(16)),xr(Math.round(t).toString(16)),xr(Math.round(n).toString(16))];return i.join("")}fe.equals=function(e,t){return!e||!t?!1:fe(e).toRgbString()==fe(t).toRgbString()},fe.random=function(){return fe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function B6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Fd(n.s),fe(n)}function j6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Fd(n.s),fe(n)}function U6(e){return fe(e).desaturate(100)}function H6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Fd(n.l),fe(n)}function z6(e,t){t=t===0?0:t||10;var n=fe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),fe(n)}function V6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Fd(n.l),fe(n)}function $6(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function W6(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function EE(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=fe(e).toHsl(),r=[fe(e)],i=360/t,a=1;a<t;a++)r.push(fe({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function Y6(e){var t=fe(e).toHsl(),n=t.h;return[fe(e),fe({h:(n+72)%360,s:t.s,l:t.l}),fe({h:(n+216)%360,s:t.s,l:t.l})]}function q6(e,t,n){t=t||6,n=n||30;var r=fe(e).toHsl(),i=360/n,a=[fe(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(fe(r));return a}function G6(e,t){t=t||6;for(var n=fe(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(fe({h:r,s:i,v:a})),a=(a+s)%1;return o}fe.mix=function(e,t,n){n=n===0?0:n||50;var r=fe(e).toRgb(),i=fe(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return fe(o)},fe.readability=function(e,t){var n=fe(e),r=fe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},fe.isReadable=function(e,t,n){var r=fe.readability(e,t),i,a;switch(a=!1,i=eL(n),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a},fe.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,u;n=n||{},o=n.includeFallbackColors,s=n.level,u=n.size;for(var l=0;l<t.length;l++)a=fe.readability(e,t[l]),a>i&&(i=a,r=fe(t[l]));return fe.isReadable(e,r,{level:s,size:u})||!o?r:(n.includeFallbackColors=!1,fe.mostReadable(e,["#fff","#000"],n))};var _g=fe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K6=fe.hexNames=X6(_g);function X6(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function TE(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function st(e,t){Q6(e)&&(e="100%");var n=Z6(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Fd(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function Q6(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Z6(e){return typeof e=="string"&&e.indexOf("%")!=-1}function xr(e){return e.length==1?"0"+e:""+e}function Hu(e){return e<=1&&(e=e*100+"%"),e}function _E(e){return Math.round(parseFloat(e)*255).toString(16)}function SE(e){return jn(e)/255}var Er=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ci(e){return!!Er.CSS_UNIT.exec(e)}function J6(e){e=e.replace(P6,"").replace(I6,"").toLowerCase();var t=!1;if(_g[e])e=_g[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Er.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Er.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Er.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Er.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Er.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Er.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Er.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:SE(n[4]),format:t?"name":"hex8"}:(n=Er.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Er.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:SE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Er.hex3.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function eL(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const tL=400,CE=600,Bd={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},AE=({primary:e="hsl(0, 0%, 0%)"})=>{const t=fe(e).toHsl(),n=fe(e).isLight()?"240 10% 3.9%":"0 0% 100%";return{"--opencx-primary":`${t.h} ${t.s*100}% ${t.l*100}%`,"--opencx-primary-foreground":n,"--opencx-background":"0 0% 100%","--opencx-foreground":"240 10% 3.9%","--opencx-accent":"240 4.8% 95.9%","--opencx-accent-foreground":"240 5.9% 10%","--opencx-destructive":"0 84.2% 60.2%","--opencx-destructive-foreground":"0 0% 98%","--opencx-secondary":"240 4.8% 95.9%","--opencx-secondary-foreground":"240 5.9% 10%","--opencx-muted":"240 4.8% 95.9%","--opencx-muted-foreground":"240 3.8% 46.1%","--opencx-input":"240 5.9% 90%","--opencx-border":"240 5.9% 90%","--opencx-ring":"240 5.9% 10%"}};function nL(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))})}function zu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Sg=e=>Array.isArray(e);function kE(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}function Vu(e){return typeof e=="string"||Array.isArray(e)}function RE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cg(e,t,n,r){if(typeof t=="function"){const[i,a]=RE(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=RE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function jd(e,t,n){const r=e.getProps();return Cg(r,t,n!==void 0?n:r.custom,e)}const Ag=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kg=["initial",...Ag],$u=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xi=new Set($u),di=e=>e*1e3,fi=e=>e/1e3,rL={type:"spring",stiffness:500,damping:25,restSpeed:10},iL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),aL={type:"keyframes",duration:.8},oL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sL=(e,{keyframes:t})=>t.length>2?aL:Xi.has(e)?e.startsWith("scale")?iL(t[1]):rL:oL;function Rg(e,t){return e?e[t]||e.default||e:void 0}const uL={skipAnimations:!1,useManualTiming:!1},lL=e=>e!==null;function Ud(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(lL),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Qt=e=>e;function cL(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(l){a.has(l)&&(u.schedule(l),e()),l(o)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&a.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),a.delete(l)},process:l=>{if(o=l,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,u.process(l))}};return u}const Hd=["read","resolveKeyframes","update","preRender","render","postRender"],dL=40;function NE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Hd.reduce((y,w)=>(y[w]=cL(a),y),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=o,p=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,dL),1),i.timestamp=y,i.isProcessing=!0,s.process(i),u.process(i),l.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Hd.reduce((y,w)=>{const b=o[w];return y[w]=(T,S=!1,_=!1)=>(n||m(),b.schedule(T,S,_)),y},{}),cancel:y=>{for(let w=0;w<Hd.length;w++)o[Hd[w]].cancel(y)},state:i,steps:o}}const{schedule:Xe,cancel:Qi,state:Vt,steps:Ng}=NE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qt,!0),PE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fL=1e-7,pL=12;function hL(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=PE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>fL&&++s<pL);return o}function Wu(e,t,n,r){if(e===t&&n===r)return Qt;const i=a=>hL(a,0,1,e,n);return a=>a===0||a===1?a:PE(i(a),t,r)}const IE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,OE=e=>t=>1-e(1-t),DE=Wu(.33,1.53,.69,.99),Pg=OE(DE),LE=IE(Pg),ME=e=>(e*=2)<1?.5*Pg(e):.5*(2-Math.pow(2,-10*(e-1))),Ig=e=>1-Math.sin(Math.acos(e)),FE=OE(Ig),BE=IE(Ig),jE=e=>/^0[^.\s]+$/u.test(e);function mL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jE(e):!0}let Og=Qt;const UE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),HE=e=>t=>typeof t=="string"&&t.startsWith(e),zE=HE("--"),gL=HE("var(--"),Dg=e=>gL(e)?yL.test(e.split("/*")[0].trim()):!1,yL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wL(e){const t=vL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function VE(e,t,n=1){const[r,i]=wL(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return UE(o)?parseFloat(o):o}return Dg(i)?VE(i,t,n+1):i}const Zi=(e,t,n)=>n>t?t:n<e?e:n,Jo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yu={...Jo,transform:e=>Zi(0,1,e)},zd={...Jo,default:1},qu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ji=qu("deg"),Br=qu("%"),ye=qu("px"),bL=qu("vh"),xL=qu("vw"),$E={...Br,parse:e=>Br.parse(e)/100,transform:e=>Br.transform(e*100)},EL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),WE=e=>e===Jo||e===ye,YE=(e,t)=>parseFloat(e.split(", ")[t]),qE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return YE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?YE(a[1],e):0}},TL=new Set(["x","y","z"]),_L=$u.filter(e=>!TL.has(e));function SL(e){const t=[];return _L.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const es={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:qE(4,13),y:qE(5,14)};es.translateX=es.x,es.translateY=es.y;const GE=e=>t=>t.test(e),KE=[Jo,ye,Br,Ji,xL,bL,{test:e=>e==="auto",parse:e=>e}],XE=e=>KE.find(GE(e)),Ga=new Set;let Lg=!1,Mg=!1;function QE(){if(Mg){const e=Array.from(Ga).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=SL(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(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Mg=!1,Lg=!1,Ga.forEach(e=>e.complete()),Ga.clear()}function ZE(){Ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mg=!0)})}function CL(){ZE(),QE()}class Fg{constructor(t,n,r,i,a,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=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ga.add(this),Lg||(Lg=!0,Xe.read(ZE),Xe.resolveKeyframes(QE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,s);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ga.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ga.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Gu=e=>Math.round(e*1e5)/1e5,Bg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AL(e){return e==null}const kL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jg=(e,t)=>n=>!!(typeof n=="string"&&kL.test(n)&&n.startsWith(e)||t&&!AL(n)&&Object.prototype.hasOwnProperty.call(n,t)),JE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Bg);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},RL=e=>Zi(0,255,e),Ug={...Jo,transform:e=>Math.round(RL(e))},Ka={test:jg("rgb","red"),parse:JE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ug.transform(e)+", "+Ug.transform(t)+", "+Ug.transform(n)+", "+Gu(Yu.transform(r))+")"};function NL(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 Hg={test:jg("#"),parse:NL,transform:Ka.transform},ts={test:jg("hsl","hue"),parse:JE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Br.transform(Gu(t))+", "+Br.transform(Gu(n))+", "+Gu(Yu.transform(r))+")"},Zt={test:e=>Ka.test(e)||Hg.test(e)||ts.test(e),parse:e=>Ka.test(e)?Ka.parse(e):ts.test(e)?ts.parse(e):Hg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ka.transform(e):ts.transform(e)},PL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IL(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Bg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(PL))===null||n===void 0?void 0:n.length)||0)>0}const eT="number",tT="color",OL="var",DL="var(",nT="${}",LL=/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 Ku(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(LL,u=>(Zt.test(u)?(r.color.push(a),i.push(tT),n.push(Zt.parse(u))):u.startsWith(DL)?(r.var.push(a),i.push(OL),n.push(u)):(r.number.push(a),i.push(eT),n.push(parseFloat(u))),++a,nT)).split(nT);return{values:n,split:s,indexes:r,types:i}}function rT(e){return Ku(e).values}function iT(e){const{split:t,types:n}=Ku(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===eT?a+=Gu(i[o]):s===tT?a+=Zt.transform(i[o]):a+=i[o]}return a}}const ML=e=>typeof e=="number"?0:e;function FL(e){const t=rT(e);return iT(e)(t.map(ML))}const ea={test:IL,parse:rT,createTransformer:iT,getAnimatableNone:FL},BL=new Set(["brightness","contrast","saturate","opacity"]);function jL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bg)||[];if(!r)return e;const i=n.replace(r,"");let a=BL.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const UL=/\b([a-z-]*)\(.*?\)/gu,zg={...ea,getAnimatableNone:e=>{const t=e.match(UL);return t?t.map(jL).join(" "):e}},HL={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},zL={rotate:Ji,rotateX:Ji,rotateY:Ji,rotateZ:Ji,scale:zd,scaleX:zd,scaleY:zd,scaleZ:zd,skew:Ji,skewX:Ji,skewY:Ji,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Yu,originX:$E,originY:$E,originZ:ye},aT={...Jo,transform:Math.round},Vg={...HL,...zL,zIndex:aT,size:ye,fillOpacity:Yu,strokeOpacity:Yu,numOctaves:aT},VL={...Vg,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:zg,WebkitFilter:zg},$g=e=>VL[e];function oT(e,t){let n=$g(e);return n!==zg&&(n=ea),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $L=new Set(["auto","none","0"]);function WL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!$L.has(a)&&Ku(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=oT(n,i)}class sT extends Fg{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let l=t[u];if(typeof l=="string"&&(l=l.trim(),Dg(l))){const c=VE(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!EL.has(r)||t.length!==2)return;const[i,a]=t,o=XE(i),s=XE(a);if(o!==s)if(WE(o)&&WE(s))for(let u=0;u<t.length;u++){const l=t[u];typeof l=="string"&&(t[u]=parseFloat(l))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)mL(t[i])&&r.push(i);r.length&&WL(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=es[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 t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=es[r](n.measureViewportBox(),window.getComputedStyle(n.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function Wg(e){return typeof e=="function"}let Vd;function YL(){Vd=void 0}const jr={now:()=>(Vd===void 0&&jr.set(Vt.isProcessing||uL.useManualTiming?Vt.timestamp:performance.now()),Vd),set:e=>{Vd=e,queueMicrotask(YL)}},uT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ea.test(e)||e==="0")&&!e.startsWith("url("));function qL(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 GL(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=uT(i,t),s=uT(a,t);return!o||!s?!1:qL(e)||(n==="spring"||Wg(n))&&r}const KL=40;class lT{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=jr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>KL?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&CL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=jr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!GL(t,r,i,a))if(o)this.options.duration=0;else{u==null||u(Ud(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function cT(e,t){return t?e*(1e3/t):0}const XL=5;function dT(e,t,n){const r=Math.max(t-XL,0);return cT(n-e(r),t-r)}const Yg=.001,QL=.01,ZL=10,JL=.05,e4=1;function t4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Zi(JL,e4,o),e=Zi(QL,ZL,fi(e)),o<1?(i=l=>{const c=l*o,d=c*e,f=c-n,p=qg(l,o),m=Math.exp(-d);return Yg-f/p*m},a=l=>{const d=l*o*e,f=d*n+n,p=Math.pow(o,2)*Math.pow(l,2)*e,m=Math.exp(-d),g=qg(Math.pow(l,2),o);return(-i(l)+Yg>0?-1:1)*((f-p)*m)/g}):(i=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-Yg+c*d},a=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const s=5/e,u=r4(i,a,s);if(e=di(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const n4=12;function r4(e,t,n){let r=n;for(let i=1;i<n4;i++)r=r-e(r)/t(r);return r}function qg(e,t){return e*Math.sqrt(1-t*t)}const i4=["duration","bounce"],a4=["stiffness","damping","mass"];function fT(e,t){return t.some(n=>e[n]!==void 0)}function o4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!fT(e,a4)&&fT(e,i4)){const n=t4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function pT({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=o4({...r,velocity:-fi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),g=a-i,x=fi(Math.sqrt(s/l)),y=Math.abs(g)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let w;if(m<1){const b=qg(x,m);w=T=>{const S=Math.exp(-m*x*T);return a-S*((p+m*x*g)/b*Math.sin(b*T)+g*Math.cos(b*T))}}else if(m===1)w=b=>a-Math.exp(-x*b)*(g+(p+x*g)*b);else{const b=x*Math.sqrt(m*m-1);w=T=>{const S=Math.exp(-m*x*T),_=Math.min(b*T,300);return a-S*((p+m*x*g)*Math.sinh(_)+b*g*Math.cosh(_))/b}}return{calculatedDuration:f&&c||null,next:b=>{const T=w(b);if(f)o.done=b>=c;else{let S=0;m<1&&(S=b===0?di(p):dT(w,b,T));const _=Math.abs(S)<=n,N=Math.abs(a-T)<=t;o.done=_&&N}return o.value=o.done?a:T,o}}}function hT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>s!==void 0&&D<s||u!==void 0&&D>u,m=D=>s===void 0?u:u===void 0||Math.abs(s-D)<Math.abs(u-D)?s:u;let g=n*t;const x=d+g,y=o===void 0?x:o(x);y!==x&&(g=y-d);const w=D=>-g*Math.exp(-D/r),b=D=>y+w(D),T=D=>{const V=w(D),P=b(D);f.done=Math.abs(V)<=l,f.value=f.done?y:P};let S,_;const N=D=>{p(f.value)&&(S=D,_=pT({keyframes:[f.value,m(f.value)],velocity:dT(b,D,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:c}))};return N(0),{calculatedDuration:null,next:D=>{let V=!1;return!_&&S===void 0&&(V=!0,T(D),N(D)),S!==void 0&&D>=S?_.next(D-S):(!V&&T(D),f)}}}const s4=Wu(.42,0,1,1),u4=Wu(0,0,.58,1),mT=Wu(.42,0,.58,1),l4=e=>Array.isArray(e)&&typeof e[0]!="number",Gg=e=>Array.isArray(e)&&typeof e[0]=="number",gT={linear:Qt,easeIn:s4,easeInOut:mT,easeOut:u4,circIn:Ig,circInOut:BE,circOut:FE,backIn:Pg,backInOut:LE,backOut:DE,anticipate:ME},yT=e=>{if(Gg(e)){Og(e.length===4);const[t,n,r,i]=e;return Wu(t,n,r,i)}else if(typeof e=="string")return Og(gT[e]!==void 0),gT[e];return e},c4=(e,t)=>n=>t(e(n)),pi=(...e)=>e.reduce(c4),ns=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},pt=(e,t,n)=>e+(t-e)*n;function Kg(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 d4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;i=Kg(u,s,e+1/3),a=Kg(u,s,e),o=Kg(u,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function $d(e,t){return n=>n>0?t:e}const Xg=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},f4=[Hg,Ka,ts],p4=e=>f4.find(t=>t.test(e));function vT(e){const t=p4(e);if(!t)return!1;let n=t.parse(e);return t===ts&&(n=d4(n)),n}const wT=(e,t)=>{const n=vT(e),r=vT(t);if(!n||!r)return $d(e,t);const i={...n};return a=>(i.red=Xg(n.red,r.red,a),i.green=Xg(n.green,r.green,a),i.blue=Xg(n.blue,r.blue,a),i.alpha=pt(n.alpha,r.alpha,a),Ka.transform(i))},Qg=new Set(["none","hidden"]);function h4(e,t){return Qg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function m4(e,t){return n=>pt(e,t,n)}function Zg(e){return typeof e=="number"?m4:typeof e=="string"?Dg(e)?$d:Zt.test(e)?wT:v4:Array.isArray(e)?bT:typeof e=="object"?Zt.test(e)?wT:g4:$d}function bT(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Zg(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function g4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Zg(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function y4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][i[o]],u=(n=e.values[s])!==null&&n!==void 0?n:0;r[a]=u,i[o]++}return r}const v4=(e,t)=>{const n=ea.createTransformer(t),r=Ku(e),i=Ku(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?Qg.has(e)&&!i.values.length||Qg.has(t)&&!r.values.length?h4(e,t):pi(bT(y4(r,i),i.values),n):$d(e,t)};function xT(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Zg(e)(e,t)}function w4(e,t,n){const r=[],i=n||xT,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||Qt:t;s=pi(u,s)}r.push(s)}return r}function b4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Og(a===t.length),a===1)return()=>t[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=w4(t,r,i),s=o.length,u=l=>{let c=0;if(s>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=ns(e[c],e[c+1],l);return o[c](d)};return n?l=>u(Zi(e[0],e[a-1],l)):u}function x4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ns(0,t,r);e.push(pt(n,1,i))}}function E4(e){const t=[0];return x4(t,e.length-1),t}function T4(e,t){return e.map(n=>n*t)}function _4(e,t){return e.map(()=>t||mT).splice(0,e.length-1)}function Wd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=l4(r)?r.map(yT):yT(r),a={done:!1,value:t[0]},o=T4(n&&n.length===t.length?n:E4(t),e),s=b4(o,t,{ease:Array.isArray(i)?i:_4(t,i)});return{calculatedDuration:e,next:u=>(a.value=s(u),a.done=u>=e,a)}}const ET=2e4;function S4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ET;)t+=n,r=e.next(t);return t>=ET?1/0:t}const C4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Qi(t),now:()=>Vt.isProcessing?Vt.timestamp:jr.now()}},A4={decay:hT,inertia:hT,tween:Wd,keyframes:Wd,spring:pT},k4=e=>e/100;class Jg extends lT{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:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Fg,s=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=Wg(n)?n:A4[n]||Wd;let u,l;s!==Wd&&typeof t[0]!="number"&&(u=pi(k4,xT(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});a==="mirror"&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=S4(c));const{calculatedDuration:d}=c,f=d+i,p=f*(r+1)-i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:u,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}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:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return a.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:g,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,T=a;if(p){const D=Math.min(this.currentTime,c)/d;let V=Math.floor(D),P=D%1;!P&&D>=1&&(P=1),P===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(P=1-P,g&&(P-=g/d)):m==="mirror"&&(T=o)),b=Zi(0,1,P)*d}const S=w?{done:!1,value:u[0]}:T.next(b);s&&(S.value=s(S.value));let{done:_}=S;!w&&l!==null&&(_=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return N&&i!==void 0&&(S.value=Ud(u,this.options,i)),x&&x(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?fi(t.calculatedDuration):0}get time(){return fi(this.currentTime)}set time(t){t=di(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=fi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=C4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),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(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const TT=new Set(["opacity","clipPath","filter","transform"]),R4=10,N4=(e,t)=>{let n="";const r=Math.max(Math.round(t/R4),2);for(let i=0;i<r;i++)n+=e(ns(0,r-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function e0(e){let t;return()=>(t===void 0&&(t=e()),t)}const P4={linearEasing:void 0};function I4(e,t){const n=e0(e);return()=>{var r;return(r=P4[t])!==null&&r!==void 0?r:n()}}const Yd=I4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function _T(e){return!!(typeof e=="function"&&Yd()||!e||typeof e=="string"&&(e in t0||Yd())||Gg(e)||Array.isArray(e)&&e.every(_T))}const Xu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,t0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xu([0,.65,.55,1]),circOut:Xu([.55,0,1,.45]),backIn:Xu([.31,.01,.66,-.59]),backOut:Xu([.33,1.53,.69,.99])};function ST(e,t){if(e)return typeof e=="function"&&Yd()?N4(e,t):Gg(e)?Xu(e):Array.isArray(e)?e.map(n=>ST(n,t)||t0.easeOut):t0[e]}function O4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=ST(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function CT(e,t){e.timeline=t,e.onfinish=null}const D4=e0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qd=10,L4=2e4;function M4(e){return Wg(e.type)||e.type==="spring"||!_T(e.ease)}function F4(e,t){const n=new Jg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<L4;)r=n.sample(a),i.push(r.value),a+=qd;return{times:void 0,keyframes:i,duration:a-qd,ease:"linear"}}const AT={anticipate:ME,backInOut:LE,circInOut:BE};function B4(e){return e in AT}class kT extends lT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new sT(a,(o,s)=>this.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Yd()&&B4(o)&&(o=AT[o]),M4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:g,...x}=this.options,y=F4(t,x);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,a=y.times,o=y.ease,s="keyframes"}const d=O4(u.owner.current,l,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(CT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Ud(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return fi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return fi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=di(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}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 Qt;const{animation:r}=n;CT(r,t)}return Qt}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:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new Jg({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),g=di(this.time);l.setWithVelocity(m.sample(g-qd).value,m.sample(g).value,qd)}const{onStop:u}=this.options;u&&u(),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:a,damping:o,type:s}=t;return D4()&&r&&TT.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const j4=e0(()=>window.ScrollTimeline!==void 0);class U4{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}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=>j4()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].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]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function H4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const n0=(e,t,n,r={},i,a)=>o=>{const s=Rg(r,e)||{},u=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-di(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};H4(s)||(c={...c,...sL(e,c)}),c.duration&&(c.duration=di(c.duration)),c.repeatDelay&&(c.repeatDelay=di(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!a&&t.get()!==void 0){const f=Ud(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new U4([])}return!a&&kT.supports(c)?new kT(c):new Jg(c)},z4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),V4=e=>Sg(e)?e[e.length-1]||0:e;function r0(e,t){e.indexOf(t)===-1&&e.push(t)}function i0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class a0{constructor(){this.subscriptions=[]}add(t){return r0(this.subscriptions,t),()=>i0(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 a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const RT=30,$4=e=>!isNaN(parseFloat(e));class W4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=jr.now();this.updatedAt!==a&&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=jr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=$4(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 a0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Xe.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=jr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>RT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,RT);return cT(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 Qu(e,t){return new W4(e,t)}function Y4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qu(n))}function q4(e,t){const n=jd(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=V4(a[o]);Y4(e,o,s)}}const Gd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),NT="data-"+Gd("framerAppearId");function PT(e){return e.props[NT]}const Jt=e=>!!(e&&e.getVelocity);function G4(e){return!!(Jt(e)&&e.add)}function o0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(G4(n))return n.add(t)}function K4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function IT(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...u}=t;r&&(o=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in u){const f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=u[d];if(p===void 0||c&&K4(c,d))continue;const m={delay:n,...Rg(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=PT(e);if(y){const w=window.MotionHandoffAnimation(y,d,Xe);w!==null&&(m.startTime=w,g=!0)}}o0(e,d),f.start(n0(d,f,p,e.shouldReduceMotion&&Xi.has(d)?{type:!1}:m,e,g));const x=f.animation;x&&l.push(x)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&q4(e,s)})}),l}function s0(e,t,n={}){var r;const i=jd(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(IT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return X4(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=a;if(u){const[l,c]=u==="beforeChildren"?[o,s]:[s,o];return l().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function X4(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,u=i===1?(l=0)=>l*r:(l=0)=>s-l*r;return Array.from(e.variantChildren).sort(Q4).forEach((l,c)=>{l.notify("AnimationStart",t),o.push(s0(l,t,{...a,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(o)}function Q4(e,t){return e.sortNodePosition(t)}function Z4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>s0(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=s0(e,t,n);else{const i=typeof t=="function"?jd(e,t,n.custom):t;r=Promise.all(IT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const J4=kg.length;function OT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?OT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<J4;n++){const r=kg[n],i=e.props[r];(Vu(i)||i===!1)&&(t[r]=i)}return t}const eM=[...Ag].reverse(),tM=Ag.length;function nM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Z4(e,n,r)))}function rM(e){let t=nM(e),n=DT(),r=!0;const i=u=>(l,c)=>{var d;const f=jd(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;l={...l,...g,...m}}return l};function a(u){t=u(e)}function o(u){const{props:l}=e,c=OT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<tM;x++){const y=eM[x],w=n[y],b=l[y]!==void 0?l[y]:c[y],T=Vu(b),S=y===u?w.isActive:null;S===!1&&(m=x);let _=b===c[y]&&b!==l[y]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),w.protectedKeys={...p},!w.isActive&&S===null||!b&&!w.prevProp||zu(b)||typeof b=="boolean")continue;const N=iM(w.prevProp,b);let D=N||y===u&&w.isActive&&!_&&T||x>m&&T,V=!1;const P=Array.isArray(b)?b:[b];let $=P.reduce(i(y),{});S===!1&&($={});const{prevResolvedValues:H={}}=w,X={...H,...$},Y=ee=>{D=!0,f.has(ee)&&(V=!0,f.delete(ee)),w.needsAnimating[ee]=!0;const F=e.getValue(ee);F&&(F.liveStyle=!1)};for(const ee in X){const F=$[ee],B=H[ee];if(p.hasOwnProperty(ee))continue;let A=!1;Sg(F)&&Sg(B)?A=!kE(F,B):A=F!==B,A?F!=null?Y(ee):f.add(ee):F!==void 0&&f.has(ee)?Y(ee):w.protectedKeys[ee]=!0}w.prevProp=b,w.prevResolvedValues=$,w.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(_&&N)||V)&&d.push(...P.map(ee=>({animation:ee,options:{type:y}})))}if(f.size){const x={};f.forEach(y=>{const w=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=w??null}),d.push({animation:x})}let g=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(u,l){var c;if(n[u].isActive===l)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(u,l)}),n[u].isActive=l;const d=o(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=DT(),r=!0}}}function iM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kE(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function DT(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}class ta{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aM extends ta{constructor(t){super(t),t.animationState||(t.animationState=rM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zu(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===void 0||t.call(this)}}let oM=0;class sM extends ta{constructor(){super(...arguments),this.id=oM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const uM={animation:{Feature:aM},exit:{Feature:sM}},LT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Kd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const lM=e=>t=>LT(t)&&e(t,Kd(t));function hi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mi(e,t,n,r){return hi(e,t,lM(n),r)}const MT=(e,t)=>Math.abs(e-t);function cM(e,t){const n=MT(e.x,t.x),r=MT(e.y,t.y);return Math.sqrt(n**2+r**2)}class FT{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!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 d=l0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=cM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:g}=Vt;this.history.push({...m,timestamp:g});const{onStart:x,onMove:y}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=u0(f,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=l0(d.type==="pointercancel"?this.lastMoveEventInfo:u0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,x),m&&m(d,x)},!LT(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Kd(t),s=u0(o,this.transformPagePoint),{point:u}=s,{timestamp:l}=Vt;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,l0(s,this.history)),this.removeListeners=pi(mi(this.contextWindow,"pointermove",this.handlePointerMove),mi(this.contextWindow,"pointerup",this.handlePointerUp),mi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qi(this.updatePoint)}}function u0(e,t){return t?{point:t(e.point)}:e}function BT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function l0({point:e},t){return{point:e,delta:BT(e,jT(t)),offset:BT(e,dM(t)),velocity:fM(t,.1)}}function dM(e){return e[0]}function jT(e){return e[e.length-1]}function fM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=jT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>di(t)));)n--;if(!r)return{x:0,y:0};const a=fi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function UT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const HT=UT("dragHorizontal"),zT=UT("dragVertical");function VT(e){let t=!1;if(e==="y")t=zT();else if(e==="x")t=HT();else{const n=HT(),r=zT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function $T(){const e=VT(!0);return e?(e(),!1):!0}function rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const WT=1e-4,pM=1-WT,hM=1+WT,YT=.01,mM=0-YT,gM=0+YT;function Un(e){return e.max-e.min}function yM(e,t,n){return Math.abs(e-t)<=n}function qT(e,t,n,r=.5){e.origin=r,e.originPoint=pt(t.min,t.max,e.origin),e.scale=Un(n)/Un(t),e.translate=pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=pM&&e.scale<=hM||isNaN(e.scale))&&(e.scale=1),(e.translate>=mM&&e.translate<=gM||isNaN(e.translate))&&(e.translate=0)}function Zu(e,t,n,r){qT(e.x,t.x,n.x,r?r.originX:void 0),qT(e.y,t.y,n.y,r?r.originY:void 0)}function GT(e,t,n){e.min=n.min+t.min,e.max=e.min+Un(t)}function vM(e,t,n){GT(e.x,t.x,n.x),GT(e.y,t.y,n.y)}function KT(e,t,n){e.min=t.min-n.min,e.max=e.min+Un(t)}function Ju(e,t,n){KT(e.x,t.x,n.x),KT(e.y,t.y,n.y)}function wM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?pt(n,e,r.max):Math.min(e,n)),e}function XT(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 bM(e,{top:t,left:n,bottom:r,right:i}){return{x:XT(e.x,n,i),y:XT(e.y,t,r)}}function QT(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 xM(e,t){return{x:QT(e.x,t.x),y:QT(e.y,t.y)}}function EM(e,t){let n=.5;const r=Un(e),i=Un(t);return i>r?n=ns(t.min,t.max-r,e.min):r>i&&(n=ns(e.min,e.max-i,t.min)),Zi(0,1,n)}function TM(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 c0=.35;function _M(e=c0){return e===!1?e=0:e===!0&&(e=c0),{x:ZT(e,"left","right"),y:ZT(e,"top","bottom")}}function ZT(e,t,n){return{min:JT(e,t),max:JT(e,n)}}function JT(e,t){return typeof e=="number"?e:e[t]||0}const e2=()=>({translate:0,scale:1,origin:0,originPoint:0}),is=()=>({x:e2(),y:e2()}),t2=()=>({min:0,max:0}),Et=()=>({x:t2(),y:t2()});function rr(e){return[e("x"),e("y")]}function n2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function CM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function d0(e){return e===void 0||e===1}function f0({scale:e,scaleX:t,scaleY:n}){return!d0(e)||!d0(t)||!d0(n)}function Qa(e){return f0(e)||r2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function r2(e){return i2(e.x)||i2(e.y)}function i2(e){return e&&e!=="0%"}function Xd(e,t,n){const r=e-n,i=t*r;return n+i}function a2(e,t,n,r,i){return i!==void 0&&(e=Xd(e,i,r)),Xd(e,n,r)+t}function p0(e,t=0,n=1,r,i){e.min=a2(e.min,t,n,r,i),e.max=a2(e.max,t,n,r,i)}function o2(e,{x:t,y:n}){p0(e.x,t.translate,t.scale,t.originPoint),p0(e.y,n.translate,n.scale,n.originPoint)}const s2=.999999999999,u2=1.0000000000001;function AM(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&os(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,o2(e,o)),r&&Qa(a.latestValues)&&os(e,a.latestValues))}t.x<u2&&t.x>s2&&(t.x=1),t.y<u2&&t.y>s2&&(t.y=1)}function as(e,t){e.min=e.min+t,e.max=e.max+t}function l2(e,t,n,r,i=.5){const a=pt(e.min,e.max,i);p0(e,t,n,a,r)}function os(e,t){l2(e.x,t.x,t.scaleX,t.scale,t.originX),l2(e.y,t.y,t.scaleY,t.scale,t.originY)}function c2(e,t){return n2(CM(e.getBoundingClientRect(),t))}function kM(e,t,n){const r=c2(e,n),{scroll:i}=t;return i&&(as(r.x,i.offset.x),as(r.y,i.offset.y)),r}const d2=({current:e})=>e?e.ownerDocument.defaultView:null,RM=new WeakMap;class NM{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Kd(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=VT(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rr(x=>{let y=this.getAxisMotionValue(x).get()||0;if(Br.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[x];b&&(y=Un(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),m&&Xe.postRender(()=>m(c,d)),o0(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(p&&this.currentDirection===null){this.currentDirection=PM(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),g&&g(c,d)},s=(c,d)=>this.stop(c,d),u=()=>rr(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new FT(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:d2(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Xe.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Qd(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=wM(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&rs(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=bM(i.layoutBox,n):this.constraints=!1,this.elastic=_M(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=TM(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rs(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=kM(r,i.root,this.visualElement.getTransformPagePoint());let o=xM(i.layout.layoutBox,a);if(n){const s=n(SM(o));this.hasMutatedConstraints=!!s,s&&(o=n2(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=rr(c=>{if(!Qd(c,n,this.currentDirection))return;let d=u&&u[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return o0(this.visualElement,t),r.start(n0(t,r,0,n,this.visualElement,!1))}stopAnimation(){rr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rr(n=>{const{drag:r}=this.getProps();if(!Qd(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-pt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!rs(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const u=s.get();i[o]=EM({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rr(o=>{if(!Qd(o,t,null))return;const s=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];s.set(pt(u,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;RM.set(this.visualElement,this);const t=this.visualElement.current,n=mi(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();rs(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Xe.read(r);const o=hi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(rr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=c0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Qd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class IM extends ta{constructor(t){super(t),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new NM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const f2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class OM extends ta{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(t){this.session=new FT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:f2(t),onStart:f2(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=mi(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 Zd=v.createContext(null);function DM(){const e=v.useContext(Zd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=v.useId();v.useEffect(()=>r(i),[]);const a=v.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const h0=v.createContext({}),p2=v.createContext({}),Jd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function h2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const el={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=h2(e,t.target.x),r=h2(e,t.target.y);return`${n}% ${r}%`}},LM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ea.parse(e);if(i.length>5)return r;const a=ea.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=u;const l=pt(s,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),a(i)}},ef={};function MM(e){Object.assign(ef,e)}const{schedule:m0,cancel:Eie}=NE(queueMicrotask,!1);class FM extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;MM(BM),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Jd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),m0.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 m2(e){const[t,n]=DM(),r=v.useContext(h0);return E.jsx(FM,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(p2),isPresent:t,safeToRemove:n})}const BM={borderRadius:{...el,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:el,borderTopRightRadius:el,borderBottomLeftRadius:el,borderBottomRightRadius:el,boxShadow:LM},g2=["TopLeft","TopRight","BottomLeft","BottomRight"],jM=g2.length,y2=e=>typeof e=="string"?parseFloat(e):e,v2=e=>typeof e=="number"||ye.test(e);function UM(e,t,n,r,i,a){i?(e.opacity=pt(0,n.opacity!==void 0?n.opacity:1,HM(r)),e.opacityExit=pt(t.opacity!==void 0?t.opacity:1,0,zM(r))):a&&(e.opacity=pt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<jM;o++){const s=`border${g2[o]}Radius`;let u=w2(t,s),l=w2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||v2(u)===v2(l)?(e[s]=Math.max(pt(y2(u),y2(l),r),0),(Br.test(l)||Br.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function w2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const HM=b2(0,.5,FE),zM=b2(.5,.95,Qt);function b2(e,t,n){return r=>r<e?0:r>t?1:n(ns(e,t,r))}function x2(e,t){e.min=t.min,e.max=t.max}function ir(e,t){x2(e.x,t.x),x2(e.y,t.y)}function E2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function T2(e,t,n,r,i){return e-=t,e=Xd(e,1/n,r),i!==void 0&&(e=Xd(e,1/i,r)),e}function VM(e,t=0,n=1,r=.5,i,a=e,o=e){if(Br.test(t)&&(t=parseFloat(t),t=pt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=pt(a.min,a.max,r);e===a&&(s-=t),e.min=T2(e.min,t,n,s,i),e.max=T2(e.max,t,n,s,i)}function _2(e,t,[n,r,i],a,o){VM(e,t[n],t[r],t[i],t.scale,a,o)}const $M=["x","scaleX","originX"],WM=["y","scaleY","originY"];function S2(e,t,n,r){_2(e.x,t,$M,n?n.x:void 0,r?r.x:void 0),_2(e.y,t,WM,n?n.y:void 0,r?r.y:void 0)}function C2(e){return e.translate===0&&e.scale===1}function A2(e){return C2(e.x)&&C2(e.y)}function k2(e,t){return e.min===t.min&&e.max===t.max}function YM(e,t){return k2(e.x,t.x)&&k2(e.y,t.y)}function R2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function N2(e,t){return R2(e.x,t.x)&&R2(e.y,t.y)}function P2(e){return Un(e.x)/Un(e.y)}function I2(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class qM{constructor(){this.members=[]}add(t){r0(this.members,t),t.scheduleRender()}remove(t){if(i0(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 a=this.members[i];if(a.isPresent!==!1){r=a;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 GM(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const s=e.x.scale*t.x,u=e.y.scale*t.y;return(s!==1||u!==1)&&(r+=`scale(${s}, ${u})`),r||"none"}const KM=(e,t)=>e.depth-t.depth;class XM{constructor(){this.children=[],this.isDirty=!1}add(t){r0(this.children,t),this.isDirty=!0}remove(t){i0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(KM),this.isDirty=!1,this.children.forEach(t)}}function tf(e){const t=Jt(e)?e.get():e;return z4(t)?t.toValue():t}function QM(e,t){const n=jr.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Qi(r),e(a-t))};return Xe.read(r,!0),()=>Qi(r)}function ZM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function JM(e,t,n){const r=Jt(e)?e:Qu(e);return r.start(n0("",r,t,n)),r.animation}const Za={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tl=typeof window<"u"&&window.MotionDebug!==void 0,g0=["","X","Y","Z"],e5={visibility:"hidden"},O2=1e3;let t5=0;function y0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function D2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=PT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&D2(r)}function L2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=t5++,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,tl&&(Za.totalNodes=Za.resolvedTargetDeltas=Za.recalculatedProjection=0),this.nodes.forEach(i5),this.nodes.forEach(l5),this.nodes.forEach(c5),this.nodes.forEach(a5),tl&&window.MotionDebug.record(Za)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new XM)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new a0),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const u=this.eventHandlers.get(o);u&&u.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ZM(o),this.instance=o;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=QM(f,250),Jd.hasAnimatedSinceResize&&(Jd.hasAnimatedSinceResize=!1,this.nodes.forEach(F2))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||m5,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=c.getProps(),w=!this.targetLayout||!N2(this.targetLayout,m)||p,b=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const T={...Rg(g,"layout"),onPlay:x,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||F2(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,Qi(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(d5),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&&D2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:u}=this.options;if(s===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(M2);return}this.isUpdating||this.nodes.forEach(s5),this.isUpdating=!1,this.nodes.forEach(u5),this.nodes.forEach(n5),this.nodes.forEach(r5),this.clearAllSnapshots();const s=jr.now();Vt.delta=Zi(0,1e3/60,s-Vt.timestamp),Vt.timestamp=s,Vt.isProcessing=!0,Ng.update.process(Vt),Ng.preRender.process(Vt),Ng.render.process(Vt),Vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(o5),this.sharedNodes.forEach(f5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!A2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&(s||Qa(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let u=this.removeElementScroll(s);return o&&(u=this.removeTransform(u)),g5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Et();const u=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(y5))){const{scroll:c}=this.root;c&&(as(u.x,c.offset.x),as(u.y,c.offset.y))}return u}removeElementScroll(o){var s;const u=Et();if(ir(u,o),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return u;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ir(u,o),as(u.x,d.offset.x),as(u.y,d.offset.y))}return u}applyTransform(o,s=!1){const u=Et();ir(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&os(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Qa(c.latestValues)&&os(u,c.latestValues)}return Qa(this.latestValues)&&os(u,this.latestValues),u}removeTransform(o){const s=Et();ir(s,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Qa(l.latestValues))continue;f0(l.latestValues)&&l.updateSnapshot();const c=Et(),d=l.measurePageBox();ir(c,d),S2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Qa(this.latestValues)&&S2(s,this.latestValues),s}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!==Vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var s;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Vt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),Ju(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Et(),this.targetWithTransforms=Et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ir(this.target,this.layout.layoutBox),o2(this.target,this.targetDelta)):ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),Ju(this.relativeTargetOrigin,this.target,p.target),ir(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tl&&Za.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||f0(this.parent.latestValues)||r2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const s=this.getLead(),u=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Vt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=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||d))return;ir(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;AM(this.layoutCorrected,this.treeScale,this.path,u),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Et());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(E2(this.prevProjectionDelta.x,this.projectionDelta.x),E2(this.prevProjectionDelta.y,this.projectionDelta.y)),Zu(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!I2(this.projectionDelta.x,this.prevProjectionDelta.x)||!I2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),tl&&Za.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=is(),this.projectionDelta=is(),this.projectionDeltaWithTransform=is()}setAnimationOrigin(o,s=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=is();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Et(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,x=this.getStack(),y=!x||x.members.length<=1,w=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(h5));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const S=T/1e3;B2(d.x,o.x,S),B2(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ju(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p5(this.relativeTarget,this.relativeTargetOrigin,f,S),b&&YM(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Et()),ir(b,this.relativeTarget)),g&&(this.animationValues=c,UM(c,l,this.latestValues,S,w,y)),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&&(Qi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{Jd.hasAnimatedSinceResize=!0,this.currentAnimation=JM(0,O2,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},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(O2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:u,layout:l,latestValues:c}=o;if(!(!s||!u||!l)){if(this!==o&&this.layout&&l&&V2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Et();const d=Un(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+d;const f=Un(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}ir(s,u),os(s,c),Zu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new qM),this.sharedNodes.get(o).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(s=!0),!s)return;const l={};u.z&&y0("z",o,l,this.animationValues);for(let c=0;c<g0.length;c++)y0(`rotate${g0[c]}`,o,l,this.animationValues),y0(`skew${g0[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}getProjectionStyles(o){var s,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return e5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=tf(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=tf(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Qa(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=GM(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:m}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:l.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in ef){if(f[g]===void 0)continue;const{correct:x,applyTo:y}=ef[g],w=l.transform==="none"?f[g]:x(f[g],d);if(y){const b=y.length;for(let T=0;T<b;T++)l[y[T]]=w}else l[g]=w}return this.options.layoutId&&(l.pointerEvents=d===this?tf(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(M2),this.root.sharedNodes.clear()}}}function n5(e){e.updateLayout()}function r5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?rr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(f);f.min=r[d].min,f.max=f.min+p}):V2(a,n.layoutBox,r)&&rr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=is();Zu(s,r,n.layoutBox);const u=is();o?Zu(u,e.applyTransform(i,!0),n.measuredBox):Zu(u,r,n.layoutBox);const l=!A2(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Et();Ju(m,n.layoutBox,f.layoutBox);const g=Et();Ju(g,r,p.layoutBox),N2(m,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function i5(e){tl&&Za.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function a5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function o5(e){e.clearSnapshot()}function M2(e){e.clearMeasurements()}function s5(e){e.isLayoutDirty=!1}function u5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function F2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function l5(e){e.resolveTargetDelta()}function c5(e){e.calcProjection()}function d5(e){e.resetSkewAndRotation()}function f5(e){e.removeLeadSnapshot()}function B2(e,t,n){e.translate=pt(t.translate,0,n),e.scale=pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function j2(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function p5(e,t,n,r){j2(e.x,t.x,n.x,r),j2(e.y,t.y,n.y,r)}function h5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const m5={duration:.45,ease:[.4,0,.1,1]},U2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),H2=U2("applewebkit/")&&!U2("chrome/")?Math.round:Qt;function z2(e){e.min=H2(e.min),e.max=H2(e.max)}function g5(e){z2(e.x),z2(e.y)}function V2(e,t,n){return e==="position"||e==="preserve-aspect"&&!yM(P2(t),P2(n),.2)}function y5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const v5=L2({attachResizeListener:(e,t)=>hi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),v0={current:void 0},$2=L2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!v0.current){const e=new v5({});e.mount(window),e.setOptions({layoutScroll:!0}),v0.current=e}return v0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),w5={pan:{Feature:OM},drag:{Feature:IM,ProjectionNode:$2,MeasureLayout:m2}};function W2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||$T())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const u=s[r];u&&Xe.postRender(()=>u(a,o))};return mi(e.current,n,i,{passive:!e.getProps()[r]})}class b5 extends ta{mount(){this.unmount=pi(W2(this.node,!0),W2(this.node,!1))}unmount(){}}class x5 extends ta{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=pi(hi(this.node.current,"focus",()=>this.onFocus()),hi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Y2=(e,t)=>t?e===t?!0:Y2(e,t.parentElement):!1;function w0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Kd(n))}class E5 extends ta{constructor(){super(...arguments),this.removeStartListeners=Qt,this.removeEndListeners=Qt,this.removeAccessibleListeners=Qt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=mi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Y2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),o=mi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=pi(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||w0("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Xe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=hi(this.node.current,"keyup",o),w0("down",(s,u)=>{this.startPress(s,u)})},n=hi(this.node.current,"keydown",t),r=()=>{this.isPressing&&w0("cancel",(a,o)=>this.cancelPress(a,o))},i=hi(this.node.current,"blur",r);this.removeAccessibleListeners=pi(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Xe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$T()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Xe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=mi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=hi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const b0=new WeakMap,x0=new WeakMap,T5=e=>{const t=b0.get(e.target);t&&t(e)},_5=e=>{e.forEach(T5)};function S5({root:e,...t}){const n=e||document;x0.has(n)||x0.set(n,{});const r=x0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_5,{root:e,...t})),r[i]}function C5(e,t,n){const r=S5(t);return b0.set(e,n),r.observe(e),()=>{b0.delete(e),r.unobserve(e)}}const A5={some:0,all:1};class k5 extends ta{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:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:A5[i]},s=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=l?c:d;f&&f(u)};return C5(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(R5(t,n))&&this.startObserver()}unmount(){}}function R5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const N5={inView:{Feature:k5},tap:{Feature:E5},focus:{Feature:x5},hover:{Feature:b5}},P5={layout:{ProjectionNode:$2,MeasureLayout:m2}},E0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nf=v.createContext({}),T0=typeof window<"u",q2=T0?v.useLayoutEffect:v.useEffect,G2=v.createContext({strict:!1});function I5(e,t,n,r,i){var a,o;const{visualElement:s}=v.useContext(nf),u=v.useContext(G2),l=v.useContext(Zd),c=v.useContext(E0).reducedMotion,d=v.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=v.useContext(p2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&O5(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[NT],g=v.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return q2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),m0.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,m)}),g.current=!1))}),f}function O5(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:K2(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&rs(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function K2(e){if(e)return e.options.allowProjection!==!1?e.projection:K2(e.parent)}function D5(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):rs(n)&&(n.current=r))},[t])}function rf(e){return zu(e.animate)||kg.some(t=>Vu(e[t]))}function X2(e){return!!(rf(e)||e.variants)}function L5(e,t){if(rf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vu(n)?n:void 0,animate:Vu(r)?r:void 0}}return e.inherit!==!1?t:{}}function M5(e){const{initial:t,animate:n}=L5(e,v.useContext(nf));return v.useMemo(()=>({initial:t,animate:n}),[Q2(t),Q2(n)])}function Q2(e){return Array.isArray(e)?e.join(" "):e}const Z2={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"]},ss={};for(const e in Z2)ss[e]={isEnabled:t=>Z2[e].some(n=>!!t[n])};function F5(e){for(const t in e)ss[t]={...ss[t],...e[t]}}const B5=Symbol.for("motionComponentSymbol");function j5({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&F5(e);function a(s,u){let l;const c={...v.useContext(E0),...s,layoutId:U5(s)},{isStatic:d}=c,f=M5(s),p=r(s,d);if(!d&&T0){H5();const m=z5(c);l=m.MeasureLayout,f.visualElement=I5(i,p,c,t,m.ProjectionNode)}return E.jsxs(nf.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,D5(p,f.visualElement,u),p,d,f.visualElement)]})}const o=v.forwardRef(a);return o[B5]=i,o}function U5({layoutId:e}){const t=v.useContext(h0).id;return t&&e!==void 0?t+"-"+e:e}function H5(e,t){v.useContext(G2).strict}function z5(e){const{drag:t,layout:n}=ss;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 V5=["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 _0(e){return typeof e!="string"||e.includes("-")?!1:!!(V5.indexOf(e)>-1||/[A-Z]/u.test(e))}function J2(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const e_=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 t_(e,t,n,r){J2(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(e_.has(i)?i:Gd(i),t.attrs[i])}function n_(e,{layout:t,layoutId:n}){return Xi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ef[e]||e==="opacity")}function S0(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(Jt(i[o])||t.style&&Jt(t.style[o])||n_(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),a}function r_(e,t,n){const r=S0(e,t,n);for(const i in e)if(Jt(e[i])||Jt(t[i])){const a=$u.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function C0(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}function $5(e){if(Xi.has(e))return"transform";if(TT.has(e))return Gd(e)}function W5({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const u={latestValues:Y5(i,a,o,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const i_=e=>(t,n)=>{const r=v.useContext(nf),i=v.useContext(Zd),a=()=>W5(e,t,r,i,n);return n?a():C0(a)};function a_(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const a=Cg(e,r[i]);if(a){const{transitionEnd:o,transition:s,...u}=a;n(u,o)}}}function Y5(e,t,n,r,i){var a;const o={},s=new Set,u=r&&((a=e.style)===null||a===void 0?void 0:a.willChange)===void 0,l=i(e,{});for(const x in l)o[x]=tf(l[x]);let{initial:c,animate:d}=e;const f=rf(e),p=X2(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let m=n?n.initial===!1:!1;m=m||c===!1;const g=m?d:c;return g&&typeof g!="boolean"&&!zu(g)&&a_(e,g,(x,y)=>{for(const w in x){let b=x[w];if(Array.isArray(b)){const T=m?b.length-1:0;b=b[T]}b!==null&&(o[w]=b)}for(const w in y)o[w]=y[w]}),u&&(d&&c!==!1&&!zu(d)&&a_(e,d,x=>{for(const y in x){const w=$5(y);w&&s.add(w)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const A0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),o_=()=>({...A0(),attrs:{}}),s_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,q5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},G5=$u.length;function K5(e,t,n){let r="",i=!0;for(let a=0;a<G5;a++){const o=$u[a],s=e[o];if(s===void 0)continue;let u=!0;if(typeof s=="number"?u=s===(o.startsWith("scale")?1:0):u=parseFloat(s)===0,!u||n){const l=s_(s,Vg[o]);if(!u){i=!1;const c=q5[o]||o;r+=`${c}(${l}) `}n&&(t[o]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function k0(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const u in t){const l=t[u];if(Xi.has(u)){o=!0;continue}else if(zE(u)){i[u]=l;continue}else{const c=s_(l,Vg[u]);u.startsWith("origin")?(s=!0,a[u]=c):r[u]=c}}if(t.transform||(o||n?r.transform=K5(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:u="50%",originY:l="50%",originZ:c=0}=a;r.transformOrigin=`${u} ${l} ${c}`}}function u_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function X5(e,t,n){const r=u_(t,e.x,e.width),i=u_(n,e.y,e.height);return`${r} ${i}`}const Q5={offset:"stroke-dashoffset",array:"stroke-dasharray"},Z5={offset:"strokeDashoffset",array:"strokeDasharray"};function J5(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Q5:Z5;e[a.offset]=ye.transform(-r);const o=ye.transform(t),s=ye.transform(n);e[a.array]=`${o} ${s}`}function R0(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:u=0,...l},c,d){if(k0(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=X5(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&J5(f,o,s,u,!1)}const N0=e=>typeof e=="string"&&e.toLowerCase()==="svg",e8={useVisualState:i_({scrapeMotionValuesFromProps:r_,createRenderState:o_,onMount:(e,t,{renderState:n,latestValues:r})=>{Xe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Xe.render(()=>{R0(n,r,N0(t.tagName),e.transformTemplate),t_(t,n)})}})},t8={useVisualState:i_({applyWillChange:!0,scrapeMotionValuesFromProps:S0,createRenderState:A0})};function l_(e,t,n){for(const r in t)!Jt(t[r])&&!n_(r,n)&&(e[r]=t[r])}function n8({transformTemplate:e},t){return v.useMemo(()=>{const n=A0();return k0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function r8(e,t){const n=e.style||{},r={};return l_(r,n,e),Object.assign(r,n8(e,t)),r}function i8(e,t){const n={},r=r8(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 a8=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 af(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||a8.has(e)}let c_=e=>!af(e);function o8(e){e&&(c_=t=>t.startsWith("on")?!af(t):e(t))}try{o8(require("@emotion/is-prop-valid").default)}catch{}function s8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(c_(i)||n===!0&&af(i)||!t&&!af(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function u8(e,t,n,r){const i=v.useMemo(()=>{const a=o_();return R0(a,t,N0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};l_(a,e.style,e),i.style={...a,...i.style}}return i}function l8(e=!1){return(n,r,i,{latestValues:a},o)=>{const u=(_0(n)?u8:i8)(r,a,o,n),l=s8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>Jt(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function c8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={..._0(r)?e8:t8,preloadedFeatures:e,useRender:l8(i),createVisualElement:t,Component:r};return j5(o)}}const P0={current:null},d_={current:!1};function d8(){if(d_.current=!0,!!T0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>P0.current=e.matches;e.addListener(t),t()}else P0.current=!1}function f8(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Jt(i))e.addValue(r,i);else if(Jt(a))e.addValue(r,Qu(i,{owner:e}));else if(a!==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,Qu(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const f_=new WeakMap,p8=[...KE,Zt,ea],h8=e=>p8.find(GE(e)),p_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class m8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Fg,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 f=jr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Xe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=rf(n),this.isVariantNode=X2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];u[f]!==void 0&&Jt(p)&&p.set(u[f],!1)}}mount(t){this.current=t,f_.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)),d_.current||d8(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:P0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){f_.delete(this.current),this.projection&&this.projection.unmount(),Qi(this.notifyUpdate),Qi(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=Xi.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),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 ss){const n=ss[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 a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Et()}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<p_.length;r++){const i=p_[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=f8(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const 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=Qu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(UE(i)||jE(i))?i=parseFloat(i):!h8(i)&&ea.test(n)&&(i=oT(t,n)),this.setBaseTarget(t,Jt(i)?i.get():i)),Jt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Cg(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Jt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new a0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class h_ extends m8{constructor(){super(...arguments),this.KeyframeResolver=sT}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function g8(e){return window.getComputedStyle(e)}class y8 extends h_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=J2}readValueFromInstance(t,n){if(Xi.has(n)){const r=$g(n);return r&&r.default||0}else{const r=g8(t),i=(zE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return c2(t,n)}build(t,n,r){k0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return S0(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class v8 extends h_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xi.has(n)){const r=$g(n);return r&&r.default||0}return n=e_.has(n)?n:Gd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return r_(t,n,r)}build(t,n,r){R0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){t_(t,n,r,i)}mount(t){this.isSVGTag=N0(t.tagName),super.mount(t)}}const w8=(e,t)=>_0(e)?new v8(t):new y8(t,{allowProjection:e!==v.Fragment}),b8=c8({...uM,...N5,...w5,...P5},w8),us=nL(b8);class x8 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function E8({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=v.useContext(E0);return v.useInsertionEffect(()=>{const{width:o,height:s,top:u,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
41
41
  [data-motion-pop-id="${n}"] {
42
42
  position: absolute !important;
43
43
  width: ${o}px !important;
@@ -330,7 +330,7 @@ to {
330
330
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[GS]=this[GS]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=cl(o);r[s]||(s7(i,o),r[s]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}}Tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(Tn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),z.freezeMethods(Tn);function ay(e,t){const n=this||ll,r=t||n,i=Tn.from(r.headers);let a=r.data;return z.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function KS(e){return!!(e&&e.__CANCEL__)}function hs(e,t,n){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(hs,Se,{__CANCEL__:!0});function XS(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Se("Request failed with status code "+n.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function u7(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function l7(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let d=a,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(f*1e3/p):void 0}}function c7(e,t){let n=0,r=1e3/t,i,a;const o=(l,c=Date.now())=>{n=c,i=null,a&&(clearTimeout(a),a=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?o(l,c):(i=l,a||(a=setTimeout(()=>{a=null,o(i)},r-d)))},()=>i&&o(i)]}const Tf=(e,t,n=3)=>{let r=0;const i=l7(50,250);return c7(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,u=o-r,l=i(u),c=o<=s;r=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},QS=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ZS=e=>(...t)=>z.asap(()=>e(...t)),d7=tn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tn.origin),tn.navigator&&/(msie|trident)/i.test(tn.navigator.userAgent)):()=>!0,f7=tn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];z.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),z.isString(r)&&o.push("path="+r),z.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function p7(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function h7(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function JS(e,t){return e&&!p7(t)?h7(e,t):t}const eC=e=>e instanceof Tn?{...e}:e;function no(e,t){t=t||{};const n={};function r(l,c,d,f){return z.isPlainObject(l)&&z.isPlainObject(c)?z.merge.call({caseless:f},l,c):z.isPlainObject(c)?z.merge({},c):z.isArray(c)?c.slice():c}function i(l,c,d,f){if(z.isUndefined(c)){if(!z.isUndefined(l))return r(void 0,l,d,f)}else return r(l,c,d,f)}function a(l,c){if(!z.isUndefined(c))return r(void 0,c)}function o(l,c){if(z.isUndefined(c)){if(!z.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,c,d)=>i(eC(l),eC(c),d,!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=u[c]||i,f=d(e[c],t[c],c);z.isUndefined(f)&&d!==s||(n[c]=f)}),n}const tC=e=>{const t=no({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=Tn.from(o),t.url=$S(JS(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(z.isFormData(n)){if(tn.hasStandardBrowserEnv||tn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[l,...c]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...c].join("; "))}}if(tn.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&d7(t.url))){const l=i&&a&&f7.read(a);l&&o.set(i,l)}return t},m7=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=tC(e);let a=i.data;const o=Tn.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,d,f,p,m;function g(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function y(){if(!x)return;const b=Tn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:b,config:e,request:x};XS(function(N){n(N),g()},function(N){r(N),g()},S),x=null}"onloadend"in x?x.onloadend=y:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(y)},x.onabort=function(){x&&(r(new Se("Request aborted",Se.ECONNABORTED,e,x)),x=null)},x.onerror=function(){r(new Se("Network Error",Se.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||YS;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new Se(T,S.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,x)),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&z.forEach(o.toJSON(),function(T,S){x.setRequestHeader(S,T)}),z.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),s&&s!=="json"&&(x.responseType=i.responseType),l&&([f,m]=Tf(l,!0),x.addEventListener("progress",f)),u&&x.upload&&([d,p]=Tf(u),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=b=>{x&&(r(!b||b.type?new hs(null,e,x):b),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=u7(i.url);if(w&&tn.protocols.indexOf(w)===-1){r(new Se("Unsupported protocol "+w+":",Se.ERR_BAD_REQUEST,e));return}x.send(a||null)})},g7=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Se?c:new hs(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new Se(`timeout ${t} of ms exceeded`,Se.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:u}=r;return u.unsubscribe=()=>z.asap(s),u}},y7=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},v7=async function*(e,t){for await(const n of w7(e))yield*y7(n,t)},w7=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},nC=(e,t,n,r)=>{const i=v7(e,t);let a=0,o,s=u=>{o||(o=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let d=c.byteLength;if(n){let f=a+=d;n(f)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},_f=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",rC=_f&&typeof ReadableStream=="function",b7=_f&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),iC=(e,...t)=>{try{return!!e(...t)}catch{return!1}},x7=rC&&iC(()=>{let e=!1;const t=new Request(tn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),aC=64*1024,oy=rC&&iC(()=>z.isReadableStream(new Response("").body)),Sf={stream:oy&&(e=>e.body)};_f&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Sf[t]&&(Sf[t]=z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Se(`Response type '${t}' is not supported`,Se.ERR_NOT_SUPPORT,r)})})})(new Response);const E7=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(tn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(z.isArrayBufferView(e)||z.isArrayBuffer(e))return e.byteLength;if(z.isURLSearchParams(e)&&(e=e+""),z.isString(e))return(await b7(e)).byteLength},T7=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??E7(t)},sy={http:$B,xhr:m7,fetch:_f&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:d="same-origin",fetchOptions:f}=tC(e);l=l?(l+"").toLowerCase():"text";let p=g7([i,a&&a.toAbortSignal()],o),m;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let x;try{if(u&&x7&&n!=="get"&&n!=="head"&&(x=await T7(c,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(z.isFormData(r)&&(_=S.headers.get("content-type"))&&c.setContentType(_),S.body){const[N,D]=QS(x,Tf(ZS(u)));r=nC(S.body,aC,N,D)}}z.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:y?d:void 0});let w=await fetch(m);const b=oy&&(l==="stream"||l==="response");if(oy&&(s||b&&g)){const S={};["status","statusText","headers"].forEach(V=>{S[V]=w[V]});const _=z.toFiniteNumber(w.headers.get("content-length")),[N,D]=s&&QS(_,Tf(ZS(s),!0))||[];w=new Response(nC(w.body,aC,N,()=>{D&&D(),g&&g()}),S)}l=l||"text";let T=await Sf[z.findKey(Sf,l)||"text"](w,e);return!b&&g&&g(),await new Promise((S,_)=>{XS(S,_,{data:T,headers:Tn.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new Se("Network Error",Se.ERR_NETWORK,e,m),{cause:y.cause||y}):Se.from(y,y&&y.code,e,m)}})};z.forEach(sy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const oC=e=>`- ${e}`,_7=e=>z.isFunction(e)||e===null||e===!1,sC={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let o;if(r=n,!_7(n)&&(r=sy[(o=String(n)).toLowerCase()],r===void 0))throw new Se(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
331
331
  `+a.map(oC).join(`
332
332
  `):" "+oC(a[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:sy};function uy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hs(null,e)}function uC(e){return uy(e),e.headers=Tn.from(e.headers),e.data=ay.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sC.getAdapter(e.adapter||ll.adapter)(e).then(function(r){return uy(e),r.data=ay.call(e,e.transformResponse,r),r.headers=Tn.from(r.headers),r},function(r){return KS(r)||(uy(e),r&&r.response&&(r.response.data=ay.call(e,e.transformResponse,r.response),r.response.headers=Tn.from(r.response.headers))),Promise.reject(r)})}const lC="1.7.9",Cf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Cf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const cC={};Cf.transitional=function(t,n,r){function i(a,o){return"[Axios v"+lC+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Se(i(o," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!cC[o]&&(cC[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}},Cf.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function S7(e,t,n){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new Se("option "+a+" must be "+u,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}const Af={assertOptions:S7,validators:Cf},Hr=Af.validators;class ro{constructor(t){this.defaults=t,this.interceptors={request:new WS,response:new WS}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
333
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=no(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Af.assertOptions(r,{silentJSONParsing:Hr.transitional(Hr.boolean),forcedJSONParsing:Hr.transitional(Hr.boolean),clarifyTimeoutError:Hr.transitional(Hr.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:Af.assertOptions(i,{encode:Hr.function,serialize:Hr.function},!0)),Af.assertOptions(n,{baseUrl:Hr.spelling("baseURL"),withXsrfToken:Hr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&z.merge(a.common,a[n.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Tn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!u){const m=[uC.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],g=s[d++];try{p=m(p)}catch(x){g.call(this,x);break}}try{c=uC.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=no(this.defaults,t);const n=JS(t.baseURL,t.url);return $S(n,t.params,t.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(t){ro.prototype[t]=function(n,r){return this.request(no(r||{},{method:t,url:n,data:(r||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(no(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}ro.prototype[t]=n(),ro.prototype[t+"Form"]=n(!0)});class ly{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new hs(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ly(function(i){t=i}),cancel:t}}}function C7(e){return function(n){return e.apply(null,n)}}function A7(e){return z.isObject(e)&&e.isAxiosError===!0}const cy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cy).forEach(([e,t])=>{cy[t]=e});function dC(e){const t=new ro(e),n=kS(ro.prototype.request,t);return z.extend(n,ro.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dC(no(e,i))},n}const At=dC(ll);At.Axios=ro,At.CanceledError=hs,At.CancelToken=ly,At.isCancel=KS,At.VERSION=lC,At.toFormData=xf,At.AxiosError=Se,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=C7,At.isAxiosError=A7,At.mergeConfig=no,At.AxiosHeaders=Tn,At.formToJSON=e=>qS(z.isHTMLForm(e)?new FormData(e):e),At.getAdapter=sC.getAdapter,At.HttpStatusCode=cy,At.default=At;const k7=/\{[^{}]+\}/g,R7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function N7(){return Math.random().toString(36).slice(2,11)}function P7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,headers:o,requestInitExt:s=void 0,...u}={...e};s=R7()?s:void 0,t=mC(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:g=n,headers:x,params:y={},parseAs:w="json",querySerializer:b,bodySerializer:T=a??O7,body:S,..._}=f||{};p&&(t=mC(p));let N=typeof i=="function"?i:hC(i);b&&(N=typeof b=="function"?b:hC({...typeof i=="object"?i:{},...b}));const D=S===void 0?void 0:T(S),V=D===void 0||D instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,..._,body:D,headers:L7(V,o,x,y.header)};let $,H,X=new n(D7(d,{baseUrl:t,params:y,querySerializer:N}),P);for(const re in _)re in X||(X[re]=_[re]);if(l.length){$=N7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:w,querySerializer:N,bodySerializer:T});for(const re of l)if(re&&typeof re=="object"&&typeof re.onRequest=="function"){const ee=await re.onRequest({request:X,schemaPath:d,params:y,options:H,id:$});if(ee){if(!(ee instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=ee}}}let Y;try{Y=await m(X,s)}catch(re){let ee=re;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const A=await B.onError({request:X,error:ee,schemaPath:d,params:y,options:H,id:$});if(A){if(A instanceof Response){ee=void 0,Y=A;break}if(A instanceof Error){ee=A;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ee)throw ee}if(l.length)for(let re=l.length-1;re>=0;re--){const ee=l[re];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:y,options:H,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return w==="stream"?{data:Y.body,response:Y}:{data:await Y[w](),response:Y};let ne=await Y.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function kf(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function fC(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const o=r.join(",");switch(n.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const s=n.style==="deepObject"?`${e}[${o}]`:o;r.push(kf(s,t[o],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function pC(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",o=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(a);switch(n.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const a of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?a:encodeURIComponent(a)):i.push(kf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function hC(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const a=n[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;r.push(pC(i,a,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof a=="object"){r.push(fC(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(kf(i,a,e))}}return r.join("&")}}function I7(e,t){let n=e;for(const r of e.match(k7)??[]){let i=r.substring(1,r.length-1),a=!1,o="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,pC(i,s,{style:o,explode:a}));continue}if(typeof s=="object"){n=n.replace(r,fC(i,s,{style:o,explode:a}));continue}if(o==="matrix"){n=n.replace(r,`;${kf(i,s)}`);continue}n=n.replace(r,o==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function O7(e){return e instanceof FormData?e:JSON.stringify(e)}function D7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=I7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function L7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(const o of a)t.append(i,o);else a!==void 0&&t.set(i,a)}return t}function mC(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const M7=e=>{console.log(e.error)},F7=e=>{const t=P7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||M7};return t.use(n),t};class B7{constructor({config:t}){ie(this,"client");ie(this,"uploadFileClient");ie(this,"config");ie(this,"constructClientOptions",t=>{const n=this.config.apiUrl||"https://api.open.cx",r={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:t?`Bearer ${t}`:void 0};return{baseUrl:n,headers:r}});ie(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>F7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,a])=>{a&&r.headers.set(i,a)})}}));ie(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>At.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));ie(this,"setAuthToken",t=>{const{baseUrl:n,headers:r}=this.constructClientOptions(t);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})});ie(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));ie(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));ie(this,"getSessionHistory",async({sessionId:t,lastMessageTimestamp:n,abortSignal:r})=>{const i=n?{lastMessageTimestamp:n}:void 0;return await this.client.GET("/backend/widget/v2/session/history/{sessionId}",{params:{path:{sessionId:t},query:i},signal:r})});ie(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));ie(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));ie(this,"getSession",async({sessionId:t,abortSignal:n})=>await this.client.GET("/backend/widget/v2/session/{sessionId}",{params:{path:{sessionId:t}},signal:n}));ie(this,"getSessions",async({cursor:t,filters:n,abortSignal:r})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:t,filters:JSON.stringify(n)}},signal:r}));ie(this,"uploadFile",async(t,n={})=>{const r=new FormData;r.append("file",t.file);const{data:i}=await this.uploadFileClient.post("",r,{headers:{"Content-Type":"multipart/form-data"},...n});return i});ie(this,"vote",async t=>await this.client.POST("/backend/widget/v2/chat/vote",{body:t}));var i;this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Rf={exports:{}};Rf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",x="[object Number]",y="[object Null]",w="[object Object]",b="[object Promise]",T="[object Proxy]",S="[object RegExp]",_="[object Set]",N="[object String]",D="[object Symbol]",V="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",ne="[object Int8Array]",re="[object Int16Array]",ee="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",A="[object Uint16Array]",ae="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,O=/^\[object .+?Constructor\]$/,Pe=/^(?:0|[1-9]\d*)$/,ge={};ge[X]=ge[Y]=ge[ne]=ge[re]=ge[ee]=ge[F]=ge[B]=ge[A]=ge[ae]=!0,ge[s]=ge[u]=ge[$]=ge[c]=ge[H]=ge[d]=ge[f]=ge[p]=ge[g]=ge[x]=ge[w]=ge[S]=ge[_]=ge[N]=ge[P]=!1;var we=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ve=we||$e||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&!0&&e&&!e.nodeType&&e,_t=Ge&&Ge.exports===We,Te=_t&&we.process,xe=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),Ye=xe&&xe.isTypedArray;function He(k,L){for(var W=-1,le=k==null?0:k.length,at=0,Re=[];++W<le;){var bt=k[W];L(bt,W,k)&&(Re[at++]=bt)}return Re}function vt(k,L){for(var W=-1,le=L.length,at=k.length;++W<le;)k[at+W]=L[W];return k}function wt(k,L){for(var W=-1,le=k==null?0:k.length;++W<le;)if(L(k[W],W,k))return!0;return!1}function Ke(k,L){for(var W=-1,le=Array(k);++W<k;)le[W]=L(W);return le}function Me(k){return function(L){return k(L)}}function It(k,L){return k.has(L)}function ka(k,L){return k==null?void 0:k[L]}function Ra(k){var L=-1,W=Array(k.size);return k.forEach(function(le,at){W[++L]=[at,le]}),W}function Na(k,L){return function(W){return k(L(W))}}function te(k){var L=-1,W=Array(k.size);return k.forEach(function(le){W[++L]=le}),W}var de=Array.prototype,j=Function.prototype,q=Object.prototype,ce=Ve["__core-js_shared__"],_e=j.toString,Ee=q.hasOwnProperty,Bt=function(){var k=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Pn=q.toString,mn=RegExp("^"+_e.call(Ee).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gn=_t?Ve.Buffer:void 0,In=Ve.Symbol,Rt=Ve.Uint8Array,Kn=q.propertyIsEnumerable,gn=de.splice,Ai=In?In.toStringTag:void 0,WI=Object.getOwnPropertySymbols,Ere=Gn?Gn.isBuffer:void 0,Tre=Na(Object.keys,Object),zv=Qs(Ve,"DataView"),mc=Qs(Ve,"Map"),Vv=Qs(Ve,"Promise"),$v=Qs(Ve,"Set"),Wv=Qs(Ve,"WeakMap"),gc=Qs(Object,"create"),_re=bo(zv),Sre=bo(mc),Cre=bo(Vv),Are=bo($v),kre=bo(Wv),YI=In?In.prototype:void 0,Yv=YI?YI.valueOf:void 0;function vo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Rre(){this.__data__=gc?gc(null):{},this.size=0}function Nre(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function Pre(k){var L=this.__data__;if(gc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Ire(k){var L=this.__data__;return gc?L[k]!==void 0:Ee.call(L,k)}function Ore(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=gc&&L===void 0?r:L,this}vo.prototype.clear=Rre,vo.prototype.delete=Nre,vo.prototype.get=Pre,vo.prototype.has=Ire,vo.prototype.set=Ore;function ki(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Dre(){this.__data__=[],this.size=0}function Lre(k){var L=this.__data__,W=sh(L,k);if(W<0)return!1;var le=L.length-1;return W==le?L.pop():gn.call(L,W,1),--this.size,!0}function Mre(k){var L=this.__data__,W=sh(L,k);return W<0?void 0:L[W][1]}function Fre(k){return sh(this.__data__,k)>-1}function Bre(k,L){var W=this.__data__,le=sh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}ki.prototype.clear=Dre,ki.prototype.delete=Lre,ki.prototype.get=Mre,ki.prototype.has=Fre,ki.prototype.set=Bre;function wo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function jre(){this.size=0,this.__data__={hash:new vo,map:new(mc||ki),string:new vo}}function Ure(k){var L=uh(this,k).delete(k);return this.size-=L?1:0,L}function Hre(k){return uh(this,k).get(k)}function zre(k){return uh(this,k).has(k)}function Vre(k,L){var W=uh(this,k),le=W.size;return W.set(k,L),this.size+=W.size==le?0:1,this}wo.prototype.clear=jre,wo.prototype.delete=Ure,wo.prototype.get=Hre,wo.prototype.has=zre,wo.prototype.set=Vre;function oh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new wo;++L<W;)this.add(k[L])}function $re(k){return this.__data__.set(k,r),this}function Wre(k){return this.__data__.has(k)}oh.prototype.add=oh.prototype.push=$re,oh.prototype.has=Wre;function Pa(k){var L=this.__data__=new ki(k);this.size=L.size}function Yre(){this.__data__=new ki,this.size=0}function qre(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function Gre(k){return this.__data__.get(k)}function Kre(k){return this.__data__.has(k)}function Xre(k,L){var W=this.__data__;if(W instanceof ki){var le=W.__data__;if(!mc||le.length<n-1)return le.push([k,L]),this.size=++W.size,this;W=this.__data__=new wo(le)}return W.set(k,L),this.size=W.size,this}Pa.prototype.clear=Yre,Pa.prototype.delete=qre,Pa.prototype.get=Gre,Pa.prototype.has=Kre,Pa.prototype.set=Xre;function Qre(k,L){var W=lh(k),le=!W&&fie(k),at=!W&&!le&&qv(k),Re=!W&&!le&&!at&&tO(k),bt=W||le||at||Re,jt=bt?Ke(k.length,String):[],Yt=jt.length;for(var gt in k)Ee.call(k,gt)&&!(bt&&(gt=="length"||at&&(gt=="offset"||gt=="parent")||Re&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||sie(gt,Yt)))&&jt.push(gt);return jt}function sh(k,L){for(var W=k.length;W--;)if(QI(k[W][0],L))return W;return-1}function Zre(k,L,W){var le=L(k);return lh(k)?le:vt(le,W(k))}function yc(k){return k==null?k===void 0?V:y:Ai&&Ai in Object(k)?aie(k):die(k)}function qI(k){return vc(k)&&yc(k)==s}function GI(k,L,W,le,at){return k===L?!0:k==null||L==null||!vc(k)&&!vc(L)?k!==k&&L!==L:Jre(k,L,W,le,GI,at)}function Jre(k,L,W,le,at,Re){var bt=lh(k),jt=lh(L),Yt=bt?u:Ia(k),gt=jt?u:Ia(L);Yt=Yt==s?w:Yt,gt=gt==s?w:gt;var Xn=Yt==w,Ir=gt==w,sn=Yt==gt;if(sn&&qv(k)){if(!qv(L))return!1;bt=!0,Xn=!1}if(sn&&!Xn)return Re||(Re=new Pa),bt||tO(k)?KI(k,L,W,le,at,Re):rie(k,L,Yt,W,le,at,Re);if(!(W&i)){var fr=Xn&&Ee.call(k,"__wrapped__"),pr=Ir&&Ee.call(L,"__wrapped__");if(fr||pr){var Oa=fr?k.value():k,Ri=pr?L.value():L;return Re||(Re=new Pa),at(Oa,Ri,W,le,Re)}}return sn?(Re||(Re=new Pa),iie(k,L,W,le,at,Re)):!1}function eie(k){if(!eO(k)||lie(k))return!1;var L=ZI(k)?mn:O;return L.test(bo(k))}function tie(k){return vc(k)&&JI(k.length)&&!!ge[yc(k)]}function nie(k){if(!cie(k))return Tre(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function KI(k,L,W,le,at,Re){var bt=W&i,jt=k.length,Yt=L.length;if(jt!=Yt&&!(bt&&Yt>jt))return!1;var gt=Re.get(k);if(gt&&Re.get(L))return gt==L;var Xn=-1,Ir=!0,sn=W&a?new oh:void 0;for(Re.set(k,L),Re.set(L,k);++Xn<jt;){var fr=k[Xn],pr=L[Xn];if(le)var Oa=bt?le(pr,fr,Xn,L,k,Re):le(fr,pr,Xn,k,L,Re);if(Oa!==void 0){if(Oa)continue;Ir=!1;break}if(sn){if(!wt(L,function(Ri,xo){if(!It(sn,xo)&&(fr===Ri||at(fr,Ri,W,le,Re)))return sn.push(xo)})){Ir=!1;break}}else if(!(fr===pr||at(fr,pr,W,le,Re))){Ir=!1;break}}return Re.delete(k),Re.delete(L),Ir}function rie(k,L,W,le,at,Re,bt){switch(W){case H:if(k.byteLength!=L.byteLength||k.byteOffset!=L.byteOffset)return!1;k=k.buffer,L=L.buffer;case $:return!(k.byteLength!=L.byteLength||!Re(new Rt(k),new Rt(L)));case c:case d:case x:return QI(+k,+L);case f:return k.name==L.name&&k.message==L.message;case S:case N:return k==L+"";case g:var jt=Ra;case _:var Yt=le&i;if(jt||(jt=te),k.size!=L.size&&!Yt)return!1;var gt=bt.get(k);if(gt)return gt==L;le|=a,bt.set(k,L);var Xn=KI(jt(k),jt(L),le,at,Re,bt);return bt.delete(k),Xn;case D:if(Yv)return Yv.call(k)==Yv.call(L)}return!1}function iie(k,L,W,le,at,Re){var bt=W&i,jt=XI(k),Yt=jt.length,gt=XI(L),Xn=gt.length;if(Yt!=Xn&&!bt)return!1;for(var Ir=Yt;Ir--;){var sn=jt[Ir];if(!(bt?sn in L:Ee.call(L,sn)))return!1}var fr=Re.get(k);if(fr&&Re.get(L))return fr==L;var pr=!0;Re.set(k,L),Re.set(L,k);for(var Oa=bt;++Ir<Yt;){sn=jt[Ir];var Ri=k[sn],xo=L[sn];if(le)var nO=bt?le(xo,Ri,sn,L,k,Re):le(Ri,xo,sn,k,L,Re);if(!(nO===void 0?Ri===xo||at(Ri,xo,W,le,Re):nO)){pr=!1;break}Oa||(Oa=sn=="constructor")}if(pr&&!Oa){var ch=k.constructor,dh=L.constructor;ch!=dh&&"constructor"in k&&"constructor"in L&&!(typeof ch=="function"&&ch instanceof ch&&typeof dh=="function"&&dh instanceof dh)&&(pr=!1)}return Re.delete(k),Re.delete(L),pr}function XI(k){return Zre(k,mie,oie)}function uh(k,L){var W=k.__data__;return uie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Qs(k,L){var W=ka(k,L);return eie(W)?W:void 0}function aie(k){var L=Ee.call(k,Ai),W=k[Ai];try{k[Ai]=void 0;var le=!0}catch{}var at=Pn.call(k);return le&&(L?k[Ai]=W:delete k[Ai]),at}var oie=WI?function(k){return k==null?[]:(k=Object(k),He(WI(k),function(L){return Kn.call(k,L)}))}:gie,Ia=yc;(zv&&Ia(new zv(new ArrayBuffer(1)))!=H||mc&&Ia(new mc)!=g||Vv&&Ia(Vv.resolve())!=b||$v&&Ia(new $v)!=_||Wv&&Ia(new Wv)!=P)&&(Ia=function(k){var L=yc(k),W=L==w?k.constructor:void 0,le=W?bo(W):"";if(le)switch(le){case _re:return H;case Sre:return g;case Cre:return b;case Are:return _;case kre:return P}return L});function sie(k,L){return L=L??o,!!L&&(typeof k=="number"||Pe.test(k))&&k>-1&&k%1==0&&k<L}function uie(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function lie(k){return!!Bt&&Bt in k}function cie(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function die(k){return Pn.call(k)}function bo(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function QI(k,L){return k===L||k!==k&&L!==L}var fie=qI(function(){return arguments}())?qI:function(k){return vc(k)&&Ee.call(k,"callee")&&!Kn.call(k,"callee")},lh=Array.isArray;function pie(k){return k!=null&&JI(k.length)&&!ZI(k)}var qv=Ere||yie;function hie(k,L){return GI(k,L)}function ZI(k){if(!eO(k))return!1;var L=yc(k);return L==p||L==m||L==l||L==T}function JI(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function eO(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function vc(k){return k!=null&&typeof k=="object"}var tO=Ye?Me(Ye):tie;function mie(k){return pie(k)?Qre(k):nie(k)}function gie(){return[]}function yie(){return!1}e.exports=hie}(Rf,Rf.exports);var j7=Rf.exports;const U7=St(j7);class ms{constructor(t){ie(this,"subscribers",new Set);Gv(this,Jr);ie(this,"initialState");Gv(this,Xs);ie(this,"lifecycleListeners",new Map);ie(this,"emitLifecycle",(t,n)=>{const r=this.lifecycleListeners.get(t);if(r){const i={type:t,timestamp:Date.now(),data:n};r.forEach(a=>{try{a(i)}catch{}})}});ie(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){this.emitLifecycle("error",{error:i})}})});ie(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));ie(this,"onLifecycle",(t,n)=>{this.lifecycleListeners.has(t)||this.lifecycleListeners.set(t,new Set);const r=this.lifecycleListeners.get(t);return r.add(n),()=>{r.delete(n),r.size===0&&this.lifecycleListeners.delete(t)}});ie(this,"get",()=>Eo(this,Jr));ie(this,"set",t=>{this.emitLifecycle("beforeUpdate",{previousState:Eo(this,Jr),nextState:t}),U7(Eo(this,Jr),t)||(wc(this,Jr,t),wc(this,Xs,Date.now()),this.emitLifecycle("stateChange",{state:t}),this.notifySubscribers(t)),this.emitLifecycle("afterUpdate",{state:t})});ie(this,"setPartial",t=>{if(t==null)return;const n={...Eo(this,Jr),...t};this.set(n)});ie(this,"clear",()=>{this.emitLifecycle("destroy"),this.subscribers=new Set,this.lifecycleListeners=new Map});ie(this,"reset",()=>{this.set(this.initialState)});ie(this,"lastUpdated",()=>Eo(this,Xs));wc(this,Jr,t),this.initialState=t,wc(this,Xs,Date.now()),this.emitLifecycle("init",{initialState:Eo(this,Jr)})}}Jr=new WeakMap,Xs=new WeakMap;class H7{constructor({config:t,api:n}){ie(this,"config");ie(this,"api");ie(this,"state");ie(this,"shouldCollectData",()=>{var n;return!!(!((n=this.state.get().contact)!=null&&n.token)&&this.config.collectUserData)});ie(this,"autoCreateUnverifiedUser",async()=>{var t,n,r,i;await this.createUnverifiedContact({name:((n=(t=this.config.user)==null?void 0:t.data)==null?void 0:n.name)||"Anonymous",email:(i=(r=this.config.user)==null?void 0:r.data)==null?void 0:i.email})});ie(this,"createUnverifiedContact",async t=>{try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:n}=await this.api.createUnverifiedContact(t);n!=null&&n.token?(this.api.setAuthToken(n.token),this.state.setPartial({contact:{token:n.token}})):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}});var r,i,a;this.config=t,this.api=n,this.state=new ms({contact:(r=t.user)!=null&&r.token?{token:(i=t.user)==null?void 0:i.token}:null,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),!((a=t.user)!=null&&a.token)&&!t.collectUserData&&this.autoCreateUnverifiedUser()}}class gC{constructor(){ie(this,"state",new ms({isPolling:!1,isError:!1}));ie(this,"abortController",new AbortController);ie(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});ie(this,"stopPolling",null);ie(this,"startPolling",(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(a){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",a),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}})}}const $t=[];for(let e=0;e<256;++e)$t.push((e+256).toString(16).slice(1));function z7(e,t=0){return($t[e[t+0]]+$t[e[t+1]]+$t[e[t+2]]+$t[e[t+3]]+"-"+$t[e[t+4]]+$t[e[t+5]]+"-"+$t[e[t+6]]+$t[e[t+7]]+"-"+$t[e[t+8]]+$t[e[t+9]]+"-"+$t[e[t+10]]+$t[e[t+11]]+$t[e[t+12]]+$t[e[t+13]]+$t[e[t+14]]+$t[e[t+15]]).toLowerCase()}let dy;const V7=new Uint8Array(16);function $7(){if(!dy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");dy=crypto.getRandomValues.bind(crypto)}return dy(V7)}const yC={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function vC(e,t,n){var i;if(yC.randomUUID&&!t&&!e)return yC.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??$7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,z7(r)}function Nf(){return vC()}class W7{constructor({config:t,api:n,contactCtx:r}){ie(this,"config");ie(this,"api");ie(this,"contactCtx");ie(this,"poller",new gC);ie(this,"sessionState",new ms({session:null,isCreatingSession:!1}));ie(this,"sessionsState",new ms({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));ie(this,"reset",async()=>{this.sessionState.reset(),this.poller.reset()});ie(this,"registerPolling",()=>{this.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{const{data:r}=await this.api.getSession({sessionId:t.id,abortSignal:n});r&&this.sessionState.setPartial({session:r})},1e3):this.poller.reset()})});ie(this,"registerInitialSessionsFetch",()=>{this.contactCtx.state.subscribe(async({contact:t})=>{t!=null&&t.token&&!this.sessionsState.get().didStartInitialFetch&&(this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.loadMoreSessions(),this.sessionsState.setPartial({isInitialFetchLoading:!1}))})});ie(this,"createSession",async()=>{var r,i;this.sessionState.setPartial({session:null,isCreatingSession:!0});const{data:t,error:n}=await this.api.createSession({customData:(r=this.config.user)!=null&&r.externalId?{external_id:(i=this.config.user)==null?void 0:i.externalId}:void 0});return t?(this.sessionState.setPartial({session:t,isCreatingSession:!1}),t):(console.error("Failed to create session:",n),null)});ie(this,"loadMoreSessions",async()=>{var n,r;if(this.sessionsState.get().isLastPage||!((n=this.contactCtx.state.get().contact)!=null&&n.token))return;const{data:t}=await this.api.getSessions({cursor:this.sessionsState.get().cursor,filters:(r=this.config.user)!=null&&r.externalId?{external_id:this.config.user.externalId}:{}});if(t){const a=[...this.sessionsState.get().data,...t.items].filter((o,s,u)=>s===u.findIndex(l=>o.id===l.id));this.sessionsState.setPartial({data:a,cursor:t.next||void 0,isLastPage:t.next===null})}});this.config=t,this.api=n,this.contactCtx=r,this.registerPolling(),this.registerInitialSessionsFetch()}}class gs{constructor({config:t,api:n,sessionCtx:r}){ie(this,"config");ie(this,"api");ie(this,"sessionCtx");ie(this,"poller",new gC);ie(this,"state",new ms({messages:[],isSendingMessage:!1,suggestedReplies:null,isInitialFetchLoading:!1}));ie(this,"sendMessageAbortController",new AbortController);ie(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset(),this.poller.reset()});ie(this,"registerPolling",()=>{this.sessionCtx.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{await this.fetchAndSetHistory(t.id,n)},1e3):this.poller.reset()})});ie(this,"sendMessage",async t=>{var i,a,o,s,u,l,c;this.sendMessageAbortController=new AbortController;const n=this.state.get().isSendingMessage,r=((i=this.sessionCtx.sessionState.get().session)==null?void 0:i.assignee.kind)==="ai";if(n&&r){console.warn("Cannot send messages while awaiting AI response");return}this.state.setPartial({suggestedReplies:null});try{this.state.setPartial({isSendingMessage:!0});const d=gs.toUserMessage(t.content,t.attachments||void 0),f=this.state.get().messages;if(this.state.setPartial({messages:[...f,d]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const p=(o=this.sessionCtx.sessionState.get().session)==null?void 0:o.id;if(!p)return;const{data:m}=await this.api.sendMessage({uuid:d.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:p,user:(s=this.config.user)==null?void 0:s.data,...t},this.sendMessageAbortController.signal);if(m!=null&&m.success){const g=gs.toBotMessage(m);if(g){const x=this.state.get().messages;if(!!x.some(w=>w.id===g.id))return;this.state.setPartial({messages:[...x,g]})}else(u=m.options)!=null&&u.value&&((l=m.options)==null?void 0:l.value.length)>0&&this.state.setPartial({suggestedReplies:m.options.value})}else{const g=gs.toErrorMessage(((c=m==null?void 0:m.error)==null?void 0:c.message)||"Unknown error occurred"),x=this.state.get().messages;this.state.setPartial({messages:[...x,g]})}}catch(d){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",d)}finally{this.state.setPartial({isSendingMessage:!1})}});ie(this,"fetchAndSetHistory",async(t,n)=>{var a;this.state.get().messages.length===0&&this.state.setPartial({isInitialFetchLoading:!0});const r=(a=this.state.get().messages.at(-1))==null?void 0:a.timestamp,{data:i}=await this.api.getSessionHistory({sessionId:t,lastMessageTimestamp:r,abortSignal:n});if(i&&i.length>0){const o=this.state.get().messages,s=i.map(gs.mapHistoryToMessage).filter(u=>!o.some(l=>l.id===u.id));this.state.setPartial({messages:[...o,...s]})}this.state.get().isInitialFetchLoading&&this.state.setPartial({isInitialFetchLoading:!1})});this.config=t,this.api=n,this.sessionCtx=r,this.registerPolling()}static mapHistoryToMessage(t){const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};return t.sender.kind==="user"?{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""}:t.sender.kind==="agent"?{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""}}:{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:t.sender.name||"",isAi:t.sender.kind==="ai",avatar:t.sender.avatar||null},data:{message:t.content.text}}}static toUserMessage(t,n){return{id:Nf(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}}static toBotMessage(t){if(t.success&&t.autopilotResponse)return{type:"FROM_BOT",id:t.autopilotResponse.id||Nf(),timestamp:new Date().toISOString(),component:"bot_message",data:{message:t.autopilotResponse.value.content}};if(t.success&&t.uiResponse){const n=t.uiResponse.value;return{type:"FROM_BOT",id:Nf(),timestamp:new Date().toISOString(),component:n.name,data:n.request_response}}return null}static toErrorMessage(t){return{type:"FROM_BOT",id:Nf(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error"}}}}class Y7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){ie(this,"state");ie(this,"contactCtx");ie(this,"sessionCtx");ie(this,"resetChat");ie(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});ie(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});ie(this,"toChatScreen",t=>{if(this.resetChat(),t){const n=this.sessionCtx.sessionsState.get().data.find(r=>r.id===t);if(!n)return;this.sessionCtx.sessionState.setPartial({session:n})}this.state.setPartial({screen:"chat"})});this.state=new ms({screen:t.shouldCollectData()?"welcome":"sessions"}),this.contactCtx=t,this.sessionCtx=n,this.resetChat=r,this.registerRoutingListener()}}class q7{constructor({config:t}){ie(this,"config");ie(this,"api");ie(this,"contactCtx");ie(this,"sessionCtx");ie(this,"messageCtx");ie(this,"routerCtx");ie(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});this.config=t,this.api=new B7({config:t}),this.contactCtx=new H7({api:this.api,config:this.config}),this.sessionCtx=new W7({config:this.config,api:this.api,contactCtx:this.contactCtx}),this.messageCtx=new gs({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.routerCtx=new Y7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}}const[zn,G7]=iB();function K7({options:e,children:t,components:n}){const r=v.useMemo(()=>new q7({config:e}),[e]),i=v.useMemo(()=>new rB({components:n}),[n]);return E.jsx(G7,{value:{widgetCtx:r,components:n,componentStore:i,version:yE},children:t})}function dl(){const{widgetCtx:e}=zn();return e.config}function fl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function X7(){const{widgetCtx:e}=zn();return{contactState:fl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function pl(){const{widgetCtx:e}=zn();return{messagesState:fl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function ys(){const{widgetCtx:e}=zn(),t=fl(e.sessionCtx.sessionState),n=fl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function wC(){var r;const{sessionState:e}=ys(),{messagesState:t}=pl();return{isAwaitingBotReply:(!((r=e.session)!=null&&r.isHandedOff)||e.session.assignee.kind==="ai"||e.isCreatingSession)&&t.isSendingMessage}}var bC={exports:{}},xC={};/**
333
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=no(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Af.assertOptions(r,{silentJSONParsing:Hr.transitional(Hr.boolean),forcedJSONParsing:Hr.transitional(Hr.boolean),clarifyTimeoutError:Hr.transitional(Hr.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:Af.assertOptions(i,{encode:Hr.function,serialize:Hr.function},!0)),Af.assertOptions(n,{baseUrl:Hr.spelling("baseURL"),withXsrfToken:Hr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&z.merge(a.common,a[n.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Tn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(u=u&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!u){const m=[uC.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=s.length;let p=n;for(d=0;d<f;){const m=s[d++],g=s[d++];try{p=m(p)}catch(x){g.call(this,x);break}}try{c=uC.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(t){t=no(this.defaults,t);const n=JS(t.baseURL,t.url);return $S(n,t.params,t.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(t){ro.prototype[t]=function(n,r){return this.request(no(r||{},{method:t,url:n,data:(r||{}).data}))}}),z.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(no(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}ro.prototype[t]=n(),ro.prototype[t+"Form"]=n(!0)});class ly{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new hs(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ly(function(i){t=i}),cancel:t}}}function C7(e){return function(n){return e.apply(null,n)}}function A7(e){return z.isObject(e)&&e.isAxiosError===!0}const cy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cy).forEach(([e,t])=>{cy[t]=e});function dC(e){const t=new ro(e),n=kS(ro.prototype.request,t);return z.extend(n,ro.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dC(no(e,i))},n}const At=dC(ll);At.Axios=ro,At.CanceledError=hs,At.CancelToken=ly,At.isCancel=KS,At.VERSION=lC,At.toFormData=xf,At.AxiosError=Se,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=C7,At.isAxiosError=A7,At.mergeConfig=no,At.AxiosHeaders=Tn,At.formToJSON=e=>qS(z.isHTMLForm(e)?new FormData(e):e),At.getAdapter=sC.getAdapter,At.HttpStatusCode=cy,At.default=At;const k7=/\{[^{}]+\}/g,R7=()=>{var e,t;return typeof process=="object"&&Number.parseInt((t=(e=process==null?void 0:process.versions)==null?void 0:e.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function N7(){return Math.random().toString(36).slice(2,11)}function P7(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,headers:o,requestInitExt:s=void 0,...u}={...e};s=R7()?s:void 0,t=mC(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:g=n,headers:x,params:y={},parseAs:w="json",querySerializer:b,bodySerializer:T=a??O7,body:S,..._}=f||{};p&&(t=mC(p));let N=typeof i=="function"?i:hC(i);b&&(N=typeof b=="function"?b:hC({...typeof i=="object"?i:{},...b}));const D=S===void 0?void 0:T(S),V=D===void 0||D instanceof FormData?{}:{"Content-Type":"application/json"},P={redirect:"follow",...u,..._,body:D,headers:L7(V,o,x,y.header)};let $,H,X=new n(D7(d,{baseUrl:t,params:y,querySerializer:N}),P);for(const re in _)re in X||(X[re]=_[re]);if(l.length){$=N7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:w,querySerializer:N,bodySerializer:T});for(const re of l)if(re&&typeof re=="object"&&typeof re.onRequest=="function"){const ee=await re.onRequest({request:X,schemaPath:d,params:y,options:H,id:$});if(ee){if(!(ee instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");X=ee}}}let Y;try{Y=await m(X,s)}catch(re){let ee=re;if(l.length)for(let F=l.length-1;F>=0;F--){const B=l[F];if(B&&typeof B=="object"&&typeof B.onError=="function"){const A=await B.onError({request:X,error:ee,schemaPath:d,params:y,options:H,id:$});if(A){if(A instanceof Response){ee=void 0,Y=A;break}if(A instanceof Error){ee=A;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(ee)throw ee}if(l.length)for(let re=l.length-1;re>=0;re--){const ee=l[re];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:y,options:H,id:$});if(F){if(!(F instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");Y=F}}}if(Y.status===204||Y.headers.get("Content-Length")==="0")return Y.ok?{data:void 0,response:Y}:{error:void 0,response:Y};if(Y.ok)return w==="stream"?{data:Y.body,response:Y}:{data:await Y[w](),response:Y};let ne=await Y.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:Y}}return{request(d,f,p){return c(f,{...p,method:d.toUpperCase()})},GET(d,f){return c(d,{...f,method:"GET"})},PUT(d,f){return c(d,{...f,method:"PUT"})},POST(d,f){return c(d,{...f,method:"POST"})},DELETE(d,f){return c(d,{...f,method:"DELETE"})},OPTIONS(d,f){return c(d,{...f,method:"OPTIONS"})},HEAD(d,f){return c(d,{...f,method:"HEAD"})},PATCH(d,f){return c(d,{...f,method:"PATCH"})},TRACE(d,f){return c(d,{...f,method:"TRACE"})},use(...d){for(const f of d)if(f){if(typeof f!="object"||!("onRequest"in f||"onResponse"in f||"onError"in f))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");l.push(f)}},eject(...d){for(const f of d){const p=l.indexOf(f);p!==-1&&l.splice(p,1)}}}}function kf(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${(n==null?void 0:n.allowReserved)===!0?t:encodeURIComponent(t)}`}function fC(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const s in t)r.push(s,n.allowReserved===!0?t[s]:encodeURIComponent(t[s]));const o=r.join(",");switch(n.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const s=n.style==="deepObject"?`${e}[${o}]`:o;r.push(kf(s,t[o],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function pC(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",o=(n.allowReserved===!0?t:t.map(s=>encodeURIComponent(s))).join(a);switch(n.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const a of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?a:encodeURIComponent(a)):i.push(kf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function hC(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const a=n[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;r.push(pC(i,a,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof a=="object"){r.push(fC(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(kf(i,a,e))}}return r.join("&")}}function I7(e,t){let n=e;for(const r of e.match(k7)??[]){let i=r.substring(1,r.length-1),a=!1,o="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(o="label",i=i.substring(1)):i.startsWith(";")&&(o="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const s=t[i];if(Array.isArray(s)){n=n.replace(r,pC(i,s,{style:o,explode:a}));continue}if(typeof s=="object"){n=n.replace(r,fC(i,s,{style:o,explode:a}));continue}if(o==="matrix"){n=n.replace(r,`;${kf(i,s)}`);continue}n=n.replace(r,o==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function O7(e){return e instanceof FormData?e:JSON.stringify(e)}function D7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=I7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function L7(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(const o of a)t.append(i,o);else a!==void 0&&t.set(i,a)}return t}function mC(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const M7=e=>{console.log(e.error)},F7=e=>{const t=P7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||M7};return t.use(n),t};class B7{constructor({config:t}){ie(this,"client");ie(this,"uploadFileClient");ie(this,"config");ie(this,"constructClientOptions",t=>{const n=this.config.apiUrl||"https://api.open.cx",r={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:t?`Bearer ${t}`:void 0};return{baseUrl:n,headers:r}});ie(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>F7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,a])=>{a&&r.headers.set(i,a)})}}));ie(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>At.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));ie(this,"setAuthToken",t=>{const{baseUrl:n,headers:r}=this.constructClientOptions(t);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})});ie(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));ie(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));ie(this,"getSessionHistory",async({sessionId:t,lastMessageTimestamp:n,abortSignal:r})=>{const i=n?{lastMessageTimestamp:n}:void 0;return await this.client.GET("/backend/widget/v2/session/history/{sessionId}",{params:{path:{sessionId:t},query:i},signal:r})});ie(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));ie(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));ie(this,"getSession",async({sessionId:t,abortSignal:n})=>await this.client.GET("/backend/widget/v2/session/{sessionId}",{params:{path:{sessionId:t}},signal:n}));ie(this,"getSessions",async({cursor:t,filters:n,abortSignal:r})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:t,filters:JSON.stringify(n)}},signal:r}));ie(this,"uploadFile",async(t,n={})=>{const r=new FormData;r.append("file",t.file);const{data:i}=await this.uploadFileClient.post("",r,{headers:{"Content-Type":"multipart/form-data"},...n});return i});ie(this,"vote",async t=>await this.client.POST("/backend/widget/v2/chat/vote",{body:t}));var i;this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r}),this.uploadFileClient=this.createAxiosUploadClient({baseUrl:n,headers:r})}}var Rf={exports:{}};Rf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",x="[object Number]",y="[object Null]",w="[object Object]",b="[object Promise]",T="[object Proxy]",S="[object RegExp]",_="[object Set]",N="[object String]",D="[object Symbol]",V="[object Undefined]",P="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",X="[object Float32Array]",Y="[object Float64Array]",ne="[object Int8Array]",re="[object Int16Array]",ee="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",A="[object Uint16Array]",ae="[object Uint32Array]",he=/[\\^$.*+?()[\]{}|]/g,O=/^\[object .+?Constructor\]$/,Pe=/^(?:0|[1-9]\d*)$/,ge={};ge[X]=ge[Y]=ge[ne]=ge[re]=ge[ee]=ge[F]=ge[B]=ge[A]=ge[ae]=!0,ge[s]=ge[u]=ge[$]=ge[c]=ge[H]=ge[d]=ge[f]=ge[p]=ge[g]=ge[x]=ge[w]=ge[S]=ge[_]=ge[N]=ge[P]=!1;var we=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,$e=typeof self=="object"&&self&&self.Object===Object&&self,Ve=we||$e||Function("return this")(),We=t&&!t.nodeType&&t,Ge=We&&!0&&e&&!e.nodeType&&e,_t=Ge&&Ge.exports===We,Te=_t&&we.process,xe=function(){try{return Te&&Te.binding&&Te.binding("util")}catch{}}(),Ye=xe&&xe.isTypedArray;function He(k,L){for(var W=-1,le=k==null?0:k.length,at=0,Re=[];++W<le;){var bt=k[W];L(bt,W,k)&&(Re[at++]=bt)}return Re}function vt(k,L){for(var W=-1,le=L.length,at=k.length;++W<le;)k[at+W]=L[W];return k}function wt(k,L){for(var W=-1,le=k==null?0:k.length;++W<le;)if(L(k[W],W,k))return!0;return!1}function Ke(k,L){for(var W=-1,le=Array(k);++W<k;)le[W]=L(W);return le}function Me(k){return function(L){return k(L)}}function It(k,L){return k.has(L)}function ka(k,L){return k==null?void 0:k[L]}function Ra(k){var L=-1,W=Array(k.size);return k.forEach(function(le,at){W[++L]=[at,le]}),W}function Na(k,L){return function(W){return k(L(W))}}function te(k){var L=-1,W=Array(k.size);return k.forEach(function(le){W[++L]=le}),W}var de=Array.prototype,j=Function.prototype,q=Object.prototype,ce=Ve["__core-js_shared__"],_e=j.toString,Ee=q.hasOwnProperty,Bt=function(){var k=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Pn=q.toString,mn=RegExp("^"+_e.call(Ee).replace(he,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gn=_t?Ve.Buffer:void 0,In=Ve.Symbol,Rt=Ve.Uint8Array,Kn=q.propertyIsEnumerable,gn=de.splice,Ai=In?In.toStringTag:void 0,WI=Object.getOwnPropertySymbols,Ere=Gn?Gn.isBuffer:void 0,Tre=Na(Object.keys,Object),zv=Qs(Ve,"DataView"),mc=Qs(Ve,"Map"),Vv=Qs(Ve,"Promise"),$v=Qs(Ve,"Set"),Wv=Qs(Ve,"WeakMap"),gc=Qs(Object,"create"),_re=bo(zv),Sre=bo(mc),Cre=bo(Vv),Are=bo($v),kre=bo(Wv),YI=In?In.prototype:void 0,Yv=YI?YI.valueOf:void 0;function vo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Rre(){this.__data__=gc?gc(null):{},this.size=0}function Nre(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function Pre(k){var L=this.__data__;if(gc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Ire(k){var L=this.__data__;return gc?L[k]!==void 0:Ee.call(L,k)}function Ore(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=gc&&L===void 0?r:L,this}vo.prototype.clear=Rre,vo.prototype.delete=Nre,vo.prototype.get=Pre,vo.prototype.has=Ire,vo.prototype.set=Ore;function ki(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function Dre(){this.__data__=[],this.size=0}function Lre(k){var L=this.__data__,W=sh(L,k);if(W<0)return!1;var le=L.length-1;return W==le?L.pop():gn.call(L,W,1),--this.size,!0}function Mre(k){var L=this.__data__,W=sh(L,k);return W<0?void 0:L[W][1]}function Fre(k){return sh(this.__data__,k)>-1}function Bre(k,L){var W=this.__data__,le=sh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}ki.prototype.clear=Dre,ki.prototype.delete=Lre,ki.prototype.get=Mre,ki.prototype.has=Fre,ki.prototype.set=Bre;function wo(k){var L=-1,W=k==null?0:k.length;for(this.clear();++L<W;){var le=k[L];this.set(le[0],le[1])}}function jre(){this.size=0,this.__data__={hash:new vo,map:new(mc||ki),string:new vo}}function Ure(k){var L=uh(this,k).delete(k);return this.size-=L?1:0,L}function Hre(k){return uh(this,k).get(k)}function zre(k){return uh(this,k).has(k)}function Vre(k,L){var W=uh(this,k),le=W.size;return W.set(k,L),this.size+=W.size==le?0:1,this}wo.prototype.clear=jre,wo.prototype.delete=Ure,wo.prototype.get=Hre,wo.prototype.has=zre,wo.prototype.set=Vre;function oh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new wo;++L<W;)this.add(k[L])}function $re(k){return this.__data__.set(k,r),this}function Wre(k){return this.__data__.has(k)}oh.prototype.add=oh.prototype.push=$re,oh.prototype.has=Wre;function Pa(k){var L=this.__data__=new ki(k);this.size=L.size}function Yre(){this.__data__=new ki,this.size=0}function qre(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function Gre(k){return this.__data__.get(k)}function Kre(k){return this.__data__.has(k)}function Xre(k,L){var W=this.__data__;if(W instanceof ki){var le=W.__data__;if(!mc||le.length<n-1)return le.push([k,L]),this.size=++W.size,this;W=this.__data__=new wo(le)}return W.set(k,L),this.size=W.size,this}Pa.prototype.clear=Yre,Pa.prototype.delete=qre,Pa.prototype.get=Gre,Pa.prototype.has=Kre,Pa.prototype.set=Xre;function Qre(k,L){var W=lh(k),le=!W&&fie(k),at=!W&&!le&&qv(k),Re=!W&&!le&&!at&&tO(k),bt=W||le||at||Re,jt=bt?Ke(k.length,String):[],Yt=jt.length;for(var gt in k)Ee.call(k,gt)&&!(bt&&(gt=="length"||at&&(gt=="offset"||gt=="parent")||Re&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||sie(gt,Yt)))&&jt.push(gt);return jt}function sh(k,L){for(var W=k.length;W--;)if(QI(k[W][0],L))return W;return-1}function Zre(k,L,W){var le=L(k);return lh(k)?le:vt(le,W(k))}function yc(k){return k==null?k===void 0?V:y:Ai&&Ai in Object(k)?aie(k):die(k)}function qI(k){return vc(k)&&yc(k)==s}function GI(k,L,W,le,at){return k===L?!0:k==null||L==null||!vc(k)&&!vc(L)?k!==k&&L!==L:Jre(k,L,W,le,GI,at)}function Jre(k,L,W,le,at,Re){var bt=lh(k),jt=lh(L),Yt=bt?u:Ia(k),gt=jt?u:Ia(L);Yt=Yt==s?w:Yt,gt=gt==s?w:gt;var Xn=Yt==w,Ir=gt==w,sn=Yt==gt;if(sn&&qv(k)){if(!qv(L))return!1;bt=!0,Xn=!1}if(sn&&!Xn)return Re||(Re=new Pa),bt||tO(k)?KI(k,L,W,le,at,Re):rie(k,L,Yt,W,le,at,Re);if(!(W&i)){var fr=Xn&&Ee.call(k,"__wrapped__"),pr=Ir&&Ee.call(L,"__wrapped__");if(fr||pr){var Oa=fr?k.value():k,Ri=pr?L.value():L;return Re||(Re=new Pa),at(Oa,Ri,W,le,Re)}}return sn?(Re||(Re=new Pa),iie(k,L,W,le,at,Re)):!1}function eie(k){if(!eO(k)||lie(k))return!1;var L=ZI(k)?mn:O;return L.test(bo(k))}function tie(k){return vc(k)&&JI(k.length)&&!!ge[yc(k)]}function nie(k){if(!cie(k))return Tre(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function KI(k,L,W,le,at,Re){var bt=W&i,jt=k.length,Yt=L.length;if(jt!=Yt&&!(bt&&Yt>jt))return!1;var gt=Re.get(k);if(gt&&Re.get(L))return gt==L;var Xn=-1,Ir=!0,sn=W&a?new oh:void 0;for(Re.set(k,L),Re.set(L,k);++Xn<jt;){var fr=k[Xn],pr=L[Xn];if(le)var Oa=bt?le(pr,fr,Xn,L,k,Re):le(fr,pr,Xn,k,L,Re);if(Oa!==void 0){if(Oa)continue;Ir=!1;break}if(sn){if(!wt(L,function(Ri,xo){if(!It(sn,xo)&&(fr===Ri||at(fr,Ri,W,le,Re)))return sn.push(xo)})){Ir=!1;break}}else if(!(fr===pr||at(fr,pr,W,le,Re))){Ir=!1;break}}return Re.delete(k),Re.delete(L),Ir}function rie(k,L,W,le,at,Re,bt){switch(W){case H:if(k.byteLength!=L.byteLength||k.byteOffset!=L.byteOffset)return!1;k=k.buffer,L=L.buffer;case $:return!(k.byteLength!=L.byteLength||!Re(new Rt(k),new Rt(L)));case c:case d:case x:return QI(+k,+L);case f:return k.name==L.name&&k.message==L.message;case S:case N:return k==L+"";case g:var jt=Ra;case _:var Yt=le&i;if(jt||(jt=te),k.size!=L.size&&!Yt)return!1;var gt=bt.get(k);if(gt)return gt==L;le|=a,bt.set(k,L);var Xn=KI(jt(k),jt(L),le,at,Re,bt);return bt.delete(k),Xn;case D:if(Yv)return Yv.call(k)==Yv.call(L)}return!1}function iie(k,L,W,le,at,Re){var bt=W&i,jt=XI(k),Yt=jt.length,gt=XI(L),Xn=gt.length;if(Yt!=Xn&&!bt)return!1;for(var Ir=Yt;Ir--;){var sn=jt[Ir];if(!(bt?sn in L:Ee.call(L,sn)))return!1}var fr=Re.get(k);if(fr&&Re.get(L))return fr==L;var pr=!0;Re.set(k,L),Re.set(L,k);for(var Oa=bt;++Ir<Yt;){sn=jt[Ir];var Ri=k[sn],xo=L[sn];if(le)var nO=bt?le(xo,Ri,sn,L,k,Re):le(Ri,xo,sn,k,L,Re);if(!(nO===void 0?Ri===xo||at(Ri,xo,W,le,Re):nO)){pr=!1;break}Oa||(Oa=sn=="constructor")}if(pr&&!Oa){var ch=k.constructor,dh=L.constructor;ch!=dh&&"constructor"in k&&"constructor"in L&&!(typeof ch=="function"&&ch instanceof ch&&typeof dh=="function"&&dh instanceof dh)&&(pr=!1)}return Re.delete(k),Re.delete(L),pr}function XI(k){return Zre(k,mie,oie)}function uh(k,L){var W=k.__data__;return uie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Qs(k,L){var W=ka(k,L);return eie(W)?W:void 0}function aie(k){var L=Ee.call(k,Ai),W=k[Ai];try{k[Ai]=void 0;var le=!0}catch{}var at=Pn.call(k);return le&&(L?k[Ai]=W:delete k[Ai]),at}var oie=WI?function(k){return k==null?[]:(k=Object(k),He(WI(k),function(L){return Kn.call(k,L)}))}:gie,Ia=yc;(zv&&Ia(new zv(new ArrayBuffer(1)))!=H||mc&&Ia(new mc)!=g||Vv&&Ia(Vv.resolve())!=b||$v&&Ia(new $v)!=_||Wv&&Ia(new Wv)!=P)&&(Ia=function(k){var L=yc(k),W=L==w?k.constructor:void 0,le=W?bo(W):"";if(le)switch(le){case _re:return H;case Sre:return g;case Cre:return b;case Are:return _;case kre:return P}return L});function sie(k,L){return L=L??o,!!L&&(typeof k=="number"||Pe.test(k))&&k>-1&&k%1==0&&k<L}function uie(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function lie(k){return!!Bt&&Bt in k}function cie(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function die(k){return Pn.call(k)}function bo(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function QI(k,L){return k===L||k!==k&&L!==L}var fie=qI(function(){return arguments}())?qI:function(k){return vc(k)&&Ee.call(k,"callee")&&!Kn.call(k,"callee")},lh=Array.isArray;function pie(k){return k!=null&&JI(k.length)&&!ZI(k)}var qv=Ere||yie;function hie(k,L){return GI(k,L)}function ZI(k){if(!eO(k))return!1;var L=yc(k);return L==p||L==m||L==l||L==T}function JI(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function eO(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function vc(k){return k!=null&&typeof k=="object"}var tO=Ye?Me(Ye):tie;function mie(k){return pie(k)?Qre(k):nie(k)}function gie(){return[]}function yie(){return!1}e.exports=hie}(Rf,Rf.exports);var j7=Rf.exports;const U7=St(j7);class ms{constructor(t){ie(this,"subscribers",new Set);Gv(this,Jr);ie(this,"initialState");Gv(this,Xs);ie(this,"lifecycleListeners",new Map);ie(this,"emitLifecycle",(t,n)=>{const r=this.lifecycleListeners.get(t);if(r){const i={type:t,timestamp:Date.now(),data:n};r.forEach(a=>{try{a(i)}catch{}})}});ie(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){this.emitLifecycle("error",{error:i})}})});ie(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));ie(this,"onLifecycle",(t,n)=>{this.lifecycleListeners.has(t)||this.lifecycleListeners.set(t,new Set);const r=this.lifecycleListeners.get(t);return r.add(n),()=>{r.delete(n),r.size===0&&this.lifecycleListeners.delete(t)}});ie(this,"get",()=>Eo(this,Jr));ie(this,"set",t=>{this.emitLifecycle("beforeUpdate",{previousState:Eo(this,Jr),nextState:t}),U7(Eo(this,Jr),t)||(wc(this,Jr,t),wc(this,Xs,Date.now()),this.emitLifecycle("stateChange",{state:t}),this.notifySubscribers(t)),this.emitLifecycle("afterUpdate",{state:t})});ie(this,"setPartial",t=>{if(t==null)return;const n={...Eo(this,Jr),...t};this.set(n)});ie(this,"clear",()=>{this.emitLifecycle("destroy"),this.subscribers=new Set,this.lifecycleListeners=new Map});ie(this,"reset",()=>{this.set(this.initialState)});ie(this,"lastUpdated",()=>Eo(this,Xs));wc(this,Jr,t),this.initialState=t,wc(this,Xs,Date.now()),this.emitLifecycle("init",{initialState:Eo(this,Jr)})}}Jr=new WeakMap,Xs=new WeakMap;class H7{constructor({config:t,api:n}){ie(this,"config");ie(this,"api");ie(this,"state");ie(this,"shouldCollectData",()=>{var n;return!!(!((n=this.state.get().contact)!=null&&n.token)&&this.config.collectUserData)});ie(this,"autoCreateUnverifiedUser",async()=>{var t,n,r,i;await this.createUnverifiedContact({name:((n=(t=this.config.user)==null?void 0:t.data)==null?void 0:n.name)||"Anonymous",email:(i=(r=this.config.user)==null?void 0:r.data)==null?void 0:i.email})});ie(this,"createUnverifiedContact",async t=>{try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:n}=await this.api.createUnverifiedContact(t);n!=null&&n.token?(this.api.setAuthToken(n.token),this.state.setPartial({contact:{token:n.token}})):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}});var r,i,a;this.config=t,this.api=n,this.state=new ms({contact:(r=t.user)!=null&&r.token?{token:(i=t.user)==null?void 0:i.token}:null,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),!((a=t.user)!=null&&a.token)&&!t.collectUserData&&this.autoCreateUnverifiedUser()}}class gC{constructor(){ie(this,"state",new ms({isPolling:!1,isError:!1}));ie(this,"abortController",new AbortController);ie(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});ie(this,"stopPolling",null);ie(this,"startPolling",(t,n)=>{if(this.stopPolling)return;const r=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(a){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",a),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}})}}const $t=[];for(let e=0;e<256;++e)$t.push((e+256).toString(16).slice(1));function z7(e,t=0){return($t[e[t+0]]+$t[e[t+1]]+$t[e[t+2]]+$t[e[t+3]]+"-"+$t[e[t+4]]+$t[e[t+5]]+"-"+$t[e[t+6]]+$t[e[t+7]]+"-"+$t[e[t+8]]+$t[e[t+9]]+"-"+$t[e[t+10]]+$t[e[t+11]]+$t[e[t+12]]+$t[e[t+13]]+$t[e[t+14]]+$t[e[t+15]]).toLowerCase()}let dy;const V7=new Uint8Array(16);function $7(){if(!dy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");dy=crypto.getRandomValues.bind(crypto)}return dy(V7)}const yC={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function vC(e,t,n){var i;if(yC.randomUUID&&!t&&!e)return yC.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??$7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,z7(r)}function Nf(){return vC()}class W7{constructor({config:t,api:n,contactCtx:r}){ie(this,"config");ie(this,"api");ie(this,"contactCtx");ie(this,"poller",new gC);ie(this,"sessionState",new ms({session:null,isCreatingSession:!1}));ie(this,"sessionsState",new ms({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));ie(this,"reset",async()=>{this.sessionState.reset(),this.poller.reset()});ie(this,"registerPolling",()=>{this.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{const{data:r}=await this.api.getSession({sessionId:t.id,abortSignal:n});r&&this.sessionState.setPartial({session:r})},1e3):this.poller.reset()})});ie(this,"registerInitialSessionsFetch",()=>{this.contactCtx.state.subscribe(async({contact:t})=>{t!=null&&t.token&&!this.sessionsState.get().didStartInitialFetch&&(this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.loadMoreSessions(),this.sessionsState.setPartial({isInitialFetchLoading:!1}))})});ie(this,"createSession",async()=>{var r,i;this.sessionState.setPartial({session:null,isCreatingSession:!0});const{data:t,error:n}=await this.api.createSession({customData:(r=this.config.user)!=null&&r.externalId?{external_id:(i=this.config.user)==null?void 0:i.externalId}:void 0});return t?(this.sessionState.setPartial({session:t,isCreatingSession:!1}),t):(console.error("Failed to create session:",n),null)});ie(this,"loadMoreSessions",async()=>{var n,r;if(this.sessionsState.get().isLastPage||!((n=this.contactCtx.state.get().contact)!=null&&n.token))return;const{data:t}=await this.api.getSessions({cursor:this.sessionsState.get().cursor,filters:(r=this.config.user)!=null&&r.externalId?{external_id:this.config.user.externalId}:{}});if(t){const a=[...this.sessionsState.get().data,...t.items].filter((o,s,u)=>s===u.findIndex(l=>o.id===l.id));this.sessionsState.setPartial({data:a,cursor:t.next||void 0,isLastPage:t.next===null})}});this.config=t,this.api=n,this.contactCtx=r,this.registerPolling(),this.registerInitialSessionsFetch()}}class gs{constructor({config:t,api:n,sessionCtx:r}){ie(this,"config");ie(this,"api");ie(this,"sessionCtx");ie(this,"poller",new gC);ie(this,"state",new ms({messages:[],isSendingMessage:!1,suggestedReplies:null,isInitialFetchLoading:!1}));ie(this,"sendMessageAbortController",new AbortController);ie(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset(),this.poller.reset()});ie(this,"registerPolling",()=>{this.sessionCtx.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.poller.startPolling(async n=>{await this.fetchAndSetHistory(t.id,n)},1e3):this.poller.reset()})});ie(this,"sendMessage",async t=>{var i,a,o,s,u,l,c;this.sendMessageAbortController=new AbortController;const n=this.state.get().isSendingMessage,r=((i=this.sessionCtx.sessionState.get().session)==null?void 0:i.assignee.kind)==="ai";if(n&&r){console.warn("Cannot send messages while awaiting AI response");return}this.state.setPartial({suggestedReplies:null});try{this.state.setPartial({isSendingMessage:!0});const d=gs.toUserMessage(t.content,t.attachments||void 0),f=this.state.get().messages;if(this.state.setPartial({messages:[...f,d]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const p=(o=this.sessionCtx.sessionState.get().session)==null?void 0:o.id;if(!p)return;const{data:m}=await this.api.sendMessage({uuid:d.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:p,user:(s=this.config.user)==null?void 0:s.data,...t},this.sendMessageAbortController.signal);if(m!=null&&m.success){const g=gs.toBotMessage(m);if(g){const x=this.state.get().messages;if(!!x.some(w=>w.id===g.id))return;this.state.setPartial({messages:[...x,g]})}else(u=m.options)!=null&&u.value&&((l=m.options)==null?void 0:l.value.length)>0&&this.state.setPartial({suggestedReplies:m.options.value})}else{const g=gs.toErrorMessage(((c=m==null?void 0:m.error)==null?void 0:c.message)||"Unknown error occurred"),x=this.state.get().messages;this.state.setPartial({messages:[...x,g]})}}catch(d){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",d)}finally{this.state.setPartial({isSendingMessage:!1})}});ie(this,"fetchAndSetHistory",async(t,n)=>{var a;this.state.get().messages.length===0&&this.state.setPartial({isInitialFetchLoading:!0});const r=(a=this.state.get().messages.at(-1))==null?void 0:a.timestamp,{data:i}=await this.api.getSessionHistory({sessionId:t,lastMessageTimestamp:r,abortSignal:n});if(i&&i.length>0){const o=this.state.get().messages,s=i.map(gs.mapHistoryToMessage).filter(u=>!o.some(l=>l.id===u.id));this.state.setPartial({messages:[...o,...s]})}this.state.get().isInitialFetchLoading&&this.state.setPartial({isInitialFetchLoading:!1})});this.config=t,this.api=n,this.sessionCtx=r,this.registerPolling()}static mapHistoryToMessage(t){const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};return t.sender.kind==="user"?{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""}:t.sender.kind==="agent"?{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""}}:{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:t.sender.name||"",isAi:t.sender.kind==="ai",avatar:t.sender.avatar||null},data:{message:t.content.text}}}static toUserMessage(t,n){return{id:Nf(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}}static toBotMessage(t){if(t.success&&t.autopilotResponse)return{type:"FROM_BOT",id:t.autopilotResponse.id||Nf(),timestamp:new Date().toISOString(),component:"bot_message",data:{message:t.autopilotResponse.value.content}};if(t.success&&t.uiResponse){const n=t.uiResponse.value;return{type:"FROM_BOT",id:Nf(),timestamp:new Date().toISOString(),component:n.name,data:n.request_response}}return null}static toErrorMessage(t){return{type:"FROM_BOT",id:Nf(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error"}}}}class Y7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){ie(this,"state");ie(this,"contactCtx");ie(this,"sessionCtx");ie(this,"resetChat");ie(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});ie(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});ie(this,"toChatScreen",t=>{if(this.resetChat(),t){const n=this.sessionCtx.sessionsState.get().data.find(r=>r.id===t);if(!n)return;this.sessionCtx.sessionState.setPartial({session:n})}this.state.setPartial({screen:"chat"})});this.state=new ms({screen:t.shouldCollectData()?"welcome":"sessions"}),this.contactCtx=t,this.sessionCtx=n,this.resetChat=r,this.registerRoutingListener()}}class q7{constructor({config:t}){ie(this,"config");ie(this,"api");ie(this,"contactCtx");ie(this,"sessionCtx");ie(this,"messageCtx");ie(this,"routerCtx");ie(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});this.config=t,this.api=new B7({config:t}),this.contactCtx=new H7({api:this.api,config:this.config}),this.sessionCtx=new W7({config:this.config,api:this.api,contactCtx:this.contactCtx}),this.messageCtx=new gs({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.routerCtx=new Y7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}}const[zn,G7]=iB();function K7({options:e,children:t,components:n}){const r=v.useRef(new q7({config:e})).current,i=v.useMemo(()=>new rB({components:n}),[n]);return E.jsx(G7,{value:{widgetCtx:r,components:n,componentStore:i,version:yE},children:t})}function dl(){const{widgetCtx:e}=zn();return e.config}function fl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function X7(){const{widgetCtx:e}=zn();return{contactState:fl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function pl(){const{widgetCtx:e}=zn();return{messagesState:fl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function ys(){const{widgetCtx:e}=zn(),t=fl(e.sessionCtx.sessionState),n=fl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function wC(){var r;const{sessionState:e}=ys(),{messagesState:t}=pl();return{isAwaitingBotReply:(!((r=e.session)!=null&&r.isHandedOff)||e.session.assignee.kind==="ai"||e.isCreatingSession)&&t.isSendingMessage}}var bC={exports:{}},xC={};/**
334
334
  * @license React
335
335
  * use-sync-external-store-shim.production.min.js
336
336
  *