@opencx/widget 3.0.22 → 3.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/designs.cjs +1 -1
- package/dist/designs.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{useUploadFiles-Cbm6WNX4.js → useUploadFiles-Cb9pBhCh.js} +3 -3
- package/dist/useUploadFiles-Cb9pBhCh.js.map +1 -0
- package/dist/{useUploadFiles-DjwPSDk8.cjs → useUploadFiles-DnpM8Art.cjs} +3 -3
- package/dist/useUploadFiles-DnpM8Art.cjs.map +1 -0
- package/dist-embed/script.js +2 -2
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/useUploadFiles-Cbm6WNX4.js.map +0 -1
- package/dist/useUploadFiles-DjwPSDk8.cjs.map +0 -1
package/dist-embed/script.js
CHANGED
|
@@ -37,7 +37,7 @@ var bie=Object.defineProperty;var sO=lt=>{throw TypeError(lt)};var xie=(lt,Qe,Ct
|
|
|
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:"")?ru(e):""}function FO(e){switch(e.tag){case 5:return ru(e.type);case 16:return ru("Lazy");case 13:return ru("Suspense");case 19:return ru("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 yw:return(e.displayName||"Context")+".Consumer";case gw: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 Pi:t=e._payload,e=e._init;try{return Nh(e(t))}catch{}}return null}function BO(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 Ii(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jO(e){var t=bw(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 Ac(e){e._valueTracker||(e._valueTracker=jO(e))}function xw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function kc(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 Ew(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ii(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 Tw(e,t){t=t.checked,t!=null&&bh(e,"checked",t,!1)}function Ih(e,t){Tw(e,t);var n=Ii(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,Ii(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _w(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"||kc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var iu=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=""+Ii(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 Sw(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(iu(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ii(n)}}function Cw(e,t){var n=Ii(t.value),r=Ii(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 Aw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kw(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"?kw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Rc,Rw=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(Rc=Rc||document.createElement("div"),Rc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Rc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function au(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ou={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},UO=["Webkit","ms","Moz","O"];Object.keys(ou).forEach(function(e){UO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ou[t]=ou[e]})});function Nw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ou.hasOwnProperty(e)&&ou[e]?(""+t).trim():t+"px"}function Pw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Nw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var HO=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(HO[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 Iw(e){if(e=ku(e)){if(typeof Uh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=Zc(t),Uh(e.stateNode,e.type,t))}}function Ow(e){ko?Ro?Ro.push(e):Ro=[e]:ko=e}function Dw(){if(ko){var e=ko,t=Ro;if(Ro=ko=null,Iw(e),t)for(e=0;e<t.length;e++)Iw(t[e])}}function Lw(e,t){return e(t)}function Mw(){}var Hh=!1;function Fw(e,t,n){if(Hh)return e(t,n);Hh=!0;try{return Lw(e,t,n)}finally{Hh=!1,(ko!==null||Ro!==null)&&(Mw(),Dw())}}function su(e,t){var n=e.stateNode;if(n===null)return null;var r=Zc(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(ti)try{var uu={};Object.defineProperty(uu,"passive",{get:function(){zh=!0}}),window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch{zh=!1}function zO(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 lu=!1,Nc=null,Pc=!1,Vh=null,VO={onError:function(e){lu=!0,Nc=e}};function $O(e,t,n,r,i,a,o,s,u){lu=!1,Nc=null,zO.apply(VO,arguments)}function WO(e,t,n,r,i,a,o,s,u){if($O.apply(this,arguments),lu){if(lu){var l=Nc;lu=!1,Nc=null}else throw Error(Q(198));Pc||(Pc=!0,Vh=l)}}function Ma(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 Bw(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 jw(e){if(Ma(e)!==e)throw Error(Q(188))}function YO(e){var t=e.alternate;if(!t){if(t=Ma(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 jw(i),e;if(a===r)return jw(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 Uw(e){return e=YO(e),e!==null?Hw(e):null}function Hw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Hw(e);if(t!==null)return t;e=e.sibling}return null}var zw=Dn.unstable_scheduleCallback,Vw=Dn.unstable_cancelCallback,qO=Dn.unstable_shouldYield,GO=Dn.unstable_requestPaint,Et=Dn.unstable_now,KO=Dn.unstable_getCurrentPriorityLevel,$h=Dn.unstable_ImmediatePriority,$w=Dn.unstable_UserBlockingPriority,Ic=Dn.unstable_NormalPriority,XO=Dn.unstable_LowPriority,Ww=Dn.unstable_IdlePriority,Oc=null,Dr=null;function QO(e){if(Dr&&typeof Dr.onCommitFiberRoot=="function")try{Dr.onCommitFiberRoot(Oc,e,void 0,(e.current.flags&128)===128)}catch{}}var mr=Math.clz32?Math.clz32:eD,ZO=Math.log,JO=Math.LN2;function eD(e){return e>>>=0,e===0?32:31-(ZO(e)/JO|0)|0}var Dc=64,Lc=4194304;function cu(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 Mc(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=cu(s):(a&=o,a!==0&&(r=cu(a)))}else o=n&~i,o!==0?r=cu(o):a!==0&&(r=cu(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-mr(t),i=1<<n,r|=e[n],t&=~i;return r}function tD(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 nD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-mr(a),s=1<<o,u=i[o];u===-1?(!(s&n)||s&r)&&(i[o]=tD(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 Yw(){var e=Dc;return Dc<<=1,!(Dc&4194240)&&(Dc=64),e}function Yh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function du(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mr(t),e[t]=n}function rD(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-mr(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-mr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qe=0;function qw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Gw,Gh,Kw,Xw,Qw,Kh=!1,Fc=[],Oi=null,Di=null,Li=null,fu=new Map,pu=new Map,Mi=[],iD="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 Zw(e,t){switch(e){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":fu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(t.pointerId)}}function hu(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=ku(t),t!==null&&Gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function aD(e,t,n,r,i){switch(t){case"focusin":return Oi=hu(Oi,e,t,n,r,i),!0;case"dragenter":return Di=hu(Di,e,t,n,r,i),!0;case"mouseover":return Li=hu(Li,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return fu.set(a,hu(fu.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,pu.set(a,hu(pu.get(a)||null,e,t,n,r,i)),!0}return!1}function Jw(e){var t=Fa(e.target);if(t!==null){var n=Ma(t);if(n!==null){if(t=n.tag,t===13){if(t=Bw(n),t!==null){e.blockedOn=t,Qw(e.priority,function(){Kw(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 Bc(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=ku(n),t!==null&&Gh(t),e.blockedOn=n,!1;t.shift()}return!0}function eb(e,t,n){Bc(e)&&n.delete(t)}function oD(){Kh=!1,Oi!==null&&Bc(Oi)&&(Oi=null),Di!==null&&Bc(Di)&&(Di=null),Li!==null&&Bc(Li)&&(Li=null),fu.forEach(eb),pu.forEach(eb)}function mu(e,t){e.blockedOn===t&&(e.blockedOn=null,Kh||(Kh=!0,Dn.unstable_scheduleCallback(Dn.unstable_NormalPriority,oD)))}function gu(e){function t(i){return mu(i,e)}if(0<Fc.length){mu(Fc[0],e);for(var n=1;n<Fc.length;n++){var r=Fc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Oi!==null&&mu(Oi,e),Di!==null&&mu(Di,e),Li!==null&&mu(Li,e),fu.forEach(t),pu.forEach(t),n=0;n<Mi.length;n++)r=Mi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mi.length&&(n=Mi[0],n.blockedOn===null);)Jw(n),n.blockedOn===null&&Mi.shift()}var No=ni.ReactCurrentBatchConfig,jc=!0;function sD(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 uD(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(jc){var i=Qh(e,t,n,r);if(i===null)hm(e,t,r,Uc,n),Zw(e,r);else if(aD(i,e,t,n,r))r.stopPropagation();else if(Zw(e,r),t&4&&-1<iD.indexOf(e)){for(;i!==null;){var a=ku(i);if(a!==null&&Gw(a),a=Qh(e,t,n,r),a===null&&hm(e,t,r,Uc,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else hm(e,t,r,null,n)}}var Uc=null;function Qh(e,t,n,r){if(Uc=null,e=jh(r),e=Fa(e),e!==null)if(t=Ma(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Bw(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 Uc=e,null}function tb(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(KO()){case $h:return 1;case $w:return 4;case Ic:case XO:return 16;case Ww:return 536870912;default:return 16}default:return 16}}var Fi=null,Zh=null,Hc=null;function nb(){if(Hc)return Hc;var e,t=Zh,n=t.length,r,i="value"in Fi?Fi.value:Fi.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 Hc=i.slice(e,1<r?1-r:void 0)}function zc(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 Vc(){return!0}function rb(){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)?Vc:rb,this.isPropagationStopped=rb,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=Vc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Vc)},persist:function(){},isPersistent:Vc}),t}var Po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jh=Ln(Po),yu=ct({},Po,{view:0,detail:0}),lD=Ln(yu),em,tm,vu,$c=ct({},yu,{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!==vu&&(vu&&e.type==="mousemove"?(em=e.screenX-vu.screenX,tm=e.screenY-vu.screenY):tm=em=0,vu=e),em)},movementY:function(e){return"movementY"in e?e.movementY:tm}}),ib=Ln($c),cD=ct({},$c,{dataTransfer:0}),dD=Ln(cD),fD=ct({},yu,{relatedTarget:0}),nm=Ln(fD),pD=ct({},Po,{animationName:0,elapsedTime:0,pseudoElement:0}),hD=Ln(pD),mD=ct({},Po,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gD=Ln(mD),yD=ct({},Po,{data:0}),ab=Ln(yD),vD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wD={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"},bD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bD[e])?!!t[e]:!1}function rm(){return xD}var ED=ct({},yu,{key:function(e){if(e.key){var t=vD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wD[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"?zc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TD=Ln(ED),_D=ct({},$c,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ob=Ln(_D),SD=ct({},yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rm}),CD=Ln(SD),AD=ct({},Po,{propertyName:0,elapsedTime:0,pseudoElement:0}),kD=Ln(AD),RD=ct({},$c,{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}),ND=Ln(RD),PD=[9,13,27,32],im=ti&&"CompositionEvent"in window,wu=null;ti&&"documentMode"in document&&(wu=document.documentMode);var ID=ti&&"TextEvent"in window&&!wu,sb=ti&&(!im||wu&&8<wu&&11>=wu),ub=" ",lb=!1;function cb(e,t){switch(e){case"keyup":return PD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function db(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Io=!1;function OD(e,t){switch(e){case"compositionend":return db(t);case"keypress":return t.which!==32?null:(lb=!0,ub);case"textInput":return e=t.data,e===ub&&lb?null:e;default:return null}}function DD(e,t){if(Io)return e==="compositionend"||!im&&cb(e,t)?(e=nb(),Hc=Zh=Fi=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 sb&&t.locale!=="ko"?null:t.data;default:return null}}var LD={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 fb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!LD[e.type]:t==="textarea"}function pb(e,t,n,r){Ow(r),t=Kc(t,"onChange"),0<t.length&&(n=new Jh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bu=null,xu=null;function MD(e){Pb(e,0)}function Wc(e){var t=Fo(e);if(xw(t))return e}function FD(e,t){if(e==="change")return t}var hb=!1;if(ti){var am;if(ti){var om="oninput"in document;if(!om){var mb=document.createElement("div");mb.setAttribute("oninput","return;"),om=typeof mb.oninput=="function"}am=om}else am=!1;hb=am&&(!document.documentMode||9<document.documentMode)}function gb(){bu&&(bu.detachEvent("onpropertychange",yb),xu=bu=null)}function yb(e){if(e.propertyName==="value"&&Wc(xu)){var t=[];pb(t,xu,e,jh(e)),Fw(MD,t)}}function BD(e,t,n){e==="focusin"?(gb(),bu=t,xu=n,bu.attachEvent("onpropertychange",yb)):e==="focusout"&&gb()}function jD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wc(xu)}function UD(e,t){if(e==="click")return Wc(t)}function HD(e,t){if(e==="input"||e==="change")return Wc(t)}function zD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gr=typeof Object.is=="function"?Object.is:zD;function Eu(e,t){if(gr(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)||!gr(e[i],t[i]))return!1}return!0}function vb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wb(e,t){var n=vb(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=vb(n)}}function bb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xb(){for(var e=window,t=kc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kc(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 VD(e){var t=xb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bb(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=wb(n,a);var o=wb(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 $D=ti&&"documentMode"in document&&11>=document.documentMode,Oo=null,um=null,Tu=null,lm=!1;function Eb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lm||Oo==null||Oo!==kc(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}),Tu&&Eu(Tu,r)||(Tu=r,r=Kc(um,"onSelect"),0<r.length&&(t=new Jh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oo)))}function Yc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Do={animationend:Yc("Animation","AnimationEnd"),animationiteration:Yc("Animation","AnimationIteration"),animationstart:Yc("Animation","AnimationStart"),transitionend:Yc("Transition","TransitionEnd")},cm={},Tb={};ti&&(Tb=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 qc(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 Tb)return cm[e]=t[n];return e}var _b=qc("animationend"),Sb=qc("animationiteration"),Cb=qc("animationstart"),Ab=qc("transitionend"),kb=new Map,Rb="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 Bi(e,t){kb.set(e,t),La(t,[e])}for(var dm=0;dm<Rb.length;dm++){var fm=Rb[dm],WD=fm.toLowerCase(),YD=fm[0].toUpperCase()+fm.slice(1);Bi(WD,"on"+YD)}Bi(_b,"onAnimationEnd"),Bi(Sb,"onAnimationIteration"),Bi(Cb,"onAnimationStart"),Bi("dblclick","onDoubleClick"),Bi("focusin","onFocus"),Bi("focusout","onBlur"),Bi(Ab,"onTransitionEnd"),_o("onMouseEnter",["mouseout","mouseover"]),_o("onMouseLeave",["mouseout","mouseover"]),_o("onPointerEnter",["pointerout","pointerover"]),_o("onPointerLeave",["pointerout","pointerover"]),La("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),La("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),La("onBeforeInput",["compositionend","keypress","textInput","paste"]),La("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="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(" "),qD=new Set("cancel close invalid load scroll toggle".split(" ").concat(_u));function Nb(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,WO(r,t,void 0,e),e.currentTarget=null}function Pb(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;Nb(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;Nb(i,s,l),a=u}}}if(Pc)throw e=Vh,Pc=!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)||(Ib(t,e,2,!1),n.add(r))}function pm(e,t,n){var r=0;t&&(r|=4),Ib(n,e,r,t)}var Gc="_reactListening"+Math.random().toString(36).slice(2);function Su(e){if(!e[Gc]){e[Gc]=!0,pw.forEach(function(n){n!=="selectionchange"&&(qD.has(n)||pm(n,!1,e),pm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gc]||(t[Gc]=!0,pm("selectionchange",!1,t))}}function Ib(e,t,n,r){switch(tb(t)){case 1:var i=sD;break;case 4:i=uD;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=Fa(s),o===null)return;if(u=o.tag,u===5||u===6){r=a=o;continue e}s=s.parentNode}}r=r.return}Fw(function(){var l=a,c=jh(n),d=[];e:{var f=kb.get(e);if(f!==void 0){var p=Jh,m=e;switch(e){case"keypress":if(zc(n)===0)break e;case"keydown":case"keyup":p=TD;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=ib;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=dD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=CD;break;case _b:case Sb:case Cb:p=hD;break;case Ab:p=kD;break;case"scroll":p=lD;break;case"wheel":p=ND;break;case"copy":case"cut":case"paste":p=gD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=ob}var y=(t&4)!==0,b=!y&&e==="scroll",g=y?f!==null?f+"Capture":null:f;y=[];for(var w=l,x;w!==null;){x=w;var T=x.stateNode;if(x.tag===5&&T!==null&&(x=T,g!==null&&(T=su(w,g),T!=null&&y.push(Cu(w,T,x)))),b)break;w=w.return}0<y.length&&(f=new p(f,m,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Bh&&(m=n.relatedTarget||n.fromElement)&&(Fa(m)||m[ri]))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?Fa(m):null,m!==null&&(b=Ma(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=l),p!==m)){if(y=ib,T="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(y=ob,T="onPointerLeave",g="onPointerEnter",w="pointer"),b=p==null?f:Fo(p),x=m==null?f:Fo(m),f=new y(T,w+"leave",p,n,c),f.target=b,f.relatedTarget=x,T=null,Fa(c)===l&&(y=new y(g,w+"enter",m,n,c),y.target=x,y.relatedTarget=b,T=y),b=T,p&&m)t:{for(y=p,g=m,w=0,x=y;x;x=Lo(x))w++;for(x=0,T=g;T;T=Lo(T))x++;for(;0<w-x;)y=Lo(y),w--;for(;0<x-w;)g=Lo(g),x--;for(;w--;){if(y===g||g!==null&&y===g.alternate)break t;y=Lo(y),g=Lo(g)}y=null}else y=null;p!==null&&Ob(d,f,p,y,!1),m!==null&&b!==null&&Ob(d,b,m,y,!0)}}e:{if(f=l?Fo(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=FD;else if(fb(f))if(hb)S=HD;else{S=jD;var _=BD}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=UD);if(S&&(S=S(e,l))){pb(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":(fb(_)||_.contentEditable==="true")&&(Oo=_,um=l,Tu=null);break;case"focusout":Tu=um=Oo=null;break;case"mousedown":lm=!0;break;case"contextmenu":case"mouseup":case"dragend":lm=!1,Eb(d,n,c);break;case"selectionchange":if($D)break;case"keydown":case"keyup":Eb(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?cb(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(sb&&n.locale!=="ko"&&(Io||D!=="onCompositionStart"?D==="onCompositionEnd"&&Io&&(N=nb()):(Fi=c,Zh="value"in Fi?Fi.value:Fi.textContent,Io=!0)),_=Kc(l,D),0<_.length&&(D=new ab(D,e,null,n,c),d.push({event:D,listeners:_}),N?D.data=N:(N=db(n),N!==null&&(D.data=N)))),(N=ID?OD(e,n):DD(e,n))&&(l=Kc(l,"onBeforeInput"),0<l.length&&(c=new ab("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:l}),c.data=N))}Pb(d,t)})}function Cu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=su(e,n),a!=null&&r.unshift(Cu(e,a,i)),a=su(e,t),a!=null&&r.push(Cu(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 Ob(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=su(n,a),u!=null&&o.unshift(Cu(n,u,s))):i||(u=su(n,a),u!=null&&o.push(Cu(n,u,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var GD=/\r\n?/g,KD=/\u0000|\uFFFD/g;function Db(e){return(typeof e=="string"?e:""+e).replace(GD,`
|
|
38
38
|
`).replace(KD,"")}function Xc(e,t,n){if(t=Db(t),Db(e)!==t&&n)throw Error(Q(425))}function Qc(){}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,XD=typeof clearTimeout=="function"?clearTimeout:void 0,Lb=typeof Promise=="function"?Promise:void 0,QD=typeof queueMicrotask=="function"?queueMicrotask:typeof Lb<"u"?function(e){return Lb.resolve(null).then(e).catch(ZD)}:vm;function ZD(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),gu(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);gu(t)}function ji(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 Mb(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),Lr="__reactFiber$"+Mo,Au="__reactProps$"+Mo,ri="__reactContainer$"+Mo,bm="__reactEvents$"+Mo,JD="__reactListeners$"+Mo,e6="__reactHandles$"+Mo;function Fa(e){var t=e[Lr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ri]||n[Lr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mb(e);e!==null;){if(n=e[Lr])return n;e=Mb(e)}return t}e=n,n=e.parentNode}return null}function ku(e){return e=e[Lr]||e[ri],!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 Zc(e){return e[Au]||null}var xm=[],Bo=-1;function Ui(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 Hi={},Gt=Ui(Hi),vn=Ui(!1),Ba=Hi;function jo(e,t){var n=e.type.contextTypes;if(!n)return Hi;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 Jc(){rt(vn),rt(Gt)}function Fb(e,t,n){if(Gt.current!==Hi)throw Error(Q(168));et(Gt,t),et(vn,n)}function Bb(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,BO(e)||"Unknown",i));return ct({},n,r)}function ed(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,Ba=Gt.current,et(Gt,e),et(vn,vn.current),!0}function jb(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=Bb(e,t,Ba),r.__reactInternalMemoizedMergedChildContext=e,rt(vn),rt(Gt),et(Gt,e)):rt(vn),et(vn,n)}var ii=null,td=!1,Em=!1;function Ub(e){ii===null?ii=[e]:ii.push(e)}function t6(e){td=!0,Ub(e)}function zi(){if(!Em&&ii!==null){Em=!0;var e=0,t=qe;try{var n=ii;for(qe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ii=null,td=!1}catch(i){throw ii!==null&&(ii=ii.slice(e+1)),zw($h,zi),i}finally{qe=t,Em=!1}}return null}var Uo=[],Ho=0,nd=null,rd=0,Xn=[],Qn=0,ja=null,ai=1,oi="";function Ua(e,t){Uo[Ho++]=rd,Uo[Ho++]=nd,nd=e,rd=t}function Hb(e,t,n){Xn[Qn++]=ai,Xn[Qn++]=oi,Xn[Qn++]=ja,ja=e;var r=ai;e=oi;var i=32-mr(r)-1;r&=~(1<<i),n+=1;var a=32-mr(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ai=1<<32-mr(t)+i|n<<i|r,oi=a+e}else ai=1<<a|n<<i|r,oi=e}function Tm(e){e.return!==null&&(Ua(e,1),Hb(e,1,0))}function _m(e){for(;e===nd;)nd=Uo[--Ho],Uo[Ho]=null,rd=Uo[--Ho],Uo[Ho]=null;for(;e===ja;)ja=Xn[--Qn],Xn[Qn]=null,oi=Xn[--Qn],Xn[Qn]=null,ai=Xn[--Qn],Xn[Qn]=null}var Mn=null,Fn=null,ot=!1,yr=null;function zb(e,t){var n=tr(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 Vb(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=ji(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=ja!==null?{id:ai,overflow:oi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tr(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(!Vb(e,t)){if(Sm(e))throw Error(Q(418));t=ji(n.nextSibling);var r=Mn;t&&Vb(e,t)?zb(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 $b(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function id(e){if(e!==Mn)return!1;if(!ot)return $b(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 Wb(),Error(Q(418));for(;t;)zb(e,t),t=ji(t.nextSibling)}if($b(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=ji(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Fn=null}}else Fn=Mn?ji(e.stateNode.nextSibling):null;return!0}function Wb(){for(var e=Fn;e;)e=ji(e.nextSibling)}function zo(){Fn=Mn=null,ot=!1}function Am(e){yr===null?yr=[e]:yr.push(e)}var n6=ni.ReactCurrentBatchConfig;function Ru(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 ad(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yb(e){var t=e._init;return t(e._payload)}function qb(e){function t(g,w){if(e){var x=g.deletions;x===null?(g.deletions=[w],g.flags|=16):x.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function r(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function i(g,w){return g=Xi(g,w),g.index=0,g.sibling=null,g}function a(g,w,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<w?(g.flags|=2,w):x):(g.flags|=2,w)):(g.flags|=1048576,w)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,w,x,T){return w===null||w.tag!==6?(w=vg(x,g.mode,T),w.return=g,w):(w=i(w,x),w.return=g,w)}function u(g,w,x,T){var S=x.type;return S===Co?c(g,w,x.props.children,T,x.key):w!==null&&(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Pi&&Yb(S)===w.type)?(T=i(w,x.props),T.ref=Ru(g,w,x),T.return=g,T):(T=Rd(x.type,x.key,x.props,null,g.mode,T),T.ref=Ru(g,w,x),T.return=g,T)}function l(g,w,x,T){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=wg(x,g.mode,T),w.return=g,w):(w=i(w,x.children||[]),w.return=g,w)}function c(g,w,x,T,S){return w===null||w.tag!==7?(w=Ga(x,g.mode,T,S),w.return=g,w):(w=i(w,x),w.return=g,w)}function d(g,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=vg(""+w,g.mode,x),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Cc:return x=Rd(w.type,w.key,w.props,null,g.mode,x),x.ref=Ru(g,null,w),x.return=g,x;case So:return w=wg(w,g.mode,x),w.return=g,w;case Pi:var T=w._init;return d(g,T(w._payload),x)}if(iu(w)||nu(w))return w=Ga(w,g.mode,x,null),w.return=g,w;ad(g,w)}return null}function f(g,w,x,T){var S=w!==null?w.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:s(g,w,""+x,T);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Cc:return x.key===S?u(g,w,x,T):null;case So:return x.key===S?l(g,w,x,T):null;case Pi:return S=x._init,f(g,w,S(x._payload),T)}if(iu(x)||nu(x))return S!==null?null:c(g,w,x,T,null);ad(g,x)}return null}function p(g,w,x,T,S){if(typeof T=="string"&&T!==""||typeof T=="number")return g=g.get(x)||null,s(w,g,""+T,S);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Cc:return g=g.get(T.key===null?x:T.key)||null,u(w,g,T,S);case So:return g=g.get(T.key===null?x:T.key)||null,l(w,g,T,S);case Pi:var _=T._init;return p(g,w,x,_(T._payload),S)}if(iu(T)||nu(T))return g=g.get(x)||null,c(w,g,T,S,null);ad(w,T)}return null}function m(g,w,x,T){for(var S=null,_=null,N=w,D=w=0,V=null;N!==null&&D<x.length;D++){N.index>D?(V=N,N=null):V=N.sibling;var P=f(g,N,x[D],T);if(P===null){N===null&&(N=V);break}e&&N&&P.alternate===null&&t(g,N),w=a(P,w,D),_===null?S=P:_.sibling=P,_=P,N=V}if(D===x.length)return n(g,N),ot&&Ua(g,D),S;if(N===null){for(;D<x.length;D++)N=d(g,x[D],T),N!==null&&(w=a(N,w,D),_===null?S=N:_.sibling=N,_=N);return ot&&Ua(g,D),S}for(N=r(g,N);D<x.length;D++)V=p(N,g,D,x[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(g,$)}),ot&&Ua(g,D),S}function y(g,w,x,T){var S=nu(x);if(typeof S!="function")throw Error(Q(150));if(x=S.call(x),x==null)throw Error(Q(151));for(var _=S=null,N=w,D=w=0,V=null,P=x.next();N!==null&&!P.done;D++,P=x.next()){N.index>D?(V=N,N=null):V=N.sibling;var $=f(g,N,P.value,T);if($===null){N===null&&(N=V);break}e&&N&&$.alternate===null&&t(g,N),w=a($,w,D),_===null?S=$:_.sibling=$,_=$,N=V}if(P.done)return n(g,N),ot&&Ua(g,D),S;if(N===null){for(;!P.done;D++,P=x.next())P=d(g,P.value,T),P!==null&&(w=a(P,w,D),_===null?S=P:_.sibling=P,_=P);return ot&&Ua(g,D),S}for(N=r(g,N);!P.done;D++,P=x.next())P=p(N,g,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(g,H)}),ot&&Ua(g,D),S}function b(g,w,x,T){if(typeof x=="object"&&x!==null&&x.type===Co&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Cc:e:{for(var S=x.key,_=w;_!==null;){if(_.key===S){if(S=x.type,S===Co){if(_.tag===7){n(g,_.sibling),w=i(_,x.props.children),w.return=g,g=w;break e}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Pi&&Yb(S)===_.type){n(g,_.sibling),w=i(_,x.props),w.ref=Ru(g,_,x),w.return=g,g=w;break e}n(g,_);break}else t(g,_);_=_.sibling}x.type===Co?(w=Ga(x.props.children,g.mode,T,x.key),w.return=g,g=w):(T=Rd(x.type,x.key,x.props,null,g.mode,T),T.ref=Ru(g,w,x),T.return=g,g=T)}return o(g);case So:e:{for(_=x.key;w!==null;){if(w.key===_)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){n(g,w.sibling),w=i(w,x.children||[]),w.return=g,g=w;break e}else{n(g,w);break}else t(g,w);w=w.sibling}w=wg(x,g.mode,T),w.return=g,g=w}return o(g);case Pi:return _=x._init,b(g,w,_(x._payload),T)}if(iu(x))return m(g,w,x,T);if(nu(x))return y(g,w,x,T);ad(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(n(g,w.sibling),w=i(w,x),w.return=g,g=w):(n(g,w),w=vg(x,g.mode,T),w.return=g,g=w),o(g)):n(g,w)}return b}var Vo=qb(!0),Gb=qb(!1),od=Ui(null),sd=null,$o=null,km=null;function Rm(){km=$o=sd=null}function Nm(e){var t=od.current;rt(od),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){sd=e,km=$o=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(bn=!0),e.firstContext=null)}function Zn(e){var t=e._currentValue;if(km!==e)if(e={context:e,memoizedValue:t,next:null},$o===null){if(sd===null)throw Error(Q(308));$o=e,sd.dependencies={lanes:0,firstContext:e}}else $o=$o.next=e;return t}var Ha=null;function Im(e){Ha===null?Ha=[e]:Ha.push(e)}function Kb(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,si(e,r)}function si(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 Vi=!1;function Om(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xb(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 ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $i(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,si(e,n)}return i=r.interleaved,i===null?(t.next=t,Im(r)):(t.next=i.next,i.next=t),r.interleaved=t,si(e,n)}function ud(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 Qb(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 ld(e,t,n,r){var i=e.updateQueue;Vi=!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,y=s;switch(f=t,p=n,y.tag){case 1:if(m=y.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=y.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=ct({},d,f);break e;case 2:Vi=!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);$a|=o,e.lanes=o,e.memoizedState=d}}function Zb(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 Nu={},Mr=Ui(Nu),Pu=Ui(Nu),Iu=Ui(Nu);function za(e){if(e===Nu)throw Error(Q(174));return e}function Dm(e,t){switch(et(Iu,t),et(Pu,e),et(Mr,Nu),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(Mr),et(Mr,t)}function Yo(){rt(Mr),rt(Pu),rt(Iu)}function Jb(e){za(Iu.current);var t=za(Mr.current),n=Lh(t,e.type);t!==n&&(et(Pu,e),et(Mr,n))}function Lm(e){Pu.current===e&&(rt(Mr),rt(Pu))}var dt=Ui(0);function cd(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 dd=ni.ReactCurrentDispatcher,Bm=ni.ReactCurrentBatchConfig,Va=0,ft=null,Pt=null,Dt=null,fd=!1,Ou=!1,Du=0,r6=0;function Kt(){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(!gr(e[n],t[n]))return!1;return!0}function Um(e,t,n,r,i,a){if(Va=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dd.current=e===null||e.memoizedState===null?s6:u6,e=n(r,i),Ou){a=0;do{if(Ou=!1,Du=0,25<=a)throw Error(Q(301));a+=1,Dt=Pt=null,t.updateQueue=null,dd.current=l6,e=n(r,i)}while(Ou)}if(dd.current=md,t=Pt!==null&&Pt.next!==null,Va=0,Dt=Pt=ft=null,fd=!1,t)throw Error(Q(300));return e}function Hm(){var e=Du!==0;return Du=0,e}function Fr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?ft.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Jn(){if(Pt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Pt.next;var t=Dt===null?ft.memoizedState:Dt.next;if(t!==null)Dt=t,Pt=e;else{if(e===null)throw Error(Q(310));Pt=e,e={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Dt===null?ft.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Lu(e,t){return typeof t=="function"?t(e):t}function zm(e){var t=Jn(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=Pt,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((Va&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,$a|=c}l=l.next}while(l!==null&&l!==a);u===null?o=r:u.next=s,gr(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,$a|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vm(e){var t=Jn(),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);gr(a,t.memoizedState)||(bn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ex(){}function tx(e,t){var n=ft,r=Jn(),i=t(),a=!gr(r.memoizedState,i);if(a&&(r.memoizedState=i,bn=!0),r=r.queue,$m(ix.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Dt!==null&&Dt.memoizedState.tag&1){if(n.flags|=2048,Mu(9,rx.bind(null,n,r,i,t),void 0,null),Lt===null)throw Error(Q(349));Va&30||nx(n,t,i)}return i}function nx(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 rx(e,t,n,r){t.value=n,t.getSnapshot=r,ax(t)&&ox(e)}function ix(e,t,n){return n(function(){ax(t)&&ox(e)})}function ax(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gr(e,n)}catch{return!0}}function ox(e){var t=si(e,1);t!==null&&xr(t,e,1,-1)}function sx(e){var t=Fr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lu,lastRenderedState:e},t.queue=e,e=e.dispatch=o6.bind(null,ft,e),[t.memoizedState,e]}function Mu(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 ux(){return Jn().memoizedState}function pd(e,t,n,r){var i=Fr();ft.flags|=e,i.memoizedState=Mu(1|t,n,void 0,r===void 0?null:r)}function hd(e,t,n,r){var i=Jn();r=r===void 0?null:r;var a=void 0;if(Pt!==null){var o=Pt.memoizedState;if(a=o.destroy,r!==null&&jm(r,o.deps)){i.memoizedState=Mu(t,n,a,r);return}}ft.flags|=e,i.memoizedState=Mu(1|t,n,a,r)}function lx(e,t){return pd(8390656,8,e,t)}function $m(e,t){return hd(2048,8,e,t)}function cx(e,t){return hd(4,2,e,t)}function dx(e,t){return hd(4,4,e,t)}function fx(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 px(e,t,n){return n=n!=null?n.concat([e]):null,hd(4,4,fx.bind(null,t,e),n)}function Wm(){}function hx(e,t){var n=Jn();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 mx(e,t){var n=Jn();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 gx(e,t,n){return Va&21?(gr(n,t)||(n=Yw(),ft.lanes|=n,$a|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bn=!0),e.memoizedState=n)}function i6(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 yx(){return Jn().memoizedState}function a6(e,t,n){var r=Gi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vx(e))wx(t,n);else if(n=Kb(e,t,n,r),n!==null){var i=fn();xr(n,e,r,i),bx(n,t,r)}}function o6(e,t,n){var r=Gi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vx(e))wx(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,gr(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=Kb(e,t,i,r),n!==null&&(i=fn(),xr(n,e,r,i),bx(n,t,r))}}function vx(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function wx(e,t){Ou=fd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qh(e,n)}}var md={readContext:Zn,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},s6={readContext:Zn,useCallback:function(e,t){return Fr().memoizedState=[e,t===void 0?null:t],e},useContext:Zn,useEffect:lx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,pd(4194308,4,fx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pd(4194308,4,e,t)},useInsertionEffect:function(e,t){return pd(4,2,e,t)},useMemo:function(e,t){var n=Fr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Fr();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=a6.bind(null,ft,e),[r.memoizedState,e]},useRef:function(e){var t=Fr();return e={current:e},t.memoizedState=e},useState:sx,useDebugValue:Wm,useDeferredValue:function(e){return Fr().memoizedState=e},useTransition:function(){var e=sx(!1),t=e[0];return e=i6.bind(null,e[1]),Fr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ft,i=Fr();if(ot){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Lt===null)throw Error(Q(349));Va&30||nx(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,lx(ix.bind(null,r,a,e),[e]),r.flags|=2048,Mu(9,rx.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Fr(),t=Lt.identifierPrefix;if(ot){var n=oi,r=ai;n=(r&~(1<<32-mr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Du++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=r6++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},u6={readContext:Zn,useCallback:hx,useContext:Zn,useEffect:$m,useImperativeHandle:px,useInsertionEffect:cx,useLayoutEffect:dx,useMemo:mx,useReducer:zm,useRef:ux,useState:function(){return zm(Lu)},useDebugValue:Wm,useDeferredValue:function(e){var t=Jn();return gx(t,Pt.memoizedState,e)},useTransition:function(){var e=zm(Lu)[0],t=Jn().memoizedState;return[e,t]},useMutableSource:ex,useSyncExternalStore:tx,useId:yx,unstable_isNewReconciler:!1},l6={readContext:Zn,useCallback:hx,useContext:Zn,useEffect:$m,useImperativeHandle:px,useInsertionEffect:cx,useLayoutEffect:dx,useMemo:mx,useReducer:Vm,useRef:ux,useState:function(){return Vm(Lu)},useDebugValue:Wm,useDeferredValue:function(e){var t=Jn();return Pt===null?t.memoizedState=e:gx(t,Pt.memoizedState,e)},useTransition:function(){var e=Vm(Lu)[0],t=Jn().memoizedState;return[e,t]},useMutableSource:ex,useSyncExternalStore:tx,useId:yx,unstable_isNewReconciler:!1};function vr(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 gd={isMounted:function(e){return(e=e._reactInternals)?Ma(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fn(),i=Gi(e),a=ui(r,i);a.payload=t,n!=null&&(a.callback=n),t=$i(e,a,i),t!==null&&(xr(t,e,i,r),ud(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fn(),i=Gi(e),a=ui(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=$i(e,a,i),t!==null&&(xr(t,e,i,r),ud(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fn(),r=Gi(e),i=ui(n,r);i.tag=2,t!=null&&(i.callback=t),t=$i(e,i,r),t!==null&&(xr(t,e,r,n),ud(t,e,r))}};function xx(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?!Eu(n,r)||!Eu(i,a):!0}function Ex(e,t,n){var r=!1,i=Hi,a=t.contextType;return typeof a=="object"&&a!==null?a=Zn(a):(i=wn(t)?Ba:Gt.current,r=t.contextTypes,a=(r=r!=null)?jo(e,i):Hi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Tx(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&&gd.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=Zn(a):(a=wn(t)?Ba:Gt.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&&gd.enqueueReplaceState(i,i.state,null),ld(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+=FO(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 c6=typeof WeakMap=="function"?WeakMap:Map;function _x(e,t,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Td||(Td=!0,cg=r),Km(e,t)},n}function Sx(e,t,n){n=ui(-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"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Cx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new c6;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=_6.bind(null,e,t,n),t.then(e,e))}function Ax(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 kx(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=ui(-1,1),t.tag=2,$i(n,t,1))),n.lanes|=1),e)}var d6=ni.ReactCurrentOwner,bn=!1;function dn(e,t,n,r){t.child=e===null?Gb(t,null,n,r):Vo(t,e.child,n,r)}function Rx(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,li(e,t,i)):(ot&&n&&Tm(t),t.flags|=1,dn(e,t,r,i),t.child)}function Nx(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,Px(e,t,a,r,i)):(e=Rd(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:Eu,n(o,r)&&e.ref===t.ref)return li(e,t,i)}return t.flags|=1,e=Xi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Px(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Eu(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,li(e,t,i)}return Xm(e,t,n,r,i)}function Ix(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 dn(e,t,i,n),t.child}function Ox(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)?Ba:Gt.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,li(e,t,i)):(ot&&r&&Tm(t),t.flags|=1,dn(e,t,n,i),t.child)}function Dx(e,t,n,r,i){if(wn(n)){var a=!0;ed(t)}else a=!1;if(Wo(t,i),t.stateNode===null)vd(e,t),Ex(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=Zn(l):(l=wn(n)?Ba:Gt.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)&&Tx(t,o,r,l),Vi=!1;var f=t.memoizedState;o.state=f,ld(t,r,o,i),u=t.memoizedState,s!==r||f!==u||vn.current||Vi?(typeof c=="function"&&(Ym(t,n,c,r),u=t.memoizedState),(s=Vi||xx(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,Xb(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vr(t.type,s),o.props=l,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=wn(n)?Ba:Gt.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)&&Tx(t,o,r,u),Vi=!1,f=t.memoizedState,o.state=f,ld(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||vn.current||Vi?(typeof p=="function"&&(Ym(t,n,p,r),m=t.memoizedState),(l=Vi||xx(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){Ox(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&jb(t,n,!1),li(e,t,a);r=t.stateNode,d6.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)):dn(e,t,s,a),t.memoizedState=r.state,i&&jb(t,n,!0),t.child}function Lx(e){var t=e.stateNode;t.pendingContext?Fb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fb(e,t.context,!1),Dm(e,t.containerInfo)}function Mx(e,t,n,r,i){return zo(),Am(i),t.flags|=256,dn(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 Fx(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=Nd(o,r,0,null),e=Ga(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 f6(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=Xi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Xi(s,a):(a=Ga(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=Xi(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=Nd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yd(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 f6(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Gm(Error(Q(422))),yd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Nd({mode:"visible",children:r.children},i,0,null),a=Ga(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 yd(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),yd(e,t,o,r)}if(s=(o&e.childLanes)!==0,bn||s){if(r=Lt,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,si(e,i),xr(r,e,i,-1))}return gg(),r=Gm(Error(Q(421))),yd(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=S6.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fn=ji(i.nextSibling),Mn=t,ot=!0,yr=null,e!==null&&(Xn[Qn++]=ai,Xn[Qn++]=oi,Xn[Qn++]=ja,ai=e.id,oi=e.overflow,ja=t),t=eg(t,r.children),t.flags|=4096,t)}function Bx(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 jx(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(dn(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&&Bx(e,n,t);else if(e.tag===19)Bx(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&&cd(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&&cd(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 vd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function li(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$a|=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=Xi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function p6(e,t,n){switch(t.tag){case 3:Lx(t),zo();break;case 5:Jb(t);break;case 1:wn(t.type)&&ed(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;et(od,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?Fx(e,t,n):(et(dt,dt.current&1),e=li(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 jx(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,Ix(e,t,n)}return li(e,t,n)}var Ux,ng,Hx,zx;Ux=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(){},Hx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,za(Mr.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=Qc)}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"&&(tu.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"&&(tu.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)}},zx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fu(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 Xt(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 h6(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 Xt(t),null;case 1:return wn(t.type)&&Jc(),Xt(t),null;case 3:return r=t.stateNode,Yo(),rt(vn),rt(Gt),Fm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(id(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(pg(yr),yr=null))),ng(e,t),Xt(t),null;case 5:Lm(t);var i=za(Iu.current);if(n=t.type,e!==null&&t.stateNode!=null)Hx(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 Xt(t),null}if(e=za(Mr.current),id(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Lr]=t,r[Au]=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<_u.length;i++)nt(_u[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":Ew(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":Sw(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&&Xc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Xc(r.textContent,s,e),i=["children",""+s]):tu.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":Ac(r),_w(r,a,!0);break;case"textarea":Ac(r),Aw(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Qc)}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=kw(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[Lr]=t,e[Au]=r,Ux(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<_u.length;i++)nt(_u[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":Ew(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":Sw(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"?Pw(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Rw(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&au(e,u):typeof u=="number"&&au(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(tu.hasOwnProperty(a)?u!=null&&a==="onScroll"&&nt("scroll",e):u!=null&&bh(e,a,u,o))}switch(n){case"input":Ac(e),_w(e,r,!1);break;case"textarea":Ac(e),Aw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ii(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=Qc)}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 Xt(t),null;case 6:if(e&&t.stateNode!=null)zx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=za(Iu.current),za(Mr.current),id(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:Xc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Xc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Xt(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))Wb(),zo(),t.flags|=98560,a=!1;else if(a=id(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[Lr]=t}else zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),a=!1}else yr!==null&&(pg(yr),yr=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?It===0&&(It=3):gg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Yo(),ng(e,t),e===null&&Su(t.stateNode.containerInfo),Xt(t),null;case 10:return Nm(t.type._context),Xt(t),null;case 17:return wn(t.type)&&Jc(),Xt(t),null;case 19:if(rt(dt),a=t.memoizedState,a===null)return Xt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Fu(a,!1);else{if(It!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=cd(e),o!==null){for(t.flags|=128,Fu(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&&Et()>Xo&&(t.flags|=128,r=!0,Fu(a,!1),t.lanes=4194304)}else{if(!r)if(e=cd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ot)return Xt(t),null}else 2*Et()-a.renderingStartTime>Xo&&n!==1073741824&&(t.flags|=128,r=!0,Fu(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=Et(),t.sibling=null,n=dt.current,et(dt,r?n&1|2:n&1),t):(Xt(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&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function m6(e,t){switch(_m(t),t.tag){case 1:return wn(t.type)&&Jc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(),rt(vn),rt(Gt),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 wd=!1,Qt=!1,g6=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 Vx=!1;function y6(e,t){if(mm=jc,e=xb(),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},jc=!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 y=m.memoizedProps,b=m.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:vr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.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=Vx,Vx=!1,m}function Bu(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 bd(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 $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Au],delete t[bm],delete t[JD],delete t[e6])),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 Wx(e){return e.tag===5||e.tag===3||e.tag===4}function Yx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wx(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=Qc));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 zt=null,wr=!1;function Wi(e,t,n){for(n=n.child;n!==null;)qx(e,t,n),n=n.sibling}function qx(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(Oc,n)}catch{}switch(n.tag){case 5:Qt||Go(n,t);case 6:var r=zt,i=wr;zt=null,Wi(e,t,n),zt=r,wr=i,zt!==null&&(wr?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(wr?(e=zt,n=n.stateNode,e.nodeType===8?wm(e.parentNode,n):e.nodeType===1&&wm(e,n),gu(e)):wm(zt,n.stateNode));break;case 4:r=zt,i=wr,zt=n.stateNode.containerInfo,wr=!0,Wi(e,t,n),zt=r,wr=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(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)}Wi(e,t,n);break;case 1:if(!Qt&&(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)}Wi(e,t,n);break;case 21:Wi(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Wi(e,t,n),Qt=r):Wi(e,t,n);break;default:Wi(e,t,n)}}function Gx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new g6),t.forEach(function(r){var i=C6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function br(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:zt=s.stateNode,wr=!1;break e;case 3:zt=s.stateNode.containerInfo,wr=!0;break e;case 4:zt=s.stateNode.containerInfo,wr=!0;break e}s=s.return}if(zt===null)throw Error(Q(160));qx(a,o,i),zt=null,wr=!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;)Kx(t,e),t=t.sibling}function Kx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(br(t,e),Br(e),r&4){try{Bu(3,e,e.return),bd(3,e)}catch(y){yt(e,e.return,y)}try{Bu(5,e,e.return)}catch(y){yt(e,e.return,y)}}break;case 1:br(t,e),Br(e),r&512&&n!==null&&Go(n,n.return);break;case 5:if(br(t,e),Br(e),r&512&&n!==null&&Go(n,n.return),e.flags&32){var i=e.stateNode;try{au(i,"")}catch(y){yt(e,e.return,y)}}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&&Tw(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"?Pw(i,d):c==="dangerouslySetInnerHTML"?Rw(i,d):c==="children"?au(i,d):bh(i,c,d,l)}switch(s){case"input":Ih(i,a);break;case"textarea":Cw(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[Au]=a}catch(y){yt(e,e.return,y)}}break;case 6:if(br(t,e),Br(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(y){yt(e,e.return,y)}}break;case 3:if(br(t,e),Br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{gu(t.containerInfo)}catch(y){yt(e,e.return,y)}break;case 4:br(t,e),Br(e);break;case 13:br(t,e),Br(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(lg=Et())),r&4&&Gx(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(l=Qt)||c,br(t,e),Qt=l):br(t,e),Br(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:Bu(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(y){yt(r,n,y)}}break;case 5:Go(f,f.return);break;case 22:if(f.memoizedState!==null){Zx(d);continue}}p!==null?(p.return=f,ue=p):Zx(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=Nw("display",o))}catch(y){yt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){yt(e,e.return,y)}}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:br(t,e),Br(e),r&4&&Gx(e);break;case 21:break;default:br(t,e),Br(e)}}function Br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Wx(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&&(au(i,""),r.flags&=-33);var a=Yx(e);og(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=Yx(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 v6(e,t,n){ue=e,Xx(e)}function Xx(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||wd;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Qt;s=wd;var l=Qt;if(wd=o,(Qt=u)&&!l)for(ue=i;ue!==null;)o=ue,u=o.child,o.tag===22&&o.memoizedState!==null?Jx(i):u!==null?(u.return=o,ue=u):Jx(i);for(;a!==null;)ue=a,Xx(a),a=a.sibling;ue=i,wd=s,Qt=l}Qx(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ue=a):Qx(e)}}function Qx(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:Qt||bd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Zb(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}Zb(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&&gu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Qt||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 Zx(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 Jx(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bd(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 w6=Math.ceil,xd=ni.ReactCurrentDispatcher,sg=ni.ReactCurrentOwner,er=ni.ReactCurrentBatchConfig,Ue=0,Lt=null,At=null,Vt=0,Bn=0,Ko=Ui(0),It=0,ju=null,$a=0,Ed=0,ug=0,Uu=null,xn=null,lg=0,Xo=1/0,ci=null,Td=!1,cg=null,Yi=null,_d=!1,qi=null,Sd=0,Hu=0,dg=null,Cd=-1,Ad=0;function fn(){return Ue&6?Et():Cd!==-1?Cd:Cd=Et()}function Gi(e){return e.mode&1?Ue&2&&Vt!==0?Vt&-Vt:n6.transition!==null?(Ad===0&&(Ad=Yw()),Ad):(e=qe,e!==0||(e=window.event,e=e===void 0?16:tb(e.type)),e):1}function xr(e,t,n,r){if(50<Hu)throw Hu=0,dg=null,Error(Q(185));du(e,n,r),(!(Ue&2)||e!==Lt)&&(e===Lt&&(!(Ue&2)&&(Ed|=n),It===4&&Ki(e,Vt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Xo=Et()+500,td&&zi()))}function En(e,t){var n=e.callbackNode;nD(e,t);var r=Mc(e,e===Lt?Vt:0);if(r===0)n!==null&&Vw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vw(n),t===1)e.tag===0?t6(tE.bind(null,e)):Ub(tE.bind(null,e)),QD(function(){!(Ue&6)&&zi()}),n=null;else{switch(qw(r)){case 1:n=$h;break;case 4:n=$w;break;case 16:n=Ic;break;case 536870912:n=Ww;break;default:n=Ic}n=lE(n,eE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function eE(e,t){if(Cd=-1,Ad=0,Ue&6)throw Error(Q(327));var n=e.callbackNode;if(Qo()&&e.callbackNode!==n)return null;var r=Mc(e,e===Lt?Vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=kd(e,r);else{t=r;var i=Ue;Ue|=2;var a=rE();(Lt!==e||Vt!==t)&&(ci=null,Xo=Et()+500,Ya(e,t));do try{E6();break}catch(s){nE(e,s)}while(!0);Rm(),xd.current=a,Ue=i,At!==null?t=0:(Lt=null,Vt=0,t=It)}if(t!==0){if(t===2&&(i=Wh(e),i!==0&&(r=i,t=fg(e,i))),t===1)throw n=ju,Ya(e,0),Ki(e,r),En(e,Et()),n;if(t===6)Ki(e,r);else{if(i=e.current.alternate,!(r&30)&&!b6(i)&&(t=kd(e,r),t===2&&(a=Wh(e),a!==0&&(r=a,t=fg(e,a))),t===1))throw n=ju,Ya(e,0),Ki(e,r),En(e,Et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:qa(e,xn,ci);break;case 3:if(Ki(e,r),(r&130023424)===r&&(t=lg+500-Et(),10<t)){if(Mc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vm(qa.bind(null,e,xn,ci),t);break}qa(e,xn,ci);break;case 4:if(Ki(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-mr(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=Et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*w6(r/1960))-r,10<r){e.timeoutHandle=vm(qa.bind(null,e,xn,ci),r);break}qa(e,xn,ci);break;case 5:qa(e,xn,ci);break;default:throw Error(Q(329))}}}return En(e,Et()),e.callbackNode===n?eE.bind(null,e):null}function fg(e,t){var n=Uu;return e.current.memoizedState.isDehydrated&&(Ya(e,t).flags|=256),e=kd(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 b6(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(!gr(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 Ki(e,t){for(t&=~ug,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mr(t),r=1<<n;e[n]=-1,t&=~r}}function tE(e){if(Ue&6)throw Error(Q(327));Qo();var t=Mc(e,0);if(!(t&1))return En(e,Et()),null;var n=kd(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=ju,Ya(e,0),Ki(e,t),En(e,Et()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,qa(e,xn,ci),En(e,Et()),null}function hg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Xo=Et()+500,td&&zi())}}function Wa(e){qi!==null&&qi.tag===0&&!(Ue&6)&&Qo();var t=Ue;Ue|=1;var n=er.transition,r=qe;try{if(er.transition=null,qe=1,e)return e()}finally{qe=r,er.transition=n,Ue=t,!(Ue&6)&&zi()}}function mg(){Bn=Ko.current,rt(Ko)}function Ya(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XD(n)),At!==null)for(n=At.return;n!==null;){var r=n;switch(_m(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jc();break;case 3:Yo(),rt(vn),rt(Gt),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(Lt=e,At=e=Xi(e.current,null),Vt=Bn=t,It=0,ju=null,ug=Ed=$a=0,xn=Uu=null,Ha!==null){for(t=0;t<Ha.length;t++)if(n=Ha[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}Ha=null}return e}function nE(e,t){do{var n=At;try{if(Rm(),dd.current=md,fd){for(var r=ft.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}fd=!1}if(Va=0,Dt=Pt=ft=null,Ou=!1,Du=0,sg.current=null,n===null||n.return===null){It=1,ju=t,At=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=Vt,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=Ax(o);if(p!==null){p.flags&=-257,kx(p,o,s,a,t),p.mode&1&&Cx(a,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){Cx(a,l,t),gg();break e}u=Error(Q(426))}}else if(ot&&s.mode&1){var b=Ax(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),kx(b,o,s,a,t),Am(qo(u,s));break e}}a=u=qo(u,s),It!==4&&(It=2),Uu===null?Uu=[a]:Uu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=_x(a,u,t);Qb(a,g);break e;case 1:s=u;var w=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Yi===null||!Yi.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var T=Sx(a,s,t);Qb(a,T);break e}}a=a.return}while(a!==null)}aE(n)}catch(S){t=S,At===n&&n!==null&&(At=n=n.return);continue}break}while(!0)}function rE(){var e=xd.current;return xd.current=md,e===null?md:e}function gg(){(It===0||It===3||It===2)&&(It=4),Lt===null||!($a&268435455)&&!(Ed&268435455)||Ki(Lt,Vt)}function kd(e,t){var n=Ue;Ue|=2;var r=rE();(Lt!==e||Vt!==t)&&(ci=null,Ya(e,t));do try{x6();break}catch(i){nE(e,i)}while(!0);if(Rm(),Ue=n,xd.current=r,At!==null)throw Error(Q(261));return Lt=null,Vt=0,It}function x6(){for(;At!==null;)iE(At)}function E6(){for(;At!==null&&!qO();)iE(At)}function iE(e){var t=uE(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?aE(e):At=t,sg.current=null}function aE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=m6(n,t),n!==null){n.flags&=32767,At=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,At=null;return}}else if(n=h6(n,t,Bn),n!==null){At=n;return}if(t=t.sibling,t!==null){At=t;return}At=t=e}while(t!==null);It===0&&(It=5)}function qa(e,t,n){var r=qe,i=er.transition;try{er.transition=null,qe=1,T6(e,t,n,r)}finally{er.transition=i,qe=r}return null}function T6(e,t,n,r){do Qo();while(qi!==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(rD(e,a),e===Lt&&(At=Lt=null,Vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_d||(_d=!0,lE(Ic,function(){return Qo(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=er.transition,er.transition=null;var o=qe;qe=1;var s=Ue;Ue|=4,sg.current=null,y6(e,n),Kx(n,e),VD(gm),jc=!!mm,gm=mm=null,e.current=n,v6(n),GO(),Ue=s,qe=o,er.transition=a}else e.current=n;if(_d&&(_d=!1,qi=e,Sd=i),a=e.pendingLanes,a===0&&(Yi=null),QO(n.stateNode),En(e,Et()),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(Td)throw Td=!1,e=cg,cg=null,e;return Sd&1&&e.tag!==0&&Qo(),a=e.pendingLanes,a&1?e===dg?Hu++:(Hu=0,dg=e):Hu=0,zi(),null}function Qo(){if(qi!==null){var e=qw(Sd),t=er.transition,n=qe;try{if(er.transition=null,qe=16>e?16:e,qi===null)var r=!1;else{if(e=qi,qi=null,Sd=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:Bu(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($x(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 y=m.child;if(y!==null){m.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==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:Bu(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,ue=g;break e}ue=a.return}}var w=e.current;for(ue=w;ue!==null;){o=ue;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,ue=x;else e:for(o=w;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:bd(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,zi(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(Oc,e)}catch{}r=!0}return r}finally{qe=n,er.transition=t}}return!1}function oE(e,t,n){t=qo(n,t),t=_x(e,t,1),e=$i(e,t,1),t=fn(),e!==null&&(du(e,1,t),En(e,t))}function yt(e,t,n){if(e.tag===3)oE(e,e,n);else for(;t!==null;){if(t.tag===3){oE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){e=qo(n,e),e=Sx(t,e,1),t=$i(t,e,1),e=fn(),t!==null&&(du(t,1,e),En(t,e));break}}t=t.return}}function _6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(Vt&n)===n&&(It===4||It===3&&(Vt&130023424)===Vt&&500>Et()-lg?Ya(e,0):ug|=n),En(e,t)}function sE(e,t){t===0&&(e.mode&1?(t=Lc,Lc<<=1,!(Lc&130023424)&&(Lc=4194304)):t=1);var n=fn();e=si(e,t),e!==null&&(du(e,t,n),En(e,n))}function S6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sE(e,n)}function C6(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),sE(e,n)}var uE;uE=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,p6(e,t,n);bn=!!(e.flags&131072)}else bn=!1,ot&&t.flags&1048576&&Hb(t,rd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vd(e,t),e=t.pendingProps;var i=jo(t,Gt.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,ed(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Om(t),i.updater=gd,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),dn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=k6(r),e=vr(r,e),i){case 0:t=Xm(null,t,r,e,n);break e;case 1:t=Dx(null,t,r,e,n);break e;case 11:t=Rx(null,t,r,e,n);break e;case 14:t=Nx(null,t,r,vr(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:vr(r,i),Xm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Dx(e,t,r,i,n);case 3:e:{if(Lx(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Xb(e,t),ld(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=Mx(e,t,r,n,i);break e}else if(r!==i){i=qo(Error(Q(424)),t),t=Mx(e,t,r,n,i);break e}else for(Fn=ji(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,yr=null,n=Gb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zo(),r===i){t=li(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 5:return Jb(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),Ox(e,t),dn(e,t,o,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return Fx(e,t,n);case 4:return Dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vo(t,null,r,n):dn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Rx(e,t,r,i,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(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(od,r._currentValue),r._currentValue=o,a!==null)if(gr(a.value,o)){if(a.children===i.children&&!vn.current){t=li(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=ui(-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}dn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wo(t,n),i=Zn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return r=t.type,i=vr(r,t.pendingProps),i=vr(r.type,i),Nx(e,t,r,i,n);case 15:return Px(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),vd(e,t),t.tag=1,wn(r)?(e=!0,ed(t)):e=!1,Wo(t,n),Ex(t,r,i),qm(t,r,i,n),Qm(null,t,r,!0,e,n);case 19:return jx(e,t,n);case 22:return Ix(e,t,n)}throw Error(Q(156,t.tag))};function lE(e,t){return zw(e,t)}function A6(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 tr(e,t,n,r){return new A6(e,t,n,r)}function yg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function k6(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 Xi(e,t){var n=e.alternate;return n===null?(n=tr(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 Rd(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 Ga(n.children,i,a,t);case xh:o=8,i|=8;break;case Eh:return e=tr(12,n,t,i|2),e.elementType=Eh,e.lanes=a,e;case _h:return e=tr(13,n,t,i),e.elementType=_h,e.lanes=a,e;case Sh:return e=tr(19,n,t,i),e.elementType=Sh,e.lanes=a,e;case vw:return Nd(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gw:o=10;break e;case yw:o=9;break e;case Th:o=11;break e;case Ch:o=14;break e;case Pi:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=tr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Ga(e,t,n,r){return e=tr(7,e,r,t),e.lanes=n,e}function Nd(e,t,n,r){return e=tr(22,e,r,t),e.elementType=vw,e.lanes=n,e.stateNode={isHidden:!1},e}function vg(e,t,n){return e=tr(6,e,null,t),e.lanes=n,e}function wg(e,t,n){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function R6(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 R6(e,t,n,s,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=tr(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 N6(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 cE(e){if(!e)return Hi;e=e._reactInternals;e:{if(Ma(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 Bb(e,n,t)}return t}function dE(e,t,n,r,i,a,o,s,u){return e=bg(n,r,!0,e,i,a,o,s,u),e.context=cE(null),n=e.current,r=fn(),i=Gi(n),a=ui(r,i),a.callback=t??null,$i(n,a,i),e.current.lanes=i,du(e,i,r),En(e,r),e}function Pd(e,t,n,r){var i=t.current,a=fn(),o=Gi(i);return n=cE(n),t.context===null?t.context=n:t.pendingContext=n,t=ui(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$i(i,t,o),e!==null&&(xr(e,i,o,a),ud(e,i,o)),o}function Id(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 fE(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){fE(e,t),(e=e.alternate)&&fE(e,t)}function P6(){return null}var pE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Eg(e){this._internalRoot=e}Od.prototype.render=Eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Pd(e,t,null,null)},Od.prototype.unmount=Eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wa(function(){Pd(null,e,null,null)}),t[ri]=null}};function Od(e){this._internalRoot=e}Od.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mi.length&&t!==0&&t<Mi[n].priority;n++);Mi.splice(n,0,e),n===0&&Jw(e)}};function Tg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Dd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hE(){}function I6(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=Id(o);a.call(l)}}var o=dE(t,r,e,0,null,!1,!1,"",hE);return e._reactRootContainer=o,e[ri]=o.current,Su(e.nodeType===8?e.parentNode:e),Wa(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Id(u);s.call(l)}}var u=bg(e,0,!1,null,null,!1,!1,"",hE);return e._reactRootContainer=u,e[ri]=u.current,Su(e.nodeType===8?e.parentNode:e),Wa(function(){Pd(t,u,n,r)}),u}function Ld(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=Id(o);s.call(u)}}Pd(t,o,e,i)}else o=I6(n,t,e,i,r);return Id(o)}Gw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cu(t.pendingLanes);n!==0&&(qh(t,n|1),En(t,Et()),!(Ue&6)&&(Xo=Et()+500,zi()))}break;case 13:Wa(function(){var r=si(e,1);if(r!==null){var i=fn();xr(r,e,1,i)}}),xg(e,1)}},Gh=function(e){if(e.tag===13){var t=si(e,134217728);if(t!==null){var n=fn();xr(t,e,134217728,n)}xg(e,134217728)}},Kw=function(e){if(e.tag===13){var t=Gi(e),n=si(e,t);if(n!==null){var r=fn();xr(n,e,t,r)}xg(e,t)}},Xw=function(){return qe},Qw=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=Zc(r);if(!i)throw Error(Q(90));xw(r),Ih(r,i)}}}break;case"textarea":Cw(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}},Lw=hg,Mw=Wa;var O6={usingClientEntryPoint:!1,Events:[ku,Fo,Zc,Ow,Dw,hg]},zu={findFiberByHostInstance:Fa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},D6={bundleType:zu.bundleType,version:zu.version,rendererPackageName:zu.rendererPackageName,rendererConfig:zu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ni.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Uw(e),e===null?null:e.stateNode},findFiberByHostInstance:zu.findFiberByHostInstance||P6,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 Md=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Md.isDisabled&&Md.supportsFiber)try{Oc=Md.inject(D6),Dr=Md}catch{}}On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O6,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 N6(e,t,null,n)},On.createRoot=function(e,t){if(!Tg(e))throw Error(Q(299));var n=!1,r="",i=pE;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[ri]=t.current,Su(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=Uw(t),e=e===null?null:e.stateNode,e},On.flushSync=function(e){return Wa(e)},On.hydrate=function(e,t,n){if(!Dd(t))throw Error(Q(200));return Ld(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=pE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=dE(t,null,e,1,n??null,i,!1,a,o),e[ri]=t.current,Su(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 Od(t)},On.render=function(e,t,n){if(!Dd(t))throw Error(Q(200));return Ld(null,e,t,!1,n)},On.unmountComponentAtNode=function(e){if(!Dd(e))throw Error(Q(40));return e._reactRootContainer?(Wa(function(){Ld(null,null,e,!1,function(){e._reactRootContainer=null,e[ri]=null})}),!0):!1},On.unstable_batchedUpdates=hg,On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Dd(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Ld(e,t,n,!1,r)},On.version="18.3.1-next-f1338f8080-20240426";function mE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mE)}catch(e){console.error(e)}}mE(),cw.exports=On;var Zo=cw.exports,gE,yE=Zo;gE=yE.createRoot,yE.hydrateRoot;const vE="3.0.22";function Fd(e){"@babel/helpers - typeof";return Fd=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},Fd(e)}var L6=/^\s+/,M6=/\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=F6(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=_E(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=bE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=bE(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=wE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString: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.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return xE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return H6(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:J6[xE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+EE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+EE(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(W6,arguments)},brighten:function(){return this._applyModification(Y6,arguments)},darken:function(){return this._applyModification(q6,arguments)},desaturate:function(){return this._applyModification(z6,arguments)},saturate:function(){return this._applyModification(V6,arguments)},greyscale:function(){return this._applyModification($6,arguments)},spin:function(){return this._applyModification(G6,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(K6,arguments)},monochromatic:function(){return this._applyCombination(Z6,arguments)},splitcomplement:function(){return this._applyCombination(X6,arguments)},triad:function(){return this._applyCombination(TE,[3])},tetrad:function(){return this._applyCombination(TE,[4])}},fe.fromRatio=function(e,t){if(Fd(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Vu(e[r]));e=n}return fe(e,t)};function F6(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=rL(e)),Fd(e)=="object"&&(di(e.r)&&di(e.g)&&di(e.b)?(t=B6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):di(e.h)&&di(e.s)&&di(e.v)?(r=Vu(e.s),i=Vu(e.v),t=U6(e.h,r,i),o=!0,s="hsv"):di(e.h)&&di(e.s)&&di(e.l)&&(r=Vu(e.s),a=Vu(e.l),t=j6(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=_E(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 B6(e,t,n){return{r:st(e,255)*255,g:st(t,255)*255,b:st(n,255)*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+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 j6(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 bE(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 U6(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 xE(e,t,n,r){var i=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(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 H6(e,t,n,r,i){var a=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16)),Er(SE(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 EE(e,t,n,r){var i=[Er(SE(r)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(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 z6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Bd(n.s),fe(n)}function V6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Bd(n.s),fe(n)}function $6(e){return fe(e).desaturate(100)}function W6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Bd(n.l),fe(n)}function Y6(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 q6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Bd(n.l),fe(n)}function G6(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function K6(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function TE(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 X6(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 Z6(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=iL(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"},J6=fe.hexNames=eL(_g);function eL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function _E(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function st(e,t){tL(e)&&(e="100%");var n=nL(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 Bd(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function tL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function nL(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Vu(e){return e<=1&&(e=e*100+"%"),e}function SE(e){return Math.round(parseFloat(e)*255).toString(16)}function CE(e){return jn(e)/255}var Tr=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 di(e){return!!Tr.CSS_UNIT.exec(e)}function rL(e){e=e.replace(L6,"").replace(M6,"").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=Tr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Tr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Tr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Tr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Tr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Tr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Tr.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:CE(n[4]),format:t?"name":"hex8"}:(n=Tr.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Tr.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:CE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Tr.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 iL(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 aL=400,AE=600,jd={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},kE=({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 oL(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 $u(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Sg=e=>Array.isArray(e);function RE(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 Wu(e){return typeof e=="string"||Array.isArray(e)}function NE(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]=NE(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]=NE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Ud(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],Yu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qi=new Set(Yu),fi=e=>e*1e3,pi=e=>e/1e3,sL={type:"spring",stiffness:500,damping:25,restSpeed:10},uL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lL={type:"keyframes",duration:.8},cL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dL=(e,{keyframes:t})=>t.length>2?lL:Qi.has(e)?e.startsWith("scale")?uL(t[1]):sL:cL;function Rg(e,t){return e?e[t]||e.default||e:void 0}const fL={skipAnimations:!1,useManualTiming:!1},pL=e=>e!==null;function Hd(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(pL),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Zt=e=>e;function hL(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 zd=["read","resolveKeyframes","update","preRender","render","postRender"],mL=40;function PE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=zd.reduce((g,w)=>(g[w]=hL(a),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,mL),1),i.timestamp=g,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:zd.reduce((g,w)=>{const x=o[w];return g[w]=(T,S=!1,_=!1)=>(n||m(),x.schedule(T,S,_)),g},{}),cancel:g=>{for(let w=0;w<zd.length;w++)o[zd[w]].cancel(g)},state:i,steps:o}}const{schedule:Xe,cancel:Zi,state:$t,steps:Ng}=PE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0),IE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gL=1e-7,yL=12;function vL(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=IE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>gL&&++s<yL);return o}function qu(e,t,n,r){if(e===t&&n===r)return Zt;const i=a=>vL(a,0,1,e,n);return a=>a===0||a===1?a:IE(i(a),t,r)}const OE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,DE=e=>t=>1-e(1-t),LE=qu(.33,1.53,.69,.99),Pg=DE(LE),ME=OE(Pg),FE=e=>(e*=2)<1?.5*Pg(e):.5*(2-Math.pow(2,-10*(e-1))),Ig=e=>1-Math.sin(Math.acos(e)),BE=DE(Ig),jE=OE(Ig),UE=e=>/^0[^.\s]+$/u.test(e);function wL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||UE(e):!0}let Og=Zt;const HE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),zE=e=>t=>typeof t=="string"&&t.startsWith(e),VE=zE("--"),bL=zE("var(--"),Dg=e=>bL(e)?xL.test(e.split("/*")[0].trim()):!1,xL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,EL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function TL(e){const t=EL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function $E(e,t,n=1){const[r,i]=TL(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return HE(o)?parseFloat(o):o}return Dg(i)?$E(i,t,n+1):i}const Ji=(e,t,n)=>n>t?t:n<e?e:n,Jo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gu={...Jo,transform:e=>Ji(0,1,e)},Vd={...Jo,default:1},Ku=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=Ku("deg"),jr=Ku("%"),ye=Ku("px"),_L=Ku("vh"),SL=Ku("vw"),WE={...jr,parse:e=>jr.parse(e)/100,transform:e=>jr.transform(e*100)},CL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),YE=e=>e===Jo||e===ye,qE=(e,t)=>parseFloat(e.split(", ")[t]),GE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return qE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?qE(a[1],e):0}},AL=new Set(["x","y","z"]),kL=Yu.filter(e=>!AL.has(e));function RL(e){const t=[];return kL.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:GE(4,13),y:GE(5,14)};es.translateX=es.x,es.translateY=es.y;const KE=e=>t=>t.test(e),XE=[Jo,ye,jr,ea,SL,_L,{test:e=>e==="auto",parse:e=>e}],QE=e=>XE.find(KE(e)),Ka=new Set;let Lg=!1,Mg=!1;function ZE(){if(Mg){const e=Array.from(Ka).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=RL(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,Ka.forEach(e=>e.complete()),Ka.clear()}function JE(){Ka.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mg=!0)})}function NL(){JE(),ZE()}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?(Ka.add(this),Lg||(Lg=!0,Xe.read(JE),Xe.resolveKeyframes(ZE))):(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),Ka.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ka.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xu=e=>Math.round(e*1e5)/1e5,Bg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PL(e){return e==null}const IL=/^(?:#[\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"&&IL.test(n)&&n.startsWith(e)||t&&!PL(n)&&Object.prototype.hasOwnProperty.call(n,t)),eT=(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}},OL=e=>Ji(0,255,e),Ug={...Jo,transform:e=>Math.round(OL(e))},Xa={test:jg("rgb","red"),parse:eT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ug.transform(e)+", "+Ug.transform(t)+", "+Ug.transform(n)+", "+Xu(Gu.transform(r))+")"};function DL(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:DL,transform:Xa.transform},ts={test:jg("hsl","hue"),parse:eT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jr.transform(Xu(t))+", "+jr.transform(Xu(n))+", "+Xu(Gu.transform(r))+")"},Jt={test:e=>Xa.test(e)||Hg.test(e)||ts.test(e),parse:e=>Xa.test(e)?Xa.parse(e):ts.test(e)?ts.parse(e):Hg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xa.transform(e):ts.transform(e)},LL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ML(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(LL))===null||n===void 0?void 0:n.length)||0)>0}const tT="number",nT="color",FL="var",BL="var(",rT="${}",jL=/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 Qu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(jL,u=>(Jt.test(u)?(r.color.push(a),i.push(nT),n.push(Jt.parse(u))):u.startsWith(BL)?(r.var.push(a),i.push(FL),n.push(u)):(r.number.push(a),i.push(tT),n.push(parseFloat(u))),++a,rT)).split(rT);return{values:n,split:s,indexes:r,types:i}}function iT(e){return Qu(e).values}function aT(e){const{split:t,types:n}=Qu(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===tT?a+=Xu(i[o]):s===nT?a+=Jt.transform(i[o]):a+=i[o]}return a}}const UL=e=>typeof e=="number"?0:e;function HL(e){const t=iT(e);return aT(e)(t.map(UL))}const ta={test:ML,parse:iT,createTransformer:aT,getAnimatableNone:HL},zL=new Set(["brightness","contrast","saturate","opacity"]);function VL(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=zL.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const $L=/\b([a-z-]*)\(.*?\)/gu,zg={...ta,getAnimatableNone:e=>{const t=e.match($L);return t?t.map(VL).join(" "):e}},WL={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},YL={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:Vd,scaleX:Vd,scaleY:Vd,scaleZ:Vd,skew:ea,skewX:ea,skewY:ea,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Gu,originX:WE,originY:WE,originZ:ye},oT={...Jo,transform:Math.round},Vg={...WL,...YL,zIndex:oT,size:ye,fillOpacity:Gu,strokeOpacity:Gu,numOctaves:oT},qL={...Vg,color:Jt,backgroundColor:Jt,outlineColor:Jt,fill:Jt,stroke:Jt,borderColor:Jt,borderTopColor:Jt,borderRightColor:Jt,borderBottomColor:Jt,borderLeftColor:Jt,filter:zg,WebkitFilter:zg},$g=e=>qL[e];function sT(e,t){let n=$g(e);return n!==zg&&(n=ta),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const GL=new Set(["auto","none","0"]);function KL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!GL.has(a)&&Qu(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=sT(n,i)}class uT 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=$E(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!CL.has(r)||t.length!==2)return;const[i,a]=t,o=QE(i),s=QE(a);if(o!==s)if(YE(o)&&YE(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++)wL(t[i])&&r.push(i);r.length&&KL(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 $d;function XL(){$d=void 0}const Ur={now:()=>($d===void 0&&Ur.set($t.isProcessing||fL.useManualTiming?$t.timestamp:performance.now()),$d),set:e=>{$d=e,queueMicrotask(XL)}},lT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ta.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 ZL(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=lT(i,t),s=lT(a,t);return!o||!s?!1:QL(e)||(n==="spring"||Wg(n))&&r}const JL=40;class cT{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=Ur.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>JL?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ur.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!ZL(t,r,i,a))if(o)this.options.duration=0;else{u==null||u(Hd(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 dT(e,t){return t?e*(1e3/t):0}const e4=5;function fT(e,t,n){const r=Math.max(t-e4,0);return dT(n-e(r),t-r)}const Yg=.001,t4=.01,n4=10,r4=.05,i4=1;function a4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Ji(r4,i4,o),e=Ji(t4,n4,pi(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),y=qg(Math.pow(l,2),o);return(-i(l)+Yg>0?-1:1)*((f-p)*m)/y}):(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=s4(i,a,s);if(e=fi(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 o4=12;function s4(e,t,n){let r=n;for(let i=1;i<o4;i++)r=r-e(r)/t(r);return r}function qg(e,t){return e*Math.sqrt(1-t*t)}const u4=["duration","bounce"],l4=["stiffness","damping","mass"];function pT(e,t){return t.some(n=>e[n]!==void 0)}function c4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!pT(e,l4)&&pT(e,u4)){const n=a4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function hT({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}=c4({...r,velocity:-pi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=a-i,b=pi(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let w;if(m<1){const x=qg(b,m);w=T=>{const S=Math.exp(-m*b*T);return a-S*((p+m*b*y)/x*Math.sin(x*T)+y*Math.cos(x*T))}}else if(m===1)w=x=>a-Math.exp(-b*x)*(y+(p+b*y)*x);else{const x=b*Math.sqrt(m*m-1);w=T=>{const S=Math.exp(-m*b*T),_=Math.min(x*T,300);return a-S*((p+m*b*y)*Math.sinh(_)+x*y*Math.cosh(_))/x}}return{calculatedDuration:f&&c||null,next:x=>{const T=w(x);if(f)o.done=x>=c;else{let S=0;m<1&&(S=x===0?fi(p):fT(w,x,T));const _=Math.abs(S)<=n,N=Math.abs(a-T)<=t;o.done=_&&N}return o.value=o.done?a:T,o}}}function mT({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 y=n*t;const b=d+y,g=o===void 0?b:o(b);g!==b&&(y=g-d);const w=D=>-y*Math.exp(-D/r),x=D=>g+w(D),T=D=>{const V=w(D),P=x(D);f.done=Math.abs(V)<=l,f.value=f.done?g:P};let S,_;const N=D=>{p(f.value)&&(S=D,_=hT({keyframes:[f.value,m(f.value)],velocity:fT(x,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 d4=qu(.42,0,1,1),f4=qu(0,0,.58,1),gT=qu(.42,0,.58,1),p4=e=>Array.isArray(e)&&typeof e[0]!="number",Gg=e=>Array.isArray(e)&&typeof e[0]=="number",yT={linear:Zt,easeIn:d4,easeInOut:gT,easeOut:f4,circIn:Ig,circInOut:jE,circOut:BE,backIn:Pg,backInOut:ME,backOut:LE,anticipate:FE},vT=e=>{if(Gg(e)){Og(e.length===4);const[t,n,r,i]=e;return qu(t,n,r,i)}else if(typeof e=="string")return Og(yT[e]!==void 0),yT[e];return e},h4=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(h4),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 m4({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 Wd(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)},g4=[Hg,Xa,ts],y4=e=>g4.find(t=>t.test(e));function wT(e){const t=y4(e);if(!t)return!1;let n=t.parse(e);return t===ts&&(n=m4(n)),n}const bT=(e,t)=>{const n=wT(e),r=wT(t);if(!n||!r)return Wd(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),Xa.transform(i))},Qg=new Set(["none","hidden"]);function v4(e,t){return Qg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function w4(e,t){return n=>pt(e,t,n)}function Zg(e){return typeof e=="number"?w4:typeof e=="string"?Dg(e)?Wd:Jt.test(e)?bT:E4:Array.isArray(e)?xT:typeof e=="object"?Jt.test(e)?bT:b4:Wd}function xT(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 b4(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 x4(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 E4=(e,t)=>{const n=ta.createTransformer(t),r=Qu(e),i=Qu(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?v4(e,t):hi(xT(x4(r,i),i.values),n):Wd(e,t)};function ET(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Zg(e)(e,t)}function T4(e,t,n){const r=[],i=n||ET,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]||Zt:t;s=hi(u,s)}r.push(s)}return r}function _4(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=T4(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(Ji(e[0],e[a-1],l)):u}function S4(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 C4(e){const t=[0];return S4(t,e.length-1),t}function A4(e,t){return e.map(n=>n*t)}function k4(e,t){return e.map(()=>t||gT).splice(0,e.length-1)}function Yd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=p4(r)?r.map(vT):vT(r),a={done:!1,value:t[0]},o=A4(n&&n.length===t.length?n:C4(t),e),s=_4(o,t,{ease:Array.isArray(i)?i:k4(t,i)});return{calculatedDuration:e,next:u=>(a.value=s(u),a.done=u>=e,a)}}const TT=2e4;function R4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<TT;)t+=n,r=e.next(t);return t>=TT?1/0:t}const N4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Zi(t),now:()=>$t.isProcessing?$t.timestamp:Ur.now()}},P4={decay:mT,inertia:mT,tween:Yd,keyframes:Yd,spring:hT},I4=e=>e/100;class Jg extends cT{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:P4[n]||Yd;let u,l;s!==Yd&&typeof t[0]!="number"&&(u=hi(I4,ET(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=R4(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:y,onUpdate:b}=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 g=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=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,y&&(P-=y/d)):m==="mirror"&&(T=o)),x=Ji(0,1,P)*d}const S=w?{done:!1,value:u[0]}:T.next(x);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=Hd(u,this.options,i)),b&&b(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?pi(t.calculatedDuration):0}get time(){return pi(this.currentTime)}set time(t){t=fi(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=pi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=N4,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 _T=new Set(["opacity","clipPath","filter","transform"]),O4=10,D4=(e,t)=>{let n="";const r=Math.max(Math.round(t/O4),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 L4={linearEasing:void 0};function M4(e,t){const n=e0(e);return()=>{var r;return(r=L4[t])!==null&&r!==void 0?r:n()}}const qd=M4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function ST(e){return!!(typeof e=="function"&&qd()||!e||typeof e=="string"&&(e in t0||qd())||Gg(e)||Array.isArray(e)&&e.every(ST))}const Zu=([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:Zu([0,.65,.55,1]),circOut:Zu([.55,0,1,.45]),backIn:Zu([.31,.01,.66,-.59]),backOut:Zu([.33,1.53,.69,.99])};function CT(e,t){if(e)return typeof e=="function"&&qd()?D4(e,t):Gg(e)?Zu(e):Array.isArray(e)?e.map(n=>CT(n,t)||t0.easeOut):t0[e]}function F4(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=CT(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 AT(e,t){e.timeline=t,e.onfinish=null}const B4=e0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gd=10,j4=2e4;function U4(e){return Wg(e.type)||e.type==="spring"||!ST(e.ease)}function H4(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<j4;)r=n.sample(a),i.push(r.value),a+=Gd;return{times:void 0,keyframes:i,duration:a-Gd,ease:"linear"}}const kT={anticipate:FE,backInOut:ME,circInOut:jE};function z4(e){return e in kT}class RT extends cT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new uT(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"&&qd()&&z4(o)&&(o=kT[o]),U4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...b}=this.options,g=H4(t,b);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,a=g.times,o=g.ease,s="keyframes"}const d=F4(u.owner.current,l,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(AT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Hd(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 pi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return pi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fi(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 Zt;const{animation:r}=n;AT(r,t)}return Zt}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}),y=fi(this.time);l.setWithVelocity(m.sample(y-Gd).value,m.sample(y).value,Gd)}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 B4()&&r&&_T.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const V4=e0(()=>window.ScrollTimeline!==void 0);class $4{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=>V4()&&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 W4({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-fi(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};W4(s)||(c={...c,...dL(e,c)}),c.duration&&(c.duration=fi(c.duration)),c.repeatDelay&&(c.repeatDelay=fi(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=Hd(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new $4([])}return!a&&RT.supports(c)?new RT(c):new Jg(c)},Y4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),q4=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 NT=30,G4=e=>!isNaN(parseFloat(e));class K4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ur.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=Ur.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=G4(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=Ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>NT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,NT);return dT(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 Ju(e,t){return new K4(e,t)}function X4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ju(n))}function Q4(e,t){const n=Ud(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=q4(a[o]);X4(e,o,s)}}const Kd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),PT="data-"+Kd("framerAppearId");function IT(e){return e.props[PT]}const en=e=>!!(e&&e.getVelocity);function Z4(e){return!!(en(e)&&e.add)}function o0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(Z4(n))return n.add(t)}function J4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function OT(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&&J4(c,d))continue;const m={delay:n,...Rg(o||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=IT(e);if(g){const w=window.MotionHandoffAnimation(g,d,Xe);w!==null&&(m.startTime=w,y=!0)}}o0(e,d),f.start(n0(d,f,p,e.shouldReduceMotion&&Qi.has(d)?{type:!1}:m,e,y));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&Q4(e,s)})}),l}function s0(e,t,n={}){var r;const i=Ud(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(OT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return eM(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 eM(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(tM).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 tM(e,t){return e.sortNodePosition(t)}function nM(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"?Ud(e,t,n.custom):t;r=Promise.all(OT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rM=kg.length;function DT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?DT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<rM;n++){const r=kg[n],i=e.props[r];(Wu(i)||i===!1)&&(t[r]=i)}return t}const iM=[...Ag].reverse(),aM=Ag.length;function oM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nM(e,n,r)))}function sM(e){let t=oM(e),n=LT(),r=!0;const i=u=>(l,c)=>{var d;const f=Ud(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function a(u){t=u(e)}function o(u){const{props:l}=e,c=DT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let b=0;b<aM;b++){const g=iM[b],w=n[g],x=l[g]!==void 0?l[g]:c[g],T=Wu(x),S=g===u?w.isActive:null;S===!1&&(m=b);let _=x===c[g]&&x!==l[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),w.protectedKeys={...p},!w.isActive&&S===null||!x&&!w.prevProp||$u(x)||typeof x=="boolean")continue;const N=uM(w.prevProp,x);let D=N||g===u&&w.isActive&&!_&&T||b>m&&T,V=!1;const P=Array.isArray(x)?x:[x];let $=P.reduce(i(g),{});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=!RE(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=x,w.prevResolvedValues=$,w.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(_&&N)||V)&&d.push(...P.map(ee=>({animation:ee,options:{type:g}})))}if(f.size){const b={};f.forEach(g=>{const w=e.getBaseTarget(g),x=e.getValue(g);x&&(x.liveStyle=!0),b[g]=w??null}),d.push({animation:b})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?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=LT(),r=!0}}}function uM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!RE(t,e):!1}function Qa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function LT(){return{animate:Qa(!0),whileInView:Qa(),whileHover:Qa(),whileTap:Qa(),whileDrag:Qa(),whileFocus:Qa(),exit:Qa()}}class na{constructor(t){this.isMounted=!1,this.node=t}update(){}}class lM extends na{constructor(t){super(t),t.animationState||(t.animationState=sM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$u(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 cM=0;class dM extends na{constructor(){super(...arguments),this.id=cM++}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 fM={animation:{Feature:lM},exit:{Feature:dM}},MT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Xd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const pM=e=>t=>MT(t)&&e(t,Xd(t));function mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gi(e,t,n,r){return mi(e,t,pM(n),r)}const FT=(e,t)=>Math.abs(e-t);function hM(e,t){const n=FT(e.x,t.x),r=FT(e.y,t.y);return Math.sqrt(n**2+r**2)}class BT{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=hM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=$t;this.history.push({...m,timestamp:y});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(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:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=l0(d.type==="pointercancel"?this.lastMoveEventInfo:u0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!MT(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Xd(t),s=u0(o,this.transformPagePoint),{point:u}=s,{timestamp:l}=$t;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,l0(s,this.history)),this.removeListeners=hi(gi(this.contextWindow,"pointermove",this.handlePointerMove),gi(this.contextWindow,"pointerup",this.handlePointerUp),gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zi(this.updatePoint)}}function u0(e,t){return t?{point:t(e.point)}:e}function jT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function l0({point:e},t){return{point:e,delta:jT(e,UT(t)),offset:jT(e,mM(t)),velocity:gM(t,.1)}}function mM(e){return e[0]}function UT(e){return e[e.length-1]}function gM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=UT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>fi(t)));)n--;if(!r)return{x:0,y:0};const a=pi(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 HT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zT=HT("dragHorizontal"),VT=HT("dragVertical");function $T(e){let t=!1;if(e==="y")t=VT();else if(e==="x")t=zT();else{const n=zT(),r=VT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function WT(){const e=$T(!0);return e?(e(),!1):!0}function rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const YT=1e-4,yM=1-YT,vM=1+YT,qT=.01,wM=0-qT,bM=0+qT;function Un(e){return e.max-e.min}function xM(e,t,n){return Math.abs(e-t)<=n}function GT(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>=yM&&e.scale<=vM||isNaN(e.scale))&&(e.scale=1),(e.translate>=wM&&e.translate<=bM||isNaN(e.translate))&&(e.translate=0)}function el(e,t,n,r){GT(e.x,t.x,n.x,r?r.originX:void 0),GT(e.y,t.y,n.y,r?r.originY:void 0)}function KT(e,t,n){e.min=n.min+t.min,e.max=e.min+Un(t)}function EM(e,t,n){KT(e.x,t.x,n.x),KT(e.y,t.y,n.y)}function XT(e,t,n){e.min=t.min-n.min,e.max=e.min+Un(t)}function tl(e,t,n){XT(e.x,t.x,n.x),XT(e.y,t.y,n.y)}function TM(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 QT(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 _M(e,{top:t,left:n,bottom:r,right:i}){return{x:QT(e.x,n,i),y:QT(e.y,t,r)}}function ZT(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 SM(e,t){return{x:ZT(e.x,t.x),y:ZT(e.y,t.y)}}function CM(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)),Ji(0,1,n)}function AM(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 kM(e=c0){return e===!1?e=0:e===!0&&(e=c0),{x:JT(e,"left","right"),y:JT(e,"top","bottom")}}function JT(e,t,n){return{min:e2(e,t),max:e2(e,n)}}function e2(e,t){return typeof e=="number"?e:e[t]||0}const t2=()=>({translate:0,scale:1,origin:0,originPoint:0}),is=()=>({x:t2(),y:t2()}),n2=()=>({min:0,max:0}),Tt=()=>({x:n2(),y:n2()});function nr(e){return[e("x"),e("y")]}function r2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function RM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NM(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 Za(e){return f0(e)||i2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function i2(e){return a2(e.x)||a2(e.y)}function a2(e){return e&&e!=="0%"}function Qd(e,t,n){const r=e-n,i=t*r;return n+i}function o2(e,t,n,r,i){return i!==void 0&&(e=Qd(e,i,r)),Qd(e,n,r)+t}function p0(e,t=0,n=1,r,i){e.min=o2(e.min,t,n,r,i),e.max=o2(e.max,t,n,r,i)}function s2(e,{x:t,y:n}){p0(e.x,t.translate,t.scale,t.originPoint),p0(e.y,n.translate,n.scale,n.originPoint)}const u2=.999999999999,l2=1.0000000000001;function PM(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,s2(e,o)),r&&Za(a.latestValues)&&os(e,a.latestValues))}t.x<l2&&t.x>u2&&(t.x=1),t.y<l2&&t.y>u2&&(t.y=1)}function as(e,t){e.min=e.min+t,e.max=e.max+t}function c2(e,t,n,r,i=.5){const a=pt(e.min,e.max,i);p0(e,t,n,a,r)}function os(e,t){c2(e.x,t.x,t.scaleX,t.scale,t.originX),c2(e.y,t.y,t.scaleY,t.scale,t.originY)}function d2(e,t){return r2(NM(e.getBoundingClientRect(),t))}function IM(e,t,n){const r=d2(e,n),{scroll:i}=t;return i&&(as(r.x,i.offset.x),as(r.y,i.offset.y)),r}const f2=({current:e})=>e?e.ownerDocument.defaultView:null,OM=new WeakMap;class DM{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=Tt(),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(Xd(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$T(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),nr(b=>{let g=this.getAxisMotionValue(b).get()||0;if(jr.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[b];x&&(g=Un(x)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Xe.postRender(()=>m(c,d)),o0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=LM(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>nr(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 BT(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:f2(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||!Zd(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=TM(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=_M(i.layoutBox,n):this.constraints=!1,this.elastic=kM(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=AM(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=IM(r,i.root,this.visualElement.getTransformPagePoint());let o=SM(i.layout.layoutBox,a);if(n){const s=n(RM(o));this.hasMutatedConstraints=!!s,s&&(o=r2(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=nr(c=>{if(!Zd(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(){nr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nr(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){nr(n=>{const{drag:r}=this.getProps();if(!Zd(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};nr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const u=s.get();i[o]=CM({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(),nr(o=>{if(!Zd(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;OM.set(this.visualElement,this);const t=this.visualElement.current,n=gi(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=mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(nr(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 Zd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function LM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class MM extends na{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new DM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const p2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class FM extends na{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new BT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:f2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:p2(t),onStart:p2(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=gi(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 Jd=v.createContext(null);function BM(){const e=v.useContext(Jd);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({}),h2=v.createContext({}),ef={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function m2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=m2(e,t.target.x),r=m2(e,t.target.y);return`${n}% ${r}%`}},jM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ta.parse(e);if(i.length>5)return r;const a=ta.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)}},tf={};function UM(e){Object.assign(tf,e)}const{schedule:m0,cancel:_ie}=PE(queueMicrotask,!1);class HM extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;UM(zM),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()})),ef.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 g2(e){const[t,n]=BM(),r=v.useContext(h0);return E.jsx(HM,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(h2),isPresent:t,safeToRemove:n})}const zM={borderRadius:{...nl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nl,borderTopRightRadius:nl,borderBottomLeftRadius:nl,borderBottomRightRadius:nl,boxShadow:jM},y2=["TopLeft","TopRight","BottomLeft","BottomRight"],VM=y2.length,v2=e=>typeof e=="string"?parseFloat(e):e,w2=e=>typeof e=="number"||ye.test(e);function $M(e,t,n,r,i,a){i?(e.opacity=pt(0,n.opacity!==void 0?n.opacity:1,WM(r)),e.opacityExit=pt(t.opacity!==void 0?t.opacity:1,0,YM(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<VM;o++){const s=`border${y2[o]}Radius`;let u=b2(t,s),l=b2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||w2(u)===w2(l)?(e[s]=Math.max(pt(v2(u),v2(l),r),0),(jr.test(l)||jr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function b2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const WM=x2(0,.5,BE),YM=x2(.5,.95,Zt);function x2(e,t,n){return r=>r<e?0:r>t?1:n(ns(e,t,r))}function E2(e,t){e.min=t.min,e.max=t.max}function rr(e,t){E2(e.x,t.x),E2(e.y,t.y)}function T2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _2(e,t,n,r,i){return e-=t,e=Qd(e,1/n,r),i!==void 0&&(e=Qd(e,1/i,r)),e}function qM(e,t=0,n=1,r=.5,i,a=e,o=e){if(jr.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=_2(e.min,t,n,s,i),e.max=_2(e.max,t,n,s,i)}function S2(e,t,[n,r,i],a,o){qM(e,t[n],t[r],t[i],t.scale,a,o)}const GM=["x","scaleX","originX"],KM=["y","scaleY","originY"];function C2(e,t,n,r){S2(e.x,t,GM,n?n.x:void 0,r?r.x:void 0),S2(e.y,t,KM,n?n.y:void 0,r?r.y:void 0)}function A2(e){return e.translate===0&&e.scale===1}function k2(e){return A2(e.x)&&A2(e.y)}function R2(e,t){return e.min===t.min&&e.max===t.max}function XM(e,t){return R2(e.x,t.x)&&R2(e.y,t.y)}function N2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function P2(e,t){return N2(e.x,t.x)&&N2(e.y,t.y)}function I2(e){return Un(e.x)/Un(e.y)}function O2(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 ZM(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 JM=(e,t)=>e.depth-t.depth;class e5{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(JM),this.isDirty=!1,this.children.forEach(t)}}function nf(e){const t=en(e)?e.get():e;return Y4(t)?t.toValue():t}function t5(e,t){const n=Ur.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Zi(r),e(a-t))};return Xe.read(r,!0),()=>Zi(r)}function n5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function r5(e,t,n){const r=en(e)?e:Ju(e);return r.start(n0("",r,t,n)),r.animation}const Ja={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rl=typeof window<"u"&&window.MotionDebug!==void 0,g0=["","X","Y","Z"],i5={visibility:"hidden"},D2=1e3;let a5=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 L2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=IT(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&&L2(r)}function M2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=a5++,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,rl&&(Ja.totalNodes=Ja.resolvedTargetDeltas=Ja.recalculatedProjection=0),this.nodes.forEach(u5),this.nodes.forEach(p5),this.nodes.forEach(h5),this.nodes.forEach(l5),rl&&window.MotionDebug.record(Ja)},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 e5)}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=n5(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=t5(f,250),ef.hasAnimatedSinceResize&&(ef.hasAnimatedSinceResize=!1,this.nodes.forEach(B2))})}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 y=this.options.transition||c.getDefaultTransition()||w5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=c.getProps(),w=!this.targetLayout||!P2(this.targetLayout,m)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={...Rg(y,"layout"),onPlay:b,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||B2(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,Zi(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(m5),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&&L2(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(F2);return}this.isUpdating||this.nodes.forEach(d5),this.isUpdating=!1,this.nodes.forEach(f5),this.nodes.forEach(o5),this.nodes.forEach(s5),this.clearAllSnapshots();const s=Ur.now();$t.delta=Ji(0,1e3/60,s-$t.timestamp),$t.timestamp=s,$t.isProcessing=!0,Ng.update.process($t),Ng.preRender.process($t),Ng.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(c5),this.sharedNodes.forEach(g5)}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=Tt(),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&&!k2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&(s||Za(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)),b5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Tt();const u=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(x5))){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=Tt();if(rr(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&&rr(u,o),as(u.x,d.offset.x),as(u.y,d.offset.y))}return u}applyTransform(o,s=!1){const u=Tt();rr(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}),Za(c.latestValues)&&os(u,c.latestValues)}return Za(this.latestValues)&&os(u,this.latestValues),u}removeTransform(o){const s=Tt();rr(s,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Za(l.latestValues))continue;f0(l.latestValues)&&l.updateSnapshot();const c=Tt(),d=l.measurePageBox();rr(c,d),C2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Za(this.latestValues)&&C2(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!==$t.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=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),tl(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Tt(),this.targetWithTransforms=Tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rr(this.target,this.layout.layoutBox),s2(this.target,this.targetDelta)):rr(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=Tt(),this.relativeTargetOrigin=Tt(),tl(this.relativeTargetOrigin,this.target,p.target),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}rl&&Ja.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||f0(this.parent.latestValues)||i2(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===$t.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;rr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;PM(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=Tt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(T2(this.prevProjectionDelta.x,this.projectionDelta.x),T2(this.prevProjectionDelta.y,this.projectionDelta.y)),el(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!O2(this.projectionDelta.x,this.prevProjectionDelta.x)||!O2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),rl&&Ja.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=Tt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),g=!b||b.members.length<=1,w=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(v5));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const S=T/1e3;j2(d.x,o.x,S),j2(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),y5(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&XM(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Tt()),rr(x,this.relativeTarget)),y&&(this.animationValues=c,$M(c,l,this.latestValues,S,w,g)),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&&(Zi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{ef.hasAnimatedSinceResize=!0,this.currentAnimation=r5(0,D2,{...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(D2),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&&$2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Tt();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}rr(s,u),os(s,c),el(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 i5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=nf(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 y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=nf(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=ZM(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 y in tf){if(f[y]===void 0)continue;const{correct:b,applyTo:g}=tf[y],w=l.transform==="none"?f[y]:b(f[y],d);if(g){const x=g.length;for(let T=0;T<x;T++)l[g[T]]=w}else l[y]=w}return this.options.layoutId&&(l.pointerEvents=d===this?nf(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(F2),this.root.sharedNodes.clear()}}}function o5(e){e.updateLayout()}function s5(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"?nr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(f);f.min=r[d].min,f.max=f.min+p}):$2(a,n.layoutBox,r)&&nr(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();el(s,r,n.layoutBox);const u=is();o?el(u,e.applyTransform(i,!0),n.measuredBox):el(u,r,n.layoutBox);const l=!k2(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=Tt();tl(m,n.layoutBox,f.layoutBox);const y=Tt();tl(y,r,p.layoutBox),P2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,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 u5(e){rl&&Ja.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 l5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function c5(e){e.clearSnapshot()}function F2(e){e.clearMeasurements()}function d5(e){e.isLayoutDirty=!1}function f5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function B2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function p5(e){e.resolveTargetDelta()}function h5(e){e.calcProjection()}function m5(e){e.resetSkewAndRotation()}function g5(e){e.removeLeadSnapshot()}function j2(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 U2(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function y5(e,t,n,r){U2(e.x,t.x,n.x,r),U2(e.y,t.y,n.y,r)}function v5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const w5={duration:.45,ease:[.4,0,.1,1]},H2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),z2=H2("applewebkit/")&&!H2("chrome/")?Math.round:Zt;function V2(e){e.min=z2(e.min),e.max=z2(e.max)}function b5(e){V2(e.x),V2(e.y)}function $2(e,t,n){return e==="position"||e==="preserve-aspect"&&!xM(I2(t),I2(n),.2)}function x5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const E5=M2({attachResizeListener:(e,t)=>mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),v0={current:void 0},W2=M2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!v0.current){const e=new E5({});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"}),T5={pan:{Feature:FM},drag:{Feature:MM,ProjectionNode:W2,MeasureLayout:g2}};function Y2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||WT())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 gi(e.current,n,i,{passive:!e.getProps()[r]})}class _5 extends na{mount(){this.unmount=hi(Y2(this.node,!0),Y2(this.node,!1))}unmount(){}}class S5 extends na{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=hi(mi(this.node.current,"focus",()=>this.onFocus()),mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const q2=(e,t)=>t?e===t?!0:q2(e,t.parentElement):!1;function w0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Xd(n))}class C5 extends na{constructor(){super(...arguments),this.removeStartListeners=Zt,this.removeEndListeners=Zt,this.removeAccessibleListeners=Zt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=gi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!q2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),o=gi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=hi(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=mi(this.node.current,"keyup",o),w0("down",(s,u)=>{this.startPress(s,u)})},n=mi(this.node.current,"keydown",t),r=()=>{this.isPressing&&w0("cancel",(a,o)=>this.cancelPress(a,o))},i=mi(this.node.current,"blur",r);this.removeAccessibleListeners=hi(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),!WT()}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=gi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=mi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=hi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const b0=new WeakMap,x0=new WeakMap,A5=e=>{const t=b0.get(e.target);t&&t(e)},k5=e=>{e.forEach(A5)};function R5({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(k5,{root:e,...t})),r[i]}function N5(e,t,n){const r=R5(t);return b0.set(e,n),r.observe(e),()=>{b0.delete(e),r.unobserve(e)}}const P5={some:0,all:1};class I5 extends na{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:P5[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 N5(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(O5(t,n))&&this.startObserver()}unmount(){}}function O5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const D5={inView:{Feature:I5},tap:{Feature:C5},focus:{Feature:S5},hover:{Feature:_5}},L5={layout:{ProjectionNode:W2,MeasureLayout:g2}},E0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rf=v.createContext({}),T0=typeof window<"u",G2=T0?v.useLayoutEffect:v.useEffect,K2=v.createContext({strict:!1});function M5(e,t,n,r,i){var a,o;const{visualElement:s}=v.useContext(rf),u=v.useContext(K2),l=v.useContext(Jd),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(h2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&F5(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[PT],y=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 G2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),m0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function F5(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:X2(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 X2(e){if(e)return e.options.allowProjection!==!1?e.projection:X2(e.parent)}function B5(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 af(e){return $u(e.animate)||kg.some(t=>Wu(e[t]))}function Q2(e){return!!(af(e)||e.variants)}function j5(e,t){if(af(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wu(n)?n:void 0,animate:Wu(r)?r:void 0}}return e.inherit!==!1?t:{}}function U5(e){const{initial:t,animate:n}=j5(e,v.useContext(rf));return v.useMemo(()=>({initial:t,animate:n}),[Z2(t),Z2(n)])}function Z2(e){return Array.isArray(e)?e.join(" "):e}const J2={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 J2)ss[e]={isEnabled:t=>J2[e].some(n=>!!t[n])};function H5(e){for(const t in e)ss[t]={...ss[t],...e[t]}}const z5=Symbol.for("motionComponentSymbol");function V5({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&H5(e);function a(s,u){let l;const c={...v.useContext(E0),...s,layoutId:$5(s)},{isStatic:d}=c,f=U5(s),p=r(s,d);if(!d&&T0){W5();const m=Y5(c);l=m.MeasureLayout,f.visualElement=M5(i,p,c,t,m.ProjectionNode)}return E.jsxs(rf.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,B5(p,f.visualElement,u),p,d,f.visualElement)]})}const o=v.forwardRef(a);return o[z5]=i,o}function $5({layoutId:e}){const t=v.useContext(h0).id;return t&&e!==void 0?t+"-"+e:e}function W5(e,t){v.useContext(K2).strict}function Y5(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 q5=["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:!!(q5.indexOf(e)>-1||/[A-Z]/u.test(e))}function e_(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 t_=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 n_(e,t,n,r){e_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(t_.has(i)?i:Kd(i),t.attrs[i])}function r_(e,{layout:t,layoutId:n}){return Qi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!tf[e]||e==="opacity")}function S0(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(en(i[o])||t.style&&en(t.style[o])||r_(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 i_(e,t,n){const r=S0(e,t,n);for(const i in e)if(en(e[i])||en(t[i])){const a=Yu.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 G5(e){if(Qi.has(e))return"transform";if(_T.has(e))return Kd(e)}function K5({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const u={latestValues:X5(i,a,o,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const a_=e=>(t,n)=>{const r=v.useContext(rf),i=v.useContext(Jd),a=()=>K5(e,t,r,i,n);return n?a():C0(a)};function o_(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 X5(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 b in l)o[b]=nf(l[b]);let{initial:c,animate:d}=e;const f=af(e),p=Q2(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 y=m?d:c;return y&&typeof y!="boolean"&&!$u(y)&&o_(e,y,(b,g)=>{for(const w in b){let x=b[w];if(Array.isArray(x)){const T=m?x.length-1:0;x=x[T]}x!==null&&(o[w]=x)}for(const w in g)o[w]=g[w]}),u&&(d&&c!==!1&&!$u(d)&&o_(e,d,b=>{for(const g in b){const w=G5(g);w&&s.add(w)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const A0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),s_=()=>({...A0(),attrs:{}}),u_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Q5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Z5=Yu.length;function J5(e,t,n){let r="",i=!0;for(let a=0;a<Z5;a++){const o=Yu[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=u_(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(Qi.has(u)){o=!0;continue}else if(VE(u)){i[u]=l;continue}else{const c=u_(l,Vg[u]);u.startsWith("origin")?(s=!0,a[u]=c):r[u]=c}}if(t.transform||(o||n?r.transform=J5(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 l_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function e8(e,t,n){const r=l_(t,e.x,e.width),i=l_(n,e.y,e.height);return`${r} ${i}`}const t8={offset:"stroke-dashoffset",array:"stroke-dasharray"},n8={offset:"strokeDashoffset",array:"strokeDasharray"};function r8(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?t8:n8;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=e8(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&&r8(f,o,s,u,!1)}const N0=e=>typeof e=="string"&&e.toLowerCase()==="svg",i8={useVisualState:a_({scrapeMotionValuesFromProps:i_,createRenderState:s_,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),n_(t,n)})}})},a8={useVisualState:a_({applyWillChange:!0,scrapeMotionValuesFromProps:S0,createRenderState:A0})};function c_(e,t,n){for(const r in t)!en(t[r])&&!r_(r,n)&&(e[r]=t[r])}function o8({transformTemplate:e},t){return v.useMemo(()=>{const n=A0();return k0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function s8(e,t){const n=e.style||{},r={};return c_(r,n,e),Object.assign(r,o8(e,t)),r}function u8(e,t){const n={},r=s8(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 l8=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 of(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||l8.has(e)}let d_=e=>!of(e);function c8(e){e&&(d_=t=>t.startsWith("on")?!of(t):e(t))}try{c8(require("@emotion/is-prop-valid").default)}catch{}function d8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(d_(i)||n===!0&&of(i)||!t&&!of(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function f8(e,t,n,r){const i=v.useMemo(()=>{const a=s_();return R0(a,t,N0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};c_(a,e.style,e),i.style={...a,...i.style}}return i}function p8(e=!1){return(n,r,i,{latestValues:a},o)=>{const u=(_0(n)?f8:u8)(r,a,o,n),l=d8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>en(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function h8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={..._0(r)?i8:a8,preloadedFeatures:e,useRender:p8(i),createVisualElement:t,Component:r};return V5(o)}}const P0={current:null},f_={current:!1};function m8(){if(f_.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 g8(e,t,n){for(const r in t){const i=t[r],a=n[r];if(en(i))e.addValue(r,i);else if(en(a))e.addValue(r,Ju(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,Ju(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const p_=new WeakMap,y8=[...XE,Jt,ta],v8=e=>y8.find(KE(e)),h_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class w8{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=Ur.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=af(n),this.isVariantNode=Q2(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&&en(p)&&p.set(u[f],!1)}}mount(t){this.current=t,p_.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)),f_.current||m8(),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(){p_.delete(this.current),this.projection&&this.projection.unmount(),Zi(this.notifyUpdate),Zi(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=Qi.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):Tt()}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<h_.length;r++){const i=h_[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=g8(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=Ju(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"&&(HE(i)||UE(i))?i=parseFloat(i):!v8(i)&&ta.test(n)&&(i=sT(t,n)),this.setBaseTarget(t,en(i)?i.get():i)),en(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&&!en(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 m_ extends w8{constructor(){super(...arguments),this.KeyframeResolver=uT}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 b8(e){return window.getComputedStyle(e)}class x8 extends m_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=e_}readValueFromInstance(t,n){if(Qi.has(n)){const r=$g(n);return r&&r.default||0}else{const r=b8(t),i=(VE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return d2(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;en(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class E8 extends m_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qi.has(n)){const r=$g(n);return r&&r.default||0}return n=t_.has(n)?n:Kd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return i_(t,n,r)}build(t,n,r){R0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){n_(t,n,r,i)}mount(t){this.isSVGTag=N0(t.tagName),super.mount(t)}}const T8=(e,t)=>_0(e)?new E8(t):new x8(t,{allowProjection:e!==v.Fragment}),_8=h8({...fM,...D5,...T5,...L5},T8),us=oL(_8);class S8 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 C8({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 c6=typeof WeakMap=="function"?WeakMap:Map;function _x(e,t,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Td||(Td=!0,cg=r),Km(e,t)},n}function Sx(e,t,n){n=ui(-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"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Cx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new c6;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=_6.bind(null,e,t,n),t.then(e,e))}function Ax(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 kx(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=ui(-1,1),t.tag=2,$i(n,t,1))),n.lanes|=1),e)}var d6=ni.ReactCurrentOwner,bn=!1;function dn(e,t,n,r){t.child=e===null?Gb(t,null,n,r):Vo(t,e.child,n,r)}function Rx(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,li(e,t,i)):(ot&&n&&Tm(t),t.flags|=1,dn(e,t,r,i),t.child)}function Nx(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,Px(e,t,a,r,i)):(e=Rd(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:Eu,n(o,r)&&e.ref===t.ref)return li(e,t,i)}return t.flags|=1,e=Xi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Px(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Eu(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,li(e,t,i)}return Xm(e,t,n,r,i)}function Ix(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 dn(e,t,i,n),t.child}function Ox(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)?Ba:Gt.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,li(e,t,i)):(ot&&r&&Tm(t),t.flags|=1,dn(e,t,n,i),t.child)}function Dx(e,t,n,r,i){if(wn(n)){var a=!0;ed(t)}else a=!1;if(Wo(t,i),t.stateNode===null)vd(e,t),Ex(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=Zn(l):(l=wn(n)?Ba:Gt.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)&&Tx(t,o,r,l),Vi=!1;var f=t.memoizedState;o.state=f,ld(t,r,o,i),u=t.memoizedState,s!==r||f!==u||vn.current||Vi?(typeof c=="function"&&(Ym(t,n,c,r),u=t.memoizedState),(s=Vi||xx(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,Xb(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vr(t.type,s),o.props=l,d=t.pendingProps,f=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Zn(u):(u=wn(n)?Ba:Gt.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)&&Tx(t,o,r,u),Vi=!1,f=t.memoizedState,o.state=f,ld(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||vn.current||Vi?(typeof p=="function"&&(Ym(t,n,p,r),m=t.memoizedState),(l=Vi||xx(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){Ox(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&jb(t,n,!1),li(e,t,a);r=t.stateNode,d6.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)):dn(e,t,s,a),t.memoizedState=r.state,i&&jb(t,n,!0),t.child}function Lx(e){var t=e.stateNode;t.pendingContext?Fb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fb(e,t.context,!1),Dm(e,t.containerInfo)}function Mx(e,t,n,r,i){return zo(),Am(i),t.flags|=256,dn(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 Fx(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=Nd(o,r,0,null),e=Ga(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 f6(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=Xi(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Xi(s,a):(a=Ga(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=Xi(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=Nd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yd(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 f6(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=Gm(Error(Q(422))),yd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Nd({mode:"visible",children:r.children},i,0,null),a=Ga(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 yd(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),yd(e,t,o,r)}if(s=(o&e.childLanes)!==0,bn||s){if(r=Lt,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,si(e,i),xr(r,e,i,-1))}return gg(),r=Gm(Error(Q(421))),yd(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=S6.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fn=ji(i.nextSibling),Mn=t,ot=!0,yr=null,e!==null&&(Xn[Qn++]=ai,Xn[Qn++]=oi,Xn[Qn++]=ja,ai=e.id,oi=e.overflow,ja=t),t=eg(t,r.children),t.flags|=4096,t)}function Bx(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 jx(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(dn(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&&Bx(e,n,t);else if(e.tag===19)Bx(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&&cd(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&&cd(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 vd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function li(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$a|=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=Xi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function p6(e,t,n){switch(t.tag){case 3:Lx(t),zo();break;case 5:Jb(t);break;case 1:wn(t.type)&&ed(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;et(od,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?Fx(e,t,n):(et(dt,dt.current&1),e=li(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 jx(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,Ix(e,t,n)}return li(e,t,n)}var Ux,ng,Hx,zx;Ux=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(){},Hx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,za(Mr.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=Qc)}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"&&(tu.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"&&(tu.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)}},zx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fu(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 Xt(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 h6(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 Xt(t),null;case 1:return wn(t.type)&&Jc(),Xt(t),null;case 3:return r=t.stateNode,Yo(),rt(vn),rt(Gt),Fm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(id(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(pg(yr),yr=null))),ng(e,t),Xt(t),null;case 5:Lm(t);var i=za(Iu.current);if(n=t.type,e!==null&&t.stateNode!=null)Hx(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 Xt(t),null}if(e=za(Mr.current),id(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Lr]=t,r[Au]=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<_u.length;i++)nt(_u[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":Ew(r,a),nt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},nt("invalid",r);break;case"textarea":Sw(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&&Xc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Xc(r.textContent,s,e),i=["children",""+s]):tu.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&nt("scroll",r)}switch(n){case"input":Ac(r),_w(r,a,!0);break;case"textarea":Ac(r),Aw(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Qc)}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=kw(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[Lr]=t,e[Au]=r,Ux(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<_u.length;i++)nt(_u[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":Ew(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":Sw(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"?Pw(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Rw(e,u)):a==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&au(e,u):typeof u=="number"&&au(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(tu.hasOwnProperty(a)?u!=null&&a==="onScroll"&&nt("scroll",e):u!=null&&bh(e,a,u,o))}switch(n){case"input":Ac(e),_w(e,r,!1);break;case"textarea":Ac(e),Aw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ii(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=Qc)}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 Xt(t),null;case 6:if(e&&t.stateNode!=null)zx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Q(166));if(n=za(Iu.current),za(Mr.current),id(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lr]=t,(a=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:Xc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Xc(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lr]=t,t.stateNode=r}return Xt(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))Wb(),zo(),t.flags|=98560,a=!1;else if(a=id(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[Lr]=t}else zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),a=!1}else yr!==null&&(pg(yr),yr=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?It===0&&(It=3):gg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Yo(),ng(e,t),e===null&&Su(t.stateNode.containerInfo),Xt(t),null;case 10:return Nm(t.type._context),Xt(t),null;case 17:return wn(t.type)&&Jc(),Xt(t),null;case 19:if(rt(dt),a=t.memoizedState,a===null)return Xt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Fu(a,!1);else{if(It!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=cd(e),o!==null){for(t.flags|=128,Fu(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&&Et()>Xo&&(t.flags|=128,r=!0,Fu(a,!1),t.lanes=4194304)}else{if(!r)if(e=cd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ot)return Xt(t),null}else 2*Et()-a.renderingStartTime>Xo&&n!==1073741824&&(t.flags|=128,r=!0,Fu(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=Et(),t.sibling=null,n=dt.current,et(dt,r?n&1|2:n&1),t):(Xt(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&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function m6(e,t){switch(_m(t),t.tag){case 1:return wn(t.type)&&Jc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(),rt(vn),rt(Gt),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 wd=!1,Qt=!1,g6=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 Vx=!1;function y6(e,t){if(mm=jc,e=xb(),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},jc=!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 y=m.memoizedProps,b=m.memoizedState,g=t.stateNode,w=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:vr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.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=Vx,Vx=!1,m}function Bu(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 bd(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 $x(e){var t=e.alternate;t!==null&&(e.alternate=null,$x(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[Au],delete t[bm],delete t[JD],delete t[e6])),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 Wx(e){return e.tag===5||e.tag===3||e.tag===4}function Yx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wx(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=Qc));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 zt=null,wr=!1;function Wi(e,t,n){for(n=n.child;n!==null;)qx(e,t,n),n=n.sibling}function qx(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(Oc,n)}catch{}switch(n.tag){case 5:Qt||Go(n,t);case 6:var r=zt,i=wr;zt=null,Wi(e,t,n),zt=r,wr=i,zt!==null&&(wr?(e=zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(wr?(e=zt,n=n.stateNode,e.nodeType===8?wm(e.parentNode,n):e.nodeType===1&&wm(e,n),gu(e)):wm(zt,n.stateNode));break;case 4:r=zt,i=wr,zt=n.stateNode.containerInfo,wr=!0,Wi(e,t,n),zt=r,wr=i;break;case 0:case 11:case 14:case 15:if(!Qt&&(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)}Wi(e,t,n);break;case 1:if(!Qt&&(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)}Wi(e,t,n);break;case 21:Wi(e,t,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Wi(e,t,n),Qt=r):Wi(e,t,n);break;default:Wi(e,t,n)}}function Gx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new g6),t.forEach(function(r){var i=C6.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function br(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:zt=s.stateNode,wr=!1;break e;case 3:zt=s.stateNode.containerInfo,wr=!0;break e;case 4:zt=s.stateNode.containerInfo,wr=!0;break e}s=s.return}if(zt===null)throw Error(Q(160));qx(a,o,i),zt=null,wr=!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;)Kx(t,e),t=t.sibling}function Kx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(br(t,e),Br(e),r&4){try{Bu(3,e,e.return),bd(3,e)}catch(y){yt(e,e.return,y)}try{Bu(5,e,e.return)}catch(y){yt(e,e.return,y)}}break;case 1:br(t,e),Br(e),r&512&&n!==null&&Go(n,n.return);break;case 5:if(br(t,e),Br(e),r&512&&n!==null&&Go(n,n.return),e.flags&32){var i=e.stateNode;try{au(i,"")}catch(y){yt(e,e.return,y)}}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&&Tw(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"?Pw(i,d):c==="dangerouslySetInnerHTML"?Rw(i,d):c==="children"?au(i,d):bh(i,c,d,l)}switch(s){case"input":Ih(i,a);break;case"textarea":Cw(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[Au]=a}catch(y){yt(e,e.return,y)}}break;case 6:if(br(t,e),Br(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(y){yt(e,e.return,y)}}break;case 3:if(br(t,e),Br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{gu(t.containerInfo)}catch(y){yt(e,e.return,y)}break;case 4:br(t,e),Br(e);break;case 13:br(t,e),Br(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(lg=Et())),r&4&&Gx(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Qt=(l=Qt)||c,br(t,e),Qt=l):br(t,e),Br(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:Bu(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(y){yt(r,n,y)}}break;case 5:Go(f,f.return);break;case 22:if(f.memoizedState!==null){Zx(d);continue}}p!==null?(p.return=f,ue=p):Zx(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=Nw("display",o))}catch(y){yt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(y){yt(e,e.return,y)}}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:br(t,e),Br(e),r&4&&Gx(e);break;case 21:break;default:br(t,e),Br(e)}}function Br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Wx(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&&(au(i,""),r.flags&=-33);var a=Yx(e);og(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=Yx(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 v6(e,t,n){ue=e,Xx(e)}function Xx(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||wd;if(!o){var s=i.alternate,u=s!==null&&s.memoizedState!==null||Qt;s=wd;var l=Qt;if(wd=o,(Qt=u)&&!l)for(ue=i;ue!==null;)o=ue,u=o.child,o.tag===22&&o.memoizedState!==null?Jx(i):u!==null?(u.return=o,ue=u):Jx(i);for(;a!==null;)ue=a,Xx(a),a=a.sibling;ue=i,wd=s,Qt=l}Qx(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ue=a):Qx(e)}}function Qx(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:Qt||bd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:vr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Zb(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}Zb(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&&gu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}Qt||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 Zx(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 Jx(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bd(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 w6=Math.ceil,xd=ni.ReactCurrentDispatcher,sg=ni.ReactCurrentOwner,er=ni.ReactCurrentBatchConfig,Ue=0,Lt=null,At=null,Vt=0,Bn=0,Ko=Ui(0),It=0,ju=null,$a=0,Ed=0,ug=0,Uu=null,xn=null,lg=0,Xo=1/0,ci=null,Td=!1,cg=null,Yi=null,_d=!1,qi=null,Sd=0,Hu=0,dg=null,Cd=-1,Ad=0;function fn(){return Ue&6?Et():Cd!==-1?Cd:Cd=Et()}function Gi(e){return e.mode&1?Ue&2&&Vt!==0?Vt&-Vt:n6.transition!==null?(Ad===0&&(Ad=Yw()),Ad):(e=qe,e!==0||(e=window.event,e=e===void 0?16:tb(e.type)),e):1}function xr(e,t,n,r){if(50<Hu)throw Hu=0,dg=null,Error(Q(185));du(e,n,r),(!(Ue&2)||e!==Lt)&&(e===Lt&&(!(Ue&2)&&(Ed|=n),It===4&&Ki(e,Vt)),En(e,r),n===1&&Ue===0&&!(t.mode&1)&&(Xo=Et()+500,td&&zi()))}function En(e,t){var n=e.callbackNode;nD(e,t);var r=Mc(e,e===Lt?Vt:0);if(r===0)n!==null&&Vw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vw(n),t===1)e.tag===0?t6(tE.bind(null,e)):Ub(tE.bind(null,e)),QD(function(){!(Ue&6)&&zi()}),n=null;else{switch(qw(r)){case 1:n=$h;break;case 4:n=$w;break;case 16:n=Ic;break;case 536870912:n=Ww;break;default:n=Ic}n=lE(n,eE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function eE(e,t){if(Cd=-1,Ad=0,Ue&6)throw Error(Q(327));var n=e.callbackNode;if(Qo()&&e.callbackNode!==n)return null;var r=Mc(e,e===Lt?Vt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=kd(e,r);else{t=r;var i=Ue;Ue|=2;var a=rE();(Lt!==e||Vt!==t)&&(ci=null,Xo=Et()+500,Ya(e,t));do try{E6();break}catch(s){nE(e,s)}while(!0);Rm(),xd.current=a,Ue=i,At!==null?t=0:(Lt=null,Vt=0,t=It)}if(t!==0){if(t===2&&(i=Wh(e),i!==0&&(r=i,t=fg(e,i))),t===1)throw n=ju,Ya(e,0),Ki(e,r),En(e,Et()),n;if(t===6)Ki(e,r);else{if(i=e.current.alternate,!(r&30)&&!b6(i)&&(t=kd(e,r),t===2&&(a=Wh(e),a!==0&&(r=a,t=fg(e,a))),t===1))throw n=ju,Ya(e,0),Ki(e,r),En(e,Et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:qa(e,xn,ci);break;case 3:if(Ki(e,r),(r&130023424)===r&&(t=lg+500-Et(),10<t)){if(Mc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vm(qa.bind(null,e,xn,ci),t);break}qa(e,xn,ci);break;case 4:if(Ki(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-mr(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=Et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*w6(r/1960))-r,10<r){e.timeoutHandle=vm(qa.bind(null,e,xn,ci),r);break}qa(e,xn,ci);break;case 5:qa(e,xn,ci);break;default:throw Error(Q(329))}}}return En(e,Et()),e.callbackNode===n?eE.bind(null,e):null}function fg(e,t){var n=Uu;return e.current.memoizedState.isDehydrated&&(Ya(e,t).flags|=256),e=kd(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 b6(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(!gr(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 Ki(e,t){for(t&=~ug,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mr(t),r=1<<n;e[n]=-1,t&=~r}}function tE(e){if(Ue&6)throw Error(Q(327));Qo();var t=Mc(e,0);if(!(t&1))return En(e,Et()),null;var n=kd(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=ju,Ya(e,0),Ki(e,t),En(e,Et()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,qa(e,xn,ci),En(e,Et()),null}function hg(e,t){var n=Ue;Ue|=1;try{return e(t)}finally{Ue=n,Ue===0&&(Xo=Et()+500,td&&zi())}}function Wa(e){qi!==null&&qi.tag===0&&!(Ue&6)&&Qo();var t=Ue;Ue|=1;var n=er.transition,r=qe;try{if(er.transition=null,qe=1,e)return e()}finally{qe=r,er.transition=n,Ue=t,!(Ue&6)&&zi()}}function mg(){Bn=Ko.current,rt(Ko)}function Ya(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XD(n)),At!==null)for(n=At.return;n!==null;){var r=n;switch(_m(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jc();break;case 3:Yo(),rt(vn),rt(Gt),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(Lt=e,At=e=Xi(e.current,null),Vt=Bn=t,It=0,ju=null,ug=Ed=$a=0,xn=Uu=null,Ha!==null){for(t=0;t<Ha.length;t++)if(n=Ha[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}Ha=null}return e}function nE(e,t){do{var n=At;try{if(Rm(),dd.current=md,fd){for(var r=ft.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}fd=!1}if(Va=0,Dt=Pt=ft=null,Ou=!1,Du=0,sg.current=null,n===null||n.return===null){It=1,ju=t,At=null;break}e:{var a=e,o=n.return,s=n,u=t;if(t=Vt,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=Ax(o);if(p!==null){p.flags&=-257,kx(p,o,s,a,t),p.mode&1&&Cx(a,l,t),t=p,u=l;var m=t.updateQueue;if(m===null){var y=new Set;y.add(u),t.updateQueue=y}else m.add(u);break e}else{if(!(t&1)){Cx(a,l,t),gg();break e}u=Error(Q(426))}}else if(ot&&s.mode&1){var b=Ax(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),kx(b,o,s,a,t),Am(qo(u,s));break e}}a=u=qo(u,s),It!==4&&(It=2),Uu===null?Uu=[a]:Uu.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=_x(a,u,t);Qb(a,g);break e;case 1:s=u;var w=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Yi===null||!Yi.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var T=Sx(a,s,t);Qb(a,T);break e}}a=a.return}while(a!==null)}aE(n)}catch(S){t=S,At===n&&n!==null&&(At=n=n.return);continue}break}while(!0)}function rE(){var e=xd.current;return xd.current=md,e===null?md:e}function gg(){(It===0||It===3||It===2)&&(It=4),Lt===null||!($a&268435455)&&!(Ed&268435455)||Ki(Lt,Vt)}function kd(e,t){var n=Ue;Ue|=2;var r=rE();(Lt!==e||Vt!==t)&&(ci=null,Ya(e,t));do try{x6();break}catch(i){nE(e,i)}while(!0);if(Rm(),Ue=n,xd.current=r,At!==null)throw Error(Q(261));return Lt=null,Vt=0,It}function x6(){for(;At!==null;)iE(At)}function E6(){for(;At!==null&&!qO();)iE(At)}function iE(e){var t=uE(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?aE(e):At=t,sg.current=null}function aE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=m6(n,t),n!==null){n.flags&=32767,At=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,At=null;return}}else if(n=h6(n,t,Bn),n!==null){At=n;return}if(t=t.sibling,t!==null){At=t;return}At=t=e}while(t!==null);It===0&&(It=5)}function qa(e,t,n){var r=qe,i=er.transition;try{er.transition=null,qe=1,T6(e,t,n,r)}finally{er.transition=i,qe=r}return null}function T6(e,t,n,r){do Qo();while(qi!==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(rD(e,a),e===Lt&&(At=Lt=null,Vt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_d||(_d=!0,lE(Ic,function(){return Qo(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=er.transition,er.transition=null;var o=qe;qe=1;var s=Ue;Ue|=4,sg.current=null,y6(e,n),Kx(n,e),VD(gm),jc=!!mm,gm=mm=null,e.current=n,v6(n),GO(),Ue=s,qe=o,er.transition=a}else e.current=n;if(_d&&(_d=!1,qi=e,Sd=i),a=e.pendingLanes,a===0&&(Yi=null),QO(n.stateNode),En(e,Et()),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(Td)throw Td=!1,e=cg,cg=null,e;return Sd&1&&e.tag!==0&&Qo(),a=e.pendingLanes,a&1?e===dg?Hu++:(Hu=0,dg=e):Hu=0,zi(),null}function Qo(){if(qi!==null){var e=qw(Sd),t=er.transition,n=qe;try{if(er.transition=null,qe=16>e?16:e,qi===null)var r=!1;else{if(e=qi,qi=null,Sd=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:Bu(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($x(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 y=m.child;if(y!==null){m.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==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:Bu(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,ue=g;break e}ue=a.return}}var w=e.current;for(ue=w;ue!==null;){o=ue;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,ue=x;else e:for(o=w;ue!==null;){if(s=ue,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:bd(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,zi(),Dr&&typeof Dr.onPostCommitFiberRoot=="function")try{Dr.onPostCommitFiberRoot(Oc,e)}catch{}r=!0}return r}finally{qe=n,er.transition=t}}return!1}function oE(e,t,n){t=qo(n,t),t=_x(e,t,1),e=$i(e,t,1),t=fn(),e!==null&&(du(e,1,t),En(e,t))}function yt(e,t,n){if(e.tag===3)oE(e,e,n);else for(;t!==null;){if(t.tag===3){oE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){e=qo(n,e),e=Sx(t,e,1),t=$i(t,e,1),e=fn(),t!==null&&(du(t,1,e),En(t,e));break}}t=t.return}}function _6(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(Vt&n)===n&&(It===4||It===3&&(Vt&130023424)===Vt&&500>Et()-lg?Ya(e,0):ug|=n),En(e,t)}function sE(e,t){t===0&&(e.mode&1?(t=Lc,Lc<<=1,!(Lc&130023424)&&(Lc=4194304)):t=1);var n=fn();e=si(e,t),e!==null&&(du(e,t,n),En(e,n))}function S6(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sE(e,n)}function C6(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),sE(e,n)}var uE;uE=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,p6(e,t,n);bn=!!(e.flags&131072)}else bn=!1,ot&&t.flags&1048576&&Hb(t,rd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vd(e,t),e=t.pendingProps;var i=jo(t,Gt.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,ed(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Om(t),i.updater=gd,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),dn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=k6(r),e=vr(r,e),i){case 0:t=Xm(null,t,r,e,n);break e;case 1:t=Dx(null,t,r,e,n);break e;case 11:t=Rx(null,t,r,e,n);break e;case 14:t=Nx(null,t,r,vr(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:vr(r,i),Xm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Dx(e,t,r,i,n);case 3:e:{if(Lx(t),e===null)throw Error(Q(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Xb(e,t),ld(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=Mx(e,t,r,n,i);break e}else if(r!==i){i=qo(Error(Q(424)),t),t=Mx(e,t,r,n,i);break e}else for(Fn=ji(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,yr=null,n=Gb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zo(),r===i){t=li(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 5:return Jb(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),Ox(e,t),dn(e,t,o,n),t.child;case 6:return e===null&&Cm(t),null;case 13:return Fx(e,t,n);case 4:return Dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vo(t,null,r,n):dn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),Rx(e,t,r,i,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(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(od,r._currentValue),r._currentValue=o,a!==null)if(gr(a.value,o)){if(a.children===i.children&&!vn.current){t=li(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=ui(-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}dn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Wo(t,n),i=Zn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return r=t.type,i=vr(r,t.pendingProps),i=vr(r.type,i),Nx(e,t,r,i,n);case 15:return Px(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vr(r,i),vd(e,t),t.tag=1,wn(r)?(e=!0,ed(t)):e=!1,Wo(t,n),Ex(t,r,i),qm(t,r,i,n),Qm(null,t,r,!0,e,n);case 19:return jx(e,t,n);case 22:return Ix(e,t,n)}throw Error(Q(156,t.tag))};function lE(e,t){return zw(e,t)}function A6(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 tr(e,t,n,r){return new A6(e,t,n,r)}function yg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function k6(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 Xi(e,t){var n=e.alternate;return n===null?(n=tr(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 Rd(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 Ga(n.children,i,a,t);case xh:o=8,i|=8;break;case Eh:return e=tr(12,n,t,i|2),e.elementType=Eh,e.lanes=a,e;case _h:return e=tr(13,n,t,i),e.elementType=_h,e.lanes=a,e;case Sh:return e=tr(19,n,t,i),e.elementType=Sh,e.lanes=a,e;case vw:return Nd(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gw:o=10;break e;case yw:o=9;break e;case Th:o=11;break e;case Ch:o=14;break e;case Pi:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=tr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Ga(e,t,n,r){return e=tr(7,e,r,t),e.lanes=n,e}function Nd(e,t,n,r){return e=tr(22,e,r,t),e.elementType=vw,e.lanes=n,e.stateNode={isHidden:!1},e}function vg(e,t,n){return e=tr(6,e,null,t),e.lanes=n,e}function wg(e,t,n){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function R6(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 R6(e,t,n,s,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=tr(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 N6(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 cE(e){if(!e)return Hi;e=e._reactInternals;e:{if(Ma(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 Bb(e,n,t)}return t}function dE(e,t,n,r,i,a,o,s,u){return e=bg(n,r,!0,e,i,a,o,s,u),e.context=cE(null),n=e.current,r=fn(),i=Gi(n),a=ui(r,i),a.callback=t??null,$i(n,a,i),e.current.lanes=i,du(e,i,r),En(e,r),e}function Pd(e,t,n,r){var i=t.current,a=fn(),o=Gi(i);return n=cE(n),t.context===null?t.context=n:t.pendingContext=n,t=ui(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$i(i,t,o),e!==null&&(xr(e,i,o,a),ud(e,i,o)),o}function Id(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 fE(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){fE(e,t),(e=e.alternate)&&fE(e,t)}function P6(){return null}var pE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Eg(e){this._internalRoot=e}Od.prototype.render=Eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Pd(e,t,null,null)},Od.prototype.unmount=Eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wa(function(){Pd(null,e,null,null)}),t[ri]=null}};function Od(e){this._internalRoot=e}Od.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mi.length&&t!==0&&t<Mi[n].priority;n++);Mi.splice(n,0,e),n===0&&Jw(e)}};function Tg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Dd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hE(){}function I6(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var l=Id(o);a.call(l)}}var o=dE(t,r,e,0,null,!1,!1,"",hE);return e._reactRootContainer=o,e[ri]=o.current,Su(e.nodeType===8?e.parentNode:e),Wa(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var l=Id(u);s.call(l)}}var u=bg(e,0,!1,null,null,!1,!1,"",hE);return e._reactRootContainer=u,e[ri]=u.current,Su(e.nodeType===8?e.parentNode:e),Wa(function(){Pd(t,u,n,r)}),u}function Ld(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=Id(o);s.call(u)}}Pd(t,o,e,i)}else o=I6(n,t,e,i,r);return Id(o)}Gw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cu(t.pendingLanes);n!==0&&(qh(t,n|1),En(t,Et()),!(Ue&6)&&(Xo=Et()+500,zi()))}break;case 13:Wa(function(){var r=si(e,1);if(r!==null){var i=fn();xr(r,e,1,i)}}),xg(e,1)}},Gh=function(e){if(e.tag===13){var t=si(e,134217728);if(t!==null){var n=fn();xr(t,e,134217728,n)}xg(e,134217728)}},Kw=function(e){if(e.tag===13){var t=Gi(e),n=si(e,t);if(n!==null){var r=fn();xr(n,e,t,r)}xg(e,t)}},Xw=function(){return qe},Qw=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=Zc(r);if(!i)throw Error(Q(90));xw(r),Ih(r,i)}}}break;case"textarea":Cw(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}},Lw=hg,Mw=Wa;var O6={usingClientEntryPoint:!1,Events:[ku,Fo,Zc,Ow,Dw,hg]},zu={findFiberByHostInstance:Fa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},D6={bundleType:zu.bundleType,version:zu.version,rendererPackageName:zu.rendererPackageName,rendererConfig:zu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ni.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Uw(e),e===null?null:e.stateNode},findFiberByHostInstance:zu.findFiberByHostInstance||P6,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 Md=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Md.isDisabled&&Md.supportsFiber)try{Oc=Md.inject(D6),Dr=Md}catch{}}On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O6,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 N6(e,t,null,n)},On.createRoot=function(e,t){if(!Tg(e))throw Error(Q(299));var n=!1,r="",i=pE;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[ri]=t.current,Su(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=Uw(t),e=e===null?null:e.stateNode,e},On.flushSync=function(e){return Wa(e)},On.hydrate=function(e,t,n){if(!Dd(t))throw Error(Q(200));return Ld(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=pE;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=dE(t,null,e,1,n??null,i,!1,a,o),e[ri]=t.current,Su(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 Od(t)},On.render=function(e,t,n){if(!Dd(t))throw Error(Q(200));return Ld(null,e,t,!1,n)},On.unmountComponentAtNode=function(e){if(!Dd(e))throw Error(Q(40));return e._reactRootContainer?(Wa(function(){Ld(null,null,e,!1,function(){e._reactRootContainer=null,e[ri]=null})}),!0):!1},On.unstable_batchedUpdates=hg,On.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Dd(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Ld(e,t,n,!1,r)},On.version="18.3.1-next-f1338f8080-20240426";function mE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mE)}catch(e){console.error(e)}}mE(),cw.exports=On;var Zo=cw.exports,gE,yE=Zo;gE=yE.createRoot,yE.hydrateRoot;const vE="3.0.23";function Fd(e){"@babel/helpers - typeof";return Fd=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},Fd(e)}var L6=/^\s+/,M6=/\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=F6(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=_E(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=bE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=bE(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=wE(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString: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.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return xE(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return H6(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:J6[xE(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+EE(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var a=fe(t);r="#"+EE(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(W6,arguments)},brighten:function(){return this._applyModification(Y6,arguments)},darken:function(){return this._applyModification(q6,arguments)},desaturate:function(){return this._applyModification(z6,arguments)},saturate:function(){return this._applyModification(V6,arguments)},greyscale:function(){return this._applyModification($6,arguments)},spin:function(){return this._applyModification(G6,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(K6,arguments)},monochromatic:function(){return this._applyCombination(Z6,arguments)},splitcomplement:function(){return this._applyCombination(X6,arguments)},triad:function(){return this._applyCombination(TE,[3])},tetrad:function(){return this._applyCombination(TE,[4])}},fe.fromRatio=function(e,t){if(Fd(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Vu(e[r]));e=n}return fe(e,t)};function F6(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=rL(e)),Fd(e)=="object"&&(di(e.r)&&di(e.g)&&di(e.b)?(t=B6(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):di(e.h)&&di(e.s)&&di(e.v)?(r=Vu(e.s),i=Vu(e.v),t=U6(e.h,r,i),o=!0,s="hsv"):di(e.h)&&di(e.s)&&di(e.l)&&(r=Vu(e.s),a=Vu(e.l),t=j6(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=_E(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 B6(e,t,n){return{r:st(e,255)*255,g:st(t,255)*255,b:st(n,255)*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+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 j6(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 bE(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 U6(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 xE(e,t,n,r){var i=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(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 H6(e,t,n,r,i){var a=[Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(Math.round(n).toString(16)),Er(SE(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 EE(e,t,n,r){var i=[Er(SE(r)),Er(Math.round(e).toString(16)),Er(Math.round(t).toString(16)),Er(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 z6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s-=t/100,n.s=Bd(n.s),fe(n)}function V6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.s+=t/100,n.s=Bd(n.s),fe(n)}function $6(e){return fe(e).desaturate(100)}function W6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l+=t/100,n.l=Bd(n.l),fe(n)}function Y6(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 q6(e,t){t=t===0?0:t||10;var n=fe(e).toHsl();return n.l-=t/100,n.l=Bd(n.l),fe(n)}function G6(e,t){var n=fe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,fe(n)}function K6(e){var t=fe(e).toHsl();return t.h=(t.h+180)%360,fe(t)}function TE(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 X6(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 Z6(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=iL(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"},J6=fe.hexNames=eL(_g);function eL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function _E(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function st(e,t){tL(e)&&(e="100%");var n=nL(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 Bd(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function tL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function nL(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Er(e){return e.length==1?"0"+e:""+e}function Vu(e){return e<=1&&(e=e*100+"%"),e}function SE(e){return Math.round(parseFloat(e)*255).toString(16)}function CE(e){return jn(e)/255}var Tr=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 di(e){return!!Tr.CSS_UNIT.exec(e)}function rL(e){e=e.replace(L6,"").replace(M6,"").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=Tr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Tr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Tr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Tr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Tr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Tr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Tr.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:CE(n[4]),format:t?"name":"hex8"}:(n=Tr.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Tr.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:CE(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Tr.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 iL(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 aL=400,AE=600,jd={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},kE=({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 oL(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 $u(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Sg=e=>Array.isArray(e);function RE(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 Wu(e){return typeof e=="string"||Array.isArray(e)}function NE(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]=NE(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]=NE(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Ud(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],Yu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qi=new Set(Yu),fi=e=>e*1e3,pi=e=>e/1e3,sL={type:"spring",stiffness:500,damping:25,restSpeed:10},uL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lL={type:"keyframes",duration:.8},cL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dL=(e,{keyframes:t})=>t.length>2?lL:Qi.has(e)?e.startsWith("scale")?uL(t[1]):sL:cL;function Rg(e,t){return e?e[t]||e.default||e:void 0}const fL={skipAnimations:!1,useManualTiming:!1},pL=e=>e!==null;function Hd(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(pL),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Zt=e=>e;function hL(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 zd=["read","resolveKeyframes","update","preRender","render","postRender"],mL=40;function PE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=zd.reduce((g,w)=>(g[w]=hL(a),g),{}),{read:s,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=o,p=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,mL),1),i.timestamp=g,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:zd.reduce((g,w)=>{const x=o[w];return g[w]=(T,S=!1,_=!1)=>(n||m(),x.schedule(T,S,_)),g},{}),cancel:g=>{for(let w=0;w<zd.length;w++)o[zd[w]].cancel(g)},state:i,steps:o}}const{schedule:Xe,cancel:Zi,state:$t,steps:Ng}=PE(typeof requestAnimationFrame<"u"?requestAnimationFrame:Zt,!0),IE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gL=1e-7,yL=12;function vL(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=IE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>gL&&++s<yL);return o}function qu(e,t,n,r){if(e===t&&n===r)return Zt;const i=a=>vL(a,0,1,e,n);return a=>a===0||a===1?a:IE(i(a),t,r)}const OE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,DE=e=>t=>1-e(1-t),LE=qu(.33,1.53,.69,.99),Pg=DE(LE),ME=OE(Pg),FE=e=>(e*=2)<1?.5*Pg(e):.5*(2-Math.pow(2,-10*(e-1))),Ig=e=>1-Math.sin(Math.acos(e)),BE=DE(Ig),jE=OE(Ig),UE=e=>/^0[^.\s]+$/u.test(e);function wL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||UE(e):!0}let Og=Zt;const HE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),zE=e=>t=>typeof t=="string"&&t.startsWith(e),VE=zE("--"),bL=zE("var(--"),Dg=e=>bL(e)?xL.test(e.split("/*")[0].trim()):!1,xL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,EL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function TL(e){const t=EL.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function $E(e,t,n=1){const[r,i]=TL(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return HE(o)?parseFloat(o):o}return Dg(i)?$E(i,t,n+1):i}const Ji=(e,t,n)=>n>t?t:n<e?e:n,Jo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gu={...Jo,transform:e=>Ji(0,1,e)},Vd={...Jo,default:1},Ku=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=Ku("deg"),jr=Ku("%"),ye=Ku("px"),_L=Ku("vh"),SL=Ku("vw"),WE={...jr,parse:e=>jr.parse(e)/100,transform:e=>jr.transform(e*100)},CL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),YE=e=>e===Jo||e===ye,qE=(e,t)=>parseFloat(e.split(", ")[t]),GE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return qE(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?qE(a[1],e):0}},AL=new Set(["x","y","z"]),kL=Yu.filter(e=>!AL.has(e));function RL(e){const t=[];return kL.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:GE(4,13),y:GE(5,14)};es.translateX=es.x,es.translateY=es.y;const KE=e=>t=>t.test(e),XE=[Jo,ye,jr,ea,SL,_L,{test:e=>e==="auto",parse:e=>e}],QE=e=>XE.find(KE(e)),Ka=new Set;let Lg=!1,Mg=!1;function ZE(){if(Mg){const e=Array.from(Ka).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=RL(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,Ka.forEach(e=>e.complete()),Ka.clear()}function JE(){Ka.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mg=!0)})}function NL(){JE(),ZE()}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?(Ka.add(this),Lg||(Lg=!0,Xe.read(JE),Xe.resolveKeyframes(ZE))):(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),Ka.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ka.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xu=e=>Math.round(e*1e5)/1e5,Bg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PL(e){return e==null}const IL=/^(?:#[\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"&&IL.test(n)&&n.startsWith(e)||t&&!PL(n)&&Object.prototype.hasOwnProperty.call(n,t)),eT=(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}},OL=e=>Ji(0,255,e),Ug={...Jo,transform:e=>Math.round(OL(e))},Xa={test:jg("rgb","red"),parse:eT("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ug.transform(e)+", "+Ug.transform(t)+", "+Ug.transform(n)+", "+Xu(Gu.transform(r))+")"};function DL(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:DL,transform:Xa.transform},ts={test:jg("hsl","hue"),parse:eT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+jr.transform(Xu(t))+", "+jr.transform(Xu(n))+", "+Xu(Gu.transform(r))+")"},Jt={test:e=>Xa.test(e)||Hg.test(e)||ts.test(e),parse:e=>Xa.test(e)?Xa.parse(e):ts.test(e)?ts.parse(e):Hg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xa.transform(e):ts.transform(e)},LL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ML(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(LL))===null||n===void 0?void 0:n.length)||0)>0}const tT="number",nT="color",FL="var",BL="var(",rT="${}",jL=/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 Qu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(jL,u=>(Jt.test(u)?(r.color.push(a),i.push(nT),n.push(Jt.parse(u))):u.startsWith(BL)?(r.var.push(a),i.push(FL),n.push(u)):(r.number.push(a),i.push(tT),n.push(parseFloat(u))),++a,rT)).split(rT);return{values:n,split:s,indexes:r,types:i}}function iT(e){return Qu(e).values}function aT(e){const{split:t,types:n}=Qu(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===tT?a+=Xu(i[o]):s===nT?a+=Jt.transform(i[o]):a+=i[o]}return a}}const UL=e=>typeof e=="number"?0:e;function HL(e){const t=iT(e);return aT(e)(t.map(UL))}const ta={test:ML,parse:iT,createTransformer:aT,getAnimatableNone:HL},zL=new Set(["brightness","contrast","saturate","opacity"]);function VL(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=zL.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const $L=/\b([a-z-]*)\(.*?\)/gu,zg={...ta,getAnimatableNone:e=>{const t=e.match($L);return t?t.map(VL).join(" "):e}},WL={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},YL={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:Vd,scaleX:Vd,scaleY:Vd,scaleZ:Vd,skew:ea,skewX:ea,skewY:ea,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Gu,originX:WE,originY:WE,originZ:ye},oT={...Jo,transform:Math.round},Vg={...WL,...YL,zIndex:oT,size:ye,fillOpacity:Gu,strokeOpacity:Gu,numOctaves:oT},qL={...Vg,color:Jt,backgroundColor:Jt,outlineColor:Jt,fill:Jt,stroke:Jt,borderColor:Jt,borderTopColor:Jt,borderRightColor:Jt,borderBottomColor:Jt,borderLeftColor:Jt,filter:zg,WebkitFilter:zg},$g=e=>qL[e];function sT(e,t){let n=$g(e);return n!==zg&&(n=ta),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const GL=new Set(["auto","none","0"]);function KL(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!GL.has(a)&&Qu(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=sT(n,i)}class uT 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=$E(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!CL.has(r)||t.length!==2)return;const[i,a]=t,o=QE(i),s=QE(a);if(o!==s)if(YE(o)&&YE(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++)wL(t[i])&&r.push(i);r.length&&KL(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 $d;function XL(){$d=void 0}const Ur={now:()=>($d===void 0&&Ur.set($t.isProcessing||fL.useManualTiming?$t.timestamp:performance.now()),$d),set:e=>{$d=e,queueMicrotask(XL)}},lT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ta.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 ZL(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=lT(i,t),s=lT(a,t);return!o||!s?!1:QL(e)||(n==="spring"||Wg(n))&&r}const JL=40;class cT{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=Ur.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>JL?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ur.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:u,isGenerator:l}=this.options;if(!l&&!ZL(t,r,i,a))if(o)this.options.duration=0;else{u==null||u(Hd(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 dT(e,t){return t?e*(1e3/t):0}const e4=5;function fT(e,t,n){const r=Math.max(t-e4,0);return dT(n-e(r),t-r)}const Yg=.001,t4=.01,n4=10,r4=.05,i4=1;function a4({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=Ji(r4,i4,o),e=Ji(t4,n4,pi(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),y=qg(Math.pow(l,2),o);return(-i(l)+Yg>0?-1:1)*((f-p)*m)/y}):(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=s4(i,a,s);if(e=fi(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 o4=12;function s4(e,t,n){let r=n;for(let i=1;i<o4;i++)r=r-e(r)/t(r);return r}function qg(e,t){return e*Math.sqrt(1-t*t)}const u4=["duration","bounce"],l4=["stiffness","damping","mass"];function pT(e,t){return t.some(n=>e[n]!==void 0)}function c4(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!pT(e,l4)&&pT(e,u4)){const n=a4(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function hT({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}=c4({...r,velocity:-pi(r.velocity||0)}),p=d||0,m=u/(2*Math.sqrt(s*l)),y=a-i,b=pi(Math.sqrt(s/l)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let w;if(m<1){const x=qg(b,m);w=T=>{const S=Math.exp(-m*b*T);return a-S*((p+m*b*y)/x*Math.sin(x*T)+y*Math.cos(x*T))}}else if(m===1)w=x=>a-Math.exp(-b*x)*(y+(p+b*y)*x);else{const x=b*Math.sqrt(m*m-1);w=T=>{const S=Math.exp(-m*b*T),_=Math.min(x*T,300);return a-S*((p+m*b*y)*Math.sinh(_)+x*y*Math.cosh(_))/x}}return{calculatedDuration:f&&c||null,next:x=>{const T=w(x);if(f)o.done=x>=c;else{let S=0;m<1&&(S=x===0?fi(p):fT(w,x,T));const _=Math.abs(S)<=n,N=Math.abs(a-T)<=t;o.done=_&&N}return o.value=o.done?a:T,o}}}function mT({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 y=n*t;const b=d+y,g=o===void 0?b:o(b);g!==b&&(y=g-d);const w=D=>-y*Math.exp(-D/r),x=D=>g+w(D),T=D=>{const V=w(D),P=x(D);f.done=Math.abs(V)<=l,f.value=f.done?g:P};let S,_;const N=D=>{p(f.value)&&(S=D,_=hT({keyframes:[f.value,m(f.value)],velocity:fT(x,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 d4=qu(.42,0,1,1),f4=qu(0,0,.58,1),gT=qu(.42,0,.58,1),p4=e=>Array.isArray(e)&&typeof e[0]!="number",Gg=e=>Array.isArray(e)&&typeof e[0]=="number",yT={linear:Zt,easeIn:d4,easeInOut:gT,easeOut:f4,circIn:Ig,circInOut:jE,circOut:BE,backIn:Pg,backInOut:ME,backOut:LE,anticipate:FE},vT=e=>{if(Gg(e)){Og(e.length===4);const[t,n,r,i]=e;return qu(t,n,r,i)}else if(typeof e=="string")return Og(yT[e]!==void 0),yT[e];return e},h4=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(h4),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 m4({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 Wd(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)},g4=[Hg,Xa,ts],y4=e=>g4.find(t=>t.test(e));function wT(e){const t=y4(e);if(!t)return!1;let n=t.parse(e);return t===ts&&(n=m4(n)),n}const bT=(e,t)=>{const n=wT(e),r=wT(t);if(!n||!r)return Wd(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),Xa.transform(i))},Qg=new Set(["none","hidden"]);function v4(e,t){return Qg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function w4(e,t){return n=>pt(e,t,n)}function Zg(e){return typeof e=="number"?w4:typeof e=="string"?Dg(e)?Wd:Jt.test(e)?bT:E4:Array.isArray(e)?xT:typeof e=="object"?Jt.test(e)?bT:b4:Wd}function xT(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 b4(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 x4(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 E4=(e,t)=>{const n=ta.createTransformer(t),r=Qu(e),i=Qu(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?v4(e,t):hi(xT(x4(r,i),i.values),n):Wd(e,t)};function ET(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pt(e,t,n):Zg(e)(e,t)}function T4(e,t,n){const r=[],i=n||ET,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]||Zt:t;s=hi(u,s)}r.push(s)}return r}function _4(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=T4(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(Ji(e[0],e[a-1],l)):u}function S4(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 C4(e){const t=[0];return S4(t,e.length-1),t}function A4(e,t){return e.map(n=>n*t)}function k4(e,t){return e.map(()=>t||gT).splice(0,e.length-1)}function Yd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=p4(r)?r.map(vT):vT(r),a={done:!1,value:t[0]},o=A4(n&&n.length===t.length?n:C4(t),e),s=_4(o,t,{ease:Array.isArray(i)?i:k4(t,i)});return{calculatedDuration:e,next:u=>(a.value=s(u),a.done=u>=e,a)}}const TT=2e4;function R4(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<TT;)t+=n,r=e.next(t);return t>=TT?1/0:t}const N4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Xe.update(t,!0),stop:()=>Zi(t),now:()=>$t.isProcessing?$t.timestamp:Ur.now()}},P4={decay:mT,inertia:mT,tween:Yd,keyframes:Yd,spring:hT},I4=e=>e/100;class Jg extends cT{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:P4[n]||Yd;let u,l;s!==Yd&&typeof t[0]!="number"&&(u=hi(I4,ET(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=R4(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:y,onUpdate:b}=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 g=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=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,y&&(P-=y/d)):m==="mirror"&&(T=o)),x=Ji(0,1,P)*d}const S=w?{done:!1,value:u[0]}:T.next(x);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=Hd(u,this.options,i)),b&&b(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?pi(t.calculatedDuration):0}get time(){return pi(this.currentTime)}set time(t){t=fi(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=pi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=N4,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 _T=new Set(["opacity","clipPath","filter","transform"]),O4=10,D4=(e,t)=>{let n="";const r=Math.max(Math.round(t/O4),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 L4={linearEasing:void 0};function M4(e,t){const n=e0(e);return()=>{var r;return(r=L4[t])!==null&&r!==void 0?r:n()}}const qd=M4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function ST(e){return!!(typeof e=="function"&&qd()||!e||typeof e=="string"&&(e in t0||qd())||Gg(e)||Array.isArray(e)&&e.every(ST))}const Zu=([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:Zu([0,.65,.55,1]),circOut:Zu([.55,0,1,.45]),backIn:Zu([.31,.01,.66,-.59]),backOut:Zu([.33,1.53,.69,.99])};function CT(e,t){if(e)return typeof e=="function"&&qd()?D4(e,t):Gg(e)?Zu(e):Array.isArray(e)?e.map(n=>CT(n,t)||t0.easeOut):t0[e]}function F4(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=CT(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 AT(e,t){e.timeline=t,e.onfinish=null}const B4=e0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gd=10,j4=2e4;function U4(e){return Wg(e.type)||e.type==="spring"||!ST(e.ease)}function H4(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<j4;)r=n.sample(a),i.push(r.value),a+=Gd;return{times:void 0,keyframes:i,duration:a-Gd,ease:"linear"}}const kT={anticipate:FE,backInOut:ME,circInOut:jE};function z4(e){return e in kT}class RT extends cT{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new uT(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"&&qd()&&z4(o)&&(o=kT[o]),U4(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:y,...b}=this.options,g=H4(t,b);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,a=g.times,o=g.ease,s="keyframes"}const d=F4(u.owner.current,l,t,{...this.options,duration:i,times:a,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(AT(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Hd(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 pi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return pi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fi(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 Zt;const{animation:r}=n;AT(r,t)}return Zt}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}),y=fi(this.time);l.setWithVelocity(m.sample(y-Gd).value,m.sample(y).value,Gd)}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 B4()&&r&&_T.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const V4=e0(()=>window.ScrollTimeline!==void 0);class $4{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=>V4()&&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 W4({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-fi(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};W4(s)||(c={...c,...dL(e,c)}),c.duration&&(c.duration=fi(c.duration)),c.repeatDelay&&(c.repeatDelay=fi(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=Hd(c.keyframes,s);if(f!==void 0)return Xe.update(()=>{c.onUpdate(f),c.onComplete()}),new $4([])}return!a&&RT.supports(c)?new RT(c):new Jg(c)},Y4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),q4=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 NT=30,G4=e=>!isNaN(parseFloat(e));class K4{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Ur.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=Ur.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=G4(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=Ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>NT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,NT);return dT(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 Ju(e,t){return new K4(e,t)}function X4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ju(n))}function Q4(e,t){const n=Ud(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=q4(a[o]);X4(e,o,s)}}const Kd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),PT="data-"+Kd("framerAppearId");function IT(e){return e.props[PT]}const en=e=>!!(e&&e.getVelocity);function Z4(e){return!!(en(e)&&e.add)}function o0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(Z4(n))return n.add(t)}function J4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function OT(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&&J4(c,d))continue;const m={delay:n,...Rg(o||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=IT(e);if(g){const w=window.MotionHandoffAnimation(g,d,Xe);w!==null&&(m.startTime=w,y=!0)}}o0(e,d),f.start(n0(d,f,p,e.shouldReduceMotion&&Qi.has(d)?{type:!1}:m,e,y));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Xe.update(()=>{s&&Q4(e,s)})}),l}function s0(e,t,n={}){var r;const i=Ud(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(OT(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=a;return eM(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 eM(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(tM).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 tM(e,t){return e.sortNodePosition(t)}function nM(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"?Ud(e,t,n.custom):t;r=Promise.all(OT(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rM=kg.length;function DT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?DT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<rM;n++){const r=kg[n],i=e.props[r];(Wu(i)||i===!1)&&(t[r]=i)}return t}const iM=[...Ag].reverse(),aM=Ag.length;function oM(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nM(e,n,r)))}function sM(e){let t=oM(e),n=LT(),r=!0;const i=u=>(l,c)=>{var d;const f=Ud(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;l={...l,...y,...m}}return l};function a(u){t=u(e)}function o(u){const{props:l}=e,c=DT(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let b=0;b<aM;b++){const g=iM[b],w=n[g],x=l[g]!==void 0?l[g]:c[g],T=Wu(x),S=g===u?w.isActive:null;S===!1&&(m=b);let _=x===c[g]&&x!==l[g]&&T;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),w.protectedKeys={...p},!w.isActive&&S===null||!x&&!w.prevProp||$u(x)||typeof x=="boolean")continue;const N=uM(w.prevProp,x);let D=N||g===u&&w.isActive&&!_&&T||b>m&&T,V=!1;const P=Array.isArray(x)?x:[x];let $=P.reduce(i(g),{});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=!RE(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=x,w.prevResolvedValues=$,w.isActive&&(p={...p,...$}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(_&&N)||V)&&d.push(...P.map(ee=>({animation:ee,options:{type:g}})))}if(f.size){const b={};f.forEach(g=>{const w=e.getBaseTarget(g),x=e.getValue(g);x&&(x.liveStyle=!0),b[g]=w??null}),d.push({animation:b})}let y=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?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=LT(),r=!0}}}function uM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!RE(t,e):!1}function Qa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function LT(){return{animate:Qa(!0),whileInView:Qa(),whileHover:Qa(),whileTap:Qa(),whileDrag:Qa(),whileFocus:Qa(),exit:Qa()}}class na{constructor(t){this.isMounted=!1,this.node=t}update(){}}class lM extends na{constructor(t){super(t),t.animationState||(t.animationState=sM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$u(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 cM=0;class dM extends na{constructor(){super(...arguments),this.id=cM++}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 fM={animation:{Feature:lM},exit:{Feature:dM}},MT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Xd(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const pM=e=>t=>MT(t)&&e(t,Xd(t));function mi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gi(e,t,n,r){return mi(e,t,pM(n),r)}const FT=(e,t)=>Math.abs(e-t);function hM(e,t){const n=FT(e.x,t.x),r=FT(e.y,t.y);return Math.sqrt(n**2+r**2)}class BT{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=hM(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=$t;this.history.push({...m,timestamp:y});const{onStart:b,onMove:g}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(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:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=l0(d.type==="pointercancel"?this.lastMoveEventInfo:u0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,b),m&&m(d,b)},!MT(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Xd(t),s=u0(o,this.transformPagePoint),{point:u}=s,{timestamp:l}=$t;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,l0(s,this.history)),this.removeListeners=hi(gi(this.contextWindow,"pointermove",this.handlePointerMove),gi(this.contextWindow,"pointerup",this.handlePointerUp),gi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zi(this.updatePoint)}}function u0(e,t){return t?{point:t(e.point)}:e}function jT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function l0({point:e},t){return{point:e,delta:jT(e,UT(t)),offset:jT(e,mM(t)),velocity:gM(t,.1)}}function mM(e){return e[0]}function UT(e){return e[e.length-1]}function gM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=UT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>fi(t)));)n--;if(!r)return{x:0,y:0};const a=pi(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 HT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zT=HT("dragHorizontal"),VT=HT("dragVertical");function $T(e){let t=!1;if(e==="y")t=VT();else if(e==="x")t=zT();else{const n=zT(),r=VT();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function WT(){const e=$T(!0);return e?(e(),!1):!0}function rs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const YT=1e-4,yM=1-YT,vM=1+YT,qT=.01,wM=0-qT,bM=0+qT;function Un(e){return e.max-e.min}function xM(e,t,n){return Math.abs(e-t)<=n}function GT(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>=yM&&e.scale<=vM||isNaN(e.scale))&&(e.scale=1),(e.translate>=wM&&e.translate<=bM||isNaN(e.translate))&&(e.translate=0)}function el(e,t,n,r){GT(e.x,t.x,n.x,r?r.originX:void 0),GT(e.y,t.y,n.y,r?r.originY:void 0)}function KT(e,t,n){e.min=n.min+t.min,e.max=e.min+Un(t)}function EM(e,t,n){KT(e.x,t.x,n.x),KT(e.y,t.y,n.y)}function XT(e,t,n){e.min=t.min-n.min,e.max=e.min+Un(t)}function tl(e,t,n){XT(e.x,t.x,n.x),XT(e.y,t.y,n.y)}function TM(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 QT(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 _M(e,{top:t,left:n,bottom:r,right:i}){return{x:QT(e.x,n,i),y:QT(e.y,t,r)}}function ZT(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 SM(e,t){return{x:ZT(e.x,t.x),y:ZT(e.y,t.y)}}function CM(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)),Ji(0,1,n)}function AM(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 kM(e=c0){return e===!1?e=0:e===!0&&(e=c0),{x:JT(e,"left","right"),y:JT(e,"top","bottom")}}function JT(e,t,n){return{min:e2(e,t),max:e2(e,n)}}function e2(e,t){return typeof e=="number"?e:e[t]||0}const t2=()=>({translate:0,scale:1,origin:0,originPoint:0}),is=()=>({x:t2(),y:t2()}),n2=()=>({min:0,max:0}),Tt=()=>({x:n2(),y:n2()});function nr(e){return[e("x"),e("y")]}function r2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function RM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NM(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 Za(e){return f0(e)||i2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function i2(e){return a2(e.x)||a2(e.y)}function a2(e){return e&&e!=="0%"}function Qd(e,t,n){const r=e-n,i=t*r;return n+i}function o2(e,t,n,r,i){return i!==void 0&&(e=Qd(e,i,r)),Qd(e,n,r)+t}function p0(e,t=0,n=1,r,i){e.min=o2(e.min,t,n,r,i),e.max=o2(e.max,t,n,r,i)}function s2(e,{x:t,y:n}){p0(e.x,t.translate,t.scale,t.originPoint),p0(e.y,n.translate,n.scale,n.originPoint)}const u2=.999999999999,l2=1.0000000000001;function PM(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,s2(e,o)),r&&Za(a.latestValues)&&os(e,a.latestValues))}t.x<l2&&t.x>u2&&(t.x=1),t.y<l2&&t.y>u2&&(t.y=1)}function as(e,t){e.min=e.min+t,e.max=e.max+t}function c2(e,t,n,r,i=.5){const a=pt(e.min,e.max,i);p0(e,t,n,a,r)}function os(e,t){c2(e.x,t.x,t.scaleX,t.scale,t.originX),c2(e.y,t.y,t.scaleY,t.scale,t.originY)}function d2(e,t){return r2(NM(e.getBoundingClientRect(),t))}function IM(e,t,n){const r=d2(e,n),{scroll:i}=t;return i&&(as(r.x,i.offset.x),as(r.y,i.offset.y)),r}const f2=({current:e})=>e?e.ownerDocument.defaultView:null,OM=new WeakMap;class DM{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=Tt(),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(Xd(c,"page").point)},a=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$T(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),nr(b=>{let g=this.getAxisMotionValue(b).get()||0;if(jr.test(g)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[b];x&&(g=Un(x)*(parseFloat(g)/100))}}this.originPoint[b]=g}),m&&Xe.postRender(()=>m(c,d)),o0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(p&&this.currentDirection===null){this.currentDirection=LM(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),y&&y(c,d)},s=(c,d)=>this.stop(c,d),u=()=>nr(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 BT(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:f2(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||!Zd(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=TM(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=_M(i.layoutBox,n):this.constraints=!1,this.elastic=kM(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&nr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=AM(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=IM(r,i.root,this.visualElement.getTransformPagePoint());let o=SM(i.layout.layoutBox,a);if(n){const s=n(RM(o));this.hasMutatedConstraints=!!s,s&&(o=r2(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),u=this.constraints||{},l=nr(c=>{if(!Zd(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(){nr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){nr(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){nr(n=>{const{drag:r}=this.getProps();if(!Zd(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};nr(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const u=s.get();i[o]=CM({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(),nr(o=>{if(!Zd(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;OM.set(this.visualElement,this);const t=this.visualElement.current,n=gi(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=mi(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(nr(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 Zd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function LM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class MM extends na{constructor(t){super(t),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new DM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}unmount(){this.removeGroupControls(),this.removeListeners()}}const p2=e=>(t,n)=>{e&&Xe.postRender(()=>e(t,n))};class FM extends na{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(t){this.session=new BT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:f2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:p2(t),onStart:p2(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&Xe.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=gi(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 Jd=v.createContext(null);function BM(){const e=v.useContext(Jd);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({}),h2=v.createContext({}),ef={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function m2(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=m2(e,t.target.x),r=m2(e,t.target.y);return`${n}% ${r}%`}},jM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ta.parse(e);if(i.length>5)return r;const a=ta.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)}},tf={};function UM(e){Object.assign(tf,e)}const{schedule:m0,cancel:_ie}=PE(queueMicrotask,!1);class HM extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;UM(zM),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()})),ef.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 g2(e){const[t,n]=BM(),r=v.useContext(h0);return E.jsx(HM,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(h2),isPresent:t,safeToRemove:n})}const zM={borderRadius:{...nl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nl,borderTopRightRadius:nl,borderBottomLeftRadius:nl,borderBottomRightRadius:nl,boxShadow:jM},y2=["TopLeft","TopRight","BottomLeft","BottomRight"],VM=y2.length,v2=e=>typeof e=="string"?parseFloat(e):e,w2=e=>typeof e=="number"||ye.test(e);function $M(e,t,n,r,i,a){i?(e.opacity=pt(0,n.opacity!==void 0?n.opacity:1,WM(r)),e.opacityExit=pt(t.opacity!==void 0?t.opacity:1,0,YM(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<VM;o++){const s=`border${y2[o]}Radius`;let u=b2(t,s),l=b2(n,s);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||w2(u)===w2(l)?(e[s]=Math.max(pt(v2(u),v2(l),r),0),(jr.test(l)||jr.test(u))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=pt(t.rotate||0,n.rotate||0,r))}function b2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const WM=x2(0,.5,BE),YM=x2(.5,.95,Zt);function x2(e,t,n){return r=>r<e?0:r>t?1:n(ns(e,t,r))}function E2(e,t){e.min=t.min,e.max=t.max}function rr(e,t){E2(e.x,t.x),E2(e.y,t.y)}function T2(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _2(e,t,n,r,i){return e-=t,e=Qd(e,1/n,r),i!==void 0&&(e=Qd(e,1/i,r)),e}function qM(e,t=0,n=1,r=.5,i,a=e,o=e){if(jr.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=_2(e.min,t,n,s,i),e.max=_2(e.max,t,n,s,i)}function S2(e,t,[n,r,i],a,o){qM(e,t[n],t[r],t[i],t.scale,a,o)}const GM=["x","scaleX","originX"],KM=["y","scaleY","originY"];function C2(e,t,n,r){S2(e.x,t,GM,n?n.x:void 0,r?r.x:void 0),S2(e.y,t,KM,n?n.y:void 0,r?r.y:void 0)}function A2(e){return e.translate===0&&e.scale===1}function k2(e){return A2(e.x)&&A2(e.y)}function R2(e,t){return e.min===t.min&&e.max===t.max}function XM(e,t){return R2(e.x,t.x)&&R2(e.y,t.y)}function N2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function P2(e,t){return N2(e.x,t.x)&&N2(e.y,t.y)}function I2(e){return Un(e.x)/Un(e.y)}function O2(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 ZM(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 JM=(e,t)=>e.depth-t.depth;class e5{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(JM),this.isDirty=!1,this.children.forEach(t)}}function nf(e){const t=en(e)?e.get():e;return Y4(t)?t.toValue():t}function t5(e,t){const n=Ur.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Zi(r),e(a-t))};return Xe.read(r,!0),()=>Zi(r)}function n5(e){return e instanceof SVGElement&&e.tagName!=="svg"}function r5(e,t,n){const r=en(e)?e:Ju(e);return r.start(n0("",r,t,n)),r.animation}const Ja={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rl=typeof window<"u"&&window.MotionDebug!==void 0,g0=["","X","Y","Z"],i5={visibility:"hidden"},D2=1e3;let a5=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 L2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=IT(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&&L2(r)}function M2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=a5++,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,rl&&(Ja.totalNodes=Ja.resolvedTargetDeltas=Ja.recalculatedProjection=0),this.nodes.forEach(u5),this.nodes.forEach(p5),this.nodes.forEach(h5),this.nodes.forEach(l5),rl&&window.MotionDebug.record(Ja)},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 e5)}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=n5(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=t5(f,250),ef.hasAnimatedSinceResize&&(ef.hasAnimatedSinceResize=!1,this.nodes.forEach(B2))})}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 y=this.options.transition||c.getDefaultTransition()||w5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=c.getProps(),w=!this.targetLayout||!P2(this.targetLayout,m)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={...Rg(y,"layout"),onPlay:b,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||B2(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,Zi(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(m5),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&&L2(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(F2);return}this.isUpdating||this.nodes.forEach(d5),this.isUpdating=!1,this.nodes.forEach(f5),this.nodes.forEach(o5),this.nodes.forEach(s5),this.clearAllSnapshots();const s=Ur.now();$t.delta=Ji(0,1e3/60,s-$t.timestamp),$t.timestamp=s,$t.isProcessing=!0,Ng.update.process($t),Ng.preRender.process($t),Ng.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(c5),this.sharedNodes.forEach(g5)}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=Tt(),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&&!k2(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&(s||Za(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)),b5(u),{animationId:this.root.animationId,measuredBox:s,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:s}=this.options;if(!s)return Tt();const u=s.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(x5))){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=Tt();if(rr(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&&rr(u,o),as(u.x,d.offset.x),as(u.y,d.offset.y))}return u}applyTransform(o,s=!1){const u=Tt();rr(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}),Za(c.latestValues)&&os(u,c.latestValues)}return Za(this.latestValues)&&os(u,this.latestValues),u}removeTransform(o){const s=Tt();rr(s,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!Za(l.latestValues))continue;f0(l.latestValues)&&l.updateSnapshot();const c=Tt(),d=l.measurePageBox();rr(c,d),C2(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return Za(this.latestValues)&&C2(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!==$t.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=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),tl(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Tt(),this.targetWithTransforms=Tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rr(this.target,this.layout.layoutBox),s2(this.target,this.targetDelta)):rr(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=Tt(),this.relativeTargetOrigin=Tt(),tl(this.relativeTargetOrigin,this.target,p.target),rr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}rl&&Ja.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||f0(this.parent.latestValues)||i2(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===$t.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;rr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;PM(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=Tt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(T2(this.prevProjectionDelta.x,this.projectionDelta.x),T2(this.prevProjectionDelta.y,this.projectionDelta.y)),el(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!O2(this.projectionDelta.x,this.prevProjectionDelta.x)||!O2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),rl&&Ja.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=Tt(),p=u?u.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),g=!b||b.members.length<=1,w=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(v5));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const S=T/1e3;j2(d.x,o.x,S),j2(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),y5(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&XM(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Tt()),rr(x,this.relativeTarget)),y&&(this.animationValues=c,$M(c,l,this.latestValues,S,w,g)),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&&(Zi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{ef.hasAnimatedSinceResize=!0,this.currentAnimation=r5(0,D2,{...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(D2),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&&$2(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||Tt();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}rr(s,u),os(s,c),el(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 i5;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=nf(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 y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=nf(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=ZM(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 y in tf){if(f[y]===void 0)continue;const{correct:b,applyTo:g}=tf[y],w=l.transform==="none"?f[y]:b(f[y],d);if(g){const x=g.length;for(let T=0;T<x;T++)l[g[T]]=w}else l[y]=w}return this.options.layoutId&&(l.pointerEvents=d===this?nf(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(F2),this.root.sharedNodes.clear()}}}function o5(e){e.updateLayout()}function s5(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"?nr(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],p=Un(f);f.min=r[d].min,f.max=f.min+p}):$2(a,n.layoutBox,r)&&nr(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();el(s,r,n.layoutBox);const u=is();o?el(u,e.applyTransform(i,!0),n.measuredBox):el(u,r,n.layoutBox);const l=!k2(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=Tt();tl(m,n.layoutBox,f.layoutBox);const y=Tt();tl(y,r,p.layoutBox),P2(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,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 u5(e){rl&&Ja.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 l5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function c5(e){e.clearSnapshot()}function F2(e){e.clearMeasurements()}function d5(e){e.isLayoutDirty=!1}function f5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function B2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function p5(e){e.resolveTargetDelta()}function h5(e){e.calcProjection()}function m5(e){e.resetSkewAndRotation()}function g5(e){e.removeLeadSnapshot()}function j2(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 U2(e,t,n,r){e.min=pt(t.min,n.min,r),e.max=pt(t.max,n.max,r)}function y5(e,t,n,r){U2(e.x,t.x,n.x,r),U2(e.y,t.y,n.y,r)}function v5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const w5={duration:.45,ease:[.4,0,.1,1]},H2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),z2=H2("applewebkit/")&&!H2("chrome/")?Math.round:Zt;function V2(e){e.min=z2(e.min),e.max=z2(e.max)}function b5(e){V2(e.x),V2(e.y)}function $2(e,t,n){return e==="position"||e==="preserve-aspect"&&!xM(I2(t),I2(n),.2)}function x5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const E5=M2({attachResizeListener:(e,t)=>mi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),v0={current:void 0},W2=M2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!v0.current){const e=new E5({});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"}),T5={pan:{Feature:FM},drag:{Feature:MM,ProjectionNode:W2,MeasureLayout:g2}};function Y2(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(a,o)=>{if(a.pointerType==="touch"||WT())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 gi(e.current,n,i,{passive:!e.getProps()[r]})}class _5 extends na{mount(){this.unmount=hi(Y2(this.node,!0),Y2(this.node,!1))}unmount(){}}class S5 extends na{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=hi(mi(this.node.current,"focus",()=>this.onFocus()),mi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const q2=(e,t)=>t?e===t?!0:q2(e,t.parentElement):!1;function w0(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Xd(n))}class C5 extends na{constructor(){super(...arguments),this.removeStartListeners=Zt,this.removeEndListeners=Zt,this.removeAccessibleListeners=Zt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=gi(window,"pointerup",(s,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!q2(this.node.current,s.target)?c:l;f&&Xe.update(()=>f(s,u))},{passive:!(r.onTap||r.onPointerUp)}),o=gi(window,"pointercancel",(s,u)=>this.cancelPress(s,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=hi(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=mi(this.node.current,"keyup",o),w0("down",(s,u)=>{this.startPress(s,u)})},n=mi(this.node.current,"keydown",t),r=()=>{this.isPressing&&w0("cancel",(a,o)=>this.cancelPress(a,o))},i=mi(this.node.current,"blur",r);this.removeAccessibleListeners=hi(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),!WT()}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=gi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=mi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=hi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const b0=new WeakMap,x0=new WeakMap,A5=e=>{const t=b0.get(e.target);t&&t(e)},k5=e=>{e.forEach(A5)};function R5({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(k5,{root:e,...t})),r[i]}function N5(e,t,n){const r=R5(t);return b0.set(e,n),r.observe(e),()=>{b0.delete(e),r.unobserve(e)}}const P5={some:0,all:1};class I5 extends na{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:P5[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 N5(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(O5(t,n))&&this.startObserver()}unmount(){}}function O5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const D5={inView:{Feature:I5},tap:{Feature:C5},focus:{Feature:S5},hover:{Feature:_5}},L5={layout:{ProjectionNode:W2,MeasureLayout:g2}},E0=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rf=v.createContext({}),T0=typeof window<"u",G2=T0?v.useLayoutEffect:v.useEffect,K2=v.createContext({strict:!1});function M5(e,t,n,r,i){var a,o;const{visualElement:s}=v.useContext(rf),u=v.useContext(K2),l=v.useContext(Jd),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(h2);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&F5(d.current,n,i,p),v.useInsertionEffect(()=>{f&&f.update(n,l)});const m=n[PT],y=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 G2(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),m0.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),v.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),y.current=!1))}),f}function F5(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:X2(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 X2(e){if(e)return e.options.allowProjection!==!1?e.projection:X2(e.parent)}function B5(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 af(e){return $u(e.animate)||kg.some(t=>Wu(e[t]))}function Q2(e){return!!(af(e)||e.variants)}function j5(e,t){if(af(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wu(n)?n:void 0,animate:Wu(r)?r:void 0}}return e.inherit!==!1?t:{}}function U5(e){const{initial:t,animate:n}=j5(e,v.useContext(rf));return v.useMemo(()=>({initial:t,animate:n}),[Z2(t),Z2(n)])}function Z2(e){return Array.isArray(e)?e.join(" "):e}const J2={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 J2)ss[e]={isEnabled:t=>J2[e].some(n=>!!t[n])};function H5(e){for(const t in e)ss[t]={...ss[t],...e[t]}}const z5=Symbol.for("motionComponentSymbol");function V5({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&H5(e);function a(s,u){let l;const c={...v.useContext(E0),...s,layoutId:$5(s)},{isStatic:d}=c,f=U5(s),p=r(s,d);if(!d&&T0){W5();const m=Y5(c);l=m.MeasureLayout,f.visualElement=M5(i,p,c,t,m.ProjectionNode)}return E.jsxs(rf.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(i,s,B5(p,f.visualElement,u),p,d,f.visualElement)]})}const o=v.forwardRef(a);return o[z5]=i,o}function $5({layoutId:e}){const t=v.useContext(h0).id;return t&&e!==void 0?t+"-"+e:e}function W5(e,t){v.useContext(K2).strict}function Y5(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 q5=["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:!!(q5.indexOf(e)>-1||/[A-Z]/u.test(e))}function e_(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 t_=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 n_(e,t,n,r){e_(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(t_.has(i)?i:Kd(i),t.attrs[i])}function r_(e,{layout:t,layoutId:n}){return Qi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!tf[e]||e==="opacity")}function S0(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(en(i[o])||t.style&&en(t.style[o])||r_(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 i_(e,t,n){const r=S0(e,t,n);for(const i in e)if(en(e[i])||en(t[i])){const a=Yu.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 G5(e){if(Qi.has(e))return"transform";if(_T.has(e))return Kd(e)}function K5({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,a,o,s){const u={latestValues:X5(i,a,o,s?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(i,l,u)),u}const a_=e=>(t,n)=>{const r=v.useContext(rf),i=v.useContext(Jd),a=()=>K5(e,t,r,i,n);return n?a():C0(a)};function o_(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 X5(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 b in l)o[b]=nf(l[b]);let{initial:c,animate:d}=e;const f=af(e),p=Q2(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 y=m?d:c;return y&&typeof y!="boolean"&&!$u(y)&&o_(e,y,(b,g)=>{for(const w in b){let x=b[w];if(Array.isArray(x)){const T=m?x.length-1:0;x=x[T]}x!==null&&(o[w]=x)}for(const w in g)o[w]=g[w]}),u&&(d&&c!==!1&&!$u(d)&&o_(e,d,b=>{for(const g in b){const w=G5(g);w&&s.add(w)}}),s.size&&(o.willChange=Array.from(s).join(","))),o}const A0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),s_=()=>({...A0(),attrs:{}}),u_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Q5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Z5=Yu.length;function J5(e,t,n){let r="",i=!0;for(let a=0;a<Z5;a++){const o=Yu[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=u_(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(Qi.has(u)){o=!0;continue}else if(VE(u)){i[u]=l;continue}else{const c=u_(l,Vg[u]);u.startsWith("origin")?(s=!0,a[u]=c):r[u]=c}}if(t.transform||(o||n?r.transform=J5(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 l_(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function e8(e,t,n){const r=l_(t,e.x,e.width),i=l_(n,e.y,e.height);return`${r} ${i}`}const t8={offset:"stroke-dashoffset",array:"stroke-dasharray"},n8={offset:"strokeDashoffset",array:"strokeDasharray"};function r8(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?t8:n8;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=e8(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&&r8(f,o,s,u,!1)}const N0=e=>typeof e=="string"&&e.toLowerCase()==="svg",i8={useVisualState:a_({scrapeMotionValuesFromProps:i_,createRenderState:s_,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),n_(t,n)})}})},a8={useVisualState:a_({applyWillChange:!0,scrapeMotionValuesFromProps:S0,createRenderState:A0})};function c_(e,t,n){for(const r in t)!en(t[r])&&!r_(r,n)&&(e[r]=t[r])}function o8({transformTemplate:e},t){return v.useMemo(()=>{const n=A0();return k0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function s8(e,t){const n=e.style||{},r={};return c_(r,n,e),Object.assign(r,o8(e,t)),r}function u8(e,t){const n={},r=s8(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 l8=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 of(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||l8.has(e)}let d_=e=>!of(e);function c8(e){e&&(d_=t=>t.startsWith("on")?!of(t):e(t))}try{c8(require("@emotion/is-prop-valid").default)}catch{}function d8(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(d_(i)||n===!0&&of(i)||!t&&!of(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function f8(e,t,n,r){const i=v.useMemo(()=>{const a=s_();return R0(a,t,N0(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};c_(a,e.style,e),i.style={...a,...i.style}}return i}function p8(e=!1){return(n,r,i,{latestValues:a},o)=>{const u=(_0(n)?f8:u8)(r,a,o,n),l=d8(r,typeof n=="string",e),c=n!==v.Fragment?{...l,...u,ref:i}:{},{children:d}=r,f=v.useMemo(()=>en(d)?d.get():d,[d]);return v.createElement(n,{...c,children:f})}}function h8(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={..._0(r)?i8:a8,preloadedFeatures:e,useRender:p8(i),createVisualElement:t,Component:r};return V5(o)}}const P0={current:null},f_={current:!1};function m8(){if(f_.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 g8(e,t,n){for(const r in t){const i=t[r],a=n[r];if(en(i))e.addValue(r,i);else if(en(a))e.addValue(r,Ju(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,Ju(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const p_=new WeakMap,y8=[...XE,Jt,ta],v8=e=>y8.find(KE(e)),h_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class w8{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=Ur.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=af(n),this.isVariantNode=Q2(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&&en(p)&&p.set(u[f],!1)}}mount(t){this.current=t,p_.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)),f_.current||m8(),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(){p_.delete(this.current),this.projection&&this.projection.unmount(),Zi(this.notifyUpdate),Zi(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=Qi.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):Tt()}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<h_.length;r++){const i=h_[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=g8(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=Ju(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"&&(HE(i)||UE(i))?i=parseFloat(i):!v8(i)&&ta.test(n)&&(i=sT(t,n)),this.setBaseTarget(t,en(i)?i.get():i)),en(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&&!en(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 m_ extends w8{constructor(){super(...arguments),this.KeyframeResolver=uT}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 b8(e){return window.getComputedStyle(e)}class x8 extends m_{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=e_}readValueFromInstance(t,n){if(Qi.has(n)){const r=$g(n);return r&&r.default||0}else{const r=b8(t),i=(VE(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return d2(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;en(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class E8 extends m_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qi.has(n)){const r=$g(n);return r&&r.default||0}return n=t_.has(n)?n:Kd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return i_(t,n,r)}build(t,n,r){R0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){n_(t,n,r,i)}mount(t){this.isSVGTag=N0(t.tagName),super.mount(t)}}const T8=(e,t)=>_0(e)?new E8(t):new x8(t,{allowProjection:e!==v.Fragment}),_8=h8({...fM,...D5,...T5,...L5},T8),us=oL(_8);class S8 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 C8({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[KS]=this[KS]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=fl(o);r[s]||(d7(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||dl,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 XS(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 QS(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 f7(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function p7(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 h7(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 _f=(e,t,n=3)=>{let r=0;const i=p7(50,250);return h7(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)},ZS=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},JS=e=>(...t)=>z.asap(()=>e(...t)),m7=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,g7=nn.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 y7(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function v7(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function eC(e,t){return e&&!y7(t)?v7(e,t):t}const tC=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(tC(l),tC(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 nC=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=WS(eC(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(nn.hasStandardBrowserEnv||nn.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(nn.hasStandardBrowserEnv&&(r&&z.isFunction(r)&&(r=r(t)),r||r!==!1&&m7(t.url))){const l=i&&a&&g7.read(a);l&&o.set(i,l)}return t},w7=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=nC(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 y(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function g(){if(!b)return;const x=Tn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};QS(function(N){n(N),y()},function(N){r(N),y()},S),b=null}"onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(g)},b.onabort=function(){b&&(r(new Se("Request aborted",Se.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Se("Network Error",Se.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||qS;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new Se(T,S.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,b)),b=null},a===void 0&&o.setContentType(null),"setRequestHeader"in b&&z.forEach(o.toJSON(),function(T,S){b.setRequestHeader(S,T)}),z.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([f,m]=_f(l,!0),b.addEventListener("progress",f)),u&&b.upload&&([d,p]=_f(u),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=x=>{b&&(r(!x||x.type?new hs(null,e,b):x),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=f7(i.url);if(w&&nn.protocols.indexOf(w)===-1){r(new Se("Unsupported protocol "+w+":",Se.ERR_BAD_REQUEST,e));return}b.send(a||null)})},b7=(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}},x7=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},E7=async function*(e,t){for await(const n of T7(e))yield*x7(n,t)},T7=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()}},rC=(e,t,n,r)=>{const i=E7(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})},Sf=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",iC=Sf&&typeof ReadableStream=="function",_7=Sf&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),aC=(e,...t)=>{try{return!!e(...t)}catch{return!1}},S7=iC&&aC(()=>{let e=!1;const t=new Request(nn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),oC=64*1024,oy=iC&&aC(()=>z.isReadableStream(new Response("").body)),Cf={stream:oy&&(e=>e.body)};Sf&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Cf[t]&&(Cf[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 C7=async e=>{if(e==null)return 0;if(z.isBlob(e))return e.size;if(z.isSpecCompliantForm(e))return(await new Request(nn.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 _7(e)).byteLength},A7=async(e,t)=>{const n=z.toFiniteNumber(e.getContentLength());return n??C7(t)},sy={http:GB,xhr:w7,fetch:Sf&&(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}=nC(e);l=l?(l+"").toLowerCase():"text";let p=b7([i,a&&a.toAbortSignal()],o),m;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&S7&&n!=="get"&&n!=="head"&&(b=await A7(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]=ZS(b,_f(JS(u)));r=rC(S.body,oC,N,D)}}z.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let w=await fetch(m);const x=oy&&(l==="stream"||l==="response");if(oy&&(s||x&&y)){const S={};["status","statusText","headers"].forEach(V=>{S[V]=w[V]});const _=z.toFiniteNumber(w.headers.get("content-length")),[N,D]=s&&ZS(_,_f(JS(s),!0))||[];w=new Response(rC(w.body,oC,N,()=>{D&&D(),y&&y()}),S)}l=l||"text";let T=await Cf[z.findKey(Cf,l)||"text"](w,e);return!x&&y&&y(),await new Promise((S,_)=>{QS(S,_,{data:T,headers:Tn.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:m})})}catch(g){throw y&&y(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Se("Network Error",Se.ERR_NETWORK,e,m),{cause:g.cause||g}):Se.from(g,g&&g.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 sC=e=>`- ${e}`,k7=e=>z.isFunction(e)||e===null||e===!1,uC={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,!k7(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(sC).join(`
|
|
332
332
|
`):" "+sC(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 lC(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),uC.getAdapter(e.adapter||dl.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 XS(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 cC="1.7.9",Af={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Af[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dC={};Af.transitional=function(t,n,r){function i(a,o){return"[Axios v"+cC+"] 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&&!dC[o]&&(dC[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}},Af.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function R7(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 kf={assertOptions:R7,validators:Af},zr=kf.validators;class ro{constructor(t){this.defaults=t,this.interceptors={request:new YS,response:new YS}}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&&kf.assertOptions(r,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:kf.assertOptions(i,{encode:zr.function,serialize:zr.function},!0)),kf.assertOptions(n,{baseUrl:zr.spelling("baseURL"),withXsrfToken:zr.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(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[lC.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++],y=s[d++];try{p=m(p)}catch(b){y.call(this,b);break}}try{c=lC.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=eC(t.baseURL,t.url);return WS(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 N7(e){return function(n){return e.apply(null,n)}}function P7(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 fC(e){const t=new ro(e),n=RS(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 fC(no(e,i))},n}const kt=fC(dl);kt.Axios=ro,kt.CanceledError=hs,kt.CancelToken=ly,kt.isCancel=XS,kt.VERSION=cC,kt.toFormData=Ef,kt.AxiosError=Se,kt.Cancel=kt.CanceledError,kt.all=function(t){return Promise.all(t)},kt.spread=N7,kt.isAxiosError=P7,kt.mergeConfig=no,kt.AxiosHeaders=Tn,kt.formToJSON=e=>GS(z.isHTMLForm(e)?new FormData(e):e),kt.getAdapter=uC.getAdapter,kt.HttpStatusCode=cy,kt.default=kt;const I7=/\{[^{}]+\}/g,O7=()=>{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 D7(){return Math.random().toString(36).slice(2,11)}function L7(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=O7()?s:void 0,t=gC(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:b,params:g={},parseAs:w="json",querySerializer:x,bodySerializer:T=a??F7,body:S,..._}=f||{};p&&(t=gC(p));let N=typeof i=="function"?i:mC(i);x&&(N=typeof x=="function"?x:mC({...typeof i=="object"?i:{},...x}));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:j7(V,o,b,g.header)};let $,H,X=new n(B7(d,{baseUrl:t,params:g,querySerializer:N}),P);for(const ie in _)ie in X||(X[ie]=_[ie]);if(l.length){$=D7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:w,querySerializer:N,bodySerializer:T});for(const ie of l)if(ie&&typeof ie=="object"&&typeof ie.onRequest=="function"){const ee=await ie.onRequest({request:X,schemaPath:d,params:g,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(ie){let ee=ie;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:g,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 ie=l.length-1;ie>=0;ie--){const ee=l[ie];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:g,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 re=await Y.text();try{re=JSON.parse(re)}catch{}return{error:re,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 Rf(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 pC(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(Rf(s,t[o],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function hC(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(Rf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function mC(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(hC(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(pC(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(Rf(i,a,e))}}return r.join("&")}}function M7(e,t){let n=e;for(const r of e.match(I7)??[]){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,hC(i,s,{style:o,explode:a}));continue}if(typeof s=="object"){n=n.replace(r,pC(i,s,{style:o,explode:a}));continue}if(o==="matrix"){n=n.replace(r,`;${Rf(i,s)}`);continue}n=n.replace(r,o==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function F7(e){return e instanceof FormData?e:JSON.stringify(e)}function B7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=M7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function j7(...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 gC(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const U7=e=>{console.log(e.error)},H7=e=>{const t=L7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||U7};return t.use(n),t};class z7{constructor({config:t}){ne(this,"client");ne(this,"uploadFileClient");ne(this,"config");ne(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}});ne(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>H7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,a])=>{a&&r.headers.set(i,a)})}}));ne(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>kt.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));ne(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})});ne(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));ne(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));ne(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})});ne(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));ne(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));ne(this,"getSession",async({sessionId:t,abortSignal:n})=>await this.client.GET("/backend/widget/v2/session/{sessionId}",{params:{path:{sessionId:t}},signal:n}));ne(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}));ne(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});ne(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 Nf={exports:{}};Nf.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]",y="[object Map]",b="[object Number]",g="[object Null]",w="[object Object]",x="[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]",re="[object Int8Array]",ie="[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[re]=ge[ie]=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[y]=ge[b]=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,St=Ge&&Ge.exports===We,Te=St&&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 xt=k[W];L(xt,W,k)&&(Re[at++]=xt)}return Re}function wt(k,L){for(var W=-1,le=L.length,at=k.length;++W<le;)k[at+W]=L[W];return k}function bt(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 Ot(k,L){return k.has(L)}function Ra(k,L){return k==null?void 0:k[L]}function Na(k){var L=-1,W=Array(k.size);return k.forEach(function(le,at){W[++L]=[at,le]}),W}function Pa(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,jt=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.*?")+"$"),qn=St?Ve.Buffer:void 0,In=Ve.Symbol,Nt=Ve.Uint8Array,Gn=q.propertyIsEnumerable,gn=de.splice,ki=In?In.toStringTag:void 0,KI=Object.getOwnPropertySymbols,_re=qn?qn.isBuffer:void 0,Sre=Pa(Object.keys,Object),Vv=Js(Ve,"DataView"),gc=Js(Ve,"Map"),$v=Js(Ve,"Promise"),Wv=Js(Ve,"Set"),Yv=Js(Ve,"WeakMap"),yc=Js(Object,"create"),Cre=bo(Vv),Are=bo(gc),kre=bo($v),Rre=bo(Wv),Nre=bo(Yv),XI=In?In.prototype:void 0,qv=XI?XI.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 Pre(){this.__data__=yc?yc(null):{},this.size=0}function Ire(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function Ore(k){var L=this.__data__;if(yc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Dre(k){var L=this.__data__;return yc?L[k]!==void 0:Ee.call(L,k)}function Lre(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=yc&&L===void 0?r:L,this}vo.prototype.clear=Pre,vo.prototype.delete=Ire,vo.prototype.get=Ore,vo.prototype.has=Dre,vo.prototype.set=Lre;function Ri(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 Mre(){this.__data__=[],this.size=0}function Fre(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 Bre(k){var L=this.__data__,W=sh(L,k);return W<0?void 0:L[W][1]}function jre(k){return sh(this.__data__,k)>-1}function Ure(k,L){var W=this.__data__,le=sh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}Ri.prototype.clear=Mre,Ri.prototype.delete=Fre,Ri.prototype.get=Bre,Ri.prototype.has=jre,Ri.prototype.set=Ure;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 Hre(){this.size=0,this.__data__={hash:new vo,map:new(gc||Ri),string:new vo}}function zre(k){var L=uh(this,k).delete(k);return this.size-=L?1:0,L}function Vre(k){return uh(this,k).get(k)}function $re(k){return uh(this,k).has(k)}function Wre(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=Hre,wo.prototype.delete=zre,wo.prototype.get=Vre,wo.prototype.has=$re,wo.prototype.set=Wre;function oh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new wo;++L<W;)this.add(k[L])}function Yre(k){return this.__data__.set(k,r),this}function qre(k){return this.__data__.has(k)}oh.prototype.add=oh.prototype.push=Yre,oh.prototype.has=qre;function Ia(k){var L=this.__data__=new Ri(k);this.size=L.size}function Gre(){this.__data__=new Ri,this.size=0}function Kre(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function Xre(k){return this.__data__.get(k)}function Qre(k){return this.__data__.has(k)}function Zre(k,L){var W=this.__data__;if(W instanceof Ri){var le=W.__data__;if(!gc||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}Ia.prototype.clear=Gre,Ia.prototype.delete=Kre,Ia.prototype.get=Xre,Ia.prototype.has=Qre,Ia.prototype.set=Zre;function Jre(k,L){var W=lh(k),le=!W&&hie(k),at=!W&&!le&&Gv(k),Re=!W&&!le&&!at&&aO(k),xt=W||le||at||Re,Ut=xt?Ke(k.length,String):[],qt=Ut.length;for(var gt in k)Ee.call(k,gt)&&!(xt&&(gt=="length"||at&&(gt=="offset"||gt=="parent")||Re&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||lie(gt,qt)))&&Ut.push(gt);return Ut}function sh(k,L){for(var W=k.length;W--;)if(tO(k[W][0],L))return W;return-1}function eie(k,L,W){var le=L(k);return lh(k)?le:wt(le,W(k))}function vc(k){return k==null?k===void 0?V:g:ki&&ki in Object(k)?sie(k):pie(k)}function QI(k){return wc(k)&&vc(k)==s}function ZI(k,L,W,le,at){return k===L?!0:k==null||L==null||!wc(k)&&!wc(L)?k!==k&&L!==L:tie(k,L,W,le,ZI,at)}function tie(k,L,W,le,at,Re){var xt=lh(k),Ut=lh(L),qt=xt?u:Oa(k),gt=Ut?u:Oa(L);qt=qt==s?w:qt,gt=gt==s?w:gt;var Kn=qt==w,Or=gt==w,un=qt==gt;if(un&&Gv(k)){if(!Gv(L))return!1;xt=!0,Kn=!1}if(un&&!Kn)return Re||(Re=new Ia),xt||aO(k)?JI(k,L,W,le,at,Re):aie(k,L,qt,W,le,at,Re);if(!(W&i)){var pr=Kn&&Ee.call(k,"__wrapped__"),hr=Or&&Ee.call(L,"__wrapped__");if(pr||hr){var Da=pr?k.value():k,Ni=hr?L.value():L;return Re||(Re=new Ia),at(Da,Ni,W,le,Re)}}return un?(Re||(Re=new Ia),oie(k,L,W,le,at,Re)):!1}function nie(k){if(!iO(k)||die(k))return!1;var L=nO(k)?mn:O;return L.test(bo(k))}function rie(k){return wc(k)&&rO(k.length)&&!!ge[vc(k)]}function iie(k){if(!fie(k))return Sre(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function JI(k,L,W,le,at,Re){var xt=W&i,Ut=k.length,qt=L.length;if(Ut!=qt&&!(xt&&qt>Ut))return!1;var gt=Re.get(k);if(gt&&Re.get(L))return gt==L;var Kn=-1,Or=!0,un=W&a?new oh:void 0;for(Re.set(k,L),Re.set(L,k);++Kn<Ut;){var pr=k[Kn],hr=L[Kn];if(le)var Da=xt?le(hr,pr,Kn,L,k,Re):le(pr,hr,Kn,k,L,Re);if(Da!==void 0){if(Da)continue;Or=!1;break}if(un){if(!bt(L,function(Ni,xo){if(!Ot(un,xo)&&(pr===Ni||at(pr,Ni,W,le,Re)))return un.push(xo)})){Or=!1;break}}else if(!(pr===hr||at(pr,hr,W,le,Re))){Or=!1;break}}return Re.delete(k),Re.delete(L),Or}function aie(k,L,W,le,at,Re,xt){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 Nt(k),new Nt(L)));case c:case d:case b:return tO(+k,+L);case f:return k.name==L.name&&k.message==L.message;case S:case N:return k==L+"";case y:var Ut=Na;case _:var qt=le&i;if(Ut||(Ut=te),k.size!=L.size&&!qt)return!1;var gt=xt.get(k);if(gt)return gt==L;le|=a,xt.set(k,L);var Kn=JI(Ut(k),Ut(L),le,at,Re,xt);return xt.delete(k),Kn;case D:if(qv)return qv.call(k)==qv.call(L)}return!1}function oie(k,L,W,le,at,Re){var xt=W&i,Ut=eO(k),qt=Ut.length,gt=eO(L),Kn=gt.length;if(qt!=Kn&&!xt)return!1;for(var Or=qt;Or--;){var un=Ut[Or];if(!(xt?un in L:Ee.call(L,un)))return!1}var pr=Re.get(k);if(pr&&Re.get(L))return pr==L;var hr=!0;Re.set(k,L),Re.set(L,k);for(var Da=xt;++Or<qt;){un=Ut[Or];var Ni=k[un],xo=L[un];if(le)var oO=xt?le(xo,Ni,un,L,k,Re):le(Ni,xo,un,k,L,Re);if(!(oO===void 0?Ni===xo||at(Ni,xo,W,le,Re):oO)){hr=!1;break}Da||(Da=un=="constructor")}if(hr&&!Da){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)&&(hr=!1)}return Re.delete(k),Re.delete(L),hr}function eO(k){return eie(k,yie,uie)}function uh(k,L){var W=k.__data__;return cie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Js(k,L){var W=Ra(k,L);return nie(W)?W:void 0}function sie(k){var L=Ee.call(k,ki),W=k[ki];try{k[ki]=void 0;var le=!0}catch{}var at=Pn.call(k);return le&&(L?k[ki]=W:delete k[ki]),at}var uie=KI?function(k){return k==null?[]:(k=Object(k),He(KI(k),function(L){return Gn.call(k,L)}))}:vie,Oa=vc;(Vv&&Oa(new Vv(new ArrayBuffer(1)))!=H||gc&&Oa(new gc)!=y||$v&&Oa($v.resolve())!=x||Wv&&Oa(new Wv)!=_||Yv&&Oa(new Yv)!=P)&&(Oa=function(k){var L=vc(k),W=L==w?k.constructor:void 0,le=W?bo(W):"";if(le)switch(le){case Cre:return H;case Are:return y;case kre:return x;case Rre:return _;case Nre:return P}return L});function lie(k,L){return L=L??o,!!L&&(typeof k=="number"||Pe.test(k))&&k>-1&&k%1==0&&k<L}function cie(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function die(k){return!!jt&&jt in k}function fie(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function pie(k){return Pn.call(k)}function bo(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function tO(k,L){return k===L||k!==k&&L!==L}var hie=QI(function(){return arguments}())?QI:function(k){return wc(k)&&Ee.call(k,"callee")&&!Gn.call(k,"callee")},lh=Array.isArray;function mie(k){return k!=null&&rO(k.length)&&!nO(k)}var Gv=_re||wie;function gie(k,L){return ZI(k,L)}function nO(k){if(!iO(k))return!1;var L=vc(k);return L==p||L==m||L==l||L==T}function rO(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function iO(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function wc(k){return k!=null&&typeof k=="object"}var aO=Ye?Me(Ye):rie;function yie(k){return mie(k)?Jre(k):iie(k)}function vie(){return[]}function wie(){return!1}e.exports=gie}(Nf,Nf.exports);var V7=Nf.exports;const $7=Ct(V7);class ms{constructor(t){ne(this,"subscribers",new Set);Kv(this,ei);ne(this,"initialState");Kv(this,Zs);ne(this,"lifecycleListeners",new Map);ne(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{}})}});ne(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){this.emitLifecycle("error",{error:i})}})});ne(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));ne(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)}});ne(this,"get",()=>Eo(this,ei));ne(this,"set",t=>{this.emitLifecycle("beforeUpdate",{previousState:Eo(this,ei),nextState:t}),$7(Eo(this,ei),t)||(bc(this,ei,t),bc(this,Zs,Date.now()),this.emitLifecycle("stateChange",{state:t}),this.notifySubscribers(t)),this.emitLifecycle("afterUpdate",{state:t})});ne(this,"setPartial",t=>{if(t==null)return;const n={...Eo(this,ei),...t};this.set(n)});ne(this,"clear",()=>{this.emitLifecycle("destroy"),this.subscribers=new Set,this.lifecycleListeners=new Map});ne(this,"reset",()=>{this.set(this.initialState)});ne(this,"lastUpdated",()=>Eo(this,Zs));bc(this,ei,t),this.initialState=t,bc(this,Zs,Date.now()),this.emitLifecycle("init",{initialState:Eo(this,ei)})}}ei=new WeakMap,Zs=new WeakMap;class W7{constructor({config:t,api:n}){ne(this,"config");ne(this,"api");ne(this,"state");ne(this,"shouldCollectData",()=>{var n;return!!(!((n=this.state.get().contact)!=null&&n.token)&&this.config.collectUserData)});ne(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})});ne(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 dy{constructor(){ne(this,"state",new ms({isPolling:!1,isError:!1}));ne(this,"abortController",new AbortController);ne(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});ne(this,"stopPolling",null);ne(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 Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function Y7(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}let fy;const q7=new Uint8Array(16);function G7(){if(!fy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fy=crypto.getRandomValues.bind(crypto)}return fy(q7)}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))??G7();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,Y7(r)}function py(){return vC()}class K7{constructor({config:t,api:n,contactCtx:r}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"activeSessionPoller",new dy);ne(this,"sessionsRefresher",new dy);ne(this,"sessionState",new ms({session:null,isCreatingSession:!1}));ne(this,"sessionsState",new ms({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));ne(this,"reset",async()=>{this.sessionState.reset(),this.activeSessionPoller.reset()});ne(this,"registerActiveSessionPolling",()=>{this.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.activeSessionPoller.startPolling(async n=>{const{data:r}=await this.api.getSession({sessionId:t.id,abortSignal:n});r&&this.sessionState.setPartial({session:r})},1e3):this.activeSessionPoller.reset()})});ne(this,"registerInitialSessionsFetch",()=>{var n;const t=async()=>{this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.loadMoreSessions(),this.sessionsState.setPartial({isInitialFetchLoading:!1})};(n=this.contactCtx.state.get().contact)!=null&&n.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher()),this.contactCtx.state.subscribe(({contact:r})=>{r!=null&&r.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher())})});ne(this,"registerSessionsRefresher",()=>{this.sessionsRefresher.startPolling(async()=>{const{data:t}=await this.getSessions({cursor:void 0});if(!t)return;const n=[...t.items,...this.sessionsState.get().data].filter((r,i,a)=>i===a.findIndex(o=>r.id===o.id));this.sessionsState.setPartial({data:n})},1e4)});ne(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)});ne(this,"loadMoreSessions",async()=>{if(this.sessionsState.get().isLastPage)return;const{data:t}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(t){const r=[...this.sessionsState.get().data,...t.items].filter((i,a,o)=>a===o.findIndex(s=>i.id===s.id));this.sessionsState.setPartial({data:r,cursor:t.next||void 0,isLastPage:t.next===null})}});ne(this,"getSessions",async({cursor:t})=>{var n,r;return(n=this.contactCtx.state.get().contact)!=null&&n.token?await this.api.getSessions({cursor:t,filters:(r=this.config.user)!=null&&r.externalId?{external_id:this.config.user.externalId}:{}}):{data:null}});this.config=t,this.api=n,this.contactCtx=r,this.registerActiveSessionPolling(),this.registerInitialSessionsFetch()}}class X7{constructor({config:t,api:n,sessionCtx:r}){ne(this,"config");ne(this,"api");ne(this,"sessionCtx");ne(this,"poller",new dy);ne(this,"state",new ms({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}));ne(this,"sendMessageAbortController",new AbortController);ne(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset(),this.poller.reset()});ne(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()})});ne(this,"sendMessage",async t=>{var i,a,o,s,u,l,c,d,f;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({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const p=this.toUserMessage(t.content,t.attachments||void 0),m=this.state.get().messages;if(this.state.setPartial({messages:[...m,p]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const y=(o=this.sessionCtx.sessionState.get().session)==null?void 0:o.id;if(!y)return;const{data:b}=await this.api.sendMessage({uuid:p.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:y,user:(s=this.config.user)==null?void 0:s.data,...t},this.sendMessageAbortController.signal);if(b!=null&&b.success){const g=this.toBotMessage(b);if(g){const w=this.state.get().messages;if(!!w.some(T=>T.id===g.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((u=b.autopilotResponse)==null?void 0:u.mightSolveUserIssue)||((l=b.uiResponse)==null?void 0:l.mightSolveUserIssue)});return}this.state.setPartial({messages:[...w,g],lastAIResMightSolveUserIssue:((c=b.autopilotResponse)==null?void 0:c.mightSolveUserIssue)||((d=b.uiResponse)==null?void 0:d.mightSolveUserIssue)})}}else{const g=this.toBotErrorMessage(((f=b==null?void 0:b.error)==null?void 0:f.message)||"Unknown error occurred"),w=this.state.get().messages;this.state.setPartial({messages:[...w,g]})}}catch(p){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",p)}finally{this.state.setPartial({isSendingMessage:!1})}});ne(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(this.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})});ne(this,"mapHistoryToMessage",t=>{var i,a,o;const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};if(t.sender.kind==="user")return{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""};if(t.sender.kind==="agent")return{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""},agent:{name:t.sender.name||"",avatar:t.sender.avatar||"",id:null,isAi:!1}};const r=(i=t.actionCalls)==null?void 0:i.at(-1);return{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((a=this.config.bot)==null?void 0:a.name)||"",isAi:!0,avatar:((o=this.config.bot)==null?void 0:o.avatar)||""},data:{message:t.content.text||"",action:r?{name:r.actionName,data:r.result}:void 0}}});ne(this,"toUserMessage",(t,n)=>({id:py(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}));ne(this,"toBotMessage",t=>{var n;return t.success&&t.autopilotResponse?{type:"FROM_BOT",id:t.autopilotResponse.id||py(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:t.autopilotResponse.value.content,action:(n=t.uiResponse)!=null&&n.value.name?{name:t.uiResponse.value.name,data:t.uiResponse.value.request_response}:void 0}}:null});ne(this,"toBotErrorMessage",t=>({type:"FROM_BOT",id:py(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error",action:void 0}}));this.config=t,this.api=n,this.sessionCtx=r,this.registerPolling()}}class Q7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){ne(this,"state");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"resetChat");ne(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});ne(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});ne(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 Z7{constructor({config:t}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"messageCtx");ne(this,"routerCtx");ne(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});this.config=t,this.api=new z7({config:t}),this.contactCtx=new W7({api:this.api,config:this.config}),this.sessionCtx=new K7({config:this.config,api:this.api,contactCtx:this.contactCtx}),this.messageCtx=new X7({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.routerCtx=new Q7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}}const[ar,J7]=uB();function ej({options:e,children:t,components:n}){const r=v.useRef(new Z7({config:e})).current,i=v.useMemo(()=>new sB({components:n}),[n]);return E.jsx(J7,{value:{widgetCtx:r,components:n,componentStore:i,version:vE},children:t})}function gs(){const{widgetCtx:e}=ar();return e.config}function pl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function tj(){const{widgetCtx:e}=ar();return{contactState:pl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function ys(){const{widgetCtx:e}=ar();return{messagesState:pl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function vs(){const{widgetCtx:e}=ar(),t=pl(e.sessionCtx.sessionState),n=pl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n}}function wC(){var r;const{sessionState:e}=vs(),{messagesState:t}=ys();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&&kf.assertOptions(r,{silentJSONParsing:zr.transitional(zr.boolean),forcedJSONParsing:zr.transitional(zr.boolean),clarifyTimeoutError:zr.transitional(zr.boolean)},!1),i!=null&&(z.isFunction(i)?n.paramsSerializer={serialize:i}:kf.assertOptions(i,{encode:zr.function,serialize:zr.function},!0)),kf.assertOptions(n,{baseUrl:zr.spelling("baseURL"),withXsrfToken:zr.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(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!u){const m=[lC.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++],y=s[d++];try{p=m(p)}catch(b){y.call(this,b);break}}try{c=lC.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=eC(t.baseURL,t.url);return WS(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 N7(e){return function(n){return e.apply(null,n)}}function P7(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 fC(e){const t=new ro(e),n=RS(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 fC(no(e,i))},n}const kt=fC(dl);kt.Axios=ro,kt.CanceledError=hs,kt.CancelToken=ly,kt.isCancel=XS,kt.VERSION=cC,kt.toFormData=Ef,kt.AxiosError=Se,kt.Cancel=kt.CanceledError,kt.all=function(t){return Promise.all(t)},kt.spread=N7,kt.isAxiosError=P7,kt.mergeConfig=no,kt.AxiosHeaders=Tn,kt.formToJSON=e=>GS(z.isHTMLForm(e)?new FormData(e):e),kt.getAdapter=uC.getAdapter,kt.HttpStatusCode=cy,kt.default=kt;const I7=/\{[^{}]+\}/g,O7=()=>{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 D7(){return Math.random().toString(36).slice(2,11)}function L7(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=O7()?s:void 0,t=gC(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:m=r,Request:y=n,headers:b,params:g={},parseAs:w="json",querySerializer:x,bodySerializer:T=a??F7,body:S,..._}=f||{};p&&(t=gC(p));let N=typeof i=="function"?i:mC(i);x&&(N=typeof x=="function"?x:mC({...typeof i=="object"?i:{},...x}));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:j7(V,o,b,g.header)};let $,H,X=new n(B7(d,{baseUrl:t,params:g,querySerializer:N}),P);for(const ie in _)ie in X||(X[ie]=_[ie]);if(l.length){$=D7(),H=Object.freeze({baseUrl:t,fetch:m,parseAs:w,querySerializer:N,bodySerializer:T});for(const ie of l)if(ie&&typeof ie=="object"&&typeof ie.onRequest=="function"){const ee=await ie.onRequest({request:X,schemaPath:d,params:g,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(ie){let ee=ie;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:g,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 ie=l.length-1;ie>=0;ie--){const ee=l[ie];if(ee&&typeof ee=="object"&&typeof ee.onResponse=="function"){const F=await ee.onResponse({request:X,response:Y,schemaPath:d,params:g,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 re=await Y.text();try{re=JSON.parse(re)}catch{}return{error:re,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 Rf(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 pC(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(Rf(s,t[o],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function hC(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(Rf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function mC(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(hC(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(pC(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(Rf(i,a,e))}}return r.join("&")}}function M7(e,t){let n=e;for(const r of e.match(I7)??[]){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,hC(i,s,{style:o,explode:a}));continue}if(typeof s=="object"){n=n.replace(r,pC(i,s,{style:o,explode:a}));continue}if(o==="matrix"){n=n.replace(r,`;${Rf(i,s)}`);continue}n=n.replace(r,o==="label"?`.${encodeURIComponent(s)}`:encodeURIComponent(s))}return n}function F7(e){return e instanceof FormData?e:JSON.stringify(e)}function B7(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=M7(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function j7(...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 gC(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const U7=e=>{console.log(e.error)},H7=e=>{const t=L7({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||U7};return t.use(n),t};class z7{constructor({config:t}){ne(this,"client");ne(this,"uploadFileClient");ne(this,"config");ne(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}});ne(this,"createOpenAPIClient",({baseUrl:t,headers:n})=>H7({baseUrl:t,onRequest:({request:r})=>{Object.entries(n).forEach(([i,a])=>{a&&r.headers.set(i,a)})}}));ne(this,"createAxiosUploadClient",({baseUrl:t,headers:n})=>kt.create({baseURL:`${t}/backend/widget/v2/upload`,headers:n}));ne(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})});ne(this,"widgetPrelude",async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}));ne(this,"sendMessage",async(t,n)=>await this.client.POST("/backend/widget/v2/chat/send",{body:t,signal:n}));ne(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})});ne(this,"createUnverifiedContact",async t=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:t}));ne(this,"createSession",async t=>await this.client.POST("/backend/widget/v2/create-session",{body:t}));ne(this,"getSession",async({sessionId:t,abortSignal:n})=>await this.client.GET("/backend/widget/v2/session/{sessionId}",{params:{path:{sessionId:t}},signal:n}));ne(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}));ne(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});ne(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 Nf={exports:{}};Nf.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]",y="[object Map]",b="[object Number]",g="[object Null]",w="[object Object]",x="[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]",re="[object Int8Array]",ie="[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[re]=ge[ie]=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[y]=ge[b]=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,St=Ge&&Ge.exports===We,Te=St&&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 xt=k[W];L(xt,W,k)&&(Re[at++]=xt)}return Re}function wt(k,L){for(var W=-1,le=L.length,at=k.length;++W<le;)k[at+W]=L[W];return k}function bt(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 Ot(k,L){return k.has(L)}function Ra(k,L){return k==null?void 0:k[L]}function Na(k){var L=-1,W=Array(k.size);return k.forEach(function(le,at){W[++L]=[at,le]}),W}function Pa(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,jt=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.*?")+"$"),qn=St?Ve.Buffer:void 0,In=Ve.Symbol,Nt=Ve.Uint8Array,Gn=q.propertyIsEnumerable,gn=de.splice,ki=In?In.toStringTag:void 0,KI=Object.getOwnPropertySymbols,_re=qn?qn.isBuffer:void 0,Sre=Pa(Object.keys,Object),Vv=Js(Ve,"DataView"),gc=Js(Ve,"Map"),$v=Js(Ve,"Promise"),Wv=Js(Ve,"Set"),Yv=Js(Ve,"WeakMap"),yc=Js(Object,"create"),Cre=bo(Vv),Are=bo(gc),kre=bo($v),Rre=bo(Wv),Nre=bo(Yv),XI=In?In.prototype:void 0,qv=XI?XI.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 Pre(){this.__data__=yc?yc(null):{},this.size=0}function Ire(k){var L=this.has(k)&&delete this.__data__[k];return this.size-=L?1:0,L}function Ore(k){var L=this.__data__;if(yc){var W=L[k];return W===r?void 0:W}return Ee.call(L,k)?L[k]:void 0}function Dre(k){var L=this.__data__;return yc?L[k]!==void 0:Ee.call(L,k)}function Lre(k,L){var W=this.__data__;return this.size+=this.has(k)?0:1,W[k]=yc&&L===void 0?r:L,this}vo.prototype.clear=Pre,vo.prototype.delete=Ire,vo.prototype.get=Ore,vo.prototype.has=Dre,vo.prototype.set=Lre;function Ri(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 Mre(){this.__data__=[],this.size=0}function Fre(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 Bre(k){var L=this.__data__,W=sh(L,k);return W<0?void 0:L[W][1]}function jre(k){return sh(this.__data__,k)>-1}function Ure(k,L){var W=this.__data__,le=sh(W,k);return le<0?(++this.size,W.push([k,L])):W[le][1]=L,this}Ri.prototype.clear=Mre,Ri.prototype.delete=Fre,Ri.prototype.get=Bre,Ri.prototype.has=jre,Ri.prototype.set=Ure;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 Hre(){this.size=0,this.__data__={hash:new vo,map:new(gc||Ri),string:new vo}}function zre(k){var L=uh(this,k).delete(k);return this.size-=L?1:0,L}function Vre(k){return uh(this,k).get(k)}function $re(k){return uh(this,k).has(k)}function Wre(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=Hre,wo.prototype.delete=zre,wo.prototype.get=Vre,wo.prototype.has=$re,wo.prototype.set=Wre;function oh(k){var L=-1,W=k==null?0:k.length;for(this.__data__=new wo;++L<W;)this.add(k[L])}function Yre(k){return this.__data__.set(k,r),this}function qre(k){return this.__data__.has(k)}oh.prototype.add=oh.prototype.push=Yre,oh.prototype.has=qre;function Ia(k){var L=this.__data__=new Ri(k);this.size=L.size}function Gre(){this.__data__=new Ri,this.size=0}function Kre(k){var L=this.__data__,W=L.delete(k);return this.size=L.size,W}function Xre(k){return this.__data__.get(k)}function Qre(k){return this.__data__.has(k)}function Zre(k,L){var W=this.__data__;if(W instanceof Ri){var le=W.__data__;if(!gc||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}Ia.prototype.clear=Gre,Ia.prototype.delete=Kre,Ia.prototype.get=Xre,Ia.prototype.has=Qre,Ia.prototype.set=Zre;function Jre(k,L){var W=lh(k),le=!W&&hie(k),at=!W&&!le&&Gv(k),Re=!W&&!le&&!at&&aO(k),xt=W||le||at||Re,Ut=xt?Ke(k.length,String):[],qt=Ut.length;for(var gt in k)Ee.call(k,gt)&&!(xt&&(gt=="length"||at&&(gt=="offset"||gt=="parent")||Re&&(gt=="buffer"||gt=="byteLength"||gt=="byteOffset")||lie(gt,qt)))&&Ut.push(gt);return Ut}function sh(k,L){for(var W=k.length;W--;)if(tO(k[W][0],L))return W;return-1}function eie(k,L,W){var le=L(k);return lh(k)?le:wt(le,W(k))}function vc(k){return k==null?k===void 0?V:g:ki&&ki in Object(k)?sie(k):pie(k)}function QI(k){return wc(k)&&vc(k)==s}function ZI(k,L,W,le,at){return k===L?!0:k==null||L==null||!wc(k)&&!wc(L)?k!==k&&L!==L:tie(k,L,W,le,ZI,at)}function tie(k,L,W,le,at,Re){var xt=lh(k),Ut=lh(L),qt=xt?u:Oa(k),gt=Ut?u:Oa(L);qt=qt==s?w:qt,gt=gt==s?w:gt;var Kn=qt==w,Or=gt==w,un=qt==gt;if(un&&Gv(k)){if(!Gv(L))return!1;xt=!0,Kn=!1}if(un&&!Kn)return Re||(Re=new Ia),xt||aO(k)?JI(k,L,W,le,at,Re):aie(k,L,qt,W,le,at,Re);if(!(W&i)){var pr=Kn&&Ee.call(k,"__wrapped__"),hr=Or&&Ee.call(L,"__wrapped__");if(pr||hr){var Da=pr?k.value():k,Ni=hr?L.value():L;return Re||(Re=new Ia),at(Da,Ni,W,le,Re)}}return un?(Re||(Re=new Ia),oie(k,L,W,le,at,Re)):!1}function nie(k){if(!iO(k)||die(k))return!1;var L=nO(k)?mn:O;return L.test(bo(k))}function rie(k){return wc(k)&&rO(k.length)&&!!ge[vc(k)]}function iie(k){if(!fie(k))return Sre(k);var L=[];for(var W in Object(k))Ee.call(k,W)&&W!="constructor"&&L.push(W);return L}function JI(k,L,W,le,at,Re){var xt=W&i,Ut=k.length,qt=L.length;if(Ut!=qt&&!(xt&&qt>Ut))return!1;var gt=Re.get(k);if(gt&&Re.get(L))return gt==L;var Kn=-1,Or=!0,un=W&a?new oh:void 0;for(Re.set(k,L),Re.set(L,k);++Kn<Ut;){var pr=k[Kn],hr=L[Kn];if(le)var Da=xt?le(hr,pr,Kn,L,k,Re):le(pr,hr,Kn,k,L,Re);if(Da!==void 0){if(Da)continue;Or=!1;break}if(un){if(!bt(L,function(Ni,xo){if(!Ot(un,xo)&&(pr===Ni||at(pr,Ni,W,le,Re)))return un.push(xo)})){Or=!1;break}}else if(!(pr===hr||at(pr,hr,W,le,Re))){Or=!1;break}}return Re.delete(k),Re.delete(L),Or}function aie(k,L,W,le,at,Re,xt){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 Nt(k),new Nt(L)));case c:case d:case b:return tO(+k,+L);case f:return k.name==L.name&&k.message==L.message;case S:case N:return k==L+"";case y:var Ut=Na;case _:var qt=le&i;if(Ut||(Ut=te),k.size!=L.size&&!qt)return!1;var gt=xt.get(k);if(gt)return gt==L;le|=a,xt.set(k,L);var Kn=JI(Ut(k),Ut(L),le,at,Re,xt);return xt.delete(k),Kn;case D:if(qv)return qv.call(k)==qv.call(L)}return!1}function oie(k,L,W,le,at,Re){var xt=W&i,Ut=eO(k),qt=Ut.length,gt=eO(L),Kn=gt.length;if(qt!=Kn&&!xt)return!1;for(var Or=qt;Or--;){var un=Ut[Or];if(!(xt?un in L:Ee.call(L,un)))return!1}var pr=Re.get(k);if(pr&&Re.get(L))return pr==L;var hr=!0;Re.set(k,L),Re.set(L,k);for(var Da=xt;++Or<qt;){un=Ut[Or];var Ni=k[un],xo=L[un];if(le)var oO=xt?le(xo,Ni,un,L,k,Re):le(Ni,xo,un,k,L,Re);if(!(oO===void 0?Ni===xo||at(Ni,xo,W,le,Re):oO)){hr=!1;break}Da||(Da=un=="constructor")}if(hr&&!Da){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)&&(hr=!1)}return Re.delete(k),Re.delete(L),hr}function eO(k){return eie(k,yie,uie)}function uh(k,L){var W=k.__data__;return cie(L)?W[typeof L=="string"?"string":"hash"]:W.map}function Js(k,L){var W=Ra(k,L);return nie(W)?W:void 0}function sie(k){var L=Ee.call(k,ki),W=k[ki];try{k[ki]=void 0;var le=!0}catch{}var at=Pn.call(k);return le&&(L?k[ki]=W:delete k[ki]),at}var uie=KI?function(k){return k==null?[]:(k=Object(k),He(KI(k),function(L){return Gn.call(k,L)}))}:vie,Oa=vc;(Vv&&Oa(new Vv(new ArrayBuffer(1)))!=H||gc&&Oa(new gc)!=y||$v&&Oa($v.resolve())!=x||Wv&&Oa(new Wv)!=_||Yv&&Oa(new Yv)!=P)&&(Oa=function(k){var L=vc(k),W=L==w?k.constructor:void 0,le=W?bo(W):"";if(le)switch(le){case Cre:return H;case Are:return y;case kre:return x;case Rre:return _;case Nre:return P}return L});function lie(k,L){return L=L??o,!!L&&(typeof k=="number"||Pe.test(k))&&k>-1&&k%1==0&&k<L}function cie(k){var L=typeof k;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?k!=="__proto__":k===null}function die(k){return!!jt&&jt in k}function fie(k){var L=k&&k.constructor,W=typeof L=="function"&&L.prototype||q;return k===W}function pie(k){return Pn.call(k)}function bo(k){if(k!=null){try{return _e.call(k)}catch{}try{return k+""}catch{}}return""}function tO(k,L){return k===L||k!==k&&L!==L}var hie=QI(function(){return arguments}())?QI:function(k){return wc(k)&&Ee.call(k,"callee")&&!Gn.call(k,"callee")},lh=Array.isArray;function mie(k){return k!=null&&rO(k.length)&&!nO(k)}var Gv=_re||wie;function gie(k,L){return ZI(k,L)}function nO(k){if(!iO(k))return!1;var L=vc(k);return L==p||L==m||L==l||L==T}function rO(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function iO(k){var L=typeof k;return k!=null&&(L=="object"||L=="function")}function wc(k){return k!=null&&typeof k=="object"}var aO=Ye?Me(Ye):rie;function yie(k){return mie(k)?Jre(k):iie(k)}function vie(){return[]}function wie(){return!1}e.exports=gie}(Nf,Nf.exports);var V7=Nf.exports;const $7=Ct(V7);class ms{constructor(t){ne(this,"subscribers",new Set);Kv(this,ei);ne(this,"initialState");Kv(this,Zs);ne(this,"lifecycleListeners",new Map);ne(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{}})}});ne(this,"notifySubscribers",t=>{Array.from(this.subscribers).forEach(r=>{try{r(t)}catch(i){this.emitLifecycle("error",{error:i})}})});ne(this,"subscribe",t=>(this.subscribers.add(t),()=>{this.subscribers.delete(t)}));ne(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)}});ne(this,"get",()=>Eo(this,ei));ne(this,"set",t=>{this.emitLifecycle("beforeUpdate",{previousState:Eo(this,ei),nextState:t}),$7(Eo(this,ei),t)||(bc(this,ei,t),bc(this,Zs,Date.now()),this.emitLifecycle("stateChange",{state:t}),this.notifySubscribers(t)),this.emitLifecycle("afterUpdate",{state:t})});ne(this,"setPartial",t=>{if(t==null)return;const n={...Eo(this,ei),...t};this.set(n)});ne(this,"clear",()=>{this.emitLifecycle("destroy"),this.subscribers=new Set,this.lifecycleListeners=new Map});ne(this,"reset",()=>{this.set(this.initialState)});ne(this,"lastUpdated",()=>Eo(this,Zs));bc(this,ei,t),this.initialState=t,bc(this,Zs,Date.now()),this.emitLifecycle("init",{initialState:Eo(this,ei)})}}ei=new WeakMap,Zs=new WeakMap;class W7{constructor({config:t,api:n}){ne(this,"config");ne(this,"api");ne(this,"state");ne(this,"shouldCollectData",()=>{var n;return!!(!((n=this.state.get().contact)!=null&&n.token)&&this.config.collectUserData)});ne(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})});ne(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 dy{constructor(){ne(this,"state",new ms({isPolling:!1,isError:!1}));ne(this,"abortController",new AbortController);ne(this,"reset",()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null});ne(this,"stopPolling",null);ne(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 Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function Y7(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}let fy;const q7=new Uint8Array(16);function G7(){if(!fy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fy=crypto.getRandomValues.bind(crypto)}return fy(q7)}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))??G7();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,Y7(r)}function py(){return vC()}class K7{constructor({config:t,api:n,contactCtx:r}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"activeSessionPoller",new dy);ne(this,"sessionsRefresher",new dy);ne(this,"sessionState",new ms({session:null,isCreatingSession:!1}));ne(this,"sessionsState",new ms({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}));ne(this,"reset",async()=>{this.sessionState.reset(),this.activeSessionPoller.reset()});ne(this,"registerActiveSessionPolling",()=>{this.sessionState.subscribe(({session:t})=>{t!=null&&t.id?this.activeSessionPoller.startPolling(async n=>{const{data:r}=await this.api.getSession({sessionId:t.id,abortSignal:n});r&&this.sessionState.setPartial({session:r})},1e3):this.activeSessionPoller.reset()})});ne(this,"registerInitialSessionsFetch",()=>{var n;const t=async()=>{this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.loadMoreSessions(),this.sessionsState.setPartial({isInitialFetchLoading:!1})};(n=this.contactCtx.state.get().contact)!=null&&n.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher()),this.contactCtx.state.subscribe(({contact:r})=>{r!=null&&r.token&&!this.sessionsState.get().didStartInitialFetch&&(t(),this.registerSessionsRefresher())})});ne(this,"registerSessionsRefresher",()=>{this.sessionsRefresher.startPolling(async()=>{const{data:t}=await this.getSessions({cursor:void 0});if(!t)return;const n=[...t.items,...this.sessionsState.get().data].filter((r,i,a)=>i===a.findIndex(o=>r.id===o.id));this.sessionsState.setPartial({data:n})},1e4)});ne(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)});ne(this,"loadMoreSessions",async()=>{if(this.sessionsState.get().isLastPage)return;const{data:t}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(t){const r=[...this.sessionsState.get().data,...t.items].filter((i,a,o)=>a===o.findIndex(s=>i.id===s.id));this.sessionsState.setPartial({data:r,cursor:t.next||void 0,isLastPage:t.next===null})}});ne(this,"getSessions",async({cursor:t})=>{var n,r;return(n=this.contactCtx.state.get().contact)!=null&&n.token?await this.api.getSessions({cursor:t,filters:(r=this.config.user)!=null&&r.externalId?{external_id:this.config.user.externalId}:{}}):{data:null}});this.config=t,this.api=n,this.contactCtx=r,this.registerActiveSessionPolling(),this.registerInitialSessionsFetch()}}class X7{constructor({config:t,api:n,sessionCtx:r}){ne(this,"config");ne(this,"api");ne(this,"sessionCtx");ne(this,"poller",new dy);ne(this,"state",new ms({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}));ne(this,"sendMessageAbortController",new AbortController);ne(this,"reset",()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset(),this.poller.reset()});ne(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()})});ne(this,"sendMessage",async t=>{var i,a,o,s,u,l,c,d,f;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({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const p=this.toUserMessage(t.content,t.attachments||void 0),m=this.state.get().messages;if(this.state.setPartial({messages:[...m,p]}),!((a=this.sessionCtx.sessionState.get().session)!=null&&a.id)&&!await this.sessionCtx.createSession()){console.error("Failed to create session");return}const y=(o=this.sessionCtx.sessionState.get().session)==null?void 0:o.id;if(!y)return;const{data:b}=await this.api.sendMessage({uuid:p.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:y,user:(s=this.config.user)==null?void 0:s.data,...t},this.sendMessageAbortController.signal);if(b!=null&&b.success){const g=this.toBotMessage(b);if(g){const w=this.state.get().messages;if(!!w.some(T=>T.id===g.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((u=b.autopilotResponse)==null?void 0:u.mightSolveUserIssue)||((l=b.uiResponse)==null?void 0:l.mightSolveUserIssue)});return}this.state.setPartial({messages:[...w,g],lastAIResMightSolveUserIssue:((c=b.autopilotResponse)==null?void 0:c.mightSolveUserIssue)||((d=b.uiResponse)==null?void 0:d.mightSolveUserIssue)})}}else{const g=this.toBotErrorMessage(((f=b==null?void 0:b.error)==null?void 0:f.message)||"Unknown error occurred"),w=this.state.get().messages;this.state.setPartial({messages:[...w,g]})}}catch(p){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",p)}finally{this.state.setPartial({isSendingMessage:!1})}});ne(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(this.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})});ne(this,"mapHistoryToMessage",t=>{var i,a,o;const n={id:t.publicId,timestamp:t.sentAt||"",attachments:t.attachments||void 0};if(t.sender.kind==="user")return{...n,type:"FROM_USER",content:t.content.text||"",deliveredAt:t.sentAt||""};if(t.sender.kind==="agent")return{...n,type:"FROM_AGENT",component:"agent_message",data:{message:t.content.text||""},agent:{name:t.sender.name||"",avatar:t.sender.avatar||"",id:null,isAi:!1}};const r=(i=t.actionCalls)==null?void 0:i.at(-1);return{...n,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((a=this.config.bot)==null?void 0:a.name)||"",isAi:!0,avatar:((o=this.config.bot)==null?void 0:o.avatar)||""},data:{message:t.content.text||"",action:r?{name:r.actionName,data:r.result}:void 0}}});ne(this,"toUserMessage",(t,n)=>({id:py(),type:"FROM_USER",content:t,deliveredAt:new Date().toISOString(),attachments:n,timestamp:new Date().toISOString()}));ne(this,"toBotMessage",t=>{var n;return t.success&&t.autopilotResponse?{type:"FROM_BOT",id:t.autopilotResponse.id||py(),timestamp:new Date().toISOString(),component:"bot_message",agent:this.config.bot?{name:this.config.bot.name||"",isAi:!0,avatar:this.config.bot.avatar||"",id:null}:void 0,data:{message:t.autopilotResponse.value.content,action:(n=t.uiResponse)!=null&&n.value.name?{name:t.uiResponse.value.name,data:t.uiResponse.value.request_response}:void 0}}:null});ne(this,"toBotErrorMessage",t=>({type:"FROM_BOT",id:py(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:t,variant:"error",action:void 0}}));this.config=t,this.api=n,this.sessionCtx=r,this.registerPolling()}}class Q7{constructor({contactCtx:t,sessionCtx:n,resetChat:r}){ne(this,"state");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"resetChat");ne(this,"registerRoutingListener",()=>{this.contactCtx.state.subscribe(({contact:t})=>{t!=null&&t.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})})});ne(this,"toSessionsScreen",()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})});ne(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 Z7{constructor({config:t}){ne(this,"config");ne(this,"api");ne(this,"contactCtx");ne(this,"sessionCtx");ne(this,"messageCtx");ne(this,"routerCtx");ne(this,"resetChat",()=>{this.sessionCtx.reset(),this.messageCtx.reset()});this.config=t,this.api=new z7({config:t}),this.contactCtx=new W7({api:this.api,config:this.config}),this.sessionCtx=new K7({config:this.config,api:this.api,contactCtx:this.contactCtx}),this.messageCtx=new X7({config:this.config,api:this.api,sessionCtx:this.sessionCtx}),this.routerCtx=new Q7({contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}}const[ar,J7]=uB();function ej({options:e,children:t,components:n}){const r=v.useRef(new Z7({config:e})).current,i=v.useMemo(()=>new sB({components:n}),[n]);return E.jsx(J7,{value:{widgetCtx:r,components:n,componentStore:i,version:vE},children:t})}function gs(){const{widgetCtx:e}=ar();return e.config}function pl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function tj(){const{widgetCtx:e}=ar();return{contactState:pl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function ys(){const{widgetCtx:e}=ar();return{messagesState:pl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function vs(){const{widgetCtx:e}=ar(),t=pl(e.sessionCtx.sessionState),n=pl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n}}function wC(){var r;const{sessionState:e}=vs(),{messagesState:t}=ys();return console.log({session:e.session}),{isAwaitingBotReply:(((r=e.session)==null?void 0:r.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
|
*
|